pub struct ImGui {}Implementations§
Source§impl ImGui
impl ImGui
pub fn load_font_ttf_async( ttf_font_file: &str, font_size: f32, glyph_ranges: &str, handler: Box<dyn FnMut(bool)>, )
pub fn is_font_loaded() -> bool
pub fn show_stats()
pub fn show_console()
pub fn text(text: &str)
pub fn text_colored(color: &Color, text: &str)
pub fn text_disabled(text: &str)
pub fn text_wrapped(text: &str)
pub fn label_text(label: &str, text: &str)
pub fn bullet_text(text: &str)
pub fn set_tooltip(text: &str)
pub fn image_opts( clip_str: &str, size: &Vec2, tint_col: &Color, border_col: &Color, )
pub fn columns(count: i32)
pub fn columns_opts(count: i32, border: bool, str_id: &str)
pub fn set_style_bool(name: &str, val: bool)
pub fn set_style_float(name: &str, val: f32)
pub fn set_style_vec2(name: &str, val: &Vec2)
pub fn set_style_color(name: &str, color: &Color)
pub fn scroll_when_dragging_on_void()
pub fn set_next_window_bg_alpha(alpha: f32)
pub fn show_demo_window()
pub fn get_content_region_avail() -> Vec2
pub fn get_window_pos() -> Vec2
pub fn get_window_size() -> Vec2
pub fn get_window_width() -> f32
pub fn get_window_height() -> f32
pub fn is_window_collapsed() -> bool
pub fn set_window_font_scale(scale: f32)
pub fn set_next_window_size_constraints(size_min: &Vec2, size_max: &Vec2)
pub fn set_next_window_content_size(size: &Vec2)
pub fn set_next_window_focus()
pub fn get_scroll_x() -> f32
pub fn get_scroll_y() -> f32
pub fn get_scroll_max_x() -> f32
pub fn get_scroll_max_y() -> f32
pub fn set_scroll_x(scroll_x: f32)
pub fn set_scroll_y(scroll_y: f32)
pub fn set_scroll_here_y(center_y_ratio: f32)
pub fn set_scroll_from_pos_y(pos_y: f32, center_y_ratio: f32)
pub fn set_keyboard_focus_here(offset: i32)
pub fn set_next_item_width(item_width: f32)
pub fn calc_item_width() -> f32
pub fn separator()
pub fn same_line(pos_x: f32, spacing_w: f32)
pub fn new_line()
pub fn spacing()
pub fn dummy(size: &Vec2)
pub fn indent(indent_w: f32)
pub fn unindent(indent_w: f32)
pub fn get_cursor_pos() -> Vec2
pub fn get_cursor_pos_x() -> f32
pub fn get_cursor_pos_y() -> f32
pub fn set_cursor_pos(local_pos: &Vec2)
pub fn set_cursor_pos_x(x: f32)
pub fn set_cursor_pos_y(y: f32)
pub fn get_cursor_start_pos() -> Vec2
pub fn get_cursor_screen_pos() -> Vec2
pub fn set_cursor_screen_pos(pos: &Vec2)
pub fn align_text_to_frame_padding()
pub fn get_text_line_height() -> f32
pub fn get_text_line_height_with_spacing() -> f32
pub fn next_column()
pub fn get_column_index() -> i32
pub fn get_column_offset(column_index: i32) -> f32
pub fn set_column_offset(column_index: i32, offset_x: f32)
pub fn get_column_width(column_index: i32) -> f32
pub fn get_columns_count() -> i32
pub fn table_next_column() -> bool
pub fn table_set_column_index(column_n: i32) -> bool
pub fn table_setup_scroll_freeze(cols: i32, rows: i32)
pub fn table_headers_row()
pub fn bullet_item()
pub fn text_link(label: &str) -> bool
pub fn text_link_open_url(label: &str, url: &str)
pub fn set_window_focus(name: &str)
pub fn separator_text(text: &str)
pub fn table_header(label: &str)
pub fn get_id(str_id: &str) -> i32
pub fn plot_lines(label: &str, values: &Vec<f32>)
pub fn plot_lines_opts( label: &str, values: &Vec<f32>, values_offset: i32, overlay_text: &str, scale_min: f32, scale_max: f32, graph_size: &Vec2, )
pub fn plot_histogram(label: &str, values: &Vec<f32>)
pub fn plot_histogram_opts( label: &str, values: &Vec<f32>, values_offset: i32, overlay_text: &str, scale_min: f32, scale_max: f32, graph_size: &Vec2, )
pub fn progress_bar(fraction: f32)
pub fn progress_bar_opts(fraction: f32, size_arg: &Vec2, overlay: &str)
pub fn value(prefix: &str, b: bool)
pub fn open_popup(str_id: &str)
pub fn get_tree_node_to_label_spacing() -> f32
pub fn close_current_popup()
pub fn is_item_hovered() -> bool
pub fn is_item_active() -> bool
pub fn is_item_clicked(mouse_button: i32) -> bool
pub fn is_item_visible() -> bool
pub fn is_any_item_hovered() -> bool
pub fn is_any_item_active() -> bool
pub fn get_item_rect_min() -> Vec2
pub fn get_item_rect_max() -> Vec2
pub fn get_item_rect_size() -> Vec2
pub fn set_next_item_allow_overlap()
pub fn is_window_hovered() -> bool
pub fn is_window_focused() -> bool
pub fn is_rect_visible(size: &Vec2) -> bool
pub fn is_mouse_down(button: i32) -> bool
pub fn is_mouse_clicked(button: i32, repeat: bool) -> bool
pub fn is_mouse_double_clicked(button: i32) -> bool
pub fn is_mouse_released(button: i32) -> bool
pub fn is_mouse_hovering_rect(r_min: &Vec2, r_max: &Vec2, clip: bool) -> bool
pub fn is_mouse_dragging(button: i32, lock_threshold: f32) -> bool
pub fn get_mouse_pos() -> Vec2
pub fn get_mouse_pos_on_opening_current_popup() -> Vec2
pub fn get_mouse_drag_delta(button: i32, lock_threshold: f32) -> Vec2
pub fn reset_mouse_drag_delta(button: i32)
Source§impl ImGui
impl ImGui
pub fn begin<C>(name: &str, inside: C)where
C: FnOnce(),
pub fn begin_opts<C>(
name: &str,
windows_flags: BitFlags<ImGuiWindowFlag>,
inside: C,
)where
C: FnOnce(),
pub fn begin_ret<C>(name: &str, opened: bool, inside: C) -> (bool, bool)where
C: FnOnce(),
pub fn begin_ret_opts<C>(
name: &str,
opened: bool,
windows_flags: BitFlags<ImGuiWindowFlag>,
inside: C,
) -> (bool, bool)where
C: FnOnce(),
pub fn begin_child<C>(str_id: &str, inside: C)where
C: FnOnce(),
pub fn begin_child_opts<C>(
str_id: &str,
size: &Vec2,
child_flags: BitFlags<ImGuiChildFlag>,
window_flags: BitFlags<ImGuiWindowFlag>,
inside: C,
)where
C: FnOnce(),
pub fn begin_child_with_id<C>(id: i32, inside: C)where
C: FnOnce(),
pub fn begin_child_with_id_opts<C>(
id: i32,
size: &Vec2,
child_flags: BitFlags<ImGuiChildFlag>,
window_flags: BitFlags<ImGuiWindowFlag>,
inside: C,
)where
C: FnOnce(),
pub fn collapsing_header_ret(label: &str, opened: bool) -> (bool, bool)
pub fn collapsing_header_ret_opts( label: &str, opened: bool, tree_node_flags: BitFlags<ImGuiTreeNodeFlag>, ) -> (bool, bool)
pub fn selectable_ret(label: &str, selected: bool) -> (bool, bool)
pub fn selectable_ret_opts( label: &str, selected: bool, size: &Vec2, selectable_flags: BitFlags<ImGuiSelectableFlag>, ) -> (bool, bool)
pub fn combo_ret( label: &str, current_item: i32, items: &Vec<&str>, ) -> (bool, i32)
pub fn combo_ret_opts( label: &str, current_item: i32, items: &Vec<&str>, height_in_items: i32, ) -> (bool, i32)
pub fn drag_float_ret( label: &str, v: f32, v_speed: f32, v_min: f32, v_max: f32, ) -> (bool, f32)
pub fn drag_float_ret_opts( label: &str, v: f32, v_speed: f32, v_min: f32, v_max: f32, display_format: &str, slider_flags: BitFlags<ImGuiSliderFlag>, ) -> (bool, f32)
pub fn drag_float2_ret( label: &str, v1: f32, v2: f32, v_speed: f32, v_min: f32, v_max: f32, ) -> (bool, f32, f32)
pub fn drag_float2_ret_opts( label: &str, v1: f32, v2: f32, v_speed: f32, v_min: f32, v_max: f32, display_format: &str, slider_flags: BitFlags<ImGuiSliderFlag>, ) -> (bool, f32, f32)
pub fn drag_int2_ret( label: &str, v1: i32, v2: i32, v_speed: f32, v_min: i32, v_max: i32, ) -> (bool, i32, i32)
pub fn drag_int2_ret_opts( label: &str, v1: i32, v2: i32, v_speed: f32, v_min: i32, v_max: i32, display_format: &str, slider_flags: BitFlags<ImGuiSliderFlag>, ) -> (bool, i32, i32)
pub fn input_float_ret(label: &str, v: f32) -> (bool, f32)
pub fn input_float_ret_opts( label: &str, v: f32, step: f32, step_fast: f32, display_format: &str, input_text_flags: BitFlags<ImGuiInputTextFlag>, ) -> (bool, f32)
pub fn input_float2_ret(label: &str, v1: f32, v2: f32) -> (bool, f32, f32)
pub fn input_float2_ret_opts( label: &str, v1: f32, v2: f32, display_format: &str, input_text_flags: BitFlags<ImGuiInputTextFlag>, ) -> (bool, f32, f32)
pub fn input_int_ret(label: &str, v: i32) -> (bool, i32)
pub fn input_int_ret_opts( label: &str, v: i32, step: i32, step_fast: i32, input_text_flags: BitFlags<ImGuiInputTextFlag>, ) -> (bool, i32)
pub fn input_int2_ret(label: &str, v1: i32, v2: i32) -> (bool, i32, i32)
pub fn input_int2_ret_opts( label: &str, v1: i32, v2: i32, input_text_flags: BitFlags<ImGuiInputTextFlag>, ) -> (bool, i32, i32)
pub fn slider_float_ret( label: &str, v: f32, v_min: f32, v_max: f32, ) -> (bool, f32)
pub fn slider_float_ret_opts( label: &str, v: f32, v_min: f32, v_max: f32, display_format: &str, slider_flags: BitFlags<ImGuiSliderFlag>, ) -> (bool, f32)
pub fn slider_float2_ret( label: &str, v1: f32, v2: f32, v_min: f32, v_max: f32, ) -> (bool, f32, f32)
pub fn slider_float2_ret_opts( label: &str, v1: f32, v2: f32, v_min: f32, v_max: f32, display_format: &str, slider_flags: BitFlags<ImGuiSliderFlag>, ) -> (bool, f32, f32)
pub fn drag_float_range2_ret( label: &str, v_current_min: f32, v_current_max: f32, v_speed: f32, v_min: f32, v_max: f32, ) -> (bool, f32, f32)
pub fn drag_float_range2_ret_opts( label: &str, v_current_min: f32, v_current_max: f32, v_speed: f32, v_min: f32, v_max: f32, format: &str, format_max: &str, slider_flags: BitFlags<ImGuiSliderFlag>, ) -> (bool, f32, f32)
pub fn drag_int_ret( label: &str, value: i32, v_speed: f32, v_min: i32, v_max: i32, ) -> (bool, i32)
pub fn drag_int_ret_opts( label: &str, value: i32, v_speed: f32, v_min: i32, v_max: i32, display_format: &str, slider_flags: BitFlags<ImGuiSliderFlag>, ) -> (bool, i32)
pub fn drag_int_range2_ret( label: &str, v_current_min: i32, v_current_max: i32, v_speed: f32, v_min: i32, v_max: i32, ) -> (bool, i32, i32)
pub fn drag_int_range2_ret_opts( label: &str, v_current_min: i32, v_current_max: i32, v_speed: f32, v_min: i32, v_max: i32, format: &str, format_max: &str, slider_flags: BitFlags<ImGuiSliderFlag>, ) -> (bool, i32, i32)
pub fn slider_int_ret( label: &str, value: i32, v_min: i32, v_max: i32, ) -> (bool, i32)
pub fn slider_int_ret_opts( label: &str, value: i32, v_min: i32, v_max: i32, format: &str, slider_flags: BitFlags<ImGuiSliderFlag>, ) -> (bool, i32)
pub fn slider_int2_ret( label: &str, v1: i32, v2: i32, v_min: i32, v_max: i32, ) -> (bool, i32, i32)
pub fn slider_int2_ret_opts( label: &str, v1: i32, v2: i32, v_min: i32, v_max: i32, display_format: &str, slider_flags: BitFlags<ImGuiSliderFlag>, ) -> (bool, i32, i32)
pub fn v_slider_float_ret( label: &str, size: &Vec2, v: f32, v_min: f32, v_max: f32, ) -> (bool, f32)
pub fn v_slider_float_ret_opts( label: &str, size: &Vec2, v: f32, v_min: f32, v_max: f32, format: &str, slider_flags: BitFlags<ImGuiSliderFlag>, ) -> (bool, f32)
pub fn v_slider_int_ret( label: &str, size: &Vec2, v: i32, v_min: i32, v_max: i32, ) -> (bool, i32)
pub fn v_slider_int_ret_opts( label: &str, size: &Vec2, v: i32, v_min: i32, v_max: i32, format: &str, slider_flags: BitFlags<ImGuiSliderFlag>, ) -> (bool, i32)
pub fn color_edit3_ret(label: &str, color3: &Color3) -> (bool, Color3)
pub fn color_edit3_ret_opts( label: &str, color3: &Color3, color_edit_flags: BitFlags<ImGuiColorEditFlag>, ) -> (bool, Color3)
pub fn color_edit4_ret(label: &str, color: &Color) -> (bool, Color)
pub fn color_edit4_ret_opts( label: &str, color: &Color, color_edit_flags: BitFlags<ImGuiColorEditFlag>, ) -> (bool, Color)
pub fn checkbox_ret(label: &str, checked: bool) -> (bool, bool)
pub fn list_box_ret( label: &str, current_item: i32, items: &Vec<&str>, ) -> (bool, i32)
pub fn list_box_ret_opts( label: &str, current_item: i32, items: &Vec<&str>, height_in_items: i32, ) -> (bool, i32)
pub fn set_next_window_pos_center()
pub fn set_next_window_pos_center_opts(set_cond: ImGuiCond)
pub fn set_next_window_size(size: &Vec2)
pub fn set_next_window_size_opts(size: &Vec2, set_cond: ImGuiCond)
pub fn set_next_window_collapsed(collapsed: bool)
pub fn set_next_window_collapsed_opts(collapsed: bool, set_cond: ImGuiCond)
pub fn set_window_pos(name: &str, pos: &Vec2)
pub fn set_window_pos_opts(name: &str, pos: &Vec2, set_cond: ImGuiCond)
pub fn set_window_size(name: &str, size: &Vec2)
pub fn set_window_size_opts(name: &str, size: &Vec2, set_cond: ImGuiCond)
pub fn set_window_collapsed(name: &str, collapsed: bool)
pub fn set_window_collapsed_opts( name: &str, collapsed: bool, set_cond: ImGuiCond, )
pub fn set_color_edit_options(color_edit_flags: BitFlags<ImGuiColorEditFlag>)
pub fn input_text(label: &str, buffer: &Buffer) -> bool
pub fn input_text_opts( label: &str, buffer: &Buffer, input_text_flags: BitFlags<ImGuiInputTextFlag>, ) -> bool
pub fn input_text_multiline(label: &str, buffer: &Buffer, size: &Vec2) -> bool
pub fn input_text_multiline_opts( label: &str, buffer: &Buffer, size: &Vec2, input_text_flags: BitFlags<ImGuiInputTextFlag>, ) -> bool
pub fn tree_push<C>(str_id: &str, inside: C)where
C: FnOnce(),
pub fn tree_node<C>(str_id: &str, text: &str, inside: C)where
C: FnOnce(),
pub fn tree_node_ex<C>(label: &str, inside: C)where
C: FnOnce(),
pub fn tree_node_ex_opts<C>(
label: &str,
tree_node_flags: BitFlags<ImGuiTreeNodeFlag>,
inside: C,
)where
C: FnOnce(),
pub fn tree_node_ex_with_id<C>(str_id: &str, text: &str, inside: C)where
C: FnOnce(),
pub fn tree_node_ex_with_id_opts<C>(
str_id: &str,
text: &str,
tree_node_flags: BitFlags<ImGuiTreeNodeFlag>,
inside: C,
)where
C: FnOnce(),
pub fn set_next_item_open(is_open: bool)
pub fn set_next_item_open_opts(is_open: bool, set_cond: ImGuiCond)
pub fn collapsing_header(label: &str) -> bool
pub fn collapsing_header_opts( label: &str, tree_node_flags: BitFlags<ImGuiTreeNodeFlag>, ) -> bool
pub fn selectable(label: &str) -> bool
pub fn selectable_opts( label: &str, selectable_flags: BitFlags<ImGuiSelectableFlag>, ) -> bool
pub fn begin_popup<C>(str_id: &str, inside: C)where
C: FnOnce(),
pub fn begin_popup_modal<C>(name: &str, inside: C)where
C: FnOnce(),
pub fn begin_popup_modal_opts<C>(
name: &str,
windows_flags: BitFlags<ImGuiWindowFlag>,
inside: C,
)where
C: FnOnce(),
pub fn begin_popup_modal_ret(name: &str, opened: bool) -> (bool, bool)
pub fn begin_popup_modal_ret_opts( name: &str, opened: bool, windows_flags: BitFlags<ImGuiWindowFlag>, ) -> (bool, bool)
pub fn begin_popup_context_item<C>(name: &str, inside: C)where
C: FnOnce(),
pub fn begin_popup_context_item_opts<C>(
name: &str,
button: ImGuiPopupButton,
popup_flags: BitFlags<ImGuiPopupFlag>,
inside: C,
)where
C: FnOnce(),
pub fn begin_popup_context_window<C>(name: &str, inside: C)where
C: FnOnce(),
pub fn begin_popup_context_window_opts<C>(
name: &str,
button: ImGuiPopupButton,
popup_flags: BitFlags<ImGuiPopupFlag>,
inside: C,
)where
C: FnOnce(),
pub fn begin_popup_context_void<C>(name: &str, inside: C)where
C: FnOnce(),
pub fn begin_popup_context_void_opts<C>(
name: &str,
button: ImGuiPopupButton,
popup_flags: BitFlags<ImGuiPopupFlag>,
inside: C,
)where
C: FnOnce(),
pub fn begin_table<C>(str_id: &str, column: i32, inside: C)where
C: FnOnce(),
pub fn begin_table_opts<C>(
str_id: &str,
column: i32,
outer_size: &Vec2,
inner_width: f32,
table_flags: BitFlags<ImGuiTableFlag>,
inside: C,
)where
C: FnOnce(),
pub fn table_setup_column(label: &str, init_width_or_weight: f32)
pub fn table_setup_column_opts( label: &str, init_width_or_weight: f32, user_id: i32, table_column_flags: BitFlags<ImGuiTableColumnFlag>, )
pub fn set_next_window_pos(pos: &Vec2)
pub fn set_next_window_pos_opts(pos: &Vec2, set_cond: ImGuiCond, pivot: &Vec2)
pub fn push_style_color<C>(col: ImGuiCol, color: &Color, inside: C)where
C: FnOnce(),
pub fn push_style_float<C>(style: ImGuiStyleVar, val: f32, inside: C)where
C: FnOnce(),
pub fn push_style_vec2<C>(style: ImGuiStyleVec2, val: &Vec2, inside: C)where
C: FnOnce(),
pub fn slider_angle_ret( label: &str, v: f32, v_degrees_min: f32, v_degrees_max: f32, ) -> (bool, f32)
pub fn image(clip_str: &str, size: &Vec2)
pub fn table_next_row()
pub fn table_next_row_opts( min_row_height: f32, table_row_flags: BitFlags<ImGuiTableRowFlag>, )
pub fn begin_list_box<C>(label: &str, size: &Vec2, inside: C)where
C: FnOnce(),
pub fn begin_group<C>(inside: C)where
C: FnOnce(),
pub fn begin_disabled<C>(inside: C)where
C: FnOnce(),
pub fn begin_tooltip<C>(inside: C)where
C: FnOnce(),
pub fn push_item_width<C>(width: f32, inside: C)where
C: FnOnce(),
pub fn push_text_wrap_pos<C>(wrap_pos_x: f32, inside: C)where
C: FnOnce(),
pub fn push_item_flag<C>(flags: BitFlags<ImGuiItemFlags>, v: bool, inside: C)where
C: FnOnce(),
pub fn push_id<C>(str_id: &str, inside: C)where
C: FnOnce(),
pub fn push_clip_rect<C>(
clip_rect_min: &Vec2,
clip_rect_max: &Vec2,
intersect_with_current_clip_rect: bool,
inside: C,
)where
C: FnOnce(),
Auto Trait Implementations§
impl Freeze for ImGui
impl RefUnwindSafe for ImGui
impl Send for ImGui
impl Sync for ImGui
impl Unpin for ImGui
impl UnwindSafe for ImGui
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more