pub struct WidgetState {Show 17 fields
pub rect: Rect,
pub interact_rect: Rect,
pub role: WidgetRole,
pub label: Option<String>,
pub value: Option<WidgetValue>,
pub value_text: String,
pub layout: Option<WidgetLayout>,
pub scroll: Option<ScrollAreaMeta>,
pub range: Option<WidgetRange>,
pub options: Option<Vec<String>>,
pub selected: Option<bool>,
pub indeterminate: Option<bool>,
pub multiline: Option<bool>,
pub password: Option<bool>,
pub enabled: bool,
pub visible: bool,
pub focused: bool,
}Expand description
Live widget snapshot exposed to scripting surfaces.
Fields§
§rect: RectWidget rect.
interact_rect: RectWidget interaction rect.
role: WidgetRoleRole taxonomy entry.
label: Option<String>Optional label.
value: Option<WidgetValue>Optional widget value for stateful controls.
value_text: StringString representation of the widget value. Empty string when value is
None. For Bool → "true"/"false", Float → decimal, Int →
decimal, Text → verbatim.
layout: Option<WidgetLayout>Optional layout metadata.
scroll: Option<ScrollAreaMeta>Optional scroll metadata for scroll areas.
range: Option<WidgetRange>Optional numeric range for sliders and ranged drag values.
options: Option<Vec<String>>Optional option labels for combo boxes.
selected: Option<bool>Optional selected/toggled state for selected-aware buttons.
indeterminate: Option<bool>Optional third visual state for indeterminate checkboxes.
multiline: Option<bool>Optional multiline flag for text edits.
password: Option<bool>Optional password-masking flag for text edits.
enabled: boolWhether the widget is enabled.
visible: boolWhether the widget is visible.
focused: boolWhether the widget reported egui focus in the captured frame (may lag keyboard focus).
Trait Implementations§
Source§impl Clone for WidgetState
impl Clone for WidgetState
Source§fn clone(&self) -> WidgetState
fn clone(&self) -> WidgetState
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WidgetState
impl Debug for WidgetState
Source§impl<'de> Deserialize<'de> for WidgetState
impl<'de> Deserialize<'de> for WidgetState
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 JsonSchema for WidgetState
impl JsonSchema for WidgetState
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more