macro_rules! impl_properties_base {
() => {
pub(crate) const BUTTON_PROPERTIES: &[PropertySchema] = &[
PropertySchema::new("text", PropertyValueKind::String, true, true),
PropertySchema::new("pressed", PropertyValueKind::Bool, true, true),
PropertySchema::new("default", PropertyValueKind::Bool, true, true),
PropertySchema::new("icon_source", PropertyValueKind::IconSpec, true, true),
PropertySchema::new("icon_size", PropertyValueKind::UInt, true, true),
PropertySchema::new("shortcut", PropertyValueKind::String, true, true),
PropertySchema::new("auto_default", PropertyValueKind::Bool, true, true),
PropertySchema::new("auto_exclusive", PropertyValueKind::Bool, true, true),
PropertySchema::new("flat", PropertyValueKind::Bool, true, true),
PropertySchema::enumerated("elide", true, true, &["none", "left", "middle", "right"]),
PropertySchema::new("drag_enabled", PropertyValueKind::Bool, true, true),
PropertySchema::new("accepts_drops", PropertyValueKind::Bool, true, true),
PropertySchema::new("auto_repeat", PropertyValueKind::Bool, true, true),
PropertySchema::new("auto_repeat_delay", PropertyValueKind::UInt, true, true),
PropertySchema::new("auto_repeat_interval", PropertyValueKind::UInt, true, true),
PropertySchema::new("menu_open", PropertyValueKind::Bool, true, true),
PropertySchema::new("menu_item_count", PropertyValueKind::UInt, true, false),
PropertySchema::new("enabled", PropertyValueKind::Bool, true, true),
PropertySchema::new("tooltip", PropertyValueKind::String, true, true),
PropertySchema::new("visible", PropertyValueKind::Bool, true, true),
PropertySchema::new("geometry", PropertyValueKind::String, false, false),
];
pub(crate) const LABEL_PROPERTIES: &[PropertySchema] = &[
PropertySchema::new("text", PropertyValueKind::String, true, true),
PropertySchema::enumerated(
"alignment",
true,
true,
&["left", "centre", "right", "top", "bottom"],
),
PropertySchema::new("word_wrap", PropertyValueKind::Bool, true, true),
PropertySchema::enumerated("elide", true, true, &["none", "left", "middle", "right"]),
PropertySchema::new("margin", PropertyValueKind::UInt, true, true),
PropertySchema::new("scaled_contents", PropertyValueKind::Bool, true, true),
PropertySchema::new("indent", PropertyValueKind::UInt, true, true),
PropertySchema::enumerated("text_format", true, true, &["plain", "rich"]),
PropertySchema::new("open_external_links", PropertyValueKind::Bool, true, true),
PropertySchema::new("link_count", PropertyValueKind::UInt, true, false),
PropertySchema::new("enabled", PropertyValueKind::Bool, true, true),
PropertySchema::new("visible", PropertyValueKind::Bool, true, true),
PropertySchema::new("tooltip", PropertyValueKind::String, true, true),
PropertySchema::new("geometry", PropertyValueKind::String, false, false),
];
pub(crate) const CHECK_BOX_PROPERTIES: &[PropertySchema] = &[
PropertySchema::new("text", PropertyValueKind::String, true, true),
PropertySchema::enumerated(
"state",
true,
true,
&["unchecked", "partially_checked", "checked"],
),
PropertySchema::new("checked", PropertyValueKind::Bool, true, true),
PropertySchema::new("tristate_enabled", PropertyValueKind::Bool, true, true),
PropertySchema::new("auto_exclusive", PropertyValueKind::Bool, true, true),
PropertySchema::new("auto_repeat", PropertyValueKind::Bool, true, true),
PropertySchema::new("auto_repeat_delay", PropertyValueKind::UInt, true, true),
PropertySchema::new("auto_repeat_interval", PropertyValueKind::UInt, true, true),
PropertySchema::new("enabled", PropertyValueKind::Bool, true, true),
PropertySchema::new("visible", PropertyValueKind::Bool, true, true),
PropertySchema::new("tooltip", PropertyValueKind::String, true, true),
PropertySchema::new("geometry", PropertyValueKind::String, false, false),
];
pub(crate) const RADIO_BUTTON_PROPERTIES: &[PropertySchema] = &[
PropertySchema::new("text", PropertyValueKind::String, true, true),
PropertySchema::new("checked", PropertyValueKind::Bool, true, true),
PropertySchema::new("group_id", PropertyValueKind::String, true, true),
PropertySchema::new("auto_exclusive", PropertyValueKind::Bool, true, true),
PropertySchema::new("auto_repeat", PropertyValueKind::Bool, true, true),
PropertySchema::new("auto_repeat_delay", PropertyValueKind::UInt, true, true),
PropertySchema::new("auto_repeat_interval", PropertyValueKind::UInt, true, true),
PropertySchema::new("enabled", PropertyValueKind::Bool, true, true),
PropertySchema::new("visible", PropertyValueKind::Bool, true, true),
PropertySchema::new("tooltip", PropertyValueKind::String, true, true),
PropertySchema::new("geometry", PropertyValueKind::String, false, false),
];
#[cfg(not(alloc_frugal))]
pub(crate) const TOGGLE_BUTTON_PROPERTIES: &[PropertySchema] = &[
PropertySchema::new("text", PropertyValueKind::String, true, true),
PropertySchema::new("checked", PropertyValueKind::Bool, true, true),
PropertySchema::new("auto_exclusive", PropertyValueKind::Bool, true, true),
PropertySchema::new("auto_raise", PropertyValueKind::Bool, true, true),
PropertySchema::new("group_id", PropertyValueKind::String, true, true),
PropertySchema::new("auto_repeat", PropertyValueKind::Bool, true, true),
PropertySchema::new("auto_repeat_delay", PropertyValueKind::UInt, true, true),
PropertySchema::new("auto_repeat_interval", PropertyValueKind::UInt, true, true),
PropertySchema::new("icon_source", PropertyValueKind::IconSpec, true, true),
PropertySchema::enumerated(
"arrow_type",
true,
true,
&["none", "down", "up", "left", "right"],
),
PropertySchema::enumerated(
"popup_mode",
true,
true,
&["instant", "menu_button", "delayed"],
),
PropertySchema::new("menu_open", PropertyValueKind::Bool, true, true),
PropertySchema::new("menu_item_count", PropertyValueKind::UInt, true, false),
PropertySchema::enumerated(
"state",
true,
false,
&["normal", "hover", "pressed", "checked", "disabled"],
),
PropertySchema::new("enabled", PropertyValueKind::Bool, true, true),
PropertySchema::new("visible", PropertyValueKind::Bool, true, true),
PropertySchema::new("tooltip", PropertyValueKind::String, true, true),
PropertySchema::new("geometry", PropertyValueKind::String, false, false),
];
pub(crate) const LINE_PROPERTIES: &[PropertySchema] = &[
PropertySchema::enumerated("orientation", true, true, &["horizontal", "vertical"]),
PropertySchema::new("thickness", PropertyValueKind::UInt, true, true),
PropertySchema::new("color", PropertyValueKind::Color, true, true),
PropertySchema::new("enabled", PropertyValueKind::Bool, true, true),
PropertySchema::new("visible", PropertyValueKind::Bool, true, true),
PropertySchema::new("tooltip", PropertyValueKind::String, true, true),
PropertySchema::new("geometry", PropertyValueKind::String, false, false),
];
};
}