mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-11 05:28:35 +00:00
Merge pull request #600 from dbr/imgui186
Upgrade Dear ImGui 1.84.2 -> 1.86
This commit is contained in:
commit
f523dd2501
@ -4,13 +4,15 @@
|
||||
|
||||
- MSRV is now **1.54**. We soft-updated to this in 0.8.0 with a feature `min-const-generics`, which has now been removed (and as such, we resume having no default features).
|
||||
|
||||
- Upgraded from Dear ImGui 1.84.2 to 1.86. See [the 1.85](https://github.com/ocornut/imgui/releases/tag/v1.85) and [the 1.86](https://github.com/ocornut/imgui/releases/tag/v1.86) release notes
|
||||
|
||||
- BREAKING: Removed `push_style_colors` and `push_style_vars`. Instead, use `push_style_color` in a loop. This was deprecated in `0.7.0` and should have been removed in `0.8.0`. This also removes their associated tokens.
|
||||
|
||||
- BREAKING: Ui now does not have a lifetime associated with it, but is only ever given to users in the form of `&mut Ui`. Additionally, the `render` function has been moved to the `Context` instead of `Ui`.
|
||||
|
||||
- BREAKING: `SharedFontAtlas` now hides an `Rc` within its wrapper -- this simplifies the codebase and more accurately reflects how we expect `SharedFontAtlas` to be used (ie, you're probably going to set it up once, and then give it around, rather than constantly edit it). `SharedFontAtlas` users, if this change is very bad for you, please let us know with issues!
|
||||
|
||||
- BREAKING: `Id` is now a simpler facade, but requires the `Ui` struct to generate. `push_id`, equally, has been split into multiple functions for simplicity.
|
||||
- BREAKING: `Id` is now a simpler facade, but requires the `Ui` struct to generate. `push_id`, equally, has been split into multiple functions for simplicity. New example `imgui-examples/examples/id_wrangling.rs` shows some of the `push_id` usage
|
||||
|
||||
- Added `imgui-sdl2-support` to provide a simple ImGui platform wrapper. Please give it a try! Thank you to @NightShade256 for [implementing this here](https://github.com/imgui-rs/imgui-rs/pull/541)
|
||||
|
||||
@ -30,7 +32,7 @@
|
||||
- `MenuItem` should be made with `ui.menu_item` or `ui.menu_item_config`.
|
||||
- `DragDropSource` and `DragDropTarget` should be made with `ui.drag_drop_source_config` or `ui.drag_drop_target`. Both of these methods, and the DragDrop API in general, are likely to change.
|
||||
|
||||
- Added `docking` feature which builds against the upstream docking branch. Only basic API is exposed currently, just enough to enable the docking `imgui_context.io_mut().config_flags |= imgui::ConfigFlags::DOCKING_ENABLE;` - API for programtically docking windows and so on will be added later.
|
||||
- Added `docking` feature which builds against the upstream docking branch. Only basic API is exposed currently, just enough to enable the docking `imgui_context.io_mut().config_flags |= imgui::ConfigFlags::DOCKING_ENABLE;` - a safe API for programtically docking windows and so on will be added later (until then the internal docking API can be accessed, `imgui::sys::igDockBuilderDockWindow` and so on)
|
||||
|
||||
## [0.8.0] - 2021-09-17
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ In short, there are a few steps:
|
||||
|
||||
We trim some of the "unrequired" parts of imgui, such as it's `.github` directory, the `backends` and `docs`. We are mainly just interested in the main `.cpp` and `.h` files, as well as `misc/freetype/` support files.
|
||||
|
||||
Note this step could benefit from some automation (maybe `cargo xtask update-imgui 1.99`)
|
||||
There's a simple shell script to perform the updates at `imgui-sys/third-party/update-imgui.sh` - this also serves as documentation of what revision was used.
|
||||
|
||||
2. Ensure `luajit` is installed, as this is required by cimgui's generator.
|
||||
|
||||
|
||||
@ -136,6 +136,7 @@ pub type ImDrawIdx = cty::c_ushort;
|
||||
pub type ImGuiID = cty::c_uint;
|
||||
pub type ImU8 = cty::c_uchar;
|
||||
pub type ImS16 = cty::c_short;
|
||||
pub type ImU16 = cty::c_ushort;
|
||||
pub type ImU32 = cty::c_uint;
|
||||
pub type ImWchar16 = cty::c_ushort;
|
||||
pub type ImWchar32 = cty::c_uint;
|
||||
@ -638,17 +639,19 @@ pub const ImGuiFocusedFlags_None: ImGuiFocusedFlags_ = 0;
|
||||
pub const ImGuiFocusedFlags_ChildWindows: ImGuiFocusedFlags_ = 1;
|
||||
pub const ImGuiFocusedFlags_RootWindow: ImGuiFocusedFlags_ = 2;
|
||||
pub const ImGuiFocusedFlags_AnyWindow: ImGuiFocusedFlags_ = 4;
|
||||
pub const ImGuiFocusedFlags_NoPopupHierarchy: ImGuiFocusedFlags_ = 8;
|
||||
pub const ImGuiFocusedFlags_RootAndChildWindows: ImGuiFocusedFlags_ = 3;
|
||||
pub type ImGuiFocusedFlags_ = cty::c_uint;
|
||||
pub const ImGuiHoveredFlags_None: ImGuiHoveredFlags_ = 0;
|
||||
pub const ImGuiHoveredFlags_ChildWindows: ImGuiHoveredFlags_ = 1;
|
||||
pub const ImGuiHoveredFlags_RootWindow: ImGuiHoveredFlags_ = 2;
|
||||
pub const ImGuiHoveredFlags_AnyWindow: ImGuiHoveredFlags_ = 4;
|
||||
pub const ImGuiHoveredFlags_AllowWhenBlockedByPopup: ImGuiHoveredFlags_ = 8;
|
||||
pub const ImGuiHoveredFlags_AllowWhenBlockedByActiveItem: ImGuiHoveredFlags_ = 32;
|
||||
pub const ImGuiHoveredFlags_AllowWhenOverlapped: ImGuiHoveredFlags_ = 64;
|
||||
pub const ImGuiHoveredFlags_AllowWhenDisabled: ImGuiHoveredFlags_ = 128;
|
||||
pub const ImGuiHoveredFlags_RectOnly: ImGuiHoveredFlags_ = 104;
|
||||
pub const ImGuiHoveredFlags_NoPopupHierarchy: ImGuiHoveredFlags_ = 8;
|
||||
pub const ImGuiHoveredFlags_AllowWhenBlockedByPopup: ImGuiHoveredFlags_ = 32;
|
||||
pub const ImGuiHoveredFlags_AllowWhenBlockedByActiveItem: ImGuiHoveredFlags_ = 128;
|
||||
pub const ImGuiHoveredFlags_AllowWhenOverlapped: ImGuiHoveredFlags_ = 256;
|
||||
pub const ImGuiHoveredFlags_AllowWhenDisabled: ImGuiHoveredFlags_ = 512;
|
||||
pub const ImGuiHoveredFlags_RectOnly: ImGuiHoveredFlags_ = 416;
|
||||
pub const ImGuiHoveredFlags_RootAndChildWindows: ImGuiHoveredFlags_ = 3;
|
||||
pub type ImGuiHoveredFlags_ = cty::c_uint;
|
||||
pub const ImGuiDragDropFlags_None: ImGuiDragDropFlags_ = 0;
|
||||
@ -1026,6 +1029,7 @@ pub struct ImGuiIO {
|
||||
pub MetricsActiveWindows: cty::c_int,
|
||||
pub MetricsActiveAllocations: cty::c_int,
|
||||
pub MouseDelta: ImVec2,
|
||||
pub WantCaptureMouseUnlessPopupClose: bool,
|
||||
pub KeyMods: ImGuiKeyModFlags,
|
||||
pub KeyModsPrev: ImGuiKeyModFlags,
|
||||
pub MousePosPrev: ImVec2,
|
||||
@ -1033,9 +1037,11 @@ pub struct ImGuiIO {
|
||||
pub MouseClickedTime: [f64; 5usize],
|
||||
pub MouseClicked: [bool; 5usize],
|
||||
pub MouseDoubleClicked: [bool; 5usize],
|
||||
pub MouseClickedCount: [ImU16; 5usize],
|
||||
pub MouseClickedLastCount: [ImU16; 5usize],
|
||||
pub MouseReleased: [bool; 5usize],
|
||||
pub MouseDownOwned: [bool; 5usize],
|
||||
pub MouseDownWasDoubleClick: [bool; 5usize],
|
||||
pub MouseDownOwnedUnlessPopupClose: [bool; 5usize],
|
||||
pub MouseDownDuration: [f32; 5usize],
|
||||
pub MouseDownDurationPrev: [f32; 5usize],
|
||||
pub MouseDragMaxDistanceAbs: [ImVec2; 5usize],
|
||||
@ -1045,6 +1051,7 @@ pub struct ImGuiIO {
|
||||
pub NavInputsDownDuration: [f32; 20usize],
|
||||
pub NavInputsDownDurationPrev: [f32; 20usize],
|
||||
pub PenPressure: f32,
|
||||
pub AppFocusLost: bool,
|
||||
pub InputQueueSurrogate: ImWchar16,
|
||||
pub InputQueueCharacters: ImVector_ImWchar,
|
||||
}
|
||||
@ -1280,15 +1287,23 @@ impl Default for ImGuiStorage {
|
||||
}
|
||||
}
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Default, Copy, Clone, PartialEq)]
|
||||
#[derive(Debug, Copy, Clone, PartialEq)]
|
||||
pub struct ImGuiListClipper {
|
||||
pub DisplayStart: cty::c_int,
|
||||
pub DisplayEnd: cty::c_int,
|
||||
pub ItemsCount: cty::c_int,
|
||||
pub StepNo: cty::c_int,
|
||||
pub ItemsFrozen: cty::c_int,
|
||||
pub ItemsHeight: f32,
|
||||
pub StartPosY: f32,
|
||||
pub TempData: *mut cty::c_void,
|
||||
}
|
||||
impl Default for ImGuiListClipper {
|
||||
fn default() -> Self {
|
||||
let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
|
||||
unsafe {
|
||||
::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
|
||||
s.assume_init()
|
||||
}
|
||||
}
|
||||
}
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Default, Copy, Clone, PartialEq)]
|
||||
@ -1715,6 +1730,9 @@ extern "C" {
|
||||
extern "C" {
|
||||
pub fn igShowMetricsWindow(p_open: *mut bool);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igShowStackToolWindow(p_open: *mut bool);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igShowAboutWindow(p_open: *mut bool);
|
||||
}
|
||||
@ -1855,9 +1873,6 @@ extern "C" {
|
||||
extern "C" {
|
||||
pub fn igGetWindowContentRegionMax(pOut: *mut ImVec2);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igGetWindowContentRegionWidth() -> f32;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igGetScrollX() -> f32;
|
||||
}
|
||||
@ -3166,14 +3181,6 @@ extern "C" {
|
||||
extern "C" {
|
||||
pub fn igGetStateStorage() -> *mut ImGuiStorage;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igCalcListClipping(
|
||||
items_count: cty::c_int,
|
||||
items_height: f32,
|
||||
out_items_display_start: *mut cty::c_int,
|
||||
out_items_display_end: *mut cty::c_int,
|
||||
);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igBeginChildFrame(id: ImGuiID, size: ImVec2, flags: ImGuiWindowFlags) -> bool;
|
||||
}
|
||||
@ -3246,6 +3253,9 @@ extern "C" {
|
||||
extern "C" {
|
||||
pub fn igIsMouseDoubleClicked(button: ImGuiMouseButton) -> bool;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igGetMouseClickedCount(button: ImGuiMouseButton) -> cty::c_int;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igIsMouseHoveringRect(r_min: ImVec2, r_max: ImVec2, clip: bool) -> bool;
|
||||
}
|
||||
@ -3346,11 +3356,14 @@ extern "C" {
|
||||
extern "C" {
|
||||
pub fn ImGuiIO_AddInputCharactersUTF8(self_: *mut ImGuiIO, str_: *const cty::c_char);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn ImGuiIO_AddFocusEvent(self_: *mut ImGuiIO, focused: bool);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn ImGuiIO_ClearInputCharacters(self_: *mut ImGuiIO);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn ImGuiIO_AddFocusEvent(self_: *mut ImGuiIO, focused: bool);
|
||||
pub fn ImGuiIO_ClearInputKeys(self_: *mut ImGuiIO);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn ImGuiIO_ImGuiIO() -> *mut ImGuiIO;
|
||||
@ -3616,6 +3629,13 @@ extern "C" {
|
||||
extern "C" {
|
||||
pub fn ImGuiListClipper_Step(self_: *mut ImGuiListClipper) -> bool;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn ImGuiListClipper_ForceDisplayRangeByIndices(
|
||||
self_: *mut ImGuiListClipper,
|
||||
item_min: cty::c_int,
|
||||
item_max: cty::c_int,
|
||||
);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn ImColor_ImColorNil() -> *mut ImColor;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -136,6 +136,7 @@ pub type ImDrawIdx = cty::c_ushort;
|
||||
pub type ImGuiID = cty::c_uint;
|
||||
pub type ImU8 = cty::c_uchar;
|
||||
pub type ImS16 = cty::c_short;
|
||||
pub type ImU16 = cty::c_ushort;
|
||||
pub type ImU32 = cty::c_uint;
|
||||
pub type ImWchar16 = cty::c_ushort;
|
||||
pub type ImWchar32 = cty::c_uint;
|
||||
@ -638,17 +639,19 @@ pub const ImGuiFocusedFlags_None: ImGuiFocusedFlags_ = 0;
|
||||
pub const ImGuiFocusedFlags_ChildWindows: ImGuiFocusedFlags_ = 1;
|
||||
pub const ImGuiFocusedFlags_RootWindow: ImGuiFocusedFlags_ = 2;
|
||||
pub const ImGuiFocusedFlags_AnyWindow: ImGuiFocusedFlags_ = 4;
|
||||
pub const ImGuiFocusedFlags_NoPopupHierarchy: ImGuiFocusedFlags_ = 8;
|
||||
pub const ImGuiFocusedFlags_RootAndChildWindows: ImGuiFocusedFlags_ = 3;
|
||||
pub type ImGuiFocusedFlags_ = cty::c_uint;
|
||||
pub const ImGuiHoveredFlags_None: ImGuiHoveredFlags_ = 0;
|
||||
pub const ImGuiHoveredFlags_ChildWindows: ImGuiHoveredFlags_ = 1;
|
||||
pub const ImGuiHoveredFlags_RootWindow: ImGuiHoveredFlags_ = 2;
|
||||
pub const ImGuiHoveredFlags_AnyWindow: ImGuiHoveredFlags_ = 4;
|
||||
pub const ImGuiHoveredFlags_AllowWhenBlockedByPopup: ImGuiHoveredFlags_ = 8;
|
||||
pub const ImGuiHoveredFlags_AllowWhenBlockedByActiveItem: ImGuiHoveredFlags_ = 32;
|
||||
pub const ImGuiHoveredFlags_AllowWhenOverlapped: ImGuiHoveredFlags_ = 64;
|
||||
pub const ImGuiHoveredFlags_AllowWhenDisabled: ImGuiHoveredFlags_ = 128;
|
||||
pub const ImGuiHoveredFlags_RectOnly: ImGuiHoveredFlags_ = 104;
|
||||
pub const ImGuiHoveredFlags_NoPopupHierarchy: ImGuiHoveredFlags_ = 8;
|
||||
pub const ImGuiHoveredFlags_AllowWhenBlockedByPopup: ImGuiHoveredFlags_ = 32;
|
||||
pub const ImGuiHoveredFlags_AllowWhenBlockedByActiveItem: ImGuiHoveredFlags_ = 128;
|
||||
pub const ImGuiHoveredFlags_AllowWhenOverlapped: ImGuiHoveredFlags_ = 256;
|
||||
pub const ImGuiHoveredFlags_AllowWhenDisabled: ImGuiHoveredFlags_ = 512;
|
||||
pub const ImGuiHoveredFlags_RectOnly: ImGuiHoveredFlags_ = 416;
|
||||
pub const ImGuiHoveredFlags_RootAndChildWindows: ImGuiHoveredFlags_ = 3;
|
||||
pub type ImGuiHoveredFlags_ = cty::c_uint;
|
||||
pub const ImGuiDragDropFlags_None: ImGuiDragDropFlags_ = 0;
|
||||
@ -1026,6 +1029,7 @@ pub struct ImGuiIO {
|
||||
pub MetricsActiveWindows: cty::c_int,
|
||||
pub MetricsActiveAllocations: cty::c_int,
|
||||
pub MouseDelta: ImVec2,
|
||||
pub WantCaptureMouseUnlessPopupClose: bool,
|
||||
pub KeyMods: ImGuiKeyModFlags,
|
||||
pub KeyModsPrev: ImGuiKeyModFlags,
|
||||
pub MousePosPrev: ImVec2,
|
||||
@ -1033,9 +1037,11 @@ pub struct ImGuiIO {
|
||||
pub MouseClickedTime: [f64; 5usize],
|
||||
pub MouseClicked: [bool; 5usize],
|
||||
pub MouseDoubleClicked: [bool; 5usize],
|
||||
pub MouseClickedCount: [ImU16; 5usize],
|
||||
pub MouseClickedLastCount: [ImU16; 5usize],
|
||||
pub MouseReleased: [bool; 5usize],
|
||||
pub MouseDownOwned: [bool; 5usize],
|
||||
pub MouseDownWasDoubleClick: [bool; 5usize],
|
||||
pub MouseDownOwnedUnlessPopupClose: [bool; 5usize],
|
||||
pub MouseDownDuration: [f32; 5usize],
|
||||
pub MouseDownDurationPrev: [f32; 5usize],
|
||||
pub MouseDragMaxDistanceAbs: [ImVec2; 5usize],
|
||||
@ -1045,6 +1051,7 @@ pub struct ImGuiIO {
|
||||
pub NavInputsDownDuration: [f32; 20usize],
|
||||
pub NavInputsDownDurationPrev: [f32; 20usize],
|
||||
pub PenPressure: f32,
|
||||
pub AppFocusLost: bool,
|
||||
pub InputQueueSurrogate: ImWchar16,
|
||||
pub InputQueueCharacters: ImVector_ImWchar,
|
||||
}
|
||||
@ -1280,15 +1287,23 @@ impl Default for ImGuiStorage {
|
||||
}
|
||||
}
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Default, Copy, Clone, PartialEq)]
|
||||
#[derive(Debug, Copy, Clone, PartialEq)]
|
||||
pub struct ImGuiListClipper {
|
||||
pub DisplayStart: cty::c_int,
|
||||
pub DisplayEnd: cty::c_int,
|
||||
pub ItemsCount: cty::c_int,
|
||||
pub StepNo: cty::c_int,
|
||||
pub ItemsFrozen: cty::c_int,
|
||||
pub ItemsHeight: f32,
|
||||
pub StartPosY: f32,
|
||||
pub TempData: *mut cty::c_void,
|
||||
}
|
||||
impl Default for ImGuiListClipper {
|
||||
fn default() -> Self {
|
||||
let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
|
||||
unsafe {
|
||||
::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
|
||||
s.assume_init()
|
||||
}
|
||||
}
|
||||
}
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Default, Copy, Clone, PartialEq)]
|
||||
@ -1734,6 +1749,10 @@ extern "C" {
|
||||
pub fn igShowMetricsWindow(p_open: *mut bool);
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igShowStackToolWindow(p_open: *mut bool);
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igShowAboutWindow(p_open: *mut bool);
|
||||
}
|
||||
@ -1917,10 +1936,6 @@ extern "C" {
|
||||
pub fn igGetWindowContentRegionMax(pOut: *mut ImVec2);
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igGetWindowContentRegionWidth() -> f32;
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igGetScrollX() -> f32;
|
||||
}
|
||||
@ -3492,15 +3507,6 @@ extern "C" {
|
||||
pub fn igGetStateStorage() -> *mut ImGuiStorage;
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igCalcListClipping(
|
||||
items_count: cty::c_int,
|
||||
items_height: f32,
|
||||
out_items_display_start: *mut cty::c_int,
|
||||
out_items_display_end: *mut cty::c_int,
|
||||
);
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igBeginChildFrame(id: ImGuiID, size: ImVec2, flags: ImGuiWindowFlags) -> bool;
|
||||
}
|
||||
@ -3590,6 +3596,10 @@ extern "C" {
|
||||
pub fn igIsMouseDoubleClicked(button: ImGuiMouseButton) -> bool;
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igGetMouseClickedCount(button: ImGuiMouseButton) -> cty::c_int;
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igIsMouseHoveringRect(r_min: ImVec2, r_max: ImVec2, clip: bool) -> bool;
|
||||
}
|
||||
@ -3718,12 +3728,16 @@ extern "C" {
|
||||
pub fn ImGuiIO_AddInputCharactersUTF8(self_: *mut ImGuiIO, str_: *const cty::c_char);
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn ImGuiIO_AddFocusEvent(self_: *mut ImGuiIO, focused: bool);
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn ImGuiIO_ClearInputCharacters(self_: *mut ImGuiIO);
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn ImGuiIO_AddFocusEvent(self_: *mut ImGuiIO, focused: bool);
|
||||
pub fn ImGuiIO_ClearInputKeys(self_: *mut ImGuiIO);
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
@ -4057,6 +4071,14 @@ extern "C" {
|
||||
pub fn ImGuiListClipper_Step(self_: *mut ImGuiListClipper) -> bool;
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn ImGuiListClipper_ForceDisplayRangeByIndices(
|
||||
self_: *mut ImGuiListClipper,
|
||||
item_min: cty::c_int,
|
||||
item_max: cty::c_int,
|
||||
);
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn ImColor_ImColorNil() -> *mut ImColor;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
35
imgui-sys/third-party/_update-imgui.sh
vendored
Executable file
35
imgui-sys/third-party/_update-imgui.sh
vendored
Executable file
@ -0,0 +1,35 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR=$(dirname ${0} | python3 -c 'import os, sys; print(os.path.abspath(sys.stdin.read().strip()))' )
|
||||
IMGUI_DIR=${1:?}
|
||||
COMMITISH=${2:?}
|
||||
OUT_DIR=${3:?}
|
||||
|
||||
# Location of temporary checkout of imgui at specified commit (or branch)
|
||||
CHECKOUT="${SCRIPT_DIR}"/_temp_imgui_worktree
|
||||
|
||||
# Make checkout
|
||||
|
||||
pushd "${IMGUI_DIR}" > /dev/null
|
||||
|
||||
# Sanity check the supplied imgui path
|
||||
git rev-parse HEAD
|
||||
ls imgui.h
|
||||
|
||||
# Get files from specified rev
|
||||
mkdir "${CHECKOUT}"
|
||||
git archive "${COMMITISH}" | tar xC "${CHECKOUT}"
|
||||
|
||||
popd > /dev/null
|
||||
|
||||
# Copy required files
|
||||
mkdir -p ${OUT_DIR}/
|
||||
mkdir -p ${OUT_DIR}/misc/freetype/
|
||||
|
||||
cp "${CHECKOUT}"/LICENSE.txt "${OUT_DIR}"/
|
||||
cp "${CHECKOUT}"/*.{h,cpp} "${OUT_DIR}"/
|
||||
cp -r "${CHECKOUT}"/misc/freetype/ "${OUT_DIR}"/misc/
|
||||
|
||||
# Clean up
|
||||
rm -r "${CHECKOUT}"
|
||||
190
imgui-sys/third-party/imgui-docking/cimgui.cpp
vendored
190
imgui-sys/third-party/imgui-docking/cimgui.cpp
vendored
@ -1,5 +1,5 @@
|
||||
//This file is automatically generated by generator.lua from https://github.com/cimgui/cimgui
|
||||
//based on imgui.h file version "1.85 WIP" from Dear ImGui https://github.com/ocornut/imgui
|
||||
//based on imgui.h file version "1.86" from Dear ImGui https://github.com/ocornut/imgui
|
||||
//with imgui_internal.h api
|
||||
//docking branch
|
||||
|
||||
@ -84,6 +84,10 @@ CIMGUI_API void igShowMetricsWindow(bool* p_open)
|
||||
{
|
||||
return ImGui::ShowMetricsWindow(p_open);
|
||||
}
|
||||
CIMGUI_API void igShowStackToolWindow(bool* p_open)
|
||||
{
|
||||
return ImGui::ShowStackToolWindow(p_open);
|
||||
}
|
||||
CIMGUI_API void igShowAboutWindow(bool* p_open)
|
||||
{
|
||||
return ImGui::ShowAboutWindow(p_open);
|
||||
@ -1437,10 +1441,6 @@ CIMGUI_API ImGuiStorage* igGetStateStorage()
|
||||
{
|
||||
return ImGui::GetStateStorage();
|
||||
}
|
||||
CIMGUI_API void igCalcListClipping(int items_count,float items_height,int* out_items_display_start,int* out_items_display_end)
|
||||
{
|
||||
return ImGui::CalcListClipping(items_count,items_height,out_items_display_start,out_items_display_end);
|
||||
}
|
||||
CIMGUI_API bool igBeginChildFrame(ImGuiID id,const ImVec2 size,ImGuiWindowFlags flags)
|
||||
{
|
||||
return ImGui::BeginChildFrame(id,size,flags);
|
||||
@ -1509,6 +1509,10 @@ CIMGUI_API bool igIsMouseDoubleClicked(ImGuiMouseButton button)
|
||||
{
|
||||
return ImGui::IsMouseDoubleClicked(button);
|
||||
}
|
||||
CIMGUI_API int igGetMouseClickedCount(ImGuiMouseButton button)
|
||||
{
|
||||
return ImGui::GetMouseClickedCount(button);
|
||||
}
|
||||
CIMGUI_API bool igIsMouseHoveringRect(const ImVec2 r_min,const ImVec2 r_max,bool clip)
|
||||
{
|
||||
return ImGui::IsMouseHoveringRect(r_min,r_max,clip);
|
||||
@ -1937,6 +1941,10 @@ CIMGUI_API bool ImGuiListClipper_Step(ImGuiListClipper* self)
|
||||
{
|
||||
return self->Step();
|
||||
}
|
||||
CIMGUI_API void ImGuiListClipper_ForceDisplayRangeByIndices(ImGuiListClipper* self,int item_min,int item_max)
|
||||
{
|
||||
return self->ForceDisplayRangeByIndices(item_min,item_max);
|
||||
}
|
||||
CIMGUI_API ImColor* ImColor_ImColorNil(void)
|
||||
{
|
||||
return IM_NEW(ImColor)();
|
||||
@ -2573,6 +2581,10 @@ CIMGUI_API ImGuiID igImHashStr(const char* data,size_t data_size,ImU32 seed)
|
||||
{
|
||||
return ImHashStr(data,data_size,seed);
|
||||
}
|
||||
CIMGUI_API void igImQsort(void* base,size_t count,size_t size_of_element,int(*compare_func)(void const*,void const*))
|
||||
{
|
||||
return ImQsort(base,count,size_of_element,compare_func);
|
||||
}
|
||||
CIMGUI_API ImU32 igImAlphaBlendColors(ImU32 col_a,ImU32 col_b)
|
||||
{
|
||||
return ImAlphaBlendColors(col_a,col_b);
|
||||
@ -2841,6 +2853,10 @@ CIMGUI_API void igImMul(ImVec2 *pOut,const ImVec2 lhs,const ImVec2 rhs)
|
||||
{
|
||||
*pOut = ImMul(lhs,rhs);
|
||||
}
|
||||
CIMGUI_API bool igImIsFloatAboveGuaranteedIntegerPrecision(float f)
|
||||
{
|
||||
return ImIsFloatAboveGuaranteedIntegerPrecision(f);
|
||||
}
|
||||
CIMGUI_API void igImBezierCubicCalc(ImVec2 *pOut,const ImVec2 p1,const ImVec2 p2,const ImVec2 p3,const ImVec2 p4,float t)
|
||||
{
|
||||
*pOut = ImBezierCubicCalc(p1,p2,p3,p4,t);
|
||||
@ -3233,6 +3249,22 @@ CIMGUI_API void ImGuiLastItemData_destroy(ImGuiLastItemData* self)
|
||||
{
|
||||
IM_DELETE(self);
|
||||
}
|
||||
CIMGUI_API ImGuiStackSizes* ImGuiStackSizes_ImGuiStackSizes(void)
|
||||
{
|
||||
return IM_NEW(ImGuiStackSizes)();
|
||||
}
|
||||
CIMGUI_API void ImGuiStackSizes_destroy(ImGuiStackSizes* self)
|
||||
{
|
||||
IM_DELETE(self);
|
||||
}
|
||||
CIMGUI_API void ImGuiStackSizes_SetToCurrentState(ImGuiStackSizes* self)
|
||||
{
|
||||
return self->SetToCurrentState();
|
||||
}
|
||||
CIMGUI_API void ImGuiStackSizes_CompareWithCurrentState(ImGuiStackSizes* self)
|
||||
{
|
||||
return self->CompareWithCurrentState();
|
||||
}
|
||||
CIMGUI_API ImGuiPtrOrIndex* ImGuiPtrOrIndex_ImGuiPtrOrIndexPtr(void* ptr)
|
||||
{
|
||||
return IM_NEW(ImGuiPtrOrIndex)(ptr);
|
||||
@ -3245,6 +3277,26 @@ CIMGUI_API ImGuiPtrOrIndex* ImGuiPtrOrIndex_ImGuiPtrOrIndexInt(int index)
|
||||
{
|
||||
return IM_NEW(ImGuiPtrOrIndex)(index);
|
||||
}
|
||||
CIMGUI_API ImGuiListClipperRange ImGuiListClipperRange_FromIndices(int min,int max)
|
||||
{
|
||||
return ImGuiListClipperRange::FromIndices(min,max);
|
||||
}
|
||||
CIMGUI_API ImGuiListClipperRange ImGuiListClipperRange_FromPositions(float y1,float y2,int off_min,int off_max)
|
||||
{
|
||||
return ImGuiListClipperRange::FromPositions(y1,y2,off_min,off_max);
|
||||
}
|
||||
CIMGUI_API ImGuiListClipperData* ImGuiListClipperData_ImGuiListClipperData(void)
|
||||
{
|
||||
return IM_NEW(ImGuiListClipperData)();
|
||||
}
|
||||
CIMGUI_API void ImGuiListClipperData_destroy(ImGuiListClipperData* self)
|
||||
{
|
||||
IM_DELETE(self);
|
||||
}
|
||||
CIMGUI_API void ImGuiListClipperData_Reset(ImGuiListClipperData* self,ImGuiListClipper* clipper)
|
||||
{
|
||||
return self->Reset(clipper);
|
||||
}
|
||||
CIMGUI_API ImGuiNavItemData* ImGuiNavItemData_ImGuiNavItemData(void)
|
||||
{
|
||||
return IM_NEW(ImGuiNavItemData)();
|
||||
@ -3401,21 +3453,21 @@ CIMGUI_API void ImGuiMetricsConfig_destroy(ImGuiMetricsConfig* self)
|
||||
{
|
||||
IM_DELETE(self);
|
||||
}
|
||||
CIMGUI_API ImGuiStackSizes* ImGuiStackSizes_ImGuiStackSizes(void)
|
||||
CIMGUI_API ImGuiStackLevelInfo* ImGuiStackLevelInfo_ImGuiStackLevelInfo(void)
|
||||
{
|
||||
return IM_NEW(ImGuiStackSizes)();
|
||||
return IM_NEW(ImGuiStackLevelInfo)();
|
||||
}
|
||||
CIMGUI_API void ImGuiStackSizes_destroy(ImGuiStackSizes* self)
|
||||
CIMGUI_API void ImGuiStackLevelInfo_destroy(ImGuiStackLevelInfo* self)
|
||||
{
|
||||
IM_DELETE(self);
|
||||
}
|
||||
CIMGUI_API void ImGuiStackSizes_SetToCurrentState(ImGuiStackSizes* self)
|
||||
CIMGUI_API ImGuiStackTool* ImGuiStackTool_ImGuiStackTool(void)
|
||||
{
|
||||
return self->SetToCurrentState();
|
||||
return IM_NEW(ImGuiStackTool)();
|
||||
}
|
||||
CIMGUI_API void ImGuiStackSizes_CompareWithCurrentState(ImGuiStackSizes* self)
|
||||
CIMGUI_API void ImGuiStackTool_destroy(ImGuiStackTool* self)
|
||||
{
|
||||
return self->CompareWithCurrentState();
|
||||
IM_DELETE(self);
|
||||
}
|
||||
CIMGUI_API ImGuiContextHook* ImGuiContextHook_ImGuiContextHook(void)
|
||||
{
|
||||
@ -3585,9 +3637,13 @@ CIMGUI_API void igCalcWindowNextAutoFitSize(ImVec2 *pOut,ImGuiWindow* window)
|
||||
{
|
||||
*pOut = ImGui::CalcWindowNextAutoFitSize(window);
|
||||
}
|
||||
CIMGUI_API bool igIsWindowChildOf(ImGuiWindow* window,ImGuiWindow* potential_parent)
|
||||
CIMGUI_API bool igIsWindowChildOf(ImGuiWindow* window,ImGuiWindow* potential_parent,bool popup_hierarchy,bool dock_hierarchy)
|
||||
{
|
||||
return ImGui::IsWindowChildOf(window,potential_parent);
|
||||
return ImGui::IsWindowChildOf(window,potential_parent,popup_hierarchy,dock_hierarchy);
|
||||
}
|
||||
CIMGUI_API bool igIsWindowWithinBeginStackOf(ImGuiWindow* window,ImGuiWindow* potential_parent)
|
||||
{
|
||||
return ImGui::IsWindowWithinBeginStackOf(window,potential_parent);
|
||||
}
|
||||
CIMGUI_API bool igIsWindowAbove(ImGuiWindow* potential_above,ImGuiWindow* potential_below)
|
||||
{
|
||||
@ -3613,6 +3669,14 @@ CIMGUI_API void igSetWindowHitTestHole(ImGuiWindow* window,const ImVec2 pos,cons
|
||||
{
|
||||
return ImGui::SetWindowHitTestHole(window,pos,size);
|
||||
}
|
||||
CIMGUI_API void igWindowRectAbsToRel(ImRect *pOut,ImGuiWindow* window,const ImRect r)
|
||||
{
|
||||
*pOut = ImGui::WindowRectAbsToRel(window,r);
|
||||
}
|
||||
CIMGUI_API void igWindowRectRelToAbs(ImRect *pOut,ImGuiWindow* window,const ImRect r)
|
||||
{
|
||||
*pOut = ImGui::WindowRectRelToAbs(window,r);
|
||||
}
|
||||
CIMGUI_API void igFocusWindow(ImGuiWindow* window)
|
||||
{
|
||||
return ImGui::FocusWindow(window);
|
||||
@ -3633,6 +3697,18 @@ CIMGUI_API void igBringWindowToDisplayBack(ImGuiWindow* window)
|
||||
{
|
||||
return ImGui::BringWindowToDisplayBack(window);
|
||||
}
|
||||
CIMGUI_API void igBringWindowToDisplayBehind(ImGuiWindow* window,ImGuiWindow* above_window)
|
||||
{
|
||||
return ImGui::BringWindowToDisplayBehind(window,above_window);
|
||||
}
|
||||
CIMGUI_API int igFindWindowDisplayIndex(ImGuiWindow* window)
|
||||
{
|
||||
return ImGui::FindWindowDisplayIndex(window);
|
||||
}
|
||||
CIMGUI_API ImGuiWindow* igFindBottomMostVisibleWindowWithinBeginStack(ImGuiWindow* window)
|
||||
{
|
||||
return ImGui::FindBottomMostVisibleWindowWithinBeginStack(window);
|
||||
}
|
||||
CIMGUI_API void igSetCurrentFont(ImFont* font)
|
||||
{
|
||||
return ImGui::SetCurrentFont(font);
|
||||
@ -3753,9 +3829,21 @@ CIMGUI_API void igSetScrollFromPosYWindowPtr(ImGuiWindow* window,float local_y,f
|
||||
{
|
||||
return ImGui::SetScrollFromPosY(window,local_y,center_y_ratio);
|
||||
}
|
||||
CIMGUI_API void igScrollToBringRectIntoView(ImVec2 *pOut,ImGuiWindow* window,const ImRect item_rect)
|
||||
CIMGUI_API void igScrollToItem(ImGuiScrollFlags flags)
|
||||
{
|
||||
*pOut = ImGui::ScrollToBringRectIntoView(window,item_rect);
|
||||
return ImGui::ScrollToItem(flags);
|
||||
}
|
||||
CIMGUI_API void igScrollToRect(ImGuiWindow* window,const ImRect rect,ImGuiScrollFlags flags)
|
||||
{
|
||||
return ImGui::ScrollToRect(window,rect,flags);
|
||||
}
|
||||
CIMGUI_API void igScrollToRectEx(ImVec2 *pOut,ImGuiWindow* window,const ImRect rect,ImGuiScrollFlags flags)
|
||||
{
|
||||
*pOut = ImGui::ScrollToRectEx(window,rect,flags);
|
||||
}
|
||||
CIMGUI_API void igScrollToBringRectIntoView(ImGuiWindow* window,const ImRect rect)
|
||||
{
|
||||
return ImGui::ScrollToBringRectIntoView(window,rect);
|
||||
}
|
||||
CIMGUI_API ImGuiID igGetItemID()
|
||||
{
|
||||
@ -3821,21 +3909,17 @@ CIMGUI_API void igItemSizeRect(const ImRect bb,float text_baseline_y)
|
||||
{
|
||||
return ImGui::ItemSize(bb,text_baseline_y);
|
||||
}
|
||||
CIMGUI_API bool igItemAdd(const ImRect bb,ImGuiID id,const ImRect* nav_bb,ImGuiItemAddFlags flags)
|
||||
CIMGUI_API bool igItemAdd(const ImRect bb,ImGuiID id,const ImRect* nav_bb,ImGuiItemFlags extra_flags)
|
||||
{
|
||||
return ImGui::ItemAdd(bb,id,nav_bb,flags);
|
||||
return ImGui::ItemAdd(bb,id,nav_bb,extra_flags);
|
||||
}
|
||||
CIMGUI_API bool igItemHoverable(const ImRect bb,ImGuiID id)
|
||||
{
|
||||
return ImGui::ItemHoverable(bb,id);
|
||||
}
|
||||
CIMGUI_API void igItemFocusable(ImGuiWindow* window,ImGuiID id)
|
||||
CIMGUI_API bool igIsClippedEx(const ImRect bb,ImGuiID id)
|
||||
{
|
||||
return ImGui::ItemFocusable(window,id);
|
||||
}
|
||||
CIMGUI_API bool igIsClippedEx(const ImRect bb,ImGuiID id,bool clip_even_when_logged)
|
||||
{
|
||||
return ImGui::IsClippedEx(bb,id,clip_even_when_logged);
|
||||
return ImGui::IsClippedEx(bb,id);
|
||||
}
|
||||
CIMGUI_API void igSetLastItemData(ImGuiID item_id,ImGuiItemFlags in_flags,ImGuiItemStatusFlags status_flags,const ImRect item_rect)
|
||||
{
|
||||
@ -3905,6 +3989,10 @@ CIMGUI_API void igClosePopupsOverWindow(ImGuiWindow* ref_window,bool restore_foc
|
||||
{
|
||||
return ImGui::ClosePopupsOverWindow(ref_window,restore_focus_to_window_under_popup);
|
||||
}
|
||||
CIMGUI_API void igClosePopupsExceptModals()
|
||||
{
|
||||
return ImGui::ClosePopupsExceptModals();
|
||||
}
|
||||
CIMGUI_API bool igIsPopupOpenID(ImGuiID id,ImGuiPopupFlags popup_flags)
|
||||
{
|
||||
return ImGui::IsPopupOpen(id,popup_flags);
|
||||
@ -3913,9 +4001,9 @@ CIMGUI_API bool igBeginPopupEx(ImGuiID id,ImGuiWindowFlags extra_flags)
|
||||
{
|
||||
return ImGui::BeginPopupEx(id,extra_flags);
|
||||
}
|
||||
CIMGUI_API void igBeginTooltipEx(ImGuiWindowFlags extra_flags,ImGuiTooltipFlags tooltip_flags)
|
||||
CIMGUI_API void igBeginTooltipEx(ImGuiTooltipFlags tooltip_flags,ImGuiWindowFlags extra_window_flags)
|
||||
{
|
||||
return ImGui::BeginTooltipEx(extra_flags,tooltip_flags);
|
||||
return ImGui::BeginTooltipEx(tooltip_flags,extra_window_flags);
|
||||
}
|
||||
CIMGUI_API void igGetPopupAllowedExtentRect(ImRect *pOut,ImGuiWindow* window)
|
||||
{
|
||||
@ -3925,6 +4013,10 @@ CIMGUI_API ImGuiWindow* igGetTopMostPopupModal()
|
||||
{
|
||||
return ImGui::GetTopMostPopupModal();
|
||||
}
|
||||
CIMGUI_API ImGuiWindow* igGetTopMostAndVisiblePopupModal()
|
||||
{
|
||||
return ImGui::GetTopMostAndVisiblePopupModal();
|
||||
}
|
||||
CIMGUI_API void igFindBestWindowPosForPopup(ImVec2 *pOut,ImGuiWindow* window)
|
||||
{
|
||||
*pOut = ImGui::FindBestWindowPosForPopup(window);
|
||||
@ -3961,13 +4053,25 @@ CIMGUI_API void igNavInitWindow(ImGuiWindow* window,bool force_reinit)
|
||||
{
|
||||
return ImGui::NavInitWindow(window,force_reinit);
|
||||
}
|
||||
CIMGUI_API void igNavInitRequestApplyResult()
|
||||
{
|
||||
return ImGui::NavInitRequestApplyResult();
|
||||
}
|
||||
CIMGUI_API bool igNavMoveRequestButNoResultYet()
|
||||
{
|
||||
return ImGui::NavMoveRequestButNoResultYet();
|
||||
}
|
||||
CIMGUI_API void igNavMoveRequestForward(ImGuiDir move_dir,ImGuiDir clip_dir,ImGuiNavMoveFlags move_flags)
|
||||
CIMGUI_API void igNavMoveRequestSubmit(ImGuiDir move_dir,ImGuiDir clip_dir,ImGuiNavMoveFlags move_flags,ImGuiScrollFlags scroll_flags)
|
||||
{
|
||||
return ImGui::NavMoveRequestForward(move_dir,clip_dir,move_flags);
|
||||
return ImGui::NavMoveRequestSubmit(move_dir,clip_dir,move_flags,scroll_flags);
|
||||
}
|
||||
CIMGUI_API void igNavMoveRequestForward(ImGuiDir move_dir,ImGuiDir clip_dir,ImGuiNavMoveFlags move_flags,ImGuiScrollFlags scroll_flags)
|
||||
{
|
||||
return ImGui::NavMoveRequestForward(move_dir,clip_dir,move_flags,scroll_flags);
|
||||
}
|
||||
CIMGUI_API void igNavMoveRequestResolveWithLastItem(ImGuiNavItemData* result)
|
||||
{
|
||||
return ImGui::NavMoveRequestResolveWithLastItem(result);
|
||||
}
|
||||
CIMGUI_API void igNavMoveRequestCancel()
|
||||
{
|
||||
@ -4081,6 +4185,10 @@ CIMGUI_API void igDockContextNewFrameUpdateDocking(ImGuiContext* ctx)
|
||||
{
|
||||
return ImGui::DockContextNewFrameUpdateDocking(ctx);
|
||||
}
|
||||
CIMGUI_API void igDockContextEndFrame(ImGuiContext* ctx)
|
||||
{
|
||||
return ImGui::DockContextEndFrame(ctx);
|
||||
}
|
||||
CIMGUI_API ImGuiID igDockContextGenNodeID(ImGuiContext* ctx)
|
||||
{
|
||||
return ImGui::DockContextGenNodeID(ctx);
|
||||
@ -4113,6 +4221,10 @@ CIMGUI_API ImGuiDockNode* igDockNodeGetRootNode(ImGuiDockNode* node)
|
||||
{
|
||||
return ImGui::DockNodeGetRootNode(node);
|
||||
}
|
||||
CIMGUI_API bool igDockNodeIsInHierarchyOf(ImGuiDockNode* node,ImGuiDockNode* parent)
|
||||
{
|
||||
return ImGui::DockNodeIsInHierarchyOf(node,parent);
|
||||
}
|
||||
CIMGUI_API int igDockNodeGetDepth(const ImGuiDockNode* node)
|
||||
{
|
||||
return ImGui::DockNodeGetDepth(node);
|
||||
@ -4557,6 +4669,10 @@ CIMGUI_API void igRenderRectFilledWithHole(ImDrawList* draw_list,ImRect outer,Im
|
||||
{
|
||||
return ImGui::RenderRectFilledWithHole(draw_list,outer,inner,col,rounding);
|
||||
}
|
||||
CIMGUI_API ImDrawFlags igCalcRoundingFlagsForRectInRect(const ImRect r_in,const ImRect r_outer,float threshold)
|
||||
{
|
||||
return ImGui::CalcRoundingFlagsForRectInRect(r_in,r_outer,threshold);
|
||||
}
|
||||
CIMGUI_API void igTextEx(const char* text,const char* text_end,ImGuiTextFlags flags)
|
||||
{
|
||||
return ImGui::TextEx(text,text_end,flags);
|
||||
@ -4581,7 +4697,7 @@ CIMGUI_API void igScrollbar(ImGuiAxis axis)
|
||||
{
|
||||
return ImGui::Scrollbar(axis);
|
||||
}
|
||||
CIMGUI_API bool igScrollbarEx(const ImRect bb,ImGuiID id,ImGuiAxis axis,float* p_scroll_v,float avail_v,float contents_v,ImDrawFlags flags)
|
||||
CIMGUI_API bool igScrollbarEx(const ImRect bb,ImGuiID id,ImGuiAxis axis,ImS64* p_scroll_v,ImS64 avail_v,ImS64 contents_v,ImDrawFlags flags)
|
||||
{
|
||||
return ImGui::ScrollbarEx(bb,id,axis,p_scroll_v,avail_v,contents_v,flags);
|
||||
}
|
||||
@ -4629,9 +4745,9 @@ CIMGUI_API bool igSliderBehavior(const ImRect bb,ImGuiID id,ImGuiDataType data_t
|
||||
{
|
||||
return ImGui::SliderBehavior(bb,id,data_type,p_v,p_min,p_max,format,flags,out_grab_bb);
|
||||
}
|
||||
CIMGUI_API bool igSplitterBehavior(const ImRect bb,ImGuiID id,ImGuiAxis axis,float* size1,float* size2,float min_size1,float min_size2,float hover_extend,float hover_visibility_delay)
|
||||
CIMGUI_API bool igSplitterBehavior(const ImRect bb,ImGuiID id,ImGuiAxis axis,float* size1,float* size2,float min_size1,float min_size2,float hover_extend,float hover_visibility_delay,ImU32 bg_col)
|
||||
{
|
||||
return ImGui::SplitterBehavior(bb,id,axis,size1,size2,min_size1,min_size2,hover_extend,hover_visibility_delay);
|
||||
return ImGui::SplitterBehavior(bb,id,axis,size1,size2,min_size1,min_size2,hover_extend,hover_visibility_delay,bg_col);
|
||||
}
|
||||
CIMGUI_API bool igTreeNodeBehavior(ImGuiID id,ImGuiTreeNodeFlags flags,const char* label,const char* label_end)
|
||||
{
|
||||
@ -4729,6 +4845,10 @@ CIMGUI_API void igErrorCheckEndFrameRecover(ImGuiErrorLogCallback log_callback,v
|
||||
{
|
||||
return ImGui::ErrorCheckEndFrameRecover(log_callback,user_data);
|
||||
}
|
||||
CIMGUI_API void igErrorCheckEndWindowRecover(ImGuiErrorLogCallback log_callback,void* user_data)
|
||||
{
|
||||
return ImGui::ErrorCheckEndWindowRecover(log_callback,user_data);
|
||||
}
|
||||
CIMGUI_API void igDebugDrawItemRect(ImU32 col)
|
||||
{
|
||||
return ImGui::DebugDrawItemRect(col);
|
||||
@ -4741,6 +4861,10 @@ CIMGUI_API void igShowFontAtlas(ImFontAtlas* atlas)
|
||||
{
|
||||
return ImGui::ShowFontAtlas(atlas);
|
||||
}
|
||||
CIMGUI_API void igDebugHookIdInfo(ImGuiID id,ImGuiDataType data_type,const void* data_id,const void* data_id_end)
|
||||
{
|
||||
return ImGui::DebugHookIdInfo(id,data_type,data_id,data_id_end);
|
||||
}
|
||||
CIMGUI_API void igDebugNodeColumns(ImGuiOldColumns* columns)
|
||||
{
|
||||
return ImGui::DebugNodeColumns(columns);
|
||||
@ -4789,6 +4913,10 @@ CIMGUI_API void igDebugNodeWindowsList(ImVector_ImGuiWindowPtr* windows,const ch
|
||||
{
|
||||
return ImGui::DebugNodeWindowsList(windows,label);
|
||||
}
|
||||
CIMGUI_API void igDebugNodeWindowsListByBeginStackParent(ImGuiWindow** windows,int windows_size,ImGuiWindow* parent_in_begin_stack)
|
||||
{
|
||||
return ImGui::DebugNodeWindowsListByBeginStackParent(windows,windows_size,parent_in_begin_stack);
|
||||
}
|
||||
CIMGUI_API void igDebugNodeViewport(ImGuiViewportP* viewport)
|
||||
{
|
||||
return ImGui::DebugNodeViewport(viewport);
|
||||
|
||||
260
imgui-sys/third-party/imgui-docking/cimgui.h
vendored
260
imgui-sys/third-party/imgui-docking/cimgui.h
vendored
@ -1,5 +1,5 @@
|
||||
//This file is automatically generated by generator.lua from https://github.com/cimgui/cimgui
|
||||
//based on imgui.h file version "1.85 WIP" from Dear ImGui https://github.com/ocornut/imgui
|
||||
//based on imgui.h file version "1.86" from Dear ImGui https://github.com/ocornut/imgui
|
||||
//with imgui_internal.h api
|
||||
//docking branch
|
||||
#ifndef CIMGUI_INCLUDED
|
||||
@ -45,8 +45,12 @@ typedef unsigned __int64 ImU64;
|
||||
#ifdef CIMGUI_DEFINE_ENUMS_AND_STRUCTS
|
||||
typedef struct ImGuiTableColumnSettings ImGuiTableColumnSettings;
|
||||
typedef struct ImGuiTableCellData ImGuiTableCellData;
|
||||
typedef struct ImGuiStackTool ImGuiStackTool;
|
||||
typedef struct ImGuiStackLevelInfo ImGuiStackLevelInfo;
|
||||
typedef struct ImGuiViewportP ImGuiViewportP;
|
||||
typedef struct ImGuiWindowDockStyle ImGuiWindowDockStyle;
|
||||
typedef struct ImGuiListClipperData ImGuiListClipperData;
|
||||
typedef struct ImGuiListClipperRange ImGuiListClipperRange;
|
||||
typedef struct ImGuiPtrOrIndex ImGuiPtrOrIndex;
|
||||
typedef struct ImGuiShrinkWidthItem ImGuiShrinkWidthItem;
|
||||
typedef struct ImGuiWindowStackData ImGuiWindowStackData;
|
||||
@ -254,8 +258,8 @@ struct ImGuiWindowTempData;
|
||||
struct ImGuiWindowSettings;
|
||||
typedef int ImGuiDataAuthority;
|
||||
typedef int ImGuiLayoutType;
|
||||
typedef int ImGuiActivateFlags;
|
||||
typedef int ImGuiItemFlags;
|
||||
typedef int ImGuiItemAddFlags;
|
||||
typedef int ImGuiItemStatusFlags;
|
||||
typedef int ImGuiOldColumnFlags;
|
||||
typedef int ImGuiNavHighlightFlags;
|
||||
@ -263,6 +267,7 @@ typedef int ImGuiNavDirSourceFlags;
|
||||
typedef int ImGuiNavMoveFlags;
|
||||
typedef int ImGuiNextItemDataFlags;
|
||||
typedef int ImGuiNextWindowDataFlags;
|
||||
typedef int ImGuiScrollFlags;
|
||||
typedef int ImGuiSeparatorFlags;
|
||||
typedef int ImGuiTextFlags;
|
||||
typedef int ImGuiTooltipFlags;
|
||||
@ -297,6 +302,8 @@ typedef struct ImVector_ImGuiDockRequest {int Size;int Capacity;ImGuiDockRequest
|
||||
typedef struct ImVector_ImGuiGroupData {int Size;int Capacity;ImGuiGroupData* Data;} ImVector_ImGuiGroupData;
|
||||
typedef struct ImVector_ImGuiID {int Size;int Capacity;ImGuiID* Data;} ImVector_ImGuiID;
|
||||
typedef struct ImVector_ImGuiItemFlags {int Size;int Capacity;ImGuiItemFlags* Data;} ImVector_ImGuiItemFlags;
|
||||
typedef struct ImVector_ImGuiListClipperData {int Size;int Capacity;ImGuiListClipperData* Data;} ImVector_ImGuiListClipperData;
|
||||
typedef struct ImVector_ImGuiListClipperRange {int Size;int Capacity;ImGuiListClipperRange* Data;} ImVector_ImGuiListClipperRange;
|
||||
typedef struct ImVector_ImGuiOldColumnData {int Size;int Capacity;ImGuiOldColumnData* Data;} ImVector_ImGuiOldColumnData;
|
||||
typedef struct ImVector_ImGuiOldColumns {int Size;int Capacity;ImGuiOldColumns* Data;} ImVector_ImGuiOldColumns;
|
||||
typedef struct ImVector_ImGuiPlatformMonitor {int Size;int Capacity;ImGuiPlatformMonitor* Data;} ImVector_ImGuiPlatformMonitor;
|
||||
@ -304,6 +311,7 @@ typedef struct ImVector_ImGuiPopupData {int Size;int Capacity;ImGuiPopupData* Da
|
||||
typedef struct ImVector_ImGuiPtrOrIndex {int Size;int Capacity;ImGuiPtrOrIndex* Data;} ImVector_ImGuiPtrOrIndex;
|
||||
typedef struct ImVector_ImGuiSettingsHandler {int Size;int Capacity;ImGuiSettingsHandler* Data;} ImVector_ImGuiSettingsHandler;
|
||||
typedef struct ImVector_ImGuiShrinkWidthItem {int Size;int Capacity;ImGuiShrinkWidthItem* Data;} ImVector_ImGuiShrinkWidthItem;
|
||||
typedef struct ImVector_ImGuiStackLevelInfo {int Size;int Capacity;ImGuiStackLevelInfo* Data;} ImVector_ImGuiStackLevelInfo;
|
||||
typedef struct ImVector_ImGuiStoragePair {int Size;int Capacity;ImGuiStoragePair* Data;} ImVector_ImGuiStoragePair;
|
||||
typedef struct ImVector_ImGuiStyleMod {int Size;int Capacity;ImGuiStyleMod* Data;} ImVector_ImGuiStyleMod;
|
||||
typedef struct ImVector_ImGuiTabItem {int Size;int Capacity;ImGuiTabItem* Data;} ImVector_ImGuiTabItem;
|
||||
@ -545,6 +553,8 @@ typedef enum {
|
||||
ImGuiFocusedFlags_ChildWindows = 1 << 0,
|
||||
ImGuiFocusedFlags_RootWindow = 1 << 1,
|
||||
ImGuiFocusedFlags_AnyWindow = 1 << 2,
|
||||
ImGuiFocusedFlags_NoPopupHierarchy = 1 << 3,
|
||||
ImGuiFocusedFlags_DockHierarchy = 1 << 4,
|
||||
ImGuiFocusedFlags_RootAndChildWindows = ImGuiFocusedFlags_RootWindow | ImGuiFocusedFlags_ChildWindows
|
||||
}ImGuiFocusedFlags_;
|
||||
typedef enum {
|
||||
@ -552,10 +562,12 @@ typedef enum {
|
||||
ImGuiHoveredFlags_ChildWindows = 1 << 0,
|
||||
ImGuiHoveredFlags_RootWindow = 1 << 1,
|
||||
ImGuiHoveredFlags_AnyWindow = 1 << 2,
|
||||
ImGuiHoveredFlags_AllowWhenBlockedByPopup = 1 << 3,
|
||||
ImGuiHoveredFlags_AllowWhenBlockedByActiveItem = 1 << 5,
|
||||
ImGuiHoveredFlags_AllowWhenOverlapped = 1 << 6,
|
||||
ImGuiHoveredFlags_AllowWhenDisabled = 1 << 7,
|
||||
ImGuiHoveredFlags_NoPopupHierarchy = 1 << 3,
|
||||
ImGuiHoveredFlags_DockHierarchy = 1 << 4,
|
||||
ImGuiHoveredFlags_AllowWhenBlockedByPopup = 1 << 5,
|
||||
ImGuiHoveredFlags_AllowWhenBlockedByActiveItem = 1 << 7,
|
||||
ImGuiHoveredFlags_AllowWhenOverlapped = 1 << 8,
|
||||
ImGuiHoveredFlags_AllowWhenDisabled = 1 << 9,
|
||||
ImGuiHoveredFlags_RectOnly = ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_AllowWhenOverlapped,
|
||||
ImGuiHoveredFlags_RootAndChildWindows = ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_ChildWindows
|
||||
}ImGuiHoveredFlags_;
|
||||
@ -913,6 +925,7 @@ struct ImGuiIO
|
||||
ImFont* FontDefault;
|
||||
ImVec2 DisplayFramebufferScale;
|
||||
bool ConfigDockingNoSplit;
|
||||
bool ConfigDockingWithShift;
|
||||
bool ConfigDockingAlwaysTabBar;
|
||||
bool ConfigDockingTransparentPayload;
|
||||
bool ConfigViewportsNoAutoMerge;
|
||||
@ -967,10 +980,11 @@ struct ImGuiIO
|
||||
double MouseClickedTime[5];
|
||||
bool MouseClicked[5];
|
||||
bool MouseDoubleClicked[5];
|
||||
ImU16 MouseClickedCount[5];
|
||||
ImU16 MouseClickedLastCount[5];
|
||||
bool MouseReleased[5];
|
||||
bool MouseDownOwned[5];
|
||||
bool MouseDownOwnedUnlessPopupClose[5];
|
||||
bool MouseDownWasDoubleClick[5];
|
||||
float MouseDownDuration[5];
|
||||
float MouseDownDurationPrev[5];
|
||||
ImVec2 MouseDragMaxDistanceAbs[5];
|
||||
@ -1078,10 +1092,9 @@ struct ImGuiListClipper
|
||||
int DisplayStart;
|
||||
int DisplayEnd;
|
||||
int ItemsCount;
|
||||
int StepNo;
|
||||
int ItemsFrozen;
|
||||
float ItemsHeight;
|
||||
float StartPosY;
|
||||
void* TempData;
|
||||
};
|
||||
struct ImColor
|
||||
{
|
||||
@ -1417,12 +1430,9 @@ typedef enum {
|
||||
ImGuiItemFlags_NoNavDefaultFocus = 1 << 4,
|
||||
ImGuiItemFlags_SelectableDontClosePopup = 1 << 5,
|
||||
ImGuiItemFlags_MixedValue = 1 << 6,
|
||||
ImGuiItemFlags_ReadOnly = 1 << 7
|
||||
ImGuiItemFlags_ReadOnly = 1 << 7,
|
||||
ImGuiItemFlags_Inputable = 1 << 8
|
||||
}ImGuiItemFlags_;
|
||||
typedef enum {
|
||||
ImGuiItemAddFlags_None = 0,
|
||||
ImGuiItemAddFlags_Focusable = 1 << 0
|
||||
}ImGuiItemAddFlags_;
|
||||
typedef enum {
|
||||
ImGuiItemStatusFlags_None = 0,
|
||||
ImGuiItemStatusFlags_HoveredRect = 1 << 0,
|
||||
@ -1433,9 +1443,7 @@ typedef enum {
|
||||
ImGuiItemStatusFlags_HasDeactivated = 1 << 5,
|
||||
ImGuiItemStatusFlags_Deactivated = 1 << 6,
|
||||
ImGuiItemStatusFlags_HoveredWindow = 1 << 7,
|
||||
ImGuiItemStatusFlags_FocusedByCode = 1 << 8,
|
||||
ImGuiItemStatusFlags_FocusedByTabbing = 1 << 9,
|
||||
ImGuiItemStatusFlags_Focused = ImGuiItemStatusFlags_FocusedByCode | ImGuiItemStatusFlags_FocusedByTabbing
|
||||
ImGuiItemStatusFlags_FocusedByTabbing = 1 << 8
|
||||
}ImGuiItemStatusFlags_;
|
||||
typedef enum {
|
||||
ImGuiInputTextFlags_Multiline = 1 << 26,
|
||||
@ -1613,8 +1621,6 @@ struct ImGuiInputTextState
|
||||
bool SelectedAllMouseLock;
|
||||
bool Edited;
|
||||
ImGuiInputTextFlags Flags;
|
||||
ImGuiInputTextCallback UserCallback;
|
||||
void* UserCallbackData;
|
||||
};
|
||||
struct ImGuiPopupData
|
||||
{
|
||||
@ -1682,12 +1688,26 @@ struct ImGuiLastItemData
|
||||
ImGuiItemFlags InFlags;
|
||||
ImGuiItemStatusFlags StatusFlags;
|
||||
ImRect Rect;
|
||||
ImRect NavRect;
|
||||
ImRect DisplayRect;
|
||||
};
|
||||
struct ImGuiStackSizes
|
||||
{
|
||||
short SizeOfIDStack;
|
||||
short SizeOfColorStack;
|
||||
short SizeOfStyleVarStack;
|
||||
short SizeOfFontStack;
|
||||
short SizeOfFocusScopeStack;
|
||||
short SizeOfGroupStack;
|
||||
short SizeOfItemFlagsStack;
|
||||
short SizeOfBeginPopupStack;
|
||||
short SizeOfDisabledStack;
|
||||
};
|
||||
struct ImGuiWindowStackData
|
||||
{
|
||||
ImGuiWindow* Window;
|
||||
ImGuiLastItemData ParentLastItemDataBackup;
|
||||
ImGuiStackSizes StackSizesOnBegin;
|
||||
};
|
||||
struct ImGuiShrinkWidthItem
|
||||
{
|
||||
@ -1699,6 +1719,40 @@ struct ImGuiPtrOrIndex
|
||||
void* Ptr;
|
||||
int Index;
|
||||
};
|
||||
struct ImGuiListClipperRange
|
||||
{
|
||||
int Min;
|
||||
int Max;
|
||||
bool PosToIndexConvert;
|
||||
ImS8 PosToIndexOffsetMin;
|
||||
ImS8 PosToIndexOffsetMax;
|
||||
};
|
||||
struct ImGuiListClipperData
|
||||
{
|
||||
ImGuiListClipper* ListClipper;
|
||||
float LossynessOffset;
|
||||
int StepNo;
|
||||
int ItemsFrozen;
|
||||
ImVector_ImGuiListClipperRange Ranges;
|
||||
};
|
||||
typedef enum {
|
||||
ImGuiActivateFlags_None = 0,
|
||||
ImGuiActivateFlags_PreferInput = 1 << 0,
|
||||
ImGuiActivateFlags_PreferTweak = 1 << 1,
|
||||
ImGuiActivateFlags_TryToPreserveState = 1 << 2
|
||||
}ImGuiActivateFlags_;
|
||||
typedef enum {
|
||||
ImGuiScrollFlags_None = 0,
|
||||
ImGuiScrollFlags_KeepVisibleEdgeX = 1 << 0,
|
||||
ImGuiScrollFlags_KeepVisibleEdgeY = 1 << 1,
|
||||
ImGuiScrollFlags_KeepVisibleCenterX = 1 << 2,
|
||||
ImGuiScrollFlags_KeepVisibleCenterY = 1 << 3,
|
||||
ImGuiScrollFlags_AlwaysCenterX = 1 << 4,
|
||||
ImGuiScrollFlags_AlwaysCenterY = 1 << 5,
|
||||
ImGuiScrollFlags_NoScrollParent = 1 << 6,
|
||||
ImGuiScrollFlags_MaskX_ = ImGuiScrollFlags_KeepVisibleEdgeX | ImGuiScrollFlags_KeepVisibleCenterX | ImGuiScrollFlags_AlwaysCenterX,
|
||||
ImGuiScrollFlags_MaskY_ = ImGuiScrollFlags_KeepVisibleEdgeY | ImGuiScrollFlags_KeepVisibleCenterY | ImGuiScrollFlags_AlwaysCenterY
|
||||
}ImGuiScrollFlags_;
|
||||
typedef enum {
|
||||
ImGuiNavHighlightFlags_None = 0,
|
||||
ImGuiNavHighlightFlags_TypeDefault = 1 << 0,
|
||||
@ -1708,9 +1762,10 @@ typedef enum {
|
||||
}ImGuiNavHighlightFlags_;
|
||||
typedef enum {
|
||||
ImGuiNavDirSourceFlags_None = 0,
|
||||
ImGuiNavDirSourceFlags_Keyboard = 1 << 0,
|
||||
ImGuiNavDirSourceFlags_PadDPad = 1 << 1,
|
||||
ImGuiNavDirSourceFlags_PadLStick = 1 << 2
|
||||
ImGuiNavDirSourceFlags_RawKeyboard = 1 << 0,
|
||||
ImGuiNavDirSourceFlags_Keyboard = 1 << 1,
|
||||
ImGuiNavDirSourceFlags_PadDPad = 1 << 2,
|
||||
ImGuiNavDirSourceFlags_PadLStick = 1 << 3
|
||||
}ImGuiNavDirSourceFlags_;
|
||||
typedef enum {
|
||||
ImGuiNavMoveFlags_None = 0,
|
||||
@ -1720,8 +1775,13 @@ typedef enum {
|
||||
ImGuiNavMoveFlags_WrapY = 1 << 3,
|
||||
ImGuiNavMoveFlags_AllowCurrentNavId = 1 << 4,
|
||||
ImGuiNavMoveFlags_AlsoScoreVisibleSet = 1 << 5,
|
||||
ImGuiNavMoveFlags_ScrollToEdge = 1 << 6,
|
||||
ImGuiNavMoveFlags_Forwarded = 1 << 7
|
||||
ImGuiNavMoveFlags_ScrollToEdgeY = 1 << 6,
|
||||
ImGuiNavMoveFlags_Forwarded = 1 << 7,
|
||||
ImGuiNavMoveFlags_DebugNoResult = 1 << 8,
|
||||
ImGuiNavMoveFlags_FocusApi = 1 << 9,
|
||||
ImGuiNavMoveFlags_Tabbing = 1 << 10,
|
||||
ImGuiNavMoveFlags_Activate = 1 << 11,
|
||||
ImGuiNavMoveFlags_DontSetNavHighlight = 1 << 12
|
||||
}ImGuiNavMoveFlags_;
|
||||
typedef enum {
|
||||
ImGuiNavLayer_Main = 0,
|
||||
@ -1734,6 +1794,7 @@ struct ImGuiNavItemData
|
||||
ImGuiID ID;
|
||||
ImGuiID FocusScopeId;
|
||||
ImRect RectRel;
|
||||
ImGuiItemFlags InFlags;
|
||||
float DistBox;
|
||||
float DistCenter;
|
||||
float DistAxial;
|
||||
@ -1820,10 +1881,12 @@ struct ImGuiDockNode
|
||||
ImVec2 SizeRef;
|
||||
ImGuiAxis SplitAxis;
|
||||
ImGuiWindowClass WindowClass;
|
||||
ImU32 LastBgColor;
|
||||
ImGuiWindow* HostWindow;
|
||||
ImGuiWindow* VisibleWindow;
|
||||
ImGuiDockNode* CentralNode;
|
||||
ImGuiDockNode* OnlyNodeWithWindows;
|
||||
int CountNodeWithWindows;
|
||||
int LastFrameAlive;
|
||||
int LastFrameActive;
|
||||
int LastFrameFocused;
|
||||
@ -1835,14 +1898,15 @@ struct ImGuiDockNode
|
||||
ImGuiDataAuthority AuthorityForViewport :3;
|
||||
bool IsVisible :1;
|
||||
bool IsFocused :1;
|
||||
bool IsBgDrawnThisFrame :1;
|
||||
bool HasCloseButton :1;
|
||||
bool HasWindowMenuButton :1;
|
||||
bool HasCentralNodeChild :1;
|
||||
bool WantCloseAll :1;
|
||||
bool WantLockSizeOnce :1;
|
||||
bool WantMouseMove :1;
|
||||
bool WantHiddenTabBarUpdate :1;
|
||||
bool WantHiddenTabBarToggle :1;
|
||||
bool MarkedForPosSizeWrite :1;
|
||||
};
|
||||
typedef enum {
|
||||
ImGuiWindowDockStyleCol_Text,
|
||||
@ -1916,6 +1980,7 @@ struct ImGuiSettingsHandler
|
||||
};
|
||||
struct ImGuiMetricsConfig
|
||||
{
|
||||
bool ShowStackTool;
|
||||
bool ShowWindowsRects;
|
||||
bool ShowWindowsBeginOrder;
|
||||
bool ShowTablesRects;
|
||||
@ -1925,15 +1990,19 @@ struct ImGuiMetricsConfig
|
||||
int ShowWindowsRectsType;
|
||||
int ShowTablesRectsType;
|
||||
};
|
||||
struct ImGuiStackSizes
|
||||
struct ImGuiStackLevelInfo
|
||||
{
|
||||
short SizeOfIDStack;
|
||||
short SizeOfColorStack;
|
||||
short SizeOfStyleVarStack;
|
||||
short SizeOfFontStack;
|
||||
short SizeOfFocusScopeStack;
|
||||
short SizeOfGroupStack;
|
||||
short SizeOfBeginPopupStack;
|
||||
ImGuiID ID;
|
||||
ImS8 QueryFrameCount;
|
||||
bool QuerySuccess;
|
||||
char Desc[58];
|
||||
};
|
||||
struct ImGuiStackTool
|
||||
{
|
||||
int LastActiveFrame;
|
||||
int StackLevel;
|
||||
ImGuiID QueryId;
|
||||
ImVector_ImGuiStackLevelInfo Results;
|
||||
};
|
||||
typedef enum { ImGuiContextHookType_NewFramePre, ImGuiContextHookType_NewFramePost, ImGuiContextHookType_EndFramePre, ImGuiContextHookType_EndFramePost, ImGuiContextHookType_RenderPre, ImGuiContextHookType_RenderPost, ImGuiContextHookType_Shutdown, ImGuiContextHookType_PendingRemoval_ }ImGuiContextHookType;
|
||||
struct ImGuiContextHook
|
||||
@ -1967,7 +2036,6 @@ struct ImGuiContext
|
||||
bool WithinEndChild;
|
||||
bool GcCompactAll;
|
||||
bool TestEngineHookItems;
|
||||
ImGuiID TestEngineHookIdInfo;
|
||||
void* TestEngine;
|
||||
ImVector_ImGuiWindowPtr Windows;
|
||||
ImVector_ImGuiWindowPtr WindowsFocusOrder;
|
||||
@ -1984,6 +2052,7 @@ struct ImGuiContext
|
||||
ImGuiWindow* WheelingWindow;
|
||||
ImVec2 WheelingWindowRefMousePos;
|
||||
float WheelingWindowTimer;
|
||||
ImGuiID DebugHookIdInfo;
|
||||
ImGuiID HoveredId;
|
||||
ImGuiID HoveredIdPreviousFrame;
|
||||
bool HoveredIdAllowOverlap;
|
||||
@ -2027,6 +2096,7 @@ struct ImGuiContext
|
||||
ImVector_ImGuiGroupData GroupStack;
|
||||
ImVector_ImGuiPopupData OpenPopupStack;
|
||||
ImVector_ImGuiPopupData BeginPopupStack;
|
||||
int BeginMenuCount;
|
||||
ImVector_ImGuiViewportPPtr Viewports;
|
||||
float CurrentDpiScale;
|
||||
ImGuiViewportP* CurrentViewport;
|
||||
@ -2041,17 +2111,15 @@ struct ImGuiContext
|
||||
ImGuiID NavActivateId;
|
||||
ImGuiID NavActivateDownId;
|
||||
ImGuiID NavActivatePressedId;
|
||||
ImGuiID NavInputId;
|
||||
ImGuiID NavJustTabbedId;
|
||||
ImGuiID NavActivateInputId;
|
||||
ImGuiActivateFlags NavActivateFlags;
|
||||
ImGuiID NavJustMovedToId;
|
||||
ImGuiID NavJustMovedToFocusScopeId;
|
||||
ImGuiKeyModFlags NavJustMovedToKeyMods;
|
||||
ImGuiID NavNextActivateId;
|
||||
ImGuiActivateFlags NavNextActivateFlags;
|
||||
ImGuiInputSource NavInputSource;
|
||||
ImRect NavScoringRect;
|
||||
int NavScoringCount;
|
||||
ImGuiNavLayer NavLayer;
|
||||
int NavIdTabCounter;
|
||||
bool NavIdIsAlive;
|
||||
bool NavMousePosDirty;
|
||||
bool NavDisableHighlight;
|
||||
@ -2061,28 +2129,30 @@ struct ImGuiContext
|
||||
bool NavInitRequestFromMove;
|
||||
ImGuiID NavInitResultId;
|
||||
ImRect NavInitResultRectRel;
|
||||
bool NavMoveRequest;
|
||||
bool NavMoveRequestForwardToNextFrame;
|
||||
ImGuiNavMoveFlags NavMoveRequestFlags;
|
||||
ImGuiKeyModFlags NavMoveRequestKeyMods;
|
||||
ImGuiDir NavMoveDir, NavMoveDirLast;
|
||||
bool NavMoveSubmitted;
|
||||
bool NavMoveScoringItems;
|
||||
bool NavMoveForwardToNextFrame;
|
||||
ImGuiNavMoveFlags NavMoveFlags;
|
||||
ImGuiScrollFlags NavMoveScrollFlags;
|
||||
ImGuiKeyModFlags NavMoveKeyMods;
|
||||
ImGuiDir NavMoveDir;
|
||||
ImGuiDir NavMoveDirForDebug;
|
||||
ImGuiDir NavMoveClipDir;
|
||||
ImRect NavScoringRect;
|
||||
ImRect NavScoringNoClipRect;
|
||||
int NavScoringDebugCount;
|
||||
int NavTabbingDir;
|
||||
int NavTabbingCounter;
|
||||
ImGuiNavItemData NavMoveResultLocal;
|
||||
ImGuiNavItemData NavMoveResultLocalVisibleSet;
|
||||
ImGuiNavItemData NavMoveResultLocalVisible;
|
||||
ImGuiNavItemData NavMoveResultOther;
|
||||
ImGuiNavItemData NavTabbingResultFirst;
|
||||
ImGuiWindow* NavWindowingTarget;
|
||||
ImGuiWindow* NavWindowingTargetAnim;
|
||||
ImGuiWindow* NavWindowingListWindow;
|
||||
float NavWindowingTimer;
|
||||
float NavWindowingHighlightAlpha;
|
||||
bool NavWindowingToggleLayer;
|
||||
ImGuiWindow* TabFocusRequestCurrWindow;
|
||||
ImGuiWindow* TabFocusRequestNextWindow;
|
||||
int TabFocusRequestCurrCounterRegular;
|
||||
int TabFocusRequestCurrCounterTabStop;
|
||||
int TabFocusRequestNextCounterRegular;
|
||||
int TabFocusRequestNextCounterTabStop;
|
||||
bool TabFocusPressed;
|
||||
float DimBgRatio;
|
||||
ImGuiMouseCursor MouseCursor;
|
||||
bool DragDropActive;
|
||||
@ -2102,24 +2172,26 @@ struct ImGuiContext
|
||||
ImGuiID DragDropHoldJustPressedId;
|
||||
ImVector_unsigned_char DragDropPayloadBufHeap;
|
||||
unsigned char DragDropPayloadBufLocal[16];
|
||||
int ClipperTempDataStacked;
|
||||
ImVector_ImGuiListClipperData ClipperTempData;
|
||||
ImGuiTable* CurrentTable;
|
||||
int CurrentTableStackIdx;
|
||||
int TablesTempDataStacked;
|
||||
ImVector_ImGuiTableTempData TablesTempData;
|
||||
ImPool_ImGuiTable Tables;
|
||||
ImVector_ImGuiTableTempData TablesTempDataStack;
|
||||
ImVector_float TablesLastTimeActive;
|
||||
ImVector_ImDrawChannel DrawChannelsTempMergeBuffer;
|
||||
ImGuiTabBar* CurrentTabBar;
|
||||
ImPool_ImGuiTabBar TabBars;
|
||||
ImVector_ImGuiPtrOrIndex CurrentTabBarStack;
|
||||
ImVector_ImGuiShrinkWidthItem ShrinkWidthBuffer;
|
||||
ImVec2 LastValidMousePos;
|
||||
ImVec2 MouseLastValidPos;
|
||||
ImGuiInputTextState InputTextState;
|
||||
ImFont InputTextPasswordFont;
|
||||
ImGuiID TempInputId;
|
||||
ImGuiColorEditFlags ColorEditOptions;
|
||||
float ColorEditLastHue;
|
||||
float ColorEditLastSat;
|
||||
float ColorEditLastColor[3];
|
||||
ImU32 ColorEditLastColor;
|
||||
ImVec4 ColorPickerRef;
|
||||
ImGuiComboPreviewData ComboPreviewData;
|
||||
float SliderCurrentAccum;
|
||||
@ -2127,9 +2199,10 @@ struct ImGuiContext
|
||||
bool DragCurrentAccumDirty;
|
||||
float DragCurrentAccum;
|
||||
float DragSpeedDefaultRatio;
|
||||
float DisabledAlphaBackup;
|
||||
float ScrollbarClickDeltaToGrabCenter;
|
||||
int TooltipOverrideCount;
|
||||
float DisabledAlphaBackup;
|
||||
short DisabledStackSize;
|
||||
short TooltipOverrideCount;
|
||||
float TooltipSlowDelay;
|
||||
ImVector_char ClipboardHandlerData;
|
||||
ImVector_ImGuiID MenusIdSubmittedThisFrame;
|
||||
@ -2160,6 +2233,7 @@ struct ImGuiContext
|
||||
bool DebugItemPickerActive;
|
||||
ImGuiID DebugItemPickerBreakId;
|
||||
ImGuiMetricsConfig DebugMetricsConfig;
|
||||
ImGuiStackTool DebugStackTool;
|
||||
float FramerateSecPerFrame[120];
|
||||
int FramerateSecPerFrameIdx;
|
||||
int FramerateSecPerFrameCount;
|
||||
@ -2183,6 +2257,7 @@ struct ImGuiWindowTempData
|
||||
ImVec1 Indent;
|
||||
ImVec1 ColumnsOffset;
|
||||
ImVec1 GroupOffset;
|
||||
ImVec2 CursorStartPosLossyness;
|
||||
ImGuiNavLayer NavLayerCurrent;
|
||||
short NavLayersActiveMask;
|
||||
short NavLayersActiveMaskNext;
|
||||
@ -2200,13 +2275,10 @@ struct ImGuiWindowTempData
|
||||
int CurrentTableIdx;
|
||||
ImGuiLayoutType LayoutType;
|
||||
ImGuiLayoutType ParentLayoutType;
|
||||
int FocusCounterRegular;
|
||||
int FocusCounterTabStop;
|
||||
float ItemWidth;
|
||||
float TextWrapPos;
|
||||
ImVector_float ItemWidthStack;
|
||||
ImVector_float TextWrapPosStack;
|
||||
ImGuiStackSizes StackSizesOnBegin;
|
||||
};
|
||||
struct ImGuiWindow
|
||||
{
|
||||
@ -2247,6 +2319,7 @@ struct ImGuiWindow
|
||||
bool Appearing;
|
||||
bool Hidden;
|
||||
bool IsFallbackWindow;
|
||||
bool IsExplicitChild;
|
||||
bool HasCloseButton;
|
||||
signed char ResizeBorderHeld;
|
||||
short BeginCount;
|
||||
@ -2291,7 +2364,9 @@ struct ImGuiWindow
|
||||
ImDrawList* DrawList;
|
||||
ImDrawList DrawListInst;
|
||||
ImGuiWindow* ParentWindow;
|
||||
ImGuiWindow* ParentWindowInBeginStack;
|
||||
ImGuiWindow* RootWindow;
|
||||
ImGuiWindow* RootWindowPopupTree;
|
||||
ImGuiWindow* RootWindowDockTree;
|
||||
ImGuiWindow* RootWindowForTitleBarHighlight;
|
||||
ImGuiWindow* RootWindowForNav;
|
||||
@ -2606,6 +2681,8 @@ typedef ImVector<ImGuiDockRequest> ImVector_ImGuiDockRequest;
|
||||
typedef ImVector<ImGuiGroupData> ImVector_ImGuiGroupData;
|
||||
typedef ImVector<ImGuiID> ImVector_ImGuiID;
|
||||
typedef ImVector<ImGuiItemFlags> ImVector_ImGuiItemFlags;
|
||||
typedef ImVector<ImGuiListClipperData> ImVector_ImGuiListClipperData;
|
||||
typedef ImVector<ImGuiListClipperRange> ImVector_ImGuiListClipperRange;
|
||||
typedef ImVector<ImGuiOldColumnData> ImVector_ImGuiOldColumnData;
|
||||
typedef ImVector<ImGuiOldColumns> ImVector_ImGuiOldColumns;
|
||||
typedef ImVector<ImGuiPlatformMonitor> ImVector_ImGuiPlatformMonitor;
|
||||
@ -2613,6 +2690,7 @@ typedef ImVector<ImGuiPopupData> ImVector_ImGuiPopupData;
|
||||
typedef ImVector<ImGuiPtrOrIndex> ImVector_ImGuiPtrOrIndex;
|
||||
typedef ImVector<ImGuiSettingsHandler> ImVector_ImGuiSettingsHandler;
|
||||
typedef ImVector<ImGuiShrinkWidthItem> ImVector_ImGuiShrinkWidthItem;
|
||||
typedef ImVector<ImGuiStackLevelInfo> ImVector_ImGuiStackLevelInfo;
|
||||
typedef ImVector<ImGuiStoragePair> ImVector_ImGuiStoragePair;
|
||||
typedef ImVector<ImGuiStyleMod> ImVector_ImGuiStyleMod;
|
||||
typedef ImVector<ImGuiTabItem> ImVector_ImGuiTabItem;
|
||||
@ -2651,6 +2729,7 @@ CIMGUI_API void igRender(void);
|
||||
CIMGUI_API ImDrawData* igGetDrawData(void);
|
||||
CIMGUI_API void igShowDemoWindow(bool* p_open);
|
||||
CIMGUI_API void igShowMetricsWindow(bool* p_open);
|
||||
CIMGUI_API void igShowStackToolWindow(bool* p_open);
|
||||
CIMGUI_API void igShowAboutWindow(bool* p_open);
|
||||
CIMGUI_API void igShowStyleEditor(ImGuiStyle* ref);
|
||||
CIMGUI_API bool igShowStyleSelector(const char* label);
|
||||
@ -2980,7 +3059,6 @@ CIMGUI_API ImDrawListSharedData* igGetDrawListSharedData(void);
|
||||
CIMGUI_API const char* igGetStyleColorName(ImGuiCol idx);
|
||||
CIMGUI_API void igSetStateStorage(ImGuiStorage* storage);
|
||||
CIMGUI_API ImGuiStorage* igGetStateStorage(void);
|
||||
CIMGUI_API void igCalcListClipping(int items_count,float items_height,int* out_items_display_start,int* out_items_display_end);
|
||||
CIMGUI_API bool igBeginChildFrame(ImGuiID id,const ImVec2 size,ImGuiWindowFlags flags);
|
||||
CIMGUI_API void igEndChildFrame(void);
|
||||
CIMGUI_API void igCalcTextSize(ImVec2 *pOut,const char* text,const char* text_end,bool hide_text_after_double_hash,float wrap_width);
|
||||
@ -2998,6 +3076,7 @@ CIMGUI_API bool igIsMouseDown(ImGuiMouseButton button);
|
||||
CIMGUI_API bool igIsMouseClicked(ImGuiMouseButton button,bool repeat);
|
||||
CIMGUI_API bool igIsMouseReleased(ImGuiMouseButton button);
|
||||
CIMGUI_API bool igIsMouseDoubleClicked(ImGuiMouseButton button);
|
||||
CIMGUI_API int igGetMouseClickedCount(ImGuiMouseButton button);
|
||||
CIMGUI_API bool igIsMouseHoveringRect(const ImVec2 r_min,const ImVec2 r_max,bool clip);
|
||||
CIMGUI_API bool igIsMousePosValid(const ImVec2* mouse_pos);
|
||||
CIMGUI_API bool igIsAnyMouseDown(void);
|
||||
@ -3105,6 +3184,7 @@ CIMGUI_API void ImGuiListClipper_destroy(ImGuiListClipper* self);
|
||||
CIMGUI_API void ImGuiListClipper_Begin(ImGuiListClipper* self,int items_count,float items_height);
|
||||
CIMGUI_API void ImGuiListClipper_End(ImGuiListClipper* self);
|
||||
CIMGUI_API bool ImGuiListClipper_Step(ImGuiListClipper* self);
|
||||
CIMGUI_API void ImGuiListClipper_ForceDisplayRangeByIndices(ImGuiListClipper* self,int item_min,int item_max);
|
||||
CIMGUI_API ImColor* ImColor_ImColorNil(void);
|
||||
CIMGUI_API void ImColor_destroy(ImColor* self);
|
||||
CIMGUI_API ImColor* ImColor_ImColorInt(int r,int g,int b,int a);
|
||||
@ -3264,6 +3344,7 @@ CIMGUI_API ImGuiPlatformMonitor* ImGuiPlatformMonitor_ImGuiPlatformMonitor(void)
|
||||
CIMGUI_API void ImGuiPlatformMonitor_destroy(ImGuiPlatformMonitor* self);
|
||||
CIMGUI_API ImGuiID igImHashData(const void* data,size_t data_size,ImU32 seed);
|
||||
CIMGUI_API ImGuiID igImHashStr(const char* data,size_t data_size,ImU32 seed);
|
||||
CIMGUI_API void igImQsort(void* base,size_t count,size_t size_of_element,int(*compare_func)(void const*,void const*));
|
||||
CIMGUI_API ImU32 igImAlphaBlendColors(ImU32 col_a,ImU32 col_b);
|
||||
CIMGUI_API bool igImIsPowerOfTwoInt(int v);
|
||||
CIMGUI_API bool igImIsPowerOfTwoU64(ImU64 v);
|
||||
@ -3330,6 +3411,7 @@ CIMGUI_API float igImDot(const ImVec2 a,const ImVec2 b);
|
||||
CIMGUI_API void igImRotate(ImVec2 *pOut,const ImVec2 v,float cos_a,float sin_a);
|
||||
CIMGUI_API float igImLinearSweep(float current,float target,float speed);
|
||||
CIMGUI_API void igImMul(ImVec2 *pOut,const ImVec2 lhs,const ImVec2 rhs);
|
||||
CIMGUI_API bool igImIsFloatAboveGuaranteedIntegerPrecision(float f);
|
||||
CIMGUI_API void igImBezierCubicCalc(ImVec2 *pOut,const ImVec2 p1,const ImVec2 p2,const ImVec2 p3,const ImVec2 p4,float t);
|
||||
CIMGUI_API void igImBezierCubicClosestPoint(ImVec2 *pOut,const ImVec2 p1,const ImVec2 p2,const ImVec2 p3,const ImVec2 p4,const ImVec2 p,int num_segments);
|
||||
CIMGUI_API void igImBezierCubicClosestPointCasteljau(ImVec2 *pOut,const ImVec2 p1,const ImVec2 p2,const ImVec2 p3,const ImVec2 p4,const ImVec2 p,float tess_tol);
|
||||
@ -3428,9 +3510,18 @@ CIMGUI_API void ImGuiNextItemData_destroy(ImGuiNextItemData* self);
|
||||
CIMGUI_API void ImGuiNextItemData_ClearFlags(ImGuiNextItemData* self);
|
||||
CIMGUI_API ImGuiLastItemData* ImGuiLastItemData_ImGuiLastItemData(void);
|
||||
CIMGUI_API void ImGuiLastItemData_destroy(ImGuiLastItemData* self);
|
||||
CIMGUI_API ImGuiStackSizes* ImGuiStackSizes_ImGuiStackSizes(void);
|
||||
CIMGUI_API void ImGuiStackSizes_destroy(ImGuiStackSizes* self);
|
||||
CIMGUI_API void ImGuiStackSizes_SetToCurrentState(ImGuiStackSizes* self);
|
||||
CIMGUI_API void ImGuiStackSizes_CompareWithCurrentState(ImGuiStackSizes* self);
|
||||
CIMGUI_API ImGuiPtrOrIndex* ImGuiPtrOrIndex_ImGuiPtrOrIndexPtr(void* ptr);
|
||||
CIMGUI_API void ImGuiPtrOrIndex_destroy(ImGuiPtrOrIndex* self);
|
||||
CIMGUI_API ImGuiPtrOrIndex* ImGuiPtrOrIndex_ImGuiPtrOrIndexInt(int index);
|
||||
CIMGUI_API ImGuiListClipperRange ImGuiListClipperRange_FromIndices(int min,int max);
|
||||
CIMGUI_API ImGuiListClipperRange ImGuiListClipperRange_FromPositions(float y1,float y2,int off_min,int off_max);
|
||||
CIMGUI_API ImGuiListClipperData* ImGuiListClipperData_ImGuiListClipperData(void);
|
||||
CIMGUI_API void ImGuiListClipperData_destroy(ImGuiListClipperData* self);
|
||||
CIMGUI_API void ImGuiListClipperData_Reset(ImGuiListClipperData* self,ImGuiListClipper* clipper);
|
||||
CIMGUI_API ImGuiNavItemData* ImGuiNavItemData_ImGuiNavItemData(void);
|
||||
CIMGUI_API void ImGuiNavItemData_destroy(ImGuiNavItemData* self);
|
||||
CIMGUI_API void ImGuiNavItemData_Clear(ImGuiNavItemData* self);
|
||||
@ -3470,10 +3561,10 @@ CIMGUI_API ImGuiSettingsHandler* ImGuiSettingsHandler_ImGuiSettingsHandler(void)
|
||||
CIMGUI_API void ImGuiSettingsHandler_destroy(ImGuiSettingsHandler* self);
|
||||
CIMGUI_API ImGuiMetricsConfig* ImGuiMetricsConfig_ImGuiMetricsConfig(void);
|
||||
CIMGUI_API void ImGuiMetricsConfig_destroy(ImGuiMetricsConfig* self);
|
||||
CIMGUI_API ImGuiStackSizes* ImGuiStackSizes_ImGuiStackSizes(void);
|
||||
CIMGUI_API void ImGuiStackSizes_destroy(ImGuiStackSizes* self);
|
||||
CIMGUI_API void ImGuiStackSizes_SetToCurrentState(ImGuiStackSizes* self);
|
||||
CIMGUI_API void ImGuiStackSizes_CompareWithCurrentState(ImGuiStackSizes* self);
|
||||
CIMGUI_API ImGuiStackLevelInfo* ImGuiStackLevelInfo_ImGuiStackLevelInfo(void);
|
||||
CIMGUI_API void ImGuiStackLevelInfo_destroy(ImGuiStackLevelInfo* self);
|
||||
CIMGUI_API ImGuiStackTool* ImGuiStackTool_ImGuiStackTool(void);
|
||||
CIMGUI_API void ImGuiStackTool_destroy(ImGuiStackTool* self);
|
||||
CIMGUI_API ImGuiContextHook* ImGuiContextHook_ImGuiContextHook(void);
|
||||
CIMGUI_API void ImGuiContextHook_destroy(ImGuiContextHook* self);
|
||||
CIMGUI_API ImGuiContext* ImGuiContext_ImGuiContext(ImFontAtlas* shared_font_atlas);
|
||||
@ -3516,18 +3607,24 @@ CIMGUI_API ImGuiWindow* igFindWindowByID(ImGuiID id);
|
||||
CIMGUI_API ImGuiWindow* igFindWindowByName(const char* name);
|
||||
CIMGUI_API void igUpdateWindowParentAndRootLinks(ImGuiWindow* window,ImGuiWindowFlags flags,ImGuiWindow* parent_window);
|
||||
CIMGUI_API void igCalcWindowNextAutoFitSize(ImVec2 *pOut,ImGuiWindow* window);
|
||||
CIMGUI_API bool igIsWindowChildOf(ImGuiWindow* window,ImGuiWindow* potential_parent);
|
||||
CIMGUI_API bool igIsWindowChildOf(ImGuiWindow* window,ImGuiWindow* potential_parent,bool popup_hierarchy,bool dock_hierarchy);
|
||||
CIMGUI_API bool igIsWindowWithinBeginStackOf(ImGuiWindow* window,ImGuiWindow* potential_parent);
|
||||
CIMGUI_API bool igIsWindowAbove(ImGuiWindow* potential_above,ImGuiWindow* potential_below);
|
||||
CIMGUI_API bool igIsWindowNavFocusable(ImGuiWindow* window);
|
||||
CIMGUI_API void igSetWindowPosWindowPtr(ImGuiWindow* window,const ImVec2 pos,ImGuiCond cond);
|
||||
CIMGUI_API void igSetWindowSizeWindowPtr(ImGuiWindow* window,const ImVec2 size,ImGuiCond cond);
|
||||
CIMGUI_API void igSetWindowCollapsedWindowPtr(ImGuiWindow* window,bool collapsed,ImGuiCond cond);
|
||||
CIMGUI_API void igSetWindowHitTestHole(ImGuiWindow* window,const ImVec2 pos,const ImVec2 size);
|
||||
CIMGUI_API void igWindowRectAbsToRel(ImRect *pOut,ImGuiWindow* window,const ImRect r);
|
||||
CIMGUI_API void igWindowRectRelToAbs(ImRect *pOut,ImGuiWindow* window,const ImRect r);
|
||||
CIMGUI_API void igFocusWindow(ImGuiWindow* window);
|
||||
CIMGUI_API void igFocusTopMostWindowUnderOne(ImGuiWindow* under_this_window,ImGuiWindow* ignore_window);
|
||||
CIMGUI_API void igBringWindowToFocusFront(ImGuiWindow* window);
|
||||
CIMGUI_API void igBringWindowToDisplayFront(ImGuiWindow* window);
|
||||
CIMGUI_API void igBringWindowToDisplayBack(ImGuiWindow* window);
|
||||
CIMGUI_API void igBringWindowToDisplayBehind(ImGuiWindow* window,ImGuiWindow* above_window);
|
||||
CIMGUI_API int igFindWindowDisplayIndex(ImGuiWindow* window);
|
||||
CIMGUI_API ImGuiWindow* igFindBottomMostVisibleWindowWithinBeginStack(ImGuiWindow* window);
|
||||
CIMGUI_API void igSetCurrentFont(ImFont* font);
|
||||
CIMGUI_API ImFont* igGetDefaultFont(void);
|
||||
CIMGUI_API ImDrawList* igGetForegroundDrawListWindowPtr(ImGuiWindow* window);
|
||||
@ -3558,7 +3655,10 @@ CIMGUI_API void igSetScrollXWindowPtr(ImGuiWindow* window,float scroll_x);
|
||||
CIMGUI_API void igSetScrollYWindowPtr(ImGuiWindow* window,float scroll_y);
|
||||
CIMGUI_API void igSetScrollFromPosXWindowPtr(ImGuiWindow* window,float local_x,float center_x_ratio);
|
||||
CIMGUI_API void igSetScrollFromPosYWindowPtr(ImGuiWindow* window,float local_y,float center_y_ratio);
|
||||
CIMGUI_API void igScrollToBringRectIntoView(ImVec2 *pOut,ImGuiWindow* window,const ImRect item_rect);
|
||||
CIMGUI_API void igScrollToItem(ImGuiScrollFlags flags);
|
||||
CIMGUI_API void igScrollToRect(ImGuiWindow* window,const ImRect rect,ImGuiScrollFlags flags);
|
||||
CIMGUI_API void igScrollToRectEx(ImVec2 *pOut,ImGuiWindow* window,const ImRect rect,ImGuiScrollFlags flags);
|
||||
CIMGUI_API void igScrollToBringRectIntoView(ImGuiWindow* window,const ImRect rect);
|
||||
CIMGUI_API ImGuiID igGetItemID(void);
|
||||
CIMGUI_API ImGuiItemStatusFlags igGetItemStatusFlags(void);
|
||||
CIMGUI_API ImGuiItemFlags igGetItemFlags(void);
|
||||
@ -3575,10 +3675,9 @@ CIMGUI_API void igPushOverrideID(ImGuiID id);
|
||||
CIMGUI_API ImGuiID igGetIDWithSeed(const char* str_id_begin,const char* str_id_end,ImGuiID seed);
|
||||
CIMGUI_API void igItemSizeVec2(const ImVec2 size,float text_baseline_y);
|
||||
CIMGUI_API void igItemSizeRect(const ImRect bb,float text_baseline_y);
|
||||
CIMGUI_API bool igItemAdd(const ImRect bb,ImGuiID id,const ImRect* nav_bb,ImGuiItemAddFlags flags);
|
||||
CIMGUI_API bool igItemAdd(const ImRect bb,ImGuiID id,const ImRect* nav_bb,ImGuiItemFlags extra_flags);
|
||||
CIMGUI_API bool igItemHoverable(const ImRect bb,ImGuiID id);
|
||||
CIMGUI_API void igItemFocusable(ImGuiWindow* window,ImGuiID id);
|
||||
CIMGUI_API bool igIsClippedEx(const ImRect bb,ImGuiID id,bool clip_even_when_logged);
|
||||
CIMGUI_API bool igIsClippedEx(const ImRect bb,ImGuiID id);
|
||||
CIMGUI_API void igSetLastItemData(ImGuiID item_id,ImGuiItemFlags in_flags,ImGuiItemStatusFlags status_flags,const ImRect item_rect);
|
||||
CIMGUI_API void igCalcItemSize(ImVec2 *pOut,ImVec2 size,float default_w,float default_h);
|
||||
CIMGUI_API float igCalcWrapWidthForPos(const ImVec2 pos,float wrap_pos_x);
|
||||
@ -3596,11 +3695,13 @@ CIMGUI_API bool igBeginChildEx(const char* name,ImGuiID id,const ImVec2 size_arg
|
||||
CIMGUI_API void igOpenPopupEx(ImGuiID id,ImGuiPopupFlags popup_flags);
|
||||
CIMGUI_API void igClosePopupToLevel(int remaining,bool restore_focus_to_window_under_popup);
|
||||
CIMGUI_API void igClosePopupsOverWindow(ImGuiWindow* ref_window,bool restore_focus_to_window_under_popup);
|
||||
CIMGUI_API void igClosePopupsExceptModals(void);
|
||||
CIMGUI_API bool igIsPopupOpenID(ImGuiID id,ImGuiPopupFlags popup_flags);
|
||||
CIMGUI_API bool igBeginPopupEx(ImGuiID id,ImGuiWindowFlags extra_flags);
|
||||
CIMGUI_API void igBeginTooltipEx(ImGuiWindowFlags extra_flags,ImGuiTooltipFlags tooltip_flags);
|
||||
CIMGUI_API void igBeginTooltipEx(ImGuiTooltipFlags tooltip_flags,ImGuiWindowFlags extra_window_flags);
|
||||
CIMGUI_API void igGetPopupAllowedExtentRect(ImRect *pOut,ImGuiWindow* window);
|
||||
CIMGUI_API ImGuiWindow* igGetTopMostPopupModal(void);
|
||||
CIMGUI_API ImGuiWindow* igGetTopMostAndVisiblePopupModal(void);
|
||||
CIMGUI_API void igFindBestWindowPosForPopup(ImVec2 *pOut,ImGuiWindow* window);
|
||||
CIMGUI_API void igFindBestWindowPosForPopupEx(ImVec2 *pOut,const ImVec2 ref_pos,const ImVec2 size,ImGuiDir* last_dir,const ImRect r_outer,const ImRect r_avoid,ImGuiPopupPositionPolicy policy);
|
||||
CIMGUI_API bool igBeginViewportSideBar(const char* name,ImGuiViewport* viewport,ImGuiDir dir,float size,ImGuiWindowFlags window_flags);
|
||||
@ -3610,8 +3711,11 @@ CIMGUI_API bool igBeginComboPopup(ImGuiID popup_id,const ImRect bb,ImGuiComboFla
|
||||
CIMGUI_API bool igBeginComboPreview(void);
|
||||
CIMGUI_API void igEndComboPreview(void);
|
||||
CIMGUI_API void igNavInitWindow(ImGuiWindow* window,bool force_reinit);
|
||||
CIMGUI_API void igNavInitRequestApplyResult(void);
|
||||
CIMGUI_API bool igNavMoveRequestButNoResultYet(void);
|
||||
CIMGUI_API void igNavMoveRequestForward(ImGuiDir move_dir,ImGuiDir clip_dir,ImGuiNavMoveFlags move_flags);
|
||||
CIMGUI_API void igNavMoveRequestSubmit(ImGuiDir move_dir,ImGuiDir clip_dir,ImGuiNavMoveFlags move_flags,ImGuiScrollFlags scroll_flags);
|
||||
CIMGUI_API void igNavMoveRequestForward(ImGuiDir move_dir,ImGuiDir clip_dir,ImGuiNavMoveFlags move_flags,ImGuiScrollFlags scroll_flags);
|
||||
CIMGUI_API void igNavMoveRequestResolveWithLastItem(ImGuiNavItemData* result);
|
||||
CIMGUI_API void igNavMoveRequestCancel(void);
|
||||
CIMGUI_API void igNavMoveRequestApplyResult(void);
|
||||
CIMGUI_API void igNavMoveRequestTryWrapping(ImGuiWindow* window,ImGuiNavMoveFlags move_flags);
|
||||
@ -3640,6 +3744,7 @@ CIMGUI_API void igDockContextClearNodes(ImGuiContext* ctx,ImGuiID root_id,bool c
|
||||
CIMGUI_API void igDockContextRebuildNodes(ImGuiContext* ctx);
|
||||
CIMGUI_API void igDockContextNewFrameUpdateUndocking(ImGuiContext* ctx);
|
||||
CIMGUI_API void igDockContextNewFrameUpdateDocking(ImGuiContext* ctx);
|
||||
CIMGUI_API void igDockContextEndFrame(ImGuiContext* ctx);
|
||||
CIMGUI_API ImGuiID igDockContextGenNodeID(ImGuiContext* ctx);
|
||||
CIMGUI_API void igDockContextQueueDock(ImGuiContext* ctx,ImGuiWindow* target,ImGuiDockNode* target_node,ImGuiWindow* payload,ImGuiDir split_dir,float split_ratio,bool split_outer);
|
||||
CIMGUI_API void igDockContextQueueUndockWindow(ImGuiContext* ctx,ImGuiWindow* window);
|
||||
@ -3648,6 +3753,7 @@ CIMGUI_API bool igDockContextCalcDropPosForDocking(ImGuiWindow* target,ImGuiDock
|
||||
CIMGUI_API bool igDockNodeBeginAmendTabBar(ImGuiDockNode* node);
|
||||
CIMGUI_API void igDockNodeEndAmendTabBar(void);
|
||||
CIMGUI_API ImGuiDockNode* igDockNodeGetRootNode(ImGuiDockNode* node);
|
||||
CIMGUI_API bool igDockNodeIsInHierarchyOf(ImGuiDockNode* node,ImGuiDockNode* parent);
|
||||
CIMGUI_API int igDockNodeGetDepth(const ImGuiDockNode* node);
|
||||
CIMGUI_API ImGuiID igDockNodeGetWindowMenuButtonId(const ImGuiDockNode* node);
|
||||
CIMGUI_API ImGuiDockNode* igGetWindowDockNode(void);
|
||||
@ -3759,13 +3865,14 @@ CIMGUI_API void igRenderArrowPointingAt(ImDrawList* draw_list,ImVec2 pos,ImVec2
|
||||
CIMGUI_API void igRenderArrowDockMenu(ImDrawList* draw_list,ImVec2 p_min,float sz,ImU32 col);
|
||||
CIMGUI_API void igRenderRectFilledRangeH(ImDrawList* draw_list,const ImRect rect,ImU32 col,float x_start_norm,float x_end_norm,float rounding);
|
||||
CIMGUI_API void igRenderRectFilledWithHole(ImDrawList* draw_list,ImRect outer,ImRect inner,ImU32 col,float rounding);
|
||||
CIMGUI_API ImDrawFlags igCalcRoundingFlagsForRectInRect(const ImRect r_in,const ImRect r_outer,float threshold);
|
||||
CIMGUI_API void igTextEx(const char* text,const char* text_end,ImGuiTextFlags flags);
|
||||
CIMGUI_API bool igButtonEx(const char* label,const ImVec2 size_arg,ImGuiButtonFlags flags);
|
||||
CIMGUI_API bool igCloseButton(ImGuiID id,const ImVec2 pos);
|
||||
CIMGUI_API bool igCollapseButton(ImGuiID id,const ImVec2 pos,ImGuiDockNode* dock_node);
|
||||
CIMGUI_API bool igArrowButtonEx(const char* str_id,ImGuiDir dir,ImVec2 size_arg,ImGuiButtonFlags flags);
|
||||
CIMGUI_API void igScrollbar(ImGuiAxis axis);
|
||||
CIMGUI_API bool igScrollbarEx(const ImRect bb,ImGuiID id,ImGuiAxis axis,float* p_scroll_v,float avail_v,float contents_v,ImDrawFlags flags);
|
||||
CIMGUI_API bool igScrollbarEx(const ImRect bb,ImGuiID id,ImGuiAxis axis,ImS64* p_scroll_v,ImS64 avail_v,ImS64 contents_v,ImDrawFlags flags);
|
||||
CIMGUI_API bool igImageButtonEx(ImGuiID id,ImTextureID texture_id,const ImVec2 size,const ImVec2 uv0,const ImVec2 uv1,const ImVec2 padding,const ImVec4 bg_col,const ImVec4 tint_col);
|
||||
CIMGUI_API void igGetWindowScrollbarRect(ImRect *pOut,ImGuiWindow* window,ImGuiAxis axis);
|
||||
CIMGUI_API ImGuiID igGetWindowScrollbarID(ImGuiWindow* window,ImGuiAxis axis);
|
||||
@ -3777,7 +3884,7 @@ CIMGUI_API bool igCheckboxFlagsU64Ptr(const char* label,ImU64* flags,ImU64 flags
|
||||
CIMGUI_API bool igButtonBehavior(const ImRect bb,ImGuiID id,bool* out_hovered,bool* out_held,ImGuiButtonFlags flags);
|
||||
CIMGUI_API bool igDragBehavior(ImGuiID id,ImGuiDataType data_type,void* p_v,float v_speed,const void* p_min,const void* p_max,const char* format,ImGuiSliderFlags flags);
|
||||
CIMGUI_API bool igSliderBehavior(const ImRect bb,ImGuiID id,ImGuiDataType data_type,void* p_v,const void* p_min,const void* p_max,const char* format,ImGuiSliderFlags flags,ImRect* out_grab_bb);
|
||||
CIMGUI_API bool igSplitterBehavior(const ImRect bb,ImGuiID id,ImGuiAxis axis,float* size1,float* size2,float min_size1,float min_size2,float hover_extend,float hover_visibility_delay);
|
||||
CIMGUI_API bool igSplitterBehavior(const ImRect bb,ImGuiID id,ImGuiAxis axis,float* size1,float* size2,float min_size1,float min_size2,float hover_extend,float hover_visibility_delay,ImU32 bg_col);
|
||||
CIMGUI_API bool igTreeNodeBehavior(ImGuiID id,ImGuiTreeNodeFlags flags,const char* label,const char* label_end);
|
||||
CIMGUI_API bool igTreeNodeBehaviorIsOpen(ImGuiID id,ImGuiTreeNodeFlags flags);
|
||||
CIMGUI_API void igTreePushOverrideID(ImGuiID id);
|
||||
@ -3802,9 +3909,11 @@ CIMGUI_API void igGcCompactTransientMiscBuffers(void);
|
||||
CIMGUI_API void igGcCompactTransientWindowBuffers(ImGuiWindow* window);
|
||||
CIMGUI_API void igGcAwakeTransientWindowBuffers(ImGuiWindow* window);
|
||||
CIMGUI_API void igErrorCheckEndFrameRecover(ImGuiErrorLogCallback log_callback,void* user_data);
|
||||
CIMGUI_API void igErrorCheckEndWindowRecover(ImGuiErrorLogCallback log_callback,void* user_data);
|
||||
CIMGUI_API void igDebugDrawItemRect(ImU32 col);
|
||||
CIMGUI_API void igDebugStartItemPicker(void);
|
||||
CIMGUI_API void igShowFontAtlas(ImFontAtlas* atlas);
|
||||
CIMGUI_API void igDebugHookIdInfo(ImGuiID id,ImGuiDataType data_type,const void* data_id,const void* data_id_end);
|
||||
CIMGUI_API void igDebugNodeColumns(ImGuiOldColumns* columns);
|
||||
CIMGUI_API void igDebugNodeDockNode(ImGuiDockNode* node,const char* label);
|
||||
CIMGUI_API void igDebugNodeDrawList(ImGuiWindow* window,ImGuiViewportP* viewport,const ImDrawList* draw_list,const char* label);
|
||||
@ -3817,6 +3926,7 @@ CIMGUI_API void igDebugNodeTableSettings(ImGuiTableSettings* settings);
|
||||
CIMGUI_API void igDebugNodeWindow(ImGuiWindow* window,const char* label);
|
||||
CIMGUI_API void igDebugNodeWindowSettings(ImGuiWindowSettings* settings);
|
||||
CIMGUI_API void igDebugNodeWindowsList(ImVector_ImGuiWindowPtr* windows,const char* label);
|
||||
CIMGUI_API void igDebugNodeWindowsListByBeginStackParent(ImGuiWindow** windows,int windows_size,ImGuiWindow* parent_in_begin_stack);
|
||||
CIMGUI_API void igDebugNodeViewport(ImGuiViewportP* viewport);
|
||||
CIMGUI_API void igDebugRenderViewportThumbnail(ImDrawList* draw_list,ImGuiViewportP* viewport,const ImRect bb);
|
||||
CIMGUI_API const ImFontBuilderIO* igImFontAtlasGetBuilderForStbTruetype(void);
|
||||
|
||||
3427
imgui-sys/third-party/imgui-docking/definitions.json
vendored
3427
imgui-sys/third-party/imgui-docking/definitions.json
vendored
File diff suppressed because it is too large
Load Diff
3329
imgui-sys/third-party/imgui-docking/definitions.lua
vendored
3329
imgui-sys/third-party/imgui-docking/definitions.lua
vendored
File diff suppressed because it is too large
Load Diff
@ -33,7 +33,7 @@
|
||||
// It is very strongly recommended to NOT disable the demo windows during development. Please read comments in imgui_demo.cpp.
|
||||
//#define IMGUI_DISABLE // Disable everything: all headers and source files will be empty.
|
||||
//#define IMGUI_DISABLE_DEMO_WINDOWS // Disable demo windows: ShowDemoWindow()/ShowStyleEditor() will be empty. Not recommended.
|
||||
//#define IMGUI_DISABLE_METRICS_WINDOW // Disable metrics/debugger window: ShowMetricsWindow() will be empty.
|
||||
//#define IMGUI_DISABLE_METRICS_WINDOW // Disable metrics/debugger and other debug tools: ShowMetricsWindow() and ShowStackToolWindow() will be empty.
|
||||
|
||||
//---- Don't implement some functions to reduce linkage requirements.
|
||||
//#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS // [Win32] Don't implement default clipboard handler. Won't use and link with OpenClipboard/GetClipboardData/CloseClipboard etc. (user32.lib/.a, kernel32.lib/.a)
|
||||
|
||||
2511
imgui-sys/third-party/imgui-docking/imgui/imgui.cpp
vendored
2511
imgui-sys/third-party/imgui-docking/imgui/imgui.cpp
vendored
File diff suppressed because it is too large
Load Diff
104
imgui-sys/third-party/imgui-docking/imgui/imgui.h
vendored
104
imgui-sys/third-party/imgui-docking/imgui/imgui.h
vendored
@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.85 WIP
|
||||
// dear imgui, v1.86
|
||||
// (headers)
|
||||
|
||||
// Help:
|
||||
@ -64,8 +64,8 @@ Index of this file:
|
||||
|
||||
// Version
|
||||
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals. Work in progress versions typically starts at XYY99 then bounce up to XYY00, XYY01 etc. when release tagging happens)
|
||||
#define IMGUI_VERSION "1.85 WIP"
|
||||
#define IMGUI_VERSION_NUM 18410
|
||||
#define IMGUI_VERSION "1.86"
|
||||
#define IMGUI_VERSION_NUM 18600
|
||||
#define IMGUI_CHECKVERSION() ImGui::DebugCheckVersionAndDataLayout(IMGUI_VERSION, sizeof(ImGuiIO), sizeof(ImGuiStyle), sizeof(ImVec2), sizeof(ImVec4), sizeof(ImDrawVert), sizeof(ImDrawIdx))
|
||||
#define IMGUI_HAS_TABLE
|
||||
#define IMGUI_HAS_VIEWPORT // Viewport WIP branch
|
||||
@ -95,7 +95,7 @@ Index of this file:
|
||||
#endif
|
||||
|
||||
// Helper Macros - IM_FMTARGS, IM_FMTLIST: Apply printf-style warnings to our formatting functions.
|
||||
#if !defined(IMGUI_USE_STB_SPRINTF) && defined(__MINGW32__)
|
||||
#if !defined(IMGUI_USE_STB_SPRINTF) && defined(__MINGW32__) && !defined(__clang__)
|
||||
#define IM_FMTARGS(FMT) __attribute__((format(gnu_printf, FMT, FMT+1)))
|
||||
#define IM_FMTLIST(FMT) __attribute__((format(gnu_printf, FMT, 0)))
|
||||
#elif !defined(IMGUI_USE_STB_SPRINTF) && (defined(__clang__) || defined(__GNUC__))
|
||||
@ -155,7 +155,7 @@ struct ImGuiContext; // Dear ImGui context (opaque structure, unl
|
||||
struct ImGuiIO; // Main configuration and I/O between your application and ImGui
|
||||
struct ImGuiInputTextCallbackData; // Shared state of InputText() when using custom ImGuiInputTextCallback (rare/advanced use)
|
||||
struct ImGuiListClipper; // Helper to manually clip large list of items
|
||||
struct ImGuiOnceUponAFrame; // Helper for running a block of code not more than once a frame, used by IMGUI_ONCE_UPON_A_FRAME macro
|
||||
struct ImGuiOnceUponAFrame; // Helper for running a block of code not more than once a frame
|
||||
struct ImGuiPayload; // User data payload for drag and drop operations
|
||||
struct ImGuiPlatformIO; // Multi-viewport support: interface for Platform/Renderer backends + viewports to render
|
||||
struct ImGuiPlatformMonitor; // Multi-viewport support: user-provided bounds for each connected monitor/display. Used when positioning popups and tooltips to avoid them straddling monitors
|
||||
@ -314,6 +314,7 @@ namespace ImGui
|
||||
// Demo, Debug, Information
|
||||
IMGUI_API void ShowDemoWindow(bool* p_open = NULL); // create Demo window. demonstrate most ImGui features. call this to learn about the library! try to make it always available in your application!
|
||||
IMGUI_API void ShowMetricsWindow(bool* p_open = NULL); // create Metrics/Debugger window. display Dear ImGui internals: windows, draw commands, various internal state, etc.
|
||||
IMGUI_API void ShowStackToolWindow(bool* p_open = NULL); // create Stack Tool window. hover items with mouse to query information about the source of their unique ID.
|
||||
IMGUI_API void ShowAboutWindow(bool* p_open = NULL); // create About window. display Dear ImGui version, credits and build/system information.
|
||||
IMGUI_API void ShowStyleEditor(ImGuiStyle* ref = NULL); // add style editor block (not a window). you can pass in a reference ImGuiStyle structure to compare to, revert to and save to (else it uses the default style)
|
||||
IMGUI_API bool ShowStyleSelector(const char* label); // add style selector block (not a window), essentially a combo listing the default styles.
|
||||
@ -532,12 +533,12 @@ namespace ImGui
|
||||
IMGUI_API bool Combo(const char* label, int* current_item, bool(*items_getter)(void* data, int idx, const char** out_text), void* data, int items_count, int popup_max_height_in_items = -1);
|
||||
|
||||
// Widgets: Drag Sliders
|
||||
// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped and can go off-bounds.
|
||||
// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp.
|
||||
// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every functions, note that a 'float v[X]' function argument is the same as 'float* v', the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &myvector.x
|
||||
// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc.
|
||||
// - Format string may also be set to NULL or use the default format ("%f" or "%d").
|
||||
// - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For gamepad/keyboard navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision).
|
||||
// - Use v_min < v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits.
|
||||
// - Use v_min < v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits if ImGuiSliderFlags_AlwaysClamp is not used.
|
||||
// - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum.
|
||||
// - We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them.
|
||||
// - Legacy: Pre-1.78 there are DragXXX() function signatures that takes a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument.
|
||||
@ -556,7 +557,7 @@ namespace ImGui
|
||||
IMGUI_API bool DragScalarN(const char* label, ImGuiDataType data_type, void* p_data, int components, float v_speed = 1.0f, const void* p_min = NULL, const void* p_max = NULL, const char* format = NULL, ImGuiSliderFlags flags = 0);
|
||||
|
||||
// Widgets: Regular Sliders
|
||||
// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped and can go off-bounds.
|
||||
// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp.
|
||||
// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc.
|
||||
// - Format string may also be set to NULL or use the default format ("%f" or "%d").
|
||||
// - Legacy: Pre-1.78 there are SliderXXX() function signatures that takes a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument.
|
||||
@ -804,8 +805,9 @@ namespace ImGui
|
||||
// Docking
|
||||
// [BETA API] Enable with io.ConfigFlags |= ImGuiConfigFlags_DockingEnable.
|
||||
// Note: You can use most Docking facilities without calling any API. You DO NOT need to call DockSpace() to use Docking!
|
||||
// - Drag from window title bar or their tab to dock/undock. Hold SHIFT to disable docking.
|
||||
// - Drag from window title bar or their tab to dock/undock. Hold SHIFT to disable docking/undocking.
|
||||
// - Drag from window menu button (upper-left button) to undock an entire node (all windows).
|
||||
// - When io.ConfigDockingWithShift == true, you instead need to hold SHIFT to _enable_ docking/undocking.
|
||||
// About dockspaces:
|
||||
// - Use DockSpace() to create an explicit dock node _within_ an existing window. See Docking demo for details.
|
||||
// - Use DockSpaceOverViewport() to create an explicit dock node covering the screen or a specific viewport.
|
||||
@ -900,7 +902,6 @@ namespace ImGui
|
||||
IMGUI_API const char* GetStyleColorName(ImGuiCol idx); // get a string corresponding to the enum value (for display, saving, etc.).
|
||||
IMGUI_API void SetStateStorage(ImGuiStorage* storage); // replace current window storage with our own (if you want to manipulate it yourself, typically clear subsection of it)
|
||||
IMGUI_API ImGuiStorage* GetStateStorage();
|
||||
IMGUI_API void CalcListClipping(int items_count, float items_height, int* out_items_display_start, int* out_items_display_end); // calculate coarse clipping for large list of evenly sized items. Prefer using the ImGuiListClipper higher-level helper if you can.
|
||||
IMGUI_API bool BeginChildFrame(ImGuiID id, const ImVec2& size, ImGuiWindowFlags flags = 0); // helper to create a child window / scrolling region that looks like a normal widget frame
|
||||
IMGUI_API void EndChildFrame(); // always call EndChildFrame() regardless of BeginChildFrame() return values (which indicates a collapsed/clipped window)
|
||||
|
||||
@ -928,9 +929,10 @@ namespace ImGui
|
||||
// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle.
|
||||
// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold')
|
||||
IMGUI_API bool IsMouseDown(ImGuiMouseButton button); // is mouse button held?
|
||||
IMGUI_API bool IsMouseClicked(ImGuiMouseButton button, bool repeat = false); // did mouse button clicked? (went from !Down to Down)
|
||||
IMGUI_API bool IsMouseClicked(ImGuiMouseButton button, bool repeat = false); // did mouse button clicked? (went from !Down to Down). Same as GetMouseClickedCount() == 1.
|
||||
IMGUI_API bool IsMouseReleased(ImGuiMouseButton button); // did mouse button released? (went from Down to !Down)
|
||||
IMGUI_API bool IsMouseDoubleClicked(ImGuiMouseButton button); // did mouse button double-clicked? (note that a double-click will also report IsMouseClicked() == true)
|
||||
IMGUI_API bool IsMouseDoubleClicked(ImGuiMouseButton button); // did mouse button double-clicked? Same as GetMouseClickedCount() == 2. (note that a double-click will also report IsMouseClicked() == true)
|
||||
IMGUI_API int GetMouseClickedCount(ImGuiMouseButton button); // return the number of successive mouse-clicks at the time where a click happen (otherwise 0).
|
||||
IMGUI_API bool IsMouseHoveringRect(const ImVec2& r_min, const ImVec2& r_max, bool clip = true);// is mouse hovering given bounding rect (in screen space). clipped by current clipping settings, but disregarding of other consideration of focus/window ordering/popup-block.
|
||||
IMGUI_API bool IsMousePosValid(const ImVec2* mouse_pos = NULL); // by convention we use (-FLT_MAX,-FLT_MAX) to denote that there is no mouse available
|
||||
IMGUI_API bool IsAnyMouseDown(); // is any mouse button held?
|
||||
@ -995,7 +997,7 @@ enum ImGuiWindowFlags_
|
||||
ImGuiWindowFlags_NoMove = 1 << 2, // Disable user moving the window
|
||||
ImGuiWindowFlags_NoScrollbar = 1 << 3, // Disable scrollbars (window can still scroll with mouse or programmatically)
|
||||
ImGuiWindowFlags_NoScrollWithMouse = 1 << 4, // Disable user vertically scrolling with mouse wheel. On child window, mouse wheel will be forwarded to the parent unless NoScrollbar is also set.
|
||||
ImGuiWindowFlags_NoCollapse = 1 << 5, // Disable user collapsing window by double-clicking on it. Also referred to as "window menu button" within a docking node.
|
||||
ImGuiWindowFlags_NoCollapse = 1 << 5, // Disable user collapsing window by double-clicking on it. Also referred to as Window Menu Button (e.g. within a docking node).
|
||||
ImGuiWindowFlags_AlwaysAutoResize = 1 << 6, // Resize every window to its content every frame
|
||||
ImGuiWindowFlags_NoBackground = 1 << 7, // Disable drawing background color (WindowBg, etc.) and outside border. Similar as using SetNextWindowBgAlpha(0.0f).
|
||||
ImGuiWindowFlags_NoSavedSettings = 1 << 8, // Never load/save settings in .ini file
|
||||
@ -1017,7 +1019,7 @@ enum ImGuiWindowFlags_
|
||||
ImGuiWindowFlags_NoInputs = ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus,
|
||||
|
||||
// [Internal]
|
||||
ImGuiWindowFlags_NavFlattened = 1 << 23, // [BETA] Allow gamepad/keyboard navigation to cross over parent border to this child (only use on child that have no scrolling!)
|
||||
ImGuiWindowFlags_NavFlattened = 1 << 23, // [BETA] On child window: allow gamepad/keyboard navigation to cross over parent border to this child or between sibling child windows.
|
||||
ImGuiWindowFlags_ChildWindow = 1 << 24, // Don't use! For internal use by BeginChild()
|
||||
ImGuiWindowFlags_Tooltip = 1 << 25, // Don't use! For internal use by BeginTooltip()
|
||||
ImGuiWindowFlags_Popup = 1 << 26, // Don't use! For internal use by BeginPopup()
|
||||
@ -1309,9 +1311,11 @@ enum ImGuiTableBgTarget_
|
||||
enum ImGuiFocusedFlags_
|
||||
{
|
||||
ImGuiFocusedFlags_None = 0,
|
||||
ImGuiFocusedFlags_ChildWindows = 1 << 0, // IsWindowFocused(): Return true if any children of the window is focused
|
||||
ImGuiFocusedFlags_RootWindow = 1 << 1, // IsWindowFocused(): Test from root window (top most parent of the current hierarchy)
|
||||
ImGuiFocusedFlags_AnyWindow = 1 << 2, // IsWindowFocused(): Return true if any window is focused. Important: If you are trying to tell how to dispatch your low-level inputs, do NOT use this. Use 'io.WantCaptureMouse' instead! Please read the FAQ!
|
||||
ImGuiFocusedFlags_ChildWindows = 1 << 0, // Return true if any children of the window is focused
|
||||
ImGuiFocusedFlags_RootWindow = 1 << 1, // Test from root window (top most parent of the current hierarchy)
|
||||
ImGuiFocusedFlags_AnyWindow = 1 << 2, // Return true if any window is focused. Important: If you are trying to tell how to dispatch your low-level inputs, do NOT use this. Use 'io.WantCaptureMouse' instead! Please read the FAQ!
|
||||
ImGuiFocusedFlags_NoPopupHierarchy = 1 << 3, // Do not consider popup hierarchy (do not treat popup emitter as parent of popup) (when used with _ChildWindows or _RootWindow)
|
||||
ImGuiFocusedFlags_DockHierarchy = 1 << 4, // Consider docking hierarchy (treat dockspace host as parent of docked window) (when used with _ChildWindows or _RootWindow)
|
||||
ImGuiFocusedFlags_RootAndChildWindows = ImGuiFocusedFlags_RootWindow | ImGuiFocusedFlags_ChildWindows
|
||||
};
|
||||
|
||||
@ -1324,11 +1328,13 @@ enum ImGuiHoveredFlags_
|
||||
ImGuiHoveredFlags_ChildWindows = 1 << 0, // IsWindowHovered() only: Return true if any children of the window is hovered
|
||||
ImGuiHoveredFlags_RootWindow = 1 << 1, // IsWindowHovered() only: Test from root window (top most parent of the current hierarchy)
|
||||
ImGuiHoveredFlags_AnyWindow = 1 << 2, // IsWindowHovered() only: Return true if any window is hovered
|
||||
ImGuiHoveredFlags_AllowWhenBlockedByPopup = 1 << 3, // Return true even if a popup window is normally blocking access to this item/window
|
||||
//ImGuiHoveredFlags_AllowWhenBlockedByModal = 1 << 4, // Return true even if a modal popup window is normally blocking access to this item/window. FIXME-TODO: Unavailable yet.
|
||||
ImGuiHoveredFlags_AllowWhenBlockedByActiveItem = 1 << 5, // Return true even if an active item is blocking access to this item/window. Useful for Drag and Drop patterns.
|
||||
ImGuiHoveredFlags_AllowWhenOverlapped = 1 << 6, // Return true even if the position is obstructed or overlapped by another window
|
||||
ImGuiHoveredFlags_AllowWhenDisabled = 1 << 7, // Return true even if the item is disabled
|
||||
ImGuiHoveredFlags_NoPopupHierarchy = 1 << 3, // IsWindowHovered() only: Do not consider popup hierarchy (do not treat popup emitter as parent of popup) (when used with _ChildWindows or _RootWindow)
|
||||
ImGuiHoveredFlags_DockHierarchy = 1 << 4, // IsWindowHovered() only: Consider docking hierarchy (treat dockspace host as parent of docked window) (when used with _ChildWindows or _RootWindow)
|
||||
ImGuiHoveredFlags_AllowWhenBlockedByPopup = 1 << 5, // Return true even if a popup window is normally blocking access to this item/window
|
||||
//ImGuiHoveredFlags_AllowWhenBlockedByModal = 1 << 6, // Return true even if a modal popup window is normally blocking access to this item/window. FIXME-TODO: Unavailable yet.
|
||||
ImGuiHoveredFlags_AllowWhenBlockedByActiveItem = 1 << 7, // Return true even if an active item is blocking access to this item/window. Useful for Drag and Drop patterns.
|
||||
ImGuiHoveredFlags_AllowWhenOverlapped = 1 << 8, // IsItemHovered() only: Return true even if the position is obstructed or overlapped by another window
|
||||
ImGuiHoveredFlags_AllowWhenDisabled = 1 << 9, // IsItemHovered() only: Return true even if the item is disabled
|
||||
ImGuiHoveredFlags_RectOnly = ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_AllowWhenOverlapped,
|
||||
ImGuiHoveredFlags_RootAndChildWindows = ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_ChildWindows
|
||||
};
|
||||
@ -1344,7 +1350,7 @@ enum ImGuiDockNodeFlags_
|
||||
ImGuiDockNodeFlags_NoDockingInCentralNode = 1 << 2, // Shared // Disable docking inside the Central Node, which will be always kept empty.
|
||||
ImGuiDockNodeFlags_PassthruCentralNode = 1 << 3, // Shared // Enable passthru dockspace: 1) DockSpace() will render a ImGuiCol_WindowBg background covering everything excepted the Central Node when empty. Meaning the host window should probably use SetNextWindowBgAlpha(0.0f) prior to Begin() when using this. 2) When Central Node is empty: let inputs pass-through + won't display a DockingEmptyBg background. See demo for details.
|
||||
ImGuiDockNodeFlags_NoSplit = 1 << 4, // Shared/Local // Disable splitting the node into smaller nodes. Useful e.g. when embedding dockspaces into a main root one (the root one may have splitting disabled to reduce confusion). Note: when turned off, existing splits will be preserved.
|
||||
ImGuiDockNodeFlags_NoResize = 1 << 5, // Shared/Local // Disable resizing node using the splitter/separators. Useful with programatically setup dockspaces.
|
||||
ImGuiDockNodeFlags_NoResize = 1 << 5, // Shared/Local // Disable resizing node using the splitter/separators. Useful with programmatically setup dockspaces.
|
||||
ImGuiDockNodeFlags_AutoHideTabBar = 1 << 6 // Shared/Local // Tab bar will automatically hide when there is a single window in the dock node.
|
||||
};
|
||||
|
||||
@ -1813,7 +1819,7 @@ struct ImVector
|
||||
inline void pop_back() { IM_ASSERT(Size > 0); Size--; }
|
||||
inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); }
|
||||
inline T* erase(const T* it) { IM_ASSERT(it >= Data && it < Data + Size); const ptrdiff_t off = it - Data; memmove(Data + off, Data + off + 1, ((size_t)Size - (size_t)off - 1) * sizeof(T)); Size--; return Data + off; }
|
||||
inline T* erase(const T* it, const T* it_last){ IM_ASSERT(it >= Data && it < Data + Size && it_last > it && it_last <= Data + Size); const ptrdiff_t count = it_last - it; const ptrdiff_t off = it - Data; memmove(Data + off, Data + off + count, ((size_t)Size - (size_t)off - count) * sizeof(T)); Size -= (int)count; return Data + off; }
|
||||
inline T* erase(const T* it, const T* it_last){ IM_ASSERT(it >= Data && it < Data + Size && it_last > it && it_last <= Data + Size); const ptrdiff_t count = it_last - it; const ptrdiff_t off = it - Data; memmove(Data + off, Data + off + count, ((size_t)Size - (size_t)off - (size_t)count) * sizeof(T)); Size -= (int)count; return Data + off; }
|
||||
inline T* erase_unsorted(const T* it) { IM_ASSERT(it >= Data && it < Data + Size); const ptrdiff_t off = it - Data; if (it < Data + Size - 1) memcpy(Data + off, Data + Size - 1, sizeof(T)); Size--; return Data + off; }
|
||||
inline T* insert(const T* it, const T& v) { IM_ASSERT(it >= Data && it <= Data + Size); const ptrdiff_t off = it - Data; if (Size == Capacity) reserve(_grow_capacity(Size + 1)); if (off < (int)Size) memmove(Data + off + 1, Data + off, ((size_t)Size - (size_t)off) * sizeof(T)); memcpy(&Data[off], &v, sizeof(v)); Size++; return Data + off; }
|
||||
inline bool contains(const T& v) const { const T* data = Data; const T* data_end = Data + Size; while (data < data_end) if (*data++ == v) return true; return false; }
|
||||
@ -1917,6 +1923,7 @@ struct ImGuiIO
|
||||
|
||||
// Docking options (when ImGuiConfigFlags_DockingEnable is set)
|
||||
bool ConfigDockingNoSplit; // = false // Simplified docking mode: disable window splitting, so docking is limited to merging multiple windows together into tab-bars.
|
||||
bool ConfigDockingWithShift; // = false // Enable docking with holding Shift key (reduce visual noise, allows dropping in wider space)
|
||||
bool ConfigDockingAlwaysTabBar; // = false // [BETA] [FIXME: This currently creates regression with auto-sizing and general overhead] Make every single floating window display within a docking node.
|
||||
bool ConfigDockingTransparentPayload;// = false // [BETA] Make window or viewport transparent when docking and only display docking boxes on the target viewport. Useful if rendering of multiple viewport cannot be synced. Best used with ConfigViewportsNoAutoMerge.
|
||||
|
||||
@ -2008,12 +2015,13 @@ struct ImGuiIO
|
||||
ImVec2 MousePosPrev; // Previous mouse position (note that MouseDelta is not necessary == MousePos-MousePosPrev, in case either position is invalid)
|
||||
ImVec2 MouseClickedPos[5]; // Position at time of clicking
|
||||
double MouseClickedTime[5]; // Time of last click (used to figure out double-click)
|
||||
bool MouseClicked[5]; // Mouse button went from !Down to Down
|
||||
bool MouseDoubleClicked[5]; // Has mouse button been double-clicked?
|
||||
bool MouseClicked[5]; // Mouse button went from !Down to Down (same as MouseClickedCount[x] != 0)
|
||||
bool MouseDoubleClicked[5]; // Has mouse button been double-clicked? (same as MouseClickedCount[x] == 2)
|
||||
ImU16 MouseClickedCount[5]; // == 0 (not clicked), == 1 (same as MouseClicked[]), == 2 (double-clicked), == 3 (triple-clicked) etc. when going from !Down to Down
|
||||
ImU16 MouseClickedLastCount[5]; // Count successive number of clicks. Stays valid after mouse release. Reset after another click is done.
|
||||
bool MouseReleased[5]; // Mouse button went from Down to !Down
|
||||
bool MouseDownOwned[5]; // Track if button was clicked inside a dear imgui window or over void blocked by a popup. We don't request mouse capture from the application if click started outside ImGui bounds.
|
||||
bool MouseDownOwnedUnlessPopupClose[5];//Track if button was clicked inside a dear imgui window.
|
||||
bool MouseDownWasDoubleClick[5]; // Track if button down was a double-click
|
||||
float MouseDownDuration[5]; // Duration the mouse button has been down (0.0f == just clicked)
|
||||
float MouseDownDurationPrev[5]; // Previous time the mouse button has been down
|
||||
ImVec2 MouseDragMaxDistanceAbs[5]; // Maximum distance, absolute, on each axis, of how much mouse has traveled from the clicking point
|
||||
@ -2092,7 +2100,7 @@ struct ImGuiSizeCallbackData
|
||||
struct ImGuiWindowClass
|
||||
{
|
||||
ImGuiID ClassId; // User data. 0 = Default class (unclassed). Windows of different classes cannot be docked with each others.
|
||||
ImGuiID ParentViewportId; // Hint for the platform backend. If non-zero, the platform backend can create a parent<>child relationship between the platform windows. Not conforming backends are free to e.g. parent every viewport to the main viewport or not.
|
||||
ImGuiID ParentViewportId; // Hint for the platform backend. -1: use default. 0: request platform backend to not parent the platform. != 0: request platform backend to create a parent<>child relationship between the platform windows. Not conforming backends are free to e.g. parent every viewport to the main viewport or not.
|
||||
ImGuiViewportFlags ViewportFlagsOverrideSet; // Viewport flags to set when a window of this class owns a viewport. This allows you to enforce OS decoration or task bar icon, override the defaults on a per-window basis.
|
||||
ImGuiViewportFlags ViewportFlagsOverrideClear; // Viewport flags to clear when a window of this class owns a viewport. This allows you to enforce OS decoration or task bar icon, override the defaults on a per-window basis.
|
||||
ImGuiTabItemFlags TabItemFlagsOverrideSet; // [EXPERIMENTAL] TabItem flags to set when a window of this class gets submitted into a dock node tab bar. May use with ImGuiTabItemFlags_Leading or ImGuiTabItemFlags_Trailing.
|
||||
@ -2100,7 +2108,7 @@ struct ImGuiWindowClass
|
||||
bool DockingAlwaysTabBar; // Set to true to enforce single floating windows of this class always having their own docking node (equivalent of setting the global io.ConfigDockingAlwaysTabBar)
|
||||
bool DockingAllowUnclassed; // Set to true to allow windows of this class to be docked/merged with an unclassed window. // FIXME-DOCK: Move to DockNodeFlags override?
|
||||
|
||||
ImGuiWindowClass() { memset(this, 0, sizeof(*this)); DockingAllowUnclassed = true; }
|
||||
ImGuiWindowClass() { memset(this, 0, sizeof(*this)); ParentViewportId = (ImGuiID)-1; DockingAllowUnclassed = true; }
|
||||
};
|
||||
|
||||
// Data payload for Drag and Drop operations: AcceptDragDropPayload(), GetDragDropPayload()
|
||||
@ -2269,10 +2277,12 @@ struct ImGuiStorage
|
||||
};
|
||||
|
||||
// Helper: Manually clip large list of items.
|
||||
// If you are submitting lots of evenly spaced items and you have a random access to the list, you can perform coarse
|
||||
// clipping based on visibility to save yourself from processing those items at all.
|
||||
// If you have lots evenly spaced items and you have a random access to the list, you can perform coarse
|
||||
// clipping based on visibility to only submit items that are in view.
|
||||
// The clipper calculates the range of visible items and advance the cursor to compensate for the non-visible items we have skipped.
|
||||
// (Dear ImGui already clip items based on their bounds but it needs to measure text size to do so, whereas manual coarse clipping before submission makes this cost and your own data fetching/submission cost almost null)
|
||||
// (Dear ImGui already clip items based on their bounds but: it needs to first layout the item to do so, and generally
|
||||
// fetching/submitting your own data incurs additional cost. Coarse clipping using ImGuiListClipper allows you to easily
|
||||
// scale using lists with tens of thousands of items without a problem)
|
||||
// Usage:
|
||||
// ImGuiListClipper clipper;
|
||||
// clipper.Begin(1000); // We have 1000 elements, evenly spaced.
|
||||
@ -2281,31 +2291,31 @@ struct ImGuiStorage
|
||||
// ImGui::Text("line number %d", i);
|
||||
// Generally what happens is:
|
||||
// - Clipper lets you process the first element (DisplayStart = 0, DisplayEnd = 1) regardless of it being visible or not.
|
||||
// - User code submit one element.
|
||||
// - User code submit that one element.
|
||||
// - Clipper can measure the height of the first element
|
||||
// - Clipper calculate the actual range of elements to display based on the current clipping rectangle, position the cursor before the first visible element.
|
||||
// - User code submit visible elements.
|
||||
// - The clipper also handles various subtleties related to keyboard/gamepad navigation, wrapping etc.
|
||||
struct ImGuiListClipper
|
||||
{
|
||||
int DisplayStart;
|
||||
int DisplayEnd;
|
||||
|
||||
// [Internal]
|
||||
int ItemsCount;
|
||||
int StepNo;
|
||||
int ItemsFrozen;
|
||||
float ItemsHeight;
|
||||
float StartPosY;
|
||||
|
||||
IMGUI_API ImGuiListClipper();
|
||||
IMGUI_API ~ImGuiListClipper();
|
||||
int DisplayStart; // First item to display, updated by each call to Step()
|
||||
int DisplayEnd; // End of items to display (exclusive)
|
||||
int ItemsCount; // [Internal] Number of items
|
||||
float ItemsHeight; // [Internal] Height of item after a first step and item submission can calculate it
|
||||
float StartPosY; // [Internal] Cursor position at the time of Begin() or after table frozen rows are all processed
|
||||
void* TempData; // [Internal] Internal data
|
||||
|
||||
// items_count: Use INT_MAX if you don't know how many items you have (in which case the cursor won't be advanced in the final step)
|
||||
// items_height: Use -1.0f to be calculated automatically on first step. Otherwise pass in the distance between your items, typically GetTextLineHeightWithSpacing() or GetFrameHeightWithSpacing().
|
||||
IMGUI_API void Begin(int items_count, float items_height = -1.0f); // Automatically called by constructor if you passed 'items_count' or by Step() in Step 1.
|
||||
IMGUI_API ImGuiListClipper();
|
||||
IMGUI_API ~ImGuiListClipper();
|
||||
IMGUI_API void Begin(int items_count, float items_height = -1.0f);
|
||||
IMGUI_API void End(); // Automatically called on the last call of Step() that returns false.
|
||||
IMGUI_API bool Step(); // Call until it returns false. The DisplayStart/DisplayEnd fields will be set and you can process/draw those items.
|
||||
|
||||
// Call ForceDisplayRangeByIndices() before first call to Step() if you need a range of items to be displayed regardless of visibility.
|
||||
IMGUI_API void ForceDisplayRangeByIndices(int item_min, int item_max); // item_max is exclusive e.g. use (42, 42+1) to make item 42 always visible BUT due to alignment/padding of certain items it is likely that an extra item may be included on either end of the display range.
|
||||
|
||||
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||
inline ImGuiListClipper(int items_count, float items_height = -1.0f) { memset(this, 0, sizeof(*this)); ItemsCount = -1; Begin(items_count, items_height); } // [removed in 1.79]
|
||||
#endif
|
||||
@ -3077,6 +3087,8 @@ struct ImGuiPlatformMonitor
|
||||
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||
namespace ImGui
|
||||
{
|
||||
// OBSOLETED in 1.86 (from November 2021)
|
||||
IMGUI_API void CalcListClipping(int items_count, float items_height, int* out_items_display_start, int* out_items_display_end); // Calculate coarse clipping for large list of evenly sized items. Prefer using ImGuiListClipper.
|
||||
// OBSOLETED in 1.85 (from August 2021)
|
||||
static inline float GetWindowContentRegionWidth() { return GetWindowContentRegionMax().x - GetWindowContentRegionMin().x; }
|
||||
// OBSOLETED in 1.81 (from February 2021)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.85 WIP
|
||||
// dear imgui, v1.86
|
||||
// (drawing and font code)
|
||||
|
||||
/*
|
||||
@ -412,6 +412,8 @@ void ImDrawList::_ResetForNewFrame()
|
||||
IM_ASSERT(IM_OFFSETOF(ImDrawCmd, ClipRect) == 0);
|
||||
IM_ASSERT(IM_OFFSETOF(ImDrawCmd, TextureId) == sizeof(ImVec4));
|
||||
IM_ASSERT(IM_OFFSETOF(ImDrawCmd, VtxOffset) == sizeof(ImVec4) + sizeof(ImTextureID));
|
||||
if (_Splitter._Count > 1)
|
||||
_Splitter.Merge(this);
|
||||
|
||||
CmdBuffer.resize(0);
|
||||
IdxBuffer.resize(0);
|
||||
@ -479,6 +481,7 @@ void ImDrawList::_PopUnusedDrawCmd()
|
||||
|
||||
void ImDrawList::AddCallback(ImDrawCallback callback, void* callback_data)
|
||||
{
|
||||
IM_ASSERT_PARANOID(CmdBuffer.Size > 0);
|
||||
ImDrawCmd* curr_cmd = &CmdBuffer.Data[CmdBuffer.Size - 1];
|
||||
IM_ASSERT(curr_cmd->UserCallback == NULL);
|
||||
if (curr_cmd->ElemCount != 0)
|
||||
@ -500,6 +503,7 @@ void ImDrawList::AddCallback(ImDrawCallback callback, void* callback_data)
|
||||
// Try to merge two last draw commands
|
||||
void ImDrawList::_TryMergeDrawCmds()
|
||||
{
|
||||
IM_ASSERT_PARANOID(CmdBuffer.Size > 0);
|
||||
ImDrawCmd* curr_cmd = &CmdBuffer.Data[CmdBuffer.Size - 1];
|
||||
ImDrawCmd* prev_cmd = curr_cmd - 1;
|
||||
if (ImDrawCmd_HeaderCompare(curr_cmd, prev_cmd) == 0 && curr_cmd->UserCallback == NULL && prev_cmd->UserCallback == NULL)
|
||||
@ -514,6 +518,7 @@ void ImDrawList::_TryMergeDrawCmds()
|
||||
void ImDrawList::_OnChangedClipRect()
|
||||
{
|
||||
// If current command is used with different settings we need to add a new command
|
||||
IM_ASSERT_PARANOID(CmdBuffer.Size > 0);
|
||||
ImDrawCmd* curr_cmd = &CmdBuffer.Data[CmdBuffer.Size - 1];
|
||||
if (curr_cmd->ElemCount != 0 && memcmp(&curr_cmd->ClipRect, &_CmdHeader.ClipRect, sizeof(ImVec4)) != 0)
|
||||
{
|
||||
@ -536,6 +541,7 @@ void ImDrawList::_OnChangedClipRect()
|
||||
void ImDrawList::_OnChangedTextureID()
|
||||
{
|
||||
// If current command is used with different settings we need to add a new command
|
||||
IM_ASSERT_PARANOID(CmdBuffer.Size > 0);
|
||||
ImDrawCmd* curr_cmd = &CmdBuffer.Data[CmdBuffer.Size - 1];
|
||||
if (curr_cmd->ElemCount != 0 && curr_cmd->TextureId != _CmdHeader.TextureId)
|
||||
{
|
||||
@ -559,6 +565,7 @@ void ImDrawList::_OnChangedVtxOffset()
|
||||
{
|
||||
// We don't need to compare curr_cmd->VtxOffset != _CmdHeader.VtxOffset because we know it'll be different at the time we call this.
|
||||
_VtxCurrentIdx = 0;
|
||||
IM_ASSERT_PARANOID(CmdBuffer.Size > 0);
|
||||
ImDrawCmd* curr_cmd = &CmdBuffer.Data[CmdBuffer.Size - 1];
|
||||
//IM_ASSERT(curr_cmd->VtxOffset != _CmdHeader.VtxOffset); // See #3349
|
||||
if (curr_cmd->ElemCount != 0)
|
||||
@ -1925,33 +1932,34 @@ ImFontConfig::ImFontConfig()
|
||||
|
||||
// A work of art lies ahead! (. = white layer, X = black layer, others are blank)
|
||||
// The 2x2 white texels on the top left are the ones we'll use everywhere in Dear ImGui to render filled shapes.
|
||||
const int FONT_ATLAS_DEFAULT_TEX_DATA_W = 108; // Actual texture will be 2 times that + 1 spacing.
|
||||
// (This is used when io.MouseDrawCursor = true)
|
||||
const int FONT_ATLAS_DEFAULT_TEX_DATA_W = 122; // Actual texture will be 2 times that + 1 spacing.
|
||||
const int FONT_ATLAS_DEFAULT_TEX_DATA_H = 27;
|
||||
static const char FONT_ATLAS_DEFAULT_TEX_DATA_PIXELS[FONT_ATLAS_DEFAULT_TEX_DATA_W * FONT_ATLAS_DEFAULT_TEX_DATA_H + 1] =
|
||||
{
|
||||
"..- -XXXXXXX- X - X -XXXXXXX - XXXXXXX- XX "
|
||||
"..- -X.....X- X.X - X.X -X.....X - X.....X- X..X "
|
||||
"--- -XXX.XXX- X...X - X...X -X....X - X....X- X..X "
|
||||
"X - X.X - X.....X - X.....X -X...X - X...X- X..X "
|
||||
"XX - X.X -X.......X- X.......X -X..X.X - X.X..X- X..X "
|
||||
"X.X - X.X -XXXX.XXXX- XXXX.XXXX -X.X X.X - X.X X.X- X..XXX "
|
||||
"X..X - X.X - X.X - X.X -XX X.X - X.X XX- X..X..XXX "
|
||||
"X...X - X.X - X.X - XX X.X XX - X.X - X.X - X..X..X..XX "
|
||||
"X....X - X.X - X.X - X.X X.X X.X - X.X - X.X - X..X..X..X.X "
|
||||
"X.....X - X.X - X.X - X..X X.X X..X - X.X - X.X -XXX X..X..X..X..X"
|
||||
"X......X - X.X - X.X - X...XXXXXX.XXXXXX...X - X.X XX-XX X.X -X..XX........X..X"
|
||||
"X.......X - X.X - X.X -X.....................X- X.X X.X-X.X X.X -X...X...........X"
|
||||
"X........X - X.X - X.X - X...XXXXXX.XXXXXX...X - X.X..X-X..X.X - X..............X"
|
||||
"X.........X -XXX.XXX- X.X - X..X X.X X..X - X...X-X...X - X.............X"
|
||||
"X..........X-X.....X- X.X - X.X X.X X.X - X....X-X....X - X.............X"
|
||||
"X......XXXXX-XXXXXXX- X.X - XX X.X XX - X.....X-X.....X - X............X"
|
||||
"X...X..X --------- X.X - X.X - XXXXXXX-XXXXXXX - X...........X "
|
||||
"X..X X..X - -XXXX.XXXX- XXXX.XXXX ------------------------------------- X..........X "
|
||||
"X.X X..X - -X.......X- X.......X - XX XX - - X..........X "
|
||||
"XX X..X - - X.....X - X.....X - X.X X.X - - X........X "
|
||||
" X..X - X...X - X...X - X..X X..X - - X........X "
|
||||
" XX - X.X - X.X - X...XXXXXXXXXXXXX...X - - XXXXXXXXXX "
|
||||
"------------ - X - X -X.....................X- ------------------"
|
||||
"..- -XXXXXXX- X - X -XXXXXXX - XXXXXXX- XX - XX XX "
|
||||
"..- -X.....X- X.X - X.X -X.....X - X.....X- X..X -X..X X..X"
|
||||
"--- -XXX.XXX- X...X - X...X -X....X - X....X- X..X -X...X X...X"
|
||||
"X - X.X - X.....X - X.....X -X...X - X...X- X..X - X...X X...X "
|
||||
"XX - X.X -X.......X- X.......X -X..X.X - X.X..X- X..X - X...X...X "
|
||||
"X.X - X.X -XXXX.XXXX- XXXX.XXXX -X.X X.X - X.X X.X- X..XXX - X.....X "
|
||||
"X..X - X.X - X.X - X.X -XX X.X - X.X XX- X..X..XXX - X...X "
|
||||
"X...X - X.X - X.X - XX X.X XX - X.X - X.X - X..X..X..XX - X.X "
|
||||
"X....X - X.X - X.X - X.X X.X X.X - X.X - X.X - X..X..X..X.X - X...X "
|
||||
"X.....X - X.X - X.X - X..X X.X X..X - X.X - X.X -XXX X..X..X..X..X- X.....X "
|
||||
"X......X - X.X - X.X - X...XXXXXX.XXXXXX...X - X.X XX-XX X.X -X..XX........X..X- X...X...X "
|
||||
"X.......X - X.X - X.X -X.....................X- X.X X.X-X.X X.X -X...X...........X- X...X X...X "
|
||||
"X........X - X.X - X.X - X...XXXXXX.XXXXXX...X - X.X..X-X..X.X - X..............X-X...X X...X"
|
||||
"X.........X -XXX.XXX- X.X - X..X X.X X..X - X...X-X...X - X.............X-X..X X..X"
|
||||
"X..........X-X.....X- X.X - X.X X.X X.X - X....X-X....X - X.............X- XX XX "
|
||||
"X......XXXXX-XXXXXXX- X.X - XX X.X XX - X.....X-X.....X - X............X--------------"
|
||||
"X...X..X --------- X.X - X.X - XXXXXXX-XXXXXXX - X...........X - "
|
||||
"X..X X..X - -XXXX.XXXX- XXXX.XXXX ------------------------------------- X..........X - "
|
||||
"X.X X..X - -X.......X- X.......X - XX XX - - X..........X - "
|
||||
"XX X..X - - X.....X - X.....X - X.X X.X - - X........X - "
|
||||
" X..X - - X...X - X...X - X..X X..X - - X........X - "
|
||||
" XX - - X.X - X.X - X...XXXXXXXXXXXXX...X - - XXXXXXXXXX - "
|
||||
"------------- - X - X -X.....................X- ------------------- "
|
||||
" ----------------------------------- X...XXXXXXXXXXXXX...X - "
|
||||
" - X..X X..X - "
|
||||
" - X.X X.X - "
|
||||
@ -1969,6 +1977,7 @@ static const ImVec2 FONT_ATLAS_DEFAULT_TEX_CURSOR_DATA[ImGuiMouseCursor_COUNT][3
|
||||
{ ImVec2(73,0), ImVec2(17,17), ImVec2( 8, 8) }, // ImGuiMouseCursor_ResizeNESW
|
||||
{ ImVec2(55,0), ImVec2(17,17), ImVec2( 8, 8) }, // ImGuiMouseCursor_ResizeNWSE
|
||||
{ ImVec2(91,0), ImVec2(17,22), ImVec2( 5, 0) }, // ImGuiMouseCursor_Hand
|
||||
{ ImVec2(109,0),ImVec2(13,15), ImVec2( 6, 7) }, // ImGuiMouseCursor_NotAllowed
|
||||
};
|
||||
|
||||
ImFontAtlas::ImFontAtlas()
|
||||
@ -3079,8 +3088,8 @@ void ImFontGlyphRangesBuilder::AddText(const char* text, const char* text_end)
|
||||
void ImFontGlyphRangesBuilder::AddRanges(const ImWchar* ranges)
|
||||
{
|
||||
for (; ranges[0]; ranges += 2)
|
||||
for (ImWchar c = ranges[0]; c <= ranges[1]; c++)
|
||||
AddChar(c);
|
||||
for (unsigned int c = ranges[0]; c <= ranges[1] && c <= IM_UNICODE_CODEPOINT_MAX; c++) //-V560
|
||||
AddChar((ImWchar)c);
|
||||
}
|
||||
|
||||
void ImFontGlyphRangesBuilder::BuildRanges(ImVector<ImWchar>* out_ranges)
|
||||
@ -3914,16 +3923,27 @@ void ImGui::RenderRectFilledWithHole(ImDrawList* draw_list, ImRect outer, ImRect
|
||||
const bool fill_R = (inner.Max.x < outer.Max.x);
|
||||
const bool fill_U = (inner.Min.y > outer.Min.y);
|
||||
const bool fill_D = (inner.Max.y < outer.Max.y);
|
||||
if (fill_L) draw_list->AddRectFilled(ImVec2(outer.Min.x, inner.Min.y), ImVec2(inner.Min.x, inner.Max.y), col, rounding, (fill_U ? 0 : ImDrawFlags_RoundCornersTopLeft) | (fill_D ? 0 : ImDrawFlags_RoundCornersBottomLeft));
|
||||
if (fill_R) draw_list->AddRectFilled(ImVec2(inner.Max.x, inner.Min.y), ImVec2(outer.Max.x, inner.Max.y), col, rounding, (fill_U ? 0 : ImDrawFlags_RoundCornersTopRight) | (fill_D ? 0 : ImDrawFlags_RoundCornersBottomRight));
|
||||
if (fill_U) draw_list->AddRectFilled(ImVec2(inner.Min.x, outer.Min.y), ImVec2(inner.Max.x, inner.Min.y), col, rounding, (fill_L ? 0 : ImDrawFlags_RoundCornersTopLeft) | (fill_R ? 0 : ImDrawFlags_RoundCornersTopRight));
|
||||
if (fill_D) draw_list->AddRectFilled(ImVec2(inner.Min.x, inner.Max.y), ImVec2(inner.Max.x, outer.Max.y), col, rounding, (fill_L ? 0 : ImDrawFlags_RoundCornersBottomLeft) | (fill_R ? 0 : ImDrawFlags_RoundCornersBottomRight));
|
||||
if (fill_L) draw_list->AddRectFilled(ImVec2(outer.Min.x, inner.Min.y), ImVec2(inner.Min.x, inner.Max.y), col, rounding, ImDrawFlags_RoundCornersNone | (fill_U ? 0 : ImDrawFlags_RoundCornersTopLeft) | (fill_D ? 0 : ImDrawFlags_RoundCornersBottomLeft));
|
||||
if (fill_R) draw_list->AddRectFilled(ImVec2(inner.Max.x, inner.Min.y), ImVec2(outer.Max.x, inner.Max.y), col, rounding, ImDrawFlags_RoundCornersNone | (fill_U ? 0 : ImDrawFlags_RoundCornersTopRight) | (fill_D ? 0 : ImDrawFlags_RoundCornersBottomRight));
|
||||
if (fill_U) draw_list->AddRectFilled(ImVec2(inner.Min.x, outer.Min.y), ImVec2(inner.Max.x, inner.Min.y), col, rounding, ImDrawFlags_RoundCornersNone | (fill_L ? 0 : ImDrawFlags_RoundCornersTopLeft) | (fill_R ? 0 : ImDrawFlags_RoundCornersTopRight));
|
||||
if (fill_D) draw_list->AddRectFilled(ImVec2(inner.Min.x, inner.Max.y), ImVec2(inner.Max.x, outer.Max.y), col, rounding, ImDrawFlags_RoundCornersNone | (fill_L ? 0 : ImDrawFlags_RoundCornersBottomLeft) | (fill_R ? 0 : ImDrawFlags_RoundCornersBottomRight));
|
||||
if (fill_L && fill_U) draw_list->AddRectFilled(ImVec2(outer.Min.x, outer.Min.y), ImVec2(inner.Min.x, inner.Min.y), col, rounding, ImDrawFlags_RoundCornersTopLeft);
|
||||
if (fill_R && fill_U) draw_list->AddRectFilled(ImVec2(inner.Max.x, outer.Min.y), ImVec2(outer.Max.x, inner.Min.y), col, rounding, ImDrawFlags_RoundCornersTopRight);
|
||||
if (fill_L && fill_D) draw_list->AddRectFilled(ImVec2(outer.Min.x, inner.Max.y), ImVec2(inner.Min.x, outer.Max.y), col, rounding, ImDrawFlags_RoundCornersBottomLeft);
|
||||
if (fill_R && fill_D) draw_list->AddRectFilled(ImVec2(inner.Max.x, inner.Max.y), ImVec2(outer.Max.x, outer.Max.y), col, rounding, ImDrawFlags_RoundCornersBottomRight);
|
||||
}
|
||||
|
||||
ImDrawFlags ImGui::CalcRoundingFlagsForRectInRect(const ImRect& r_in, const ImRect& r_outer, float threshold)
|
||||
{
|
||||
bool round_l = r_in.Min.x <= r_outer.Min.x + threshold;
|
||||
bool round_r = r_in.Max.x >= r_outer.Max.x - threshold;
|
||||
bool round_t = r_in.Min.y <= r_outer.Min.y + threshold;
|
||||
bool round_b = r_in.Max.y >= r_outer.Max.y - threshold;
|
||||
return ImDrawFlags_RoundCornersNone
|
||||
| ((round_t && round_l) ? ImDrawFlags_RoundCornersTopLeft : 0) | ((round_t && round_r) ? ImDrawFlags_RoundCornersTopRight : 0)
|
||||
| ((round_b && round_l) ? ImDrawFlags_RoundCornersBottomLeft : 0) | ((round_b && round_r) ? ImDrawFlags_RoundCornersBottomRight : 0);
|
||||
}
|
||||
|
||||
// Helper for ColorPicker4()
|
||||
// NB: This is rather brittle and will show artifact when rounding this enabled if rounded corners overlap multiple cells. Caller currently responsible for avoiding that.
|
||||
// Spent a non reasonable amount of time trying to getting this right for ColorButton with rounding+anti-aliasing+ImGuiColorEditFlags_HalfAlphaPreview flag + various grid sizes and offsets, and eventually gave up... probably more reasonable to disable rounding altogether.
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.85 WIP
|
||||
// dear imgui, v1.86
|
||||
// (internal structures/api)
|
||||
|
||||
// You may use this file to debug, understand or extend ImGui features but we don't provide any guarantee of forward compatibility!
|
||||
@ -18,13 +18,14 @@ Index of this file:
|
||||
// [SECTION] Generic helpers
|
||||
// [SECTION] ImDrawList support
|
||||
// [SECTION] Widgets support: flags, enums, data structures
|
||||
// [SECTION] Clipper support
|
||||
// [SECTION] Navigation support
|
||||
// [SECTION] Columns support
|
||||
// [SECTION] Multi-select support
|
||||
// [SECTION] Docking support
|
||||
// [SECTION] Viewport support
|
||||
// [SECTION] Settings support
|
||||
// [SECTION] Metrics, Debug
|
||||
// [SECTION] Metrics, Debug tools
|
||||
// [SECTION] Generic context hooks
|
||||
// [SECTION] ImGuiContext (main imgui context)
|
||||
// [SECTION] ImGuiWindowTempData, ImGuiWindow
|
||||
@ -148,8 +149,8 @@ struct ImGuiWindowSettings; // Storage for a window .ini settings (we ke
|
||||
// Use your programming IDE "Go to definition" facility on the names of the center columns to find the actual flags/enum lists.
|
||||
typedef int ImGuiDataAuthority; // -> enum ImGuiDataAuthority_ // Enum: for storing the source authority (dock node vs window) of a field
|
||||
typedef int ImGuiLayoutType; // -> enum ImGuiLayoutType_ // Enum: Horizontal or vertical
|
||||
typedef int ImGuiActivateFlags; // -> enum ImGuiActivateFlags_ // Flags: for navigation/focus function (will be for ActivateItem() later)
|
||||
typedef int ImGuiItemFlags; // -> enum ImGuiItemFlags_ // Flags: for PushItemFlag()
|
||||
typedef int ImGuiItemAddFlags; // -> enum ImGuiItemAddFlags_ // Flags: for ItemAdd()
|
||||
typedef int ImGuiItemStatusFlags; // -> enum ImGuiItemStatusFlags_ // Flags: for DC.LastItemStatusFlags
|
||||
typedef int ImGuiOldColumnFlags; // -> enum ImGuiOldColumnFlags_ // Flags: for BeginColumns()
|
||||
typedef int ImGuiNavHighlightFlags; // -> enum ImGuiNavHighlightFlags_ // Flags: for RenderNavHighlight()
|
||||
@ -157,6 +158,7 @@ typedef int ImGuiNavDirSourceFlags; // -> enum ImGuiNavDirSourceFlags_ // F
|
||||
typedef int ImGuiNavMoveFlags; // -> enum ImGuiNavMoveFlags_ // Flags: for navigation requests
|
||||
typedef int ImGuiNextItemDataFlags; // -> enum ImGuiNextItemDataFlags_ // Flags: for SetNextItemXXX() functions
|
||||
typedef int ImGuiNextWindowDataFlags; // -> enum ImGuiNextWindowDataFlags_// Flags: for SetNextWindowXXX() functions
|
||||
typedef int ImGuiScrollFlags; // -> enum ImGuiScrollFlags_ // Flags: for ScrollToItem() and navigation requests
|
||||
typedef int ImGuiSeparatorFlags; // -> enum ImGuiSeparatorFlags_ // Flags: for SeparatorEx()
|
||||
typedef int ImGuiTextFlags; // -> enum ImGuiTextFlags_ // Flags: for TextEx()
|
||||
typedef int ImGuiTooltipFlags; // -> enum ImGuiTooltipFlags_ // Flags: for BeginTooltipEx()
|
||||
@ -263,12 +265,19 @@ namespace ImStb
|
||||
#endif
|
||||
|
||||
// Debug Tools
|
||||
// Use 'Metrics->Tools->Item Picker' to break into the call-stack of a specific item.
|
||||
// Use 'Metrics/Debugger->Tools->Item Picker' to break into the call-stack of a specific item.
|
||||
// This will call IM_DEBUG_BREAK() which you may redefine yourself. See https://github.com/scottt/debugbreak for more reference.
|
||||
#ifndef IM_DEBUG_BREAK
|
||||
#if defined(__clang__)
|
||||
#define IM_DEBUG_BREAK() __builtin_debugtrap()
|
||||
#elif defined (_MSC_VER)
|
||||
#if defined (_MSC_VER)
|
||||
#define IM_DEBUG_BREAK() __debugbreak()
|
||||
#elif defined(__clang__)
|
||||
#define IM_DEBUG_BREAK() __builtin_debugtrap()
|
||||
#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
|
||||
#define IM_DEBUG_BREAK() __asm__ volatile("int $0x03")
|
||||
#elif defined(__GNUC__) && defined(__thumb__)
|
||||
#define IM_DEBUG_BREAK() __asm__ volatile(".inst 0xde01")
|
||||
#elif defined(__GNUC__) && defined(__arm__) && !defined(__thumb__)
|
||||
#define IM_DEBUG_BREAK() __asm__ volatile(".inst 0xe7f001f0");
|
||||
#else
|
||||
#define IM_DEBUG_BREAK() IM_ASSERT(0) // It is expected that you define IM_DEBUG_BREAK() into something that will break nicely in a debugger!
|
||||
#endif
|
||||
@ -305,7 +314,9 @@ static inline ImGuiID ImHash(const void* data, int size, ImU32 seed = 0) { ret
|
||||
#endif
|
||||
|
||||
// Helpers: Sorting
|
||||
#define ImQsort qsort
|
||||
#ifndef ImQsort
|
||||
static inline void ImQsort(void* base, size_t count, size_t size_of_element, int(IMGUI_CDECL *compare_func)(void const*, void const*)) { if (count > 1) qsort(base, count, size_of_element, compare_func); }
|
||||
#endif
|
||||
|
||||
// Helpers: Color Blending
|
||||
IMGUI_API ImU32 ImAlphaBlendColors(ImU32 col_a, ImU32 col_b);
|
||||
@ -412,8 +423,8 @@ static inline double ImLog(double x) { return log(x); }
|
||||
static inline int ImAbs(int x) { return x < 0 ? -x : x; }
|
||||
static inline float ImAbs(float x) { return fabsf(x); }
|
||||
static inline double ImAbs(double x) { return fabs(x); }
|
||||
static inline float ImSign(float x) { return (x < 0.0f) ? -1.0f : ((x > 0.0f) ? 1.0f : 0.0f); } // Sign operator - returns -1, 0 or 1 based on sign of argument
|
||||
static inline double ImSign(double x) { return (x < 0.0) ? -1.0 : ((x > 0.0) ? 1.0 : 0.0); }
|
||||
static inline float ImSign(float x) { return (x < 0.0f) ? -1.0f : (x > 0.0f) ? 1.0f : 0.0f; } // Sign operator - returns -1, 0 or 1 based on sign of argument
|
||||
static inline double ImSign(double x) { return (x < 0.0) ? -1.0 : (x > 0.0) ? 1.0 : 0.0; }
|
||||
#ifdef IMGUI_ENABLE_SSE
|
||||
static inline float ImRsqrt(float x) { return _mm_cvtss_f32(_mm_rsqrt_ss(_mm_set_ss(x))); }
|
||||
#else
|
||||
@ -449,6 +460,7 @@ static inline float ImDot(const ImVec2& a, const ImVec2& b)
|
||||
static inline ImVec2 ImRotate(const ImVec2& v, float cos_a, float sin_a) { return ImVec2(v.x * cos_a - v.y * sin_a, v.x * sin_a + v.y * cos_a); }
|
||||
static inline float ImLinearSweep(float current, float target, float speed) { if (current < target) return ImMin(current + speed, target); if (current > target) return ImMax(current - speed, target); return current; }
|
||||
static inline ImVec2 ImMul(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(lhs.x * rhs.x, lhs.y * rhs.y); }
|
||||
static inline bool ImIsFloatAboveGuaranteedIntegerPrecision(float f) { return f <= -16777216 || f >= 16777216; }
|
||||
IM_MSVC_RUNTIME_CHECKS_RESTORE
|
||||
|
||||
// Helpers: Geometry
|
||||
@ -754,15 +766,8 @@ enum ImGuiItemFlags_
|
||||
ImGuiItemFlags_NoNavDefaultFocus = 1 << 4, // false // Disable item being a candidate for default focus (e.g. used by title bar items)
|
||||
ImGuiItemFlags_SelectableDontClosePopup = 1 << 5, // false // Disable MenuItem/Selectable() automatically closing their popup window
|
||||
ImGuiItemFlags_MixedValue = 1 << 6, // false // [BETA] Represent a mixed/indeterminate value, generally multi-selection where values differ. Currently only supported by Checkbox() (later should support all sorts of widgets)
|
||||
ImGuiItemFlags_ReadOnly = 1 << 7 // false // [ALPHA] Allow hovering interactions but underlying value is not changed.
|
||||
};
|
||||
|
||||
// Flags for ItemAdd()
|
||||
// FIXME-NAV: _Focusable is _ALMOST_ what you would expect to be called '_TabStop' but because SetKeyboardFocusHere() works on items with no TabStop we distinguish Focusable from TabStop.
|
||||
enum ImGuiItemAddFlags_
|
||||
{
|
||||
ImGuiItemAddFlags_None = 0,
|
||||
ImGuiItemAddFlags_Focusable = 1 << 0 // FIXME-NAV: In current/legacy scheme, Focusable+TabStop support are opt-in by widgets. We will transition it toward being opt-out, so this flag is expected to eventually disappear.
|
||||
ImGuiItemFlags_ReadOnly = 1 << 7, // false // [ALPHA] Allow hovering interactions but underlying value is not changed.
|
||||
ImGuiItemFlags_Inputable = 1 << 8 // false // [WIP] Auto-activate input mode when tab focused. Currently only used and supported by a few items before it becomes a generic feature.
|
||||
};
|
||||
|
||||
// Storage for LastItem data
|
||||
@ -770,16 +775,14 @@ enum ImGuiItemStatusFlags_
|
||||
{
|
||||
ImGuiItemStatusFlags_None = 0,
|
||||
ImGuiItemStatusFlags_HoveredRect = 1 << 0, // Mouse position is within item rectangle (does NOT mean that the window is in correct z-order and can be hovered!, this is only one part of the most-common IsItemHovered test)
|
||||
ImGuiItemStatusFlags_HasDisplayRect = 1 << 1, // window->DC.LastItemDisplayRect is valid
|
||||
ImGuiItemStatusFlags_HasDisplayRect = 1 << 1, // g.LastItemData.DisplayRect is valid
|
||||
ImGuiItemStatusFlags_Edited = 1 << 2, // Value exposed by item was edited in the current frame (should match the bool return value of most widgets)
|
||||
ImGuiItemStatusFlags_ToggledSelection = 1 << 3, // Set when Selectable(), TreeNode() reports toggling a selection. We can't report "Selected", only state changes, in order to easily handle clipping with less issues.
|
||||
ImGuiItemStatusFlags_ToggledOpen = 1 << 4, // Set when TreeNode() reports toggling their open state.
|
||||
ImGuiItemStatusFlags_HasDeactivated = 1 << 5, // Set if the widget/group is able to provide data for the ImGuiItemStatusFlags_Deactivated flag.
|
||||
ImGuiItemStatusFlags_Deactivated = 1 << 6, // Only valid if ImGuiItemStatusFlags_HasDeactivated is set.
|
||||
ImGuiItemStatusFlags_HoveredWindow = 1 << 7, // Override the HoveredWindow test to allow cross-window hover testing.
|
||||
ImGuiItemStatusFlags_FocusedByCode = 1 << 8, // Set when the Focusable item just got focused from code.
|
||||
ImGuiItemStatusFlags_FocusedByTabbing = 1 << 9, // Set when the Focusable item just got focused by Tabbing.
|
||||
ImGuiItemStatusFlags_Focused = ImGuiItemStatusFlags_FocusedByCode | ImGuiItemStatusFlags_FocusedByTabbing
|
||||
ImGuiItemStatusFlags_FocusedByTabbing = 1 << 8 // Set when the Focusable item just got focused by Tabbing (FIXME: to be removed soon)
|
||||
|
||||
#ifdef IMGUI_ENABLE_TEST_ENGINE
|
||||
, // [imgui_tests only]
|
||||
@ -1039,8 +1042,6 @@ struct IMGUI_API ImGuiInputTextState
|
||||
bool SelectedAllMouseLock; // after a double-click to select all, we ignore further mouse drags to update selection
|
||||
bool Edited; // edited this frame
|
||||
ImGuiInputTextFlags Flags; // copy of InputText() flags
|
||||
ImGuiInputTextCallback UserCallback; // "
|
||||
void* UserCallbackData; // "
|
||||
|
||||
ImGuiInputTextState() { memset(this, 0, sizeof(*this)); }
|
||||
void ClearText() { CurLenW = CurLenA = 0; TextW[0] = 0; TextA[0] = 0; CursorClamp(); }
|
||||
@ -1143,17 +1144,36 @@ struct ImGuiLastItemData
|
||||
ImGuiID ID;
|
||||
ImGuiItemFlags InFlags; // See ImGuiItemFlags_
|
||||
ImGuiItemStatusFlags StatusFlags; // See ImGuiItemStatusFlags_
|
||||
ImRect Rect;
|
||||
ImRect DisplayRect;
|
||||
ImRect Rect; // Full rectangle
|
||||
ImRect NavRect; // Navigation scoring rectangle (not displayed)
|
||||
ImRect DisplayRect; // Display rectangle (only if ImGuiItemStatusFlags_HasDisplayRect is set)
|
||||
|
||||
ImGuiLastItemData() { memset(this, 0, sizeof(*this)); }
|
||||
};
|
||||
|
||||
struct IMGUI_API ImGuiStackSizes
|
||||
{
|
||||
short SizeOfIDStack;
|
||||
short SizeOfColorStack;
|
||||
short SizeOfStyleVarStack;
|
||||
short SizeOfFontStack;
|
||||
short SizeOfFocusScopeStack;
|
||||
short SizeOfGroupStack;
|
||||
short SizeOfItemFlagsStack;
|
||||
short SizeOfBeginPopupStack;
|
||||
short SizeOfDisabledStack;
|
||||
|
||||
ImGuiStackSizes() { memset(this, 0, sizeof(*this)); }
|
||||
void SetToCurrentState();
|
||||
void CompareWithCurrentState();
|
||||
};
|
||||
|
||||
// Data saved for each window pushed into the stack
|
||||
struct ImGuiWindowStackData
|
||||
{
|
||||
ImGuiWindow* Window;
|
||||
ImGuiLastItemData ParentLastItemDataBackup;
|
||||
ImGuiStackSizes StackSizesOnBegin; // Store size of various stacks for asserting
|
||||
};
|
||||
|
||||
struct ImGuiShrinkWidthItem
|
||||
@ -1171,10 +1191,62 @@ struct ImGuiPtrOrIndex
|
||||
ImGuiPtrOrIndex(int index) { Ptr = NULL; Index = index; }
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// [SECTION] Clipper support
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
struct ImGuiListClipperRange
|
||||
{
|
||||
int Min;
|
||||
int Max;
|
||||
bool PosToIndexConvert; // Begin/End are absolute position (will be converted to indices later)
|
||||
ImS8 PosToIndexOffsetMin; // Add to Min after converting to indices
|
||||
ImS8 PosToIndexOffsetMax; // Add to Min after converting to indices
|
||||
|
||||
static ImGuiListClipperRange FromIndices(int min, int max) { ImGuiListClipperRange r = { min, max, false, 0, 0 }; return r; }
|
||||
static ImGuiListClipperRange FromPositions(float y1, float y2, int off_min, int off_max) { ImGuiListClipperRange r = { (int)y1, (int)y2, true, (ImS8)off_min, (ImS8)off_max }; return r; }
|
||||
};
|
||||
|
||||
// Temporary clipper data, buffers shared/reused between instances
|
||||
struct ImGuiListClipperData
|
||||
{
|
||||
ImGuiListClipper* ListClipper;
|
||||
float LossynessOffset;
|
||||
int StepNo;
|
||||
int ItemsFrozen;
|
||||
ImVector<ImGuiListClipperRange> Ranges;
|
||||
|
||||
ImGuiListClipperData() { memset(this, 0, sizeof(*this)); }
|
||||
void Reset(ImGuiListClipper* clipper) { ListClipper = clipper; StepNo = ItemsFrozen = 0; Ranges.resize(0); }
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// [SECTION] Navigation support
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
enum ImGuiActivateFlags_
|
||||
{
|
||||
ImGuiActivateFlags_None = 0,
|
||||
ImGuiActivateFlags_PreferInput = 1 << 0, // Favor activation that requires keyboard text input (e.g. for Slider/Drag). Default if keyboard is available.
|
||||
ImGuiActivateFlags_PreferTweak = 1 << 1, // Favor activation for tweaking with arrows or gamepad (e.g. for Slider/Drag). Default if keyboard is not available.
|
||||
ImGuiActivateFlags_TryToPreserveState = 1 << 2 // Request widget to preserve state if it can (e.g. InputText will try to preserve cursor/selection)
|
||||
};
|
||||
|
||||
// Early work-in-progress API for ScrollToItem()
|
||||
enum ImGuiScrollFlags_
|
||||
{
|
||||
ImGuiScrollFlags_None = 0,
|
||||
ImGuiScrollFlags_KeepVisibleEdgeX = 1 << 0, // If item is not visible: scroll as little as possible on X axis to bring item back into view [default for X axis]
|
||||
ImGuiScrollFlags_KeepVisibleEdgeY = 1 << 1, // If item is not visible: scroll as little as possible on Y axis to bring item back into view [default for Y axis for windows that are already visible]
|
||||
ImGuiScrollFlags_KeepVisibleCenterX = 1 << 2, // If item is not visible: scroll to make the item centered on X axis [rarely used]
|
||||
ImGuiScrollFlags_KeepVisibleCenterY = 1 << 3, // If item is not visible: scroll to make the item centered on Y axis
|
||||
ImGuiScrollFlags_AlwaysCenterX = 1 << 4, // Always center the result item on X axis [rarely used]
|
||||
ImGuiScrollFlags_AlwaysCenterY = 1 << 5, // Always center the result item on Y axis [default for Y axis for appearing window)
|
||||
ImGuiScrollFlags_NoScrollParent = 1 << 6, // Disable forwarding scrolling to parent window if required to keep item/rect visible (only scroll window the function was applied to).
|
||||
ImGuiScrollFlags_MaskX_ = ImGuiScrollFlags_KeepVisibleEdgeX | ImGuiScrollFlags_KeepVisibleCenterX | ImGuiScrollFlags_AlwaysCenterX,
|
||||
ImGuiScrollFlags_MaskY_ = ImGuiScrollFlags_KeepVisibleEdgeY | ImGuiScrollFlags_KeepVisibleCenterY | ImGuiScrollFlags_AlwaysCenterY
|
||||
};
|
||||
|
||||
enum ImGuiNavHighlightFlags_
|
||||
{
|
||||
ImGuiNavHighlightFlags_None = 0,
|
||||
@ -1187,9 +1259,10 @@ enum ImGuiNavHighlightFlags_
|
||||
enum ImGuiNavDirSourceFlags_
|
||||
{
|
||||
ImGuiNavDirSourceFlags_None = 0,
|
||||
ImGuiNavDirSourceFlags_Keyboard = 1 << 0,
|
||||
ImGuiNavDirSourceFlags_PadDPad = 1 << 1,
|
||||
ImGuiNavDirSourceFlags_PadLStick = 1 << 2
|
||||
ImGuiNavDirSourceFlags_RawKeyboard = 1 << 0, // Raw keyboard (not pulled from nav), faciliate use of some functions before we can unify nav and keys
|
||||
ImGuiNavDirSourceFlags_Keyboard = 1 << 1,
|
||||
ImGuiNavDirSourceFlags_PadDPad = 1 << 2,
|
||||
ImGuiNavDirSourceFlags_PadLStick = 1 << 3
|
||||
};
|
||||
|
||||
enum ImGuiNavMoveFlags_
|
||||
@ -1200,9 +1273,14 @@ enum ImGuiNavMoveFlags_
|
||||
ImGuiNavMoveFlags_WrapX = 1 << 2, // On failed request, request from opposite side one line down (when NavDir==right) or one line up (when NavDir==left)
|
||||
ImGuiNavMoveFlags_WrapY = 1 << 3, // This is not super useful but provided for completeness
|
||||
ImGuiNavMoveFlags_AllowCurrentNavId = 1 << 4, // Allow scoring and considering the current NavId as a move target candidate. This is used when the move source is offset (e.g. pressing PageDown actually needs to send a Up move request, if we are pressing PageDown from the bottom-most item we need to stay in place)
|
||||
ImGuiNavMoveFlags_AlsoScoreVisibleSet = 1 << 5, // Store alternate result in NavMoveResultLocalVisibleSet that only comprise elements that are already fully visible (used by PageUp/PageDown)
|
||||
ImGuiNavMoveFlags_ScrollToEdge = 1 << 6,
|
||||
ImGuiNavMoveFlags_Forwarded = 1 << 7
|
||||
ImGuiNavMoveFlags_AlsoScoreVisibleSet = 1 << 5, // Store alternate result in NavMoveResultLocalVisible that only comprise elements that are already fully visible (used by PageUp/PageDown)
|
||||
ImGuiNavMoveFlags_ScrollToEdgeY = 1 << 6, // Force scrolling to min/max (used by Home/End) // FIXME-NAV: Aim to remove or reword, probably unnecessary
|
||||
ImGuiNavMoveFlags_Forwarded = 1 << 7,
|
||||
ImGuiNavMoveFlags_DebugNoResult = 1 << 8, // Dummy scoring for debug purpose, don't apply result
|
||||
ImGuiNavMoveFlags_FocusApi = 1 << 9,
|
||||
ImGuiNavMoveFlags_Tabbing = 1 << 10, // == Focus + Activate if item is Inputable + DontChangeNavHighlight
|
||||
ImGuiNavMoveFlags_Activate = 1 << 11,
|
||||
ImGuiNavMoveFlags_DontSetNavHighlight = 1 << 12 // Do not alter the visible state of keyboard vs mouse nav highlight
|
||||
};
|
||||
|
||||
enum ImGuiNavLayer
|
||||
@ -1218,12 +1296,13 @@ struct ImGuiNavItemData
|
||||
ImGuiID ID; // Init,Move // Best candidate item ID
|
||||
ImGuiID FocusScopeId; // Init,Move // Best candidate focus scope ID
|
||||
ImRect RectRel; // Init,Move // Best candidate bounding box in window relative space
|
||||
ImGuiItemFlags InFlags; // ????,Move // Best candidate item flags
|
||||
float DistBox; // Move // Best candidate box distance to current NavId
|
||||
float DistCenter; // Move // Best candidate center distance to current NavId
|
||||
float DistAxial; // Move // Best candidate axial distance to current NavId
|
||||
|
||||
ImGuiNavItemData() { Clear(); }
|
||||
void Clear() { Window = NULL; ID = FocusScopeId = 0; RectRel = ImRect(); DistBox = DistCenter = DistAxial = FLT_MAX; }
|
||||
void Clear() { Window = NULL; ID = FocusScopeId = 0; InFlags = 0; DistBox = DistCenter = DistAxial = FLT_MAX; }
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -1355,11 +1434,13 @@ struct IMGUI_API ImGuiDockNode
|
||||
ImVec2 SizeRef; // [Split node only] Last explicitly written-to size (overridden when using a splitter affecting the node), used to calculate Size.
|
||||
ImGuiAxis SplitAxis; // [Split node only] Split axis (X or Y)
|
||||
ImGuiWindowClass WindowClass; // [Root node only]
|
||||
ImU32 LastBgColor;
|
||||
|
||||
ImGuiWindow* HostWindow;
|
||||
ImGuiWindow* VisibleWindow; // Generally point to window which is ID is == SelectedTabID, but when CTRL+Tabbing this can be a different window.
|
||||
ImGuiDockNode* CentralNode; // [Root node only] Pointer to central node.
|
||||
ImGuiDockNode* OnlyNodeWithWindows; // [Root node only] Set when there is a single visible node within the hierarchy.
|
||||
int CountNodeWithWindows; // [Root node only]
|
||||
int LastFrameAlive; // Last frame number the node was updated or kept alive explicitly with DockSpace() + ImGuiDockNodeFlags_KeepAliveOnly
|
||||
int LastFrameActive; // Last frame number the node was updated.
|
||||
int LastFrameFocused; // Last frame number the node was focused.
|
||||
@ -1371,14 +1452,15 @@ struct IMGUI_API ImGuiDockNode
|
||||
ImGuiDataAuthority AuthorityForViewport :3;
|
||||
bool IsVisible :1; // Set to false when the node is hidden (usually disabled as it has no active window)
|
||||
bool IsFocused :1;
|
||||
bool IsBgDrawnThisFrame :1;
|
||||
bool HasCloseButton :1; // Provide space for a close button (if any of the docked window has one). Note that button may be hidden on window without one.
|
||||
bool HasWindowMenuButton :1;
|
||||
bool HasCentralNodeChild :1;
|
||||
bool WantCloseAll :1; // Set when closing all tabs at once.
|
||||
bool WantLockSizeOnce :1;
|
||||
bool WantMouseMove :1; // After a node extraction we need to transition toward moving the newly created host window
|
||||
bool WantHiddenTabBarUpdate :1;
|
||||
bool WantHiddenTabBarToggle :1;
|
||||
bool MarkedForPosSizeWrite :1; // Update by DockNodeTreeUpdatePosSize() write-filtering
|
||||
|
||||
ImGuiDockNode(ImGuiID id);
|
||||
~ImGuiDockNode();
|
||||
@ -1513,11 +1595,12 @@ struct ImGuiSettingsHandler
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// [SECTION] Metrics, Debug
|
||||
// [SECTION] Metrics, Debug Tools
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
struct ImGuiMetricsConfig
|
||||
{
|
||||
bool ShowStackTool;
|
||||
bool ShowWindowsRects;
|
||||
bool ShowWindowsBeginOrder;
|
||||
bool ShowTablesRects;
|
||||
@ -1529,6 +1612,7 @@ struct ImGuiMetricsConfig
|
||||
|
||||
ImGuiMetricsConfig()
|
||||
{
|
||||
ShowStackTool = false;
|
||||
ShowWindowsRects = false;
|
||||
ShowWindowsBeginOrder = false;
|
||||
ShowTablesRects = false;
|
||||
@ -1540,19 +1624,25 @@ struct ImGuiMetricsConfig
|
||||
}
|
||||
};
|
||||
|
||||
struct IMGUI_API ImGuiStackSizes
|
||||
struct ImGuiStackLevelInfo
|
||||
{
|
||||
short SizeOfIDStack;
|
||||
short SizeOfColorStack;
|
||||
short SizeOfStyleVarStack;
|
||||
short SizeOfFontStack;
|
||||
short SizeOfFocusScopeStack;
|
||||
short SizeOfGroupStack;
|
||||
short SizeOfBeginPopupStack;
|
||||
ImGuiID ID;
|
||||
ImS8 QueryFrameCount; // >= 1: Query in progress
|
||||
bool QuerySuccess; // Obtained result from DebugHookIdInfo()
|
||||
char Desc[58]; // Arbitrarily sized buffer to hold a result (FIXME: could replace Results[] with a chunk stream?)
|
||||
|
||||
ImGuiStackSizes() { memset(this, 0, sizeof(*this)); }
|
||||
void SetToCurrentState();
|
||||
void CompareWithCurrentState();
|
||||
ImGuiStackLevelInfo() { memset(this, 0, sizeof(*this)); }
|
||||
};
|
||||
|
||||
// State for Stack tool queries
|
||||
struct ImGuiStackTool
|
||||
{
|
||||
int LastActiveFrame;
|
||||
int StackLevel; // -1: query stack and resize Results, >= 0: individual stack level
|
||||
ImGuiID QueryId; // ID to query details for
|
||||
ImVector<ImGuiStackLevelInfo> Results;
|
||||
|
||||
ImGuiStackTool() { memset(this, 0, sizeof(*this)); }
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -1600,7 +1690,6 @@ struct ImGuiContext
|
||||
bool WithinEndChild; // Set within EndChild()
|
||||
bool GcCompactAll; // Request full GC
|
||||
bool TestEngineHookItems; // Will call test engine hooks: ImGuiTestEngineHook_ItemAdd(), ImGuiTestEngineHook_ItemInfo(), ImGuiTestEngineHook_Log()
|
||||
ImGuiID TestEngineHookIdInfo; // Will call test engine hooks: ImGuiTestEngineHook_IdInfo() from GetID()
|
||||
void* TestEngine; // Test engine user data
|
||||
|
||||
// Windows state
|
||||
@ -1614,13 +1703,14 @@ struct ImGuiContext
|
||||
ImGuiWindow* CurrentWindow; // Window being drawn into
|
||||
ImGuiWindow* HoveredWindow; // Window the mouse is hovering. Will typically catch mouse inputs.
|
||||
ImGuiWindow* HoveredWindowUnderMovingWindow; // Hovered window ignoring MovingWindow. Only set if MovingWindow is set.
|
||||
ImGuiDockNode* HoveredDockNode; // Hovered dock node.
|
||||
ImGuiDockNode* HoveredDockNode; // [Debug] Hovered dock node.
|
||||
ImGuiWindow* MovingWindow; // Track the window we clicked on (in order to preserve focus). The actual window that is moved is generally MovingWindow->RootWindowDockTree.
|
||||
ImGuiWindow* WheelingWindow; // Track the window we started mouse-wheeling on. Until a timer elapse or mouse has moved, generally keep scrolling the same window even if during the course of scrolling the mouse ends up hovering a child window.
|
||||
ImVec2 WheelingWindowRefMousePos;
|
||||
float WheelingWindowTimer;
|
||||
|
||||
// Item/widgets state and tracking information
|
||||
ImGuiID DebugHookIdInfo; // Will call core hooks: DebugHookIdInfo() from GetID functions, used by Stack Tool [next HoveredId/ActiveId to not pull in an extra cache-line]
|
||||
ImGuiID HoveredId; // Hovered widget, filled during the frame
|
||||
ImGuiID HoveredIdPreviousFrame;
|
||||
bool HoveredIdAllowOverlap;
|
||||
@ -1668,6 +1758,7 @@ struct ImGuiContext
|
||||
ImVector<ImGuiGroupData>GroupStack; // Stack for BeginGroup()/EndGroup() - not inherited by Begin()
|
||||
ImVector<ImGuiPopupData>OpenPopupStack; // Which popups are open (persistent)
|
||||
ImVector<ImGuiPopupData>BeginPopupStack; // Which level of BeginPopup() we are in (reset every frame)
|
||||
int BeginMenuCount;
|
||||
|
||||
// Viewports
|
||||
ImVector<ImGuiViewportP*> Viewports; // Active viewports (always 1+, and generally 1 unless multi-viewports are enabled). Each viewports hold their copy of ImDrawData.
|
||||
@ -1686,35 +1777,44 @@ struct ImGuiContext
|
||||
ImGuiID NavActivateId; // ~~ (g.ActiveId == 0) && IsNavInputPressed(ImGuiNavInput_Activate) ? NavId : 0, also set when calling ActivateItem()
|
||||
ImGuiID NavActivateDownId; // ~~ IsNavInputDown(ImGuiNavInput_Activate) ? NavId : 0
|
||||
ImGuiID NavActivatePressedId; // ~~ IsNavInputPressed(ImGuiNavInput_Activate) ? NavId : 0
|
||||
ImGuiID NavInputId; // ~~ IsNavInputPressed(ImGuiNavInput_Input) ? NavId : 0
|
||||
ImGuiID NavJustTabbedId; // Just tabbed to this id.
|
||||
ImGuiID NavActivateInputId; // ~~ IsNavInputPressed(ImGuiNavInput_Input) ? NavId : 0; ImGuiActivateFlags_PreferInput will be set and NavActivateId will be 0.
|
||||
ImGuiActivateFlags NavActivateFlags;
|
||||
ImGuiID NavJustMovedToId; // Just navigated to this id (result of a successfully MoveRequest).
|
||||
ImGuiID NavJustMovedToFocusScopeId; // Just navigated to this focus scope id (result of a successfully MoveRequest).
|
||||
ImGuiKeyModFlags NavJustMovedToKeyMods;
|
||||
ImGuiID NavNextActivateId; // Set by ActivateItem(), queued until next frame.
|
||||
ImGuiActivateFlags NavNextActivateFlags;
|
||||
ImGuiInputSource NavInputSource; // Keyboard or Gamepad mode? THIS WILL ONLY BE None or NavGamepad or NavKeyboard.
|
||||
ImRect NavScoringRect; // Rectangle used for scoring, in screen space. Based of window->NavRectRel[], modified for directional navigation scoring.
|
||||
int NavScoringCount; // Metrics for debugging
|
||||
ImGuiNavLayer NavLayer; // Layer we are navigating on. For now the system is hard-coded for 0=main contents and 1=menu/title bar, may expose layers later.
|
||||
int NavIdTabCounter; // == NavWindow->DC.FocusIdxTabCounter at time of NavId processing
|
||||
bool NavIdIsAlive; // Nav widget has been seen this frame ~~ NavRectRel is valid
|
||||
bool NavMousePosDirty; // When set we will update mouse position if (io.ConfigFlags & ImGuiConfigFlags_NavEnableSetMousePos) if set (NB: this not enabled by default)
|
||||
bool NavDisableHighlight; // When user starts using mouse, we hide gamepad/keyboard highlight (NB: but they are still available, which is why NavDisableHighlight isn't always != NavDisableMouseHover)
|
||||
bool NavDisableMouseHover; // When user starts using gamepad/keyboard, we hide mouse hovering highlight until mouse is touched again.
|
||||
|
||||
// Navigation: Init & Move Requests
|
||||
bool NavAnyRequest; // ~~ NavMoveRequest || NavInitRequest this is to perform early out in ItemAdd()
|
||||
bool NavInitRequest; // Init request for appearing window to select first item
|
||||
bool NavInitRequestFromMove;
|
||||
ImGuiID NavInitResultId; // Init request result (first item of the window, or one for which SetItemDefaultFocus() was called)
|
||||
ImRect NavInitResultRectRel; // Init request result rectangle (relative to parent window)
|
||||
bool NavMoveRequest; // Move request for this frame
|
||||
bool NavMoveRequestForwardToNextFrame;
|
||||
ImGuiNavMoveFlags NavMoveRequestFlags;
|
||||
ImGuiKeyModFlags NavMoveRequestKeyMods;
|
||||
ImGuiDir NavMoveDir, NavMoveDirLast; // Direction of the move request (left/right/up/down), direction of the previous move request
|
||||
bool NavMoveSubmitted; // Move request submitted, will process result on next NewFrame()
|
||||
bool NavMoveScoringItems; // Move request submitted, still scoring incoming items
|
||||
bool NavMoveForwardToNextFrame;
|
||||
ImGuiNavMoveFlags NavMoveFlags;
|
||||
ImGuiScrollFlags NavMoveScrollFlags;
|
||||
ImGuiKeyModFlags NavMoveKeyMods;
|
||||
ImGuiDir NavMoveDir; // Direction of the move request (left/right/up/down)
|
||||
ImGuiDir NavMoveDirForDebug;
|
||||
ImGuiDir NavMoveClipDir; // FIXME-NAV: Describe the purpose of this better. Might want to rename?
|
||||
ImRect NavScoringRect; // Rectangle used for scoring, in screen space. Based of window->NavRectRel[], modified for directional navigation scoring.
|
||||
ImRect NavScoringNoClipRect; // Some nav operations (such as PageUp/PageDown) enforce a region which clipper will attempt to always keep submitted
|
||||
int NavScoringDebugCount; // Metrics for debugging
|
||||
int NavTabbingDir; // Generally -1 or +1, 0 when tabbing without a nav id
|
||||
int NavTabbingCounter; // >0 when counting items for tabbing
|
||||
ImGuiNavItemData NavMoveResultLocal; // Best move request candidate within NavWindow
|
||||
ImGuiNavItemData NavMoveResultLocalVisibleSet; // Best move request candidate within NavWindow that are mostly visible (when using ImGuiNavMoveFlags_AlsoScoreVisibleSet flag)
|
||||
ImGuiNavItemData NavMoveResultLocalVisible; // Best move request candidate within NavWindow that are mostly visible (when using ImGuiNavMoveFlags_AlsoScoreVisibleSet flag)
|
||||
ImGuiNavItemData NavMoveResultOther; // Best move request candidate within NavWindow's flattened hierarchy (when using ImGuiWindowFlags_NavFlattened flag)
|
||||
ImGuiNavItemData NavTabbingResultFirst; // First tabbing request candidate within NavWindow and flattened hierarchy
|
||||
|
||||
// Navigation: Windowing (CTRL+TAB for list, or Menu button + keys or directional pads to move/resize)
|
||||
ImGuiWindow* NavWindowingTarget; // Target window when doing CTRL+Tab (or Pad Menu + FocusPrev/Next), this window is temporarily displayed top-most!
|
||||
@ -1724,15 +1824,6 @@ struct ImGuiContext
|
||||
float NavWindowingHighlightAlpha;
|
||||
bool NavWindowingToggleLayer;
|
||||
|
||||
// Legacy Focus/Tabbing system (older than Nav, active even if Nav is disabled, misnamed. FIXME-NAV: This needs a redesign!)
|
||||
ImGuiWindow* TabFocusRequestCurrWindow; //
|
||||
ImGuiWindow* TabFocusRequestNextWindow; //
|
||||
int TabFocusRequestCurrCounterRegular; // Any item being requested for focus, stored as an index (we on layout to be stable between the frame pressing TAB and the next frame, semi-ouch)
|
||||
int TabFocusRequestCurrCounterTabStop; // Tab item being requested for focus, stored as an index
|
||||
int TabFocusRequestNextCounterRegular; // Stored for next frame
|
||||
int TabFocusRequestNextCounterTabStop; // "
|
||||
bool TabFocusPressed; // Set in NewFrame() when user pressed Tab
|
||||
|
||||
// Render
|
||||
float DimBgRatio; // 0.0..1.0 animation when fading in a dimming background (for modal window and CTRL+TAB list)
|
||||
ImGuiMouseCursor MouseCursor;
|
||||
@ -1756,11 +1847,15 @@ struct ImGuiContext
|
||||
ImVector<unsigned char> DragDropPayloadBufHeap; // We don't expose the ImVector<> directly, ImGuiPayload only holds pointer+size
|
||||
unsigned char DragDropPayloadBufLocal[16]; // Local buffer for small payloads
|
||||
|
||||
// Clipper
|
||||
int ClipperTempDataStacked;
|
||||
ImVector<ImGuiListClipperData> ClipperTempData;
|
||||
|
||||
// Table
|
||||
ImGuiTable* CurrentTable;
|
||||
int CurrentTableStackIdx;
|
||||
ImPool<ImGuiTable> Tables;
|
||||
ImVector<ImGuiTableTempData> TablesTempDataStack;
|
||||
int TablesTempDataStacked; // Temporary table data size (because we leave previous instances undestructed, we generally don't use TablesTempData.Size)
|
||||
ImVector<ImGuiTableTempData> TablesTempData; // Temporary table data (buffers reused/shared across instances, support nesting)
|
||||
ImPool<ImGuiTable> Tables; // Persistent table data
|
||||
ImVector<float> TablesLastTimeActive; // Last used timestamp of each tables (SOA, for efficient GC)
|
||||
ImVector<ImDrawChannel> DrawChannelsTempMergeBuffer;
|
||||
|
||||
@ -1771,14 +1866,14 @@ struct ImGuiContext
|
||||
ImVector<ImGuiShrinkWidthItem> ShrinkWidthBuffer;
|
||||
|
||||
// Widget state
|
||||
ImVec2 LastValidMousePos;
|
||||
ImVec2 MouseLastValidPos;
|
||||
ImGuiInputTextState InputTextState;
|
||||
ImFont InputTextPasswordFont;
|
||||
ImGuiID TempInputId; // Temporary text input when CTRL+clicking on a slider, etc.
|
||||
ImGuiColorEditFlags ColorEditOptions; // Store user options for color edit widgets
|
||||
float ColorEditLastHue; // Backup of last Hue associated to LastColor[3], so we can restore Hue in lossy RGB<>HSV round trips
|
||||
float ColorEditLastSat; // Backup of last Saturation associated to LastColor[3], so we can restore Saturation in lossy RGB<>HSV round trips
|
||||
float ColorEditLastColor[3];
|
||||
float ColorEditLastHue; // Backup of last Hue associated to LastColor, so we can restore Hue in lossy RGB<>HSV round trips
|
||||
float ColorEditLastSat; // Backup of last Saturation associated to LastColor, so we can restore Saturation in lossy RGB<>HSV round trips
|
||||
ImU32 ColorEditLastColor; // RGB value with alpha set to 0.
|
||||
ImVec4 ColorPickerRef; // Initial/reference color at the time of opening the color picker.
|
||||
ImGuiComboPreviewData ComboPreviewData;
|
||||
float SliderCurrentAccum; // Accumulated slider delta when using navigation controls.
|
||||
@ -1786,9 +1881,10 @@ struct ImGuiContext
|
||||
bool DragCurrentAccumDirty;
|
||||
float DragCurrentAccum; // Accumulator for dragging modification. Always high-precision, not rounded by end-user precision settings
|
||||
float DragSpeedDefaultRatio; // If speed == 0.0f, uses (max-min) * DragSpeedDefaultRatio
|
||||
float DisabledAlphaBackup; // Backup for style.Alpha for BeginDisabled()
|
||||
float ScrollbarClickDeltaToGrabCenter; // Distance between mouse and center of grab box, normalized in parent space. Use storage?
|
||||
int TooltipOverrideCount;
|
||||
float DisabledAlphaBackup; // Backup for style.Alpha for BeginDisabled()
|
||||
short DisabledStackSize;
|
||||
short TooltipOverrideCount;
|
||||
float TooltipSlowDelay; // Time before slow tooltips appears (FIXME: This is temporary until we merge in tooltip timer+priority work)
|
||||
ImVector<char> ClipboardHandlerData; // If no custom clipboard handler is defined
|
||||
ImVector<ImGuiID> MenusIdSubmittedThisFrame; // A list of menu IDs that were rendered at least once
|
||||
@ -1828,8 +1924,9 @@ struct ImGuiContext
|
||||
|
||||
// Debug Tools
|
||||
bool DebugItemPickerActive; // Item picker is active (started with DebugStartItemPicker())
|
||||
ImGuiID DebugItemPickerBreakId; // Will call IM_DEBUG_BREAK() when encountering this id
|
||||
ImGuiID DebugItemPickerBreakId; // Will call IM_DEBUG_BREAK() when encountering this ID
|
||||
ImGuiMetricsConfig DebugMetricsConfig;
|
||||
ImGuiStackTool DebugStackTool;
|
||||
|
||||
// Misc
|
||||
float FramerateSecPerFrame[120]; // Calculate estimate of framerate for user over the last 2 seconds.
|
||||
@ -1855,7 +1952,6 @@ struct ImGuiContext
|
||||
WithinFrameScope = WithinFrameScopeWithImplicitWindow = WithinEndChild = false;
|
||||
GcCompactAll = false;
|
||||
TestEngineHookItems = false;
|
||||
TestEngineHookIdInfo = 0;
|
||||
TestEngine = NULL;
|
||||
|
||||
WindowsActiveCount = 0;
|
||||
@ -1867,6 +1963,7 @@ struct ImGuiContext
|
||||
WheelingWindow = NULL;
|
||||
WheelingWindowTimer = 0.0f;
|
||||
|
||||
DebugHookIdInfo = 0;
|
||||
HoveredId = HoveredIdPreviousFrame = 0;
|
||||
HoveredIdAllowOverlap = false;
|
||||
HoveredIdUsingMouseWheel = HoveredIdPreviousFrameUsingMouseWheel = false;
|
||||
@ -1897,6 +1994,7 @@ struct ImGuiContext
|
||||
LastActiveIdTimer = 0.0f;
|
||||
|
||||
CurrentItemFlags = ImGuiItemFlags_None;
|
||||
BeginMenuCount = 0;
|
||||
|
||||
CurrentDpiScale = 0.0f;
|
||||
CurrentViewport = NULL;
|
||||
@ -1905,14 +2003,12 @@ struct ImGuiContext
|
||||
ViewportFrontMostStampCount = 0;
|
||||
|
||||
NavWindow = NULL;
|
||||
NavId = NavFocusScopeId = NavActivateId = NavActivateDownId = NavActivatePressedId = NavInputId = 0;
|
||||
NavJustTabbedId = NavJustMovedToId = NavJustMovedToFocusScopeId = NavNextActivateId = 0;
|
||||
NavId = NavFocusScopeId = NavActivateId = NavActivateDownId = NavActivatePressedId = NavActivateInputId = 0;
|
||||
NavJustMovedToId = NavJustMovedToFocusScopeId = NavNextActivateId = 0;
|
||||
NavActivateFlags = NavNextActivateFlags = ImGuiActivateFlags_None;
|
||||
NavJustMovedToKeyMods = ImGuiKeyModFlags_None;
|
||||
NavInputSource = ImGuiInputSource_None;
|
||||
NavScoringRect = ImRect();
|
||||
NavScoringCount = 0;
|
||||
NavLayer = ImGuiNavLayer_Main;
|
||||
NavIdTabCounter = INT_MAX;
|
||||
NavIdIsAlive = false;
|
||||
NavMousePosDirty = false;
|
||||
NavDisableHighlight = true;
|
||||
@ -1921,21 +2017,21 @@ struct ImGuiContext
|
||||
NavInitRequest = false;
|
||||
NavInitRequestFromMove = false;
|
||||
NavInitResultId = 0;
|
||||
NavMoveRequest = false;
|
||||
NavMoveRequestForwardToNextFrame = false;
|
||||
NavMoveRequestFlags = ImGuiNavMoveFlags_None;
|
||||
NavMoveRequestKeyMods = ImGuiKeyModFlags_None;
|
||||
NavMoveDir = NavMoveDirLast = NavMoveClipDir = ImGuiDir_None;
|
||||
NavMoveSubmitted = false;
|
||||
NavMoveScoringItems = false;
|
||||
NavMoveForwardToNextFrame = false;
|
||||
NavMoveFlags = ImGuiNavMoveFlags_None;
|
||||
NavMoveScrollFlags = ImGuiScrollFlags_None;
|
||||
NavMoveKeyMods = ImGuiKeyModFlags_None;
|
||||
NavMoveDir = NavMoveDirForDebug = NavMoveClipDir = ImGuiDir_None;
|
||||
NavScoringDebugCount = 0;
|
||||
NavTabbingDir = 0;
|
||||
NavTabbingCounter = 0;
|
||||
|
||||
NavWindowingTarget = NavWindowingTargetAnim = NavWindowingListWindow = NULL;
|
||||
NavWindowingTimer = NavWindowingHighlightAlpha = 0.0f;
|
||||
NavWindowingToggleLayer = false;
|
||||
|
||||
TabFocusRequestCurrWindow = TabFocusRequestNextWindow = NULL;
|
||||
TabFocusRequestCurrCounterRegular = TabFocusRequestCurrCounterTabStop = INT_MAX;
|
||||
TabFocusRequestNextCounterRegular = TabFocusRequestNextCounterTabStop = INT_MAX;
|
||||
TabFocusPressed = false;
|
||||
|
||||
DimBgRatio = 0.0f;
|
||||
MouseCursor = ImGuiMouseCursor_Arrow;
|
||||
|
||||
@ -1951,21 +2047,23 @@ struct ImGuiContext
|
||||
DragDropHoldJustPressedId = 0;
|
||||
memset(DragDropPayloadBufLocal, 0, sizeof(DragDropPayloadBufLocal));
|
||||
|
||||
ClipperTempDataStacked = 0;
|
||||
|
||||
CurrentTable = NULL;
|
||||
CurrentTableStackIdx = -1;
|
||||
TablesTempDataStacked = 0;
|
||||
CurrentTabBar = NULL;
|
||||
|
||||
LastValidMousePos = ImVec2(0.0f, 0.0f);
|
||||
TempInputId = 0;
|
||||
ColorEditOptions = ImGuiColorEditFlags_DefaultOptions_;
|
||||
ColorEditLastHue = ColorEditLastSat = 0.0f;
|
||||
ColorEditLastColor[0] = ColorEditLastColor[1] = ColorEditLastColor[2] = FLT_MAX;
|
||||
ColorEditLastColor = 0;
|
||||
SliderCurrentAccum = 0.0f;
|
||||
SliderCurrentAccumDirty = false;
|
||||
DragCurrentAccumDirty = false;
|
||||
DragCurrentAccum = 0.0f;
|
||||
DragSpeedDefaultRatio = 1.0f / 100.0f;
|
||||
DisabledAlphaBackup = 0.0f;
|
||||
DisabledStackSize = 0;
|
||||
ScrollbarClickDeltaToGrabCenter = 0.0f;
|
||||
TooltipOverrideCount = 0;
|
||||
TooltipSlowDelay = 0.50f;
|
||||
@ -2020,6 +2118,7 @@ struct IMGUI_API ImGuiWindowTempData
|
||||
ImVec1 Indent; // Indentation / start position from left of window (increased by TreePush/TreePop, etc.)
|
||||
ImVec1 ColumnsOffset; // Offset to the current column (if ColumnsCurrent > 0). FIXME: This and the above should be a stack to allow use cases like Tree->Column->Tree. Need revamp columns API.
|
||||
ImVec1 GroupOffset;
|
||||
ImVec2 CursorStartPosLossyness;// Record the loss of precision of CursorStartPos due to really large scrolling amount. This is used by clipper to compensentate and fix the most common use case of large scroll area.
|
||||
|
||||
// Keyboard/Gamepad navigation
|
||||
ImGuiNavLayer NavLayerCurrent; // Current layer, 0..31 (we currently only use 0..1)
|
||||
@ -2041,8 +2140,6 @@ struct IMGUI_API ImGuiWindowTempData
|
||||
int CurrentTableIdx; // Current table index (into g.Tables)
|
||||
ImGuiLayoutType LayoutType;
|
||||
ImGuiLayoutType ParentLayoutType; // Layout type of parent window at the time of Begin()
|
||||
int FocusCounterRegular; // (Legacy Focus/Tabbing system) Sequential counter, start at -1 and increase as assigned via FocusableItemRegister() (FIXME-NAV: Needs redesign)
|
||||
int FocusCounterTabStop; // (Legacy Focus/Tabbing system) Same, but only count widgets which you can Tab through.
|
||||
|
||||
// Local parameters stacks
|
||||
// We store the current settings outside of the vectors to increase memory locality (reduce cache misses). The vectors are rarely modified. Also it allows us to not heap allocate for short-lived windows which are not using those settings.
|
||||
@ -2050,7 +2147,6 @@ struct IMGUI_API ImGuiWindowTempData
|
||||
float TextWrapPos; // Current text wrap pos.
|
||||
ImVector<float> ItemWidthStack; // Store item widths to restore (attention: .back() is not == ItemWidth)
|
||||
ImVector<float> TextWrapPosStack; // Store text wrap pos to restore (attention: .back() is not == TextWrapPos)
|
||||
ImGuiStackSizes StackSizesOnBegin; // Store size of various stacks for asserting
|
||||
};
|
||||
|
||||
// Storage for one window
|
||||
@ -2093,6 +2189,7 @@ struct IMGUI_API ImGuiWindow
|
||||
bool Appearing; // Set during the frame where the window is appearing (or re-appearing)
|
||||
bool Hidden; // Do not display (== HiddenFrames*** > 0)
|
||||
bool IsFallbackWindow; // Set on the "Debug##Default" window.
|
||||
bool IsExplicitChild; // Set when passed _ChildWindow, left to false by BeginDocked()
|
||||
bool HasCloseButton; // Set when the window has a close button (p_open != NULL)
|
||||
signed char ResizeBorderHeld; // Current border being held for resize (-1: none, otherwise 0-3)
|
||||
short BeginCount; // Number of Begin() during the current frame (generally 0 or 1, 1+ if appending via multiple Begin/End pairs)
|
||||
@ -2142,8 +2239,10 @@ struct IMGUI_API ImGuiWindow
|
||||
|
||||
ImDrawList* DrawList; // == &DrawListInst (for backward compatibility reason with code using imgui_internal.h we keep this a pointer)
|
||||
ImDrawList DrawListInst;
|
||||
ImGuiWindow* ParentWindow; // If we are a child _or_ popup window, this is pointing to our parent. Otherwise NULL.
|
||||
ImGuiWindow* RootWindow; // Point to ourself or first ancestor that is not a child window. Doesn't cross through dock nodes. We use this so IsWindowFocused() can behave consistently regardless of docking state.
|
||||
ImGuiWindow* ParentWindow; // If we are a child _or_ popup _or_ docked window, this is pointing to our parent. Otherwise NULL.
|
||||
ImGuiWindow* ParentWindowInBeginStack;
|
||||
ImGuiWindow* RootWindow; // Point to ourself or first ancestor that is not a child window. Doesn't cross through popups/dock nodes.
|
||||
ImGuiWindow* RootWindowPopupTree; // Point to ourself or first ancestor that is not a child window. Cross through popups parent<>child.
|
||||
ImGuiWindow* RootWindowDockTree; // Point to ourself or first ancestor that is not a child window. Cross through dock nodes.
|
||||
ImGuiWindow* RootWindowForTitleBarHighlight; // Point to ourself or first ancestor which will display TitleBgActive color when this window is active.
|
||||
ImGuiWindow* RootWindowForNav; // Point to ourself or first ancestor which doesn't have the NavFlattened flag.
|
||||
@ -2359,7 +2458,7 @@ struct ImGuiTableCellData
|
||||
};
|
||||
|
||||
// FIXME-TABLE: more transient data could be stored in a per-stacked table structure: DrawSplitter, SortSpecs, incoming RowData
|
||||
struct ImGuiTable
|
||||
struct IMGUI_API ImGuiTable
|
||||
{
|
||||
ImGuiID ID;
|
||||
ImGuiTableFlags Flags;
|
||||
@ -2465,14 +2564,14 @@ struct ImGuiTable
|
||||
bool MemoryCompacted;
|
||||
bool HostSkipItems; // Backup of InnerWindow->SkipItem at the end of BeginTable(), because we will overwrite InnerWindow->SkipItem on a per-column basis
|
||||
|
||||
IMGUI_API ImGuiTable() { memset(this, 0, sizeof(*this)); LastFrameActive = -1; }
|
||||
IMGUI_API ~ImGuiTable() { IM_FREE(RawData); }
|
||||
ImGuiTable() { memset(this, 0, sizeof(*this)); LastFrameActive = -1; }
|
||||
~ImGuiTable() { IM_FREE(RawData); }
|
||||
};
|
||||
|
||||
// Transient data that are only needed between BeginTable() and EndTable(), those buffers are shared (1 per level of stacked table).
|
||||
// - Accessing those requires chasing an extra pointer so for very frequently used data we leave them in the main table structure.
|
||||
// - We also leave out of this structure data that tend to be particularly useful for debugging/metrics.
|
||||
struct ImGuiTableTempData
|
||||
struct IMGUI_API ImGuiTableTempData
|
||||
{
|
||||
int TableIndex; // Index in g.Tables.Buf[] pool
|
||||
float LastTimeActive; // Last timestamp this structure was used
|
||||
@ -2489,7 +2588,7 @@ struct ImGuiTableTempData
|
||||
float HostBackupItemWidth; // Backup of OuterWindow->DC.ItemWidth at the end of BeginTable()
|
||||
int HostBackupItemWidthStackSize;//Backup of OuterWindow->DC.ItemWidthStack.Size at the end of BeginTable()
|
||||
|
||||
IMGUI_API ImGuiTableTempData() { memset(this, 0, sizeof(*this)); LastTimeActive = -1.0f; }
|
||||
ImGuiTableTempData() { memset(this, 0, sizeof(*this)); LastTimeActive = -1.0f; }
|
||||
};
|
||||
|
||||
// sizeof() ~ 12
|
||||
@ -2548,13 +2647,16 @@ namespace ImGui
|
||||
IMGUI_API ImGuiWindow* FindWindowByName(const char* name);
|
||||
IMGUI_API void UpdateWindowParentAndRootLinks(ImGuiWindow* window, ImGuiWindowFlags flags, ImGuiWindow* parent_window);
|
||||
IMGUI_API ImVec2 CalcWindowNextAutoFitSize(ImGuiWindow* window);
|
||||
IMGUI_API bool IsWindowChildOf(ImGuiWindow* window, ImGuiWindow* potential_parent);
|
||||
IMGUI_API bool IsWindowChildOf(ImGuiWindow* window, ImGuiWindow* potential_parent, bool popup_hierarchy, bool dock_hierarchy);
|
||||
IMGUI_API bool IsWindowWithinBeginStackOf(ImGuiWindow* window, ImGuiWindow* potential_parent);
|
||||
IMGUI_API bool IsWindowAbove(ImGuiWindow* potential_above, ImGuiWindow* potential_below);
|
||||
IMGUI_API bool IsWindowNavFocusable(ImGuiWindow* window);
|
||||
IMGUI_API void SetWindowPos(ImGuiWindow* window, const ImVec2& pos, ImGuiCond cond = 0);
|
||||
IMGUI_API void SetWindowSize(ImGuiWindow* window, const ImVec2& size, ImGuiCond cond = 0);
|
||||
IMGUI_API void SetWindowCollapsed(ImGuiWindow* window, bool collapsed, ImGuiCond cond = 0);
|
||||
IMGUI_API void SetWindowHitTestHole(ImGuiWindow* window, const ImVec2& pos, const ImVec2& size);
|
||||
inline ImRect WindowRectAbsToRel(ImGuiWindow* window, const ImRect& r) { ImVec2 off = window->DC.CursorStartPos; return ImRect(r.Min.x - off.x, r.Min.y - off.y, r.Max.x - off.x, r.Max.y - off.y); }
|
||||
inline ImRect WindowRectRelToAbs(ImGuiWindow* window, const ImRect& r) { ImVec2 off = window->DC.CursorStartPos; return ImRect(r.Min.x + off.x, r.Min.y + off.y, r.Max.x + off.x, r.Max.y + off.y); }
|
||||
|
||||
// Windows: Display Order and Focus Order
|
||||
IMGUI_API void FocusWindow(ImGuiWindow* window);
|
||||
@ -2562,6 +2664,9 @@ namespace ImGui
|
||||
IMGUI_API void BringWindowToFocusFront(ImGuiWindow* window);
|
||||
IMGUI_API void BringWindowToDisplayFront(ImGuiWindow* window);
|
||||
IMGUI_API void BringWindowToDisplayBack(ImGuiWindow* window);
|
||||
IMGUI_API void BringWindowToDisplayBehind(ImGuiWindow* window, ImGuiWindow* above_window);
|
||||
IMGUI_API int FindWindowDisplayIndex(ImGuiWindow* window);
|
||||
IMGUI_API ImGuiWindow* FindBottomMostVisibleWindowWithinBeginStack(ImGuiWindow* window);
|
||||
|
||||
// Fonts, drawing
|
||||
IMGUI_API void SetCurrentFont(ImFont* font);
|
||||
@ -2606,7 +2711,14 @@ namespace ImGui
|
||||
IMGUI_API void SetScrollY(ImGuiWindow* window, float scroll_y);
|
||||
IMGUI_API void SetScrollFromPosX(ImGuiWindow* window, float local_x, float center_x_ratio);
|
||||
IMGUI_API void SetScrollFromPosY(ImGuiWindow* window, float local_y, float center_y_ratio);
|
||||
IMGUI_API ImVec2 ScrollToBringRectIntoView(ImGuiWindow* window, const ImRect& item_rect);
|
||||
|
||||
// Early work-in-progress API (ScrollToItem() will become public)
|
||||
IMGUI_API void ScrollToItem(ImGuiScrollFlags flags = 0);
|
||||
IMGUI_API void ScrollToRect(ImGuiWindow* window, const ImRect& rect, ImGuiScrollFlags flags = 0);
|
||||
IMGUI_API ImVec2 ScrollToRectEx(ImGuiWindow* window, const ImRect& rect, ImGuiScrollFlags flags = 0);
|
||||
//#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||
inline void ScrollToBringRectIntoView(ImGuiWindow* window, const ImRect& rect) { ScrollToRect(window, rect, ImGuiScrollFlags_KeepVisibleEdgeY); }
|
||||
//#endif
|
||||
|
||||
// Basic Accessors
|
||||
inline ImGuiID GetItemID() { ImGuiContext& g = *GImGui; return g.LastItemData.ID; } // Get ID of last item (~~ often same ImGui::GetID(label) beforehand)
|
||||
@ -2627,10 +2739,9 @@ namespace ImGui
|
||||
// Basic Helpers for widget code
|
||||
IMGUI_API void ItemSize(const ImVec2& size, float text_baseline_y = -1.0f);
|
||||
IMGUI_API void ItemSize(const ImRect& bb, float text_baseline_y = -1.0f);
|
||||
IMGUI_API bool ItemAdd(const ImRect& bb, ImGuiID id, const ImRect* nav_bb = NULL, ImGuiItemAddFlags flags = 0);
|
||||
IMGUI_API bool ItemAdd(const ImRect& bb, ImGuiID id, const ImRect* nav_bb = NULL, ImGuiItemFlags extra_flags = 0);
|
||||
IMGUI_API bool ItemHoverable(const ImRect& bb, ImGuiID id);
|
||||
IMGUI_API void ItemFocusable(ImGuiWindow* window, ImGuiID id);
|
||||
IMGUI_API bool IsClippedEx(const ImRect& bb, ImGuiID id, bool clip_even_when_logged);
|
||||
IMGUI_API bool IsClippedEx(const ImRect& bb, ImGuiID id);
|
||||
IMGUI_API void SetLastItemData(ImGuiID item_id, ImGuiItemFlags in_flags, ImGuiItemStatusFlags status_flags, const ImRect& item_rect);
|
||||
IMGUI_API ImVec2 CalcItemSize(ImVec2 size, float default_w, float default_h);
|
||||
IMGUI_API float CalcWrapWidthForPos(const ImVec2& pos, float wrap_pos_x);
|
||||
@ -2644,11 +2755,13 @@ namespace ImGui
|
||||
IMGUI_API void PopItemFlag();
|
||||
|
||||
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||
// Currently refactoring focus/nav/tabbing system
|
||||
// If you have old/custom copy-and-pasted widgets that used FocusableItemRegister():
|
||||
// (Old) IMGUI_VERSION_NUM < 18209: using 'ItemAdd(....)' and 'bool focused = FocusableItemRegister(...)'
|
||||
// (New) IMGUI_VERSION_NUM >= 18209: using 'ItemAdd(..., ImGuiItemAddFlags_Focusable)' and 'bool focused = (GetItemStatusFlags() & ImGuiItemStatusFlags_Focused) != 0'
|
||||
// (Old) IMGUI_VERSION_NUM < 18209: using 'ItemAdd(....)' and 'bool tab_focused = FocusableItemRegister(...)'
|
||||
// (Old) IMGUI_VERSION_NUM >= 18209: using 'ItemAdd(..., ImGuiItemAddFlags_Focusable)' and 'bool tab_focused = (GetItemStatusFlags() & ImGuiItemStatusFlags_Focused) != 0'
|
||||
// (New) IMGUI_VERSION_NUM >= 18413: using 'ItemAdd(..., ImGuiItemFlags_Inputable)' and 'bool tab_focused = (GetItemStatusFlags() & ImGuiItemStatusFlags_FocusedTabbing) != 0 || g.NavActivateInputId == id' (WIP)
|
||||
// Widget code are simplified as there's no need to call FocusableItemUnregister() while managing the transition from regular widget to TempInputText()
|
||||
inline bool FocusableItemRegister(ImGuiWindow* window, ImGuiID id) { IM_ASSERT(0); IM_UNUSED(window); IM_UNUSED(id); return false; } // -> pass ImGuiItemAddFlags_Focusable flag to ItemAdd()
|
||||
inline bool FocusableItemRegister(ImGuiWindow* window, ImGuiID id) { IM_ASSERT(0); IM_UNUSED(window); IM_UNUSED(id); return false; } // -> pass ImGuiItemAddFlags_Inputable flag to ItemAdd()
|
||||
inline void FocusableItemUnregister(ImGuiWindow* window) { IM_ASSERT(0); IM_UNUSED(window); } // -> unnecessary: TempInputText() uses ImGuiInputTextFlags_MergedItem
|
||||
#endif
|
||||
|
||||
@ -2663,16 +2776,18 @@ namespace ImGui
|
||||
IMGUI_API void OpenPopupEx(ImGuiID id, ImGuiPopupFlags popup_flags = ImGuiPopupFlags_None);
|
||||
IMGUI_API void ClosePopupToLevel(int remaining, bool restore_focus_to_window_under_popup);
|
||||
IMGUI_API void ClosePopupsOverWindow(ImGuiWindow* ref_window, bool restore_focus_to_window_under_popup);
|
||||
IMGUI_API void ClosePopupsExceptModals();
|
||||
IMGUI_API bool IsPopupOpen(ImGuiID id, ImGuiPopupFlags popup_flags);
|
||||
IMGUI_API bool BeginPopupEx(ImGuiID id, ImGuiWindowFlags extra_flags);
|
||||
IMGUI_API void BeginTooltipEx(ImGuiWindowFlags extra_flags, ImGuiTooltipFlags tooltip_flags);
|
||||
IMGUI_API void BeginTooltipEx(ImGuiTooltipFlags tooltip_flags, ImGuiWindowFlags extra_window_flags);
|
||||
IMGUI_API ImRect GetPopupAllowedExtentRect(ImGuiWindow* window);
|
||||
IMGUI_API ImGuiWindow* GetTopMostPopupModal();
|
||||
IMGUI_API ImGuiWindow* GetTopMostAndVisiblePopupModal();
|
||||
IMGUI_API ImVec2 FindBestWindowPosForPopup(ImGuiWindow* window);
|
||||
IMGUI_API ImVec2 FindBestWindowPosForPopupEx(const ImVec2& ref_pos, const ImVec2& size, ImGuiDir* last_dir, const ImRect& r_outer, const ImRect& r_avoid, ImGuiPopupPositionPolicy policy);
|
||||
IMGUI_API bool BeginViewportSideBar(const char* name, ImGuiViewport* viewport, ImGuiDir dir, float size, ImGuiWindowFlags window_flags);
|
||||
|
||||
// Menus
|
||||
IMGUI_API bool BeginViewportSideBar(const char* name, ImGuiViewport* viewport, ImGuiDir dir, float size, ImGuiWindowFlags window_flags);
|
||||
IMGUI_API bool BeginMenuEx(const char* label, const char* icon, bool enabled = true);
|
||||
IMGUI_API bool MenuItemEx(const char* label, const char* icon, const char* shortcut = NULL, bool selected = false, bool enabled = true);
|
||||
|
||||
@ -2683,8 +2798,11 @@ namespace ImGui
|
||||
|
||||
// Gamepad/Keyboard Navigation
|
||||
IMGUI_API void NavInitWindow(ImGuiWindow* window, bool force_reinit);
|
||||
IMGUI_API bool NavMoveRequestButNoResultYet(); // Should be called ~NavMoveRequestIsActiveButNoResultYet()
|
||||
IMGUI_API void NavMoveRequestForward(ImGuiDir move_dir, ImGuiDir clip_dir, ImGuiNavMoveFlags move_flags);
|
||||
IMGUI_API void NavInitRequestApplyResult();
|
||||
IMGUI_API bool NavMoveRequestButNoResultYet();
|
||||
IMGUI_API void NavMoveRequestSubmit(ImGuiDir move_dir, ImGuiDir clip_dir, ImGuiNavMoveFlags move_flags, ImGuiScrollFlags scroll_flags);
|
||||
IMGUI_API void NavMoveRequestForward(ImGuiDir move_dir, ImGuiDir clip_dir, ImGuiNavMoveFlags move_flags, ImGuiScrollFlags scroll_flags);
|
||||
IMGUI_API void NavMoveRequestResolveWithLastItem(ImGuiNavItemData* result);
|
||||
IMGUI_API void NavMoveRequestCancel();
|
||||
IMGUI_API void NavMoveRequestApplyResult();
|
||||
IMGUI_API void NavMoveRequestTryWrapping(ImGuiWindow* window, ImGuiNavMoveFlags move_flags);
|
||||
@ -2723,6 +2841,7 @@ namespace ImGui
|
||||
IMGUI_API void DockContextRebuildNodes(ImGuiContext* ctx);
|
||||
IMGUI_API void DockContextNewFrameUpdateUndocking(ImGuiContext* ctx);
|
||||
IMGUI_API void DockContextNewFrameUpdateDocking(ImGuiContext* ctx);
|
||||
IMGUI_API void DockContextEndFrame(ImGuiContext* ctx);
|
||||
IMGUI_API ImGuiID DockContextGenNodeID(ImGuiContext* ctx);
|
||||
IMGUI_API void DockContextQueueDock(ImGuiContext* ctx, ImGuiWindow* target, ImGuiDockNode* target_node, ImGuiWindow* payload, ImGuiDir split_dir, float split_ratio, bool split_outer);
|
||||
IMGUI_API void DockContextQueueUndockWindow(ImGuiContext* ctx, ImGuiWindow* window);
|
||||
@ -2731,6 +2850,7 @@ namespace ImGui
|
||||
IMGUI_API bool DockNodeBeginAmendTabBar(ImGuiDockNode* node);
|
||||
IMGUI_API void DockNodeEndAmendTabBar();
|
||||
inline ImGuiDockNode* DockNodeGetRootNode(ImGuiDockNode* node) { while (node->ParentNode) node = node->ParentNode; return node; }
|
||||
inline bool DockNodeIsInHierarchyOf(ImGuiDockNode* node, ImGuiDockNode* parent) { while (node) { if (node == parent) return true; node = node->ParentNode; } return false; }
|
||||
inline int DockNodeGetDepth(const ImGuiDockNode* node) { int depth = 0; while (node->ParentNode) { node = node->ParentNode; depth++; } return depth; }
|
||||
inline ImGuiID DockNodeGetWindowMenuButtonId(const ImGuiDockNode* node) { return ImHashStr("#COLLAPSE", 0, node->ID); }
|
||||
inline ImGuiDockNode* GetWindowDockNode() { ImGuiContext& g = *GImGui; return g.CurrentWindow->DockNode; }
|
||||
@ -2870,6 +2990,7 @@ namespace ImGui
|
||||
IMGUI_API void RenderArrowDockMenu(ImDrawList* draw_list, ImVec2 p_min, float sz, ImU32 col);
|
||||
IMGUI_API void RenderRectFilledRangeH(ImDrawList* draw_list, const ImRect& rect, ImU32 col, float x_start_norm, float x_end_norm, float rounding);
|
||||
IMGUI_API void RenderRectFilledWithHole(ImDrawList* draw_list, ImRect outer, ImRect inner, ImU32 col, float rounding);
|
||||
IMGUI_API ImDrawFlags CalcRoundingFlagsForRectInRect(const ImRect& r_in, const ImRect& r_outer, float threshold);
|
||||
|
||||
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||
// [1.71: 2019/06/07: Updating prototypes of some of the internal functions. Leaving those for reference for a short while]
|
||||
@ -2884,7 +3005,7 @@ namespace ImGui
|
||||
IMGUI_API bool CollapseButton(ImGuiID id, const ImVec2& pos, ImGuiDockNode* dock_node);
|
||||
IMGUI_API bool ArrowButtonEx(const char* str_id, ImGuiDir dir, ImVec2 size_arg, ImGuiButtonFlags flags = 0);
|
||||
IMGUI_API void Scrollbar(ImGuiAxis axis);
|
||||
IMGUI_API bool ScrollbarEx(const ImRect& bb, ImGuiID id, ImGuiAxis axis, float* p_scroll_v, float avail_v, float contents_v, ImDrawFlags flags);
|
||||
IMGUI_API bool ScrollbarEx(const ImRect& bb, ImGuiID id, ImGuiAxis axis, ImS64* p_scroll_v, ImS64 avail_v, ImS64 contents_v, ImDrawFlags flags);
|
||||
IMGUI_API bool ImageButtonEx(ImGuiID id, ImTextureID texture_id, const ImVec2& size, const ImVec2& uv0, const ImVec2& uv1, const ImVec2& padding, const ImVec4& bg_col, const ImVec4& tint_col);
|
||||
IMGUI_API ImRect GetWindowScrollbarRect(ImGuiWindow* window, ImGuiAxis axis);
|
||||
IMGUI_API ImGuiID GetWindowScrollbarID(ImGuiWindow* window, ImGuiAxis axis);
|
||||
@ -2898,7 +3019,7 @@ namespace ImGui
|
||||
IMGUI_API bool ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool* out_held, ImGuiButtonFlags flags = 0);
|
||||
IMGUI_API bool DragBehavior(ImGuiID id, ImGuiDataType data_type, void* p_v, float v_speed, const void* p_min, const void* p_max, const char* format, ImGuiSliderFlags flags);
|
||||
IMGUI_API bool SliderBehavior(const ImRect& bb, ImGuiID id, ImGuiDataType data_type, void* p_v, const void* p_min, const void* p_max, const char* format, ImGuiSliderFlags flags, ImRect* out_grab_bb);
|
||||
IMGUI_API bool SplitterBehavior(const ImRect& bb, ImGuiID id, ImGuiAxis axis, float* size1, float* size2, float min_size1, float min_size2, float hover_extend = 0.0f, float hover_visibility_delay = 0.0f);
|
||||
IMGUI_API bool SplitterBehavior(const ImRect& bb, ImGuiID id, ImGuiAxis axis, float* size1, float* size2, float min_size1, float min_size2, float hover_extend = 0.0f, float hover_visibility_delay = 0.0f, ImU32 bg_col = 0);
|
||||
IMGUI_API bool TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* label, const char* label_end = NULL);
|
||||
IMGUI_API bool TreeNodeBehaviorIsOpen(ImGuiID id, ImGuiTreeNodeFlags flags = 0); // Consume previous SetNextItemOpen() data, if any. May return true when logging
|
||||
IMGUI_API void TreePushOverrideID(ImGuiID id);
|
||||
@ -2947,10 +3068,12 @@ namespace ImGui
|
||||
|
||||
// Debug Tools
|
||||
IMGUI_API void ErrorCheckEndFrameRecover(ImGuiErrorLogCallback log_callback, void* user_data = NULL);
|
||||
IMGUI_API void ErrorCheckEndWindowRecover(ImGuiErrorLogCallback log_callback, void* user_data = NULL);
|
||||
inline void DebugDrawItemRect(ImU32 col = IM_COL32(255,0,0,255)) { ImGuiContext& g = *GImGui; ImGuiWindow* window = g.CurrentWindow; GetForegroundDrawList(window)->AddRect(g.LastItemData.Rect.Min, g.LastItemData.Rect.Max, col); }
|
||||
inline void DebugStartItemPicker() { ImGuiContext& g = *GImGui; g.DebugItemPickerActive = true; }
|
||||
|
||||
IMGUI_API void ShowFontAtlas(ImFontAtlas* atlas);
|
||||
IMGUI_API void DebugHookIdInfo(ImGuiID id, ImGuiDataType data_type, const void* data_id, const void* data_id_end);
|
||||
IMGUI_API void DebugNodeColumns(ImGuiOldColumns* columns);
|
||||
IMGUI_API void DebugNodeDockNode(ImGuiDockNode* node, const char* label);
|
||||
IMGUI_API void DebugNodeDrawList(ImGuiWindow* window, ImGuiViewportP* viewport, const ImDrawList* draw_list, const char* label);
|
||||
@ -2963,6 +3086,7 @@ namespace ImGui
|
||||
IMGUI_API void DebugNodeWindow(ImGuiWindow* window, const char* label);
|
||||
IMGUI_API void DebugNodeWindowSettings(ImGuiWindowSettings* settings);
|
||||
IMGUI_API void DebugNodeWindowsList(ImVector<ImGuiWindow*>* windows, const char* label);
|
||||
IMGUI_API void DebugNodeWindowsListByBeginStackParent(ImGuiWindow** windows, int windows_size, ImGuiWindow* parent_in_begin_stack);
|
||||
IMGUI_API void DebugNodeViewport(ImGuiViewportP* viewport);
|
||||
IMGUI_API void DebugRenderViewportThumbnail(ImDrawList* draw_list, ImGuiViewportP* viewport, const ImRect& bb);
|
||||
|
||||
@ -2997,14 +3121,12 @@ IMGUI_API void ImFontAtlasBuildMultiplyRectAlpha8(const unsigned char table
|
||||
#ifdef IMGUI_ENABLE_TEST_ENGINE
|
||||
extern void ImGuiTestEngineHook_ItemAdd(ImGuiContext* ctx, const ImRect& bb, ImGuiID id);
|
||||
extern void ImGuiTestEngineHook_ItemInfo(ImGuiContext* ctx, ImGuiID id, const char* label, ImGuiItemStatusFlags flags);
|
||||
extern void ImGuiTestEngineHook_IdInfo(ImGuiContext* ctx, ImGuiDataType data_type, ImGuiID id, const void* data_id);
|
||||
extern void ImGuiTestEngineHook_IdInfo(ImGuiContext* ctx, ImGuiDataType data_type, ImGuiID id, const void* data_id, const void* data_id_end);
|
||||
extern void ImGuiTestEngineHook_Log(ImGuiContext* ctx, const char* fmt, ...);
|
||||
extern const char* ImGuiTestEngine_FindItemDebugLabel(ImGuiContext* ctx, ImGuiID id);
|
||||
|
||||
#define IMGUI_TEST_ENGINE_ITEM_ADD(_BB,_ID) if (g.TestEngineHookItems) ImGuiTestEngineHook_ItemAdd(&g, _BB, _ID) // Register item bounding box
|
||||
#define IMGUI_TEST_ENGINE_ITEM_INFO(_ID,_LABEL,_FLAGS) if (g.TestEngineHookItems) ImGuiTestEngineHook_ItemInfo(&g, _ID, _LABEL, _FLAGS) // Register item label and status flags (optional)
|
||||
#define IMGUI_TEST_ENGINE_LOG(_FMT,...) if (g.TestEngineHookItems) ImGuiTestEngineHook_Log(&g, _FMT, __VA_ARGS__) // Custom log entry from user land into test log
|
||||
#define IMGUI_TEST_ENGINE_ID_INFO(_ID,_TYPE,_DATA) if (g.TestEngineHookIdInfo == _ID) ImGuiTestEngineHook_IdInfo(&g, _TYPE, _ID, (const void*)(_DATA));
|
||||
#define IMGUI_TEST_ENGINE_ID_INFO2(_ID,_TYPE,_DATA,_DATA2) if (g.TestEngineHookIdInfo == _ID) ImGuiTestEngineHook_IdInfo(&g, _TYPE, _ID, (const void*)(_DATA), (const void*)(_DATA2));
|
||||
#else
|
||||
#define IMGUI_TEST_ENGINE_ITEM_INFO(_ID,_LABEL,_FLAGS) ((void)0)
|
||||
#endif
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.85 WIP
|
||||
// dear imgui, v1.86
|
||||
// (tables and columns code)
|
||||
|
||||
/*
|
||||
@ -324,7 +324,7 @@ bool ImGui::BeginTableEx(const char* name, ImGuiID id, int columns_count, ImG
|
||||
const ImVec2 avail_size = GetContentRegionAvail();
|
||||
ImVec2 actual_outer_size = CalcItemSize(outer_size, ImMax(avail_size.x, 1.0f), use_child_window ? ImMax(avail_size.y, 1.0f) : 0.0f);
|
||||
ImRect outer_rect(outer_window->DC.CursorPos, outer_window->DC.CursorPos + actual_outer_size);
|
||||
if (use_child_window && IsClippedEx(outer_rect, 0, false))
|
||||
if (use_child_window && IsClippedEx(outer_rect, 0))
|
||||
{
|
||||
ItemSize(outer_rect);
|
||||
return false;
|
||||
@ -340,10 +340,9 @@ bool ImGui::BeginTableEx(const char* name, ImGuiID id, int columns_count, ImG
|
||||
|
||||
// Acquire temporary buffers
|
||||
const int table_idx = g.Tables.GetIndex(table);
|
||||
g.CurrentTableStackIdx++;
|
||||
if (g.CurrentTableStackIdx + 1 > g.TablesTempDataStack.Size)
|
||||
g.TablesTempDataStack.resize(g.CurrentTableStackIdx + 1, ImGuiTableTempData());
|
||||
ImGuiTableTempData* temp_data = table->TempData = &g.TablesTempDataStack[g.CurrentTableStackIdx];
|
||||
if (++g.TablesTempDataStacked > g.TablesTempData.Size)
|
||||
g.TablesTempData.resize(g.TablesTempDataStacked, ImGuiTableTempData());
|
||||
ImGuiTableTempData* temp_data = table->TempData = &g.TablesTempData[g.TablesTempDataStacked - 1];
|
||||
temp_data->TableIndex = table_idx;
|
||||
table->DrawSplitter = &table->TempData->DrawSplitter;
|
||||
table->DrawSplitter->Clear();
|
||||
@ -564,6 +563,7 @@ bool ImGui::BeginTableEx(const char* name, ImGuiID id, int columns_count, ImG
|
||||
// + 0 (for ImGuiTable instance, we are pooling allocations in g.Tables)
|
||||
// + 1 (for table->RawData allocated below)
|
||||
// + 1 (for table->ColumnsNames, if names are used)
|
||||
// Shared allocations per number of nested tables
|
||||
// + 1 (for table->Splitter._Channels)
|
||||
// + 2 * active_channels_count (for ImDrawCmd and ImDrawIdx buffers inside channels)
|
||||
// Where active_channels_count is variable but often == columns_count or columns_count + 1, see TableSetupDrawChannels() for details.
|
||||
@ -1170,7 +1170,7 @@ void ImGui::TableUpdateBorders(ImGuiTable* table)
|
||||
KeepAliveID(column_id);
|
||||
|
||||
bool hovered = false, held = false;
|
||||
bool pressed = ButtonBehavior(hit_rect, column_id, &hovered, &held, ImGuiButtonFlags_FlattenChildren | ImGuiButtonFlags_AllowItemOverlap | ImGuiButtonFlags_PressedOnClick | ImGuiButtonFlags_PressedOnDoubleClick);
|
||||
bool pressed = ButtonBehavior(hit_rect, column_id, &hovered, &held, ImGuiButtonFlags_FlattenChildren | ImGuiButtonFlags_AllowItemOverlap | ImGuiButtonFlags_PressedOnClick | ImGuiButtonFlags_PressedOnDoubleClick | ImGuiButtonFlags_NoNavFocus);
|
||||
if (pressed && IsMouseDoubleClicked(0))
|
||||
{
|
||||
TableSetColumnWidthAutoSingle(table, column_n);
|
||||
@ -1381,9 +1381,8 @@ void ImGui::EndTable()
|
||||
|
||||
// Clear or restore current table, if any
|
||||
IM_ASSERT(g.CurrentWindow == outer_window && g.CurrentTable == table);
|
||||
IM_ASSERT(g.CurrentTableStackIdx >= 0);
|
||||
g.CurrentTableStackIdx--;
|
||||
temp_data = g.CurrentTableStackIdx >= 0 ? &g.TablesTempDataStack[g.CurrentTableStackIdx] : NULL;
|
||||
IM_ASSERT(g.TablesTempDataStacked > 0);
|
||||
temp_data = (--g.TablesTempDataStacked > 0) ? &g.TablesTempData[g.TablesTempDataStacked - 1] : NULL;
|
||||
g.CurrentTable = temp_data ? g.Tables.GetByIndex(temp_data->TableIndex) : NULL;
|
||||
if (g.CurrentTable)
|
||||
{
|
||||
@ -1479,6 +1478,7 @@ void ImGui::TableSetupScrollFreeze(int columns, int rows)
|
||||
table->IsUnfrozenRows = (table->FreezeRowsCount == 0); // Make sure this is set before TableUpdateLayout() so ImGuiListClipper can benefit from it.b
|
||||
|
||||
// Ensure frozen columns are ordered in their section. We still allow multiple frozen columns to be reordered.
|
||||
// FIXME-TABLE: This work for preserving 2143 into 21|43. How about 4321 turning into 21|43? (preserve relative order in each section)
|
||||
for (int column_n = 0; column_n < table->FreezeColumnsRequest; column_n++)
|
||||
{
|
||||
int order_n = table->DisplayOrderToIndex[column_n];
|
||||
@ -3987,7 +3987,7 @@ void ImGui::EndColumns()
|
||||
const float column_hit_hw = COLUMNS_HIT_RECT_HALF_WIDTH;
|
||||
const ImRect column_hit_rect(ImVec2(x - column_hit_hw, y1), ImVec2(x + column_hit_hw, y2));
|
||||
KeepAliveID(column_id);
|
||||
if (IsClippedEx(column_hit_rect, column_id, false))
|
||||
if (IsClippedEx(column_hit_rect, column_id)) // FIXME: Can be removed or replaced with a lower-level test
|
||||
continue;
|
||||
|
||||
bool hovered = false, held = false;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -226,6 +226,12 @@ namespace
|
||||
uint32_t glyph_index = FT_Get_Char_Index(Face, codepoint);
|
||||
if (glyph_index == 0)
|
||||
return NULL;
|
||||
|
||||
// If this crash for you: FreeType 2.11.0 has a crash bug on some bitmap/colored fonts.
|
||||
// - https://gitlab.freedesktop.org/freetype/freetype/-/issues/1076
|
||||
// - https://github.com/ocornut/imgui/issues/4567
|
||||
// - https://github.com/ocornut/imgui/issues/4566
|
||||
// You can use FreeType 2.10, or the patched version of 2.11.0 in VcPkg, or probably any upcoming FreeType version.
|
||||
FT_Error error = FT_Load_Glyph(Face, glyph_index, LoadFlags);
|
||||
if (error)
|
||||
return NULL;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -23,6 +23,7 @@
|
||||
"ImFontConfig": "struct ImFontConfig",
|
||||
"ImFontGlyph": "struct ImFontGlyph",
|
||||
"ImFontGlyphRangesBuilder": "struct ImFontGlyphRangesBuilder",
|
||||
"ImGuiActivateFlags": "int",
|
||||
"ImGuiBackendFlags": "int",
|
||||
"ImGuiButtonFlags": "int",
|
||||
"ImGuiCol": "int",
|
||||
@ -56,7 +57,6 @@
|
||||
"ImGuiInputTextCallbackData": "struct ImGuiInputTextCallbackData",
|
||||
"ImGuiInputTextFlags": "int",
|
||||
"ImGuiInputTextState": "struct ImGuiInputTextState",
|
||||
"ImGuiItemAddFlags": "int",
|
||||
"ImGuiItemFlags": "int",
|
||||
"ImGuiItemStatusFlags": "int",
|
||||
"ImGuiKey": "int",
|
||||
@ -64,6 +64,8 @@
|
||||
"ImGuiLastItemData": "struct ImGuiLastItemData",
|
||||
"ImGuiLayoutType": "int",
|
||||
"ImGuiListClipper": "struct ImGuiListClipper",
|
||||
"ImGuiListClipperData": "struct ImGuiListClipperData",
|
||||
"ImGuiListClipperRange": "struct ImGuiListClipperRange",
|
||||
"ImGuiMemAllocFunc": "void*(*)(size_t sz,void* user_data);",
|
||||
"ImGuiMemFreeFunc": "void(*)(void* ptr,void* user_data);",
|
||||
"ImGuiMenuColumns": "struct ImGuiMenuColumns",
|
||||
@ -89,6 +91,7 @@
|
||||
"ImGuiPopupData": "struct ImGuiPopupData",
|
||||
"ImGuiPopupFlags": "int",
|
||||
"ImGuiPtrOrIndex": "struct ImGuiPtrOrIndex",
|
||||
"ImGuiScrollFlags": "int",
|
||||
"ImGuiSelectableFlags": "int",
|
||||
"ImGuiSeparatorFlags": "int",
|
||||
"ImGuiSettingsHandler": "struct ImGuiSettingsHandler",
|
||||
@ -97,7 +100,9 @@
|
||||
"ImGuiSizeCallbackData": "struct ImGuiSizeCallbackData",
|
||||
"ImGuiSliderFlags": "int",
|
||||
"ImGuiSortDirection": "int",
|
||||
"ImGuiStackLevelInfo": "struct ImGuiStackLevelInfo",
|
||||
"ImGuiStackSizes": "struct ImGuiStackSizes",
|
||||
"ImGuiStackTool": "struct ImGuiStackTool",
|
||||
"ImGuiStorage": "struct ImGuiStorage",
|
||||
"ImGuiStoragePair": "struct ImGuiStoragePair",
|
||||
"ImGuiStyle": "struct ImGuiStyle",
|
||||
|
||||
@ -23,6 +23,7 @@ defs["ImFontBuilderIO"] = "struct ImFontBuilderIO"
|
||||
defs["ImFontConfig"] = "struct ImFontConfig"
|
||||
defs["ImFontGlyph"] = "struct ImFontGlyph"
|
||||
defs["ImFontGlyphRangesBuilder"] = "struct ImFontGlyphRangesBuilder"
|
||||
defs["ImGuiActivateFlags"] = "int"
|
||||
defs["ImGuiBackendFlags"] = "int"
|
||||
defs["ImGuiButtonFlags"] = "int"
|
||||
defs["ImGuiCol"] = "int"
|
||||
@ -56,7 +57,6 @@ defs["ImGuiInputTextCallback"] = "int(*)(ImGuiInputTextCallbackData* data);"
|
||||
defs["ImGuiInputTextCallbackData"] = "struct ImGuiInputTextCallbackData"
|
||||
defs["ImGuiInputTextFlags"] = "int"
|
||||
defs["ImGuiInputTextState"] = "struct ImGuiInputTextState"
|
||||
defs["ImGuiItemAddFlags"] = "int"
|
||||
defs["ImGuiItemFlags"] = "int"
|
||||
defs["ImGuiItemStatusFlags"] = "int"
|
||||
defs["ImGuiKey"] = "int"
|
||||
@ -64,6 +64,8 @@ defs["ImGuiKeyModFlags"] = "int"
|
||||
defs["ImGuiLastItemData"] = "struct ImGuiLastItemData"
|
||||
defs["ImGuiLayoutType"] = "int"
|
||||
defs["ImGuiListClipper"] = "struct ImGuiListClipper"
|
||||
defs["ImGuiListClipperData"] = "struct ImGuiListClipperData"
|
||||
defs["ImGuiListClipperRange"] = "struct ImGuiListClipperRange"
|
||||
defs["ImGuiMemAllocFunc"] = "void*(*)(size_t sz,void* user_data);"
|
||||
defs["ImGuiMemFreeFunc"] = "void(*)(void* ptr,void* user_data);"
|
||||
defs["ImGuiMenuColumns"] = "struct ImGuiMenuColumns"
|
||||
@ -89,6 +91,7 @@ defs["ImGuiPlatformMonitor"] = "struct ImGuiPlatformMonitor"
|
||||
defs["ImGuiPopupData"] = "struct ImGuiPopupData"
|
||||
defs["ImGuiPopupFlags"] = "int"
|
||||
defs["ImGuiPtrOrIndex"] = "struct ImGuiPtrOrIndex"
|
||||
defs["ImGuiScrollFlags"] = "int"
|
||||
defs["ImGuiSelectableFlags"] = "int"
|
||||
defs["ImGuiSeparatorFlags"] = "int"
|
||||
defs["ImGuiSettingsHandler"] = "struct ImGuiSettingsHandler"
|
||||
@ -97,7 +100,9 @@ defs["ImGuiSizeCallback"] = "void(*)(ImGuiSizeCallbackData* data);"
|
||||
defs["ImGuiSizeCallbackData"] = "struct ImGuiSizeCallbackData"
|
||||
defs["ImGuiSliderFlags"] = "int"
|
||||
defs["ImGuiSortDirection"] = "int"
|
||||
defs["ImGuiStackLevelInfo"] = "struct ImGuiStackLevelInfo"
|
||||
defs["ImGuiStackSizes"] = "struct ImGuiStackSizes"
|
||||
defs["ImGuiStackTool"] = "struct ImGuiStackTool"
|
||||
defs["ImGuiStorage"] = "struct ImGuiStorage"
|
||||
defs["ImGuiStoragePair"] = "struct ImGuiStoragePair"
|
||||
defs["ImGuiStyle"] = "struct ImGuiStyle"
|
||||
|
||||
30
imgui-sys/third-party/imgui-master/cimgui.cpp
vendored
30
imgui-sys/third-party/imgui-master/cimgui.cpp
vendored
@ -1,5 +1,5 @@
|
||||
//This file is automatically generated by generator.lua from https://github.com/cimgui/cimgui
|
||||
//based on imgui.h file version "1.84.2" from Dear ImGui https://github.com/ocornut/imgui
|
||||
//based on imgui.h file version "1.86" from Dear ImGui https://github.com/ocornut/imgui
|
||||
|
||||
#include "./imgui/imgui.h"
|
||||
#ifdef CIMGUI_FREETYPE
|
||||
@ -82,6 +82,10 @@ CIMGUI_API void igShowMetricsWindow(bool* p_open)
|
||||
{
|
||||
return ImGui::ShowMetricsWindow(p_open);
|
||||
}
|
||||
CIMGUI_API void igShowStackToolWindow(bool* p_open)
|
||||
{
|
||||
return ImGui::ShowStackToolWindow(p_open);
|
||||
}
|
||||
CIMGUI_API void igShowAboutWindow(bool* p_open)
|
||||
{
|
||||
return ImGui::ShowAboutWindow(p_open);
|
||||
@ -254,10 +258,6 @@ CIMGUI_API void igGetWindowContentRegionMax(ImVec2 *pOut)
|
||||
{
|
||||
*pOut = ImGui::GetWindowContentRegionMax();
|
||||
}
|
||||
CIMGUI_API float igGetWindowContentRegionWidth()
|
||||
{
|
||||
return ImGui::GetWindowContentRegionWidth();
|
||||
}
|
||||
CIMGUI_API float igGetScrollX()
|
||||
{
|
||||
return ImGui::GetScrollX();
|
||||
@ -1395,10 +1395,6 @@ CIMGUI_API ImGuiStorage* igGetStateStorage()
|
||||
{
|
||||
return ImGui::GetStateStorage();
|
||||
}
|
||||
CIMGUI_API void igCalcListClipping(int items_count,float items_height,int* out_items_display_start,int* out_items_display_end)
|
||||
{
|
||||
return ImGui::CalcListClipping(items_count,items_height,out_items_display_start,out_items_display_end);
|
||||
}
|
||||
CIMGUI_API bool igBeginChildFrame(ImGuiID id,const ImVec2 size,ImGuiWindowFlags flags)
|
||||
{
|
||||
return ImGui::BeginChildFrame(id,size,flags);
|
||||
@ -1467,6 +1463,10 @@ CIMGUI_API bool igIsMouseDoubleClicked(ImGuiMouseButton button)
|
||||
{
|
||||
return ImGui::IsMouseDoubleClicked(button);
|
||||
}
|
||||
CIMGUI_API int igGetMouseClickedCount(ImGuiMouseButton button)
|
||||
{
|
||||
return ImGui::GetMouseClickedCount(button);
|
||||
}
|
||||
CIMGUI_API bool igIsMouseHoveringRect(const ImVec2 r_min,const ImVec2 r_max,bool clip)
|
||||
{
|
||||
return ImGui::IsMouseHoveringRect(r_min,r_max,clip);
|
||||
@ -1579,13 +1579,17 @@ CIMGUI_API void ImGuiIO_AddInputCharactersUTF8(ImGuiIO* self,const char* str)
|
||||
{
|
||||
return self->AddInputCharactersUTF8(str);
|
||||
}
|
||||
CIMGUI_API void ImGuiIO_AddFocusEvent(ImGuiIO* self,bool focused)
|
||||
{
|
||||
return self->AddFocusEvent(focused);
|
||||
}
|
||||
CIMGUI_API void ImGuiIO_ClearInputCharacters(ImGuiIO* self)
|
||||
{
|
||||
return self->ClearInputCharacters();
|
||||
}
|
||||
CIMGUI_API void ImGuiIO_AddFocusEvent(ImGuiIO* self,bool focused)
|
||||
CIMGUI_API void ImGuiIO_ClearInputKeys(ImGuiIO* self)
|
||||
{
|
||||
return self->AddFocusEvent(focused);
|
||||
return self->ClearInputKeys();
|
||||
}
|
||||
CIMGUI_API ImGuiIO* ImGuiIO_ImGuiIO(void)
|
||||
{
|
||||
@ -1859,6 +1863,10 @@ CIMGUI_API bool ImGuiListClipper_Step(ImGuiListClipper* self)
|
||||
{
|
||||
return self->Step();
|
||||
}
|
||||
CIMGUI_API void ImGuiListClipper_ForceDisplayRangeByIndices(ImGuiListClipper* self,int item_min,int item_max)
|
||||
{
|
||||
return self->ForceDisplayRangeByIndices(item_min,item_max);
|
||||
}
|
||||
CIMGUI_API ImColor* ImColor_ImColorNil(void)
|
||||
{
|
||||
return IM_NEW(ImColor)();
|
||||
|
||||
29
imgui-sys/third-party/imgui-master/cimgui.h
vendored
29
imgui-sys/third-party/imgui-master/cimgui.h
vendored
@ -1,5 +1,5 @@
|
||||
//This file is automatically generated by generator.lua from https://github.com/cimgui/cimgui
|
||||
//based on imgui.h file version "1.84.2" from Dear ImGui https://github.com/ocornut/imgui
|
||||
//based on imgui.h file version "1.86" from Dear ImGui https://github.com/ocornut/imgui
|
||||
#ifndef CIMGUI_INCLUDED
|
||||
#define CIMGUI_INCLUDED
|
||||
#include <stdio.h>
|
||||
@ -396,6 +396,7 @@ typedef enum {
|
||||
ImGuiFocusedFlags_ChildWindows = 1 << 0,
|
||||
ImGuiFocusedFlags_RootWindow = 1 << 1,
|
||||
ImGuiFocusedFlags_AnyWindow = 1 << 2,
|
||||
ImGuiFocusedFlags_NoPopupHierarchy = 1 << 3,
|
||||
ImGuiFocusedFlags_RootAndChildWindows = ImGuiFocusedFlags_RootWindow | ImGuiFocusedFlags_ChildWindows
|
||||
}ImGuiFocusedFlags_;
|
||||
typedef enum {
|
||||
@ -403,10 +404,11 @@ typedef enum {
|
||||
ImGuiHoveredFlags_ChildWindows = 1 << 0,
|
||||
ImGuiHoveredFlags_RootWindow = 1 << 1,
|
||||
ImGuiHoveredFlags_AnyWindow = 1 << 2,
|
||||
ImGuiHoveredFlags_AllowWhenBlockedByPopup = 1 << 3,
|
||||
ImGuiHoveredFlags_AllowWhenBlockedByActiveItem = 1 << 5,
|
||||
ImGuiHoveredFlags_AllowWhenOverlapped = 1 << 6,
|
||||
ImGuiHoveredFlags_AllowWhenDisabled = 1 << 7,
|
||||
ImGuiHoveredFlags_NoPopupHierarchy = 1 << 3,
|
||||
ImGuiHoveredFlags_AllowWhenBlockedByPopup = 1 << 5,
|
||||
ImGuiHoveredFlags_AllowWhenBlockedByActiveItem = 1 << 7,
|
||||
ImGuiHoveredFlags_AllowWhenOverlapped = 1 << 8,
|
||||
ImGuiHoveredFlags_AllowWhenDisabled = 1 << 9,
|
||||
ImGuiHoveredFlags_RectOnly = ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_AllowWhenOverlapped,
|
||||
ImGuiHoveredFlags_RootAndChildWindows = ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_ChildWindows
|
||||
}ImGuiHoveredFlags_;
|
||||
@ -786,6 +788,7 @@ struct ImGuiIO
|
||||
int MetricsActiveWindows;
|
||||
int MetricsActiveAllocations;
|
||||
ImVec2 MouseDelta;
|
||||
bool WantCaptureMouseUnlessPopupClose;
|
||||
ImGuiKeyModFlags KeyMods;
|
||||
ImGuiKeyModFlags KeyModsPrev;
|
||||
ImVec2 MousePosPrev;
|
||||
@ -793,9 +796,11 @@ struct ImGuiIO
|
||||
double MouseClickedTime[5];
|
||||
bool MouseClicked[5];
|
||||
bool MouseDoubleClicked[5];
|
||||
ImU16 MouseClickedCount[5];
|
||||
ImU16 MouseClickedLastCount[5];
|
||||
bool MouseReleased[5];
|
||||
bool MouseDownOwned[5];
|
||||
bool MouseDownWasDoubleClick[5];
|
||||
bool MouseDownOwnedUnlessPopupClose[5];
|
||||
float MouseDownDuration[5];
|
||||
float MouseDownDurationPrev[5];
|
||||
ImVec2 MouseDragMaxDistanceAbs[5];
|
||||
@ -805,6 +810,7 @@ struct ImGuiIO
|
||||
float NavInputsDownDuration[ImGuiNavInput_COUNT];
|
||||
float NavInputsDownDurationPrev[ImGuiNavInput_COUNT];
|
||||
float PenPressure;
|
||||
bool AppFocusLost;
|
||||
ImWchar16 InputQueueSurrogate;
|
||||
ImVector_ImWchar InputQueueCharacters;
|
||||
};
|
||||
@ -887,10 +893,9 @@ struct ImGuiListClipper
|
||||
int DisplayStart;
|
||||
int DisplayEnd;
|
||||
int ItemsCount;
|
||||
int StepNo;
|
||||
int ItemsFrozen;
|
||||
float ItemsHeight;
|
||||
float StartPosY;
|
||||
void* TempData;
|
||||
};
|
||||
struct ImColor
|
||||
{
|
||||
@ -1134,6 +1139,7 @@ CIMGUI_API void igRender(void);
|
||||
CIMGUI_API ImDrawData* igGetDrawData(void);
|
||||
CIMGUI_API void igShowDemoWindow(bool* p_open);
|
||||
CIMGUI_API void igShowMetricsWindow(bool* p_open);
|
||||
CIMGUI_API void igShowStackToolWindow(bool* p_open);
|
||||
CIMGUI_API void igShowAboutWindow(bool* p_open);
|
||||
CIMGUI_API void igShowStyleEditor(ImGuiStyle* ref);
|
||||
CIMGUI_API bool igShowStyleSelector(const char* label);
|
||||
@ -1177,7 +1183,6 @@ CIMGUI_API void igGetContentRegionAvail(ImVec2 *pOut);
|
||||
CIMGUI_API void igGetContentRegionMax(ImVec2 *pOut);
|
||||
CIMGUI_API void igGetWindowContentRegionMin(ImVec2 *pOut);
|
||||
CIMGUI_API void igGetWindowContentRegionMax(ImVec2 *pOut);
|
||||
CIMGUI_API float igGetWindowContentRegionWidth(void);
|
||||
CIMGUI_API float igGetScrollX(void);
|
||||
CIMGUI_API float igGetScrollY(void);
|
||||
CIMGUI_API void igSetScrollX(float scroll_x);
|
||||
@ -1453,7 +1458,6 @@ CIMGUI_API ImDrawListSharedData* igGetDrawListSharedData(void);
|
||||
CIMGUI_API const char* igGetStyleColorName(ImGuiCol idx);
|
||||
CIMGUI_API void igSetStateStorage(ImGuiStorage* storage);
|
||||
CIMGUI_API ImGuiStorage* igGetStateStorage(void);
|
||||
CIMGUI_API void igCalcListClipping(int items_count,float items_height,int* out_items_display_start,int* out_items_display_end);
|
||||
CIMGUI_API bool igBeginChildFrame(ImGuiID id,const ImVec2 size,ImGuiWindowFlags flags);
|
||||
CIMGUI_API void igEndChildFrame(void);
|
||||
CIMGUI_API void igCalcTextSize(ImVec2 *pOut,const char* text,const char* text_end,bool hide_text_after_double_hash,float wrap_width);
|
||||
@ -1471,6 +1475,7 @@ CIMGUI_API bool igIsMouseDown(ImGuiMouseButton button);
|
||||
CIMGUI_API bool igIsMouseClicked(ImGuiMouseButton button,bool repeat);
|
||||
CIMGUI_API bool igIsMouseReleased(ImGuiMouseButton button);
|
||||
CIMGUI_API bool igIsMouseDoubleClicked(ImGuiMouseButton button);
|
||||
CIMGUI_API int igGetMouseClickedCount(ImGuiMouseButton button);
|
||||
CIMGUI_API bool igIsMouseHoveringRect(const ImVec2 r_min,const ImVec2 r_max,bool clip);
|
||||
CIMGUI_API bool igIsMousePosValid(const ImVec2* mouse_pos);
|
||||
CIMGUI_API bool igIsAnyMouseDown(void);
|
||||
@ -1499,8 +1504,9 @@ CIMGUI_API void ImGuiStyle_ScaleAllSizes(ImGuiStyle* self,float scale_factor);
|
||||
CIMGUI_API void ImGuiIO_AddInputCharacter(ImGuiIO* self,unsigned int c);
|
||||
CIMGUI_API void ImGuiIO_AddInputCharacterUTF16(ImGuiIO* self,ImWchar16 c);
|
||||
CIMGUI_API void ImGuiIO_AddInputCharactersUTF8(ImGuiIO* self,const char* str);
|
||||
CIMGUI_API void ImGuiIO_ClearInputCharacters(ImGuiIO* self);
|
||||
CIMGUI_API void ImGuiIO_AddFocusEvent(ImGuiIO* self,bool focused);
|
||||
CIMGUI_API void ImGuiIO_ClearInputCharacters(ImGuiIO* self);
|
||||
CIMGUI_API void ImGuiIO_ClearInputKeys(ImGuiIO* self);
|
||||
CIMGUI_API ImGuiIO* ImGuiIO_ImGuiIO(void);
|
||||
CIMGUI_API void ImGuiIO_destroy(ImGuiIO* self);
|
||||
CIMGUI_API ImGuiInputTextCallbackData* ImGuiInputTextCallbackData_ImGuiInputTextCallbackData(void);
|
||||
@ -1569,6 +1575,7 @@ CIMGUI_API void ImGuiListClipper_destroy(ImGuiListClipper* self);
|
||||
CIMGUI_API void ImGuiListClipper_Begin(ImGuiListClipper* self,int items_count,float items_height);
|
||||
CIMGUI_API void ImGuiListClipper_End(ImGuiListClipper* self);
|
||||
CIMGUI_API bool ImGuiListClipper_Step(ImGuiListClipper* self);
|
||||
CIMGUI_API void ImGuiListClipper_ForceDisplayRangeByIndices(ImGuiListClipper* self,int item_min,int item_max);
|
||||
CIMGUI_API ImColor* ImColor_ImColorNil(void);
|
||||
CIMGUI_API void ImColor_destroy(ImColor* self);
|
||||
CIMGUI_API ImColor* ImColor_ImColorInt(int r,int g,int b,int a);
|
||||
|
||||
1395
imgui-sys/third-party/imgui-master/definitions.json
vendored
1395
imgui-sys/third-party/imgui-master/definitions.json
vendored
File diff suppressed because it is too large
Load Diff
1373
imgui-sys/third-party/imgui-master/definitions.lua
vendored
1373
imgui-sys/third-party/imgui-master/definitions.lua
vendored
File diff suppressed because it is too large
Load Diff
@ -33,7 +33,7 @@
|
||||
// It is very strongly recommended to NOT disable the demo windows during development. Please read comments in imgui_demo.cpp.
|
||||
//#define IMGUI_DISABLE // Disable everything: all headers and source files will be empty.
|
||||
//#define IMGUI_DISABLE_DEMO_WINDOWS // Disable demo windows: ShowDemoWindow()/ShowStyleEditor() will be empty. Not recommended.
|
||||
//#define IMGUI_DISABLE_METRICS_WINDOW // Disable metrics/debugger window: ShowMetricsWindow() will be empty.
|
||||
//#define IMGUI_DISABLE_METRICS_WINDOW // Disable metrics/debugger and other debug tools: ShowMetricsWindow() and ShowStackToolWindow() will be empty.
|
||||
|
||||
//---- Don't implement some functions to reduce linkage requirements.
|
||||
//#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS // [Win32] Don't implement default clipboard handler. Won't use and link with OpenClipboard/GetClipboardData/CloseClipboard etc. (user32.lib/.a, kernel32.lib/.a)
|
||||
|
||||
2572
imgui-sys/third-party/imgui-master/imgui/imgui.cpp
vendored
2572
imgui-sys/third-party/imgui-master/imgui/imgui.cpp
vendored
File diff suppressed because it is too large
Load Diff
115
imgui-sys/third-party/imgui-master/imgui/imgui.h
vendored
115
imgui-sys/third-party/imgui-master/imgui/imgui.h
vendored
@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.84
|
||||
// dear imgui, v1.86
|
||||
// (headers)
|
||||
|
||||
// Help:
|
||||
@ -15,7 +15,10 @@
|
||||
// - Wiki https://github.com/ocornut/imgui/wiki (lots of good stuff there)
|
||||
// - Glossary https://github.com/ocornut/imgui/wiki/Glossary
|
||||
// - Issues & support https://github.com/ocornut/imgui/issues
|
||||
// - Discussions https://github.com/ocornut/imgui/discussions
|
||||
|
||||
// Getting Started?
|
||||
// - For first-time users having issues compiling/linking/running or issues loading fonts:
|
||||
// please post in https://github.com/ocornut/imgui/discussions if you cannot find a solution in resources above.
|
||||
|
||||
/*
|
||||
|
||||
@ -60,8 +63,8 @@ Index of this file:
|
||||
|
||||
// Version
|
||||
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals. Work in progress versions typically starts at XYY99 then bounce up to XYY00, XYY01 etc. when release tagging happens)
|
||||
#define IMGUI_VERSION "1.84.2"
|
||||
#define IMGUI_VERSION_NUM 18405
|
||||
#define IMGUI_VERSION "1.86"
|
||||
#define IMGUI_VERSION_NUM 18600
|
||||
#define IMGUI_CHECKVERSION() ImGui::DebugCheckVersionAndDataLayout(IMGUI_VERSION, sizeof(ImGuiIO), sizeof(ImGuiStyle), sizeof(ImVec2), sizeof(ImVec4), sizeof(ImDrawVert), sizeof(ImDrawIdx))
|
||||
#define IMGUI_HAS_TABLE
|
||||
|
||||
@ -89,7 +92,7 @@ Index of this file:
|
||||
#endif
|
||||
|
||||
// Helper Macros - IM_FMTARGS, IM_FMTLIST: Apply printf-style warnings to our formatting functions.
|
||||
#if !defined(IMGUI_USE_STB_SPRINTF) && defined(__MINGW32__)
|
||||
#if !defined(IMGUI_USE_STB_SPRINTF) && defined(__MINGW32__) && !defined(__clang__)
|
||||
#define IM_FMTARGS(FMT) __attribute__((format(gnu_printf, FMT, FMT+1)))
|
||||
#define IM_FMTLIST(FMT) __attribute__((format(gnu_printf, FMT, 0)))
|
||||
#elif !defined(IMGUI_USE_STB_SPRINTF) && (defined(__clang__) || defined(__GNUC__))
|
||||
@ -149,7 +152,7 @@ struct ImGuiContext; // Dear ImGui context (opaque structure, unl
|
||||
struct ImGuiIO; // Main configuration and I/O between your application and ImGui
|
||||
struct ImGuiInputTextCallbackData; // Shared state of InputText() when using custom ImGuiInputTextCallback (rare/advanced use)
|
||||
struct ImGuiListClipper; // Helper to manually clip large list of items
|
||||
struct ImGuiOnceUponAFrame; // Helper for running a block of code not more than once a frame, used by IMGUI_ONCE_UPON_A_FRAME macro
|
||||
struct ImGuiOnceUponAFrame; // Helper for running a block of code not more than once a frame
|
||||
struct ImGuiPayload; // User data payload for drag and drop operations
|
||||
struct ImGuiSizeCallbackData; // Callback data when using SetNextWindowSizeConstraints() (rare/advanced use)
|
||||
struct ImGuiStorage; // Helper for key->value storage
|
||||
@ -304,6 +307,7 @@ namespace ImGui
|
||||
// Demo, Debug, Information
|
||||
IMGUI_API void ShowDemoWindow(bool* p_open = NULL); // create Demo window. demonstrate most ImGui features. call this to learn about the library! try to make it always available in your application!
|
||||
IMGUI_API void ShowMetricsWindow(bool* p_open = NULL); // create Metrics/Debugger window. display Dear ImGui internals: windows, draw commands, various internal state, etc.
|
||||
IMGUI_API void ShowStackToolWindow(bool* p_open = NULL); // create Stack Tool window. hover items with mouse to query information about the source of their unique ID.
|
||||
IMGUI_API void ShowAboutWindow(bool* p_open = NULL); // create About window. display Dear ImGui version, credits and build/system information.
|
||||
IMGUI_API void ShowStyleEditor(ImGuiStyle* ref = NULL); // add style editor block (not a window). you can pass in a reference ImGuiStyle structure to compare to, revert to and save to (else it uses the default style)
|
||||
IMGUI_API bool ShowStyleSelector(const char* label); // add style selector block (not a window), essentially a combo listing the default styles.
|
||||
@ -379,9 +383,8 @@ namespace ImGui
|
||||
// - Those functions are bound to be redesigned (they are confusing, incomplete and the Min/Max return values are in local window coordinates which increases confusion)
|
||||
IMGUI_API ImVec2 GetContentRegionAvail(); // == GetContentRegionMax() - GetCursorPos()
|
||||
IMGUI_API ImVec2 GetContentRegionMax(); // current content boundaries (typically window boundaries including scrolling, or current column boundaries), in windows coordinates
|
||||
IMGUI_API ImVec2 GetWindowContentRegionMin(); // content boundaries min (roughly (0,0)-Scroll), in window coordinates
|
||||
IMGUI_API ImVec2 GetWindowContentRegionMax(); // content boundaries max (roughly (0,0)+Size-Scroll) where Size can be override with SetNextWindowContentSize(), in window coordinates
|
||||
IMGUI_API float GetWindowContentRegionWidth(); //
|
||||
IMGUI_API ImVec2 GetWindowContentRegionMin(); // content boundaries min for the full window (roughly (0,0)-Scroll), in window coordinates
|
||||
IMGUI_API ImVec2 GetWindowContentRegionMax(); // content boundaries max for the full window (roughly (0,0)+Size-Scroll) where Size can be override with SetNextWindowContentSize(), in window coordinates
|
||||
|
||||
// Windows Scrolling
|
||||
IMGUI_API float GetScrollX(); // get scrolling amount [0 .. GetScrollMaxX()]
|
||||
@ -520,12 +523,12 @@ namespace ImGui
|
||||
IMGUI_API bool Combo(const char* label, int* current_item, bool(*items_getter)(void* data, int idx, const char** out_text), void* data, int items_count, int popup_max_height_in_items = -1);
|
||||
|
||||
// Widgets: Drag Sliders
|
||||
// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped and can go off-bounds.
|
||||
// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp.
|
||||
// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every functions, note that a 'float v[X]' function argument is the same as 'float* v', the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &myvector.x
|
||||
// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc.
|
||||
// - Format string may also be set to NULL or use the default format ("%f" or "%d").
|
||||
// - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For gamepad/keyboard navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision).
|
||||
// - Use v_min < v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits.
|
||||
// - Use v_min < v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits if ImGuiSliderFlags_AlwaysClamp is not used.
|
||||
// - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum.
|
||||
// - We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them.
|
||||
// - Legacy: Pre-1.78 there are DragXXX() function signatures that takes a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument.
|
||||
@ -544,7 +547,7 @@ namespace ImGui
|
||||
IMGUI_API bool DragScalarN(const char* label, ImGuiDataType data_type, void* p_data, int components, float v_speed = 1.0f, const void* p_min = NULL, const void* p_max = NULL, const char* format = NULL, ImGuiSliderFlags flags = 0);
|
||||
|
||||
// Widgets: Regular Sliders
|
||||
// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped and can go off-bounds.
|
||||
// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp.
|
||||
// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc.
|
||||
// - Format string may also be set to NULL or use the default format ("%f" or "%d").
|
||||
// - Legacy: Pre-1.78 there are SliderXXX() function signatures that takes a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument.
|
||||
@ -813,6 +816,7 @@ namespace ImGui
|
||||
|
||||
// Disabling [BETA API]
|
||||
// - Disable all user interactions and dim items visuals (applying style.DisabledAlpha over current colors)
|
||||
// - Those can be nested but it cannot be used to enable an already disabled section (a single BeginDisabled(true) in the stack is enough to keep everything disabled)
|
||||
// - BeginDisabled(false) essentially does nothing useful but is provided to facilitate use of boolean expressions. If you can avoid calling BeginDisabled(False)/EndDisabled() best to avoid it.
|
||||
IMGUI_API void BeginDisabled(bool disabled = true);
|
||||
IMGUI_API void EndDisabled();
|
||||
@ -865,7 +869,6 @@ namespace ImGui
|
||||
IMGUI_API const char* GetStyleColorName(ImGuiCol idx); // get a string corresponding to the enum value (for display, saving, etc.).
|
||||
IMGUI_API void SetStateStorage(ImGuiStorage* storage); // replace current window storage with our own (if you want to manipulate it yourself, typically clear subsection of it)
|
||||
IMGUI_API ImGuiStorage* GetStateStorage();
|
||||
IMGUI_API void CalcListClipping(int items_count, float items_height, int* out_items_display_start, int* out_items_display_end); // calculate coarse clipping for large list of evenly sized items. Prefer using the ImGuiListClipper higher-level helper if you can.
|
||||
IMGUI_API bool BeginChildFrame(ImGuiID id, const ImVec2& size, ImGuiWindowFlags flags = 0); // helper to create a child window / scrolling region that looks like a normal widget frame
|
||||
IMGUI_API void EndChildFrame(); // always call EndChildFrame() regardless of BeginChildFrame() return values (which indicates a collapsed/clipped window)
|
||||
|
||||
@ -893,9 +896,10 @@ namespace ImGui
|
||||
// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle.
|
||||
// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold')
|
||||
IMGUI_API bool IsMouseDown(ImGuiMouseButton button); // is mouse button held?
|
||||
IMGUI_API bool IsMouseClicked(ImGuiMouseButton button, bool repeat = false); // did mouse button clicked? (went from !Down to Down)
|
||||
IMGUI_API bool IsMouseClicked(ImGuiMouseButton button, bool repeat = false); // did mouse button clicked? (went from !Down to Down). Same as GetMouseClickedCount() == 1.
|
||||
IMGUI_API bool IsMouseReleased(ImGuiMouseButton button); // did mouse button released? (went from Down to !Down)
|
||||
IMGUI_API bool IsMouseDoubleClicked(ImGuiMouseButton button); // did mouse button double-clicked? (note that a double-click will also report IsMouseClicked() == true)
|
||||
IMGUI_API bool IsMouseDoubleClicked(ImGuiMouseButton button); // did mouse button double-clicked? Same as GetMouseClickedCount() == 2. (note that a double-click will also report IsMouseClicked() == true)
|
||||
IMGUI_API int GetMouseClickedCount(ImGuiMouseButton button); // return the number of successive mouse-clicks at the time where a click happen (otherwise 0).
|
||||
IMGUI_API bool IsMouseHoveringRect(const ImVec2& r_min, const ImVec2& r_max, bool clip = true);// is mouse hovering given bounding rect (in screen space). clipped by current clipping settings, but disregarding of other consideration of focus/window ordering/popup-block.
|
||||
IMGUI_API bool IsMousePosValid(const ImVec2* mouse_pos = NULL); // by convention we use (-FLT_MAX,-FLT_MAX) to denote that there is no mouse available
|
||||
IMGUI_API bool IsAnyMouseDown(); // is any mouse button held?
|
||||
@ -950,7 +954,7 @@ enum ImGuiWindowFlags_
|
||||
ImGuiWindowFlags_NoMove = 1 << 2, // Disable user moving the window
|
||||
ImGuiWindowFlags_NoScrollbar = 1 << 3, // Disable scrollbars (window can still scroll with mouse or programmatically)
|
||||
ImGuiWindowFlags_NoScrollWithMouse = 1 << 4, // Disable user vertically scrolling with mouse wheel. On child window, mouse wheel will be forwarded to the parent unless NoScrollbar is also set.
|
||||
ImGuiWindowFlags_NoCollapse = 1 << 5, // Disable user collapsing window by double-clicking on it
|
||||
ImGuiWindowFlags_NoCollapse = 1 << 5, // Disable user collapsing window by double-clicking on it. Also referred to as Window Menu Button (e.g. within a docking node).
|
||||
ImGuiWindowFlags_AlwaysAutoResize = 1 << 6, // Resize every window to its content every frame
|
||||
ImGuiWindowFlags_NoBackground = 1 << 7, // Disable drawing background color (WindowBg, etc.) and outside border. Similar as using SetNextWindowBgAlpha(0.0f).
|
||||
ImGuiWindowFlags_NoSavedSettings = 1 << 8, // Never load/save settings in .ini file
|
||||
@ -970,7 +974,7 @@ enum ImGuiWindowFlags_
|
||||
ImGuiWindowFlags_NoInputs = ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus,
|
||||
|
||||
// [Internal]
|
||||
ImGuiWindowFlags_NavFlattened = 1 << 23, // [BETA] Allow gamepad/keyboard navigation to cross over parent border to this child (only use on child that have no scrolling!)
|
||||
ImGuiWindowFlags_NavFlattened = 1 << 23, // [BETA] On child window: allow gamepad/keyboard navigation to cross over parent border to this child or between sibling child windows.
|
||||
ImGuiWindowFlags_ChildWindow = 1 << 24, // Don't use! For internal use by BeginChild()
|
||||
ImGuiWindowFlags_Tooltip = 1 << 25, // Don't use! For internal use by BeginTooltip()
|
||||
ImGuiWindowFlags_Popup = 1 << 26, // Don't use! For internal use by BeginPopup()
|
||||
@ -1261,9 +1265,11 @@ enum ImGuiTableBgTarget_
|
||||
enum ImGuiFocusedFlags_
|
||||
{
|
||||
ImGuiFocusedFlags_None = 0,
|
||||
ImGuiFocusedFlags_ChildWindows = 1 << 0, // IsWindowFocused(): Return true if any children of the window is focused
|
||||
ImGuiFocusedFlags_RootWindow = 1 << 1, // IsWindowFocused(): Test from root window (top most parent of the current hierarchy)
|
||||
ImGuiFocusedFlags_AnyWindow = 1 << 2, // IsWindowFocused(): Return true if any window is focused. Important: If you are trying to tell how to dispatch your low-level inputs, do NOT use this. Use 'io.WantCaptureMouse' instead! Please read the FAQ!
|
||||
ImGuiFocusedFlags_ChildWindows = 1 << 0, // Return true if any children of the window is focused
|
||||
ImGuiFocusedFlags_RootWindow = 1 << 1, // Test from root window (top most parent of the current hierarchy)
|
||||
ImGuiFocusedFlags_AnyWindow = 1 << 2, // Return true if any window is focused. Important: If you are trying to tell how to dispatch your low-level inputs, do NOT use this. Use 'io.WantCaptureMouse' instead! Please read the FAQ!
|
||||
ImGuiFocusedFlags_NoPopupHierarchy = 1 << 3, // Do not consider popup hierarchy (do not treat popup emitter as parent of popup) (when used with _ChildWindows or _RootWindow)
|
||||
//ImGuiFocusedFlags_DockHierarchy = 1 << 4, // Consider docking hierarchy (treat dockspace host as parent of docked window) (when used with _ChildWindows or _RootWindow)
|
||||
ImGuiFocusedFlags_RootAndChildWindows = ImGuiFocusedFlags_RootWindow | ImGuiFocusedFlags_ChildWindows
|
||||
};
|
||||
|
||||
@ -1276,11 +1282,13 @@ enum ImGuiHoveredFlags_
|
||||
ImGuiHoveredFlags_ChildWindows = 1 << 0, // IsWindowHovered() only: Return true if any children of the window is hovered
|
||||
ImGuiHoveredFlags_RootWindow = 1 << 1, // IsWindowHovered() only: Test from root window (top most parent of the current hierarchy)
|
||||
ImGuiHoveredFlags_AnyWindow = 1 << 2, // IsWindowHovered() only: Return true if any window is hovered
|
||||
ImGuiHoveredFlags_AllowWhenBlockedByPopup = 1 << 3, // Return true even if a popup window is normally blocking access to this item/window
|
||||
//ImGuiHoveredFlags_AllowWhenBlockedByModal = 1 << 4, // Return true even if a modal popup window is normally blocking access to this item/window. FIXME-TODO: Unavailable yet.
|
||||
ImGuiHoveredFlags_AllowWhenBlockedByActiveItem = 1 << 5, // Return true even if an active item is blocking access to this item/window. Useful for Drag and Drop patterns.
|
||||
ImGuiHoveredFlags_AllowWhenOverlapped = 1 << 6, // Return true even if the position is obstructed or overlapped by another window
|
||||
ImGuiHoveredFlags_AllowWhenDisabled = 1 << 7, // Return true even if the item is disabled
|
||||
ImGuiHoveredFlags_NoPopupHierarchy = 1 << 3, // IsWindowHovered() only: Do not consider popup hierarchy (do not treat popup emitter as parent of popup) (when used with _ChildWindows or _RootWindow)
|
||||
//ImGuiHoveredFlags_DockHierarchy = 1 << 4, // IsWindowHovered() only: Consider docking hierarchy (treat dockspace host as parent of docked window) (when used with _ChildWindows or _RootWindow)
|
||||
ImGuiHoveredFlags_AllowWhenBlockedByPopup = 1 << 5, // Return true even if a popup window is normally blocking access to this item/window
|
||||
//ImGuiHoveredFlags_AllowWhenBlockedByModal = 1 << 6, // Return true even if a modal popup window is normally blocking access to this item/window. FIXME-TODO: Unavailable yet.
|
||||
ImGuiHoveredFlags_AllowWhenBlockedByActiveItem = 1 << 7, // Return true even if an active item is blocking access to this item/window. Useful for Drag and Drop patterns.
|
||||
ImGuiHoveredFlags_AllowWhenOverlapped = 1 << 8, // IsItemHovered() only: Return true even if the position is obstructed or overlapped by another window
|
||||
ImGuiHoveredFlags_AllowWhenDisabled = 1 << 9, // IsItemHovered() only: Return true even if the item is disabled
|
||||
ImGuiHoveredFlags_RectOnly = ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_AllowWhenOverlapped,
|
||||
ImGuiHoveredFlags_RootAndChildWindows = ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_ChildWindows
|
||||
};
|
||||
@ -1734,7 +1742,7 @@ struct ImVector
|
||||
inline void pop_back() { IM_ASSERT(Size > 0); Size--; }
|
||||
inline void push_front(const T& v) { if (Size == 0) push_back(v); else insert(Data, v); }
|
||||
inline T* erase(const T* it) { IM_ASSERT(it >= Data && it < Data + Size); const ptrdiff_t off = it - Data; memmove(Data + off, Data + off + 1, ((size_t)Size - (size_t)off - 1) * sizeof(T)); Size--; return Data + off; }
|
||||
inline T* erase(const T* it, const T* it_last){ IM_ASSERT(it >= Data && it < Data + Size && it_last > it && it_last <= Data + Size); const ptrdiff_t count = it_last - it; const ptrdiff_t off = it - Data; memmove(Data + off, Data + off + count, ((size_t)Size - (size_t)off - count) * sizeof(T)); Size -= (int)count; return Data + off; }
|
||||
inline T* erase(const T* it, const T* it_last){ IM_ASSERT(it >= Data && it < Data + Size && it_last > it && it_last <= Data + Size); const ptrdiff_t count = it_last - it; const ptrdiff_t off = it - Data; memmove(Data + off, Data + off + count, ((size_t)Size - (size_t)off - (size_t)count) * sizeof(T)); Size -= (int)count; return Data + off; }
|
||||
inline T* erase_unsorted(const T* it) { IM_ASSERT(it >= Data && it < Data + Size); const ptrdiff_t off = it - Data; if (it < Data + Size - 1) memcpy(Data + off, Data + Size - 1, sizeof(T)); Size--; return Data + off; }
|
||||
inline T* insert(const T* it, const T& v) { IM_ASSERT(it >= Data && it <= Data + Size); const ptrdiff_t off = it - Data; if (Size == Capacity) reserve(_grow_capacity(Size + 1)); if (off < (int)Size) memmove(Data + off + 1, Data + off, ((size_t)Size - (size_t)off) * sizeof(T)); memcpy(&Data[off], &v, sizeof(v)); Size++; return Data + off; }
|
||||
inline bool contains(const T& v) const { const T* data = Data; const T* data_end = Data + Size; while (data < data_end) if (*data++ == v) return true; return false; }
|
||||
@ -1887,8 +1895,9 @@ struct ImGuiIO
|
||||
IMGUI_API void AddInputCharacter(unsigned int c); // Queue new character input
|
||||
IMGUI_API void AddInputCharacterUTF16(ImWchar16 c); // Queue new character input from an UTF-16 character, it can be a surrogate
|
||||
IMGUI_API void AddInputCharactersUTF8(const char* str); // Queue new characters input from an UTF-8 string
|
||||
IMGUI_API void ClearInputCharacters(); // Clear the text input buffer manually
|
||||
IMGUI_API void AddFocusEvent(bool focused); // Notifies Dear ImGui when hosting platform windows lose or gain input focus
|
||||
IMGUI_API void ClearInputCharacters(); // [Internal] Clear the text input buffer manually
|
||||
IMGUI_API void ClearInputKeys(); // [Internal] Release all keys
|
||||
|
||||
//------------------------------------------------------------------
|
||||
// Output - Updated by NewFrame() or EndFrame()/Render()
|
||||
@ -1915,16 +1924,19 @@ struct ImGuiIO
|
||||
// [Internal] Dear ImGui will maintain those fields. Forward compatibility not guaranteed!
|
||||
//------------------------------------------------------------------
|
||||
|
||||
bool WantCaptureMouseUnlessPopupClose;// Alternative to WantCaptureMouse: (WantCaptureMouse == true && WantCaptureMouseUnlessPopupClose == false) when a click over void is expected to close a popup.
|
||||
ImGuiKeyModFlags KeyMods; // Key mods flags (same as io.KeyCtrl/KeyShift/KeyAlt/KeySuper but merged into flags), updated by NewFrame()
|
||||
ImGuiKeyModFlags KeyModsPrev; // Previous key mods
|
||||
ImVec2 MousePosPrev; // Previous mouse position (note that MouseDelta is not necessary == MousePos-MousePosPrev, in case either position is invalid)
|
||||
ImVec2 MouseClickedPos[5]; // Position at time of clicking
|
||||
double MouseClickedTime[5]; // Time of last click (used to figure out double-click)
|
||||
bool MouseClicked[5]; // Mouse button went from !Down to Down
|
||||
bool MouseDoubleClicked[5]; // Has mouse button been double-clicked?
|
||||
bool MouseClicked[5]; // Mouse button went from !Down to Down (same as MouseClickedCount[x] != 0)
|
||||
bool MouseDoubleClicked[5]; // Has mouse button been double-clicked? (same as MouseClickedCount[x] == 2)
|
||||
ImU16 MouseClickedCount[5]; // == 0 (not clicked), == 1 (same as MouseClicked[]), == 2 (double-clicked), == 3 (triple-clicked) etc. when going from !Down to Down
|
||||
ImU16 MouseClickedLastCount[5]; // Count successive number of clicks. Stays valid after mouse release. Reset after another click is done.
|
||||
bool MouseReleased[5]; // Mouse button went from Down to !Down
|
||||
bool MouseDownOwned[5]; // Track if button was clicked inside a dear imgui window. We don't request mouse capture from the application if click started outside ImGui bounds.
|
||||
bool MouseDownWasDoubleClick[5]; // Track if button down was a double-click
|
||||
bool MouseDownOwned[5]; // Track if button was clicked inside a dear imgui window or over void blocked by a popup. We don't request mouse capture from the application if click started outside ImGui bounds.
|
||||
bool MouseDownOwnedUnlessPopupClose[5];//Track if button was clicked inside a dear imgui window.
|
||||
float MouseDownDuration[5]; // Duration the mouse button has been down (0.0f == just clicked)
|
||||
float MouseDownDurationPrev[5]; // Previous time the mouse button has been down
|
||||
ImVec2 MouseDragMaxDistanceAbs[5]; // Maximum distance, absolute, on each axis, of how much mouse has traveled from the clicking point
|
||||
@ -1934,6 +1946,7 @@ struct ImGuiIO
|
||||
float NavInputsDownDuration[ImGuiNavInput_COUNT];
|
||||
float NavInputsDownDurationPrev[ImGuiNavInput_COUNT];
|
||||
float PenPressure; // Touch/Pen pressure (0.0f to 1.0f, should be >0.0f only when MouseDown[0] == true). Helper storage currently unused by Dear ImGui.
|
||||
bool AppFocusLost;
|
||||
ImWchar16 InputQueueSurrogate; // For AddInputCharacterUTF16
|
||||
ImVector<ImWchar> InputQueueCharacters; // Queue of _characters_ input (obtained by platform backend). Fill using AddInputCharacter() helper.
|
||||
|
||||
@ -2158,10 +2171,12 @@ struct ImGuiStorage
|
||||
};
|
||||
|
||||
// Helper: Manually clip large list of items.
|
||||
// If you are submitting lots of evenly spaced items and you have a random access to the list, you can perform coarse
|
||||
// clipping based on visibility to save yourself from processing those items at all.
|
||||
// If you have lots evenly spaced items and you have a random access to the list, you can perform coarse
|
||||
// clipping based on visibility to only submit items that are in view.
|
||||
// The clipper calculates the range of visible items and advance the cursor to compensate for the non-visible items we have skipped.
|
||||
// (Dear ImGui already clip items based on their bounds but it needs to measure text size to do so, whereas manual coarse clipping before submission makes this cost and your own data fetching/submission cost almost null)
|
||||
// (Dear ImGui already clip items based on their bounds but: it needs to first layout the item to do so, and generally
|
||||
// fetching/submitting your own data incurs additional cost. Coarse clipping using ImGuiListClipper allows you to easily
|
||||
// scale using lists with tens of thousands of items without a problem)
|
||||
// Usage:
|
||||
// ImGuiListClipper clipper;
|
||||
// clipper.Begin(1000); // We have 1000 elements, evenly spaced.
|
||||
@ -2170,31 +2185,31 @@ struct ImGuiStorage
|
||||
// ImGui::Text("line number %d", i);
|
||||
// Generally what happens is:
|
||||
// - Clipper lets you process the first element (DisplayStart = 0, DisplayEnd = 1) regardless of it being visible or not.
|
||||
// - User code submit one element.
|
||||
// - User code submit that one element.
|
||||
// - Clipper can measure the height of the first element
|
||||
// - Clipper calculate the actual range of elements to display based on the current clipping rectangle, position the cursor before the first visible element.
|
||||
// - User code submit visible elements.
|
||||
// - The clipper also handles various subtleties related to keyboard/gamepad navigation, wrapping etc.
|
||||
struct ImGuiListClipper
|
||||
{
|
||||
int DisplayStart;
|
||||
int DisplayEnd;
|
||||
|
||||
// [Internal]
|
||||
int ItemsCount;
|
||||
int StepNo;
|
||||
int ItemsFrozen;
|
||||
float ItemsHeight;
|
||||
float StartPosY;
|
||||
|
||||
IMGUI_API ImGuiListClipper();
|
||||
IMGUI_API ~ImGuiListClipper();
|
||||
int DisplayStart; // First item to display, updated by each call to Step()
|
||||
int DisplayEnd; // End of items to display (exclusive)
|
||||
int ItemsCount; // [Internal] Number of items
|
||||
float ItemsHeight; // [Internal] Height of item after a first step and item submission can calculate it
|
||||
float StartPosY; // [Internal] Cursor position at the time of Begin() or after table frozen rows are all processed
|
||||
void* TempData; // [Internal] Internal data
|
||||
|
||||
// items_count: Use INT_MAX if you don't know how many items you have (in which case the cursor won't be advanced in the final step)
|
||||
// items_height: Use -1.0f to be calculated automatically on first step. Otherwise pass in the distance between your items, typically GetTextLineHeightWithSpacing() or GetFrameHeightWithSpacing().
|
||||
IMGUI_API void Begin(int items_count, float items_height = -1.0f); // Automatically called by constructor if you passed 'items_count' or by Step() in Step 1.
|
||||
IMGUI_API ImGuiListClipper();
|
||||
IMGUI_API ~ImGuiListClipper();
|
||||
IMGUI_API void Begin(int items_count, float items_height = -1.0f);
|
||||
IMGUI_API void End(); // Automatically called on the last call of Step() that returns false.
|
||||
IMGUI_API bool Step(); // Call until it returns false. The DisplayStart/DisplayEnd fields will be set and you can process/draw those items.
|
||||
|
||||
// Call ForceDisplayRangeByIndices() before first call to Step() if you need a range of items to be displayed regardless of visibility.
|
||||
IMGUI_API void ForceDisplayRangeByIndices(int item_min, int item_max); // item_max is exclusive e.g. use (42, 42+1) to make item 42 always visible BUT due to alignment/padding of certain items it is likely that an extra item may be included on either end of the display range.
|
||||
|
||||
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||
inline ImGuiListClipper(int items_count, float items_height = -1.0f) { memset(this, 0, sizeof(*this)); ItemsCount = -1; Begin(items_count, items_height); } // [removed in 1.79]
|
||||
#endif
|
||||
@ -2816,6 +2831,10 @@ struct ImGuiViewport
|
||||
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||
namespace ImGui
|
||||
{
|
||||
// OBSOLETED in 1.86 (from November 2021)
|
||||
IMGUI_API void CalcListClipping(int items_count, float items_height, int* out_items_display_start, int* out_items_display_end); // Calculate coarse clipping for large list of evenly sized items. Prefer using ImGuiListClipper.
|
||||
// OBSOLETED in 1.85 (from August 2021)
|
||||
static inline float GetWindowContentRegionWidth() { return GetWindowContentRegionMax().x - GetWindowContentRegionMin().x; }
|
||||
// OBSOLETED in 1.81 (from February 2021)
|
||||
IMGUI_API bool ListBoxHeader(const char* label, int items_count, int height_in_items = -1); // Helper to calculate size from items_count and height_in_items
|
||||
static inline bool ListBoxHeader(const char* label, const ImVec2& size = ImVec2(0, 0)) { return BeginListBox(label, size); }
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.84
|
||||
// dear imgui, v1.86
|
||||
// (drawing and font code)
|
||||
|
||||
/*
|
||||
@ -473,6 +473,7 @@ void ImDrawList::_PopUnusedDrawCmd()
|
||||
|
||||
void ImDrawList::AddCallback(ImDrawCallback callback, void* callback_data)
|
||||
{
|
||||
IM_ASSERT_PARANOID(CmdBuffer.Size > 0);
|
||||
ImDrawCmd* curr_cmd = &CmdBuffer.Data[CmdBuffer.Size - 1];
|
||||
IM_ASSERT(curr_cmd->UserCallback == NULL);
|
||||
if (curr_cmd->ElemCount != 0)
|
||||
@ -494,6 +495,7 @@ void ImDrawList::AddCallback(ImDrawCallback callback, void* callback_data)
|
||||
// Try to merge two last draw commands
|
||||
void ImDrawList::_TryMergeDrawCmds()
|
||||
{
|
||||
IM_ASSERT_PARANOID(CmdBuffer.Size > 0);
|
||||
ImDrawCmd* curr_cmd = &CmdBuffer.Data[CmdBuffer.Size - 1];
|
||||
ImDrawCmd* prev_cmd = curr_cmd - 1;
|
||||
if (ImDrawCmd_HeaderCompare(curr_cmd, prev_cmd) == 0 && curr_cmd->UserCallback == NULL && prev_cmd->UserCallback == NULL)
|
||||
@ -508,6 +510,7 @@ void ImDrawList::_TryMergeDrawCmds()
|
||||
void ImDrawList::_OnChangedClipRect()
|
||||
{
|
||||
// If current command is used with different settings we need to add a new command
|
||||
IM_ASSERT_PARANOID(CmdBuffer.Size > 0);
|
||||
ImDrawCmd* curr_cmd = &CmdBuffer.Data[CmdBuffer.Size - 1];
|
||||
if (curr_cmd->ElemCount != 0 && memcmp(&curr_cmd->ClipRect, &_CmdHeader.ClipRect, sizeof(ImVec4)) != 0)
|
||||
{
|
||||
@ -530,6 +533,7 @@ void ImDrawList::_OnChangedClipRect()
|
||||
void ImDrawList::_OnChangedTextureID()
|
||||
{
|
||||
// If current command is used with different settings we need to add a new command
|
||||
IM_ASSERT_PARANOID(CmdBuffer.Size > 0);
|
||||
ImDrawCmd* curr_cmd = &CmdBuffer.Data[CmdBuffer.Size - 1];
|
||||
if (curr_cmd->ElemCount != 0 && curr_cmd->TextureId != _CmdHeader.TextureId)
|
||||
{
|
||||
@ -553,6 +557,7 @@ void ImDrawList::_OnChangedVtxOffset()
|
||||
{
|
||||
// We don't need to compare curr_cmd->VtxOffset != _CmdHeader.VtxOffset because we know it'll be different at the time we call this.
|
||||
_VtxCurrentIdx = 0;
|
||||
IM_ASSERT_PARANOID(CmdBuffer.Size > 0);
|
||||
ImDrawCmd* curr_cmd = &CmdBuffer.Data[CmdBuffer.Size - 1];
|
||||
//IM_ASSERT(curr_cmd->VtxOffset != _CmdHeader.VtxOffset); // See #3349
|
||||
if (curr_cmd->ElemCount != 0)
|
||||
@ -1919,33 +1924,34 @@ ImFontConfig::ImFontConfig()
|
||||
|
||||
// A work of art lies ahead! (. = white layer, X = black layer, others are blank)
|
||||
// The 2x2 white texels on the top left are the ones we'll use everywhere in Dear ImGui to render filled shapes.
|
||||
const int FONT_ATLAS_DEFAULT_TEX_DATA_W = 108; // Actual texture will be 2 times that + 1 spacing.
|
||||
// (This is used when io.MouseDrawCursor = true)
|
||||
const int FONT_ATLAS_DEFAULT_TEX_DATA_W = 122; // Actual texture will be 2 times that + 1 spacing.
|
||||
const int FONT_ATLAS_DEFAULT_TEX_DATA_H = 27;
|
||||
static const char FONT_ATLAS_DEFAULT_TEX_DATA_PIXELS[FONT_ATLAS_DEFAULT_TEX_DATA_W * FONT_ATLAS_DEFAULT_TEX_DATA_H + 1] =
|
||||
{
|
||||
"..- -XXXXXXX- X - X -XXXXXXX - XXXXXXX- XX "
|
||||
"..- -X.....X- X.X - X.X -X.....X - X.....X- X..X "
|
||||
"--- -XXX.XXX- X...X - X...X -X....X - X....X- X..X "
|
||||
"X - X.X - X.....X - X.....X -X...X - X...X- X..X "
|
||||
"XX - X.X -X.......X- X.......X -X..X.X - X.X..X- X..X "
|
||||
"X.X - X.X -XXXX.XXXX- XXXX.XXXX -X.X X.X - X.X X.X- X..XXX "
|
||||
"X..X - X.X - X.X - X.X -XX X.X - X.X XX- X..X..XXX "
|
||||
"X...X - X.X - X.X - XX X.X XX - X.X - X.X - X..X..X..XX "
|
||||
"X....X - X.X - X.X - X.X X.X X.X - X.X - X.X - X..X..X..X.X "
|
||||
"X.....X - X.X - X.X - X..X X.X X..X - X.X - X.X -XXX X..X..X..X..X"
|
||||
"X......X - X.X - X.X - X...XXXXXX.XXXXXX...X - X.X XX-XX X.X -X..XX........X..X"
|
||||
"X.......X - X.X - X.X -X.....................X- X.X X.X-X.X X.X -X...X...........X"
|
||||
"X........X - X.X - X.X - X...XXXXXX.XXXXXX...X - X.X..X-X..X.X - X..............X"
|
||||
"X.........X -XXX.XXX- X.X - X..X X.X X..X - X...X-X...X - X.............X"
|
||||
"X..........X-X.....X- X.X - X.X X.X X.X - X....X-X....X - X.............X"
|
||||
"X......XXXXX-XXXXXXX- X.X - XX X.X XX - X.....X-X.....X - X............X"
|
||||
"X...X..X --------- X.X - X.X - XXXXXXX-XXXXXXX - X...........X "
|
||||
"X..X X..X - -XXXX.XXXX- XXXX.XXXX ------------------------------------- X..........X "
|
||||
"X.X X..X - -X.......X- X.......X - XX XX - - X..........X "
|
||||
"XX X..X - - X.....X - X.....X - X.X X.X - - X........X "
|
||||
" X..X - X...X - X...X - X..X X..X - - X........X "
|
||||
" XX - X.X - X.X - X...XXXXXXXXXXXXX...X - - XXXXXXXXXX "
|
||||
"------------ - X - X -X.....................X- ------------------"
|
||||
"..- -XXXXXXX- X - X -XXXXXXX - XXXXXXX- XX - XX XX "
|
||||
"..- -X.....X- X.X - X.X -X.....X - X.....X- X..X -X..X X..X"
|
||||
"--- -XXX.XXX- X...X - X...X -X....X - X....X- X..X -X...X X...X"
|
||||
"X - X.X - X.....X - X.....X -X...X - X...X- X..X - X...X X...X "
|
||||
"XX - X.X -X.......X- X.......X -X..X.X - X.X..X- X..X - X...X...X "
|
||||
"X.X - X.X -XXXX.XXXX- XXXX.XXXX -X.X X.X - X.X X.X- X..XXX - X.....X "
|
||||
"X..X - X.X - X.X - X.X -XX X.X - X.X XX- X..X..XXX - X...X "
|
||||
"X...X - X.X - X.X - XX X.X XX - X.X - X.X - X..X..X..XX - X.X "
|
||||
"X....X - X.X - X.X - X.X X.X X.X - X.X - X.X - X..X..X..X.X - X...X "
|
||||
"X.....X - X.X - X.X - X..X X.X X..X - X.X - X.X -XXX X..X..X..X..X- X.....X "
|
||||
"X......X - X.X - X.X - X...XXXXXX.XXXXXX...X - X.X XX-XX X.X -X..XX........X..X- X...X...X "
|
||||
"X.......X - X.X - X.X -X.....................X- X.X X.X-X.X X.X -X...X...........X- X...X X...X "
|
||||
"X........X - X.X - X.X - X...XXXXXX.XXXXXX...X - X.X..X-X..X.X - X..............X-X...X X...X"
|
||||
"X.........X -XXX.XXX- X.X - X..X X.X X..X - X...X-X...X - X.............X-X..X X..X"
|
||||
"X..........X-X.....X- X.X - X.X X.X X.X - X....X-X....X - X.............X- XX XX "
|
||||
"X......XXXXX-XXXXXXX- X.X - XX X.X XX - X.....X-X.....X - X............X--------------"
|
||||
"X...X..X --------- X.X - X.X - XXXXXXX-XXXXXXX - X...........X - "
|
||||
"X..X X..X - -XXXX.XXXX- XXXX.XXXX ------------------------------------- X..........X - "
|
||||
"X.X X..X - -X.......X- X.......X - XX XX - - X..........X - "
|
||||
"XX X..X - - X.....X - X.....X - X.X X.X - - X........X - "
|
||||
" X..X - - X...X - X...X - X..X X..X - - X........X - "
|
||||
" XX - - X.X - X.X - X...XXXXXXXXXXXXX...X - - XXXXXXXXXX - "
|
||||
"------------- - X - X -X.....................X- ------------------- "
|
||||
" ----------------------------------- X...XXXXXXXXXXXXX...X - "
|
||||
" - X..X X..X - "
|
||||
" - X.X X.X - "
|
||||
@ -1963,6 +1969,7 @@ static const ImVec2 FONT_ATLAS_DEFAULT_TEX_CURSOR_DATA[ImGuiMouseCursor_COUNT][3
|
||||
{ ImVec2(73,0), ImVec2(17,17), ImVec2( 8, 8) }, // ImGuiMouseCursor_ResizeNESW
|
||||
{ ImVec2(55,0), ImVec2(17,17), ImVec2( 8, 8) }, // ImGuiMouseCursor_ResizeNWSE
|
||||
{ ImVec2(91,0), ImVec2(17,22), ImVec2( 5, 0) }, // ImGuiMouseCursor_Hand
|
||||
{ ImVec2(109,0),ImVec2(13,15), ImVec2( 6, 7) }, // ImGuiMouseCursor_NotAllowed
|
||||
};
|
||||
|
||||
ImFontAtlas::ImFontAtlas()
|
||||
@ -1998,7 +2005,7 @@ void ImFontAtlas::ClearInputData()
|
||||
ConfigData.clear();
|
||||
CustomRects.clear();
|
||||
PackIdMouseCursors = PackIdLines = -1;
|
||||
TexReady = false;
|
||||
// Important: we leave TexReady untouched
|
||||
}
|
||||
|
||||
void ImFontAtlas::ClearTexData()
|
||||
@ -3073,8 +3080,8 @@ void ImFontGlyphRangesBuilder::AddText(const char* text, const char* text_end)
|
||||
void ImFontGlyphRangesBuilder::AddRanges(const ImWchar* ranges)
|
||||
{
|
||||
for (; ranges[0]; ranges += 2)
|
||||
for (ImWchar c = ranges[0]; c <= ranges[1]; c++)
|
||||
AddChar(c);
|
||||
for (unsigned int c = ranges[0]; c <= ranges[1] && c <= IM_UNICODE_CODEPOINT_MAX; c++) //-V560
|
||||
AddChar((ImWchar)c);
|
||||
}
|
||||
|
||||
void ImFontGlyphRangesBuilder::BuildRanges(ImVector<ImWchar>* out_ranges)
|
||||
@ -3899,10 +3906,10 @@ void ImGui::RenderRectFilledWithHole(ImDrawList* draw_list, ImRect outer, ImRect
|
||||
const bool fill_R = (inner.Max.x < outer.Max.x);
|
||||
const bool fill_U = (inner.Min.y > outer.Min.y);
|
||||
const bool fill_D = (inner.Max.y < outer.Max.y);
|
||||
if (fill_L) draw_list->AddRectFilled(ImVec2(outer.Min.x, inner.Min.y), ImVec2(inner.Min.x, inner.Max.y), col, rounding, (fill_U ? 0 : ImDrawFlags_RoundCornersTopLeft) | (fill_D ? 0 : ImDrawFlags_RoundCornersBottomLeft));
|
||||
if (fill_R) draw_list->AddRectFilled(ImVec2(inner.Max.x, inner.Min.y), ImVec2(outer.Max.x, inner.Max.y), col, rounding, (fill_U ? 0 : ImDrawFlags_RoundCornersTopRight) | (fill_D ? 0 : ImDrawFlags_RoundCornersBottomRight));
|
||||
if (fill_U) draw_list->AddRectFilled(ImVec2(inner.Min.x, outer.Min.y), ImVec2(inner.Max.x, inner.Min.y), col, rounding, (fill_L ? 0 : ImDrawFlags_RoundCornersTopLeft) | (fill_R ? 0 : ImDrawFlags_RoundCornersTopRight));
|
||||
if (fill_D) draw_list->AddRectFilled(ImVec2(inner.Min.x, inner.Max.y), ImVec2(inner.Max.x, outer.Max.y), col, rounding, (fill_L ? 0 : ImDrawFlags_RoundCornersBottomLeft) | (fill_R ? 0 : ImDrawFlags_RoundCornersBottomRight));
|
||||
if (fill_L) draw_list->AddRectFilled(ImVec2(outer.Min.x, inner.Min.y), ImVec2(inner.Min.x, inner.Max.y), col, rounding, ImDrawFlags_RoundCornersNone | (fill_U ? 0 : ImDrawFlags_RoundCornersTopLeft) | (fill_D ? 0 : ImDrawFlags_RoundCornersBottomLeft));
|
||||
if (fill_R) draw_list->AddRectFilled(ImVec2(inner.Max.x, inner.Min.y), ImVec2(outer.Max.x, inner.Max.y), col, rounding, ImDrawFlags_RoundCornersNone | (fill_U ? 0 : ImDrawFlags_RoundCornersTopRight) | (fill_D ? 0 : ImDrawFlags_RoundCornersBottomRight));
|
||||
if (fill_U) draw_list->AddRectFilled(ImVec2(inner.Min.x, outer.Min.y), ImVec2(inner.Max.x, inner.Min.y), col, rounding, ImDrawFlags_RoundCornersNone | (fill_L ? 0 : ImDrawFlags_RoundCornersTopLeft) | (fill_R ? 0 : ImDrawFlags_RoundCornersTopRight));
|
||||
if (fill_D) draw_list->AddRectFilled(ImVec2(inner.Min.x, inner.Max.y), ImVec2(inner.Max.x, outer.Max.y), col, rounding, ImDrawFlags_RoundCornersNone | (fill_L ? 0 : ImDrawFlags_RoundCornersBottomLeft) | (fill_R ? 0 : ImDrawFlags_RoundCornersBottomRight));
|
||||
if (fill_L && fill_U) draw_list->AddRectFilled(ImVec2(outer.Min.x, outer.Min.y), ImVec2(inner.Min.x, inner.Min.y), col, rounding, ImDrawFlags_RoundCornersTopLeft);
|
||||
if (fill_R && fill_U) draw_list->AddRectFilled(ImVec2(inner.Max.x, outer.Min.y), ImVec2(outer.Max.x, inner.Min.y), col, rounding, ImDrawFlags_RoundCornersTopRight);
|
||||
if (fill_L && fill_D) draw_list->AddRectFilled(ImVec2(outer.Min.x, inner.Max.y), ImVec2(inner.Min.x, outer.Max.y), col, rounding, ImDrawFlags_RoundCornersBottomLeft);
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.84
|
||||
// dear imgui, v1.86
|
||||
// (internal structures/api)
|
||||
|
||||
// You may use this file to debug, understand or extend ImGui features but we don't provide any guarantee of forward compatibility!
|
||||
@ -18,12 +18,14 @@ Index of this file:
|
||||
// [SECTION] Generic helpers
|
||||
// [SECTION] ImDrawList support
|
||||
// [SECTION] Widgets support: flags, enums, data structures
|
||||
// [SECTION] Clipper support
|
||||
// [SECTION] Navigation support
|
||||
// [SECTION] Columns support
|
||||
// [SECTION] Multi-select support
|
||||
// [SECTION] Docking support
|
||||
// [SECTION] Viewport support
|
||||
// [SECTION] Settings support
|
||||
// [SECTION] Metrics, Debug
|
||||
// [SECTION] Metrics, Debug tools
|
||||
// [SECTION] Generic context hooks
|
||||
// [SECTION] ImGuiContext (main imgui context)
|
||||
// [SECTION] ImGuiWindowTempData, ImGuiWindow
|
||||
@ -82,19 +84,13 @@ Index of this file:
|
||||
#pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant"
|
||||
#pragma clang diagnostic ignored "-Wdouble-promotion"
|
||||
#pragma clang diagnostic ignored "-Wimplicit-int-float-conversion" // warning: implicit conversion from 'xxx' to 'float' may lose precision
|
||||
#pragma clang diagnostic ignored "-Wmissing-noreturn" // warning: function 'xxx' could be declared with attribute 'noreturn'
|
||||
#elif defined(__GNUC__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wpragmas" // warning: unknown option after '#pragma GCC diagnostic' kind
|
||||
#pragma GCC diagnostic ignored "-Wclass-memaccess" // [__GNUC__ >= 8] warning: 'memset/memcpy' clearing/writing an object of type 'xxxx' with no trivial copy-assignment; use assignment or value-initialization instead
|
||||
#endif
|
||||
|
||||
// Helper macros
|
||||
#if defined(__clang__)
|
||||
#define IM_NORETURN __attribute__((noreturn))
|
||||
#else
|
||||
#define IM_NORETURN
|
||||
#endif
|
||||
|
||||
// Legacy defines
|
||||
#ifdef IMGUI_DISABLE_FORMAT_STRING_FUNCTIONS // Renamed in 1.74
|
||||
#error Use IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS
|
||||
@ -148,8 +144,8 @@ struct ImGuiWindowSettings; // Storage for a window .ini settings (we ke
|
||||
|
||||
// Use your programming IDE "Go to definition" facility on the names of the center columns to find the actual flags/enum lists.
|
||||
typedef int ImGuiLayoutType; // -> enum ImGuiLayoutType_ // Enum: Horizontal or vertical
|
||||
typedef int ImGuiActivateFlags; // -> enum ImGuiActivateFlags_ // Flags: for navigation/focus function (will be for ActivateItem() later)
|
||||
typedef int ImGuiItemFlags; // -> enum ImGuiItemFlags_ // Flags: for PushItemFlag()
|
||||
typedef int ImGuiItemAddFlags; // -> enum ImGuiItemAddFlags_ // Flags: for ItemAdd()
|
||||
typedef int ImGuiItemStatusFlags; // -> enum ImGuiItemStatusFlags_ // Flags: for DC.LastItemStatusFlags
|
||||
typedef int ImGuiOldColumnFlags; // -> enum ImGuiOldColumnFlags_ // Flags: for BeginColumns()
|
||||
typedef int ImGuiNavHighlightFlags; // -> enum ImGuiNavHighlightFlags_ // Flags: for RenderNavHighlight()
|
||||
@ -157,6 +153,7 @@ typedef int ImGuiNavDirSourceFlags; // -> enum ImGuiNavDirSourceFlags_ // F
|
||||
typedef int ImGuiNavMoveFlags; // -> enum ImGuiNavMoveFlags_ // Flags: for navigation requests
|
||||
typedef int ImGuiNextItemDataFlags; // -> enum ImGuiNextItemDataFlags_ // Flags: for SetNextItemXXX() functions
|
||||
typedef int ImGuiNextWindowDataFlags; // -> enum ImGuiNextWindowDataFlags_// Flags: for SetNextWindowXXX() functions
|
||||
typedef int ImGuiScrollFlags; // -> enum ImGuiScrollFlags_ // Flags: for ScrollToItem() and navigation requests
|
||||
typedef int ImGuiSeparatorFlags; // -> enum ImGuiSeparatorFlags_ // Flags: for SeparatorEx()
|
||||
typedef int ImGuiTextFlags; // -> enum ImGuiTextFlags_ // Flags: for TextEx()
|
||||
typedef int ImGuiTooltipFlags; // -> enum ImGuiTooltipFlags_ // Flags: for BeginTooltipEx()
|
||||
@ -256,12 +253,19 @@ namespace ImStb
|
||||
#endif
|
||||
|
||||
// Debug Tools
|
||||
// Use 'Metrics->Tools->Item Picker' to break into the call-stack of a specific item.
|
||||
// Use 'Metrics/Debugger->Tools->Item Picker' to break into the call-stack of a specific item.
|
||||
// This will call IM_DEBUG_BREAK() which you may redefine yourself. See https://github.com/scottt/debugbreak for more reference.
|
||||
#ifndef IM_DEBUG_BREAK
|
||||
#if defined(__clang__)
|
||||
#define IM_DEBUG_BREAK() __builtin_debugtrap()
|
||||
#elif defined (_MSC_VER)
|
||||
#if defined (_MSC_VER)
|
||||
#define IM_DEBUG_BREAK() __debugbreak()
|
||||
#elif defined(__clang__)
|
||||
#define IM_DEBUG_BREAK() __builtin_debugtrap()
|
||||
#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
|
||||
#define IM_DEBUG_BREAK() __asm__ volatile("int $0x03")
|
||||
#elif defined(__GNUC__) && defined(__thumb__)
|
||||
#define IM_DEBUG_BREAK() __asm__ volatile(".inst 0xde01")
|
||||
#elif defined(__GNUC__) && defined(__arm__) && !defined(__thumb__)
|
||||
#define IM_DEBUG_BREAK() __asm__ volatile(".inst 0xe7f001f0");
|
||||
#else
|
||||
#define IM_DEBUG_BREAK() IM_ASSERT(0) // It is expected that you define IM_DEBUG_BREAK() into something that will break nicely in a debugger!
|
||||
#endif
|
||||
@ -298,7 +302,9 @@ static inline ImGuiID ImHash(const void* data, int size, ImU32 seed = 0) { ret
|
||||
#endif
|
||||
|
||||
// Helpers: Sorting
|
||||
#define ImQsort qsort
|
||||
#ifndef ImQsort
|
||||
static inline void ImQsort(void* base, size_t count, size_t size_of_element, int(IMGUI_CDECL *compare_func)(void const*, void const*)) { if (count > 1) qsort(base, count, size_of_element, compare_func); }
|
||||
#endif
|
||||
|
||||
// Helpers: Color Blending
|
||||
IMGUI_API ImU32 ImAlphaBlendColors(ImU32 col_a, ImU32 col_b);
|
||||
@ -405,8 +411,8 @@ static inline double ImLog(double x) { return log(x); }
|
||||
static inline int ImAbs(int x) { return x < 0 ? -x : x; }
|
||||
static inline float ImAbs(float x) { return fabsf(x); }
|
||||
static inline double ImAbs(double x) { return fabs(x); }
|
||||
static inline float ImSign(float x) { return (x < 0.0f) ? -1.0f : ((x > 0.0f) ? 1.0f : 0.0f); } // Sign operator - returns -1, 0 or 1 based on sign of argument
|
||||
static inline double ImSign(double x) { return (x < 0.0) ? -1.0 : ((x > 0.0) ? 1.0 : 0.0); }
|
||||
static inline float ImSign(float x) { return (x < 0.0f) ? -1.0f : (x > 0.0f) ? 1.0f : 0.0f; } // Sign operator - returns -1, 0 or 1 based on sign of argument
|
||||
static inline double ImSign(double x) { return (x < 0.0) ? -1.0 : (x > 0.0) ? 1.0 : 0.0; }
|
||||
#ifdef IMGUI_ENABLE_SSE
|
||||
static inline float ImRsqrt(float x) { return _mm_cvtss_f32(_mm_rsqrt_ss(_mm_set_ss(x))); }
|
||||
#else
|
||||
@ -442,6 +448,7 @@ static inline float ImDot(const ImVec2& a, const ImVec2& b)
|
||||
static inline ImVec2 ImRotate(const ImVec2& v, float cos_a, float sin_a) { return ImVec2(v.x * cos_a - v.y * sin_a, v.x * sin_a + v.y * cos_a); }
|
||||
static inline float ImLinearSweep(float current, float target, float speed) { if (current < target) return ImMin(current + speed, target); if (current > target) return ImMax(current - speed, target); return current; }
|
||||
static inline ImVec2 ImMul(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(lhs.x * rhs.x, lhs.y * rhs.y); }
|
||||
static inline bool ImIsFloatAboveGuaranteedIntegerPrecision(float f) { return f <= -16777216 || f >= 16777216; }
|
||||
IM_MSVC_RUNTIME_CHECKS_RESTORE
|
||||
|
||||
// Helpers: Geometry
|
||||
@ -747,15 +754,8 @@ enum ImGuiItemFlags_
|
||||
ImGuiItemFlags_NoNavDefaultFocus = 1 << 4, // false // Disable item being a candidate for default focus (e.g. used by title bar items)
|
||||
ImGuiItemFlags_SelectableDontClosePopup = 1 << 5, // false // Disable MenuItem/Selectable() automatically closing their popup window
|
||||
ImGuiItemFlags_MixedValue = 1 << 6, // false // [BETA] Represent a mixed/indeterminate value, generally multi-selection where values differ. Currently only supported by Checkbox() (later should support all sorts of widgets)
|
||||
ImGuiItemFlags_ReadOnly = 1 << 7 // false // [ALPHA] Allow hovering interactions but underlying value is not changed.
|
||||
};
|
||||
|
||||
// Flags for ItemAdd()
|
||||
// FIXME-NAV: _Focusable is _ALMOST_ what you would expect to be called '_TabStop' but because SetKeyboardFocusHere() works on items with no TabStop we distinguish Focusable from TabStop.
|
||||
enum ImGuiItemAddFlags_
|
||||
{
|
||||
ImGuiItemAddFlags_None = 0,
|
||||
ImGuiItemAddFlags_Focusable = 1 << 0 // FIXME-NAV: In current/legacy scheme, Focusable+TabStop support are opt-in by widgets. We will transition it toward being opt-out, so this flag is expected to eventually disappear.
|
||||
ImGuiItemFlags_ReadOnly = 1 << 7, // false // [ALPHA] Allow hovering interactions but underlying value is not changed.
|
||||
ImGuiItemFlags_Inputable = 1 << 8 // false // [WIP] Auto-activate input mode when tab focused. Currently only used and supported by a few items before it becomes a generic feature.
|
||||
};
|
||||
|
||||
// Storage for LastItem data
|
||||
@ -763,16 +763,14 @@ enum ImGuiItemStatusFlags_
|
||||
{
|
||||
ImGuiItemStatusFlags_None = 0,
|
||||
ImGuiItemStatusFlags_HoveredRect = 1 << 0, // Mouse position is within item rectangle (does NOT mean that the window is in correct z-order and can be hovered!, this is only one part of the most-common IsItemHovered test)
|
||||
ImGuiItemStatusFlags_HasDisplayRect = 1 << 1, // window->DC.LastItemDisplayRect is valid
|
||||
ImGuiItemStatusFlags_HasDisplayRect = 1 << 1, // g.LastItemData.DisplayRect is valid
|
||||
ImGuiItemStatusFlags_Edited = 1 << 2, // Value exposed by item was edited in the current frame (should match the bool return value of most widgets)
|
||||
ImGuiItemStatusFlags_ToggledSelection = 1 << 3, // Set when Selectable(), TreeNode() reports toggling a selection. We can't report "Selected", only state changes, in order to easily handle clipping with less issues.
|
||||
ImGuiItemStatusFlags_ToggledOpen = 1 << 4, // Set when TreeNode() reports toggling their open state.
|
||||
ImGuiItemStatusFlags_HasDeactivated = 1 << 5, // Set if the widget/group is able to provide data for the ImGuiItemStatusFlags_Deactivated flag.
|
||||
ImGuiItemStatusFlags_Deactivated = 1 << 6, // Only valid if ImGuiItemStatusFlags_HasDeactivated is set.
|
||||
ImGuiItemStatusFlags_HoveredWindow = 1 << 7, // Override the HoveredWindow test to allow cross-window hover testing.
|
||||
ImGuiItemStatusFlags_FocusedByCode = 1 << 8, // Set when the Focusable item just got focused from code.
|
||||
ImGuiItemStatusFlags_FocusedByTabbing = 1 << 9, // Set when the Focusable item just got focused by Tabbing.
|
||||
ImGuiItemStatusFlags_Focused = ImGuiItemStatusFlags_FocusedByCode | ImGuiItemStatusFlags_FocusedByTabbing
|
||||
ImGuiItemStatusFlags_FocusedByTabbing = 1 << 8 // Set when the Focusable item just got focused by Tabbing (FIXME: to be removed soon)
|
||||
|
||||
#ifdef IMGUI_ENABLE_TEST_ENGINE
|
||||
, // [imgui_tests only]
|
||||
@ -921,49 +919,6 @@ enum ImGuiInputReadMode
|
||||
ImGuiInputReadMode_RepeatFast
|
||||
};
|
||||
|
||||
enum ImGuiNavHighlightFlags_
|
||||
{
|
||||
ImGuiNavHighlightFlags_None = 0,
|
||||
ImGuiNavHighlightFlags_TypeDefault = 1 << 0,
|
||||
ImGuiNavHighlightFlags_TypeThin = 1 << 1,
|
||||
ImGuiNavHighlightFlags_AlwaysDraw = 1 << 2, // Draw rectangular highlight if (g.NavId == id) _even_ when using the mouse.
|
||||
ImGuiNavHighlightFlags_NoRounding = 1 << 3
|
||||
};
|
||||
|
||||
enum ImGuiNavDirSourceFlags_
|
||||
{
|
||||
ImGuiNavDirSourceFlags_None = 0,
|
||||
ImGuiNavDirSourceFlags_Keyboard = 1 << 0,
|
||||
ImGuiNavDirSourceFlags_PadDPad = 1 << 1,
|
||||
ImGuiNavDirSourceFlags_PadLStick = 1 << 2
|
||||
};
|
||||
|
||||
enum ImGuiNavMoveFlags_
|
||||
{
|
||||
ImGuiNavMoveFlags_None = 0,
|
||||
ImGuiNavMoveFlags_LoopX = 1 << 0, // On failed request, restart from opposite side
|
||||
ImGuiNavMoveFlags_LoopY = 1 << 1,
|
||||
ImGuiNavMoveFlags_WrapX = 1 << 2, // On failed request, request from opposite side one line down (when NavDir==right) or one line up (when NavDir==left)
|
||||
ImGuiNavMoveFlags_WrapY = 1 << 3, // This is not super useful for provided for completeness
|
||||
ImGuiNavMoveFlags_AllowCurrentNavId = 1 << 4, // Allow scoring and considering the current NavId as a move target candidate. This is used when the move source is offset (e.g. pressing PageDown actually needs to send a Up move request, if we are pressing PageDown from the bottom-most item we need to stay in place)
|
||||
ImGuiNavMoveFlags_AlsoScoreVisibleSet = 1 << 5, // Store alternate result in NavMoveResultLocalVisibleSet that only comprise elements that are already fully visible.
|
||||
ImGuiNavMoveFlags_ScrollToEdge = 1 << 6
|
||||
};
|
||||
|
||||
enum ImGuiNavForward
|
||||
{
|
||||
ImGuiNavForward_None,
|
||||
ImGuiNavForward_ForwardQueued,
|
||||
ImGuiNavForward_ForwardActive
|
||||
};
|
||||
|
||||
enum ImGuiNavLayer
|
||||
{
|
||||
ImGuiNavLayer_Main = 0, // Main scrolling layer
|
||||
ImGuiNavLayer_Menu = 1, // Menu layer (access with Alt/ImGuiNavInput_Menu)
|
||||
ImGuiNavLayer_COUNT
|
||||
};
|
||||
|
||||
enum ImGuiPopupPositionPolicy
|
||||
{
|
||||
ImGuiPopupPositionPolicy_Default,
|
||||
@ -1075,8 +1030,6 @@ struct IMGUI_API ImGuiInputTextState
|
||||
bool SelectedAllMouseLock; // after a double-click to select all, we ignore further mouse drags to update selection
|
||||
bool Edited; // edited this frame
|
||||
ImGuiInputTextFlags Flags; // copy of InputText() flags
|
||||
ImGuiInputTextCallback UserCallback; // "
|
||||
void* UserCallbackData; // "
|
||||
|
||||
ImGuiInputTextState() { memset(this, 0, sizeof(*this)); }
|
||||
void ClearText() { CurLenW = CurLenA = 0; TextW[0] = 0; TextA[0] = 0; CursorClamp(); }
|
||||
@ -1110,20 +1063,6 @@ struct ImGuiPopupData
|
||||
ImGuiPopupData() { memset(this, 0, sizeof(*this)); OpenFrameCount = -1; }
|
||||
};
|
||||
|
||||
struct ImGuiNavItemData
|
||||
{
|
||||
ImGuiWindow* Window; // Init,Move // Best candidate window (result->ItemWindow->RootWindowForNav == request->Window)
|
||||
ImGuiID ID; // Init,Move // Best candidate item ID
|
||||
ImGuiID FocusScopeId; // Init,Move // Best candidate focus scope ID
|
||||
ImRect RectRel; // Init,Move // Best candidate bounding box in window relative space
|
||||
float DistBox; // Move // Best candidate box distance to current NavId
|
||||
float DistCenter; // Move // Best candidate center distance to current NavId
|
||||
float DistAxial; // Move // Best candidate axial distance to current NavId
|
||||
|
||||
ImGuiNavItemData() { Clear(); }
|
||||
void Clear() { Window = NULL; ID = FocusScopeId = 0; RectRel = ImRect(); DistBox = DistCenter = DistAxial = FLT_MAX; }
|
||||
};
|
||||
|
||||
enum ImGuiNextWindowDataFlags_
|
||||
{
|
||||
ImGuiNextWindowDataFlags_None = 0,
|
||||
@ -1185,17 +1124,36 @@ struct ImGuiLastItemData
|
||||
ImGuiID ID;
|
||||
ImGuiItemFlags InFlags; // See ImGuiItemFlags_
|
||||
ImGuiItemStatusFlags StatusFlags; // See ImGuiItemStatusFlags_
|
||||
ImRect Rect;
|
||||
ImRect DisplayRect;
|
||||
ImRect Rect; // Full rectangle
|
||||
ImRect NavRect; // Navigation scoring rectangle (not displayed)
|
||||
ImRect DisplayRect; // Display rectangle (only if ImGuiItemStatusFlags_HasDisplayRect is set)
|
||||
|
||||
ImGuiLastItemData() { memset(this, 0, sizeof(*this)); }
|
||||
};
|
||||
|
||||
struct IMGUI_API ImGuiStackSizes
|
||||
{
|
||||
short SizeOfIDStack;
|
||||
short SizeOfColorStack;
|
||||
short SizeOfStyleVarStack;
|
||||
short SizeOfFontStack;
|
||||
short SizeOfFocusScopeStack;
|
||||
short SizeOfGroupStack;
|
||||
short SizeOfItemFlagsStack;
|
||||
short SizeOfBeginPopupStack;
|
||||
short SizeOfDisabledStack;
|
||||
|
||||
ImGuiStackSizes() { memset(this, 0, sizeof(*this)); }
|
||||
void SetToCurrentState();
|
||||
void CompareWithCurrentState();
|
||||
};
|
||||
|
||||
// Data saved for each window pushed into the stack
|
||||
struct ImGuiWindowStackData
|
||||
{
|
||||
ImGuiWindow* Window;
|
||||
ImGuiLastItemData ParentLastItemDataBackup;
|
||||
ImGuiStackSizes StackSizesOnBegin; // Store size of various stacks for asserting
|
||||
};
|
||||
|
||||
struct ImGuiShrinkWidthItem
|
||||
@ -1213,6 +1171,120 @@ struct ImGuiPtrOrIndex
|
||||
ImGuiPtrOrIndex(int index) { Ptr = NULL; Index = index; }
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// [SECTION] Clipper support
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
struct ImGuiListClipperRange
|
||||
{
|
||||
int Min;
|
||||
int Max;
|
||||
bool PosToIndexConvert; // Begin/End are absolute position (will be converted to indices later)
|
||||
ImS8 PosToIndexOffsetMin; // Add to Min after converting to indices
|
||||
ImS8 PosToIndexOffsetMax; // Add to Min after converting to indices
|
||||
|
||||
static ImGuiListClipperRange FromIndices(int min, int max) { ImGuiListClipperRange r = { min, max, false, 0, 0 }; return r; }
|
||||
static ImGuiListClipperRange FromPositions(float y1, float y2, int off_min, int off_max) { ImGuiListClipperRange r = { (int)y1, (int)y2, true, (ImS8)off_min, (ImS8)off_max }; return r; }
|
||||
};
|
||||
|
||||
// Temporary clipper data, buffers shared/reused between instances
|
||||
struct ImGuiListClipperData
|
||||
{
|
||||
ImGuiListClipper* ListClipper;
|
||||
float LossynessOffset;
|
||||
int StepNo;
|
||||
int ItemsFrozen;
|
||||
ImVector<ImGuiListClipperRange> Ranges;
|
||||
|
||||
ImGuiListClipperData() { memset(this, 0, sizeof(*this)); }
|
||||
void Reset(ImGuiListClipper* clipper) { ListClipper = clipper; StepNo = ItemsFrozen = 0; Ranges.resize(0); }
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// [SECTION] Navigation support
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
enum ImGuiActivateFlags_
|
||||
{
|
||||
ImGuiActivateFlags_None = 0,
|
||||
ImGuiActivateFlags_PreferInput = 1 << 0, // Favor activation that requires keyboard text input (e.g. for Slider/Drag). Default if keyboard is available.
|
||||
ImGuiActivateFlags_PreferTweak = 1 << 1, // Favor activation for tweaking with arrows or gamepad (e.g. for Slider/Drag). Default if keyboard is not available.
|
||||
ImGuiActivateFlags_TryToPreserveState = 1 << 2 // Request widget to preserve state if it can (e.g. InputText will try to preserve cursor/selection)
|
||||
};
|
||||
|
||||
// Early work-in-progress API for ScrollToItem()
|
||||
enum ImGuiScrollFlags_
|
||||
{
|
||||
ImGuiScrollFlags_None = 0,
|
||||
ImGuiScrollFlags_KeepVisibleEdgeX = 1 << 0, // If item is not visible: scroll as little as possible on X axis to bring item back into view [default for X axis]
|
||||
ImGuiScrollFlags_KeepVisibleEdgeY = 1 << 1, // If item is not visible: scroll as little as possible on Y axis to bring item back into view [default for Y axis for windows that are already visible]
|
||||
ImGuiScrollFlags_KeepVisibleCenterX = 1 << 2, // If item is not visible: scroll to make the item centered on X axis [rarely used]
|
||||
ImGuiScrollFlags_KeepVisibleCenterY = 1 << 3, // If item is not visible: scroll to make the item centered on Y axis
|
||||
ImGuiScrollFlags_AlwaysCenterX = 1 << 4, // Always center the result item on X axis [rarely used]
|
||||
ImGuiScrollFlags_AlwaysCenterY = 1 << 5, // Always center the result item on Y axis [default for Y axis for appearing window)
|
||||
ImGuiScrollFlags_NoScrollParent = 1 << 6, // Disable forwarding scrolling to parent window if required to keep item/rect visible (only scroll window the function was applied to).
|
||||
ImGuiScrollFlags_MaskX_ = ImGuiScrollFlags_KeepVisibleEdgeX | ImGuiScrollFlags_KeepVisibleCenterX | ImGuiScrollFlags_AlwaysCenterX,
|
||||
ImGuiScrollFlags_MaskY_ = ImGuiScrollFlags_KeepVisibleEdgeY | ImGuiScrollFlags_KeepVisibleCenterY | ImGuiScrollFlags_AlwaysCenterY
|
||||
};
|
||||
|
||||
enum ImGuiNavHighlightFlags_
|
||||
{
|
||||
ImGuiNavHighlightFlags_None = 0,
|
||||
ImGuiNavHighlightFlags_TypeDefault = 1 << 0,
|
||||
ImGuiNavHighlightFlags_TypeThin = 1 << 1,
|
||||
ImGuiNavHighlightFlags_AlwaysDraw = 1 << 2, // Draw rectangular highlight if (g.NavId == id) _even_ when using the mouse.
|
||||
ImGuiNavHighlightFlags_NoRounding = 1 << 3
|
||||
};
|
||||
|
||||
enum ImGuiNavDirSourceFlags_
|
||||
{
|
||||
ImGuiNavDirSourceFlags_None = 0,
|
||||
ImGuiNavDirSourceFlags_RawKeyboard = 1 << 0, // Raw keyboard (not pulled from nav), faciliate use of some functions before we can unify nav and keys
|
||||
ImGuiNavDirSourceFlags_Keyboard = 1 << 1,
|
||||
ImGuiNavDirSourceFlags_PadDPad = 1 << 2,
|
||||
ImGuiNavDirSourceFlags_PadLStick = 1 << 3
|
||||
};
|
||||
|
||||
enum ImGuiNavMoveFlags_
|
||||
{
|
||||
ImGuiNavMoveFlags_None = 0,
|
||||
ImGuiNavMoveFlags_LoopX = 1 << 0, // On failed request, restart from opposite side
|
||||
ImGuiNavMoveFlags_LoopY = 1 << 1,
|
||||
ImGuiNavMoveFlags_WrapX = 1 << 2, // On failed request, request from opposite side one line down (when NavDir==right) or one line up (when NavDir==left)
|
||||
ImGuiNavMoveFlags_WrapY = 1 << 3, // This is not super useful but provided for completeness
|
||||
ImGuiNavMoveFlags_AllowCurrentNavId = 1 << 4, // Allow scoring and considering the current NavId as a move target candidate. This is used when the move source is offset (e.g. pressing PageDown actually needs to send a Up move request, if we are pressing PageDown from the bottom-most item we need to stay in place)
|
||||
ImGuiNavMoveFlags_AlsoScoreVisibleSet = 1 << 5, // Store alternate result in NavMoveResultLocalVisible that only comprise elements that are already fully visible (used by PageUp/PageDown)
|
||||
ImGuiNavMoveFlags_ScrollToEdgeY = 1 << 6, // Force scrolling to min/max (used by Home/End) // FIXME-NAV: Aim to remove or reword, probably unnecessary
|
||||
ImGuiNavMoveFlags_Forwarded = 1 << 7,
|
||||
ImGuiNavMoveFlags_DebugNoResult = 1 << 8, // Dummy scoring for debug purpose, don't apply result
|
||||
ImGuiNavMoveFlags_FocusApi = 1 << 9,
|
||||
ImGuiNavMoveFlags_Tabbing = 1 << 10, // == Focus + Activate if item is Inputable + DontChangeNavHighlight
|
||||
ImGuiNavMoveFlags_Activate = 1 << 11,
|
||||
ImGuiNavMoveFlags_DontSetNavHighlight = 1 << 12 // Do not alter the visible state of keyboard vs mouse nav highlight
|
||||
};
|
||||
|
||||
enum ImGuiNavLayer
|
||||
{
|
||||
ImGuiNavLayer_Main = 0, // Main scrolling layer
|
||||
ImGuiNavLayer_Menu = 1, // Menu layer (access with Alt/ImGuiNavInput_Menu)
|
||||
ImGuiNavLayer_COUNT
|
||||
};
|
||||
|
||||
struct ImGuiNavItemData
|
||||
{
|
||||
ImGuiWindow* Window; // Init,Move // Best candidate window (result->ItemWindow->RootWindowForNav == request->Window)
|
||||
ImGuiID ID; // Init,Move // Best candidate item ID
|
||||
ImGuiID FocusScopeId; // Init,Move // Best candidate focus scope ID
|
||||
ImRect RectRel; // Init,Move // Best candidate bounding box in window relative space
|
||||
ImGuiItemFlags InFlags; // ????,Move // Best candidate item flags
|
||||
float DistBox; // Move // Best candidate box distance to current NavId
|
||||
float DistCenter; // Move // Best candidate center distance to current NavId
|
||||
float DistAxial; // Move // Best candidate axial distance to current NavId
|
||||
|
||||
ImGuiNavItemData() { Clear(); }
|
||||
void Clear() { Window = NULL; ID = FocusScopeId = 0; InFlags = 0; DistBox = DistCenter = DistAxial = FLT_MAX; }
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// [SECTION] Columns support
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -1352,11 +1424,12 @@ struct ImGuiSettingsHandler
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// [SECTION] Metrics, Debug
|
||||
// [SECTION] Metrics, Debug Tools
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
struct ImGuiMetricsConfig
|
||||
{
|
||||
bool ShowStackTool;
|
||||
bool ShowWindowsRects;
|
||||
bool ShowWindowsBeginOrder;
|
||||
bool ShowTablesRects;
|
||||
@ -1367,6 +1440,7 @@ struct ImGuiMetricsConfig
|
||||
|
||||
ImGuiMetricsConfig()
|
||||
{
|
||||
ShowStackTool = false;
|
||||
ShowWindowsRects = false;
|
||||
ShowWindowsBeginOrder = false;
|
||||
ShowTablesRects = false;
|
||||
@ -1377,19 +1451,25 @@ struct ImGuiMetricsConfig
|
||||
}
|
||||
};
|
||||
|
||||
struct IMGUI_API ImGuiStackSizes
|
||||
struct ImGuiStackLevelInfo
|
||||
{
|
||||
short SizeOfIDStack;
|
||||
short SizeOfColorStack;
|
||||
short SizeOfStyleVarStack;
|
||||
short SizeOfFontStack;
|
||||
short SizeOfFocusScopeStack;
|
||||
short SizeOfGroupStack;
|
||||
short SizeOfBeginPopupStack;
|
||||
ImGuiID ID;
|
||||
ImS8 QueryFrameCount; // >= 1: Query in progress
|
||||
bool QuerySuccess; // Obtained result from DebugHookIdInfo()
|
||||
char Desc[58]; // Arbitrarily sized buffer to hold a result (FIXME: could replace Results[] with a chunk stream?)
|
||||
|
||||
ImGuiStackSizes() { memset(this, 0, sizeof(*this)); }
|
||||
void SetToCurrentState();
|
||||
void CompareWithCurrentState();
|
||||
ImGuiStackLevelInfo() { memset(this, 0, sizeof(*this)); }
|
||||
};
|
||||
|
||||
// State for Stack tool queries
|
||||
struct ImGuiStackTool
|
||||
{
|
||||
int LastActiveFrame;
|
||||
int StackLevel; // -1: query stack and resize Results, >= 0: individual stack level
|
||||
ImGuiID QueryId; // ID to query details for
|
||||
ImVector<ImGuiStackLevelInfo> Results;
|
||||
|
||||
ImGuiStackTool() { memset(this, 0, sizeof(*this)); }
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -1433,7 +1513,6 @@ struct ImGuiContext
|
||||
bool WithinEndChild; // Set within EndChild()
|
||||
bool GcCompactAll; // Request full GC
|
||||
bool TestEngineHookItems; // Will call test engine hooks: ImGuiTestEngineHook_ItemAdd(), ImGuiTestEngineHook_ItemInfo(), ImGuiTestEngineHook_Log()
|
||||
ImGuiID TestEngineHookIdInfo; // Will call test engine hooks: ImGuiTestEngineHook_IdInfo() from GetID()
|
||||
void* TestEngine; // Test engine user data
|
||||
|
||||
// Windows state
|
||||
@ -1453,6 +1532,7 @@ struct ImGuiContext
|
||||
float WheelingWindowTimer;
|
||||
|
||||
// Item/widgets state and tracking information
|
||||
ImGuiID DebugHookIdInfo; // Will call core hooks: DebugHookIdInfo() from GetID functions, used by Stack Tool [next HoveredId/ActiveId to not pull in an extra cache-line]
|
||||
ImGuiID HoveredId; // Hovered widget, filled during the frame
|
||||
ImGuiID HoveredIdPreviousFrame;
|
||||
bool HoveredIdAllowOverlap;
|
||||
@ -1500,6 +1580,7 @@ struct ImGuiContext
|
||||
ImVector<ImGuiGroupData>GroupStack; // Stack for BeginGroup()/EndGroup() - not inherited by Begin()
|
||||
ImVector<ImGuiPopupData>OpenPopupStack; // Which popups are open (persistent)
|
||||
ImVector<ImGuiPopupData>BeginPopupStack; // Which level of BeginPopup() we are in (reset every frame)
|
||||
int BeginMenuCount;
|
||||
|
||||
// Viewports
|
||||
ImVector<ImGuiViewportP*> Viewports; // Active viewports (Size==1 in 'master' branch). Each viewports hold their copy of ImDrawData.
|
||||
@ -1511,37 +1592,44 @@ struct ImGuiContext
|
||||
ImGuiID NavActivateId; // ~~ (g.ActiveId == 0) && IsNavInputPressed(ImGuiNavInput_Activate) ? NavId : 0, also set when calling ActivateItem()
|
||||
ImGuiID NavActivateDownId; // ~~ IsNavInputDown(ImGuiNavInput_Activate) ? NavId : 0
|
||||
ImGuiID NavActivatePressedId; // ~~ IsNavInputPressed(ImGuiNavInput_Activate) ? NavId : 0
|
||||
ImGuiID NavInputId; // ~~ IsNavInputPressed(ImGuiNavInput_Input) ? NavId : 0
|
||||
ImGuiID NavJustTabbedId; // Just tabbed to this id.
|
||||
ImGuiID NavActivateInputId; // ~~ IsNavInputPressed(ImGuiNavInput_Input) ? NavId : 0; ImGuiActivateFlags_PreferInput will be set and NavActivateId will be 0.
|
||||
ImGuiActivateFlags NavActivateFlags;
|
||||
ImGuiID NavJustMovedToId; // Just navigated to this id (result of a successfully MoveRequest).
|
||||
ImGuiID NavJustMovedToFocusScopeId; // Just navigated to this focus scope id (result of a successfully MoveRequest).
|
||||
ImGuiKeyModFlags NavJustMovedToKeyMods;
|
||||
ImGuiID NavNextActivateId; // Set by ActivateItem(), queued until next frame.
|
||||
ImGuiActivateFlags NavNextActivateFlags;
|
||||
ImGuiInputSource NavInputSource; // Keyboard or Gamepad mode? THIS WILL ONLY BE None or NavGamepad or NavKeyboard.
|
||||
ImRect NavScoringRect; // Rectangle used for scoring, in screen space. Based of window->NavRectRel[], modified for directional navigation scoring.
|
||||
int NavScoringCount; // Metrics for debugging
|
||||
ImGuiNavLayer NavLayer; // Layer we are navigating on. For now the system is hard-coded for 0=main contents and 1=menu/title bar, may expose layers later.
|
||||
int NavIdTabCounter; // == NavWindow->DC.FocusIdxTabCounter at time of NavId processing
|
||||
bool NavIdIsAlive; // Nav widget has been seen this frame ~~ NavRectRel is valid
|
||||
bool NavMousePosDirty; // When set we will update mouse position if (io.ConfigFlags & ImGuiConfigFlags_NavEnableSetMousePos) if set (NB: this not enabled by default)
|
||||
bool NavDisableHighlight; // When user starts using mouse, we hide gamepad/keyboard highlight (NB: but they are still available, which is why NavDisableHighlight isn't always != NavDisableMouseHover)
|
||||
bool NavDisableMouseHover; // When user starts using gamepad/keyboard, we hide mouse hovering highlight until mouse is touched again.
|
||||
bool NavAnyRequest; // ~~ NavMoveRequest || NavInitRequest
|
||||
|
||||
// Navigation: Init & Move Requests
|
||||
bool NavAnyRequest; // ~~ NavMoveRequest || NavInitRequest this is to perform early out in ItemAdd()
|
||||
bool NavInitRequest; // Init request for appearing window to select first item
|
||||
bool NavInitRequestFromMove;
|
||||
ImGuiID NavInitResultId; // Init request result (first item of the window, or one for which SetItemDefaultFocus() was called)
|
||||
ImRect NavInitResultRectRel; // Init request result rectangle (relative to parent window)
|
||||
bool NavMoveRequest; // Move request for this frame
|
||||
ImGuiNavMoveFlags NavMoveRequestFlags;
|
||||
ImGuiNavForward NavMoveRequestForward; // None / ForwardQueued / ForwardActive (this is used to navigate sibling parent menus from a child menu)
|
||||
ImGuiKeyModFlags NavMoveRequestKeyMods;
|
||||
ImGuiDir NavMoveDir, NavMoveDirLast; // Direction of the move request (left/right/up/down), direction of the previous move request
|
||||
bool NavMoveSubmitted; // Move request submitted, will process result on next NewFrame()
|
||||
bool NavMoveScoringItems; // Move request submitted, still scoring incoming items
|
||||
bool NavMoveForwardToNextFrame;
|
||||
ImGuiNavMoveFlags NavMoveFlags;
|
||||
ImGuiScrollFlags NavMoveScrollFlags;
|
||||
ImGuiKeyModFlags NavMoveKeyMods;
|
||||
ImGuiDir NavMoveDir; // Direction of the move request (left/right/up/down)
|
||||
ImGuiDir NavMoveDirForDebug;
|
||||
ImGuiDir NavMoveClipDir; // FIXME-NAV: Describe the purpose of this better. Might want to rename?
|
||||
ImRect NavScoringRect; // Rectangle used for scoring, in screen space. Based of window->NavRectRel[], modified for directional navigation scoring.
|
||||
ImRect NavScoringNoClipRect; // Some nav operations (such as PageUp/PageDown) enforce a region which clipper will attempt to always keep submitted
|
||||
int NavScoringDebugCount; // Metrics for debugging
|
||||
int NavTabbingDir; // Generally -1 or +1, 0 when tabbing without a nav id
|
||||
int NavTabbingCounter; // >0 when counting items for tabbing
|
||||
ImGuiNavItemData NavMoveResultLocal; // Best move request candidate within NavWindow
|
||||
ImGuiNavItemData NavMoveResultLocalVisibleSet; // Best move request candidate within NavWindow that are mostly visible (when using ImGuiNavMoveFlags_AlsoScoreVisibleSet flag)
|
||||
ImGuiNavItemData NavMoveResultLocalVisible; // Best move request candidate within NavWindow that are mostly visible (when using ImGuiNavMoveFlags_AlsoScoreVisibleSet flag)
|
||||
ImGuiNavItemData NavMoveResultOther; // Best move request candidate within NavWindow's flattened hierarchy (when using ImGuiWindowFlags_NavFlattened flag)
|
||||
ImGuiWindow* NavWrapRequestWindow; // Window which requested trying nav wrap-around.
|
||||
ImGuiNavMoveFlags NavWrapRequestFlags; // Wrap-around operation flags.
|
||||
ImGuiNavItemData NavTabbingResultFirst; // First tabbing request candidate within NavWindow and flattened hierarchy
|
||||
|
||||
// Navigation: Windowing (CTRL+TAB for list, or Menu button + keys or directional pads to move/resize)
|
||||
ImGuiWindow* NavWindowingTarget; // Target window when doing CTRL+Tab (or Pad Menu + FocusPrev/Next), this window is temporarily displayed top-most!
|
||||
@ -1551,15 +1639,6 @@ struct ImGuiContext
|
||||
float NavWindowingHighlightAlpha;
|
||||
bool NavWindowingToggleLayer;
|
||||
|
||||
// Legacy Focus/Tabbing system (older than Nav, active even if Nav is disabled, misnamed. FIXME-NAV: This needs a redesign!)
|
||||
ImGuiWindow* TabFocusRequestCurrWindow; //
|
||||
ImGuiWindow* TabFocusRequestNextWindow; //
|
||||
int TabFocusRequestCurrCounterRegular; // Any item being requested for focus, stored as an index (we on layout to be stable between the frame pressing TAB and the next frame, semi-ouch)
|
||||
int TabFocusRequestCurrCounterTabStop; // Tab item being requested for focus, stored as an index
|
||||
int TabFocusRequestNextCounterRegular; // Stored for next frame
|
||||
int TabFocusRequestNextCounterTabStop; // "
|
||||
bool TabFocusPressed; // Set in NewFrame() when user pressed Tab
|
||||
|
||||
// Render
|
||||
float DimBgRatio; // 0.0..1.0 animation when fading in a dimming background (for modal window and CTRL+TAB list)
|
||||
ImGuiMouseCursor MouseCursor;
|
||||
@ -1583,11 +1662,15 @@ struct ImGuiContext
|
||||
ImVector<unsigned char> DragDropPayloadBufHeap; // We don't expose the ImVector<> directly, ImGuiPayload only holds pointer+size
|
||||
unsigned char DragDropPayloadBufLocal[16]; // Local buffer for small payloads
|
||||
|
||||
// Clipper
|
||||
int ClipperTempDataStacked;
|
||||
ImVector<ImGuiListClipperData> ClipperTempData;
|
||||
|
||||
// Table
|
||||
ImGuiTable* CurrentTable;
|
||||
int CurrentTableStackIdx;
|
||||
ImPool<ImGuiTable> Tables;
|
||||
ImVector<ImGuiTableTempData> TablesTempDataStack;
|
||||
int TablesTempDataStacked; // Temporary table data size (because we leave previous instances undestructed, we generally don't use TablesTempData.Size)
|
||||
ImVector<ImGuiTableTempData> TablesTempData; // Temporary table data (buffers reused/shared across instances, support nesting)
|
||||
ImPool<ImGuiTable> Tables; // Persistent table data
|
||||
ImVector<float> TablesLastTimeActive; // Last used timestamp of each tables (SOA, for efficient GC)
|
||||
ImVector<ImDrawChannel> DrawChannelsTempMergeBuffer;
|
||||
|
||||
@ -1598,14 +1681,14 @@ struct ImGuiContext
|
||||
ImVector<ImGuiShrinkWidthItem> ShrinkWidthBuffer;
|
||||
|
||||
// Widget state
|
||||
ImVec2 LastValidMousePos;
|
||||
ImVec2 MouseLastValidPos;
|
||||
ImGuiInputTextState InputTextState;
|
||||
ImFont InputTextPasswordFont;
|
||||
ImGuiID TempInputId; // Temporary text input when CTRL+clicking on a slider, etc.
|
||||
ImGuiColorEditFlags ColorEditOptions; // Store user options for color edit widgets
|
||||
float ColorEditLastHue; // Backup of last Hue associated to LastColor[3], so we can restore Hue in lossy RGB<>HSV round trips
|
||||
float ColorEditLastSat; // Backup of last Saturation associated to LastColor[3], so we can restore Saturation in lossy RGB<>HSV round trips
|
||||
float ColorEditLastColor[3];
|
||||
float ColorEditLastHue; // Backup of last Hue associated to LastColor, so we can restore Hue in lossy RGB<>HSV round trips
|
||||
float ColorEditLastSat; // Backup of last Saturation associated to LastColor, so we can restore Saturation in lossy RGB<>HSV round trips
|
||||
ImU32 ColorEditLastColor; // RGB value with alpha set to 0.
|
||||
ImVec4 ColorPickerRef; // Initial/reference color at the time of opening the color picker.
|
||||
ImGuiComboPreviewData ComboPreviewData;
|
||||
float SliderCurrentAccum; // Accumulated slider delta when using navigation controls.
|
||||
@ -1613,9 +1696,10 @@ struct ImGuiContext
|
||||
bool DragCurrentAccumDirty;
|
||||
float DragCurrentAccum; // Accumulator for dragging modification. Always high-precision, not rounded by end-user precision settings
|
||||
float DragSpeedDefaultRatio; // If speed == 0.0f, uses (max-min) * DragSpeedDefaultRatio
|
||||
float DisabledAlphaBackup; // Backup for style.Alpha for BeginDisabled()
|
||||
float ScrollbarClickDeltaToGrabCenter; // Distance between mouse and center of grab box, normalized in parent space. Use storage?
|
||||
int TooltipOverrideCount;
|
||||
float DisabledAlphaBackup; // Backup for style.Alpha for BeginDisabled()
|
||||
short DisabledStackSize;
|
||||
short TooltipOverrideCount;
|
||||
float TooltipSlowDelay; // Time before slow tooltips appears (FIXME: This is temporary until we merge in tooltip timer+priority work)
|
||||
ImVector<char> ClipboardHandlerData; // If no custom clipboard handler is defined
|
||||
ImVector<ImGuiID> MenusIdSubmittedThisFrame; // A list of menu IDs that were rendered at least once
|
||||
@ -1650,8 +1734,9 @@ struct ImGuiContext
|
||||
|
||||
// Debug Tools
|
||||
bool DebugItemPickerActive; // Item picker is active (started with DebugStartItemPicker())
|
||||
ImGuiID DebugItemPickerBreakId; // Will call IM_DEBUG_BREAK() when encountering this id
|
||||
ImGuiID DebugItemPickerBreakId; // Will call IM_DEBUG_BREAK() when encountering this ID
|
||||
ImGuiMetricsConfig DebugMetricsConfig;
|
||||
ImGuiStackTool DebugStackTool;
|
||||
|
||||
// Misc
|
||||
float FramerateSecPerFrame[120]; // Calculate estimate of framerate for user over the last 2 seconds.
|
||||
@ -1676,7 +1761,6 @@ struct ImGuiContext
|
||||
WithinFrameScope = WithinFrameScopeWithImplicitWindow = WithinEndChild = false;
|
||||
GcCompactAll = false;
|
||||
TestEngineHookItems = false;
|
||||
TestEngineHookIdInfo = 0;
|
||||
TestEngine = NULL;
|
||||
|
||||
WindowsActiveCount = 0;
|
||||
@ -1687,6 +1771,7 @@ struct ImGuiContext
|
||||
WheelingWindow = NULL;
|
||||
WheelingWindowTimer = 0.0f;
|
||||
|
||||
DebugHookIdInfo = 0;
|
||||
HoveredId = HoveredIdPreviousFrame = 0;
|
||||
HoveredIdAllowOverlap = false;
|
||||
HoveredIdUsingMouseWheel = HoveredIdPreviousFrameUsingMouseWheel = false;
|
||||
@ -1717,16 +1802,15 @@ struct ImGuiContext
|
||||
LastActiveIdTimer = 0.0f;
|
||||
|
||||
CurrentItemFlags = ImGuiItemFlags_None;
|
||||
BeginMenuCount = 0;
|
||||
|
||||
NavWindow = NULL;
|
||||
NavId = NavFocusScopeId = NavActivateId = NavActivateDownId = NavActivatePressedId = NavInputId = 0;
|
||||
NavJustTabbedId = NavJustMovedToId = NavJustMovedToFocusScopeId = NavNextActivateId = 0;
|
||||
NavId = NavFocusScopeId = NavActivateId = NavActivateDownId = NavActivatePressedId = NavActivateInputId = 0;
|
||||
NavJustMovedToId = NavJustMovedToFocusScopeId = NavNextActivateId = 0;
|
||||
NavActivateFlags = NavNextActivateFlags = ImGuiActivateFlags_None;
|
||||
NavJustMovedToKeyMods = ImGuiKeyModFlags_None;
|
||||
NavInputSource = ImGuiInputSource_None;
|
||||
NavScoringRect = ImRect();
|
||||
NavScoringCount = 0;
|
||||
NavLayer = ImGuiNavLayer_Main;
|
||||
NavIdTabCounter = INT_MAX;
|
||||
NavIdIsAlive = false;
|
||||
NavMousePosDirty = false;
|
||||
NavDisableHighlight = true;
|
||||
@ -1735,23 +1819,21 @@ struct ImGuiContext
|
||||
NavInitRequest = false;
|
||||
NavInitRequestFromMove = false;
|
||||
NavInitResultId = 0;
|
||||
NavMoveRequest = false;
|
||||
NavMoveRequestFlags = ImGuiNavMoveFlags_None;
|
||||
NavMoveRequestForward = ImGuiNavForward_None;
|
||||
NavMoveRequestKeyMods = ImGuiKeyModFlags_None;
|
||||
NavMoveDir = NavMoveDirLast = NavMoveClipDir = ImGuiDir_None;
|
||||
NavWrapRequestWindow = NULL;
|
||||
NavWrapRequestFlags = ImGuiNavMoveFlags_None;
|
||||
NavMoveSubmitted = false;
|
||||
NavMoveScoringItems = false;
|
||||
NavMoveForwardToNextFrame = false;
|
||||
NavMoveFlags = ImGuiNavMoveFlags_None;
|
||||
NavMoveScrollFlags = ImGuiScrollFlags_None;
|
||||
NavMoveKeyMods = ImGuiKeyModFlags_None;
|
||||
NavMoveDir = NavMoveDirForDebug = NavMoveClipDir = ImGuiDir_None;
|
||||
NavScoringDebugCount = 0;
|
||||
NavTabbingDir = 0;
|
||||
NavTabbingCounter = 0;
|
||||
|
||||
NavWindowingTarget = NavWindowingTargetAnim = NavWindowingListWindow = NULL;
|
||||
NavWindowingTimer = NavWindowingHighlightAlpha = 0.0f;
|
||||
NavWindowingToggleLayer = false;
|
||||
|
||||
TabFocusRequestCurrWindow = TabFocusRequestNextWindow = NULL;
|
||||
TabFocusRequestCurrCounterRegular = TabFocusRequestCurrCounterTabStop = INT_MAX;
|
||||
TabFocusRequestNextCounterRegular = TabFocusRequestNextCounterTabStop = INT_MAX;
|
||||
TabFocusPressed = false;
|
||||
|
||||
DimBgRatio = 0.0f;
|
||||
MouseCursor = ImGuiMouseCursor_Arrow;
|
||||
|
||||
@ -1767,21 +1849,23 @@ struct ImGuiContext
|
||||
DragDropHoldJustPressedId = 0;
|
||||
memset(DragDropPayloadBufLocal, 0, sizeof(DragDropPayloadBufLocal));
|
||||
|
||||
ClipperTempDataStacked = 0;
|
||||
|
||||
CurrentTable = NULL;
|
||||
CurrentTableStackIdx = -1;
|
||||
TablesTempDataStacked = 0;
|
||||
CurrentTabBar = NULL;
|
||||
|
||||
LastValidMousePos = ImVec2(0.0f, 0.0f);
|
||||
TempInputId = 0;
|
||||
ColorEditOptions = ImGuiColorEditFlags_DefaultOptions_;
|
||||
ColorEditLastHue = ColorEditLastSat = 0.0f;
|
||||
ColorEditLastColor[0] = ColorEditLastColor[1] = ColorEditLastColor[2] = FLT_MAX;
|
||||
ColorEditLastColor = 0;
|
||||
SliderCurrentAccum = 0.0f;
|
||||
SliderCurrentAccumDirty = false;
|
||||
DragCurrentAccumDirty = false;
|
||||
DragCurrentAccum = 0.0f;
|
||||
DragSpeedDefaultRatio = 1.0f / 100.0f;
|
||||
DisabledAlphaBackup = 0.0f;
|
||||
DisabledStackSize = 0;
|
||||
ScrollbarClickDeltaToGrabCenter = 0.0f;
|
||||
TooltipOverrideCount = 0;
|
||||
TooltipSlowDelay = 0.50f;
|
||||
@ -1835,6 +1919,7 @@ struct IMGUI_API ImGuiWindowTempData
|
||||
ImVec1 Indent; // Indentation / start position from left of window (increased by TreePush/TreePop, etc.)
|
||||
ImVec1 ColumnsOffset; // Offset to the current column (if ColumnsCurrent > 0). FIXME: This and the above should be a stack to allow use cases like Tree->Column->Tree. Need revamp columns API.
|
||||
ImVec1 GroupOffset;
|
||||
ImVec2 CursorStartPosLossyness;// Record the loss of precision of CursorStartPos due to really large scrolling amount. This is used by clipper to compensentate and fix the most common use case of large scroll area.
|
||||
|
||||
// Keyboard/Gamepad navigation
|
||||
ImGuiNavLayer NavLayerCurrent; // Current layer, 0..31 (we currently only use 0..1)
|
||||
@ -1856,8 +1941,6 @@ struct IMGUI_API ImGuiWindowTempData
|
||||
int CurrentTableIdx; // Current table index (into g.Tables)
|
||||
ImGuiLayoutType LayoutType;
|
||||
ImGuiLayoutType ParentLayoutType; // Layout type of parent window at the time of Begin()
|
||||
int FocusCounterRegular; // (Legacy Focus/Tabbing system) Sequential counter, start at -1 and increase as assigned via FocusableItemRegister() (FIXME-NAV: Needs redesign)
|
||||
int FocusCounterTabStop; // (Legacy Focus/Tabbing system) Same, but only count widgets which you can Tab through.
|
||||
|
||||
// Local parameters stacks
|
||||
// We store the current settings outside of the vectors to increase memory locality (reduce cache misses). The vectors are rarely modified. Also it allows us to not heap allocate for short-lived windows which are not using those settings.
|
||||
@ -1865,7 +1948,6 @@ struct IMGUI_API ImGuiWindowTempData
|
||||
float TextWrapPos; // Current text wrap pos.
|
||||
ImVector<float> ItemWidthStack; // Store item widths to restore (attention: .back() is not == ItemWidth)
|
||||
ImVector<float> TextWrapPosStack; // Store text wrap pos to restore (attention: .back() is not == TextWrapPos)
|
||||
ImGuiStackSizes StackSizesOnBegin; // Store size of various stacks for asserting
|
||||
};
|
||||
|
||||
// Storage for one window
|
||||
@ -1902,6 +1984,7 @@ struct IMGUI_API ImGuiWindow
|
||||
bool Appearing; // Set during the frame where the window is appearing (or re-appearing)
|
||||
bool Hidden; // Do not display (== HiddenFrames*** > 0)
|
||||
bool IsFallbackWindow; // Set on the "Debug##Default" window.
|
||||
bool IsExplicitChild; // Set when passed _ChildWindow, left to false by BeginDocked()
|
||||
bool HasCloseButton; // Set when the window has a close button (p_open != NULL)
|
||||
signed char ResizeBorderHeld; // Current border being held for resize (-1: none, otherwise 0-3)
|
||||
short BeginCount; // Number of Begin() during the current frame (generally 0 or 1, 1+ if appending via multiple Begin/End pairs)
|
||||
@ -1948,8 +2031,10 @@ struct IMGUI_API ImGuiWindow
|
||||
|
||||
ImDrawList* DrawList; // == &DrawListInst (for backward compatibility reason with code using imgui_internal.h we keep this a pointer)
|
||||
ImDrawList DrawListInst;
|
||||
ImGuiWindow* ParentWindow; // If we are a child _or_ popup window, this is pointing to our parent. Otherwise NULL.
|
||||
ImGuiWindow* RootWindow; // Point to ourself or first ancestor that is not a child window == Top-level window.
|
||||
ImGuiWindow* ParentWindow; // If we are a child _or_ popup _or_ docked window, this is pointing to our parent. Otherwise NULL.
|
||||
ImGuiWindow* ParentWindowInBeginStack;
|
||||
ImGuiWindow* RootWindow; // Point to ourself or first ancestor that is not a child window. Doesn't cross through popups/dock nodes.
|
||||
ImGuiWindow* RootWindowPopupTree; // Point to ourself or first ancestor that is not a child window. Cross through popups parent<>child.
|
||||
ImGuiWindow* RootWindowForTitleBarHighlight; // Point to ourself or first ancestor which will display TitleBgActive color when this window is active.
|
||||
ImGuiWindow* RootWindowForNav; // Point to ourself or first ancestor which doesn't have the NavFlattened flag.
|
||||
|
||||
@ -2021,7 +2106,7 @@ struct ImGuiTabItem
|
||||
};
|
||||
|
||||
// Storage for a tab bar (sizeof() 152 bytes)
|
||||
struct ImGuiTabBar
|
||||
struct IMGUI_API ImGuiTabBar
|
||||
{
|
||||
ImVector<ImGuiTabItem> Tabs;
|
||||
ImGuiTabBarFlags Flags;
|
||||
@ -2146,7 +2231,7 @@ struct ImGuiTableCellData
|
||||
};
|
||||
|
||||
// FIXME-TABLE: more transient data could be stored in a per-stacked table structure: DrawSplitter, SortSpecs, incoming RowData
|
||||
struct ImGuiTable
|
||||
struct IMGUI_API ImGuiTable
|
||||
{
|
||||
ImGuiID ID;
|
||||
ImGuiTableFlags Flags;
|
||||
@ -2252,14 +2337,14 @@ struct ImGuiTable
|
||||
bool MemoryCompacted;
|
||||
bool HostSkipItems; // Backup of InnerWindow->SkipItem at the end of BeginTable(), because we will overwrite InnerWindow->SkipItem on a per-column basis
|
||||
|
||||
IMGUI_API ImGuiTable() { memset(this, 0, sizeof(*this)); LastFrameActive = -1; }
|
||||
IMGUI_API ~ImGuiTable() { IM_FREE(RawData); }
|
||||
ImGuiTable() { memset(this, 0, sizeof(*this)); LastFrameActive = -1; }
|
||||
~ImGuiTable() { IM_FREE(RawData); }
|
||||
};
|
||||
|
||||
// Transient data that are only needed between BeginTable() and EndTable(), those buffers are shared (1 per level of stacked table).
|
||||
// - Accessing those requires chasing an extra pointer so for very frequently used data we leave them in the main table structure.
|
||||
// - We also leave out of this structure data that tend to be particularly useful for debugging/metrics.
|
||||
struct ImGuiTableTempData
|
||||
struct IMGUI_API ImGuiTableTempData
|
||||
{
|
||||
int TableIndex; // Index in g.Tables.Buf[] pool
|
||||
float LastTimeActive; // Last timestamp this structure was used
|
||||
@ -2276,7 +2361,7 @@ struct ImGuiTableTempData
|
||||
float HostBackupItemWidth; // Backup of OuterWindow->DC.ItemWidth at the end of BeginTable()
|
||||
int HostBackupItemWidthStackSize;//Backup of OuterWindow->DC.ItemWidthStack.Size at the end of BeginTable()
|
||||
|
||||
IMGUI_API ImGuiTableTempData() { memset(this, 0, sizeof(*this)); LastTimeActive = -1.0f; }
|
||||
ImGuiTableTempData() { memset(this, 0, sizeof(*this)); LastTimeActive = -1.0f; }
|
||||
};
|
||||
|
||||
// sizeof() ~ 12
|
||||
@ -2335,13 +2420,16 @@ namespace ImGui
|
||||
IMGUI_API ImGuiWindow* FindWindowByName(const char* name);
|
||||
IMGUI_API void UpdateWindowParentAndRootLinks(ImGuiWindow* window, ImGuiWindowFlags flags, ImGuiWindow* parent_window);
|
||||
IMGUI_API ImVec2 CalcWindowNextAutoFitSize(ImGuiWindow* window);
|
||||
IMGUI_API bool IsWindowChildOf(ImGuiWindow* window, ImGuiWindow* potential_parent);
|
||||
IMGUI_API bool IsWindowChildOf(ImGuiWindow* window, ImGuiWindow* potential_parent, bool popup_hierarchy);
|
||||
IMGUI_API bool IsWindowWithinBeginStackOf(ImGuiWindow* window, ImGuiWindow* potential_parent);
|
||||
IMGUI_API bool IsWindowAbove(ImGuiWindow* potential_above, ImGuiWindow* potential_below);
|
||||
IMGUI_API bool IsWindowNavFocusable(ImGuiWindow* window);
|
||||
IMGUI_API void SetWindowPos(ImGuiWindow* window, const ImVec2& pos, ImGuiCond cond = 0);
|
||||
IMGUI_API void SetWindowSize(ImGuiWindow* window, const ImVec2& size, ImGuiCond cond = 0);
|
||||
IMGUI_API void SetWindowCollapsed(ImGuiWindow* window, bool collapsed, ImGuiCond cond = 0);
|
||||
IMGUI_API void SetWindowHitTestHole(ImGuiWindow* window, const ImVec2& pos, const ImVec2& size);
|
||||
inline ImRect WindowRectAbsToRel(ImGuiWindow* window, const ImRect& r) { ImVec2 off = window->DC.CursorStartPos; return ImRect(r.Min.x - off.x, r.Min.y - off.y, r.Max.x - off.x, r.Max.y - off.y); }
|
||||
inline ImRect WindowRectRelToAbs(ImGuiWindow* window, const ImRect& r) { ImVec2 off = window->DC.CursorStartPos; return ImRect(r.Min.x + off.x, r.Min.y + off.y, r.Max.x + off.x, r.Max.y + off.y); }
|
||||
|
||||
// Windows: Display Order and Focus Order
|
||||
IMGUI_API void FocusWindow(ImGuiWindow* window);
|
||||
@ -2349,6 +2437,9 @@ namespace ImGui
|
||||
IMGUI_API void BringWindowToFocusFront(ImGuiWindow* window);
|
||||
IMGUI_API void BringWindowToDisplayFront(ImGuiWindow* window);
|
||||
IMGUI_API void BringWindowToDisplayBack(ImGuiWindow* window);
|
||||
IMGUI_API void BringWindowToDisplayBehind(ImGuiWindow* window, ImGuiWindow* above_window);
|
||||
IMGUI_API int FindWindowDisplayIndex(ImGuiWindow* window);
|
||||
IMGUI_API ImGuiWindow* FindBottomMostVisibleWindowWithinBeginStack(ImGuiWindow* window);
|
||||
|
||||
// Fonts, drawing
|
||||
IMGUI_API void SetCurrentFont(ImFont* font);
|
||||
@ -2387,7 +2478,14 @@ namespace ImGui
|
||||
IMGUI_API void SetScrollY(ImGuiWindow* window, float scroll_y);
|
||||
IMGUI_API void SetScrollFromPosX(ImGuiWindow* window, float local_x, float center_x_ratio);
|
||||
IMGUI_API void SetScrollFromPosY(ImGuiWindow* window, float local_y, float center_y_ratio);
|
||||
IMGUI_API ImVec2 ScrollToBringRectIntoView(ImGuiWindow* window, const ImRect& item_rect);
|
||||
|
||||
// Early work-in-progress API (ScrollToItem() will become public)
|
||||
IMGUI_API void ScrollToItem(ImGuiScrollFlags flags = 0);
|
||||
IMGUI_API void ScrollToRect(ImGuiWindow* window, const ImRect& rect, ImGuiScrollFlags flags = 0);
|
||||
IMGUI_API ImVec2 ScrollToRectEx(ImGuiWindow* window, const ImRect& rect, ImGuiScrollFlags flags = 0);
|
||||
//#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||
inline void ScrollToBringRectIntoView(ImGuiWindow* window, const ImRect& rect) { ScrollToRect(window, rect, ImGuiScrollFlags_KeepVisibleEdgeY); }
|
||||
//#endif
|
||||
|
||||
// Basic Accessors
|
||||
inline ImGuiID GetItemID() { ImGuiContext& g = *GImGui; return g.LastItemData.ID; } // Get ID of last item (~~ often same ImGui::GetID(label) beforehand)
|
||||
@ -2408,10 +2506,10 @@ namespace ImGui
|
||||
// Basic Helpers for widget code
|
||||
IMGUI_API void ItemSize(const ImVec2& size, float text_baseline_y = -1.0f);
|
||||
IMGUI_API void ItemSize(const ImRect& bb, float text_baseline_y = -1.0f);
|
||||
IMGUI_API bool ItemAdd(const ImRect& bb, ImGuiID id, const ImRect* nav_bb = NULL, ImGuiItemAddFlags flags = 0);
|
||||
IMGUI_API bool ItemAdd(const ImRect& bb, ImGuiID id, const ImRect* nav_bb = NULL, ImGuiItemFlags extra_flags = 0);
|
||||
IMGUI_API bool ItemHoverable(const ImRect& bb, ImGuiID id);
|
||||
IMGUI_API void ItemFocusable(ImGuiWindow* window, ImGuiID id);
|
||||
IMGUI_API bool IsClippedEx(const ImRect& bb, ImGuiID id, bool clip_even_when_logged);
|
||||
IMGUI_API bool IsClippedEx(const ImRect& bb, ImGuiID id);
|
||||
IMGUI_API void SetLastItemData(ImGuiID item_id, ImGuiItemFlags in_flags, ImGuiItemStatusFlags status_flags, const ImRect& item_rect);
|
||||
IMGUI_API ImVec2 CalcItemSize(ImVec2 size, float default_w, float default_h);
|
||||
IMGUI_API float CalcWrapWidthForPos(const ImVec2& pos, float wrap_pos_x);
|
||||
IMGUI_API void PushMultiItemsWidths(int components, float width_full);
|
||||
@ -2424,12 +2522,14 @@ namespace ImGui
|
||||
IMGUI_API void PopItemFlag();
|
||||
|
||||
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||
// Currently refactoring focus/nav/tabbing system
|
||||
// If you have old/custom copy-and-pasted widgets that used FocusableItemRegister():
|
||||
// (Old) IMGUI_VERSION_NUM < 18209: using 'ItemAdd(....)' and 'bool focused = FocusableItemRegister(...)'
|
||||
// (New) IMGUI_VERSION_NUM >= 18209: using 'ItemAdd(..., ImGuiItemAddFlags_Focusable)' and 'bool focused = (GetItemStatusFlags() & ImGuiItemStatusFlags_Focused) != 0'
|
||||
// (Old) IMGUI_VERSION_NUM < 18209: using 'ItemAdd(....)' and 'bool tab_focused = FocusableItemRegister(...)'
|
||||
// (Old) IMGUI_VERSION_NUM >= 18209: using 'ItemAdd(..., ImGuiItemAddFlags_Focusable)' and 'bool tab_focused = (GetItemStatusFlags() & ImGuiItemStatusFlags_Focused) != 0'
|
||||
// (New) IMGUI_VERSION_NUM >= 18413: using 'ItemAdd(..., ImGuiItemFlags_Inputable)' and 'bool tab_focused = (GetItemStatusFlags() & ImGuiItemStatusFlags_FocusedTabbing) != 0 || g.NavActivateInputId == id' (WIP)
|
||||
// Widget code are simplified as there's no need to call FocusableItemUnregister() while managing the transition from regular widget to TempInputText()
|
||||
inline bool FocusableItemRegister(ImGuiWindow* window, ImGuiID id) { IM_ASSERT(0); IM_UNUSED(window); IM_UNUSED(id); return false; } // -> pass ImGuiItemAddFlags_Focusable flag to ItemAdd()
|
||||
inline IM_NORETURN void FocusableItemUnregister(ImGuiWindow* window) { IM_ASSERT(0); IM_UNUSED(window); } // -> unnecessary: TempInputText() uses ImGuiInputTextFlags_MergedItem
|
||||
inline bool FocusableItemRegister(ImGuiWindow* window, ImGuiID id) { IM_ASSERT(0); IM_UNUSED(window); IM_UNUSED(id); return false; } // -> pass ImGuiItemAddFlags_Inputable flag to ItemAdd()
|
||||
inline void FocusableItemUnregister(ImGuiWindow* window) { IM_ASSERT(0); IM_UNUSED(window); } // -> unnecessary: TempInputText() uses ImGuiInputTextFlags_MergedItem
|
||||
#endif
|
||||
|
||||
// Logging/Capture
|
||||
@ -2443,16 +2543,19 @@ namespace ImGui
|
||||
IMGUI_API void OpenPopupEx(ImGuiID id, ImGuiPopupFlags popup_flags = ImGuiPopupFlags_None);
|
||||
IMGUI_API void ClosePopupToLevel(int remaining, bool restore_focus_to_window_under_popup);
|
||||
IMGUI_API void ClosePopupsOverWindow(ImGuiWindow* ref_window, bool restore_focus_to_window_under_popup);
|
||||
IMGUI_API void ClosePopupsExceptModals();
|
||||
IMGUI_API bool IsPopupOpen(ImGuiID id, ImGuiPopupFlags popup_flags);
|
||||
IMGUI_API bool BeginPopupEx(ImGuiID id, ImGuiWindowFlags extra_flags);
|
||||
IMGUI_API void BeginTooltipEx(ImGuiWindowFlags extra_flags, ImGuiTooltipFlags tooltip_flags);
|
||||
IMGUI_API void BeginTooltipEx(ImGuiTooltipFlags tooltip_flags, ImGuiWindowFlags extra_window_flags);
|
||||
IMGUI_API ImRect GetPopupAllowedExtentRect(ImGuiWindow* window);
|
||||
IMGUI_API ImGuiWindow* GetTopMostPopupModal();
|
||||
IMGUI_API ImGuiWindow* GetTopMostAndVisiblePopupModal();
|
||||
IMGUI_API ImVec2 FindBestWindowPosForPopup(ImGuiWindow* window);
|
||||
IMGUI_API ImVec2 FindBestWindowPosForPopupEx(const ImVec2& ref_pos, const ImVec2& size, ImGuiDir* last_dir, const ImRect& r_outer, const ImRect& r_avoid, ImGuiPopupPositionPolicy policy);
|
||||
IMGUI_API bool BeginViewportSideBar(const char* name, ImGuiViewport* viewport, ImGuiDir dir, float size, ImGuiWindowFlags window_flags);
|
||||
|
||||
// Menus
|
||||
IMGUI_API bool BeginViewportSideBar(const char* name, ImGuiViewport* viewport, ImGuiDir dir, float size, ImGuiWindowFlags window_flags);
|
||||
IMGUI_API bool BeginMenuEx(const char* label, const char* icon, bool enabled = true);
|
||||
IMGUI_API bool MenuItemEx(const char* label, const char* icon, const char* shortcut = NULL, bool selected = false, bool enabled = true);
|
||||
|
||||
// Combos
|
||||
@ -2462,9 +2565,13 @@ namespace ImGui
|
||||
|
||||
// Gamepad/Keyboard Navigation
|
||||
IMGUI_API void NavInitWindow(ImGuiWindow* window, bool force_reinit);
|
||||
IMGUI_API void NavInitRequestApplyResult();
|
||||
IMGUI_API bool NavMoveRequestButNoResultYet();
|
||||
IMGUI_API void NavMoveRequestSubmit(ImGuiDir move_dir, ImGuiDir clip_dir, ImGuiNavMoveFlags move_flags, ImGuiScrollFlags scroll_flags);
|
||||
IMGUI_API void NavMoveRequestForward(ImGuiDir move_dir, ImGuiDir clip_dir, ImGuiNavMoveFlags move_flags, ImGuiScrollFlags scroll_flags);
|
||||
IMGUI_API void NavMoveRequestResolveWithLastItem(ImGuiNavItemData* result);
|
||||
IMGUI_API void NavMoveRequestCancel();
|
||||
IMGUI_API void NavMoveRequestForward(ImGuiDir move_dir, ImGuiDir clip_dir, const ImRect& bb_rel, ImGuiNavMoveFlags move_flags);
|
||||
IMGUI_API void NavMoveRequestApplyResult();
|
||||
IMGUI_API void NavMoveRequestTryWrapping(ImGuiWindow* window, ImGuiNavMoveFlags move_flags);
|
||||
IMGUI_API float GetNavInputAmount(ImGuiNavInput n, ImGuiInputReadMode mode);
|
||||
IMGUI_API ImVec2 GetNavInputAmount2d(ImGuiNavDirSourceFlags dir_sources, ImGuiInputReadMode mode, float slow_factor = 0.0f, float fast_factor = 0.0f);
|
||||
@ -2610,7 +2717,7 @@ namespace ImGui
|
||||
IMGUI_API bool CollapseButton(ImGuiID id, const ImVec2& pos);
|
||||
IMGUI_API bool ArrowButtonEx(const char* str_id, ImGuiDir dir, ImVec2 size_arg, ImGuiButtonFlags flags = 0);
|
||||
IMGUI_API void Scrollbar(ImGuiAxis axis);
|
||||
IMGUI_API bool ScrollbarEx(const ImRect& bb, ImGuiID id, ImGuiAxis axis, float* p_scroll_v, float avail_v, float contents_v, ImDrawFlags flags);
|
||||
IMGUI_API bool ScrollbarEx(const ImRect& bb, ImGuiID id, ImGuiAxis axis, ImS64* p_scroll_v, ImS64 avail_v, ImS64 contents_v, ImDrawFlags flags);
|
||||
IMGUI_API bool ImageButtonEx(ImGuiID id, ImTextureID texture_id, const ImVec2& size, const ImVec2& uv0, const ImVec2& uv1, const ImVec2& padding, const ImVec4& bg_col, const ImVec4& tint_col);
|
||||
IMGUI_API ImRect GetWindowScrollbarRect(ImGuiWindow* window, ImGuiAxis axis);
|
||||
IMGUI_API ImGuiID GetWindowScrollbarID(ImGuiWindow* window, ImGuiAxis axis);
|
||||
@ -2673,10 +2780,12 @@ namespace ImGui
|
||||
|
||||
// Debug Tools
|
||||
IMGUI_API void ErrorCheckEndFrameRecover(ImGuiErrorLogCallback log_callback, void* user_data = NULL);
|
||||
IMGUI_API void ErrorCheckEndWindowRecover(ImGuiErrorLogCallback log_callback, void* user_data = NULL);
|
||||
inline void DebugDrawItemRect(ImU32 col = IM_COL32(255,0,0,255)) { ImGuiContext& g = *GImGui; ImGuiWindow* window = g.CurrentWindow; GetForegroundDrawList(window)->AddRect(g.LastItemData.Rect.Min, g.LastItemData.Rect.Max, col); }
|
||||
inline void DebugStartItemPicker() { ImGuiContext& g = *GImGui; g.DebugItemPickerActive = true; }
|
||||
|
||||
IMGUI_API void ShowFontAtlas(ImFontAtlas* atlas);
|
||||
IMGUI_API void DebugHookIdInfo(ImGuiID id, ImGuiDataType data_type, const void* data_id, const void* data_id_end);
|
||||
IMGUI_API void DebugNodeColumns(ImGuiOldColumns* columns);
|
||||
IMGUI_API void DebugNodeDrawList(ImGuiWindow* window, const ImDrawList* draw_list, const char* label);
|
||||
IMGUI_API void DebugNodeDrawCmdShowMeshAndBoundingBox(ImDrawList* out_draw_list, const ImDrawList* draw_list, const ImDrawCmd* draw_cmd, bool show_mesh, bool show_aabb);
|
||||
@ -2688,6 +2797,7 @@ namespace ImGui
|
||||
IMGUI_API void DebugNodeWindow(ImGuiWindow* window, const char* label);
|
||||
IMGUI_API void DebugNodeWindowSettings(ImGuiWindowSettings* settings);
|
||||
IMGUI_API void DebugNodeWindowsList(ImVector<ImGuiWindow*>* windows, const char* label);
|
||||
IMGUI_API void DebugNodeWindowsListByBeginStackParent(ImGuiWindow** windows, int windows_size, ImGuiWindow* parent_in_begin_stack);
|
||||
IMGUI_API void DebugNodeViewport(ImGuiViewportP* viewport);
|
||||
IMGUI_API void DebugRenderViewportThumbnail(ImDrawList* draw_list, ImGuiViewportP* viewport, const ImRect& bb);
|
||||
|
||||
@ -2722,14 +2832,12 @@ IMGUI_API void ImFontAtlasBuildMultiplyRectAlpha8(const unsigned char table
|
||||
#ifdef IMGUI_ENABLE_TEST_ENGINE
|
||||
extern void ImGuiTestEngineHook_ItemAdd(ImGuiContext* ctx, const ImRect& bb, ImGuiID id);
|
||||
extern void ImGuiTestEngineHook_ItemInfo(ImGuiContext* ctx, ImGuiID id, const char* label, ImGuiItemStatusFlags flags);
|
||||
extern void ImGuiTestEngineHook_IdInfo(ImGuiContext* ctx, ImGuiDataType data_type, ImGuiID id, const void* data_id);
|
||||
extern void ImGuiTestEngineHook_IdInfo(ImGuiContext* ctx, ImGuiDataType data_type, ImGuiID id, const void* data_id, const void* data_id_end);
|
||||
extern void ImGuiTestEngineHook_Log(ImGuiContext* ctx, const char* fmt, ...);
|
||||
extern const char* ImGuiTestEngine_FindItemDebugLabel(ImGuiContext* ctx, ImGuiID id);
|
||||
|
||||
#define IMGUI_TEST_ENGINE_ITEM_ADD(_BB,_ID) if (g.TestEngineHookItems) ImGuiTestEngineHook_ItemAdd(&g, _BB, _ID) // Register item bounding box
|
||||
#define IMGUI_TEST_ENGINE_ITEM_INFO(_ID,_LABEL,_FLAGS) if (g.TestEngineHookItems) ImGuiTestEngineHook_ItemInfo(&g, _ID, _LABEL, _FLAGS) // Register item label and status flags (optional)
|
||||
#define IMGUI_TEST_ENGINE_LOG(_FMT,...) if (g.TestEngineHookItems) ImGuiTestEngineHook_Log(&g, _FMT, __VA_ARGS__) // Custom log entry from user land into test log
|
||||
#define IMGUI_TEST_ENGINE_ID_INFO(_ID,_TYPE,_DATA) if (g.TestEngineHookIdInfo == _ID) ImGuiTestEngineHook_IdInfo(&g, _TYPE, _ID, (const void*)(_DATA));
|
||||
#define IMGUI_TEST_ENGINE_ID_INFO2(_ID,_TYPE,_DATA,_DATA2) if (g.TestEngineHookIdInfo == _ID) ImGuiTestEngineHook_IdInfo(&g, _TYPE, _ID, (const void*)(_DATA), (const void*)(_DATA2));
|
||||
#else
|
||||
#define IMGUI_TEST_ENGINE_ITEM_INFO(_ID,_LABEL,_FLAGS) ((void)0)
|
||||
#endif
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.84
|
||||
// dear imgui, v1.86
|
||||
// (tables and columns code)
|
||||
|
||||
/*
|
||||
@ -324,7 +324,7 @@ bool ImGui::BeginTableEx(const char* name, ImGuiID id, int columns_count, ImG
|
||||
const ImVec2 avail_size = GetContentRegionAvail();
|
||||
ImVec2 actual_outer_size = CalcItemSize(outer_size, ImMax(avail_size.x, 1.0f), use_child_window ? ImMax(avail_size.y, 1.0f) : 0.0f);
|
||||
ImRect outer_rect(outer_window->DC.CursorPos, outer_window->DC.CursorPos + actual_outer_size);
|
||||
if (use_child_window && IsClippedEx(outer_rect, 0, false))
|
||||
if (use_child_window && IsClippedEx(outer_rect, 0))
|
||||
{
|
||||
ItemSize(outer_rect);
|
||||
return false;
|
||||
@ -340,10 +340,9 @@ bool ImGui::BeginTableEx(const char* name, ImGuiID id, int columns_count, ImG
|
||||
|
||||
// Acquire temporary buffers
|
||||
const int table_idx = g.Tables.GetIndex(table);
|
||||
g.CurrentTableStackIdx++;
|
||||
if (g.CurrentTableStackIdx + 1 > g.TablesTempDataStack.Size)
|
||||
g.TablesTempDataStack.resize(g.CurrentTableStackIdx + 1, ImGuiTableTempData());
|
||||
ImGuiTableTempData* temp_data = table->TempData = &g.TablesTempDataStack[g.CurrentTableStackIdx];
|
||||
if (++g.TablesTempDataStacked > g.TablesTempData.Size)
|
||||
g.TablesTempData.resize(g.TablesTempDataStacked, ImGuiTableTempData());
|
||||
ImGuiTableTempData* temp_data = table->TempData = &g.TablesTempData[g.TablesTempDataStacked - 1];
|
||||
temp_data->TableIndex = table_idx;
|
||||
table->DrawSplitter = &table->TempData->DrawSplitter;
|
||||
table->DrawSplitter->Clear();
|
||||
@ -564,6 +563,7 @@ bool ImGui::BeginTableEx(const char* name, ImGuiID id, int columns_count, ImG
|
||||
// + 0 (for ImGuiTable instance, we are pooling allocations in g.Tables)
|
||||
// + 1 (for table->RawData allocated below)
|
||||
// + 1 (for table->ColumnsNames, if names are used)
|
||||
// Shared allocations per number of nested tables
|
||||
// + 1 (for table->Splitter._Channels)
|
||||
// + 2 * active_channels_count (for ImDrawCmd and ImDrawIdx buffers inside channels)
|
||||
// Where active_channels_count is variable but often == columns_count or columns_count + 1, see TableSetupDrawChannels() for details.
|
||||
@ -1170,7 +1170,7 @@ void ImGui::TableUpdateBorders(ImGuiTable* table)
|
||||
KeepAliveID(column_id);
|
||||
|
||||
bool hovered = false, held = false;
|
||||
bool pressed = ButtonBehavior(hit_rect, column_id, &hovered, &held, ImGuiButtonFlags_FlattenChildren | ImGuiButtonFlags_AllowItemOverlap | ImGuiButtonFlags_PressedOnClick | ImGuiButtonFlags_PressedOnDoubleClick);
|
||||
bool pressed = ButtonBehavior(hit_rect, column_id, &hovered, &held, ImGuiButtonFlags_FlattenChildren | ImGuiButtonFlags_AllowItemOverlap | ImGuiButtonFlags_PressedOnClick | ImGuiButtonFlags_PressedOnDoubleClick | ImGuiButtonFlags_NoNavFocus);
|
||||
if (pressed && IsMouseDoubleClicked(0))
|
||||
{
|
||||
TableSetColumnWidthAutoSingle(table, column_n);
|
||||
@ -1381,9 +1381,8 @@ void ImGui::EndTable()
|
||||
|
||||
// Clear or restore current table, if any
|
||||
IM_ASSERT(g.CurrentWindow == outer_window && g.CurrentTable == table);
|
||||
IM_ASSERT(g.CurrentTableStackIdx >= 0);
|
||||
g.CurrentTableStackIdx--;
|
||||
temp_data = g.CurrentTableStackIdx >= 0 ? &g.TablesTempDataStack[g.CurrentTableStackIdx] : NULL;
|
||||
IM_ASSERT(g.TablesTempDataStacked > 0);
|
||||
temp_data = (--g.TablesTempDataStacked > 0) ? &g.TablesTempData[g.TablesTempDataStacked - 1] : NULL;
|
||||
g.CurrentTable = temp_data ? g.Tables.GetByIndex(temp_data->TableIndex) : NULL;
|
||||
if (g.CurrentTable)
|
||||
{
|
||||
@ -1479,6 +1478,7 @@ void ImGui::TableSetupScrollFreeze(int columns, int rows)
|
||||
table->IsUnfrozenRows = (table->FreezeRowsCount == 0); // Make sure this is set before TableUpdateLayout() so ImGuiListClipper can benefit from it.b
|
||||
|
||||
// Ensure frozen columns are ordered in their section. We still allow multiple frozen columns to be reordered.
|
||||
// FIXME-TABLE: This work for preserving 2143 into 21|43. How about 4321 turning into 21|43? (preserve relative order in each section)
|
||||
for (int column_n = 0; column_n < table->FreezeColumnsRequest; column_n++)
|
||||
{
|
||||
int order_n = table->DisplayOrderToIndex[column_n];
|
||||
@ -3987,7 +3987,7 @@ void ImGui::EndColumns()
|
||||
const float column_hit_hw = COLUMNS_HIT_RECT_HALF_WIDTH;
|
||||
const ImRect column_hit_rect(ImVec2(x - column_hit_hw, y1), ImVec2(x + column_hit_hw, y2));
|
||||
KeepAliveID(column_id);
|
||||
if (IsClippedEx(column_hit_rect, column_id, false))
|
||||
if (IsClippedEx(column_hit_rect, column_id)) // FIXME: Can be removed or replaced with a lower-level test
|
||||
continue;
|
||||
|
||||
bool hovered = false, held = false;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -6,6 +6,7 @@
|
||||
|
||||
// CHANGELOG
|
||||
// (minor and older changes stripped away, please see git history for details)
|
||||
// 2021/08/23: fixed crash when FT_Render_Glyph() fails to render a glyph and returns NULL.
|
||||
// 2021/03/05: added ImGuiFreeTypeBuilderFlags_Bitmap to load bitmap glyphs.
|
||||
// 2021/03/02: set 'atlas->TexPixelsUseColors = true' to help some backends with deciding of a prefered texture format.
|
||||
// 2021/01/28: added support for color-layered glyphs via ImGuiFreeTypeBuilderFlags_LoadColor (require Freetype 2.10+).
|
||||
@ -225,6 +226,12 @@ namespace
|
||||
uint32_t glyph_index = FT_Get_Char_Index(Face, codepoint);
|
||||
if (glyph_index == 0)
|
||||
return NULL;
|
||||
|
||||
// If this crash for you: FreeType 2.11.0 has a crash bug on some bitmap/colored fonts.
|
||||
// - https://gitlab.freedesktop.org/freetype/freetype/-/issues/1076
|
||||
// - https://github.com/ocornut/imgui/issues/4567
|
||||
// - https://github.com/ocornut/imgui/issues/4566
|
||||
// You can use FreeType 2.10, or the patched version of 2.11.0 in VcPkg, or probably any upcoming FreeType version.
|
||||
FT_Error error = FT_Load_Glyph(Face, glyph_index, LoadFlags);
|
||||
if (error)
|
||||
return NULL;
|
||||
@ -539,7 +546,8 @@ bool ImFontAtlasBuildWithFreeTypeEx(FT_Library ft_library, ImFontAtlas* atlas, u
|
||||
|
||||
// Render glyph into a bitmap (currently held by FreeType)
|
||||
const FT_Bitmap* ft_bitmap = src_tmp.Font.RenderGlyphAndGetInfo(&src_glyph.Info);
|
||||
IM_ASSERT(ft_bitmap);
|
||||
if (ft_bitmap == NULL)
|
||||
continue;
|
||||
|
||||
// Allocate new temporary chunk if needed
|
||||
const int bitmap_size_in_bytes = src_glyph.Info.Width * src_glyph.Info.Height * 4;
|
||||
|
||||
@ -887,6 +887,11 @@
|
||||
"name": "ImGuiFocusedFlags_AnyWindow",
|
||||
"value": "1 << 2"
|
||||
},
|
||||
{
|
||||
"calc_value": 8,
|
||||
"name": "ImGuiFocusedFlags_NoPopupHierarchy",
|
||||
"value": "1 << 3"
|
||||
},
|
||||
{
|
||||
"calc_value": 3,
|
||||
"name": "ImGuiFocusedFlags_RootAndChildWindows",
|
||||
@ -916,26 +921,31 @@
|
||||
},
|
||||
{
|
||||
"calc_value": 8,
|
||||
"name": "ImGuiHoveredFlags_AllowWhenBlockedByPopup",
|
||||
"name": "ImGuiHoveredFlags_NoPopupHierarchy",
|
||||
"value": "1 << 3"
|
||||
},
|
||||
{
|
||||
"calc_value": 32,
|
||||
"name": "ImGuiHoveredFlags_AllowWhenBlockedByActiveItem",
|
||||
"name": "ImGuiHoveredFlags_AllowWhenBlockedByPopup",
|
||||
"value": "1 << 5"
|
||||
},
|
||||
{
|
||||
"calc_value": 64,
|
||||
"name": "ImGuiHoveredFlags_AllowWhenOverlapped",
|
||||
"value": "1 << 6"
|
||||
},
|
||||
{
|
||||
"calc_value": 128,
|
||||
"name": "ImGuiHoveredFlags_AllowWhenDisabled",
|
||||
"name": "ImGuiHoveredFlags_AllowWhenBlockedByActiveItem",
|
||||
"value": "1 << 7"
|
||||
},
|
||||
{
|
||||
"calc_value": 104,
|
||||
"calc_value": 256,
|
||||
"name": "ImGuiHoveredFlags_AllowWhenOverlapped",
|
||||
"value": "1 << 8"
|
||||
},
|
||||
{
|
||||
"calc_value": 512,
|
||||
"name": "ImGuiHoveredFlags_AllowWhenDisabled",
|
||||
"value": "1 << 9"
|
||||
},
|
||||
{
|
||||
"calc_value": 416,
|
||||
"name": "ImGuiHoveredFlags_RectOnly",
|
||||
"value": "ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_AllowWhenOverlapped"
|
||||
},
|
||||
@ -2373,72 +2383,72 @@
|
||||
},
|
||||
"enumtypes": [],
|
||||
"locations": {
|
||||
"ImColor": "imgui:2226",
|
||||
"ImDrawChannel": "imgui:2316",
|
||||
"ImDrawCmd": "imgui:2275",
|
||||
"ImDrawCmdHeader": "imgui:2308",
|
||||
"ImDrawData": "imgui:2506",
|
||||
"ImDrawFlags_": "imgui:2342",
|
||||
"ImDrawList": "imgui:2380",
|
||||
"ImDrawListFlags_": "imgui:2362",
|
||||
"ImDrawListSplitter": "imgui:2325",
|
||||
"ImDrawVert": "imgui:2293",
|
||||
"ImFont": "imgui:2724",
|
||||
"ImFontAtlas": "imgui:2622",
|
||||
"ImFontAtlasCustomRect": "imgui:2584",
|
||||
"ImFontAtlasFlags_": "imgui:2597",
|
||||
"ImFontConfig": "imgui:2528",
|
||||
"ImFontGlyph": "imgui:2557",
|
||||
"ImFontGlyphRangesBuilder": "imgui:2569",
|
||||
"ImGuiBackendFlags_": "imgui:1434",
|
||||
"ImGuiButtonFlags_": "imgui:1541",
|
||||
"ImGuiCol_": "imgui:1444",
|
||||
"ImGuiColorEditFlags_": "imgui:1554",
|
||||
"ImGuiComboFlags_": "imgui:1072",
|
||||
"ImGuiCond_": "imgui:1646",
|
||||
"ImGuiConfigFlags_": "imgui:1418",
|
||||
"ImGuiDataType_": "imgui:1311",
|
||||
"ImGuiDir_": "imgui:1327",
|
||||
"ImGuiDragDropFlags_": "imgui:1289",
|
||||
"ImGuiFocusedFlags_": "imgui:1261",
|
||||
"ImGuiHoveredFlags_": "imgui:1273",
|
||||
"ImGuiIO": "imgui:1812",
|
||||
"ImGuiInputTextCallbackData": "imgui:1956",
|
||||
"ImGuiInputTextFlags_": "imgui:985",
|
||||
"ImGuiKeyModFlags_": "imgui:1374",
|
||||
"ImGuiKey_": "imgui:1346",
|
||||
"ImGuiListClipper": "imgui:2177",
|
||||
"ImGuiMouseButton_": "imgui:1618",
|
||||
"ImGuiMouseCursor_": "imgui:1628",
|
||||
"ImGuiNavInput_": "imgui:1387",
|
||||
"ImGuiOnceUponAFrame": "imgui:2055",
|
||||
"ImGuiPayload": "imgui:1996",
|
||||
"ImGuiPopupFlags_": "imgui:1045",
|
||||
"ImGuiSelectableFlags_": "imgui:1061",
|
||||
"ImGuiSizeCallbackData": "imgui:1987",
|
||||
"ImGuiSliderFlags_": "imgui:1601",
|
||||
"ImGuiSortDirection_": "imgui:1338",
|
||||
"ImGuiStorage": "imgui:2117",
|
||||
"ImGuiStoragePair": "imgui:2120",
|
||||
"ImGuiStyle": "imgui:1757",
|
||||
"ImGuiStyleVar_": "imgui:1509",
|
||||
"ImGuiTabBarFlags_": "imgui:1086",
|
||||
"ImGuiTabItemFlags_": "imgui:1102",
|
||||
"ImGuiTableBgTarget_": "imgui:1252",
|
||||
"ImGuiTableColumnFlags_": "imgui:1195",
|
||||
"ImGuiTableColumnSortSpecs": "imgui:2018",
|
||||
"ImGuiTableFlags_": "imgui:1138",
|
||||
"ImGuiTableRowFlags_": "imgui:1237",
|
||||
"ImGuiTableSortSpecs": "imgui:2032",
|
||||
"ImGuiTextBuffer": "imgui:2090",
|
||||
"ImGuiTextFilter": "imgui:2063",
|
||||
"ImGuiTextRange": "imgui:2073",
|
||||
"ImGuiTreeNodeFlags_": "imgui:1016",
|
||||
"ImGuiViewport": "imgui:2795",
|
||||
"ImGuiViewportFlags_": "imgui:2780",
|
||||
"ImGuiWindowFlags_": "imgui:945",
|
||||
"ImVec2": "imgui:256",
|
||||
"ImVec4": "imgui:269"
|
||||
"ImColor": "imgui:2241",
|
||||
"ImDrawChannel": "imgui:2331",
|
||||
"ImDrawCmd": "imgui:2290",
|
||||
"ImDrawCmdHeader": "imgui:2323",
|
||||
"ImDrawData": "imgui:2521",
|
||||
"ImDrawFlags_": "imgui:2357",
|
||||
"ImDrawList": "imgui:2395",
|
||||
"ImDrawListFlags_": "imgui:2377",
|
||||
"ImDrawListSplitter": "imgui:2340",
|
||||
"ImDrawVert": "imgui:2308",
|
||||
"ImFont": "imgui:2739",
|
||||
"ImFontAtlas": "imgui:2637",
|
||||
"ImFontAtlasCustomRect": "imgui:2599",
|
||||
"ImFontAtlasFlags_": "imgui:2612",
|
||||
"ImFontConfig": "imgui:2543",
|
||||
"ImFontGlyph": "imgui:2572",
|
||||
"ImFontGlyphRangesBuilder": "imgui:2584",
|
||||
"ImGuiBackendFlags_": "imgui:1442",
|
||||
"ImGuiButtonFlags_": "imgui:1549",
|
||||
"ImGuiCol_": "imgui:1452",
|
||||
"ImGuiColorEditFlags_": "imgui:1562",
|
||||
"ImGuiComboFlags_": "imgui:1076",
|
||||
"ImGuiCond_": "imgui:1654",
|
||||
"ImGuiConfigFlags_": "imgui:1426",
|
||||
"ImGuiDataType_": "imgui:1319",
|
||||
"ImGuiDir_": "imgui:1335",
|
||||
"ImGuiDragDropFlags_": "imgui:1297",
|
||||
"ImGuiFocusedFlags_": "imgui:1265",
|
||||
"ImGuiHoveredFlags_": "imgui:1279",
|
||||
"ImGuiIO": "imgui:1820",
|
||||
"ImGuiInputTextCallbackData": "imgui:1969",
|
||||
"ImGuiInputTextFlags_": "imgui:989",
|
||||
"ImGuiKeyModFlags_": "imgui:1382",
|
||||
"ImGuiKey_": "imgui:1354",
|
||||
"ImGuiListClipper": "imgui:2193",
|
||||
"ImGuiMouseButton_": "imgui:1626",
|
||||
"ImGuiMouseCursor_": "imgui:1636",
|
||||
"ImGuiNavInput_": "imgui:1395",
|
||||
"ImGuiOnceUponAFrame": "imgui:2068",
|
||||
"ImGuiPayload": "imgui:2009",
|
||||
"ImGuiPopupFlags_": "imgui:1049",
|
||||
"ImGuiSelectableFlags_": "imgui:1065",
|
||||
"ImGuiSizeCallbackData": "imgui:2000",
|
||||
"ImGuiSliderFlags_": "imgui:1609",
|
||||
"ImGuiSortDirection_": "imgui:1346",
|
||||
"ImGuiStorage": "imgui:2130",
|
||||
"ImGuiStoragePair": "imgui:2133",
|
||||
"ImGuiStyle": "imgui:1765",
|
||||
"ImGuiStyleVar_": "imgui:1517",
|
||||
"ImGuiTabBarFlags_": "imgui:1090",
|
||||
"ImGuiTabItemFlags_": "imgui:1106",
|
||||
"ImGuiTableBgTarget_": "imgui:1256",
|
||||
"ImGuiTableColumnFlags_": "imgui:1199",
|
||||
"ImGuiTableColumnSortSpecs": "imgui:2031",
|
||||
"ImGuiTableFlags_": "imgui:1142",
|
||||
"ImGuiTableRowFlags_": "imgui:1241",
|
||||
"ImGuiTableSortSpecs": "imgui:2045",
|
||||
"ImGuiTextBuffer": "imgui:2103",
|
||||
"ImGuiTextFilter": "imgui:2076",
|
||||
"ImGuiTextRange": "imgui:2086",
|
||||
"ImGuiTreeNodeFlags_": "imgui:1020",
|
||||
"ImGuiViewport": "imgui:2810",
|
||||
"ImGuiViewportFlags_": "imgui:2795",
|
||||
"ImGuiWindowFlags_": "imgui:949",
|
||||
"ImVec2": "imgui:259",
|
||||
"ImVec4": "imgui:272"
|
||||
},
|
||||
"structs": {
|
||||
"ImColor": [
|
||||
@ -3220,6 +3230,10 @@
|
||||
"name": "MouseDelta",
|
||||
"type": "ImVec2"
|
||||
},
|
||||
{
|
||||
"name": "WantCaptureMouseUnlessPopupClose",
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"name": "KeyMods",
|
||||
"type": "ImGuiKeyModFlags"
|
||||
@ -3252,6 +3266,16 @@
|
||||
"size": 5,
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"name": "MouseClickedCount[5]",
|
||||
"size": 5,
|
||||
"type": "ImU16"
|
||||
},
|
||||
{
|
||||
"name": "MouseClickedLastCount[5]",
|
||||
"size": 5,
|
||||
"type": "ImU16"
|
||||
},
|
||||
{
|
||||
"name": "MouseReleased[5]",
|
||||
"size": 5,
|
||||
@ -3263,7 +3287,7 @@
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"name": "MouseDownWasDoubleClick[5]",
|
||||
"name": "MouseDownOwnedUnlessPopupClose[5]",
|
||||
"size": 5,
|
||||
"type": "bool"
|
||||
},
|
||||
@ -3311,6 +3335,10 @@
|
||||
"name": "PenPressure",
|
||||
"type": "float"
|
||||
},
|
||||
{
|
||||
"name": "AppFocusLost",
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"name": "InputQueueSurrogate",
|
||||
"type": "ImWchar16"
|
||||
@ -3384,14 +3412,6 @@
|
||||
"name": "ItemsCount",
|
||||
"type": "int"
|
||||
},
|
||||
{
|
||||
"name": "StepNo",
|
||||
"type": "int"
|
||||
},
|
||||
{
|
||||
"name": "ItemsFrozen",
|
||||
"type": "int"
|
||||
},
|
||||
{
|
||||
"name": "ItemsHeight",
|
||||
"type": "float"
|
||||
@ -3399,6 +3419,10 @@
|
||||
{
|
||||
"name": "StartPosY",
|
||||
"type": "float"
|
||||
},
|
||||
{
|
||||
"name": "TempData",
|
||||
"type": "void*"
|
||||
}
|
||||
],
|
||||
"ImGuiOnceUponAFrame": [
|
||||
|
||||
@ -703,9 +703,13 @@ defs["enums"]["ImGuiFocusedFlags_"][4]["calc_value"] = 4
|
||||
defs["enums"]["ImGuiFocusedFlags_"][4]["name"] = "ImGuiFocusedFlags_AnyWindow"
|
||||
defs["enums"]["ImGuiFocusedFlags_"][4]["value"] = "1 << 2"
|
||||
defs["enums"]["ImGuiFocusedFlags_"][5] = {}
|
||||
defs["enums"]["ImGuiFocusedFlags_"][5]["calc_value"] = 3
|
||||
defs["enums"]["ImGuiFocusedFlags_"][5]["name"] = "ImGuiFocusedFlags_RootAndChildWindows"
|
||||
defs["enums"]["ImGuiFocusedFlags_"][5]["value"] = "ImGuiFocusedFlags_RootWindow | ImGuiFocusedFlags_ChildWindows"
|
||||
defs["enums"]["ImGuiFocusedFlags_"][5]["calc_value"] = 8
|
||||
defs["enums"]["ImGuiFocusedFlags_"][5]["name"] = "ImGuiFocusedFlags_NoPopupHierarchy"
|
||||
defs["enums"]["ImGuiFocusedFlags_"][5]["value"] = "1 << 3"
|
||||
defs["enums"]["ImGuiFocusedFlags_"][6] = {}
|
||||
defs["enums"]["ImGuiFocusedFlags_"][6]["calc_value"] = 3
|
||||
defs["enums"]["ImGuiFocusedFlags_"][6]["name"] = "ImGuiFocusedFlags_RootAndChildWindows"
|
||||
defs["enums"]["ImGuiFocusedFlags_"][6]["value"] = "ImGuiFocusedFlags_RootWindow | ImGuiFocusedFlags_ChildWindows"
|
||||
defs["enums"]["ImGuiHoveredFlags_"] = {}
|
||||
defs["enums"]["ImGuiHoveredFlags_"][1] = {}
|
||||
defs["enums"]["ImGuiHoveredFlags_"][1]["calc_value"] = 0
|
||||
@ -725,28 +729,32 @@ defs["enums"]["ImGuiHoveredFlags_"][4]["name"] = "ImGuiHoveredFlags_AnyWindow"
|
||||
defs["enums"]["ImGuiHoveredFlags_"][4]["value"] = "1 << 2"
|
||||
defs["enums"]["ImGuiHoveredFlags_"][5] = {}
|
||||
defs["enums"]["ImGuiHoveredFlags_"][5]["calc_value"] = 8
|
||||
defs["enums"]["ImGuiHoveredFlags_"][5]["name"] = "ImGuiHoveredFlags_AllowWhenBlockedByPopup"
|
||||
defs["enums"]["ImGuiHoveredFlags_"][5]["name"] = "ImGuiHoveredFlags_NoPopupHierarchy"
|
||||
defs["enums"]["ImGuiHoveredFlags_"][5]["value"] = "1 << 3"
|
||||
defs["enums"]["ImGuiHoveredFlags_"][6] = {}
|
||||
defs["enums"]["ImGuiHoveredFlags_"][6]["calc_value"] = 32
|
||||
defs["enums"]["ImGuiHoveredFlags_"][6]["name"] = "ImGuiHoveredFlags_AllowWhenBlockedByActiveItem"
|
||||
defs["enums"]["ImGuiHoveredFlags_"][6]["name"] = "ImGuiHoveredFlags_AllowWhenBlockedByPopup"
|
||||
defs["enums"]["ImGuiHoveredFlags_"][6]["value"] = "1 << 5"
|
||||
defs["enums"]["ImGuiHoveredFlags_"][7] = {}
|
||||
defs["enums"]["ImGuiHoveredFlags_"][7]["calc_value"] = 64
|
||||
defs["enums"]["ImGuiHoveredFlags_"][7]["name"] = "ImGuiHoveredFlags_AllowWhenOverlapped"
|
||||
defs["enums"]["ImGuiHoveredFlags_"][7]["value"] = "1 << 6"
|
||||
defs["enums"]["ImGuiHoveredFlags_"][7]["calc_value"] = 128
|
||||
defs["enums"]["ImGuiHoveredFlags_"][7]["name"] = "ImGuiHoveredFlags_AllowWhenBlockedByActiveItem"
|
||||
defs["enums"]["ImGuiHoveredFlags_"][7]["value"] = "1 << 7"
|
||||
defs["enums"]["ImGuiHoveredFlags_"][8] = {}
|
||||
defs["enums"]["ImGuiHoveredFlags_"][8]["calc_value"] = 128
|
||||
defs["enums"]["ImGuiHoveredFlags_"][8]["name"] = "ImGuiHoveredFlags_AllowWhenDisabled"
|
||||
defs["enums"]["ImGuiHoveredFlags_"][8]["value"] = "1 << 7"
|
||||
defs["enums"]["ImGuiHoveredFlags_"][8]["calc_value"] = 256
|
||||
defs["enums"]["ImGuiHoveredFlags_"][8]["name"] = "ImGuiHoveredFlags_AllowWhenOverlapped"
|
||||
defs["enums"]["ImGuiHoveredFlags_"][8]["value"] = "1 << 8"
|
||||
defs["enums"]["ImGuiHoveredFlags_"][9] = {}
|
||||
defs["enums"]["ImGuiHoveredFlags_"][9]["calc_value"] = 104
|
||||
defs["enums"]["ImGuiHoveredFlags_"][9]["name"] = "ImGuiHoveredFlags_RectOnly"
|
||||
defs["enums"]["ImGuiHoveredFlags_"][9]["value"] = "ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_AllowWhenOverlapped"
|
||||
defs["enums"]["ImGuiHoveredFlags_"][9]["calc_value"] = 512
|
||||
defs["enums"]["ImGuiHoveredFlags_"][9]["name"] = "ImGuiHoveredFlags_AllowWhenDisabled"
|
||||
defs["enums"]["ImGuiHoveredFlags_"][9]["value"] = "1 << 9"
|
||||
defs["enums"]["ImGuiHoveredFlags_"][10] = {}
|
||||
defs["enums"]["ImGuiHoveredFlags_"][10]["calc_value"] = 3
|
||||
defs["enums"]["ImGuiHoveredFlags_"][10]["name"] = "ImGuiHoveredFlags_RootAndChildWindows"
|
||||
defs["enums"]["ImGuiHoveredFlags_"][10]["value"] = "ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_ChildWindows"
|
||||
defs["enums"]["ImGuiHoveredFlags_"][10]["calc_value"] = 416
|
||||
defs["enums"]["ImGuiHoveredFlags_"][10]["name"] = "ImGuiHoveredFlags_RectOnly"
|
||||
defs["enums"]["ImGuiHoveredFlags_"][10]["value"] = "ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_AllowWhenOverlapped"
|
||||
defs["enums"]["ImGuiHoveredFlags_"][11] = {}
|
||||
defs["enums"]["ImGuiHoveredFlags_"][11]["calc_value"] = 3
|
||||
defs["enums"]["ImGuiHoveredFlags_"][11]["name"] = "ImGuiHoveredFlags_RootAndChildWindows"
|
||||
defs["enums"]["ImGuiHoveredFlags_"][11]["value"] = "ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_ChildWindows"
|
||||
defs["enums"]["ImGuiInputTextFlags_"] = {}
|
||||
defs["enums"]["ImGuiInputTextFlags_"][1] = {}
|
||||
defs["enums"]["ImGuiInputTextFlags_"][1]["calc_value"] = 0
|
||||
@ -1877,72 +1885,72 @@ defs["enums"]["ImGuiWindowFlags_"][30]["name"] = "ImGuiWindowFlags_ChildMenu"
|
||||
defs["enums"]["ImGuiWindowFlags_"][30]["value"] = "1 << 28"
|
||||
defs["enumtypes"] = {}
|
||||
defs["locations"] = {}
|
||||
defs["locations"]["ImColor"] = "imgui:2226"
|
||||
defs["locations"]["ImDrawChannel"] = "imgui:2316"
|
||||
defs["locations"]["ImDrawCmd"] = "imgui:2275"
|
||||
defs["locations"]["ImDrawCmdHeader"] = "imgui:2308"
|
||||
defs["locations"]["ImDrawData"] = "imgui:2506"
|
||||
defs["locations"]["ImDrawFlags_"] = "imgui:2342"
|
||||
defs["locations"]["ImDrawList"] = "imgui:2380"
|
||||
defs["locations"]["ImDrawListFlags_"] = "imgui:2362"
|
||||
defs["locations"]["ImDrawListSplitter"] = "imgui:2325"
|
||||
defs["locations"]["ImDrawVert"] = "imgui:2293"
|
||||
defs["locations"]["ImFont"] = "imgui:2724"
|
||||
defs["locations"]["ImFontAtlas"] = "imgui:2622"
|
||||
defs["locations"]["ImFontAtlasCustomRect"] = "imgui:2584"
|
||||
defs["locations"]["ImFontAtlasFlags_"] = "imgui:2597"
|
||||
defs["locations"]["ImFontConfig"] = "imgui:2528"
|
||||
defs["locations"]["ImFontGlyph"] = "imgui:2557"
|
||||
defs["locations"]["ImFontGlyphRangesBuilder"] = "imgui:2569"
|
||||
defs["locations"]["ImGuiBackendFlags_"] = "imgui:1434"
|
||||
defs["locations"]["ImGuiButtonFlags_"] = "imgui:1541"
|
||||
defs["locations"]["ImGuiCol_"] = "imgui:1444"
|
||||
defs["locations"]["ImGuiColorEditFlags_"] = "imgui:1554"
|
||||
defs["locations"]["ImGuiComboFlags_"] = "imgui:1072"
|
||||
defs["locations"]["ImGuiCond_"] = "imgui:1646"
|
||||
defs["locations"]["ImGuiConfigFlags_"] = "imgui:1418"
|
||||
defs["locations"]["ImGuiDataType_"] = "imgui:1311"
|
||||
defs["locations"]["ImGuiDir_"] = "imgui:1327"
|
||||
defs["locations"]["ImGuiDragDropFlags_"] = "imgui:1289"
|
||||
defs["locations"]["ImGuiFocusedFlags_"] = "imgui:1261"
|
||||
defs["locations"]["ImGuiHoveredFlags_"] = "imgui:1273"
|
||||
defs["locations"]["ImGuiIO"] = "imgui:1812"
|
||||
defs["locations"]["ImGuiInputTextCallbackData"] = "imgui:1956"
|
||||
defs["locations"]["ImGuiInputTextFlags_"] = "imgui:985"
|
||||
defs["locations"]["ImGuiKeyModFlags_"] = "imgui:1374"
|
||||
defs["locations"]["ImGuiKey_"] = "imgui:1346"
|
||||
defs["locations"]["ImGuiListClipper"] = "imgui:2177"
|
||||
defs["locations"]["ImGuiMouseButton_"] = "imgui:1618"
|
||||
defs["locations"]["ImGuiMouseCursor_"] = "imgui:1628"
|
||||
defs["locations"]["ImGuiNavInput_"] = "imgui:1387"
|
||||
defs["locations"]["ImGuiOnceUponAFrame"] = "imgui:2055"
|
||||
defs["locations"]["ImGuiPayload"] = "imgui:1996"
|
||||
defs["locations"]["ImGuiPopupFlags_"] = "imgui:1045"
|
||||
defs["locations"]["ImGuiSelectableFlags_"] = "imgui:1061"
|
||||
defs["locations"]["ImGuiSizeCallbackData"] = "imgui:1987"
|
||||
defs["locations"]["ImGuiSliderFlags_"] = "imgui:1601"
|
||||
defs["locations"]["ImGuiSortDirection_"] = "imgui:1338"
|
||||
defs["locations"]["ImGuiStorage"] = "imgui:2117"
|
||||
defs["locations"]["ImGuiStoragePair"] = "imgui:2120"
|
||||
defs["locations"]["ImGuiStyle"] = "imgui:1757"
|
||||
defs["locations"]["ImGuiStyleVar_"] = "imgui:1509"
|
||||
defs["locations"]["ImGuiTabBarFlags_"] = "imgui:1086"
|
||||
defs["locations"]["ImGuiTabItemFlags_"] = "imgui:1102"
|
||||
defs["locations"]["ImGuiTableBgTarget_"] = "imgui:1252"
|
||||
defs["locations"]["ImGuiTableColumnFlags_"] = "imgui:1195"
|
||||
defs["locations"]["ImGuiTableColumnSortSpecs"] = "imgui:2018"
|
||||
defs["locations"]["ImGuiTableFlags_"] = "imgui:1138"
|
||||
defs["locations"]["ImGuiTableRowFlags_"] = "imgui:1237"
|
||||
defs["locations"]["ImGuiTableSortSpecs"] = "imgui:2032"
|
||||
defs["locations"]["ImGuiTextBuffer"] = "imgui:2090"
|
||||
defs["locations"]["ImGuiTextFilter"] = "imgui:2063"
|
||||
defs["locations"]["ImGuiTextRange"] = "imgui:2073"
|
||||
defs["locations"]["ImGuiTreeNodeFlags_"] = "imgui:1016"
|
||||
defs["locations"]["ImGuiViewport"] = "imgui:2795"
|
||||
defs["locations"]["ImGuiViewportFlags_"] = "imgui:2780"
|
||||
defs["locations"]["ImGuiWindowFlags_"] = "imgui:945"
|
||||
defs["locations"]["ImVec2"] = "imgui:256"
|
||||
defs["locations"]["ImVec4"] = "imgui:269"
|
||||
defs["locations"]["ImColor"] = "imgui:2241"
|
||||
defs["locations"]["ImDrawChannel"] = "imgui:2331"
|
||||
defs["locations"]["ImDrawCmd"] = "imgui:2290"
|
||||
defs["locations"]["ImDrawCmdHeader"] = "imgui:2323"
|
||||
defs["locations"]["ImDrawData"] = "imgui:2521"
|
||||
defs["locations"]["ImDrawFlags_"] = "imgui:2357"
|
||||
defs["locations"]["ImDrawList"] = "imgui:2395"
|
||||
defs["locations"]["ImDrawListFlags_"] = "imgui:2377"
|
||||
defs["locations"]["ImDrawListSplitter"] = "imgui:2340"
|
||||
defs["locations"]["ImDrawVert"] = "imgui:2308"
|
||||
defs["locations"]["ImFont"] = "imgui:2739"
|
||||
defs["locations"]["ImFontAtlas"] = "imgui:2637"
|
||||
defs["locations"]["ImFontAtlasCustomRect"] = "imgui:2599"
|
||||
defs["locations"]["ImFontAtlasFlags_"] = "imgui:2612"
|
||||
defs["locations"]["ImFontConfig"] = "imgui:2543"
|
||||
defs["locations"]["ImFontGlyph"] = "imgui:2572"
|
||||
defs["locations"]["ImFontGlyphRangesBuilder"] = "imgui:2584"
|
||||
defs["locations"]["ImGuiBackendFlags_"] = "imgui:1442"
|
||||
defs["locations"]["ImGuiButtonFlags_"] = "imgui:1549"
|
||||
defs["locations"]["ImGuiCol_"] = "imgui:1452"
|
||||
defs["locations"]["ImGuiColorEditFlags_"] = "imgui:1562"
|
||||
defs["locations"]["ImGuiComboFlags_"] = "imgui:1076"
|
||||
defs["locations"]["ImGuiCond_"] = "imgui:1654"
|
||||
defs["locations"]["ImGuiConfigFlags_"] = "imgui:1426"
|
||||
defs["locations"]["ImGuiDataType_"] = "imgui:1319"
|
||||
defs["locations"]["ImGuiDir_"] = "imgui:1335"
|
||||
defs["locations"]["ImGuiDragDropFlags_"] = "imgui:1297"
|
||||
defs["locations"]["ImGuiFocusedFlags_"] = "imgui:1265"
|
||||
defs["locations"]["ImGuiHoveredFlags_"] = "imgui:1279"
|
||||
defs["locations"]["ImGuiIO"] = "imgui:1820"
|
||||
defs["locations"]["ImGuiInputTextCallbackData"] = "imgui:1969"
|
||||
defs["locations"]["ImGuiInputTextFlags_"] = "imgui:989"
|
||||
defs["locations"]["ImGuiKeyModFlags_"] = "imgui:1382"
|
||||
defs["locations"]["ImGuiKey_"] = "imgui:1354"
|
||||
defs["locations"]["ImGuiListClipper"] = "imgui:2193"
|
||||
defs["locations"]["ImGuiMouseButton_"] = "imgui:1626"
|
||||
defs["locations"]["ImGuiMouseCursor_"] = "imgui:1636"
|
||||
defs["locations"]["ImGuiNavInput_"] = "imgui:1395"
|
||||
defs["locations"]["ImGuiOnceUponAFrame"] = "imgui:2068"
|
||||
defs["locations"]["ImGuiPayload"] = "imgui:2009"
|
||||
defs["locations"]["ImGuiPopupFlags_"] = "imgui:1049"
|
||||
defs["locations"]["ImGuiSelectableFlags_"] = "imgui:1065"
|
||||
defs["locations"]["ImGuiSizeCallbackData"] = "imgui:2000"
|
||||
defs["locations"]["ImGuiSliderFlags_"] = "imgui:1609"
|
||||
defs["locations"]["ImGuiSortDirection_"] = "imgui:1346"
|
||||
defs["locations"]["ImGuiStorage"] = "imgui:2130"
|
||||
defs["locations"]["ImGuiStoragePair"] = "imgui:2133"
|
||||
defs["locations"]["ImGuiStyle"] = "imgui:1765"
|
||||
defs["locations"]["ImGuiStyleVar_"] = "imgui:1517"
|
||||
defs["locations"]["ImGuiTabBarFlags_"] = "imgui:1090"
|
||||
defs["locations"]["ImGuiTabItemFlags_"] = "imgui:1106"
|
||||
defs["locations"]["ImGuiTableBgTarget_"] = "imgui:1256"
|
||||
defs["locations"]["ImGuiTableColumnFlags_"] = "imgui:1199"
|
||||
defs["locations"]["ImGuiTableColumnSortSpecs"] = "imgui:2031"
|
||||
defs["locations"]["ImGuiTableFlags_"] = "imgui:1142"
|
||||
defs["locations"]["ImGuiTableRowFlags_"] = "imgui:1241"
|
||||
defs["locations"]["ImGuiTableSortSpecs"] = "imgui:2045"
|
||||
defs["locations"]["ImGuiTextBuffer"] = "imgui:2103"
|
||||
defs["locations"]["ImGuiTextFilter"] = "imgui:2076"
|
||||
defs["locations"]["ImGuiTextRange"] = "imgui:2086"
|
||||
defs["locations"]["ImGuiTreeNodeFlags_"] = "imgui:1020"
|
||||
defs["locations"]["ImGuiViewport"] = "imgui:2810"
|
||||
defs["locations"]["ImGuiViewportFlags_"] = "imgui:2795"
|
||||
defs["locations"]["ImGuiWindowFlags_"] = "imgui:949"
|
||||
defs["locations"]["ImVec2"] = "imgui:259"
|
||||
defs["locations"]["ImVec4"] = "imgui:272"
|
||||
defs["structs"] = {}
|
||||
defs["structs"]["ImColor"] = {}
|
||||
defs["structs"]["ImColor"][1] = {}
|
||||
@ -2529,84 +2537,98 @@ defs["structs"]["ImGuiIO"][60] = {}
|
||||
defs["structs"]["ImGuiIO"][60]["name"] = "MouseDelta"
|
||||
defs["structs"]["ImGuiIO"][60]["type"] = "ImVec2"
|
||||
defs["structs"]["ImGuiIO"][61] = {}
|
||||
defs["structs"]["ImGuiIO"][61]["name"] = "KeyMods"
|
||||
defs["structs"]["ImGuiIO"][61]["type"] = "ImGuiKeyModFlags"
|
||||
defs["structs"]["ImGuiIO"][61]["name"] = "WantCaptureMouseUnlessPopupClose"
|
||||
defs["structs"]["ImGuiIO"][61]["type"] = "bool"
|
||||
defs["structs"]["ImGuiIO"][62] = {}
|
||||
defs["structs"]["ImGuiIO"][62]["name"] = "KeyModsPrev"
|
||||
defs["structs"]["ImGuiIO"][62]["name"] = "KeyMods"
|
||||
defs["structs"]["ImGuiIO"][62]["type"] = "ImGuiKeyModFlags"
|
||||
defs["structs"]["ImGuiIO"][63] = {}
|
||||
defs["structs"]["ImGuiIO"][63]["name"] = "MousePosPrev"
|
||||
defs["structs"]["ImGuiIO"][63]["type"] = "ImVec2"
|
||||
defs["structs"]["ImGuiIO"][63]["name"] = "KeyModsPrev"
|
||||
defs["structs"]["ImGuiIO"][63]["type"] = "ImGuiKeyModFlags"
|
||||
defs["structs"]["ImGuiIO"][64] = {}
|
||||
defs["structs"]["ImGuiIO"][64]["name"] = "MouseClickedPos[5]"
|
||||
defs["structs"]["ImGuiIO"][64]["size"] = 5
|
||||
defs["structs"]["ImGuiIO"][64]["name"] = "MousePosPrev"
|
||||
defs["structs"]["ImGuiIO"][64]["type"] = "ImVec2"
|
||||
defs["structs"]["ImGuiIO"][65] = {}
|
||||
defs["structs"]["ImGuiIO"][65]["name"] = "MouseClickedTime[5]"
|
||||
defs["structs"]["ImGuiIO"][65]["name"] = "MouseClickedPos[5]"
|
||||
defs["structs"]["ImGuiIO"][65]["size"] = 5
|
||||
defs["structs"]["ImGuiIO"][65]["type"] = "double"
|
||||
defs["structs"]["ImGuiIO"][65]["type"] = "ImVec2"
|
||||
defs["structs"]["ImGuiIO"][66] = {}
|
||||
defs["structs"]["ImGuiIO"][66]["name"] = "MouseClicked[5]"
|
||||
defs["structs"]["ImGuiIO"][66]["name"] = "MouseClickedTime[5]"
|
||||
defs["structs"]["ImGuiIO"][66]["size"] = 5
|
||||
defs["structs"]["ImGuiIO"][66]["type"] = "bool"
|
||||
defs["structs"]["ImGuiIO"][66]["type"] = "double"
|
||||
defs["structs"]["ImGuiIO"][67] = {}
|
||||
defs["structs"]["ImGuiIO"][67]["name"] = "MouseDoubleClicked[5]"
|
||||
defs["structs"]["ImGuiIO"][67]["name"] = "MouseClicked[5]"
|
||||
defs["structs"]["ImGuiIO"][67]["size"] = 5
|
||||
defs["structs"]["ImGuiIO"][67]["type"] = "bool"
|
||||
defs["structs"]["ImGuiIO"][68] = {}
|
||||
defs["structs"]["ImGuiIO"][68]["name"] = "MouseReleased[5]"
|
||||
defs["structs"]["ImGuiIO"][68]["name"] = "MouseDoubleClicked[5]"
|
||||
defs["structs"]["ImGuiIO"][68]["size"] = 5
|
||||
defs["structs"]["ImGuiIO"][68]["type"] = "bool"
|
||||
defs["structs"]["ImGuiIO"][69] = {}
|
||||
defs["structs"]["ImGuiIO"][69]["name"] = "MouseDownOwned[5]"
|
||||
defs["structs"]["ImGuiIO"][69]["name"] = "MouseClickedCount[5]"
|
||||
defs["structs"]["ImGuiIO"][69]["size"] = 5
|
||||
defs["structs"]["ImGuiIO"][69]["type"] = "bool"
|
||||
defs["structs"]["ImGuiIO"][69]["type"] = "ImU16"
|
||||
defs["structs"]["ImGuiIO"][70] = {}
|
||||
defs["structs"]["ImGuiIO"][70]["name"] = "MouseDownWasDoubleClick[5]"
|
||||
defs["structs"]["ImGuiIO"][70]["name"] = "MouseClickedLastCount[5]"
|
||||
defs["structs"]["ImGuiIO"][70]["size"] = 5
|
||||
defs["structs"]["ImGuiIO"][70]["type"] = "bool"
|
||||
defs["structs"]["ImGuiIO"][70]["type"] = "ImU16"
|
||||
defs["structs"]["ImGuiIO"][71] = {}
|
||||
defs["structs"]["ImGuiIO"][71]["name"] = "MouseDownDuration[5]"
|
||||
defs["structs"]["ImGuiIO"][71]["name"] = "MouseReleased[5]"
|
||||
defs["structs"]["ImGuiIO"][71]["size"] = 5
|
||||
defs["structs"]["ImGuiIO"][71]["type"] = "float"
|
||||
defs["structs"]["ImGuiIO"][71]["type"] = "bool"
|
||||
defs["structs"]["ImGuiIO"][72] = {}
|
||||
defs["structs"]["ImGuiIO"][72]["name"] = "MouseDownDurationPrev[5]"
|
||||
defs["structs"]["ImGuiIO"][72]["name"] = "MouseDownOwned[5]"
|
||||
defs["structs"]["ImGuiIO"][72]["size"] = 5
|
||||
defs["structs"]["ImGuiIO"][72]["type"] = "float"
|
||||
defs["structs"]["ImGuiIO"][72]["type"] = "bool"
|
||||
defs["structs"]["ImGuiIO"][73] = {}
|
||||
defs["structs"]["ImGuiIO"][73]["name"] = "MouseDragMaxDistanceAbs[5]"
|
||||
defs["structs"]["ImGuiIO"][73]["name"] = "MouseDownOwnedUnlessPopupClose[5]"
|
||||
defs["structs"]["ImGuiIO"][73]["size"] = 5
|
||||
defs["structs"]["ImGuiIO"][73]["type"] = "ImVec2"
|
||||
defs["structs"]["ImGuiIO"][73]["type"] = "bool"
|
||||
defs["structs"]["ImGuiIO"][74] = {}
|
||||
defs["structs"]["ImGuiIO"][74]["name"] = "MouseDragMaxDistanceSqr[5]"
|
||||
defs["structs"]["ImGuiIO"][74]["name"] = "MouseDownDuration[5]"
|
||||
defs["structs"]["ImGuiIO"][74]["size"] = 5
|
||||
defs["structs"]["ImGuiIO"][74]["type"] = "float"
|
||||
defs["structs"]["ImGuiIO"][75] = {}
|
||||
defs["structs"]["ImGuiIO"][75]["name"] = "KeysDownDuration[512]"
|
||||
defs["structs"]["ImGuiIO"][75]["size"] = 512
|
||||
defs["structs"]["ImGuiIO"][75]["name"] = "MouseDownDurationPrev[5]"
|
||||
defs["structs"]["ImGuiIO"][75]["size"] = 5
|
||||
defs["structs"]["ImGuiIO"][75]["type"] = "float"
|
||||
defs["structs"]["ImGuiIO"][76] = {}
|
||||
defs["structs"]["ImGuiIO"][76]["name"] = "KeysDownDurationPrev[512]"
|
||||
defs["structs"]["ImGuiIO"][76]["size"] = 512
|
||||
defs["structs"]["ImGuiIO"][76]["type"] = "float"
|
||||
defs["structs"]["ImGuiIO"][76]["name"] = "MouseDragMaxDistanceAbs[5]"
|
||||
defs["structs"]["ImGuiIO"][76]["size"] = 5
|
||||
defs["structs"]["ImGuiIO"][76]["type"] = "ImVec2"
|
||||
defs["structs"]["ImGuiIO"][77] = {}
|
||||
defs["structs"]["ImGuiIO"][77]["name"] = "NavInputsDownDuration[ImGuiNavInput_COUNT]"
|
||||
defs["structs"]["ImGuiIO"][77]["size"] = 20
|
||||
defs["structs"]["ImGuiIO"][77]["name"] = "MouseDragMaxDistanceSqr[5]"
|
||||
defs["structs"]["ImGuiIO"][77]["size"] = 5
|
||||
defs["structs"]["ImGuiIO"][77]["type"] = "float"
|
||||
defs["structs"]["ImGuiIO"][78] = {}
|
||||
defs["structs"]["ImGuiIO"][78]["name"] = "NavInputsDownDurationPrev[ImGuiNavInput_COUNT]"
|
||||
defs["structs"]["ImGuiIO"][78]["size"] = 20
|
||||
defs["structs"]["ImGuiIO"][78]["name"] = "KeysDownDuration[512]"
|
||||
defs["structs"]["ImGuiIO"][78]["size"] = 512
|
||||
defs["structs"]["ImGuiIO"][78]["type"] = "float"
|
||||
defs["structs"]["ImGuiIO"][79] = {}
|
||||
defs["structs"]["ImGuiIO"][79]["name"] = "PenPressure"
|
||||
defs["structs"]["ImGuiIO"][79]["name"] = "KeysDownDurationPrev[512]"
|
||||
defs["structs"]["ImGuiIO"][79]["size"] = 512
|
||||
defs["structs"]["ImGuiIO"][79]["type"] = "float"
|
||||
defs["structs"]["ImGuiIO"][80] = {}
|
||||
defs["structs"]["ImGuiIO"][80]["name"] = "InputQueueSurrogate"
|
||||
defs["structs"]["ImGuiIO"][80]["type"] = "ImWchar16"
|
||||
defs["structs"]["ImGuiIO"][80]["name"] = "NavInputsDownDuration[ImGuiNavInput_COUNT]"
|
||||
defs["structs"]["ImGuiIO"][80]["size"] = 20
|
||||
defs["structs"]["ImGuiIO"][80]["type"] = "float"
|
||||
defs["structs"]["ImGuiIO"][81] = {}
|
||||
defs["structs"]["ImGuiIO"][81]["name"] = "InputQueueCharacters"
|
||||
defs["structs"]["ImGuiIO"][81]["template_type"] = "ImWchar"
|
||||
defs["structs"]["ImGuiIO"][81]["type"] = "ImVector_ImWchar"
|
||||
defs["structs"]["ImGuiIO"][81]["name"] = "NavInputsDownDurationPrev[ImGuiNavInput_COUNT]"
|
||||
defs["structs"]["ImGuiIO"][81]["size"] = 20
|
||||
defs["structs"]["ImGuiIO"][81]["type"] = "float"
|
||||
defs["structs"]["ImGuiIO"][82] = {}
|
||||
defs["structs"]["ImGuiIO"][82]["name"] = "PenPressure"
|
||||
defs["structs"]["ImGuiIO"][82]["type"] = "float"
|
||||
defs["structs"]["ImGuiIO"][83] = {}
|
||||
defs["structs"]["ImGuiIO"][83]["name"] = "AppFocusLost"
|
||||
defs["structs"]["ImGuiIO"][83]["type"] = "bool"
|
||||
defs["structs"]["ImGuiIO"][84] = {}
|
||||
defs["structs"]["ImGuiIO"][84]["name"] = "InputQueueSurrogate"
|
||||
defs["structs"]["ImGuiIO"][84]["type"] = "ImWchar16"
|
||||
defs["structs"]["ImGuiIO"][85] = {}
|
||||
defs["structs"]["ImGuiIO"][85]["name"] = "InputQueueCharacters"
|
||||
defs["structs"]["ImGuiIO"][85]["template_type"] = "ImWchar"
|
||||
defs["structs"]["ImGuiIO"][85]["type"] = "ImVector_ImWchar"
|
||||
defs["structs"]["ImGuiInputTextCallbackData"] = {}
|
||||
defs["structs"]["ImGuiInputTextCallbackData"][1] = {}
|
||||
defs["structs"]["ImGuiInputTextCallbackData"][1]["name"] = "EventFlag"
|
||||
@ -2655,17 +2677,14 @@ defs["structs"]["ImGuiListClipper"][3] = {}
|
||||
defs["structs"]["ImGuiListClipper"][3]["name"] = "ItemsCount"
|
||||
defs["structs"]["ImGuiListClipper"][3]["type"] = "int"
|
||||
defs["structs"]["ImGuiListClipper"][4] = {}
|
||||
defs["structs"]["ImGuiListClipper"][4]["name"] = "StepNo"
|
||||
defs["structs"]["ImGuiListClipper"][4]["type"] = "int"
|
||||
defs["structs"]["ImGuiListClipper"][4]["name"] = "ItemsHeight"
|
||||
defs["structs"]["ImGuiListClipper"][4]["type"] = "float"
|
||||
defs["structs"]["ImGuiListClipper"][5] = {}
|
||||
defs["structs"]["ImGuiListClipper"][5]["name"] = "ItemsFrozen"
|
||||
defs["structs"]["ImGuiListClipper"][5]["type"] = "int"
|
||||
defs["structs"]["ImGuiListClipper"][5]["name"] = "StartPosY"
|
||||
defs["structs"]["ImGuiListClipper"][5]["type"] = "float"
|
||||
defs["structs"]["ImGuiListClipper"][6] = {}
|
||||
defs["structs"]["ImGuiListClipper"][6]["name"] = "ItemsHeight"
|
||||
defs["structs"]["ImGuiListClipper"][6]["type"] = "float"
|
||||
defs["structs"]["ImGuiListClipper"][7] = {}
|
||||
defs["structs"]["ImGuiListClipper"][7]["name"] = "StartPosY"
|
||||
defs["structs"]["ImGuiListClipper"][7]["type"] = "float"
|
||||
defs["structs"]["ImGuiListClipper"][6]["name"] = "TempData"
|
||||
defs["structs"]["ImGuiListClipper"][6]["type"] = "void*"
|
||||
defs["structs"]["ImGuiOnceUponAFrame"] = {}
|
||||
defs["structs"]["ImGuiOnceUponAFrame"][1] = {}
|
||||
defs["structs"]["ImGuiOnceUponAFrame"][1]["name"] = "RefFrame"
|
||||
|
||||
8
imgui-sys/third-party/update-imgui.sh
vendored
Executable file
8
imgui-sys/third-party/update-imgui.sh
vendored
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR=$(dirname ${0} | python3 -c 'import os, sys; print(os.path.abspath(sys.stdin.read().strip()))' )
|
||||
|
||||
cd ${SCRIPT_DIR}
|
||||
./_update-imgui.sh ~/code/vendor/imgui v1.86 ./imgui-master/imgui
|
||||
./_update-imgui.sh ~/code/vendor/imgui 15b4a064f9244c430e65214f7249b615fb394321 ./imgui-docking/imgui
|
||||
@ -180,6 +180,8 @@ pub struct Io {
|
||||
#[cfg(feature = "docking")]
|
||||
pub config_docking_no_split: bool,
|
||||
#[cfg(feature = "docking")]
|
||||
pub config_docking_with_shift: bool,
|
||||
#[cfg(feature = "docking")]
|
||||
pub config_docking_always_tab_bar: bool,
|
||||
#[cfg(feature = "docking")]
|
||||
pub config_docking_transparent_payload: bool,
|
||||
@ -314,7 +316,6 @@ pub struct Io {
|
||||
/// f32::MAX]), so a disappearing/reappearing mouse won't have a huge delta.
|
||||
pub mouse_delta: [f32; 2],
|
||||
|
||||
#[cfg(feature = "docking")]
|
||||
pub want_capture_mouse_unless_popup_close: bool,
|
||||
|
||||
key_mods: sys::ImGuiKeyModFlags,
|
||||
@ -324,11 +325,11 @@ pub struct Io {
|
||||
mouse_clicked_time: [f64; 5],
|
||||
mouse_clicked: [bool; 5],
|
||||
mouse_double_clicked: [bool; 5],
|
||||
mouse_clicked_count: [u16; 5],
|
||||
mouse_clicked_last_count: [u16; 5],
|
||||
mouse_released: [bool; 5],
|
||||
mouse_down_owned: [bool; 5],
|
||||
#[cfg(feature = "docking")]
|
||||
mouse_down_owned_unless_popup_close: [bool; 5],
|
||||
mouse_down_was_double_click: [bool; 5],
|
||||
mouse_down_duration: [f32; 5],
|
||||
mouse_down_duration_prev: [f32; 5],
|
||||
mouse_drag_max_distance_abs: [[f32; 2]; 5],
|
||||
@ -338,7 +339,6 @@ pub struct Io {
|
||||
nav_inputs_down_duration: [f32; NavInput::COUNT + NavInput::INTERNAL_COUNT],
|
||||
nav_inputs_down_duration_prev: [f32; NavInput::COUNT + NavInput::INTERNAL_COUNT],
|
||||
pen_pressure: f32,
|
||||
#[cfg(feature = "docking")]
|
||||
app_focus_lost: bool,
|
||||
input_queue_surrogate: sys::ImWchar16,
|
||||
input_queue_characters: ImVector<sys::ImWchar>,
|
||||
@ -516,9 +516,10 @@ fn test_io_memory_layout() {
|
||||
assert_field_offset!(mouse_clicked_time, MouseClickedTime);
|
||||
assert_field_offset!(mouse_clicked, MouseClicked);
|
||||
assert_field_offset!(mouse_double_clicked, MouseDoubleClicked);
|
||||
assert_field_offset!(mouse_clicked_count, MouseClickedCount);
|
||||
assert_field_offset!(mouse_clicked_last_count, MouseClickedLastCount);
|
||||
assert_field_offset!(mouse_released, MouseReleased);
|
||||
assert_field_offset!(mouse_down_owned, MouseDownOwned);
|
||||
assert_field_offset!(mouse_down_was_double_click, MouseDownWasDoubleClick);
|
||||
assert_field_offset!(mouse_down_duration, MouseDownDuration);
|
||||
assert_field_offset!(mouse_down_duration_prev, MouseDownDurationPrev);
|
||||
assert_field_offset!(mouse_drag_max_distance_abs, MouseDragMaxDistanceAbs);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user