Struct makepad_widgets::widget::WidgetRef
source · pub struct WidgetRef(/* private fields */);
Implementations§
source§impl WidgetRef
impl WidgetRef
pub fn empty() -> Self
pub fn is_empty(&self) -> bool
pub fn new_with_inner(widget: Box<dyn Widget>) -> Self
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 ButtonSetWidgetRefExt for WidgetRef
impl ButtonSetWidgetRefExt for WidgetRef
source§impl ButtonWidgetRefExt for WidgetRef
impl ButtonWidgetRefExt for WidgetRef
source§impl CheckBoxWidgetRefExt for WidgetRef
impl CheckBoxWidgetRefExt for WidgetRef
fn check_box(&self, path: &[LiveId]) -> CheckBoxRef
fn as_check_box(&self) -> CheckBoxRef
source§impl DockSetWidgetRefExt for WidgetRef
impl DockSetWidgetRefExt for WidgetRef
source§impl DockWidgetRefExt for WidgetRef
impl DockWidgetRefExt for WidgetRef
source§impl DropDownWidgetRefExt for WidgetRef
impl DropDownWidgetRefExt for WidgetRef
fn drop_down(&self, path: &[LiveId]) -> DropDownRef
fn as_drop_down(&self) -> DropDownRef
source§impl FileTreeSetWidgetRefExt for WidgetRef
impl FileTreeSetWidgetRefExt for WidgetRef
fn file_tree_set(&self, paths: &[&[LiveId]]) -> FileTreeSet
source§impl FileTreeWidgetRefExt for WidgetRef
impl FileTreeWidgetRefExt for WidgetRef
fn file_tree(&self, path: &[LiveId]) -> FileTreeRef
fn as_file_tree(&self) -> FileTreeRef
source§impl FlatListSetWidgetRefExt for WidgetRef
impl FlatListSetWidgetRefExt for WidgetRef
fn flat_list_set(&self, paths: &[&[LiveId]]) -> FlatListSet
source§impl FlatListWidgetRefExt for WidgetRef
impl FlatListWidgetRefExt for WidgetRef
fn flat_list(&self, path: &[LiveId]) -> FlatListRef
fn as_flat_list(&self) -> FlatListRef
source§impl FoldButtonWidgetRefExt for WidgetRef
impl FoldButtonWidgetRefExt for WidgetRef
source§impl ImageSetWidgetRefExt for WidgetRef
impl ImageSetWidgetRefExt for WidgetRef
source§impl ImageWidgetRefExt for WidgetRef
impl ImageWidgetRefExt for WidgetRef
source§impl LabelWidgetRefExt for WidgetRef
impl LabelWidgetRefExt for WidgetRef
source§impl LinkLabelWidgetRefExt for WidgetRef
impl LinkLabelWidgetRefExt for WidgetRef
fn link_label(&self, path: &[LiveId]) -> LinkLabelRef
fn as_link_label(&self) -> LinkLabelRef
source§impl LiveHook for WidgetRef
impl LiveHook for WidgetRef
fn before_live_design(_cx: &mut Cx)
fn apply_value_unknown( &mut self, cx: &mut Cx, _apply_from: ApplyFrom, index: usize, nodes: &[LiveNode] ) -> usize
fn apply_value_instance( &mut self, _cx: &mut Cx, _apply_from: ApplyFrom, index: usize, nodes: &[LiveNode] ) -> usize
fn skip_apply( &mut self, _cx: &mut Cx, _apply_from: ApplyFrom, _index: usize, _nodes: &[LiveNode] ) -> Option<usize>
fn before_apply( &mut self, _cx: &mut Cx, _apply_from: ApplyFrom, _index: usize, _nodes: &[LiveNode] )
fn after_apply( &mut self, _cx: &mut Cx, _apply_from: ApplyFrom, _index: usize, _nodes: &[LiveNode] )
fn after_apply_from(&mut self, cx: &mut Cx, apply_from: ApplyFrom)
fn after_new_from_doc(&mut self, _cx: &mut Cx)
fn after_new_before_apply(&mut self, _cx: &mut Cx)
source§impl LiveNew for WidgetRef
impl LiveNew for WidgetRef
fn new(_cx: &mut Cx) -> Self
fn live_type_info(_cx: &mut Cx) -> LiveTypeInfo
fn live_design_with(_cx: &mut Cx)
fn new_apply( cx: &mut Cx, from: ApplyFrom, index: usize, nodes: &[LiveNode] ) -> Selfwhere Self: Sized,
fn new_apply_mut_index( cx: &mut Cx, from: ApplyFrom, index: &mut usize, nodes: &[LiveNode] ) -> Selfwhere Self: Sized,
fn new_from_ptr(cx: &mut Cx, live_ptr: Option<LivePtr>) -> Selfwhere Self: Sized,
fn new_main(cx: &mut Cx) -> Selfwhere Self: Sized,
fn update_main(&mut self, cx: &mut Cx)
fn new_local(cx: &mut Cx) -> Selfwhere Self: Sized,
fn new_from_module( cx: &mut Cx, module_id: LiveModuleId, id: LiveId ) -> Option<Self>where Self: Sized,
fn update_from_module( &mut self, cx: &mut Cx, module_id: LiveModuleId, id: LiveId )
source§impl MultiWindowWidgetRefExt for WidgetRef
impl MultiWindowWidgetRefExt for WidgetRef
fn multi_window(&self, path: &[LiveId]) -> MultiWindowRef
fn as_multi_window(&self) -> MultiWindowRef
source§impl PageFlipSetWidgetRefExt for WidgetRef
impl PageFlipSetWidgetRefExt for WidgetRef
fn page_flip_set(&self, paths: &[&[LiveId]]) -> PageFlipSet
source§impl PageFlipWidgetRefExt for WidgetRef
impl PageFlipWidgetRefExt for WidgetRef
fn page_flip(&self, path: &[LiveId]) -> PageFlipRef
fn as_page_flip(&self) -> PageFlipRef
source§impl PartialEq<WidgetRef> for WidgetRef
impl PartialEq<WidgetRef> for WidgetRef
source§impl PortalListSetWidgetRefExt for WidgetRef
impl PortalListSetWidgetRefExt for WidgetRef
fn portal_list_set(&self, paths: &[&[LiveId]]) -> PortalListSet
source§impl PortalListWidgetRefExt for WidgetRef
impl PortalListWidgetRefExt for WidgetRef
fn portal_list(&self, path: &[LiveId]) -> PortalListRef
fn as_portal_list(&self) -> PortalListRef
source§impl RadioButtonWidgetRefExt for WidgetRef
impl RadioButtonWidgetRefExt for WidgetRef
source§impl SlidePanelSetWidgetRefExt for WidgetRef
impl SlidePanelSetWidgetRefExt for WidgetRef
fn slide_panel_set(&self, paths: &[&[LiveId]]) -> SlidePanelSet
source§impl SlidePanelWidgetRefExt for WidgetRef
impl SlidePanelWidgetRefExt for WidgetRef
fn slide_panel(&self, path: &[LiveId]) -> SlidePanelRef
fn as_slide_panel(&self) -> SlidePanelRef
source§impl SliderWidgetRefExt for WidgetRef
impl SliderWidgetRefExt for WidgetRef
source§impl SlidesViewSetWidgetRefExt for WidgetRef
impl SlidesViewSetWidgetRefExt for WidgetRef
fn slides_view_set(&self, paths: &[&[LiveId]]) -> SlidesViewSet
source§impl SlidesViewWidgetRefExt for WidgetRef
impl SlidesViewWidgetRefExt for WidgetRef
fn slides_view(&self, path: &[LiveId]) -> SlidesViewRef
fn as_slides_view(&self) -> SlidesViewRef
source§impl TextInputWidgetRefExt for WidgetRef
impl TextInputWidgetRefExt for WidgetRef
fn text_input(&self, path: &[LiveId]) -> TextInputRef
fn as_text_input(&self) -> TextInputRef
source§impl VideoSetWidgetRefExt for WidgetRef
impl VideoSetWidgetRefExt for WidgetRef
source§impl VideoWidgetRefExt for WidgetRef
impl VideoWidgetRefExt for WidgetRef
source§impl ViewSetWidgetRefExt for WidgetRef
impl ViewSetWidgetRefExt for WidgetRef
Auto Trait Implementations§
impl !RefUnwindSafe for WidgetRef
impl !Send for WidgetRef
impl !Sync for WidgetRef
impl Unpin for WidgetRef
impl !UnwindSafe for WidgetRef
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