Expand description
§Dear ImGui - Rust Bindings with Docking Support
High-level Rust bindings for Dear ImGui, the immediate mode GUI library. This crate provides safe, idiomatic Rust bindings with full support for docking and multi-viewport features.
§Features
- Safe, idiomatic Rust API
- Full docking and multi-viewport support
- Builder pattern for widgets
- Memory-safe string handling
- Integration with modern Rust graphics ecosystems
§Quick Start
use dear_imgui_rs::*;
let mut ctx = Context::create();
let ui = ctx.frame();
ui.window("Hello World")
.size([300.0, 100.0], Condition::FirstUseEver)
.build(|| {
ui.text("Hello, world!");
ui.text("This is Dear ImGui with docking support!");
});§Math Interop (mint/glam)
Many drawing and coordinate-taking APIs accept impl Into<sys::ImVec2> so you can pass:
[f32; 2]or(f32, f32)dear_imgui_sys::ImVec2mint::Vector2<f32>(viadear-imgui-sysconversions)- With the optional
glamfeature,glam::Vec2directly (viaimpl From<glam::Vec2> for ImVec2indear-imgui-sys)
Example:
let dl = ui.get_window_draw_list();
dl.add_line([0.0, 0.0], [100.0, 100.0], [1.0, 1.0, 1.0, 1.0]).build();
// Also works with mint::Vector2<f32>
let a = mint::Vector2 { x: 10.0, y: 20.0 };
let b = mint::Vector2 { x: 30.0, y: 40.0 };
dl.add_rect(a, b, [1.0, 0.0, 0.0, 1.0]).build();
// And with glam::Vec2 when the `glam` feature is enabled
#[cfg(feature = "glam")]
{
let a = glam::Vec2::new(10.0, 20.0);
let b = glam::Vec2::new(30.0, 40.0);
dl.add_rect(a, b, [0.0, 1.0, 0.0, 1.0]).build();
}§Textures (ImGui 1.92+)
You can pass either a legacy TextureId or a Context-owned managed texture handle:
// 1) Legacy handle
let tex_id = texture::TextureId::new(0x1234);
// 2) Transfer an owned texture into this Context.
let tex = texture::OwnedTextureData::from_pixels(
texture::TextureFormat::RGBA32,
256,
256,
&vec![255; 256 * 256 * 4],
)?;
let managed = context.register_texture(tex);
let ui = context.frame();
ui.image(tex_id, [64.0, 64.0]);
ui.image(managed, [256.0, 256.0]);TextureRef<'tex> is pointer-free for user textures. It stores either a legacy value handle, a
Context/slot/generation managed identity, or an internal font-atlas reference backed by an owner
lease. The owning Ui resolves managed handles immediately before FFI and rejects foreign,
stale, or retiring handles first.
§Texture Management Guide
- Concepts:
TextureId: legacy plain handle (e.g., GL texture name, Vk descriptor).OwnedTextureData: transferable CPU-side texture allocation prepared before registration.ManagedTextureId: opaque Context/slot/generation identity used by widgets and draw lists.ManagedTextureRef/ManagedTextureMut: non-escaping Context-scoped inspection and pixel updates which do not expose native pointers or renderer-owned fields.TextureRef<'tex>: logical image source constructed fromTextureId,ManagedTextureId, or an owner-backed font-atlas texture lease.
- Basic flow:
- Create
OwnedTextureDatawithfrom_pixels(format, w, h, pixels); the payload length is validated exactly before native allocation. - Transfer ownership with
Context::register_texture(tex)and retain its handle. - Mutate before a frame with
Context::try_with_texture_mut(handle, |tex| ...), usingreplace_pixels()for a full replacement orupdate_subresource()for a strided region. - Use the handle in UI via
ui.image(handle, size)or draw-list APIs. - Call
Context::remove_texture(handle)to begin generation-safe retirement. - A renderer processes request-owned bytes from
PendingFrame::texture_requests()orFrameSnapshot::texture_requests()and returns feedback created by each request.
- Create
- Alternatives: when you already have a GPU handle, pass
TextureIddirectly.
§Renderer Integration (Modern Textures)
When integrating a renderer backend (WGPU, OpenGL, etc.) with ImGui 1.92+:
- Create one
SynchronousRendererConsumerorDetachedRendererConsumerfrom the Context and keep it alive with that renderer path. This explicitly claims managed font-atlas ownership. - Set
BackendFlags::RENDERER_HAS_TEXTURESbefore the first frame. Do not callLegacyFontAtlas::build; managed renderers build and upload the atlas from texture requests. - Synchronous renderer APIs consume a Context-borrowed
PendingFrame, reconcile it, then draw the resultingReconciledFrame; detached renderers consume a move-onlyFrameSnapshot. - Each frame, give every texture request one explicit
uploaded,destroyed,superseded, orretryoutcome. - Reconcile synchronous feedback before rendering draw commands that depend on new IDs;
cargo run -j 1 -p dear-imgui-rs --example custom_renderer_headlessis the executable reference for the complete synchronous request, draw, and reset sequence. detached snapshots commit feedback when their GPU work is complete. - Bind
DrawCmdParams::texture_id. Command iteration resolves the effective ID for both legacy and managed texture references. - Before destroying the renderer’s complete GPU texture map, call
Context::prepare_renderer_texture_reset. Destroy the map only after preparation succeeds, then commit the permit before dropping the consumer.
Pseudocode outline:
// 1) Configure context
let consumer = context.create_synchronous_renderer_consumer()?;
context.io_mut().set_backend_flags(
context.io().backend_flags() | BackendFlags::RENDERER_HAS_TEXTURES,
);
let pending = context.render(&consumer);
let mut feedback = Vec::new();
for request in pending.texture_requests() {
feedback.push(match request.operation() {
TextureOp::Create { .. } | TextureOp::Update { .. } =>
request.uploaded(upload_to_gpu(request))?,
TextureOp::Destroy => {
destroy_gpu_texture(request.texture());
request.destroyed()?
}
});
}
let frame = pending.reconcile_texture_feedback(feedback)?;
// Rendering uses IDs resolved by the owning Context.
for draw_list in frame.draw_data().draw_lists() {
for cmd in draw_list.commands() {
match cmd {
Elements { cmd_params, .. } => {
bind_texture(cmd_params.texture_id);
draw(cmd_params);
}
_ => { /* ... */ }
}
}
}
drop(frame);
// Shutdown only after every frame and its GPU work has completed.
let reset = context.prepare_renderer_texture_reset(&consumer)?;
destroy_all_gpu_textures();
reset.commit();
drop(consumer);For thread-safe render work, register one renderer consumer and capture a Context-created,
move-only render::FrameSnapshot.
§Safe API Migration Notes
The safe layer intentionally rejects old patterns that depended on hidden C current-context or aliasing state:
- Use
TextureIdfor legacy handles andManagedTextureIdfor Context-owned textures. - Borrowed
&mut TextureDatais intentionally not an image source; transfer ownership withContext::register_textureand mutate it through a Context-scoped closure. - Synchronous renderer backends turn a Context-borrowed
PendingFrameinto a drawableReconciledFrame; detached renderers consume a move-onlyFrameSnapshotand commit request-bound feedback. FontIdis a persistent, atlas-validated handle. It may be stored in style state, butUi::push_font,DrawListMut::add_text_with_font, andUi::push_font_with_sizevalidate the active atlas before entering FFI.FontAtlas::clear,clear_fonts, andremove_fontinvalidate existingFontIdvalues from that atlas.Context::font_atlas()returns&FontAtlas; usefont_atlas()for startup-time font loading and atlas mutation.- RAII tokens for windows, stacks, popups, tables, draw-list texture stacks, and extension scopes
are UI/current-context scoped and
!Send + !Sync. Drop them on the creating UI thread. - Use
Ui::with_state_storagefor a panic-safe, nested state-storage override. Both the replacement and itsStateStorageview are confined to the closure. - Use
Ui::with_multi_selectfor advanced multi-select flows. It returns an ownedMultiSelectResult; no view into Dear ImGui’s temporary begin/end IO escapes the closure.
§Colors (ImU32 ABGR)
Dear ImGui uses a packed 32-bit color in ABGR order for low-level APIs (aka ImU32).
When you need a packed color (e.g. TableSetBgColor), use colors::Color::to_imgui_u32():
// Pack RGBA floats to ImGui ABGR (ImU32)
let abgr = Color::rgb(1.0, 0.0, 0.0).to_imgui_u32();
ui.table_set_cell_bg_color_u32(abgr, TableColumnRef::Current);For draw-list helpers you can continue to pass [f32;4] or use draw::ImColor32 which
represents the same ABGR packed value in a convenient wrapper.
§Text Input (String vs ImString)
This crate offers two ways to edit text:
- String-backed builders:
ui.input_text(label, &mut String)andui.input_text_multiline(label, &mut String, size).- Internally stage a growable UTF�? buffer for the call and copy the
edited bytes back into your
Stringafterwards. - For very large fields, use
.capacity_hint(bytes)on the builder to reduce reallocations, e.g.:ui.input_text("Big", big) .capacity_hint(64 * 1024) .build();
- Internally stage a growable UTF�? buffer for the call and copy the
edited bytes back into your
- ImString-backed builders:
ui.input_text_imstr(label, &mut ImString)andui.input_text_multiline_imstr(label, &mut ImString, size).- Zero‑copy: pass your
ImStringbuffer directly to ImGui. - Uses ImGui’s
CallbackResizeunder the hood to grow the same buffer the widget edits �?no copy before/after the call.
- Zero‑copy: pass your
Choose String for convenience (especially for small/medium inputs). Prefer ImString when you want to avoid copies for large or frequently edited text.
§Low-level Draw APIs
Draw list wrappers expose both high-level primitives and some low-level building blocks:
-
Concave polygons (ImGui 1.92+):
DrawListMut::add_concave_poly_filled(&[P], color)fills an arbitrary concave polygon.DrawListMut::path_fill_concave(color)fills the current path using the concave tessellator.- Note: requires Dear ImGui 1.92 or newer in
dear-imgui-sys.
-
Channels splitting:
DrawListMut::channels_split(count, |channels| { ... })splits draw into multiple channels and automatically merges on scope exit. Callchannels.set_current(i)to select a channel.
-
Clipping helpers:
push_clip_rect,push_clip_rect_full_screen,with_clip_rect,clip_rect_min,clip_rect_max.
-
Unsafe prim API (for custom geometry):
prim_reserve,prim_unreserve,prim_rect,prim_rect_uv,prim_quad_uv,prim_write_vtx,prim_write_idx,prim_vtx.- Safety: these mirror ImGui’s low-level geometry functions. Callers must respect vertex/index counts, write exactly the reserved amounts, and ensure valid topology. Prefer high-level helpers unless you need exact control.
-
Callbacks during draw:
- Raw:
unsafe DrawListMut::add_callbackallows passing a C callback and raw userdata; see method docs for safety requirements.
- Raw:
Re-exports§
pub extern crate dear_imgui_sys as sys;
Re-exports§
pub use self::fonts::*;pub use self::input::*;pub use self::platform_io::*;pub use render::*;pub use texture::*;
Modules§
- button
- Buttons
- color
- Color widgets
- combo
- Combo boxes
- drag
- Drag slider widgets for numeric input
- fonts
- Font system for Dear ImGui
- image
- Image widgets
- input
- Input types (mouse, keyboard, cursors)
- internal
- Internal low-level types
- list_
box - List boxes
- menu
- Menus and menu bars
- misc
- Miscellaneous widgets
- multi_
select - Multi-select helpers (BeginMultiSelect/EndMultiSelect)
- platform_
io - Platform IO functionality for Dear ImGui
- plot
- Basic plots
- popup
- Popups and modals
- progress
- Progress bars
- render
- Rendering system for Dear ImGui.
- selectable
- Selectable items
- slider
- Sliders
- tab
- Tabs
- table
- Tables
- text
- Text helpers
- texture
- Texture management for Dear ImGui
- tooltip
- Tooltips
- tree
- Trees and collapsing headers
Structs§
- Angle
Slider - Builder for an angle slider widget.
- Backend
Flags - Backend capabilities
- Basic
Selection - Selection container backed by Dear ImGui’s
ImGuiSelectionBasicStorage. - Basic
Selection Iter - Iterator over selected ids stored in
BasicSelection. - Button
- Builder for button widget
- Button
Flags - Independent flags for invisible buttons.
- Child
Flags - Configuration flags for child windows
- Child
Window - Represents a child window that can be built
- Clip
Rect Token - Tracks a pushed clip rect that will be popped on drop.
- Color
- RGBA color with 32-bit floating point components
- Color
Button - Builder for a color button widget
- Color
Button Flags - Independently composable flags accepted by
ColorButton(). - Color
Button Options - Options accepted by
ColorButton(). - Color
Edit3 - Builder for a 3-component color edit widget
- Color
Edit4 - Builder for a 4-component color edit widget
- Color
Edit Flags - Independently composable flags accepted by
ColorEdit3(),ColorEdit4(), andIo::set_color_edit_options(). - Color
Edit Options - Options accepted by
ColorEdit3(),ColorEdit4(), andIo::set_color_edit_options(). - Color
Override - A single color override for a given
StyleColorentry. - Color
Picker3 - Builder for a 3-component color picker widget
- Color
Picker4 - Builder for a 4-component color picker widget
- Color
Picker Display Flags - Display sub-editors visible inside
ColorPicker*(). - Color
Picker Flags - Independently composable flags accepted by
ColorPicker3()andColorPicker4(). - Color
Picker Options - Options accepted by
ColorPicker3()andColorPicker4(). - Color
Stack Token - Tracks a color pushed to the color stack that can be popped by calling
.end()or by dropping. - Column
Builder - Chainable builder for a single column. Use
.done()to return to the table builder. - Combo
Box - Builder for a combo box widget
- Combo
BoxFlags - Independent flags for combo box widgets.
- Combo
BoxOptions - Complete combo box options assembled from independent flags and exclusive mode selections.
- Combo
BoxToken - Tracks a combo box that can be ended by calling
.end()or by dropping. - Config
Flags - Configuration flags
- Context
- An imgui context.
- Context
Activation Error - Failure to activate a suspended Context without losing its owner.
- Context
Alive Token - A weak token that reports whether ordinary access to a Context is still valid.
- Context
Attachment Handle - Non-owning identity for one exact Context attachment generation.
- Context
Attachment Lease - Lease that unregisters an attachment when explicitly detached or dropped.
- Context
Attachment Teardown Error - Non-retryable failure reported by an attachment during
Context::drop. - Context
Binding - Persistent, non-thread-safe capability for calling against one live Context.
- Context
Destroyed - Pointer-free notification passed after native Context destruction.
- Context
Id - Process-unique identity for a Dear ImGui context.
- Context
Platform Attachment Release - Exclusive permit for an explicit platform attachment release transaction.
- Context
Platform Window Teardown - Phase-limited capability passed around a normal platform-window teardown transaction.
- Context
Suspension Error - Failure to suspend a Context without losing its owner.
- Context
Teardown - Phase-limited access passed to pre-destroy attachment hooks.
- Disabled
Token - Tracks a disabled scope begun with
Ui::begin_disabledand ended on drop. - Dock
Node Flags - Flags accepted when submitting a dockspace.
- Dockspace
Builder - Canonical builder for a dockspace submission.
- Drag
- Builder for a drag slider widget
- Drag
Drop Payload - Raw payload data
- Drag
Drop Payload Empty - Empty payload (no data, just notification)
- Drag
Drop Payload Pod - Typed payload with data
- Drag
Drop Source - Builder for creating drag drop sources
- Drag
Drop Source Flags - Flags for drag and drop sources.
- Drag
Drop Source Tooltip - Token representing an active drag source tooltip
- Drag
Drop Target - Drag drop target for accepting payloads
- Drag
Drop Target Flags - Flags for drag and drop targets.
- Drag
Flags - Flags for drag widgets.
- Drag
Range - Builder for a drag range slider widget
- Draw
Corner Flags - Corner rounding flags accepted by rectangle and rounded-image drawing APIs.
- Draw
List Flags - Draw list flags
- Draw
List Mut - Object implementing the custom draw API.
- Draw
List Texture Token - Tracks a texture pushed to a draw-list texture stack.
- Draw
Ngon Segment Count - Segment count for regular n-gon drawing. Dear ImGui requires at least three sides.
- Draw
Segment Count - Segment count for draw-list APIs where Dear ImGui accepts
0as “auto”. - Dummy
Clipboard Backend - Non-functioning placeholder clipboard backend
- Focus
Scope Token - Tracks a pushed focus scope, popped on drop.
- Focused
Flags - Flags for focus detection
- Font
Stack Token - Tracks a font pushed to the font stack that can be popped by calling
.end()or by dropping. - Frame
Lifecycle Stamp - Comparable identity and native progress marker for a Context frame boundary.
- Frame
Prepare Options - Options used by
Context::prepare_frame. - Frame
Result - Result returned by
Context::frame_with_result. - Frame
Token - A frame opened by
Context::begin_frame. - Group
Token - Tracks a layout group that can be ended with
endor by dropping. - Id
- Strongly-typed wrapper around ImGuiID.
- IdStack
Token - Tracks an ID pushed to the ID stack that can be popped by calling
.pop()or by dropping. Seecrate::Ui::push_idfor more details. - ImString
- A UTF-8 encoded, growable, implicitly nul-terminated string.
- Image
- Builder for an image widget
- Image
Button - Builder for an image button widget
- Indent
Token - Tracks an indentation scope started with
Ui::begin_indentorUi::begin_indent_by. - IniSession
Date - A Gregorian date that Dear ImGui can round-trip through
ImGuiPackedDate. - Input
Double - Builder for double input widget
- Input
Float - Builder for float input widget
- Input
Float2 - Builder for a 2-component float input widget.
- Input
Float3 - Builder for a 3-component float input widget.
- Input
Float4 - Builder for a 4-component float input widget.
- Input
Int - Builder for integer input widget
- Input
Int2 - Builder for a 2-component int input widget.
- Input
Int3 - Builder for a 3-component int input widget.
- Input
Int4 - Builder for a 4-component int input widget.
- Input
Scalar - Builder for an input scalar widget.
- Input
ScalarN - Builder for an input scalar array widget.
- Input
Text - Builder for a text input widget
- Input
Text Callback - Callback flags for InputText widgets
- Input
Text ImStr - Builder for a text input backed by ImString (zero-copy)
- Input
Text Multiline - Builder for multiline text input widget
- Input
Text Multiline ImStr - Builder for multiline text input backed by ImString (zero-copy)
- Input
Text Multiline With Cb - Multiline InputText with attached callback handler
- Invisible
Button Mouse Buttons - Mouse buttons accepted by invisible buttons.
- Invisible
Button Options - Complete options accepted by
InvisibleButton(). - Io
- Settings and inputs/outputs for imgui-rs This is a transparent wrapper around ImGuiIO
- Item
Flag Stack Token - Tracks item flags pushed with
Ui::push_item_flag. - Item
Flags - Flags that can be applied to subsequently submitted items.
- Item
Hovered Flags - Flags accepted by
Ui::is_item_hovered_with_flags(). - Item
State Flags - Flags recorded for the last submitted item.
- Item
Width Stack Token - Tracks a change made with
Ui::push_item_widththat can be popped by callingItemWidthStackToken::endor dropping. - KeySet
Selection - Index-based selection storage backed by a key slice +
HashSetof selected keys. - ListBox
- Builder for a list box widget
- List
BoxToken - Tracks a list box that can be ended by calling
.end()or by dropping. - List
Clipper - Used to render only the visible items when displaying a long list of items in a scrollable area.
- List
Clipper Iterator - List
Clipper Token - List clipper is a mechanism to efficiently implement scrolling of large lists with random access.
- LogAuto
Open Depth - Auto-open depth for Dear ImGui logging helpers.
- Main
Menu BarToken - Tracks a main menu bar that can be ended by calling
.end()or by dropping. - Menu
BarToken - Tracks a menu bar that can be ended by calling
.end()or by dropping. - Menu
Token - Tracks a menu that can be ended by calling
.end()or by dropping. - Modal
Popup - Builder for a modal popup
- Modal
Popup Token - Tracks a modal popup that can be ended by calling
.end()or by dropping. - Multi
Select Flags - Independent flags controlling multi-selection behavior.
- Multi
Select Options - Complete multi-select options assembled from independent flags and an optional single-choice policies.
- Multi
Select Result - An owned copy of the IO produced by
BeginMultiSelect()orEndMultiSelect(). - Multi
Select Scope - Closure-scoped access to an active Dear ImGui multi-select block.
- Numeric
Format - A validated C-style format for one Dear ImGui numeric value.
- Owned
State Storage - Owns an
ImGuiStorageand clears it on drop. - Passthrough
Callback - This is a ZST which implements InputTextCallbackHandler as a passthrough.
- Payload
IsWrong Type - Error type for payload type mismatches
- Plot
Histogram - Builder for a plot histogram widget
- Plot
Lines - Builder for a plot lines widget
- Plot
Value Offset - Builder for a plot lines widget
- Polyline
Flags - Flags accepted by
AddPolyline()andPathStroke(). - Popup
Context Flags - Independent flags accepted by
OpenPopupOnItemClick()andBeginPopupContext*()call sites. - Popup
Context Options - Complete popup options assembled from independent flags and optional single mouse button.
- Popup
Open Flags - Independent flags accepted by
OpenPopup*()call sites. - Popup
Query Flags - Independent flags accepted by
IsPopupOpen()string-id queries. - Popup
Token - Tracks a popup that can be ended by calling
.end()or by dropping. - Progress
Bar - Builder for a progress bar widget.
- Renderer
Texture Reset - One-use permission to reset Context-owned renderer texture bindings.
- Selectable
- Builder for a selectable widget.
- Selectable
Flags - Flags for selectables
- Slider
- Builder for slider widgets.
- Slider
Flags - Flags for slider widgets.
- State
Storage - A non-owning reference to an
ImGuiStoragebelonging to the current context. - Style
- User interface style/colors
- Style
Stack Token - Tracks a style pushed to the style stack that can be popped by calling
.end()or by dropping. - Style
Tweaks - High-level style tweaks that can be applied on top of a preset.
- Suspended
Context - A suspended Dear ImGui context
- TabBar
- Builder for a tab bar
- TabBar
Flags - Independent flags for tab bar widgets.
- TabBar
Options - Complete tab bar options assembled from independent flags and optional single fitting policy.
- TabBar
Token - Token representing an active tab bar.
- TabItem
- Builder for a tab item
- TabItem
Flags - Independent flags for tab item widgets.
- TabItem
Options - Complete tab item options assembled from independent flags and optional single placement.
- TabItem
Token - Token representing an active tab item.
- Table
Builder - Builder for ImGui tables with columns + headers + sizing/freeze options.
- Table
Column Flags - Independent flags accepted by
TableSetupColumn(). - Table
Column Index - Concrete zero-based table column index.
- Table
Column Setup - Table column setup information
- Table
Column Sort Spec - One column sort spec.
- Table
Column State Flags - Flags returned by
TableGetColumnFlags(). - Table
Column User Data - Opaque application data associated with a table column.
- Table
Flags - Independent flags for table widgets.
- Table
Header Data - Safe description of a single angled header cell.
- Table
Options - Complete table options assembled from independent flags and an optional single sizing policy.
- Table
RowFlags - Flags for table rows
- Table
RowIndex - Concrete zero-based table row index.
- Table
Sort Specs - Owned snapshot of the current table sort specifications.
- Table
Theme - Table-related theme defaults (flags/behavior).
- Table
Token - Tracks a table that can be ended by calling
.end()or by dropping - Text
Callback Data - This struct provides methods to edit the underlying text buffer that Dear ImGui manipulates. Primarily, it gives remove_chars, insert_chars, and mutable access to what text is selected.
- Text
Filter - Helper to parse and apply text filters
- Text
Wrap PosStack Token - Tracks a change made with
Ui::push_text_wrap_posthat can be popped by callingTextWrapPosStackToken::endor dropping. - Theme
- High-level theme configuration for Dear ImGui.
- Tooltip
Hovered Flags - Flags stored in style tooltip hover defaults.
- Tooltip
Token - Tracks a tooltip that can be ended by calling
.end()or by dropping. - Tree
Line Mode - Tree hierarchy guide-line drawing mode stored in
ImGuiStyle::TreeLinesFlags. - Tree
Node - Builder for a tree node widget
- Tree
Node Flags - Flags for tree node widgets
- Tree
Node Token - Tracks a tree node that can be popped by calling
.pop()or by dropping. - Ui
- Represents the Dear ImGui user interface for one frame
- UiBuffer
- Internal buffer for UI string operations
- Unknown
Count List Clipper - Builder for an unknown-count list clipper.
- Unknown
Count List Clipper Token - Active unknown-count list clipper.
- Vertical
Slider - Builder for a vertical slider widget.
- Viewport
Flags - Viewport flags for multi-viewport support
- Window
- Represents a window that can be built
- Window
Class - Window class for docking configuration.
- Window
Class Dock Node Flags - Dock-node policies contributed by every window using a
crate::WindowClass. - Window
Class Viewport Flags - Viewport policy bits that an application may override through
crate::WindowClass. - Window
Flags - Configuration flags for windows
- Window
Hovered Flags - Flags accepted by
Ui::is_window_hovered_with_flags(). - Window
Key - Stable Dear ImGui identity for a top-level window.
- Window
Theme - Window-related theme defaults (flags/behavior).
Enums§
- Color
Data Type - Single numeric representation for color edit widgets and defaults.
- Color
Display Mode - Single display mode for color edit widgets.
- Color
Input Mode - Single input/output color space for color edit and picker widgets.
- Color
Picker Mode - Single picker implementation for color picker widgets and defaults.
- Combo
BoxHeight - Height policy for combo box popups.
- Combo
BoxPreview Mode - Preview/arrow layout for a combo box.
- Condition
- Condition for setting window/widget properties
- Context
Activation Reason - Reason a suspended Context could not be activated.
- Context
Attachment Detach Error - Failure to explicitly detach a live Context attachment lease.
- Context
Attachment Error - Failure to register an attachment with a Context.
- Context
Attachment Phase - Ordered phase of Context teardown exposed to an attachment hook.
- Context
Attachment Role - Exclusive role claimed by a Context attachment.
- Context
Binding Error - Failure to enter a Context through a persistent binding capability.
- Context
Lifecycle - Lifecycle visible to persistent safe Context capabilities.
- Context
Platform Attachment Release Error - Failure to prepare an explicit platform attachment release.
- Context
Platform Window Teardown Error - Failure while entering or leaving an explicit platform-window teardown transaction.
- Context
Scope Error - Failure to enter or finish a temporary active-Context scope.
- Context
Suspension Reason - Reason an active Context could not be suspended.
- Direction
- A cardinal direction
- Dock
Layout - A complete declarative dock tree.
- Dock
Layout Apply - Policy controlling whether an existing persisted dock tree is preserved.
- Dock
Split - Direction of the first child produced by a
DockLayout::Split. - Dockspace
Error - Validation or submission failure for a dockspace.
- Drag
Drop Payload Cond - Condition for updating a drag and drop payload.
- Frame
Lifecycle State - Runtime state for a Dear ImGui frame owned by an external engine schedule.
- History
Direction - Direction for history navigation
- ImGui
Error - Errors that can occur in Dear ImGui operations
- IniSession
Date Error - Errors returned when constructing an
IniSessionDate. - IniSettings
Retention - One coherent
.iniretention configuration owned by acrate::Context. - IniSettings
Retention Error - Errors returned while reading or applying
IniSettingsRetention. - Multi
Select BoxSelect - Box-selection geometry for multi-select scopes.
- Multi
Select Click Policy - Click-selection policy for multi-select scopes.
- Multi
Select Range Direction - Iteration order requested for a selected range.
- Multi
Select Request - An owned selection change requested by Dear ImGui.
- Multi
Select Scope Kind - Scope for box-select and clear-on-empty-click behavior.
- Numeric
Format Error - Describes why a C-style numeric format was rejected.
- Popup
Context Mouse Button - Single mouse button used by popup context helpers.
- Scoped
Activation Error - Failure while temporarily activating a borrowed
SuspendedContext. - Sort
Direction - Sorting direction for table columns.
- Style
Color - Style color identifier
- Style
Var - A temporary change in user interface style
- Style
VarVec2 - A two-component style variable whose X or Y component can be overridden.
- TabBar
Fitting Policy - Single fitting policy for a tab bar.
- TabItem
Placement - Single placement option for a tab item or tab item button.
- Table
BgTarget - Target for table background colors.
- Table
Column Indent - Single-choice indentation policy for a table column.
- Table
Column Ref - Table column selector for APIs that accept Dear ImGui’s current-column sentinel.
- Table
Column Width - Single-choice width mode for a table column.
- Table
Context Menu Target - Target column for opening a table context menu.
- Table
Hovered Column - Result of
crate::Ui::table_get_hovered_column. - Table
Hovered Row - Result of
crate::Ui::table_get_hovered_row. - Table
Sizing Policy - Single-choice table sizing policy.
- Theme
Preset - Which base preset to start from when applying a
Theme. - Tree
Node Id - Tree node ID that can be constructed from different types
- Window
Class Error - Validation failure for a
WindowClass. - Window
Class Parent Viewport - Parent viewport policy for a docking window class.
- Window
KeyError - Validation failure while creating a
WindowKey. - Window
Label - Window label accepted by
Ui::window.
Constants§
- HAS_
DOCKING - Check if docking features are available
- HAS_
FREETYPE - Check if FreeType font rasterizer support is compiled in
- HAS_
WASM - Check if WASM support is compiled in (sys layer)
- VERSION
Traits§
- Clipboard
Backend - Trait for clipboard backends
- Context
Attachment - Type-erased lifecycle hooks owned by a Context.
- Input
Text Callback Handler - This trait provides an interface which ImGui will call on InputText callbacks.
- Multi
Select Index Storage - Index-based selection storage for multi-select helpers.
- Safe
String Conversion - Helper trait for safe string conversion
Functions§
- dear_
imgui_ version - Returns the underlying Dear ImGui library version
- with_
scratch_ txt - Calls
fwith a temporary, NUL-terminated C string pointer backed by a thread-local scratch buffer. - with_
scratch_ txt_ slice - Calls
fwith a list of temporary, NUL-terminated C string pointers backed by a thread-local scratch buffer. - with_
scratch_ txt_ slice_ with_ opt - Calls
fwith a list of temporary, NUL-terminated C string pointers and one optional pointer backed by a thread-local scratch buffer. - with_
scratch_ txt_ three - Calls
fwith three temporary, NUL-terminated C string pointers backed by a thread-local scratch buffer. - with_
scratch_ txt_ two - Calls
fwith two temporary, NUL-terminated C string pointers backed by a thread-local scratch buffer.
Type Aliases§
- Button
Repeat Token - Tracks a button repeat item flag pushed with
Ui::push_button_repeat. - ImGui
Result - Result type for Dear ImGui operations
- Multi
Select User Data - Application-defined item data passed through Dear ImGui’s multi-select API.
- RawDraw
Callback - Non-null native callback accepted by
DrawListMut::add_callback.