[][src]Struct imgui::ImGui

pub struct ImGui { /* fields omitted */ }

Methods

impl ImGui[src]

pub fn init() -> ImGui[src]

pub fn style(&self) -> &ImGuiStyle[src]

pub fn style_mut(&mut self) -> &mut ImGuiStyle[src]

pub fn fonts(&mut self) -> ImFontAtlas[src]

pub fn prepare_texture<'a, F, T>(&mut self, f: F) -> T where
    F: FnOnce(TextureHandle<'a>) -> T, 
[src]

pub fn set_font_texture_id(&mut self, value: ImTexture)[src]

pub fn set_ini_filename(&mut self, value: Option<ImString>)[src]

pub fn set_log_filename(&mut self, value: Option<ImString>)[src]

pub fn set_ini_saving_rate(&mut self, value: f32)[src]

pub fn set_font_global_scale(&mut self, value: f32)[src]

pub fn set_mouse_double_click_time(&mut self, value: f32)[src]

pub fn set_mouse_double_click_max_dist(&mut self, value: f32)[src]

pub fn set_mouse_drag_threshold(&mut self, value: f32)[src]

pub fn set_key_repeat_delay(&mut self, value: f32)[src]

pub fn set_key_repeat_rate(&mut self, value: f32)[src]

pub fn display_size(&self) -> (f32, f32)[src]

pub fn display_framebuffer_scale(&self) -> (f32, f32)[src]

pub fn mouse_pos(&self) -> (f32, f32)[src]

pub fn set_mouse_pos(&mut self, x: f32, y: f32)[src]

pub fn mouse_delta(&self) -> (f32, f32)[src]

Get mouse's position's delta between the current and the last frame.

pub fn mouse_down(&self) -> [bool; 5][src]

pub fn set_mouse_down(&mut self, states: [bool; 5])[src]

pub fn set_mouse_wheel(&mut self, value: f32)[src]

pub fn mouse_wheel(&self) -> f32[src]

Get mouse wheel delta

pub fn set_mouse_draw_cursor(&mut self, value: bool)[src]

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 set_mouse_cursor(&self, cursor: ImGuiMouseCursor)[src]

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]

Get currently displayed cursor.

pub fn is_mouse_dragging(&self, button: ImMouseButton) -> bool[src]

Returns true if mouse is currently dragging with the button provided as argument.

pub fn is_mouse_down(&self, button: ImMouseButton) -> bool[src]

Returns true if the button provided as argument is currently down.

pub fn is_mouse_clicked(&self, button: ImMouseButton) -> bool[src]

Returns true if the button provided as argument is being clicked.

pub fn is_mouse_double_clicked(&self, button: ImMouseButton) -> bool[src]

Returns true if the button provided as argument is being double-clicked.

pub fn is_mouse_released(&self, button: ImMouseButton) -> bool[src]

Returns true if the button provided as argument was released

pub fn key_ctrl(&self) -> bool[src]

pub fn set_key_ctrl(&mut self, value: bool)[src]

pub fn key_shift(&self) -> bool[src]

pub fn set_key_shift(&mut self, value: bool)[src]

pub fn key_alt(&self) -> bool[src]

pub fn set_key_alt(&mut self, value: bool)[src]

pub fn key_super(&self) -> bool[src]

pub fn set_key_super(&mut self, value: bool)[src]

pub fn set_key(&mut self, key: u8, pressed: bool)[src]

pub fn set_imgui_key(&mut self, key: ImGuiKey, mapping: u8)[src]

pub fn get_key_index(&self, key: ImGuiKey) -> usize[src]

Map ImGuiKey values into user's key index

pub fn is_key_down(&self, user_key_index: usize) -> bool[src]

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]

Return whether specific key was pressed

pub fn is_key_released(&self, user_key_index: usize) -> bool[src]

Return whether specific key was released

pub fn add_input_character(&mut self, character: char)[src]

pub fn get_time(&self) -> f32[src]

pub fn get_frame_count(&self) -> i32[src]

pub fn get_frame_rate(&self) -> f32[src]

pub fn frame<'ui, 'a: 'ui>(
    &'a mut self,
    frame_size: FrameSize,
    delta_time: f32
) -> Ui<'ui>
[src]

Trait Implementations

impl Drop for ImGui[src]

Auto Trait Implementations

impl Send for ImGui

impl Sync for ImGui

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.