Struct nannou::ui::prelude::widget::title_bar::TitleBar[][src]

pub struct TitleBar<'a> {
    pub common: CommonBuilder,
    pub style: Style,
    pub label: &'a str,
}

A simple title bar widget that automatically sizes itself to the top of some other widget.

Fields

common: CommonBuilder

Data necessary and common for all widget builder types.

style: Style

Unique styling for the BorderedRectangle.

label: &'a str

A label displayed in the middle of the TitleBar.

Implementations

impl<'a> TitleBar<'a>[src]

pub fn new(label: &'a str, id: NodeIndex<u32>) -> TitleBar<'a>[src]

Construct a new TitleBar widget and attach it to the widget at the given index.

pub fn left_justify_label(self) -> TitleBar<'a>[src]

Align the text to the left of its bounding Rect’s x axis range.

pub fn center_justify_label(self) -> TitleBar<'a>[src]

Align the text to the middle of its bounding Rect’s x axis range.

pub fn right_justify_label(self) -> TitleBar<'a>[src]

Align the text to the right of its bounding Rect’s x axis range.

pub fn label_x(self, x: Relative) -> TitleBar<'a>[src]

Specify the label’s position relatively to Button along the x axis.

pub fn label_y(self, y: Relative) -> TitleBar<'a>[src]

Specify the label’s position relatively to Button along the y axis.

pub fn font_id(self, font_id: Id) -> TitleBar<'a>[src]

Specify the font used for displaying the text.

pub fn line_spacing(self, line_spacing: f64) -> TitleBar<'a>[src]

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

Trait Implementations

impl<'a> Borderable for TitleBar<'a>[src]

pub fn border(self, border: f64) -> TitleBar<'a>[src]

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

pub fn border_color(self, border_color: Color) -> TitleBar<'a>[src]

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

impl<'a> Clone for TitleBar<'a>[src]

impl<'a> Colorable for TitleBar<'a>[src]

pub fn color(self, color: Color) -> TitleBar<'a>[src]

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

impl<'a> Common for TitleBar<'a>[src]

impl<'a> Labelable<'a> for TitleBar<'a>[src]

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

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

pub fn label_color(self, label_color: Color) -> TitleBar<'a>[src]

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

pub fn label_font_size(self, label_font_size: u32) -> TitleBar<'a>[src]

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

impl<'a> Widget for TitleBar<'a>[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 = ()

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

Auto Trait Implementations

impl<'a> RefUnwindSafe for TitleBar<'a>

impl<'a> Send for TitleBar<'a>

impl<'a> Sync for TitleBar<'a>

impl<'a> Unpin for TitleBar<'a>

impl<'a> UnwindSafe for TitleBar<'a>

Blanket Implementations

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    T: Component + Float,
    D: AdaptFrom<S, Swp, Dwp, T>,
    Swp: WhitePoint,
    Dwp: WhitePoint
[src]

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, U> ConvertInto<U> for T where
    U: ConvertFrom<T>, 
[src]

impl<T> Downcast<T> for T

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

impl<T> Instrument for T[src]

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

impl<T> Pointable for T

type Init = T

The type for initializers.

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

impl<T> SetParameter for T

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

pub fn get_x_dimension(&self, ui: &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.

pub fn get_y_dimension(&self, ui: &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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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<T> Upcast<T> for T

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