Struct rg3d_ui::widget::WidgetBuilder[][src]

pub struct WidgetBuilder<M: MessageData, C: Control<M, C>> {
    pub name: String,
    pub width: f32,
    pub height: f32,
    pub desired_position: Vector2<f32>,
    pub vertical_alignment: VerticalAlignment,
    pub horizontal_alignment: HorizontalAlignment,
    pub max_size: Option<Vector2<f32>>,
    pub min_size: Option<Vector2<f32>>,
    pub background: Option<Brush>,
    pub foreground: Option<Brush>,
    pub row: usize,
    pub column: usize,
    pub margin: Thickness,
    pub children: Vec<Handle<UINode<M, C>>>,
    pub is_hit_test_visible: bool,
    pub visibility: bool,
    pub z_index: usize,
    pub allow_drag: bool,
    pub allow_drop: bool,
    pub user_data: Option<Rc<dyn Any>>,
    pub draw_on_top: bool,
    pub enabled: bool,
    pub cursor: Option<CursorIcon>,
    pub opacity: f32,
    pub tooltip: Handle<UINode<M, C>>,
    pub tooltip_time: f32,
    pub context_menu: Handle<UINode<M, C>>,
}

Fields

name: Stringwidth: f32height: f32desired_position: Vector2<f32>vertical_alignment: VerticalAlignmenthorizontal_alignment: HorizontalAlignmentmax_size: Option<Vector2<f32>>min_size: Option<Vector2<f32>>background: Option<Brush>foreground: Option<Brush>row: usizecolumn: usizemargin: Thicknesschildren: Vec<Handle<UINode<M, C>>>is_hit_test_visible: boolvisibility: boolz_index: usizeallow_drag: boolallow_drop: booluser_data: Option<Rc<dyn Any>>draw_on_top: boolenabled: boolcursor: Option<CursorIcon>opacity: f32tooltip: Handle<UINode<M, C>>tooltip_time: f32context_menu: Handle<UINode<M, C>>

Implementations

impl<M: MessageData, C: Control<M, C>> WidgetBuilder<M, C>[src]

pub fn new() -> Self[src]

pub fn with_width(self, width: f32) -> Self[src]

pub fn with_height(self, height: f32) -> Self[src]

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

pub fn with_vertical_alignment(self, valign: VerticalAlignment) -> Self[src]

pub fn with_horizontal_alignment(self, halign: HorizontalAlignment) -> Self[src]

pub fn with_max_size(self, max_size: Vector2<f32>) -> Self[src]

pub fn with_min_size(self, min_size: Vector2<f32>) -> Self[src]

pub fn with_background(self, brush: Brush) -> Self[src]

pub fn with_foreground(self, brush: Brush) -> Self[src]

pub fn on_row(self, row: usize) -> Self[src]

pub fn on_column(self, column: usize) -> Self[src]

pub fn with_margin(self, margin: Thickness) -> Self[src]

pub fn with_desired_position(self, desired_position: Vector2<f32>) -> Self[src]

pub fn with_z_index(self, z_index: usize) -> Self[src]

pub fn with_child(self, handle: Handle<UINode<M, C>>) -> Self[src]

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

pub fn with_children<'a, I: IntoIterator<Item = &'a Handle<UINode<M, C>>>>(
    self,
    children: I
) -> Self
[src]

pub fn with_name(self, name: &str) -> Self[src]

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

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

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

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

pub fn with_user_data(self, user_data: Rc<dyn Any>) -> Self[src]

pub fn with_cursor(self, cursor: Option<CursorIcon>) -> Self[src]

pub fn with_opacity(self, opacity: f32) -> Self[src]

pub fn with_tooltip(self, tooltip: Handle<UINode<M, C>>) -> Self[src]

pub fn with_tooltip_time(self, tooltip_time: f32) -> Self[src]

pub fn with_context_menu(self, context_menu: Handle<UINode<M, C>>) -> Self[src]

The context menu receives PopupMessages for being displayed, and so should support those.

pub fn build(self) -> Widget<M, C>[src]

Trait Implementations

impl<M: MessageData, C: Control<M, C>> Default for WidgetBuilder<M, C>[src]

Auto Trait Implementations

impl<M, C> !RefUnwindSafe for WidgetBuilder<M, C>

impl<M, C> !Send for WidgetBuilder<M, C>

impl<M, C> !Sync for WidgetBuilder<M, C>

impl<M, C> Unpin for WidgetBuilder<M, C> where
    C: Unpin,
    M: Unpin

impl<M, C> !UnwindSafe for WidgetBuilder<M, C>

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

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

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>,