Trait Widget

Source
pub trait Widget: LiveApply {
Show 18 methods // Required methods fn draw_walk_widget(&mut self, cx: &mut Cx2d<'_>, walk: Walk) -> WidgetDraw; fn redraw(&mut self, _cx: &mut Cx); // Provided methods fn handle_widget_event_with( &mut self, _cx: &mut Cx, _event: &Event, _fn_action: &mut dyn FnMut(&mut Cx, WidgetActionItem), ) { ... } fn handle_widget_event( &mut self, cx: &mut Cx, event: &Event, ) -> WidgetActions { ... } fn find_widgets( &mut self, _path: &[LiveId], _cached: WidgetCache, _results: &mut WidgetSet, ) { ... } fn widget(&mut self, path: &[LiveId]) -> WidgetRef { ... } fn widgets(&mut self, paths: &[&[LiveId]]) -> WidgetSet { ... } fn widget_uid(&self) -> WidgetUid { ... } fn widget_to_data( &self, _cx: &mut Cx, _actions: &WidgetActions, _nodes: &mut LiveNodeVec, _path: &[LiveId], ) -> bool { ... } fn data_to_widget( &mut self, _cx: &mut Cx, _nodes: &[LiveNode], _path: &[LiveId], ) { ... } fn walk(&mut self, _cx: &mut Cx) -> Walk { ... } fn is_visible(&self) -> bool { ... } fn draw_widget(&mut self, cx: &mut Cx2d<'_>) -> WidgetDraw { ... } fn draw_widget_all(&mut self, cx: &mut Cx2d<'_>) { ... } fn text(&self) -> String { ... } fn set_text(&mut self, _v: &str) { ... } fn set_text_and_redraw(&mut self, cx: &mut Cx, v: &str) { ... } fn type_id(&self) -> LiveType where Self: 'static { ... }
}

Required Methods§

Source

fn draw_walk_widget(&mut self, cx: &mut Cx2d<'_>, walk: Walk) -> WidgetDraw

Source

fn redraw(&mut self, _cx: &mut Cx)

Provided Methods§

Source

fn handle_widget_event_with( &mut self, _cx: &mut Cx, _event: &Event, _fn_action: &mut dyn FnMut(&mut Cx, WidgetActionItem), )

Source

fn handle_widget_event(&mut self, cx: &mut Cx, event: &Event) -> WidgetActions

Source

fn find_widgets( &mut self, _path: &[LiveId], _cached: WidgetCache, _results: &mut WidgetSet, )

Source

fn widget(&mut self, path: &[LiveId]) -> WidgetRef

Source

fn widgets(&mut self, paths: &[&[LiveId]]) -> WidgetSet

Source

fn widget_uid(&self) -> WidgetUid

Source

fn widget_to_data( &self, _cx: &mut Cx, _actions: &WidgetActions, _nodes: &mut LiveNodeVec, _path: &[LiveId], ) -> bool

Source

fn data_to_widget( &mut self, _cx: &mut Cx, _nodes: &[LiveNode], _path: &[LiveId], )

Source

fn walk(&mut self, _cx: &mut Cx) -> Walk

Source

fn is_visible(&self) -> bool

Source

fn draw_widget(&mut self, cx: &mut Cx2d<'_>) -> WidgetDraw

Source

fn draw_widget_all(&mut self, cx: &mut Cx2d<'_>)

Source

fn text(&self) -> String

Source

fn set_text(&mut self, _v: &str)

Source

fn set_text_and_redraw(&mut self, cx: &mut Cx, v: &str)

Source

fn type_id(&self) -> LiveType
where Self: 'static,

Implementations§

Source§

impl dyn Widget

Source

pub fn is<T: Widget + 'static>(&self) -> bool

Source

pub fn cast<T: Widget + 'static>(&self) -> Option<&T>

Source

pub fn cast_mut<T: Widget + 'static>(&mut self) -> Option<&mut T>

Implementors§