Struct imgui::ImGui [−][src]
pub struct ImGui { /* fields omitted */ }
Methods
impl ImGui
[src]
impl ImGui
pub fn init() -> ImGui
[src]
pub fn init() -> ImGui
pub fn style(&self) -> &ImGuiStyle
[src]
pub fn style(&self) -> &ImGuiStyle
pub fn style_mut(&mut self) -> &mut ImGuiStyle
[src]
pub fn style_mut(&mut self) -> &mut ImGuiStyle
pub fn fonts(&mut self) -> ImFontAtlas
[src]
pub fn fonts(&mut self) -> ImFontAtlas
pub fn prepare_texture<'a, F, T>(&mut self, f: F) -> T where
F: FnOnce(TextureHandle<'a>) -> T,
[src]
pub fn prepare_texture<'a, F, T>(&mut self, f: F) -> T where
F: FnOnce(TextureHandle<'a>) -> T,
pub fn set_font_texture_id(&mut self, value: ImTexture)
[src]
pub fn set_font_texture_id(&mut self, value: ImTexture)
pub fn set_ini_filename(&mut self, value: Option<ImString>)
[src]
pub fn set_ini_filename(&mut self, value: Option<ImString>)
pub fn set_log_filename(&mut self, value: Option<ImString>)
[src]
pub fn set_log_filename(&mut self, value: Option<ImString>)
pub fn set_ini_saving_rate(&mut self, value: f32)
[src]
pub fn set_ini_saving_rate(&mut self, value: f32)
pub fn set_font_global_scale(&mut self, value: f32)
[src]
pub fn set_font_global_scale(&mut self, value: f32)
pub fn set_mouse_double_click_time(&mut self, value: f32)
[src]
pub fn set_mouse_double_click_time(&mut self, value: f32)
pub fn set_mouse_double_click_max_dist(&mut self, value: f32)
[src]
pub fn set_mouse_double_click_max_dist(&mut self, value: f32)
pub fn set_mouse_drag_threshold(&mut self, value: f32)
[src]
pub fn set_mouse_drag_threshold(&mut self, value: f32)
pub fn set_key_repeat_delay(&mut self, value: f32)
[src]
pub fn set_key_repeat_delay(&mut self, value: f32)
pub fn set_key_repeat_rate(&mut self, value: f32)
[src]
pub fn set_key_repeat_rate(&mut self, value: f32)
pub fn display_size(&self) -> (f32, f32)
[src]
pub fn display_size(&self) -> (f32, f32)
pub fn display_framebuffer_scale(&self) -> (f32, f32)
[src]
pub fn display_framebuffer_scale(&self) -> (f32, f32)
pub fn mouse_pos(&self) -> (f32, f32)
[src]
pub fn mouse_pos(&self) -> (f32, f32)
pub fn set_mouse_pos(&mut self, x: f32, y: f32)
[src]
pub fn set_mouse_pos(&mut self, x: f32, y: f32)
pub fn mouse_delta(&self) -> (f32, f32)
[src]
pub fn mouse_delta(&self) -> (f32, f32)
Get mouse's position's delta between the current and the last frame.
pub fn mouse_down(&self) -> [bool; 5]
[src]
pub fn mouse_down(&self) -> [bool; 5]
pub fn set_mouse_down(&mut self, states: [bool; 5])
[src]
pub fn set_mouse_down(&mut self, states: [bool; 5])
pub fn set_mouse_wheel(&mut self, value: f32)
[src]
pub fn set_mouse_wheel(&mut self, value: f32)
pub fn mouse_wheel(&self) -> f32
[src]
pub fn mouse_wheel(&self) -> f32
Get mouse wheel delta
pub fn set_mouse_draw_cursor(&mut self, value: bool)
[src]
pub fn set_mouse_draw_cursor(&mut self, value: bool)
Set to true
to have ImGui draw the cursor in software.
If false
, the OS cursor is used (default to false
).
pub fn mouse_draw_cursor(&self) -> bool
[src]
pub fn mouse_draw_cursor(&self) -> bool
pub fn set_mouse_cursor(&self, cursor: ImGuiMouseCursor)
[src]
pub fn set_mouse_cursor(&self, cursor: ImGuiMouseCursor)
Set currently displayed cursor.
Requires support in the windowing back-end if OS cursor is used.
OS cursor is used if mouse_draw_cursor
is set to false
with
set_mouse_draw_cursor.
pub fn mouse_cursor(&self) -> ImGuiMouseCursor
[src]
pub fn mouse_cursor(&self) -> ImGuiMouseCursor
Get currently displayed cursor.
pub fn is_mouse_dragging(&self, button: ImMouseButton) -> bool
[src]
pub fn is_mouse_dragging(&self, button: ImMouseButton) -> bool
Returns true
if mouse is currently dragging with the button
provided
as argument.
pub fn is_mouse_down(&self, button: ImMouseButton) -> bool
[src]
pub fn is_mouse_down(&self, button: ImMouseButton) -> bool
Returns true
if the button
provided as argument is currently down.
pub fn is_mouse_clicked(&self, button: ImMouseButton) -> bool
[src]
pub fn is_mouse_clicked(&self, button: ImMouseButton) -> bool
Returns true
if the button
provided as argument is being clicked.
pub fn is_mouse_double_clicked(&self, button: ImMouseButton) -> bool
[src]
pub fn is_mouse_double_clicked(&self, button: ImMouseButton) -> bool
Returns true
if the button
provided as argument is being double-clicked.
pub fn is_mouse_released(&self, button: ImMouseButton) -> bool
[src]
pub fn is_mouse_released(&self, button: ImMouseButton) -> bool
Returns true
if the button
provided as argument was released
pub fn key_ctrl(&self) -> bool
[src]
pub fn key_ctrl(&self) -> bool
pub fn set_key_ctrl(&mut self, value: bool)
[src]
pub fn set_key_ctrl(&mut self, value: bool)
pub fn key_shift(&self) -> bool
[src]
pub fn key_shift(&self) -> bool
pub fn set_key_shift(&mut self, value: bool)
[src]
pub fn set_key_shift(&mut self, value: bool)
pub fn key_alt(&self) -> bool
[src]
pub fn key_alt(&self) -> bool
pub fn set_key_alt(&mut self, value: bool)
[src]
pub fn set_key_alt(&mut self, value: bool)
pub fn key_super(&self) -> bool
[src]
pub fn key_super(&self) -> bool
pub fn set_key_super(&mut self, value: bool)
[src]
pub fn set_key_super(&mut self, value: bool)
pub fn set_key(&mut self, key: u8, pressed: bool)
[src]
pub fn set_key(&mut self, key: u8, pressed: bool)
pub fn set_imgui_key(&mut self, key: ImGuiKey, mapping: u8)
[src]
pub fn set_imgui_key(&mut self, key: ImGuiKey, mapping: u8)
pub fn get_key_index(&self, key: ImGuiKey) -> usize
[src]
pub fn get_key_index(&self, key: ImGuiKey) -> usize
Map ImGuiKey
values into user's key index
pub fn is_key_down(&self, user_key_index: usize) -> bool
[src]
pub fn is_key_down(&self, user_key_index: usize) -> bool
Return whether specific key is being held
Example
use imgui::{ImGuiKey, Ui}; fn test(ui: &Ui) { let delete_key_index = ui.imgui().get_key_index(ImGuiKey::Delete); if ui.imgui().is_key_down(delete_key_index) { println!("Delete is being held!"); } }
pub fn is_key_pressed(&self, user_key_index: usize) -> bool
[src]
pub fn is_key_pressed(&self, user_key_index: usize) -> bool
Return whether specific key was pressed
pub fn is_key_released(&self, user_key_index: usize) -> bool
[src]
pub fn is_key_released(&self, user_key_index: usize) -> bool
Return whether specific key was released
pub fn add_input_character(&mut self, character: char)
[src]
pub fn add_input_character(&mut self, character: char)
pub fn get_time(&self) -> f32
[src]
pub fn get_time(&self) -> f32
pub fn get_frame_count(&self) -> i32
[src]
pub fn get_frame_count(&self) -> i32
pub fn get_frame_rate(&self) -> f32
[src]
pub fn get_frame_rate(&self) -> f32
pub fn frame<'ui, 'a: 'ui>(
&'a mut self,
frame_size: FrameSize,
delta_time: f32
) -> Ui<'ui>
[src]
pub fn frame<'ui, 'a: 'ui>(
&'a mut self,
frame_size: FrameSize,
delta_time: f32
) -> Ui<'ui>