oa::UiEvent

Platform-neutral UI event. Donor: oa/ui/event.h UiEvent.

StRust public API

Declaration

pub struct UiEvent {Show 23 fields pub kind: UiEventKind, pub mouse_x: f32, pub mouse_y: f32, pub mouse_dx: f32, pub mouse_dy: f32, pub button: i32, pub click_count: i32, pub scroll_x: f32, pub scroll_y: f32, pub integer_scroll_x: i32, pub integer_scroll_y: i32, pub timestamp_ns: u64, pub scroll_gesture: UiScrollGesture, pub gesture_scale: f32, pub pinch_phase: UiPinchPhase, pub key: UiKey, pub modifiers: UiModifiers, pub key_repeat: bool, pub text: String, pub text_selection_start: i32, pub text_selection_length: i32, pub window_w: i32, pub window_h: i32, }
Public Rust declaration.

Public Methods

pub fn ctrl(&self) -> bool
pub fn shift(&self) -> bool
pub fn alt(&self) -> bool
fn clone(&self) -> UiEvent
fn fmt(&self, f: &mut Formatter<'_>) -> Result

Associated Functions

pub fn mouse_move(x: f32, y: f32, modifiers: UiModifiers) -> Self
pub fn mouse_down( x: f32, y: f32, button: i32, click_count: i32, modifiers: UiModifiers, ) -> Self
pub fn mouse_up(x: f32, y: f32, button: i32, modifiers: UiModifiers) -> Self
pub fn key_down(key: UiKey, modifiers: UiModifiers, repeat: bool) -> Self
pub fn key_up(key: UiKey, modifiers: UiModifiers) -> Self
fn default() -> UiEvent

Public Data Members

kindUiEventKindfield
mouse_xf32field
mouse_yf32field
mouse_dxf32field
mouse_dyf32field
buttoni32field
click_counti32field
scroll_xf32field
scroll_yf32field
integer_scroll_xi32field
integer_scroll_yi32field
timestamp_nsu64field
scroll_gestureUiScrollGesturefield
gesture_scalef32field
pinch_phaseUiPinchPhasefield
keyUiKeyfield
modifiersUiModifiersfield
key_repeatboolfield
textStringfield
text_selection_starti32field
text_selection_lengthi32field
window_wi32field
window_hi32field

Public Method Documentation

pub fn ctrl( &self ) -> bool
Construct a pointer-move event.
pub fn shift( &self ) -> bool
Construct a pointer-move event.
pub fn alt( &self ) -> bool
Construct a pointer-move event.
fn clone( &self ) -> UiEvent
No public source comment is attached to this declaration.
fn fmt( &self, f: &mut Formatter<'_> ) -> Result
No public source comment is attached to this declaration.
pub fn mouse_move( x: f32, y: f32, modifiers: UiModifiers ) -> Self
No public source comment is attached to this declaration.
pub fn mouse_down( x: f32, y: f32, button: i32, click_count: i32, modifiers: UiModifiers ) -> Self
No public source comment is attached to this declaration.
pub fn mouse_up( x: f32, y: f32, button: i32, modifiers: UiModifiers ) -> Self
No public source comment is attached to this declaration.
pub fn key_down( key: UiKey, modifiers: UiModifiers, repeat: bool ) -> Self
No public source comment is attached to this declaration.
pub fn key_up( key: UiKey, modifiers: UiModifiers ) -> Self
No public source comment is attached to this declaration.
fn default() -> UiEvent
No public source comment is attached to this declaration.