Trait iup::callback::button::ButtonCb
[−]
[src]
pub trait ButtonCb where Self: Element + 'static { fn set_button_cb<F>(&mut self, cb: F) -> Self where F: Callback<(Self, MouseButton, MouseButtonState, i32, i32, KeyStates)> { ... } fn remove_button_cb(&mut self) -> Option<Box<Callback<(Self, MouseButton, MouseButtonState, i32, i32, KeyStates)>>> { ... } }
Action generated when a mouse button is pressed or released.
The Button
parameter identifies the activated mouse button that triggered the action.
The i32
parameters are the x,y position in the canvas where the event has occurred,
in pixels.
The KeyStates
parameter is the state of the mouse buttons and some keyboard keys at
CallbackReturn::Close
will be processed. On some controls if CallbackReturn::Ignore
is returned the action is ignored (this is system dependent).
This callback can be used to customize a button behavior. For a standard button behavior
use the Action
callback.