[−][src]Struct orbtk_widgets::ToggleButton
The ToggleButton
widget can be clicked by user and could switch between selected / not selected.
It's used to perform an action.
CSS element: toggle-button
Methods
impl ToggleButton
[src]
pub fn attach<P: Component + Debug>(self, property: AttachedProperty<P>) -> Self
[src]
Sets or shares an attached property.
pub fn id(self, id: impl Into<String>) -> Self
[src]
Sets the id selector.
pub fn element(self, element: impl Into<String>) -> Self
[src]
Sets the element selector.
pub fn class(self, class: impl Into<String>) -> Self
[src]
Inserts class selector.
pub fn position(self, position: impl IntoPropertySource<Point>) -> Self
[src]
Sets or shares the position of the widget. (Be careful the position could be adjusted by layouts).
pub fn constraint(self, constraint: impl IntoPropertySource<Constraint>) -> Self
[src]
Sets or shares the constraint property.
pub fn vertical_alignment(
self,
vertical_alignment: impl IntoPropertySource<Alignment>
) -> Self
[src]
self,
vertical_alignment: impl IntoPropertySource<Alignment>
) -> Self
Sets or shares the vertical alignment property.
pub fn horizontal_alignment(
self,
horizontal_alignment: impl IntoPropertySource<Alignment>
) -> Self
[src]
self,
horizontal_alignment: impl IntoPropertySource<Alignment>
) -> Self
Sets or shares the horizontal alignment property.
pub fn visibility(self, visibility: impl IntoPropertySource<Visibility>) -> Self
[src]
Sets or shares the visibility property.
pub fn margin(self, margin: impl IntoPropertySource<Thickness>) -> Self
[src]
Sets or shares the margin property.
pub fn enabled(self, enabled: impl IntoPropertySource<bool>) -> Self
[src]
Sets or shares the enabled property.
pub fn clip(self, clip: impl IntoPropertySource<bool>) -> Self
[src]
Sets or shares the clip property.
pub fn opacity(self, opacity: impl IntoPropertySource<f32>) -> Self
[src]
pub fn width(self, width: f64) -> Self
[src]
Inserts a new width.
pub fn height(self, height: f64) -> Self
[src]
Inserts a new height.
pub fn size(self, width: f64, height: f64) -> Self
[src]
Inserts a new size.
pub fn min_width(self, min_width: f64) -> Self
[src]
Inserts a new min_width.
pub fn min_height(self, min_height: f64) -> Self
[src]
Inserts a new min_height.
pub fn min_size(self, min_width: f64, min_height: f64) -> Self
[src]
Inserts a new min_size.
pub fn max_width(self, max_width: f64) -> Self
[src]
Inserts a new max_width.
pub fn max_height(self, max_height: f64) -> Self
[src]
Inserts a new max_height.
pub fn max_size(self, max_width: f64, max_height: f64) -> Self
[src]
Inserts a new min_size.
pub fn name<P: Into<String>>(self, name: P) -> Self
[src]
Sets the debug name of the widget.
pub fn background<P: IntoPropertySource<Brush>>(self, background: P) -> Self
[src]
Sets or shares the background property.
pub fn border_radius<P: IntoPropertySource<f64>>(self, border_radius: P) -> Self
[src]
Sets or shares the border radius property.
pub fn border_width<P: IntoPropertySource<Thickness>>(
self,
border_width: P
) -> Self
[src]
self,
border_width: P
) -> Self
Sets or shares the border thickness property.
pub fn border_brush<P: IntoPropertySource<Brush>>(self, border_brush: P) -> Self
[src]
Sets or shares the border brush property.
pub fn padding<P: IntoPropertySource<Thickness>>(self, padding: P) -> Self
[src]
Sets or shares the padding property.
pub fn foreground<P: IntoPropertySource<Brush>>(self, foreground: P) -> Self
[src]
Sets or shares the foreground property.
pub fn text<P: IntoPropertySource<String16>>(self, text: P) -> Self
[src]
Sets or shares the text property.
pub fn font_size<P: IntoPropertySource<f64>>(self, font_size: P) -> Self
[src]
Sets or share the font size property.
pub fn font<P: IntoPropertySource<String>>(self, font: P) -> Self
[src]
Sets or shares the font property.
pub fn icon<P: IntoPropertySource<String>>(self, icon: P) -> Self
[src]
Sets or shares the icon property.
pub fn icon_brush<P: IntoPropertySource<Brush>>(self, icon_brush: P) -> Self
[src]
Sets or shares the icon brush property.
pub fn icon_size<P: IntoPropertySource<f64>>(self, icon_size: P) -> Self
[src]
Sets or share the icon font size property.
pub fn icon_font<P: IntoPropertySource<String>>(self, icon_font: P) -> Self
[src]
Sets or shares the icon font property.
pub fn pressed<P: IntoPropertySource<bool>>(self, pressed: P) -> Self
[src]
Sets or shares the pressed property.
pub fn selected<P: IntoPropertySource<bool>>(self, selected: P) -> Self
[src]
Sets or shares the selected property.
pub fn spacing<P: IntoPropertySource<f64>>(self, spacing: P) -> Self
[src]
Sets or shares the spacing between icon and text.
Trait Implementations
impl ChangedHandler for ToggleButton
[src]
fn on_changed<H>(self, handler: H) -> Self where
H: 'static + Fn(&mut StatesContext, Entity),
[src]
H: 'static + Fn(&mut StatesContext, Entity),
impl Default for ToggleButton
[src]
fn default() -> ToggleButton
[src]
impl MouseHandler for ToggleButton
[src]
fn on_click<H>(self, handler: H) -> Self where
H: 'static + Fn(&mut StatesContext, Point) -> bool,
[src]
H: 'static + Fn(&mut StatesContext, Point) -> bool,
fn on_mouse_down<H>(self, handler: H) -> Self where
H: 'static + Fn(&mut StatesContext, Point) -> bool,
[src]
H: 'static + Fn(&mut StatesContext, Point) -> bool,
fn on_mouse_up<H>(self, handler: H) -> Self where
H: 'static + Fn(&mut StatesContext, Point) -> bool,
[src]
H: 'static + Fn(&mut StatesContext, Point) -> bool,
fn on_global_mouse_up<H>(self, handler: H) -> Self where
H: 'static + Fn(&mut StatesContext, Point),
[src]
H: 'static + Fn(&mut StatesContext, Point),
fn on_mouse_move<H>(self, handler: H) -> Self where
H: 'static + Fn(&mut StatesContext, Point) -> bool,
[src]
H: 'static + Fn(&mut StatesContext, Point) -> bool,
fn on_scroll<H>(self, handler: H) -> Self where
H: 'static + Fn(&mut StatesContext, Point) -> bool,
[src]
H: 'static + Fn(&mut StatesContext, Point) -> bool,
impl Template for ToggleButton
[src]
fn template(self, id: Entity, ctx: &mut BuildContext) -> Self
[src]
fn render_object(&self) -> Box<dyn RenderObject + 'static>
[src]
fn layout(&self) -> Box<dyn Layout + 'static>
[src]
impl Widget for ToggleButton
[src]
fn create() -> Self
[src]
fn insert_handler(self, handler: impl Into<Rc<dyn EventHandler>>) -> Self
[src]
fn child(self, child: Entity) -> Self
[src]
fn build(self, ctx: &mut BuildContext) -> Entity
[src]
Auto Trait Implementations
impl !RefUnwindSafe for ToggleButton
impl !Send for ToggleButton
impl !Sync for ToggleButton
impl Unpin for ToggleButton
impl !UnwindSafe for ToggleButton
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<E> Component for E where
E: Any,
[src]
E: Any,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,