easy_imgui

Struct Ui

Source
pub struct Ui<A>
where A: ?Sized,
{ /* private fields */ }
Expand description

Ui represents an ImGui frame that is being built.

Usually you will get a &mut Ui when you are expected to build a user interface, as in UiBuilder::do_ui.

Implementations§

Source§

impl<A> Ui<A>

Source

pub fn set_next_item_selection_user_data(&self, i: usize)

Source

pub fn is_item_toggled_selection(&self) -> bool

Source

pub fn with_multi_select<R, Storage: MultiSelectStorage>( &self, flags: MultiSelectFlags, items_count: Option<usize>, storage: Storage, f: impl FnOnce(&mut Storage, &mut MultiSelect) -> R, ) -> R

Wraps the call to f between BeginMultiselect and EndMultiselect.

The storage argument defines how the selection status will be stored.

Source§

impl<A> Ui<A>

Source

pub fn style(&self) -> &Style

Source§

impl<A> Ui<A>

Source

pub fn child_config<S: IntoCStr>(&self, name: LblId<S>) -> Child<S>

Source§

impl<A> Ui<A>

Source

pub fn window_config<S: IntoCStr>(&self, name: LblId<S>) -> Window<'_, S>

Source§

impl<A> Ui<A>

Source

pub fn menu_item_config<S: IntoCStr>( &self, label: LblId<S>, ) -> MenuItem<S, &str>

Source§

impl<A> Ui<A>

Source

pub fn button_config<S: IntoCStr>(&self, label: LblId<S>) -> Button<S>

Source

pub fn button<S: IntoCStr>(&self, label: LblId<S>) -> bool

Source§

impl<A> Ui<A>

Source

pub fn small_button_config<S: IntoCStr>( &self, label: LblId<S>, ) -> SmallButton<S>

Source

pub fn small_button<S: IntoCStr>(&self, label: LblId<S>) -> bool

Source§

impl<A> Ui<A>

Source§

impl<A> Ui<A>

Source

pub fn arrow_button_config<S: IntoCStr>( &self, id: S, dir: Dir, ) -> ArrowButton<S>

Source

pub fn arrow_button<S: IntoCStr>(&self, id: S, dir: Dir) -> bool

Source§

impl<A> Ui<A>

Source

pub fn checkbox_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut bool, ) -> Checkbox<'v, S>

Source

pub fn checkbox<S: IntoCStr>(&self, label: LblId<S>, value: &mut bool) -> bool

Source§

impl<A> Ui<A>

Source

pub fn radio_button_config<S: IntoCStr>( &self, label: LblId<S>, active: bool, ) -> RadioButton<S>

Source§

impl<A> Ui<A>

Source

pub fn progress_bar_config<'a>(&self, fraction: f32) -> ProgressBar<&'a str>

Source§

impl<A> Ui<A>

Source

pub fn image_config(&self, user_texture_id: TextureId, size: Vector2) -> Image

Source

pub fn image_with_custom_rect_config( &self, ridx: CustomRectIndex, scale: f32, ) -> Image

Source§

impl<A> Ui<A>

Source

pub fn image_button_config<S: IntoCStr>( &self, str_id: Id<S>, user_texture_id: TextureId, size: Vector2, ) -> ImageButton<S>

Source

pub fn image_button_with_custom_rect_config<S: IntoCStr>( &self, str_id: Id<S>, ridx: CustomRectIndex, scale: f32, ) -> ImageButton<S>

Source§

impl<A> Ui<A>

Source

pub fn selectable_config<S: IntoCStr>(&self, label: LblId<S>) -> Selectable<S>

Source

pub fn selectable<S: IntoCStr>(&self, label: LblId<S>) -> bool

Source§

impl<A> Ui<A>

Source

pub fn drag_float_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut f32, ) -> DragFloat<'v, S>

Source§

impl<A> Ui<A>

Source

pub fn drag_float_2_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut [f32; 2], ) -> DragFloat2<'v, S>

Source§

impl<A> Ui<A>

Source

pub fn drag_float_3_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut [f32; 3], ) -> DragFloat3<'v, S>

Source§

impl<A> Ui<A>

Source

pub fn drag_float_4_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut [f32; 4], ) -> DragFloat4<'v, S>

Source§

impl<A> Ui<A>

Source

pub fn drag_int_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut i32, ) -> DragInt<'v, S>

Source§

impl<A> Ui<A>

Source

pub fn drag_int_2_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut [i32; 2], ) -> DragInt2<'v, S>

Source§

impl<A> Ui<A>

Source

pub fn drag_int_3_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut [i32; 3], ) -> DragInt3<'v, S>

Source§

impl<A> Ui<A>

Source

pub fn drag_int_4_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut [i32; 4], ) -> DragInt4<'v, S>

Source§

impl<A> Ui<A>

Source

pub fn slider_float_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut f32, ) -> SliderFloat<'v, S>

Source§

impl<A> Ui<A>

Source

pub fn slider_float_2_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut [f32; 2], ) -> SliderFloat2<'v, S>

Source§

impl<A> Ui<A>

Source

pub fn slider_float_3_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut [f32; 3], ) -> SliderFloat3<'v, S>

Source§

impl<A> Ui<A>

Source

pub fn slider_float_4_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut [f32; 4], ) -> SliderFloat4<'v, S>

Source§

impl<A> Ui<A>

Source

pub fn slider_int_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut i32, ) -> SliderInt<'v, S>

Source§

impl<A> Ui<A>

Source

pub fn slider_int_2_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut [i32; 2], ) -> SliderInt2<'v, S>

Source§

impl<A> Ui<A>

Source

pub fn slider_int_3_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut [i32; 3], ) -> SliderInt3<'v, S>

Source§

impl<A> Ui<A>

Source

pub fn slider_int_4_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut [i32; 4], ) -> SliderInt4<'v, S>

Source§

impl<A> Ui<A>

Source

pub fn slider_angle_config<'v, S: IntoCStr>( &self, label: LblId<S>, v_rad: &'v mut f32, ) -> SliderAngle<'v, S>

Source§

impl<A> Ui<A>

Source

pub fn color_edit_3_config<'v, S: IntoCStr>( &self, label: LblId<S>, color: &'v mut [f32; 3], ) -> ColorEdit3<'v, S>

Source§

impl<A> Ui<A>

Source

pub fn color_edit_4_config<'v, S: IntoCStr>( &self, label: LblId<S>, color: &'v mut Color, ) -> ColorEdit4<'v, S>

Source§

impl<A> Ui<A>

Source

pub fn color_picker_3_config<'v, S: IntoCStr>( &self, label: LblId<S>, color: &'v mut [f32; 3], ) -> ColorPicker3<'v, S>

Source§

impl<A> Ui<A>

Source

pub fn color_picker_4_config<'v, S: IntoCStr>( &self, label: LblId<S>, color: &'v mut Color, ) -> ColorPicker4<'v, S>

Source§

impl<A> Ui<A>

Source

pub fn input_text_config<'v, S: IntoCStr>( &self, label: LblId<S>, text: &'v mut String, ) -> InputText<'v, S>

Source§

impl<A> Ui<A>

Source

pub fn input_os_string_config<'v, S: IntoCStr>( &self, label: LblId<S>, text: &'v mut OsString, ) -> InputOsString<'v, S>

Source§

impl<A> Ui<A>

Source

pub fn input_text_multiline_config<'v, S: IntoCStr>( &self, label: LblId<S>, text: &'v mut String, ) -> InputTextMultiline<'v, S>

Source§

impl<A> Ui<A>

Source

pub fn input_text_hint_config<'v, S1: IntoCStr, S2: IntoCStr>( &self, label: LblId<S1>, hint: S2, text: &'v mut String, ) -> InputTextHint<'v, S1, S2>

Source§

impl<A> Ui<A>

Source

pub fn input_float_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut f32, ) -> InputFloat<'v, S>

Source§

impl<A> Ui<A>

Source

pub fn input_int_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut i32, ) -> InputInt<'v, S>

Source§

impl<A> Ui<A>

Source

pub fn input_float_2_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut [f32; 2], ) -> InputFloat2<'v, S>

Source§

impl<A> Ui<A>

Source

pub fn input_float_3_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut [f32; 3], ) -> InputFloat3<'v, S>

Source§

impl<A> Ui<A>

Source

pub fn input_float_4_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut [f32; 4], ) -> InputFloat4<'v, S>

Source§

impl<A> Ui<A>

Source

pub fn input_int_2_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut [i32; 2], ) -> InputInt2<'v, S>

Source§

impl<A> Ui<A>

Source

pub fn input_int_3_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut [i32; 3], ) -> InputInt3<'v, S>

Source§

impl<A> Ui<A>

Source

pub fn input_int_4_config<'v, S: IntoCStr>( &self, label: LblId<S>, value: &'v mut [i32; 4], ) -> InputInt4<'v, S>

Source§

impl<A> Ui<A>

Source

pub fn menu_config<S: IntoCStr>(&self, name: LblId<S>) -> Menu<S>

Source§

impl<A> Ui<A>

Source

pub fn collapsing_header_config<S: IntoCStr>( &self, label: LblId<S>, ) -> CollapsingHeader<S>

Source§

impl<A> Ui<A>

Source

pub fn tree_node_config<S: IntoCStr>( &self, label: LblId<S>, ) -> TreeNode<'static, S, usize>

Source

pub fn tree_node_ex_config<'a, H: Hashable>( &self, id: H, label: &'a str, ) -> TreeNode<'a, &'a str, H>

Source§

impl<A> Ui<A>

Source

pub fn popup_config<S: IntoCStr>(&self, str_id: Id<S>) -> Popup<S>

Source§

impl<A> Ui<A>

Source

pub fn popup_modal_config<S: IntoCStr>( &self, name: LblId<S>, ) -> PopupModal<'static, S>

Source§

impl<A> Ui<A>

Source§

impl<A> Ui<A>

Source§

impl<A> Ui<A>

Source§

impl<A> Ui<A>

Source

pub fn combo_config<'a, S: IntoCStr>( &self, label: LblId<S>, ) -> Combo<S, &'a str>

Source

pub fn combo<V: Copy + PartialEq, S1: IntoCStr, S2: IntoCStr>( &self, label: LblId<S1>, values: impl IntoIterator<Item = V>, f_name: impl Fn(V) -> S2, current: &mut V, ) -> bool

Source§

impl<A> Ui<A>

Source

pub fn list_box_config<S: IntoCStr>(&self, label: LblId<S>) -> ListBox<S>

Source

pub fn list_box<V: Copy + PartialEq, S1: IntoCStr, S2: IntoCStr>( &self, label: LblId<S1>, height_in_items: i32, values: impl IntoIterator<Item = V>, f_name: impl Fn(V) -> S2, current: &mut V, ) -> bool

Source§

impl<A> Ui<A>

Source

pub fn tab_bar_config<S: IntoCStr>(&self, str_id: LblId<S>) -> TabBar<S>

Source§

impl<A> Ui<A>

Source

pub fn tab_item_config<S: IntoCStr>(&self, str_id: LblId<S>) -> TabItem<'_, S>

Source

pub fn tab_item_button(label: LblId<impl IntoCStr>, flags: TabItemFlags) -> bool

Source

pub fn set_tab_item_closed(tab_or_docked_window_label: LblId<impl IntoCStr>)

Source§

impl<A> Ui<A>

Source

pub fn invalidate_font_atlas(&self)

The next time CurrentContext::do_frame() is called, it will trigger a call to UiBuilder::build_custom_atlas.

Source

pub fn display_size(&self) -> Vector2

Source

pub fn display_scale(&self) -> f32

Source

pub fn get_clipboard_text(&self) -> String

Source

pub fn set_clipboard_text(&self, text: impl IntoCStr)

Source

pub fn set_next_window_size_constraints_callback( &self, size_min: Vector2, size_max: Vector2, cb: impl FnMut(SizeCallbackData<'_>) + 'static, )

Source

pub fn set_next_window_size_constraints( &self, size_min: Vector2, size_max: Vector2, )

Source

pub fn set_next_item_width(&self, item_width: f32)

Source

pub fn set_next_item_open(&self, is_open: bool, cond: Cond)

Source

pub fn set_keyboard_focus_here(&self, offset: i32)

Source

pub fn with_group<R>(&self, f: impl FnOnce() -> R) -> R

See BeginGroup, EndGroup.

Source

pub fn with_disabled<R>(&self, disabled: bool, f: impl FnOnce() -> R) -> R

See BeginDisabled, EndDisabled.

Source

pub fn with_clip_rect<R>( &self, clip_rect_min: Vector2, clip_rect_max: Vector2, intersect_with_current_clip_rect: bool, f: impl FnOnce() -> R, ) -> R

See PushClipRect, PopClipRect.

Source

pub fn with_main_menu_bar<R>(&self, f: impl FnOnce() -> R) -> Option<R>

See BeginMainMenuBar, EndMainMenuBar.

Source

pub fn with_always_main_menu_bar<R>(&self, f: impl FnOnce(bool) -> R) -> R

Source

pub fn with_menu_bar<R>(&self, f: impl FnOnce() -> R) -> Option<R>

See BeginMenuBar, EndMenuBar.

Source

pub fn with_always_menu_bar<R>(&self, f: impl FnOnce(bool) -> R) -> R

Source

pub fn with_tooltip<R>(&self, f: impl FnOnce() -> R) -> Option<R>

See BeginTooltip, EndTooltip.

Source

pub fn with_always_tooltip<R>(&self, f: impl FnOnce(bool) -> R) -> R

Source

pub fn with_item_tooltip<R>(&self, f: impl FnOnce() -> R) -> Option<R>

See BeginItemTooltip, EndTooltip. There is not EndItemTooltip.

Source

pub fn with_always_item_tooltip<R>(&self, f: impl FnOnce(bool) -> R) -> R

Source

pub fn with_push<R>(&self, push: impl Pushable, f: impl FnOnce() -> R) -> R

Calls the f functions with the given push

Source

pub fn show_demo_window(&self, show: Option<&mut bool>)

Source

pub fn set_next_window_pos(&self, pos: Vector2, cond: Cond, pivot: Vector2)

Source

pub fn set_next_window_size(&self, size: Vector2, cond: Cond)

Source

pub fn set_next_window_content_size(&self, size: Vector2)

Source

pub fn set_next_window_collapsed(&self, collapsed: bool, cond: Cond)

Source

pub fn set_next_window_focus(&self)

Source

pub fn set_next_window_scroll(&self, scroll: Vector2)

Source

pub fn set_next_window_bg_alpha(&self, alpha: f32)

Source

pub fn window_draw_list(&self) -> WindowDrawList<'_, A>

Source

pub fn foreground_draw_list(&self) -> WindowDrawList<'_, A>

Source

pub fn background_draw_list(&self) -> WindowDrawList<'_, A>

Source

pub fn text(&self, text: &str)

Source

pub fn text_colored(&self, color: Color, text: impl IntoCStr)

Source

pub fn text_disabled(&self, text: impl IntoCStr)

Source

pub fn text_wrapped(&self, text: impl IntoCStr)

Source

pub fn label_text(&self, label: impl IntoCStr, text: impl IntoCStr)

Source

pub fn bullet_text(&self, text: impl IntoCStr)

Source

pub fn bullet(&self)

Source

pub fn separator_text(&self, text: impl IntoCStr)

Source

pub fn separator(&self)

Source

pub fn set_item_default_focus(&self)

Source

pub fn is_item_hovered(&self) -> bool

Source

pub fn is_item_hovered_ex(&self, flags: HoveredFlags) -> bool

Source

pub fn is_item_active(&self) -> bool

Source

pub fn is_item_focused(&self) -> bool

Source

pub fn is_item_clicked(&self, flags: MouseButton) -> bool

Source

pub fn is_item_visible(&self) -> bool

Source

pub fn is_item_edited(&self) -> bool

Source

pub fn is_item_activated(&self) -> bool

Source

pub fn is_item_deactivated(&self) -> bool

Source

pub fn is_item_deactivated_after_edit(&self) -> bool

Source

pub fn is_item_toggled_open(&self) -> bool

Source

pub fn is_any_item_hovered(&self) -> bool

Source

pub fn is_any_item_active(&self) -> bool

Source

pub fn is_any_item_focused(&self) -> bool

Source

pub fn is_window_collapsed(&self) -> bool

Source

pub fn is_window_focused(&self, flags: FocusedFlags) -> bool

Source

pub fn is_window_hovered(&self, flags: FocusedFlags) -> bool

Source

pub fn get_item_id(&self) -> ImGuiID

Source

pub fn get_id(&self, id: impl Hashable) -> ImGuiID

Source

pub fn get_item_rect_min(&self) -> Vector2

Source

pub fn get_item_rect_max(&self) -> Vector2

Source

pub fn get_item_rect_size(&self) -> Vector2

Source

pub fn get_main_viewport(&self) -> Viewport<'_>

Source

pub fn get_content_region_avail(&self) -> Vector2

Source

pub fn get_window_pos(&self) -> Vector2

Source

pub fn get_window_width(&self) -> f32

Source

pub fn get_window_height(&self) -> f32

Source

pub fn get_scroll_x(&self) -> f32

Source

pub fn get_scroll_y(&self) -> f32

Source

pub fn set_scroll_x(&self, scroll_x: f32)

Source

pub fn set_scroll_y(&self, scroll_y: f32)

Source

pub fn get_scroll_max_x(&self) -> f32

Source

pub fn get_scroll_max_y(&self) -> f32

Source

pub fn set_scroll_here_x(&self, center_x_ratio: f32)

Source

pub fn set_scroll_here_y(&self, center_y_ratio: f32)

Source

pub fn set_scroll_from_pos_x(&self, local_x: f32, center_x_ratio: f32)

Source

pub fn set_scroll_from_pos_y(&self, local_y: f32, center_y_ratio: f32)

Source

pub fn set_window_pos(&self, pos: Vector2, cond: Cond)

Source

pub fn set_window_size(&self, size: Vector2, cond: Cond)

Source

pub fn set_window_collapsed(&self, collapsed: bool, cond: Cond)

Source

pub fn set_window_focus(&self)

Source

pub fn same_line(&self)

Source

pub fn same_line_ex(&self, offset_from_start_x: f32, spacing: f32)

Source

pub fn new_line(&self)

Source

pub fn spacing(&self)

Source

pub fn dummy(&self, size: Vector2)

Source

pub fn indent(&self, indent_w: f32)

Source

pub fn unindent(&self, indent_w: f32)

Source

pub fn get_cursor_pos(&self) -> Vector2

Source

pub fn get_cursor_pos_x(&self) -> f32

Source

pub fn get_cursor_pos_y(&self) -> f32

Source

pub fn set_cursor_pos(&self, local_pos: Vector2)

Source

pub fn set_cursor_pos_x(&self, local_x: f32)

Source

pub fn set_cursor_pos_y(&self, local_y: f32)

Source

pub fn get_cursor_start_pos(&self) -> Vector2

Source

pub fn get_cursor_screen_pos(&self) -> Vector2

Source

pub fn set_cursor_screen_pos(&self, pos: Vector2)

Source

pub fn align_text_to_frame_padding(&self)

Source

pub fn get_text_line_height(&self) -> f32

Source

pub fn get_text_line_height_with_spacing(&self) -> f32

Source

pub fn get_frame_height(&self) -> f32

Source

pub fn get_frame_height_with_spacing(&self) -> f32

Source

pub fn calc_item_width(&self) -> f32

Source

pub fn calc_text_size(&self, text: &str) -> Vector2

Source

pub fn calc_text_size_ex( &self, text: &str, hide_text_after_double_hash: bool, wrap_width: f32, ) -> Vector2

Source

pub fn set_color_edit_options(&self, flags: ColorEditFlags)

Source

pub fn key_mods(&self) -> KeyMod

Source

pub fn is_key_down(&self, key: Key) -> bool

Source

pub fn is_key_pressed(&self, key: Key) -> bool

Source

pub fn is_key_pressed_no_repeat(&self, key: Key) -> bool

Source

pub fn is_key_released(&self, key: Key) -> bool

Source

pub fn get_key_pressed_amount( &self, key: Key, repeat_delay: f32, rate: f32, ) -> i32

Source

pub fn get_font_tex_uv_white_pixel(&self) -> Vector2

Source

pub fn get_font_size(&self) -> f32

Source

pub fn is_mouse_down(&self, button: MouseButton) -> bool

Source

pub fn is_mouse_clicked(&self, button: MouseButton) -> bool

Source

pub fn is_mouse_clicked_repeat(&self, button: MouseButton) -> bool

Source

pub fn is_mouse_released(&self, button: MouseButton) -> bool

Source

pub fn is_mouse_double_clicked(&self, button: MouseButton) -> bool

Source

pub fn get_mouse_clicked_count(&self, button: MouseButton) -> i32

Source

pub fn is_rect_visible_size(&self, size: Vector2) -> bool

Source

pub fn is_rect_visible(&self, rect_min: Vector2, rect_max: Vector2) -> bool

Source

pub fn is_any_mouse_down(&self) -> bool

Source

pub fn get_mouse_pos(&self) -> Vector2

Source

pub fn get_mouse_pos_on_opening_current_popup(&self) -> Vector2

Source

pub fn is_mouse_dragging(&self, button: MouseButton) -> bool

Source

pub fn get_mouse_drag_delta(&self, button: MouseButton) -> Vector2

Source

pub fn reset_mouse_drag_delta(&self, button: MouseButton)

Source

pub fn get_mouse_cursor(&self) -> MouseCursor

Source

pub fn set_mouse_cursor(&self, cursor_type: MouseCursor)

Source

pub fn get_time(&self) -> f64

Source

pub fn get_frame_count(&self) -> i32

Source

pub fn is_popup_open(&self, str_id: Option<Id<impl IntoCStr>>) -> bool

Source

pub fn is_popup_open_ex( &self, str_id: Option<Id<impl IntoCStr>>, flags: PopupFlags, ) -> bool

Source

pub fn is_below_blocking_modal(&self) -> bool

Returns true if the current window is below a modal pop-up.

Source

pub fn is_blocking_modal(&self) -> bool

Return true if there is any modal window opened

Source

pub fn open_popup(&self, str_id: Id<impl IntoCStr>)

Source

pub fn open_popup_ex(&self, str_id: Id<impl IntoCStr>, flags: PopupFlags)

Source

pub fn close_current_popup(&self)

Source

pub fn is_window_appearing(&self) -> bool

Source

pub fn io(&self) -> &ImGuiIO

Source

pub fn font_atlas(&self) -> FontAtlas<'_>

Source

pub fn with_always_drag_drop_source<R>( &self, flags: DragDropSourceFlags, f: impl FnOnce(Option<DragDropPayloadSetter<'_>>) -> R, ) -> R

Source

pub fn with_drag_drop_source<R>( &self, flags: DragDropSourceFlags, f: impl FnOnce(DragDropPayloadSetter<'_>) -> R, ) -> Option<R>

Source

pub fn with_always_drag_drop_target<R>( &self, f: impl FnOnce(Option<DragDropPayloadGetter<'_>>) -> R, ) -> R

Source

pub fn with_drag_drop_target<R>( &self, f: impl FnOnce(DragDropPayloadGetter<'_>) -> R, ) -> Option<R>

Source

pub fn list_clipper(&self, items_count: usize) -> ListClipper

Source

pub fn shortcut(&self, key_chord: impl Into<KeyChord>) -> bool

Source

pub fn shortcut_ex( &self, key_chord: impl Into<KeyChord>, flags: InputFlags, ) -> bool

Source

pub fn set_next_item_shortcut(&self, key_chord: impl Into<KeyChord>)

Source

pub fn set_next_item_shortcut_ex( &self, key_chord: impl Into<KeyChord>, flags: InputFlags, )

Source

pub fn is_keychord_pressed(&self, key_chord: impl Into<KeyChord>) -> bool

Source

pub fn find_glyph(&self, font_id: FontId, c: char) -> FontGlyph<'_>

Gets information about a glyph for a font.

This is a member of Ui instead of FontAtlas because it requires the atlas to be fully built, and in build_custom_atlas it is not yet. The only way to ensure a fully built atlas is by requiring a &Ui.

Source

pub fn find_glyph_no_fallback( &self, font_id: FontId, c: char, ) -> Option<FontGlyph<'_>>

Just like find_glyph but doesn’t use the fallback character for unavailable glyphs.

Source

pub fn get_font(&self, font_id: FontId) -> &ImFont

Gets the font details for a FontId.

TODO: do a proper ImFont wrapper?

Source§

impl<A> Ui<A>

Source

pub fn table_config<S: IntoCStr>( &self, str_id: LblId<S>, column: i32, ) -> TableConfig<S>

Source

pub fn table_next_row(&self, flags: TableRowFlags, min_row_height: f32)

Source

pub fn table_next_column(&self) -> bool

Source

pub fn table_set_column_index(&self, column_n: i32) -> bool

Source

pub fn table_setup_column( &self, label: impl IntoCStr, flags: TableColumnFlags, init_width_or_weight: f32, user_id: ImGuiID, )

Source

pub fn table_setup_scroll_freeze(&self, cols: i32, rows: i32)

Source

pub fn table_headers_row(&self)

Source

pub fn table_angle_headers_row(&self)

Source

pub fn table_get_columns_count(&self) -> i32

Source

pub fn table_get_column_index(&self) -> i32

Source

pub fn table_get_hovered_column(&self) -> Option<i32>

Can return one-pass the last column if hovering the empty space

Source

pub fn table_get_row_index(&self) -> i32

Source

pub fn table_get_column_flags(&self, column_n: Option<i32>) -> TableColumnFlags

Source

pub fn table_get_column_name(&self, column_n: Option<i32>) -> String

Source

pub fn table_set_column_enabled(&self, column_n: Option<i32>, enabled: bool)

Source

pub fn table_set_bg_color( &self, target: TableBgTarget, color: Color, column_n: Option<i32>, )

Source

pub fn table_with_sort_specs( &self, sort_fn: impl FnOnce(&[TableColumnSortSpec]), )

Source

pub fn table_with_sort_specs_always( &self, sort_fn: impl FnOnce(bool, &[TableColumnSortSpec]) -> bool, )

The sort_fn takes the old dirty and returns the new dirty.

Auto Trait Implementations§

§

impl<A> !Freeze for Ui<A>

§

impl<A> !RefUnwindSafe for Ui<A>

§

impl<A> !Send for Ui<A>

§

impl<A> !Sync for Ui<A>

§

impl<A> Unpin for Ui<A>
where A: ?Sized,

§

impl<A> !UnwindSafe for Ui<A>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.