Trait conrod::backend::event::ToRawEvent
[−]
[src]
pub trait ToRawEvent { fn to_raw_event(self, win_w: Scalar, win_h: Scalar) -> Option<RawEvent>; }
Types that may be converted to the RawEvent
type used by conrod to track events happening in
the world.
This is only used by conrod as a bound for the Ui::handle_event
method.
Required Methods
fn to_raw_event(self, win_w: Scalar, win_h: Scalar) -> Option<RawEvent>
Convert self into an RawEvent
.
Note: RawEvent
s that contain co-ordinates must be oriented with (0, 0) at the middle
of the window with the y axis pointing upwards (Cartesian co-ordinates). Many windows
provide coordinates with the origin in the top left with y pointing down, so you might
need to translate these co-ordinates when implementing this method. Also be sure to
invert the y axis of MouseScroll events.
The window dimensions are provided in case co-ordinates require translation.
Implementors
impl<E> ToRawEvent for E where E: GenericEvent