[][src]Struct rg3d_ui::decorator::Decorator

pub struct Decorator<M: 'static, C: 'static + Control<M, C>> { /* fields omitted */ }

A visual element that changes its appearance by listening specific events. It can has "pressed", "hover", "selected" or normal appearance:

Pressed - enables on mouse down message. Selected - decorator listens for messages from parent ItemContainer and if its ItemsControl has changed selection, then if current decorator is in subtree of ItemContainer it will be either selected or not (determined by selection of parent ItemContainer) Hovered - used when mouse is over decorator. Normal - used when not selected, pressed, hovered.

This element is widely used to provide some generic visual behaviour for various widgets. For example it used to decorate button, items in items control.

Methods from Deref<Target = Widget<M, C>>

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

pub fn name(&self) -> &str[src]

pub fn set_name<P: AsRef<str>>(&mut self, name: P) -> &mut Self[src]

pub fn actual_size(&self) -> Vec2[src]

pub fn set_min_size(&mut self, value: Vec2) -> &mut Self[src]

pub fn min_size(&self) -> Vec2[src]

pub fn min_width(&self) -> f32[src]

pub fn min_height(&self) -> f32[src]

pub fn is_drag_allowed(&self) -> bool[src]

pub fn is_drop_allowed(&self) -> bool[src]

pub fn invalidate_layout(&self)[src]

pub fn is_hit_test_visible(&self) -> bool[src]

pub fn set_max_size(&mut self, value: Vec2) -> &mut Self[src]

pub fn max_size(&self) -> Vec2[src]

pub fn max_width(&self) -> f32[src]

pub fn max_height(&self) -> f32[src]

pub fn set_z_index(&mut self, z_index: usize) -> &mut Self[src]

pub fn z_index(&self) -> usize[src]

pub fn set_background(&mut self, brush: Brush) -> &mut Self[src]

pub fn background(&self) -> Brush[src]

pub fn set_foreground(&mut self, brush: Brush) -> &mut Self[src]

pub fn foreground(&self) -> Brush[src]

pub fn set_width(&mut self, width: f32) -> &mut Self[src]

pub fn width(&self) -> f32[src]

pub fn is_draw_on_top(&self) -> bool[src]

pub fn set_height(&mut self, height: f32) -> &mut Self[src]

pub fn height(&self) -> f32[src]

pub fn set_desired_local_position(&mut self, pos: Vec2) -> &mut Self[src]

pub fn screen_position(&self) -> Vec2[src]

pub fn raw_copy(&self) -> Self[src]

pub fn children(&self) -> &[Handle<UINode<M, C>>][src]

pub fn parent(&self) -> Handle<UINode<M, C>>[src]

pub fn set_parent(&mut self, parent: Handle<UINode<M, C>>)[src]

pub fn column(&self) -> usize[src]

pub fn set_row(&mut self, row: usize) -> &mut Self[src]

pub fn row(&self) -> usize[src]

pub fn desired_size(&self) -> Vec2[src]

pub fn desired_local_position(&self) -> Vec2[src]

pub fn set_visibility(&mut self, visibility: bool) -> &mut Self[src]

pub fn screen_bounds(&self) -> Rect<f32>[src]

pub fn has_descendant(
    &self,
    node_handle: Handle<UINode<M, C>>,
    ui: &UserInterface<M, C>
) -> bool
[src]

pub fn find_by_criteria_up<Func: Fn(&UINode<M, C>) -> bool>(
    &self,
    ui: &UserInterface<M, C>,
    func: Func
) -> Handle<UINode<M, C>>
[src]

Searches a node up on tree starting from given root that matches a criteria defined by a given func.

pub fn handle_routed_message(
    &mut self,
    _ui: &mut UserInterface<M, C>,
    msg: &mut UiMessage<M, C>
)
[src]

pub fn set_vertical_alignment(
    &mut self,
    vertical_alignment: VerticalAlignment
) -> &mut Self
[src]

pub fn vertical_alignment(&self) -> VerticalAlignment[src]

pub fn set_horizontal_alignment(
    &mut self,
    horizontal_alignment: HorizontalAlignment
) -> &mut Self
[src]

pub fn horizontal_alignment(&self) -> HorizontalAlignment[src]

pub fn set_column(&mut self, column: usize) -> &mut Self[src]

pub fn set_margin(&mut self, margin: Thickness) -> &mut Self[src]

pub fn margin(&self) -> Thickness[src]

pub fn measure_override(
    &self,
    ui: &UserInterface<M, C>,
    available_size: Vec2
) -> Vec2
[src]

pub fn arrange_override(
    &self,
    ui: &UserInterface<M, C>,
    final_size: Vec2
) -> Vec2
[src]

pub fn is_arrange_valid(&self) -> bool[src]

pub fn is_measure_valid(&self) -> bool[src]

pub fn actual_local_position(&self) -> Vec2[src]

pub fn is_globally_visible(&self) -> bool[src]

pub fn visibility(&self) -> bool[src]

pub fn user_data_ref<T: 'static>(&self) -> &T[src]

Trait Implementations

impl<M: 'static, C: 'static + Control<M, C>> Control<M, C> for Decorator<M, C>[src]

impl<M: 'static, C: 'static + Control<M, C>> Deref for Decorator<M, C>[src]

type Target = Widget<M, C>

The resulting type after dereferencing.

impl<M: 'static, C: 'static + Control<M, C>> DerefMut for Decorator<M, C>[src]

Auto Trait Implementations

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

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

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

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

impl<M, C> !UnwindSafe for Decorator<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, 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>,