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

§

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

source§

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

source§

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

source§

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

source§

impl PageFlipSetWidgetRefExt for WidgetRef

source§

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

source§

impl PageFlipWidgetRefExt for WidgetRef

source§

impl PartialEq<WidgetRef> for WidgetRef

source§

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

This method tests for self and other values to be equal, and is used by ==.
source§

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

This method 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

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. 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 Twhere 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 Twhere T: Clone,

§

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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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 Twhere T: 'static + Clone + ?Sized,