pub struct Io(/* private fields */);Expand description
Settings and inputs/outputs for imgui-rs This is a transparent wrapper around ImGuiIO
Implementations§
Source§impl Io
impl Io
Sourcepub fn display_size(&self) -> [f32; 2]
pub fn display_size(&self) -> [f32; 2]
Main display size in pixels
Sourcepub fn set_display_size(&mut self, size: [f32; 2])
pub fn set_display_size(&mut self, size: [f32; 2])
Set main display size in pixels
Sourcepub fn delta_time(&self) -> f32
pub fn delta_time(&self) -> f32
Time elapsed since last frame, in seconds
Sourcepub fn set_delta_time(&mut self, delta_time: f32)
pub fn set_delta_time(&mut self, delta_time: f32)
Set time elapsed since last frame, in seconds
Sourcepub fn set_mouse_pos(&mut self, pos: [f32; 2])
pub fn set_mouse_pos(&mut self, pos: [f32; 2])
Set mouse position, in pixels
Sourcepub fn mouse_wheel(&self) -> f32
pub fn mouse_wheel(&self) -> f32
Mouse wheel vertical scrolling
Sourcepub fn set_mouse_wheel(&mut self, wheel: f32)
pub fn set_mouse_wheel(&mut self, wheel: f32)
Set mouse wheel vertical scrolling
Sourcepub fn mouse_wheel_h(&self) -> f32
pub fn mouse_wheel_h(&self) -> f32
Mouse wheel horizontal scrolling
Sourcepub fn set_mouse_wheel_h(&mut self, wheel_h: f32)
pub fn set_mouse_wheel_h(&mut self, wheel_h: f32)
Set mouse wheel horizontal scrolling
Sourcepub fn mouse_down(&self, button: usize) -> bool
pub fn mouse_down(&self, button: usize) -> bool
Check if a mouse button is down
Sourcepub fn set_mouse_down(&mut self, button: usize, down: bool)
pub fn set_mouse_down(&mut self, button: usize, down: bool)
Set mouse button state
Sourcepub fn want_capture_mouse(&self) -> bool
pub fn want_capture_mouse(&self) -> bool
Check if imgui wants to capture mouse input
Sourcepub fn want_capture_keyboard(&self) -> bool
pub fn want_capture_keyboard(&self) -> bool
Check if imgui wants to capture keyboard input
Sourcepub fn want_text_input(&self) -> bool
pub fn want_text_input(&self) -> bool
Check if imgui wants to use text input
Sourcepub fn want_set_mouse_pos(&self) -> bool
pub fn want_set_mouse_pos(&self) -> bool
Check if imgui wants to set mouse position
Sourcepub fn mouse_draw_cursor(&self) -> bool
pub fn mouse_draw_cursor(&self) -> bool
Whether ImGui requests software-drawn mouse cursor
Sourcepub fn set_mouse_draw_cursor(&mut self, draw: bool)
pub fn set_mouse_draw_cursor(&mut self, draw: bool)
Enable or disable software-drawn mouse cursor
Sourcepub fn want_save_ini_settings(&self) -> bool
pub fn want_save_ini_settings(&self) -> bool
Check if imgui wants to save ini settings
Sourcepub fn metrics_render_vertices(&self) -> i32
pub fn metrics_render_vertices(&self) -> i32
Vertices output during last call to render
Sourcepub fn metrics_render_indices(&self) -> i32
pub fn metrics_render_indices(&self) -> i32
Indices output during last call to render
Sourcepub fn metrics_render_windows(&self) -> i32
pub fn metrics_render_windows(&self) -> i32
Number of visible windows
Sourcepub fn metrics_active_windows(&self) -> i32
pub fn metrics_active_windows(&self) -> i32
Number of active windows
Sourcepub fn config_flags(&self) -> ConfigFlags
pub fn config_flags(&self) -> ConfigFlags
Configuration flags
Sourcepub fn set_config_flags(&mut self, flags: ConfigFlags)
pub fn set_config_flags(&mut self, flags: ConfigFlags)
Set configuration flags
Sourcepub fn backend_flags(&self) -> BackendFlags
pub fn backend_flags(&self) -> BackendFlags
Backend flags
Sourcepub fn set_backend_flags(&mut self, flags: BackendFlags)
pub fn set_backend_flags(&mut self, flags: BackendFlags)
Set backend flags
Sourcepub fn add_key_event(&mut self, key: Key, down: bool)
pub fn add_key_event(&mut self, key: Key, down: bool)
Add a key event to the input queue
Sourcepub fn add_input_character(&mut self, character: char)
pub fn add_input_character(&mut self, character: char)
Add a character input event to the input queue
Sourcepub fn add_mouse_pos_event(&mut self, pos: [f32; 2])
pub fn add_mouse_pos_event(&mut self, pos: [f32; 2])
Add a mouse position event to the input queue
Add a mouse button event to the input queue
Sourcepub fn add_mouse_wheel_event(&mut self, wheel: [f32; 2])
pub fn add_mouse_wheel_event(&mut self, wheel: [f32; 2])
Add a mouse wheel event to the input queue
Sourcepub fn add_focus_event(&mut self, focused: bool)
pub fn add_focus_event(&mut self, focused: bool)
Notify Dear ImGui that the application window gained or lost focus
This mirrors io.AddFocusEvent() in Dear ImGui and is used by platform backends.
Sourcepub fn font_global_scale(&self) -> f32
pub fn font_global_scale(&self) -> f32
Get the global font scale (not available in current Dear ImGui version) Compatibility shim: maps to style.FontScaleMain (Dear ImGui 1.92+)
Sourcepub fn set_font_global_scale(&mut self, _scale: f32)
pub fn set_font_global_scale(&mut self, _scale: f32)
Set the global font scale (not available in current Dear ImGui version) Compatibility shim: maps to style.FontScaleMain (Dear ImGui 1.92+)
Sourcepub fn display_framebuffer_scale(&self) -> [f32; 2]
pub fn display_framebuffer_scale(&self) -> [f32; 2]
Get the display framebuffer scale
Sourcepub fn set_display_framebuffer_scale(&mut self, scale: [f32; 2])
pub fn set_display_framebuffer_scale(&mut self, scale: [f32; 2])
Set the display framebuffer scale This is important for HiDPI displays to ensure proper rendering