pub enum RoleState {
ScrollArea {
offset: Vec2,
viewport_size: Vec2,
content_size: Vec2,
},
Slider {
range: WidgetRange,
},
DragValue {
range: Option<WidgetRange>,
},
ComboBox {
options: Vec<String>,
},
Button {
selected: bool,
},
Checkbox {
indeterminate: bool,
},
TextEdit {
multiline: bool,
password: bool,
},
}Expand description
Role-specific widget metadata kept on internal registry entries.
Variants§
ScrollArea
Scroll area metadata.
Fields
§
offset: Vec2Current scroll offset.
§
viewport_size: Vec2Viewport size available to the scroll contents.
§
content_size: Vec2Total content size within the scroll area.
Slider
Slider range metadata.
Fields
§
range: WidgetRangeAllowed numeric range.
DragValue
Drag value range metadata.
Fields
§
range: Option<WidgetRange>Allowed numeric range when constrained by the app.
ComboBox
Combo box option labels.
Button
Selected/toggled button state.
Checkbox
Checkbox third-state metadata.
TextEdit
Text edit configuration metadata.
Implementations§
Source§impl RoleState
impl RoleState
Sourcepub fn scroll_state(&self) -> Option<ScrollAreaMeta>
pub fn scroll_state(&self) -> Option<ScrollAreaMeta>
Project scroll-area metadata into the flat scripting shape.
Sourcepub fn range(&self) -> Option<WidgetRange>
pub fn range(&self) -> Option<WidgetRange>
Project numeric range metadata into the flat scripting shape.
Sourcepub fn indeterminate(&self) -> Option<bool>
pub fn indeterminate(&self) -> Option<bool>
Return checkbox indeterminate metadata when present.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RoleState
impl<'de> Deserialize<'de> for RoleState
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for RoleState
impl JsonSchema for RoleState
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl StructuralPartialEq for RoleState
Auto Trait Implementations§
impl Freeze for RoleState
impl RefUnwindSafe for RoleState
impl Send for RoleState
impl Sync for RoleState
impl Unpin for RoleState
impl UnsafeUnpin for RoleState
impl UnwindSafe for RoleState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more