pub enum WidgetKind {
Show 44 variants
Column,
Row,
Container,
Scrollable,
Stack,
Text,
Image,
Svg,
Button,
TextInput,
Checkbox,
Slider,
PickList,
Toggler,
Space,
Rule,
Radio,
ComboBox,
ProgressBar,
Tooltip,
Grid,
Canvas,
CanvasRect,
CanvasCircle,
CanvasLine,
CanvasText,
CanvasGroup,
DatePicker,
TimePicker,
ColorPicker,
Menu,
MenuItem,
MenuSeparator,
ContextMenu,
Float,
DataTable,
DataColumn,
TreeView,
TreeNode,
TabBar,
Tab,
For,
If,
Custom(String),
}Expand description
Enumeration of all supported widget types
Variants§
Column
Row
Container
Scrollable
Stack
Text
Image
Svg
Button
TextInput
Checkbox
Slider
PickList
Toggler
Space
Rule
Radio
ComboBox
ProgressBar
Tooltip
Grid
Canvas
CanvasRect
CanvasCircle
CanvasLine
CanvasText
CanvasGroup
DatePicker
Date selection widget with calendar overlay
TimePicker
Time selection widget with hour/minute/second picker
ColorPicker
Color selection widget with color picker overlay
Menu
MenuItem
MenuSeparator
ContextMenu
Float
DataTable
DataColumn
TreeView
TreeNode
TabBar
Tab
For
If
Custom(String)
Implementations§
Source§impl WidgetKind
impl WidgetKind
Sourcepub fn all_standard() -> &'static [&'static str]
pub fn all_standard() -> &'static [&'static str]
Returns a list of all standard widget tag names.
Sourcepub fn minimum_version(&self) -> SchemaVersion
pub fn minimum_version(&self) -> SchemaVersion
Returns the minimum schema version required for this widget type.
This method provides infrastructure for version-gating widgets in future releases. Currently, all widgets return version 1.0 as they are part of the initial release.
§Future Usage
When new widgets are added in future schema versions (e.g., 1.1, 1.2), this method will be updated to return the appropriate minimum version for those widgets. The parser can then validate that documents declaring older schema versions do not use widgets that were introduced in later versions.
§Examples
use dampen_core::{WidgetKind, SchemaVersion};
let column = WidgetKind::Column;
assert_eq!(column.minimum_version(), SchemaVersion { major: 1, minor: 0 });§Returns
The minimum SchemaVersion required to use this widget type.
Sourcepub fn schema(&self) -> WidgetSchema
pub fn schema(&self) -> WidgetSchema
Returns the validation schema for this widget type.
Trait Implementations§
Source§impl Clone for WidgetKind
impl Clone for WidgetKind
Source§fn clone(&self) -> WidgetKind
fn clone(&self) -> WidgetKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WidgetKind
impl Debug for WidgetKind
Source§impl Default for WidgetKind
impl Default for WidgetKind
Source§fn default() -> WidgetKind
fn default() -> WidgetKind
Source§impl<'de> Deserialize<'de> for WidgetKind
impl<'de> Deserialize<'de> for WidgetKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for WidgetKind
impl Display for WidgetKind
impl Eq for WidgetKind
Source§impl Hash for WidgetKind
impl Hash for WidgetKind
Source§impl PartialEq for WidgetKind
impl PartialEq for WidgetKind
Source§fn eq(&self, other: &WidgetKind) -> bool
fn eq(&self, other: &WidgetKind) -> bool
self and other values to be equal, and is used by ==.