oa::ui::navigation::Navigation

2-D viewport navigation session. Donor: oa::Navigation.

StRust public API

Declaration

pub struct Navigation { /* private fields */ }
Public Rust declaration.

Public Methods

pub fn set_content_size(&mut self, w: f32, h: f32) -> Result<()>
pub fn set_viewport_size(&mut self, w: f32, h: f32) -> Result<()>
pub fn pan_x(&self) -> f32
pub fn pan_y(&self) -> f32
pub fn zoom(&self) -> f32
pub fn fit_to_window(&mut self) -> Result<()>
pub fn fit_to_window_animated(&mut self, animate: bool) -> Result<()>
pub fn zoom_to_100(&mut self)
pub fn pan_by(&mut self, dx: f32, dy: f32)
pub fn keyboard_pan(&mut self, dir_x: f32, dir_y: f32)
pub fn keyboard_zoom_in(&mut self)
pub fn keyboard_zoom_out(&mut self)
pub fn update(&mut self, delta_ms: f32)
pub fn handle_event(&mut self, ev: &UiEvent) -> bool

Associated Functions

pub fn new() -> Self
pub fn with_config(config: NavigationConfig) -> Self
fn default() -> Self

Public Method Documentation

pub fn set_content_size(&mut self, w: f32, h: f32) -> Result<()>
No public source comment is attached to this declaration.
pub fn set_viewport_size(&mut self, w: f32, h: f32) -> Result<()>
No public source comment is attached to this declaration.
pub fn pan_x( &self ) -> f32
Create with default config.
pub fn pan_y( &self ) -> f32
Create with default config.
pub fn zoom( &self ) -> f32
Create with default config.
pub fn fit_to_window(&mut self) -> Result<()>
No public source comment is attached to this declaration.
pub fn fit_to_window_animated(&mut self, animate: bool) -> Result<()>
Create with default config.
pub fn zoom_to_100( &mut self )
No public source comment is attached to this declaration.
pub fn pan_by( &mut self, dx: f32, dy: f32 )
No public source comment is attached to this declaration.
pub fn keyboard_pan( &mut self, dir_x: f32, dir_y: f32 )
No public source comment is attached to this declaration.
pub fn keyboard_zoom_in( &mut self )
No public source comment is attached to this declaration.
pub fn keyboard_zoom_out( &mut self )
No public source comment is attached to this declaration.
pub fn update( &mut self, delta_ms: f32 )
No public source comment is attached to this declaration.
pub fn handle_event( &mut self, ev: &UiEvent ) -> bool
No public source comment is attached to this declaration.
pub fn new() -> Self
No public source comment is attached to this declaration.
pub fn with_config( config: NavigationConfig ) -> Self
Create with default config.
fn default() -> Self
No public source comment is attached to this declaration.