Struct Button

Source
pub struct Button {
    pub text: RcStringMut,
    /* private fields */
}

Fields§

§text: RcStringMut

Implementations§

Source§

impl Button

Source

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

Source

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

Trait Implementations§

Source§

impl AnimatorImpl for Button

Source§

fn animator_play(&mut self, cx: &mut Cx, state: &[LiveId; 2])

Source§

fn animator_in_state(&self, cx: &Cx, check_state_pair: &[LiveId; 2]) -> bool

Source§

fn animator_cut(&mut self, cx: &mut Cx, state: &[LiveId; 2])

Source§

fn animator_after_apply( &mut self, cx: &mut Cx, apply_from: ApplyFrom, index: usize, nodes: &[LiveNode], )

Source§

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

Source§

fn animator_handle_event( &mut self, cx: &mut Cx, event: &Event, ) -> AnimatorAction

Source§

fn animator_toggle( &mut self, cx: &mut Cx, is_state_1: bool, animate: Animate, state1: &[LiveId; 2], state2: &[LiveId; 2], )

Source§

impl LiveApply for Button

Source§

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

Source§

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

Source§

impl LiveApplyValue for Button

Source§

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

Source§

impl LiveHook for Button

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 LiveHookDeref for Button

Source§

fn deref_before_apply( &mut self, cx: &mut Cx, apply_from: ApplyFrom, index: usize, nodes: &[LiveNode], )

Source§

fn deref_after_apply( &mut self, cx: &mut Cx, apply_from: ApplyFrom, index: usize, nodes: &[LiveNode], )

Source§

impl LiveNew for Button

Source§

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

Source§

fn live_design_with(cx: &mut Cx)

Source§

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

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 Widget for Button

Source§

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

Source§

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

Source§

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

Source§

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

Source§

fn text(&self) -> String

Source§

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

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 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 set_text_and_redraw(&mut self, cx: &mut Cx, v: &str)

Source§

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

Auto Trait Implementations§

§

impl Freeze for Button

§

impl !RefUnwindSafe for Button

§

impl !Send for Button

§

impl !Sync for Button

§

impl Unpin for Button

§

impl !UnwindSafe for Button

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> ButtonSetWidgetExt for T
where T: Widget,

Source§

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

Source§

impl<T> ButtonWidgetExt for T
where T: Widget,

Source§

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

Source§

impl<T> CheckBoxWidgetExt for T
where T: Widget,

Source§

fn check_box(&mut self, path: &[LiveId]) -> CheckBoxRef

Source§

impl<T> DockSetWidgetExt for T
where T: Widget,

Source§

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

Source§

impl<T> DockWidgetExt for T
where T: Widget,

Source§

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

Source§

impl<T> DropDownWidgetExt for T
where T: Widget,

Source§

fn drop_down(&mut self, path: &[LiveId]) -> DropDownRef

Source§

impl<T> FileTreeSetWidgetExt for T
where T: Widget,

Source§

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

Source§

impl<T> FileTreeWidgetExt for T
where T: Widget,

Source§

fn file_tree(&mut self, path: &[LiveId]) -> FileTreeRef

Source§

impl<T> FlatListSetWidgetExt for T
where T: Widget,

Source§

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

Source§

impl<T> FlatListWidgetExt for T
where T: Widget,

Source§

fn flat_list(&mut self, path: &[LiveId]) -> FlatListRef

Source§

impl<T> FoldButtonWidgetExt for T
where T: Widget,

Source§

fn fold_button(&mut self, path: &[LiveId]) -> FoldButtonRef

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> ImageSetWidgetExt for T
where T: Widget,

Source§

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

Source§

impl<T> ImageWidgetExt for T
where T: Widget,

Source§

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

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> LabelWidgetExt for T
where T: Widget,

Source§

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

Source§

impl<T> LinkLabelWidgetExt for T
where T: Widget,

Source§

impl<T> MultiWindowWidgetExt for T
where T: Widget,

Source§

fn multi_window(&mut self, path: &[LiveId]) -> MultiWindowRef

Source§

impl<T> PageFlipSetWidgetExt for T
where T: Widget,

Source§

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

Source§

impl<T> PageFlipWidgetExt for T
where T: Widget,

Source§

fn page_flip(&mut self, path: &[LiveId]) -> PageFlipRef

Source§

impl<T> PortalListSetWidgetExt for T
where T: Widget,

Source§

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

Source§

impl<T> PortalListWidgetExt for T
where T: Widget,

Source§

fn portal_list(&mut self, path: &[LiveId]) -> PortalListRef

Source§

impl<T> RadioButtonSetWidgetExt for T
where T: Widget,

Source§

fn radio_button_set(&mut self, paths: &[&[LiveId]]) -> RadioButtonSet

Source§

impl<T> RadioButtonWidgetExt for T
where T: Widget,

Source§

fn radio_button(&mut self, path: &[LiveId]) -> RadioButtonRef

Source§

impl<T> SlidePanelSetWidgetExt for T
where T: Widget,

Source§

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

Source§

impl<T> SlidePanelWidgetExt for T
where T: Widget,

Source§

fn slide_panel(&mut self, path: &[LiveId]) -> SlidePanelRef

Source§

impl<T> SliderWidgetExt for T
where T: Widget,

Source§

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

Source§

impl<T> SlidesViewSetWidgetExt for T
where T: Widget,

Source§

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

Source§

impl<T> SlidesViewWidgetExt for T
where T: Widget,

Source§

fn slides_view(&mut self, path: &[LiveId]) -> SlidesViewRef

Source§

impl<T> TextInputWidgetExt for T
where T: Widget,

Source§

fn text_input(&mut self, path: &[LiveId]) -> TextInputRef

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> VideoSetWidgetExt for T
where T: Widget,

Source§

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

Source§

impl<T> VideoWidgetExt for T
where T: Widget,

Source§

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

Source§

impl<T> ViewSetWidgetExt for T
where T: Widget,

Source§

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

Source§

impl<T> ViewWidgetExt for T
where T: Widget,

Source§

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

Source§

impl<T> WindowMenuWidgetExt for T
where T: Widget,

Source§

fn window_menu(&mut self, path: &[LiveId]) -> WindowMenuRef