Struct makepad_widgets::view::ViewRef
source · pub struct ViewRef(/* private fields */);
Implementations§
source§impl ViewRef
impl ViewRef
pub fn finger_down(&self, actions: &WidgetActions) -> Option<FingerDownEvent>
pub fn finger_up(&self, actions: &WidgetActions) -> Option<FingerUpEvent>
pub fn finger_move(&self, actions: &WidgetActions) -> Option<FingerMoveEvent>
pub fn key_down(&self, actions: &WidgetActions) -> Option<KeyEvent>
pub fn key_up(&self, actions: &WidgetActions) -> Option<KeyEvent>
pub fn cut_state(&self, cx: &mut Cx, state: &[LiveId; 2])
pub fn animator_play(&self, cx: &mut Cx, state: &[LiveId; 2])
pub fn toggle_state( &self, cx: &mut Cx, is_state_1: bool, animate: Animate, state1: &[LiveId; 2], state2: &[LiveId; 2] )
pub fn set_visible(&self, visible: bool)
pub fn set_visible_and_redraw(&self, cx: &mut Cx, visible: bool)
pub fn visible(&self) -> bool
pub fn set_texture(&self, slot: usize, texture: &Texture)
pub fn set_uniform(&self, cx: &Cx, uniform: &[LiveId], value: &[f32])
pub fn set_scroll_pos(&self, cx: &mut Cx, v: DVec2)
pub fn area(&self) -> Area
pub fn child_count(&self) -> usize
Methods from Deref<Target = WidgetRef>§
pub fn is_empty(&self) -> bool
pub fn handle_widget_event_with( &self, cx: &mut Cx, event: &Event, dispatch_action: &mut dyn FnMut(&mut Cx, WidgetActionItem) )
pub fn handle_widget_event( &self, cx: &mut Cx, event: &Event ) -> Vec<WidgetActionItem>
pub fn widget_uid(&self) -> WidgetUid
pub fn widget_to_data( &self, cx: &mut Cx, actions: &WidgetActions, nodes: &mut LiveNodeVec, path: &[LiveId] ) -> bool
pub fn data_to_widget(&self, cx: &mut Cx, nodes: &[LiveNode], path: &[LiveId])
pub fn find_widgets( &mut self, path: &[LiveId], cached: WidgetCache, results: &mut WidgetSet )
pub fn widget(&self, path: &[LiveId]) -> WidgetRef
pub fn widgets(&self, paths: &[&[LiveId]]) -> WidgetSet
pub fn draw_walk_widget(&self, cx: &mut Cx2d<'_>, walk: Walk) -> WidgetDraw
pub fn walk(&self, cx: &mut Cx) -> Walk
pub fn redraw(&self, cx: &mut Cx)
pub fn is_visible(&self) -> bool
pub fn draw_widget_all(&self, cx: &mut Cx2d<'_>)
pub fn draw_widget(&self, cx: &mut Cx2d<'_>) -> WidgetDraw
pub fn text(&self) -> String
pub fn set_text(&self, v: &str)
pub fn set_text_and_redraw(&self, cx: &mut Cx, v: &str)
pub fn borrow_mut<T: 'static + Widget>(&self) -> Option<RefMut<'_, T>>
pub fn borrow<T: 'static + Widget>(&self) -> Option<Ref<'_, T>>
pub fn apply_over(&self, cx: &mut Cx, nodes: &[LiveNode])
pub fn apply_over_and_redraw(&self, cx: &mut Cx, nodes: &[LiveNode])
Trait Implementations§
source§impl PartialEq<ViewRef> for ViewRef
impl PartialEq<ViewRef> for ViewRef
impl StructuralPartialEq for ViewRef
Auto Trait Implementations§
impl !RefUnwindSafe for ViewRef
impl !Send for ViewRef
impl !Sync for ViewRef
impl Unpin for ViewRef
impl !UnwindSafe for ViewRef
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