macro_rules! impl_properties_view {
() => {
#[cfg(not(alloc_frugal))]
pub(crate) const LIST_VIEW_PROPERTIES: &[PropertySchema] = &[
PropertySchema::new("has_model", PropertyValueKind::Bool, true, false),
PropertySchema::new("row_count", PropertyValueKind::UInt, true, false),
PropertySchema::new("focused_row", PropertyValueKind::UInt, true, true),
PropertySchema::enumerated(
"selection_mode",
true,
true,
&["none", "single", "multi", "extended"],
),
PropertySchema::enumerated(
"view_mode",
true,
true,
&["list", "icon", "details", "thumbnails"],
),
PropertySchema::enumerated("alignment", true, true, &["left", "centre", "right"]),
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),
PropertySchema::new("icon_visible_in_list_mode", PropertyValueKind::Bool, true, true),
];
#[cfg(not(alloc_frugal))]
pub(crate) const TREE_VIEW_PROPERTIES: &[PropertySchema] = &[
PropertySchema::new("has_model", PropertyValueKind::Bool, true, false),
PropertySchema::new("node_count", PropertyValueKind::UInt, true, false),
PropertySchema::new("focused_node", PropertyValueKind::UInt, true, true),
PropertySchema::new("selected_node", PropertyValueKind::UInt, true, false),
PropertySchema::new("has_delegate", PropertyValueKind::Bool, true, false),
PropertySchema::new("expanded_focused_node", PropertyValueKind::Bool, 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),
PropertySchema::new("expansion_animated", PropertyValueKind::Bool, true, true),
PropertySchema::new("lazy_loading", PropertyValueKind::Bool, true, true),
PropertySchema::new("loading_indicator_visible", PropertyValueKind::Bool, true, true),
PropertySchema::new("fetch_timeout_ms", PropertyValueKind::UInt, true, true),
];
#[cfg(not(alloc_frugal))]
pub(crate) const TABLE_WIDGET_PROPERTIES: &[PropertySchema] = &[
PropertySchema::new("has_model", PropertyValueKind::Bool, true, false),
PropertySchema::new("has_delegate", PropertyValueKind::Bool, true, false),
PropertySchema::new("row_count", PropertyValueKind::UInt, true, false),
PropertySchema::new("column_count", PropertyValueKind::UInt, true, false),
PropertySchema::enumerated(
"selection_mode",
true,
true,
&["none", "single", "multi", "extended"],
),
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),
PropertySchema::new("header_visible", PropertyValueKind::Bool, true, true),
PropertySchema::new("editable", PropertyValueKind::Bool, true, true),
PropertySchema::new("edit_triggers", PropertyValueKind::String, true, true),
];
#[cfg(not(alloc_frugal))]
pub(crate) const OTP_INPUT_PROPERTIES: &[PropertySchema] = &[
PropertySchema::new("value", PropertyValueKind::String, true, true),
PropertySchema::new("length", PropertyValueKind::UInt, true, true),
PropertySchema::new("masked", PropertyValueKind::Bool, true, true),
PropertySchema::new("read_only", PropertyValueKind::Bool, true, true),
PropertySchema::new("digits_only", PropertyValueKind::Bool, true, true),
PropertySchema::new("separator", PropertyValueKind::String, true, true),
PropertySchema::new("focused_index", PropertyValueKind::UInt, true, false),
PropertySchema::new("is_complete", PropertyValueKind::Bool, 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),
];
#[cfg(not(alloc_frugal))]
pub(crate) const BANNER_PROPERTIES: &[PropertySchema] = &[
PropertySchema::new("text", PropertyValueKind::String, true, true),
PropertySchema::enumerated(
"severity",
true,
true,
&["info", "success", "warning", "error"],
),
PropertySchema::new("dismissible", PropertyValueKind::Bool, true, true),
PropertySchema::new("dismissed", PropertyValueKind::Bool, true, false),
PropertySchema::new("action_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),
];
#[cfg(not(alloc_frugal))]
pub(crate) const PAGINATION_PROPERTIES: &[PropertySchema] = &[
PropertySchema::new("total", PropertyValueKind::UInt, true, true),
PropertySchema::new("page_size", PropertyValueKind::UInt, true, true),
PropertySchema::new("page", PropertyValueKind::UInt, true, true),
PropertySchema::new("page_count", PropertyValueKind::UInt, true, false),
PropertySchema::new("last_page", PropertyValueKind::UInt, true, false),
PropertySchema::new("sibling_count", PropertyValueKind::UInt, true, true),
PropertySchema::new("show_nav_buttons", PropertyValueKind::Bool, 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),
PropertySchema::new("wheel_paging_enabled", PropertyValueKind::Bool, true, true),
];
#[cfg(not(alloc_frugal))]
pub(crate) const NUMBER_PICKER_PROPERTIES: &[PropertySchema] = &[
PropertySchema::new("value", PropertyValueKind::Int, true, true),
PropertySchema::new("minimum", PropertyValueKind::Int, true, true),
PropertySchema::new("maximum", PropertyValueKind::Int, true, true),
PropertySchema::new("step", PropertyValueKind::Int, true, true),
PropertySchema::new("wrap", PropertyValueKind::Bool, true, true),
PropertySchema::new("suffix", PropertyValueKind::String, true, true),
PropertySchema::new("prefix", PropertyValueKind::String, true, true),
PropertySchema::new("decimals", PropertyValueKind::UInt, true, true),
PropertySchema::new("special_value_text", PropertyValueKind::String, true, true),
PropertySchema::new("row_count", PropertyValueKind::UInt, true, false),
PropertySchema::new("selected_row", PropertyValueKind::UInt, true, false),
PropertySchema::new("row_height", 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 GRID_TABLE_WIDGET_PROPERTIES: &[PropertySchema] = &[
PropertySchema::new("has_data_source", PropertyValueKind::Bool, true, false),
PropertySchema::new("row_count", PropertyValueKind::UInt, true, false),
PropertySchema::new("column_count", PropertyValueKind::UInt, true, false),
PropertySchema::new("scroll_row", PropertyValueKind::UInt, true, true),
PropertySchema::new("scroll_column", PropertyValueKind::UInt, true, true),
PropertySchema::new("row_height", PropertyValueKind::UInt, true, true),
PropertySchema::enumerated(
"selection_mode",
true,
true,
&["none", "cell", "row", "column"],
),
PropertySchema::new("sort_spec_count", PropertyValueKind::UInt, true, false),
PropertySchema::new("selected_cell", PropertyValueKind::String, 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),
PropertySchema::new("sorting_enabled", PropertyValueKind::Bool, true, true),
PropertySchema::new("sort_role", PropertyValueKind::String, true, true),
PropertySchema::new("auto_refresh", PropertyValueKind::Bool, true, true),
];
#[cfg(not(alloc_frugal))]
pub(crate) const DATA_GRID_PROPERTIES: &[PropertySchema] = &[
PropertySchema::new("has_data_source", PropertyValueKind::Bool, true, false),
PropertySchema::new("row_count", PropertyValueKind::UInt, true, false),
PropertySchema::new("column_count", PropertyValueKind::UInt, true, false),
PropertySchema::new("scroll_row", PropertyValueKind::UInt, true, true),
PropertySchema::new("scroll_column", PropertyValueKind::UInt, true, true),
PropertySchema::new("row_height", PropertyValueKind::UInt, true, true),
PropertySchema::new("column_width", PropertyValueKind::UInt, true, true),
PropertySchema::new("frozen_columns", PropertyValueKind::UInt, true, true),
PropertySchema::new("sort_spec_count", PropertyValueKind::UInt, true, false),
PropertySchema::new("filter_count", PropertyValueKind::UInt, true, false),
PropertySchema::new("sort_specs", PropertyValueKind::String, true, true),
PropertySchema::new("filters", PropertyValueKind::String, 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),
PropertySchema::enumerated(
"selection_mode",
true,
true,
&["single", "multi", "extended", "none"],
),
PropertySchema::enumerated(
"selection_behavior",
true,
true,
&["cells", "rows", "columns"],
),
PropertySchema::new("sort_indicator_visible", PropertyValueKind::Bool, true, true),
PropertySchema::enumerated(
"section_resize_mode",
true,
true,
&["fixed", "stretch", "interactive"],
),
PropertySchema::new("current_cell", PropertyValueKind::String, true, false),
PropertySchema::new("summary_text", PropertyValueKind::String, true, false),
];
#[cfg(not(alloc_frugal))]
pub(crate) const TREE_TABLE_PROPERTIES: &[PropertySchema] = &[
PropertySchema::new("has_model", PropertyValueKind::Bool, true, false),
PropertySchema::new("row_count", PropertyValueKind::UInt, true, false),
PropertySchema::new("column_count", PropertyValueKind::UInt, true, false),
PropertySchema::new("selected_row", PropertyValueKind::UInt, true, true),
PropertySchema::new("row_height", PropertyValueKind::UInt, true, true),
PropertySchema::new("column_width", 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),
PropertySchema::new("header_visible", PropertyValueKind::Bool, true, true),
PropertySchema::new("expands_on_double_click", PropertyValueKind::Bool, true, true),
PropertySchema::new("middle_click_expands", PropertyValueKind::Bool, true, true),
PropertySchema::enumerated("sort_role", true, true, &["text", "number"]),
PropertySchema::new("case_sensitive", PropertyValueKind::Bool, true, true),
PropertySchema::enumerated("projection_strategy", true, true, &["windowed", "eager"]),
PropertySchema::new("lazy_loading", PropertyValueKind::Bool, true, true),
PropertySchema::new("loading_indicator_visible", PropertyValueKind::Bool, true, true),
PropertySchema::new("fetch_timeout_ms", PropertyValueKind::UInt, true, true),
];
#[cfg(not(alloc_frugal))]
pub(crate) const VIRTUAL_TABLE_PROPERTIES: &[PropertySchema] = &[
PropertySchema::new("has_data_source", PropertyValueKind::Bool, true, false),
PropertySchema::new("row_count", PropertyValueKind::UInt, true, false),
PropertySchema::new("column_count", PropertyValueKind::UInt, true, false),
PropertySchema::new("scroll_row", PropertyValueKind::UInt, true, true),
PropertySchema::new("scroll_column", PropertyValueKind::UInt, true, true),
PropertySchema::new("row_height", PropertyValueKind::UInt, true, true),
PropertySchema::new("column_width", PropertyValueKind::UInt, true, true),
PropertySchema::new("overscan_rows", PropertyValueKind::UInt, true, true),
PropertySchema::new("overscan_columns", PropertyValueKind::UInt, true, true),
PropertySchema::new("visible_window", PropertyValueKind::String, 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),
PropertySchema::enumerated("wheel_scroll_mode", true, true, &["per_row", "per_page"]),
PropertySchema::new("header_visible", PropertyValueKind::Bool, true, true),
];
#[cfg(not(alloc_frugal))]
pub(crate) const VIRTUAL_LIST_PROPERTIES: &[PropertySchema] = &[
PropertySchema::new("has_data_source", PropertyValueKind::Bool, true, false),
PropertySchema::new("row_count", PropertyValueKind::UInt, true, false),
PropertySchema::new("scroll_row", PropertyValueKind::UInt, true, true),
PropertySchema::new("row_height", PropertyValueKind::UInt, true, true),
PropertySchema::new("overscan", PropertyValueKind::UInt, true, true),
PropertySchema::new("selected_row", 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),
PropertySchema::new("selected_rows", PropertyValueKind::NumberList, true, false),
PropertySchema::enumerated(
"selection_mode",
true,
true,
&["single", "multi", "extended", "none"],
),
];
pub(crate) const IMAGE_VIEW_PROPERTIES: &[PropertySchema] = &[
PropertySchema::new("scaled", PropertyValueKind::Bool, true, true),
PropertySchema::enumerated("rotation", true, true, &["0", "90", "180", "270"]),
PropertySchema::new("flip_horizontal", PropertyValueKind::Bool, true, true),
PropertySchema::new("flip_vertical", PropertyValueKind::Bool, true, true),
PropertySchema::new("zoom_level", PropertyValueKind::Float, true, true),
PropertySchema::new("pan_offset", PropertyValueKind::String, 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 PROPERTIES_PANEL_PROPERTIES: &[PropertySchema] = &[
PropertySchema::new("property_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),
PropertySchema::enumerated(
"description_mode",
true,
true,
&["tooltip", "status_bar", "hidden"],
),
PropertySchema::enumerated(
"edit_trigger",
true,
true,
&["single_click", "double_click"],
),
];
#[cfg(not(alloc_frugal))]
pub(crate) const IMAGE_GALLERY_PROPERTIES: &[PropertySchema] = &[
PropertySchema::new("current_index", PropertyValueKind::UInt, true, true),
PropertySchema::records(
"images",
true,
true,
&crate::widget::view_widgets::image_gallery::GALLERY_IMAGE_SCHEMA,
),
PropertySchema::new("thumbnail_size", PropertyValueKind::UInt, true, true),
PropertySchema::new("show_thumbnails", PropertyValueKind::Bool, 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),
PropertySchema::new("strip_offset", PropertyValueKind::UInt, true, true),
PropertySchema::new("strip_scroll_enabled", PropertyValueKind::Bool, true, true),
PropertySchema::enumerated("wheel_mode", true, true, &["strip", "navigate", "zoom"]),
PropertySchema::new(
"arrow_key_navigation_enabled",
PropertyValueKind::Bool,
true,
true,
),
];
#[cfg(not(alloc_frugal))]
pub(crate) const PROPERTY_GRID_PROPERTIES: &[PropertySchema] = &[
PropertySchema::new("property_count", PropertyValueKind::UInt, true, false),
PropertySchema::new("selected_index", 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 TOAST_PROPERTIES: &[PropertySchema] = &[
PropertySchema::new("message", PropertyValueKind::String, true, true),
PropertySchema::enumerated(
"level",
true,
true,
&["info", "success", "warning", "error"],
),
PropertySchema::new("ttl_ms", PropertyValueKind::UInt, true, true),
PropertySchema::new("dismissible", PropertyValueKind::Bool, 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 SPLASH_SCREEN_PROPERTIES: &[PropertySchema] = &[
PropertySchema::new("title", PropertyValueKind::String, true, true),
PropertySchema::new("subtitle", PropertyValueKind::String, true, true),
PropertySchema::new("progress", PropertyValueKind::Float, true, true),
PropertySchema::new("skippable", PropertyValueKind::Bool, 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 COLOR_DIALOG_PROPERTIES: &[PropertySchema] = &[
PropertySchema::new("current_color", PropertyValueKind::String, true, false),
PropertySchema::new("hex_rgba", PropertyValueKind::String, true, true),
PropertySchema::new("preset_index", PropertyValueKind::UInt, true, true),
PropertySchema::new("show_hex_input", PropertyValueKind::Bool, true, true),
PropertySchema::new("show_presets", PropertyValueKind::Bool, true, true),
PropertySchema::new("show_hue_rail", PropertyValueKind::Bool, true, true),
PropertySchema::new("custom_color_count", PropertyValueKind::UInt, true, false),
PropertySchema::new("modal", PropertyValueKind::Bool, true, true),
PropertySchema::new("options_alpha", PropertyValueKind::Bool, 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),
PropertySchema::new("show_screen_picker", PropertyValueKind::Bool, true, true),
];
};
}