Enum rg3d_ui::message::WidgetMessage [−][src]
A set of messages for any kind of widgets (including user controls). These messages provides basic communication elements of the UI library.
Variants
Initiated when user clicks on a widget’s geometry.
Direction: From UI.
Initiated when user releases mouse button while cursor is over widget’s geometry.
Direction: From UI.
Initiated when user moves cursor over widget’s geometry.
Direction: From/To UI.
Fields of MouseMove
pos: Vector2<f32>
New position of cursor in screen coordinates.
state: MouseState
State of mouse buttons.
Initiated when user scrolls mouse wheel while cursor is over widget’s geometry.
Direction: From/To UI.
Fields of MouseWheel
Initiated when cursor leaves geometry of a widget.
Direction: From UI.
Initiated when cursor enters geometry of a widget.
Direction: From UI.
Text(char)
Initiated when widget is in focus and user types something on a keyboard.
Direction: From/To UI.
KeyDown(KeyCode)
Initiated when widget is in focus and user presses a button on a keyboard.
Direction: From UI.
KeyUp(KeyCode)
Initiated when widget is in focus and user releases a button on a keyboard.
Direction: From UI.
Initiated when widget received focus. In most cases focus is received by clicking on widget.
Direction: From UI.
Initiated when dragging of a widget has started.
Direction: From UI.
Initiated when user drags a widget over some other widget.
Direction: From UI.
Initiated when user drops a widget onto some other widget.
Direction: From UI.
Initiated when widget has lost its focus.
Direction: From UI.
A request to make widget topmost. Widget can be made topmost only in the same hierarchy level only!
Direction: From/To UI.
A request to detach widget from its current parent and attach to root canvas.
Direction: From/To UI.
A request to delete widget with all its children widgets. All handles to a node and its children will be invalid after processing such message!
Direction: From/To UI.
A request to link initiator with specified widget.
Direction: From/To UI.
A request to link initiator with specified widget and put it in front of children list.
Direction: From/To UI.
Background(Brush)
A request to change background brush of a widget. Background brushes are used to fill volume of widgets.
Direction: From/To UI
Foreground(Brush)
A request to change foreground brush of a widget. Foreground brushes are used for text, borders and so on.
Direction: From/To UI
Name(String)
A request to change name of a widget. Name is given to widget mostly for debugging purposes.
Direction: From/To UI
Width(f32)
A request to set width of a widget. In most cases there is no need to explicitly set width of a widget, because rg3d-ui uses automatic layout engine which will correctly calculate desired width of a widget.
Direction: From/To UI
Height(f32)
A request to set height of a widget. In most cases there is no need to explicitly set height of a widget, because rg3d-ui uses automatic layout engine which will correctly calculate desired height of a widget.
Direction: From/To UI
VerticalAlignment(VerticalAlignment)
A request to set vertical alignment of a widget. Vertical alignment tells where to put widget in the parent widget’s bounds in vertical direction.
Direction: From/To UI
HorizontalAlignment(HorizontalAlignment)
A request to set horizontal alignment of a widget. Horizontal alignment tells where to put widget in the parent widget’s bounds in horizontal direction.
Direction: From/To UI
A request to set maximum size of widget. Maximum size restricts size of a widget during layout pass. For example you can set maximum size to a button which was placed into a grid’s cell, if maximum size wouldn’t be set, button would be stretched to fill entire cell.
Direction: From/To UI
A request to set minimum size of widget. Minimum size restricts size of a widget during layout pass. For example you can set minimum size to a button which was placed into a grid’s cell, if minimum size wouldn’t be set, button would be compressed to fill entire cell.
Direction: From/To UI
Row(usize)
A request to set row number of a grid to which widget should belong to.
Direction: From/To UI
Notes
This is bad API and it should be changed in future. Grid should have explicit list of pairs (row, child) instead of this indirect attachment.
Column(usize)
A request to set column number of a grid to which widget should belong to.
Direction: From/To UI
Notes
This is bad API and it should be changed in future. Grid should have explicit list of pairs (column, child) instead of this indirect attachment.
Margin(Thickness)
A request to set new margin of widget. Margin could be used to add some free space around widget to make UI look less dense.
Direction: From/To UI
HitTestVisibility(bool)
A request to set new state hit test visibility. If set to false, widget will become “non-clickable”. It is useful for decorations which should be transparent for mouse events.
Direction: From/To UI
Visibility(bool)
A request to set new visibility of a widget. Widget can be either visible or not. Invisible widgets does not take space in layout pass and collapsed to a point.
Direction: From/To UI
ZIndex(usize)
A request to set new z index of a widget. Z index is used to change drawing order of widgets. Please note that it works only in same hierarchy level, which means that it is impossible to set z index to 9999 (or similar huge value) to force widget to be drawn on top of everything.
Direction: From/To UI
A request to set new desired position of a widget. It is called “desired” because layout system may ignore it and set some other position. Desired position works with a combination of a layout panel that supports direct coordinated (Canvas for example).
Direction: From/To UI
Enabled(bool)
A request to enable or disable widget. Disabled widget won’t receive mouse events and may look differently (it is defined by internal styling).
Direction: From/To UI
A request to set desired position at center in local coordinates.
Direction: From/To UI
Cursor(Option<CursorIcon>)
A request to set new cursor icon for widget.
Direction: From/To UI
Opacity(f32)
A request to set new opacity for widget.
Direction: From/To UI
Implementations
impl<M: MessageData, C: Control<M, C>> WidgetMessage<M, C>
[src]
pub fn remove(
destination: Handle<UINode<M, C>>,
direction: MessageDirection
) -> UiMessage<M, C>
[src]
destination: Handle<UINode<M, C>>,
direction: MessageDirection
) -> UiMessage<M, C>
pub fn unlink(
destination: Handle<UINode<M, C>>,
direction: MessageDirection
) -> UiMessage<M, C>
[src]
destination: Handle<UINode<M, C>>,
direction: MessageDirection
) -> UiMessage<M, C>
pub fn link(
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: Handle<UINode<M, C>>
) -> UiMessage<M, C>
[src]
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: Handle<UINode<M, C>>
) -> UiMessage<M, C>
pub fn link_reverse(
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: Handle<UINode<M, C>>
) -> UiMessage<M, C>
[src]
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: Handle<UINode<M, C>>
) -> UiMessage<M, C>
pub fn background(
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: Brush
) -> UiMessage<M, C>
[src]
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: Brush
) -> UiMessage<M, C>
pub fn foreground(
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: Brush
) -> UiMessage<M, C>
[src]
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: Brush
) -> UiMessage<M, C>
pub fn visibility(
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: bool
) -> UiMessage<M, C>
[src]
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: bool
) -> UiMessage<M, C>
pub fn width(
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: f32
) -> UiMessage<M, C>
[src]
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: f32
) -> UiMessage<M, C>
pub fn height(
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: f32
) -> UiMessage<M, C>
[src]
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: f32
) -> UiMessage<M, C>
pub fn desired_position(
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: Vector2<f32>
) -> UiMessage<M, C>
[src]
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: Vector2<f32>
) -> UiMessage<M, C>
pub fn center(
destination: Handle<UINode<M, C>>,
direction: MessageDirection
) -> UiMessage<M, C>
[src]
destination: Handle<UINode<M, C>>,
direction: MessageDirection
) -> UiMessage<M, C>
pub fn topmost(
destination: Handle<UINode<M, C>>,
direction: MessageDirection
) -> UiMessage<M, C>
[src]
destination: Handle<UINode<M, C>>,
direction: MessageDirection
) -> UiMessage<M, C>
pub fn enabled(
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: bool
) -> UiMessage<M, C>
[src]
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: bool
) -> UiMessage<M, C>
pub fn name(
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: String
) -> UiMessage<M, C>
[src]
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: String
) -> UiMessage<M, C>
pub fn row(
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: usize
) -> UiMessage<M, C>
[src]
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: usize
) -> UiMessage<M, C>
pub fn column(
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: usize
) -> UiMessage<M, C>
[src]
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: usize
) -> UiMessage<M, C>
pub fn cursor(
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: Option<CursorIcon>
) -> UiMessage<M, C>
[src]
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: Option<CursorIcon>
) -> UiMessage<M, C>
pub fn z_index(
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: usize
) -> UiMessage<M, C>
[src]
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: usize
) -> UiMessage<M, C>
pub fn hit_test_visibility(
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: bool
) -> UiMessage<M, C>
[src]
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: bool
) -> UiMessage<M, C>
pub fn margin(
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: Thickness
) -> UiMessage<M, C>
[src]
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: Thickness
) -> UiMessage<M, C>
pub fn min_size(
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: Vector2<f32>
) -> UiMessage<M, C>
[src]
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: Vector2<f32>
) -> UiMessage<M, C>
pub fn max_size(
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: Vector2<f32>
) -> UiMessage<M, C>
[src]
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: Vector2<f32>
) -> UiMessage<M, C>
pub fn horizontal_alignment(
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: HorizontalAlignment
) -> UiMessage<M, C>
[src]
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: HorizontalAlignment
) -> UiMessage<M, C>
pub fn vertical_alignment(
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: VerticalAlignment
) -> UiMessage<M, C>
[src]
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: VerticalAlignment
) -> UiMessage<M, C>
pub fn opacity(
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: f32
) -> UiMessage<M, C>
[src]
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: f32
) -> UiMessage<M, C>
pub fn got_focus(
destination: Handle<UINode<M, C>>,
direction: MessageDirection
) -> UiMessage<M, C>
[src]
destination: Handle<UINode<M, C>>,
direction: MessageDirection
) -> UiMessage<M, C>
pub fn lost_focus(
destination: Handle<UINode<M, C>>,
direction: MessageDirection
) -> UiMessage<M, C>
[src]
destination: Handle<UINode<M, C>>,
direction: MessageDirection
) -> UiMessage<M, C>
pub fn mouse_down(
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
pos: Vector2<f32>,
button: MouseButton
) -> UiMessage<M, C>
[src]
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
pos: Vector2<f32>,
button: MouseButton
) -> UiMessage<M, C>
pub fn mouse_up(
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
pos: Vector2<f32>,
button: MouseButton
) -> UiMessage<M, C>
[src]
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
pos: Vector2<f32>,
button: MouseButton
) -> UiMessage<M, C>
pub fn mouse_move(
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
pos: Vector2<f32>,
state: MouseState
) -> UiMessage<M, C>
[src]
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
pos: Vector2<f32>,
state: MouseState
) -> UiMessage<M, C>
pub fn mouse_wheel(
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
pos: Vector2<f32>,
amount: f32
) -> UiMessage<M, C>
[src]
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
pos: Vector2<f32>,
amount: f32
) -> UiMessage<M, C>
pub fn mouse_leave(
destination: Handle<UINode<M, C>>,
direction: MessageDirection
) -> UiMessage<M, C>
[src]
destination: Handle<UINode<M, C>>,
direction: MessageDirection
) -> UiMessage<M, C>
pub fn mouse_enter(
destination: Handle<UINode<M, C>>,
direction: MessageDirection
) -> UiMessage<M, C>
[src]
destination: Handle<UINode<M, C>>,
direction: MessageDirection
) -> UiMessage<M, C>
pub fn text(
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: char
) -> UiMessage<M, C>
[src]
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: char
) -> UiMessage<M, C>
pub fn key_down(
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: KeyCode
) -> UiMessage<M, C>
[src]
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: KeyCode
) -> UiMessage<M, C>
pub fn key_up(
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: KeyCode
) -> UiMessage<M, C>
[src]
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: KeyCode
) -> UiMessage<M, C>
pub fn drag_started(
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: Handle<UINode<M, C>>
) -> UiMessage<M, C>
[src]
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: Handle<UINode<M, C>>
) -> UiMessage<M, C>
pub fn drag_over(
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: Handle<UINode<M, C>>
) -> UiMessage<M, C>
[src]
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: Handle<UINode<M, C>>
) -> UiMessage<M, C>
pub fn drop(
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: Handle<UINode<M, C>>
) -> UiMessage<M, C>
[src]
destination: Handle<UINode<M, C>>,
direction: MessageDirection,
value: Handle<UINode<M, C>>
) -> UiMessage<M, C>
Trait Implementations
impl<M: Clone + MessageData, C: Clone + Control<M, C>> Clone for WidgetMessage<M, C>
[src]
fn clone(&self) -> WidgetMessage<M, C>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<M: Debug + MessageData, C: Debug + Control<M, C>> Debug for WidgetMessage<M, C>
[src]
impl<M: PartialEq + MessageData, C: PartialEq + Control<M, C>> PartialEq<WidgetMessage<M, C>> for WidgetMessage<M, C>
[src]
fn eq(&self, other: &WidgetMessage<M, C>) -> bool
[src]
fn ne(&self, other: &WidgetMessage<M, C>) -> bool
[src]
impl<M: MessageData, C: Control<M, C>> StructuralPartialEq for WidgetMessage<M, C>
[src]
Auto Trait Implementations
impl<M, C> !RefUnwindSafe for WidgetMessage<M, C>
impl<M, C> Send for WidgetMessage<M, C>
impl<M, C> Sync for WidgetMessage<M, C>
impl<M, C> Unpin for WidgetMessage<M, C> where
C: Unpin,
M: Unpin,
C: Unpin,
M: Unpin,
impl<M, C> !UnwindSafe for WidgetMessage<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,
pub 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> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
pub fn is_in_subset(&self) -> bool
pub fn to_subset_unchecked(&self) -> SS
pub fn from_subset(element: &SS) -> SP
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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.
pub 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.
pub 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>,