Struct WidgetRef

Source
pub struct WidgetRef(/* private fields */);

Implementations§

Source§

impl WidgetRef

Source

pub fn empty() -> Self

Source

pub fn is_empty(&self) -> bool

Source

pub fn new_with_inner(widget: Box<dyn Widget>) -> Self

Source

pub fn handle_widget_event_with( &self, cx: &mut Cx, event: &Event, dispatch_action: &mut dyn FnMut(&mut Cx, WidgetActionItem), )

Source

pub fn handle_widget_event( &self, cx: &mut Cx, event: &Event, ) -> Vec<WidgetActionItem>

Source

pub fn widget_uid(&self) -> WidgetUid

Source

pub fn widget_to_data( &self, cx: &mut Cx, actions: &WidgetActions, nodes: &mut LiveNodeVec, path: &[LiveId], ) -> bool

Source

pub fn data_to_widget(&self, cx: &mut Cx, nodes: &[LiveNode], path: &[LiveId])

Source

pub fn find_widgets( &mut self, path: &[LiveId], cached: WidgetCache, results: &mut WidgetSet, )

Source

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

Source

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

Source

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

Source

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

Source

pub fn redraw(&self, cx: &mut Cx)

Source

pub fn is_visible(&self) -> bool

Source

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

Source

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

Source

pub fn text(&self) -> String

Source

pub fn set_text(&self, v: &str)

Source

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

Source

pub fn borrow_mut<T: 'static + Widget>(&self) -> Option<RefMut<'_, T>>

Source

pub fn borrow<T: 'static + Widget>(&self) -> Option<Ref<'_, T>>

Source

pub fn apply_over(&self, cx: &mut Cx, nodes: &[LiveNode])

Source

pub fn apply_over_and_redraw(&self, cx: &mut Cx, nodes: &[LiveNode])

Trait Implementations§

Source§

impl ButtonSetWidgetRefExt for WidgetRef

Source§

fn button_set(&self, paths: &[&[LiveId]]) -> ButtonSet

Source§

impl ButtonWidgetRefExt for WidgetRef

Source§

fn button(&self, path: &[LiveId]) -> ButtonRef

Source§

fn as_button(&self) -> ButtonRef

Source§

impl CheckBoxWidgetRefExt for WidgetRef

Source§

impl Clone for WidgetRef

Source§

fn clone(&self) -> WidgetRef

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WidgetRef

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for WidgetRef

Source§

fn default() -> WidgetRef

Returns the “default value” for a type. Read more
Source§

impl DockSetWidgetRefExt for WidgetRef

Source§

fn dock_set(&self, paths: &[&[LiveId]]) -> DockSet

Source§

impl DockWidgetRefExt for WidgetRef

Source§

fn dock(&self, path: &[LiveId]) -> DockRef

Source§

fn as_dock(&self) -> DockRef

Source§

impl DropDownWidgetRefExt for WidgetRef

Source§

impl FileTreeSetWidgetRefExt for WidgetRef

Source§

fn file_tree_set(&self, paths: &[&[LiveId]]) -> FileTreeSet

Source§

impl FileTreeWidgetRefExt for WidgetRef

Source§

impl FlatListSetWidgetRefExt for WidgetRef

Source§

fn flat_list_set(&self, paths: &[&[LiveId]]) -> FlatListSet

Source§

impl FlatListWidgetRefExt for WidgetRef

Source§

impl FoldButtonWidgetRefExt for WidgetRef

Source§

impl ImageSetWidgetRefExt for WidgetRef

Source§

fn image_set(&self, paths: &[&[LiveId]]) -> ImageSet

Source§

impl ImageWidgetRefExt for WidgetRef

Source§

fn image(&self, path: &[LiveId]) -> ImageRef

Source§

fn as_image(&self) -> ImageRef

Source§

impl LabelWidgetRefExt for WidgetRef

Source§

fn label(&self, path: &[LiveId]) -> LabelRef

Source§

fn as_label(&self) -> LabelRef

Source§

impl LinkLabelWidgetRefExt for WidgetRef

Source§

impl LiveApply for WidgetRef

Source§

fn apply( &mut self, cx: &mut Cx, from: ApplyFrom, index: usize, nodes: &[LiveNode], ) -> usize

Source§

fn apply_over(&mut self, cx: &mut Cx, nodes: &[LiveNode])

Source§

impl LiveHook for WidgetRef

Source§

fn before_live_design(_cx: &mut Cx)

Source§

fn apply_value_unknown( &mut self, cx: &mut Cx, _apply_from: ApplyFrom, index: usize, nodes: &[LiveNode], ) -> usize

Source§

fn apply_value_instance( &mut self, _cx: &mut Cx, _apply_from: ApplyFrom, index: usize, nodes: &[LiveNode], ) -> usize

Source§

fn skip_apply( &mut self, _cx: &mut Cx, _apply_from: ApplyFrom, _index: usize, _nodes: &[LiveNode], ) -> Option<usize>

Source§

fn before_apply( &mut self, _cx: &mut Cx, _apply_from: ApplyFrom, _index: usize, _nodes: &[LiveNode], )

Source§

fn after_apply( &mut self, _cx: &mut Cx, _apply_from: ApplyFrom, _index: usize, _nodes: &[LiveNode], )

Source§

fn after_apply_from(&mut self, cx: &mut Cx, apply_from: ApplyFrom)

Source§

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

Source§

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

Source§

impl LiveNew for WidgetRef

Source§

fn new(_cx: &mut Cx) -> Self

Source§

fn live_type_info(_cx: &mut Cx) -> LiveTypeInfo

Source§

fn live_design_with(_cx: &mut Cx)

Source§

fn new_apply( cx: &mut Cx, from: ApplyFrom, index: usize, nodes: &[LiveNode], ) -> Self
where Self: Sized,

Source§

fn new_apply_mut_index( cx: &mut Cx, from: ApplyFrom, index: &mut usize, nodes: &[LiveNode], ) -> Self
where Self: Sized,

Source§

fn new_from_ptr(cx: &mut Cx, live_ptr: Option<LivePtr>) -> Self
where Self: Sized,

Source§

fn new_main(cx: &mut Cx) -> Self
where Self: Sized,

Source§

fn update_main(&mut self, cx: &mut Cx)

Source§

fn new_local(cx: &mut Cx) -> Self
where Self: Sized,

Source§

fn new_from_module( cx: &mut Cx, module_id: LiveModuleId, id: LiveId, ) -> Option<Self>
where Self: Sized,

Source§

fn update_from_module( &mut self, cx: &mut Cx, module_id: LiveModuleId, id: LiveId, )

Source§

impl MultiWindowWidgetRefExt for WidgetRef

Source§

impl PageFlipSetWidgetRefExt for WidgetRef

Source§

fn page_flip_set(&self, paths: &[&[LiveId]]) -> PageFlipSet

Source§

impl PageFlipWidgetRefExt for WidgetRef

Source§

impl PartialEq for WidgetRef

Source§

fn eq(&self, other: &WidgetRef) -> bool

Tests for self and other values to be equal, and is used by ==.
Source§

fn ne(&self, other: &WidgetRef) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PortalListSetWidgetRefExt for WidgetRef

Source§

fn portal_list_set(&self, paths: &[&[LiveId]]) -> PortalListSet

Source§

impl PortalListWidgetRefExt for WidgetRef

Source§

impl RadioButtonSetWidgetRefExt for WidgetRef

Source§

impl RadioButtonWidgetRefExt for WidgetRef

Source§

impl SlidePanelSetWidgetRefExt for WidgetRef

Source§

fn slide_panel_set(&self, paths: &[&[LiveId]]) -> SlidePanelSet

Source§

impl SlidePanelWidgetRefExt for WidgetRef

Source§

impl SliderWidgetRefExt for WidgetRef

Source§

fn slider(&self, path: &[LiveId]) -> SliderRef

Source§

fn as_slider(&self) -> SliderRef

Source§

impl SlidesViewSetWidgetRefExt for WidgetRef

Source§

fn slides_view_set(&self, paths: &[&[LiveId]]) -> SlidesViewSet

Source§

impl SlidesViewWidgetRefExt for WidgetRef

Source§

impl TextInputWidgetRefExt for WidgetRef

Source§

impl VideoSetWidgetRefExt for WidgetRef

Source§

fn video_set(&self, paths: &[&[LiveId]]) -> VideoSet

Source§

impl VideoWidgetRefExt for WidgetRef

Source§

fn video(&self, path: &[LiveId]) -> VideoRef

Source§

fn as_video(&self) -> VideoRef

Source§

impl ViewSetWidgetRefExt for WidgetRef

Source§

fn view_set(&self, paths: &[&[LiveId]]) -> ViewSet

Source§

impl ViewWidgetRefExt for WidgetRef

Source§

fn view(&self, path: &[LiveId]) -> ViewRef

Source§

fn as_view(&self) -> ViewRef

Source§

impl WindowMenuWidgetRefExt for WidgetRef

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WidgetAction for T
where T: 'static + Clone + ?Sized,