[][src]Struct orbtk::prelude::NumericBox

pub struct NumericBox { /* fields omitted */ }

NumericBox is used to let the user increase or decrease the value of the input by a given, fixed value called step until it reaches the upper or lower bounds. The widget can be controlled by clicking on the two control buttons, or the keybaord's Up and Down, Numpad+ and Numpad- keys, or the mouse scroll. Note: after the widget is initialized, changing the min, max or step properties has no effect.

Examples:

Create a NumericBox with default values:

NumericBox::new().build(ctx)

Create a NumericBox with custom values:

NumericBox::new().min(10.0).max(100.0).val(50.0).step(5.0).build(ctx)

Implementations

impl NumericBox[src]

pub fn id(self, id: impl Into<String>) -> NumericBox[src]

Sets the id selector.

pub fn style(self, style: impl Into<String>) -> NumericBox[src]

Sets the style selector (replaces the old selector property).

pub fn position(self, position: impl IntoPropertySource<Point>) -> NumericBox[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>
) -> NumericBox
[src]

Sets or shares the constraint property.

pub fn on_changed_filter(
    self,
    filter: impl IntoPropertySource<Filter>
) -> NumericBox
[src]

Sets or shares the filter for the on_changed property callback.

pub fn v_align(self, v_align: impl IntoPropertySource<Alignment>) -> NumericBox[src]

Sets or shares the vertical alignment property.

pub fn h_align(self, h_align: impl IntoPropertySource<Alignment>) -> NumericBox[src]

Sets or shares the horizontal alignment property.

pub fn vertical_alignment(
    self,
    vertical_alignment: impl IntoPropertySource<Alignment>
) -> NumericBox
[src]

👎 Deprecated:

Use v_align instead

Sets or shares the vertical alignment property.

pub fn horizontal_alignment(
    self,
    horizontal_alignment: impl IntoPropertySource<Alignment>
) -> NumericBox
[src]

👎 Deprecated:

Use h_align instead

Sets or shares the horizontal alignment property.

pub fn visibility(
    self,
    visibility: impl IntoPropertySource<Visibility>
) -> NumericBox
[src]

Sets or shares the visibility property.

pub fn margin(self, margin: impl IntoPropertySource<Thickness>) -> NumericBox[src]

Sets or shares the margin property.

pub fn enabled(self, enabled: impl IntoPropertySource<bool>) -> NumericBox[src]

Sets or shares the enabled property.

pub fn clip(self, clip: impl IntoPropertySource<bool>) -> NumericBox[src]

Sets or shares the clip property.

pub fn opacity(self, opacity: impl IntoPropertySource<f32>) -> NumericBox[src]

Sets or shares the opacity property.

pub fn width(self, width: impl Into<f64>) -> NumericBox[src]

Inserts a new width.

pub fn height(self, height: impl Into<f64>) -> NumericBox[src]

Inserts a new height.

pub fn size(self, width: impl Into<f64>, height: impl Into<f64>) -> NumericBox[src]

Inserts a new size.

pub fn min_width(self, min_width: impl Into<f64>) -> NumericBox[src]

Inserts a new min_width.

pub fn min_height(self, min_height: impl Into<f64>) -> NumericBox[src]

Inserts a new min_height.

pub fn min_size(
    self,
    min_width: impl Into<f64>,
    min_height: impl Into<f64>
) -> NumericBox
[src]

Inserts a new min_size.

pub fn max_width(self, max_width: impl Into<f64>) -> NumericBox[src]

Inserts a new max_width.

pub fn max_height(self, max_height: impl Into<f64>) -> NumericBox[src]

Inserts a new max_height.

pub fn max_size(
    self,
    max_width: impl Into<f64>,
    max_height: impl Into<f64>
) -> NumericBox
[src]

Inserts a new min_size.

pub fn name<P>(self, name: P) -> NumericBox where
    P: Into<String>, 
[src]

Sets the debug name of the widget.

pub fn background<P>(self, background: P) -> NumericBox where
    P: IntoPropertySource<Brush>, 
[src]

Sets or shares the background color property

pub fn border_brush<P>(self, border_brush: P) -> NumericBox where
    P: IntoPropertySource<Brush>, 
[src]

Sets or shares the border color property

pub fn border_width<P>(self, border_width: P) -> NumericBox where
    P: IntoPropertySource<Thickness>, 
[src]

Sets or shares the border width property

pub fn border_radius<P>(self, border_radius: P) -> NumericBox where
    P: IntoPropertySource<f64>, 
[src]

Sets or shares the border radius property

pub fn focused<P>(self, focused: P) -> NumericBox where
    P: IntoPropertySource<bool>, 
[src]

Sets or shares the focused property

pub fn foreground<P>(self, foreground: P) -> NumericBox where
    P: IntoPropertySource<Brush>, 
[src]

Sets or shares the foreground color property

pub fn lost_focus_on_activation<P>(
    self,
    lost_focus_on_activation: P
) -> NumericBox where
    P: IntoPropertySource<bool>, 
[src]

Sets or shares the value that describes if the NumericBox should lost focus on activation (when enter pressed).

pub fn min<P>(self, min: P) -> NumericBox where
    P: IntoPropertySource<f64>, 
[src]

Sets or shares the minimum allowed value property

pub fn max<P>(self, max: P) -> NumericBox where
    P: IntoPropertySource<f64>, 
[src]

Sets or shares the maximum allowed value property

pub fn step<P>(self, step: P) -> NumericBox where
    P: IntoPropertySource<f64>, 
[src]

Sets or shares the stepping value property

pub fn val<P>(self, val: P) -> NumericBox where
    P: IntoPropertySource<f64>, 
[src]

Sets or shares the current value property

impl NumericBox[src]

pub fn get(ctx: WidgetContainer<'a>) -> NumericBoxCtx<'a>[src]

Gets a widget context that wraps the given widgets an provides access to the its properties.

Trait Implementations

impl ActivateHandler for NumericBox[src]

impl ChangedHandler for NumericBox[src]

impl Default for NumericBox[src]

impl KeyDownHandler for NumericBox[src]

impl Template for NumericBox[src]

impl Widget for NumericBox[src]

fn new() -> NumericBox[src]

Creates a new widget.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<E> Component for E where
    E: Any
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SetParameter for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,