[−][src]Struct rg3d_ui::decorator::Decorator
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]
&self,
node_handle: Handle<UINode<M, C>>,
ui: &UserInterface<M, C>
) -> bool
pub fn find_by_criteria_up<Func: Fn(&UINode<M, C>) -> bool>(
&self,
ui: &UserInterface<M, C>,
func: Func
) -> Handle<UINode<M, C>>
[src]
&self,
ui: &UserInterface<M, C>,
func: Func
) -> Handle<UINode<M, C>>
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]
&mut self,
_ui: &mut UserInterface<M, C>,
msg: &mut UiMessage<M, C>
)
pub fn set_vertical_alignment(
&mut self,
vertical_alignment: VerticalAlignment
) -> &mut Self
[src]
&mut self,
vertical_alignment: VerticalAlignment
) -> &mut Self
pub fn vertical_alignment(&self) -> VerticalAlignment
[src]
pub fn set_horizontal_alignment(
&mut self,
horizontal_alignment: HorizontalAlignment
) -> &mut Self
[src]
&mut self,
horizontal_alignment: HorizontalAlignment
) -> &mut Self
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]
&self,
ui: &UserInterface<M, C>,
available_size: Vec2
) -> Vec2
pub fn arrange_override(
&self,
ui: &UserInterface<M, C>,
final_size: Vec2
) -> Vec2
[src]
&self,
ui: &UserInterface<M, C>,
final_size: Vec2
) -> Vec2
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]
fn raw_copy(&self) -> UINode<M, C>
[src]
fn resolve(&mut self, node_map: &NodeHandleMapping<M, C>)
[src]
fn measure_override(
&self,
ui: &UserInterface<M, C>,
available_size: Vec2
) -> Vec2
[src]
&self,
ui: &UserInterface<M, C>,
available_size: Vec2
) -> Vec2
fn arrange_override(&self, ui: &UserInterface<M, C>, final_size: Vec2) -> Vec2
[src]
fn arrange(&self, ui: &UserInterface<M, C>, final_rect: &Rect<f32>)
[src]
fn is_measure_valid(&self, ui: &UserInterface<M, C>) -> bool
[src]
fn is_arrange_valid(&self, ui: &UserInterface<M, C>) -> bool
[src]
fn measure(&self, ui: &UserInterface<M, C>, available_size: Vec2)
[src]
fn draw(&self, drawing_context: &mut DrawingContext)
[src]
fn update(&mut self, dt: f32)
[src]
fn handle_routed_message(
&mut self,
ui: &mut UserInterface<M, C>,
message: &mut UiMessage<M, C>
)
[src]
&mut self,
ui: &mut UserInterface<M, C>,
message: &mut UiMessage<M, C>
)
fn remove_ref(&mut self, handle: Handle<UINode<M, C>>)
[src]
fn preview_message(
&mut self,
_ui: &mut UserInterface<M, C>,
_message: &mut UiMessage<M, C>
)
[src]
&mut self,
_ui: &mut UserInterface<M, C>,
_message: &mut UiMessage<M, C>
)
fn handle_os_event(
&mut self,
_self_handle: Handle<UINode<M, C>>,
_ui: &mut UserInterface<M, C>,
_event: &OsEvent
)
[src]
&mut self,
_self_handle: Handle<UINode<M, C>>,
_ui: &mut UserInterface<M, C>,
_event: &OsEvent
)
impl<M: 'static, C: 'static + Control<M, C>> Deref for Decorator<M, C>
[src]
type Target = Widget<M, C>
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
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,
C: Unpin,
M: Unpin,
impl<M, C> !UnwindSafe for Decorator<M, C>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,