[][src]Struct conrod_core::widget::xy_pad::XYPad

pub struct XYPad<'a, X, Y> {
    pub enabled: bool,
    // some fields omitted
}

Used for displaying and controlling a 2D point on a cartesian plane within a given range.

Its reaction is triggered when the value is updated or if the mouse button is released while the cursor is above the rectangle.

Fields

enabled: bool

Indicates whether the XYPad will respond to user input.

Implementations

impl<'a, X, Y> XYPad<'a, X, Y>[src]

pub fn new(x_val: X, min_x: X, max_x: X, y_val: Y, min_y: Y, max_y: Y) -> Self[src]

Build a new XYPad widget.

pub fn label_font_id(self, font_id: Id) -> Self[src]

Specify the font used for displaying the label.

pub fn line_thickness(self, line_thickness: Scalar) -> Self[src]

Build the type's self.$($assignee).+ with the given $Type.

pub fn value_font_size(self, value_font_size: FontSize) -> Self[src]

Build the type's self.$($assignee).+ with the given $Type.

pub fn enabled(self, enabled: bool) -> Self[src]

Build the type's self.$($assignee).+ with the given $Type.

Trait Implementations

impl<'a, X, Y> Borderable for XYPad<'a, X, Y>[src]

fn border(self, border: Scalar) -> Self[src]

Build the type's self.$($assignee).+ with the given $Type.

fn border_color(self, border_color: Color) -> Self[src]

Build the type's self.$($assignee).+ with the given $Type.

impl<'a, X, Y> Colorable for XYPad<'a, X, Y>[src]

fn color(self, color: Color) -> Self[src]

Build the type's self.$($assignee).+ with the given $Type.

impl<'a, X, Y> Common for XYPad<'a, X, Y>[src]

impl<'a, X, Y> Labelable<'a> for XYPad<'a, X, Y>[src]

fn label(self, label: &'a str) -> Self[src]

Build the type's self.$($assignee).+ with the given $Type.

fn label_color(self, label_color: Color) -> Self[src]

Build the type's self.$($assignee).+ with the given $Type.

fn label_font_size(self, label_font_size: FontSize) -> Self[src]

Build the type's self.$($assignee).+ with the given $Type.

impl<'a, X, Y> Widget for XYPad<'a, X, Y> where
    X: Float + ToString + Debug + Any,
    Y: Float + ToString + Debug + Any
[src]

type State = State

State to be stored within the Uis widget cache. Read more

type Style = Style

Every widget is required to have its own associated Style type. This type is intended to contain high-level styling information for the widget that can be optionally specified by a user of the widget. Read more

type Event = Option<(X, Y)>

The type of event yielded by the widget, returned via the Widget::set function. Read more

fn update(self, args: UpdateArgs<'_, '_, '_, '_, Self>) -> Self::Event[src]

Update the XYPad's cached state.

Auto Trait Implementations

impl<'a, X, Y> RefUnwindSafe for XYPad<'a, X, Y> where
    X: RefUnwindSafe,
    Y: RefUnwindSafe

impl<'a, X, Y> Send for XYPad<'a, X, Y> where
    X: Send,
    Y: Send

impl<'a, X, Y> Sync for XYPad<'a, X, Y> where
    X: Sync,
    Y: Sync

impl<'a, X, Y> Unpin for XYPad<'a, X, Y> where
    X: Unpin,
    Y: Unpin

impl<'a, X, Y> UnwindSafe for XYPad<'a, X, Y> where
    X: UnwindSafe,
    Y: UnwindSafe

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<T> From<T> for T[src]

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

impl<W> Positionable for W where
    W: Widget
[src]

impl<W> Sizeable for W where
    W: Widget
[src]

fn get_x_dimension(&Self, &Ui) -> Dimension[src]

We attempt to retrieve the x Dimension for the widget via the following:

  • Check for specified value at maybe_x_dimension
  • Otherwise, use the default returned by Widget::default_x_dimension.

fn get_y_dimension(&Self, &Ui) -> Dimension[src]

We attempt to retrieve the y Dimension for the widget via the following:

  • Check for specified value at maybe_y_dimension
  • Otherwise, use the default returned by Widget::default_y_dimension.

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.