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
|
@ -11,13 +11,43 @@ use super::{CustomWidget, CustomWidgetContext, ExecEvent, WidgetConfig};
|
|||
|
||||
#[derive(Debug, Deserialize, Clone)]
|
||||
pub struct ButtonWidget {
|
||||
/// Widget name.
|
||||
///
|
||||
/// **Default**: `null`
|
||||
name: Option<String>,
|
||||
|
||||
/// Widget class name.
|
||||
///
|
||||
/// **Default**: `null`
|
||||
class: Option<String>,
|
||||
|
||||
/// Widget text label. Pango markup and embedded scripts are supported.
|
||||
///
|
||||
/// This is a shorthand for adding a label widget to the button.
|
||||
/// Ignored if `widgets` is set.
|
||||
///
|
||||
/// This is a [Dynamic String](dynamic-values#dynamic-string).
|
||||
///
|
||||
/// **Default**: `null`
|
||||
label: Option<String>,
|
||||
|
||||
/// Command to execute. More on this [below](#commands).
|
||||
///
|
||||
/// **Default**: `null`
|
||||
on_click: Option<String>,
|
||||
widgets: Option<Vec<WidgetConfig>>,
|
||||
|
||||
/// Orientation of the button.
|
||||
///
|
||||
/// **Valid options**: `horizontal`, `vertical`, `h`, `v`
|
||||
/// <br />
|
||||
/// **Default**: `horizontal`
|
||||
#[serde(default)]
|
||||
orientation: ModuleOrientation,
|
||||
|
||||
/// Modules and widgets to add to this box.
|
||||
///
|
||||
/// **Default**: `null`
|
||||
widgets: Option<Vec<WidgetConfig>>,
|
||||
}
|
||||
|
||||
impl CustomWidget for ButtonWidget {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue