mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-08-17 14:51:04 +02:00
docs: add rustdoc comments to all module options
This part of an upcoming effort to generate documentation from code. Pushing this out before that stage so that the JSON schema is fully documented.
This commit is contained in:
parent
3b6480f3f2
commit
c7743b28c6
24 changed files with 833 additions and 48 deletions
|
@ -17,18 +17,67 @@ use super::{CustomWidget, CustomWidgetContext, ExecEvent};
|
|||
|
||||
#[derive(Debug, Deserialize, Clone)]
|
||||
pub struct SliderWidget {
|
||||
/// Widget name.
|
||||
///
|
||||
/// **Default**: `null`
|
||||
name: Option<String>,
|
||||
|
||||
/// Widget class name.
|
||||
///
|
||||
/// **Default**: `null`
|
||||
class: Option<String>,
|
||||
|
||||
/// Orientation of the slider.
|
||||
///
|
||||
/// **Valid options**: `horizontal`, `vertical`, `h`, `v`
|
||||
/// <br />
|
||||
/// **Default**: `horizontal`
|
||||
#[serde(default)]
|
||||
orientation: ModuleOrientation,
|
||||
|
||||
/// Script to run to get the slider value.
|
||||
/// Output must be a valid number.
|
||||
///
|
||||
/// **Default**: `null`
|
||||
value: Option<ScriptInput>,
|
||||
|
||||
/// Command to execute when the slider changes.
|
||||
/// More on this [below](#slider).
|
||||
///
|
||||
/// Note that this will provide the floating point value as an argument.
|
||||
/// If your input program requires an integer, you will need to round it.
|
||||
///
|
||||
/// **Default**: `null`
|
||||
on_change: Option<String>,
|
||||
|
||||
/// Minimum slider value.
|
||||
///
|
||||
/// **Default**: `0`
|
||||
#[serde(default = "default_min")]
|
||||
min: f64,
|
||||
|
||||
/// Maximum slider value.
|
||||
///
|
||||
/// **Default**: `100`
|
||||
#[serde(default = "default_max")]
|
||||
max: f64,
|
||||
|
||||
/// If the increment to change when scrolling with the mousewheel.
|
||||
/// If left blank, GTK will use the default value,
|
||||
/// determined by the current environment.
|
||||
///
|
||||
/// **Default**: `null`
|
||||
step: Option<f64>,
|
||||
|
||||
/// The slider length.
|
||||
/// GTK will automatically determine the size if left blank.
|
||||
///
|
||||
/// **Default**: `null`
|
||||
length: Option<i32>,
|
||||
|
||||
/// Whether to show the value label above the slider.
|
||||
///
|
||||
/// **Default**: `true`
|
||||
#[serde(default = "crate::config::default_true")]
|
||||
show_label: bool,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue