Trait components::MenuExt [−][src]
pub trait MenuExt: 'static {
fn add_action<P: Is<PushAction>>(&self, action: &P);
fn remove_action<P: Is<PushAction>>(&self, action: &P);
fn remove_all(&self);
fn show_with_position(&self, x: f32, y: f32);
fn connect_action_activated<F: Fn(&Self, &PushAction) + 'static>(
&self,
f: F
) -> SignalHandlerId;
}Required methods
fn add_action<P: Is<PushAction>>(&self, action: &P)[src]
add_action: @menu: A #Menu @action: A #PushAction
Append @action to @menu.
fn remove_action<P: Is<PushAction>>(&self, action: &P)[src]
remove_action: @menu: A #Menu @action: A #PushAction
Remove @action from @menu.
fn remove_all(&self)[src]
remove_all: @menu: A #Menu
Remove all the actions from @menu.
fn show_with_position(&self, x: f32, y: f32)[src]
show_with_position: @menu: A #Menu @x: X position @y: Y position
Moves the menu to the specified position and shows it.
fn connect_action_activated<F: Fn(&Self, &PushAction) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
&self,
f: F
) -> SignalHandlerId
Implementors
impl<O: Is<Menu>> MenuExt for O[src]
impl<O: Is<Menu>> MenuExt for O[src]fn add_action<P: Is<PushAction>>(&self, action: &P)[src]
add_action: @menu: A #Menu @action: A #PushAction
Append @action to @menu.
fn remove_action<P: Is<PushAction>>(&self, action: &P)[src]
remove_action: @menu: A #Menu @action: A #PushAction
Remove @action from @menu.
fn remove_all(&self)[src]
remove_all: @menu: A #Menu
Remove all the actions from @menu.
fn show_with_position(&self, x: f32, y: f32)[src]
show_with_position: @menu: A #Menu @x: X position @y: Y position
Moves the menu to the specified position and shows it.
fn connect_action_activated<F: Fn(&Self, &PushAction) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
&self,
f: F
) -> SignalHandlerId