Struct rg3d_ui::popup::Popup [−][src]
pub struct Popup<M: MessageData, C: Control<M, C>> { /* fields omitted */ }
Methods from Deref<Target = Widget<M, C>>
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]
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_horizontal_alignment(
&mut self,
horizontal_alignment: HorizontalAlignment
) -> &mut Self
[src]pub fn measure_override(
&self,
ui: &UserInterface<M, C>,
available_size: Vector2<f32>
) -> Vector2<f32>
[src]pub fn arrange_override(
&self,
ui: &UserInterface<M, C>,
final_size: Vector2<f32>
) -> Vector2<f32>
[src]The context menu receives PopupMessage
s for being displayed, and so should support those.
Trait Implementations
fn handle_routed_message(
&mut self,
ui: &mut UserInterface<M, C>,
message: &mut UiMessage<M, C>
)
[src]
fn handle_routed_message(
&mut self,
ui: &mut UserInterface<M, C>,
message: &mut UiMessage<M, C>
)
[src]Performs event-specific actions. Must call widget.handle_message()! Read more
fn handle_os_event(
&mut self,
self_handle: Handle<UINode<M, C>>,
ui: &mut UserInterface<M, C>,
event: &OsEvent
)
[src]
fn handle_os_event(
&mut self,
self_handle: Handle<UINode<M, C>>,
ui: &mut UserInterface<M, C>,
event: &OsEvent
)
[src]Provides a way to respond to OS specific events. Can be useful to detect if a key or mouse
button was pressed. This method significantly differs from handle_message
because os events
are not dispatched - they’ll be passed to this method in any case. Read more
fn measure_override(
&self,
ui: &UserInterface<M, C>,
available_size: Vector2<f32>
) -> Vector2<f32>
[src]fn arrange_override(
&self,
ui: &UserInterface<M, C>,
final_size: Vector2<f32>
) -> Vector2<f32>
[src]Used to react to a message (by producing another message) that was posted outside of current
hierarchy. In other words this method is used when you need to “peek” a message before it’ll
be passed into bubbling router. Most common use case is to catch messages from popups: popup
in 99.9% cases is a child of root canvas and it won’t receive a message from a its logical
parent during bubbling message routing. For example preview_message
used in a dropdown list:
dropdown list has two separate parts - a field with selected value and a popup for all possible
options. Visual parent of the popup in this case is the root canvas, but logical parent is the
dropdown list. Because of this fact, the field won’t receive any messages from popup, to solve
this we use preview_message
. This method is much more restrictive - it does not allow you to
modify a node and ui, you can either request changes by sending a message or use internal
mutability (Cell
, RefCell
, etc). Read more
Called when a node is deleted from container thus giving a chance to remove dangling handles which may cause panic. Read more
Auto Trait Implementations
impl<M, C> !RefUnwindSafe for Popup<M, C>
impl<M, C> !UnwindSafe for Popup<M, C>
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
pub fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
pub fn to_subset_unchecked(&self) -> SS
pub fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
pub fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.
pub fn vzip(self) -> V