dear_imgui_rs/ui.rs
1//! Per-frame UI entry point
2//!
3//! The `Ui` type exposes most user-facing Dear ImGui APIs for a single frame:
4//! creating windows, drawing widgets, accessing draw lists, showing built-in
5//! tools and more. Obtain it from [`Context::frame`].
6//!
7//! Example:
8//! ```no_run
9//! # use dear_imgui_rs::*;
10//! let mut ctx = Context::create();
11//! let ui = ctx.frame();
12//! ui.text("Hello, world!");
13//! ```
14//!
15mod core;
16mod debug_tools;
17mod draw;
18mod navigation;
19mod style;
20mod viewport;
21mod widgets;
22mod window;
23
24use crate::Id;
25use crate::draw::DrawListMut;
26use crate::input::MouseCursor;
27use crate::internal::RawWrapper;
28use crate::string::UiBuffer;
29use crate::sys;
30use crate::texture::TextureRef;
31use std::cell::UnsafeCell;
32
33/// Represents the Dear ImGui user interface for one frame
34#[derive(Debug)]
35pub struct Ui {
36 /// Internal buffer for string operations
37 buffer: UnsafeCell<UiBuffer>,
38}