Struct rg3d_ui::message::UiMessage[][src]

pub struct UiMessage<M: MessageData, C: Control<M, C>> {
    pub flags: u64,
    // some fields omitted
}

Message is basic communication element that is used to deliver information to UI nodes or to user code.

Fields

flags: u64

A custom user flags.

Implementations

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

#[must_use = "method creates new value which must be used"]pub fn reverse(&self) -> Self[src]

Creates a new copy of the message with reversed direction. Typical use case is to re-send messages to create “response” in widget. For example you have a float input field and it has Value message. When the input field receives Value message with MessageDirection::ToWidget it checks if value needs to be changed and if it does, it re-sends same message but with reversed direction back to message queue so every “listener” can reach properly. The input field won’t react at MessageDirection::FromWidget message so there will be no infinite message loop.

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

pub fn data(&self) -> &UiMessageData<M, C>[src]

pub fn set_handled(&self, handled: bool)[src]

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

pub fn direction(&self) -> MessageDirection[src]

pub fn set_perform_layout(&self, value: bool)[src]

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

pub fn user(
    destination: Handle<UINode<M, C>>,
    direction: MessageDirection,
    msg: M
) -> Self
[src]

Allows you to construct a new user-defined message.

pub fn has_flags(&self, flags: u64) -> bool[src]

Trait Implementations

impl<M: Clone + MessageData, C: Clone + Control<M, C>> Clone for UiMessage<M, C>[src]

impl<M: Debug + MessageData, C: Debug + Control<M, C>> Debug for UiMessage<M, C>[src]

impl<M: PartialEq + MessageData, C: PartialEq + Control<M, C>> PartialEq<UiMessage<M, C>> for UiMessage<M, C>[src]

impl<M: MessageData, C: Control<M, C>> StructuralPartialEq for UiMessage<M, C>[src]

Auto Trait Implementations

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

impl<M, C> Send for UiMessage<M, C> where
    M: Send

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

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

impl<M, C> !UnwindSafe for UiMessage<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> 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<V, T> VZip<V> for T where
    V: MultiLane<T>,