mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-11 21:48:36 +00:00
Merge branch 'master' into feat_drag_drop
This commit is contained in:
commit
6b2983e591
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@ -137,3 +137,7 @@ jobs:
|
||||
- run: cargo test --manifest-path imgui-winit-support/Cargo.toml --no-default-features --features winit-22
|
||||
- run: cargo test --manifest-path imgui-winit-support/Cargo.toml --no-default-features --features winit-23
|
||||
- run: cargo test --manifest-path imgui-winit-support/Cargo.toml --no-default-features --features winit-24
|
||||
# Run unreasonably slow tests under release, but only the crates that have
|
||||
# them, and don't bother doing this on most platforms.
|
||||
- run: cargo test -p imgui --release -- --ignored
|
||||
if: matrix.os == 'ubuntu-latest' && matrix.rust == 'stable'
|
||||
|
||||
@ -2,6 +2,8 @@
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
- Upgrade to [Dear ImGui v1.80](https://github.com/ocornut/imgui/releases/tag/v1.80). (Note that the new table functionality is not yet supported, however)
|
||||
|
||||
- `Ui::key_index()` is now called internally when needed, and the various `is_key_foo` now take a `Key` directly: https://github.com/imgui-rs/imgui-rs/pull/416
|
||||
- `is_key_down`, `is_key_pressed`, `is_key_released` and `key_pressed_amount` now take a `Key` instead of `u32` (breaking).
|
||||
- `key_index` is no longer public (breaking). If you need access to the key map, it can be accessed as `ui.io().key_map[key]` (If you need to do this, file a bug, since I'm open to exposing this if there's actually a use case).
|
||||
@ -28,6 +30,23 @@
|
||||
- `DragDropTarget` allows users to accept any of the above payloads.
|
||||
- Extensive documentation has been made on all of these features, hopefully as a target for future features.
|
||||
|
||||
- `ImColor` (which is a wrapper around `u32`) has been renamed to `ImColor32` in order to avoid confusion with the `ImColor` type from the Dear ImGui C++ code (which is a wrapper around `ImVec4`). In the future an `ImColor` type which maps more closely to the C++ one will be added.
|
||||
- Additionally, a number of constructor and accessor methods have been added to it `ImColor`, which are `const fn` where possible.
|
||||
|
||||
- The `im_str!` macro can now be used in `const` contexts (when the `format!` version is not used).
|
||||
|
||||
- `im_str!` now verifies that the parameter has no interior nuls at compile time. This can be avoided to get the old (truncating) behavior by forcing it to use the `format!`-like version, e.g. `im_str!("for_some_reason_this_should_be_truncated\0 there {}", "")`.
|
||||
- This is not recommended, and is probably not useful.
|
||||
|
||||
- Many functions are now `const fn`.
|
||||
|
||||
- A large number of small functions are now `#[inline]`, but many still aren't, so you probably will want to build with LTO for release builds if you use `imgui` heavily.
|
||||
|
||||
- The `io.config_windows_memory_compact_timer` flag has been renamed to `io.config_memory_compact_timer`. This follows the similar rename in the C++ ImGui, and was done because it no longer only applies to window memory usage.
|
||||
|
||||
- The variants of `ColorEditInputMode` and `ColorEditDisplayMode` have been renamed to be CamelCase instead of upper case (e.g. `ColorEditFooMode::RGB` => `ColorEditFooMode::Rgb`).
|
||||
- However, this change is probably not breaking (in practice if not in theory) because const aliases using the old names are provided.
|
||||
|
||||
## [0.6.1] - 2020-12-16
|
||||
|
||||
- Support for winit 0.24.x
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
[](https://github.com/imgui-rs/imgui-rs/actions)
|
||||
[](https://crates.io/crates/imgui)
|
||||
[](https://docs.rs/imgui)
|
||||
[](https://github.com/ocornut/imgui)
|
||||
[](https://github.com/ocornut/imgui)
|
||||
|
||||
(Recently under new maintenance, things subject to change)
|
||||
|
||||
@ -32,7 +32,7 @@ Window::new(im_str!("Hello world"))
|
||||
* imgui-gfx-renderer: Renderer implementation that uses the `gfx` crate (*not
|
||||
the new gfx-hal crate*)
|
||||
* imgui-winit-support: Backend platform implementation that uses the `winit`
|
||||
crate (0.22 by default, but 0.19-0.21 are supported via feature flags)
|
||||
crate (latest by default, but earlier versions are supported via feature flags)
|
||||
* imgui-sys: Low-level unsafe API (automatically generated)
|
||||
|
||||
## Features
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
#include "./third-party/imgui/imgui_demo.cpp"
|
||||
#include "./third-party/imgui/imgui_draw.cpp"
|
||||
#include "./third-party/imgui/imgui_widgets.cpp"
|
||||
#include "./third-party/imgui/imgui_tables.cpp"
|
||||
#include "./third-party/cimgui.cpp"
|
||||
|
||||
|
||||
|
||||
@ -100,7 +100,9 @@ pub type ImGuiDir = cty::c_int;
|
||||
pub type ImGuiKey = cty::c_int;
|
||||
pub type ImGuiMouseButton = cty::c_int;
|
||||
pub type ImGuiMouseCursor = cty::c_int;
|
||||
pub type ImGuiSortDirection = cty::c_int;
|
||||
pub type ImGuiStyleVar = cty::c_int;
|
||||
pub type ImGuiTableBgTarget = cty::c_int;
|
||||
pub type ImDrawCornerFlags = cty::c_int;
|
||||
pub type ImDrawListFlags = cty::c_int;
|
||||
pub type ImFontAtlasFlags = cty::c_int;
|
||||
@ -119,6 +121,9 @@ pub type ImGuiSelectableFlags = cty::c_int;
|
||||
pub type ImGuiSliderFlags = cty::c_int;
|
||||
pub type ImGuiTabBarFlags = cty::c_int;
|
||||
pub type ImGuiTabItemFlags = cty::c_int;
|
||||
pub type ImGuiTableFlags = cty::c_int;
|
||||
pub type ImGuiTableColumnFlags = cty::c_int;
|
||||
pub type ImGuiTableRowFlags = cty::c_int;
|
||||
pub type ImGuiTreeNodeFlags = cty::c_int;
|
||||
pub type ImGuiWindowFlags = cty::c_int;
|
||||
pub type ImTextureID = *mut cty::c_void;
|
||||
@ -131,6 +136,7 @@ pub type ImGuiSizeCallback =
|
||||
pub type ImWchar16 = cty::c_ushort;
|
||||
pub type ImWchar = ImWchar16;
|
||||
pub type ImU8 = cty::c_uchar;
|
||||
pub type ImS16 = cty::c_short;
|
||||
pub type ImU32 = cty::c_uint;
|
||||
pub type ImDrawCallback = ::core::option::Option<
|
||||
unsafe extern "C" fn(parent_list: *const ImDrawList, cmd: *const ImDrawCmd),
|
||||
@ -477,6 +483,77 @@ pub const ImGuiTabItemFlags_NoReorder: ImGuiTabItemFlags_ = 32;
|
||||
pub const ImGuiTabItemFlags_Leading: ImGuiTabItemFlags_ = 64;
|
||||
pub const ImGuiTabItemFlags_Trailing: ImGuiTabItemFlags_ = 128;
|
||||
pub type ImGuiTabItemFlags_ = cty::c_uint;
|
||||
pub const ImGuiTableFlags_None: ImGuiTableFlags_ = 0;
|
||||
pub const ImGuiTableFlags_Resizable: ImGuiTableFlags_ = 1;
|
||||
pub const ImGuiTableFlags_Reorderable: ImGuiTableFlags_ = 2;
|
||||
pub const ImGuiTableFlags_Hideable: ImGuiTableFlags_ = 4;
|
||||
pub const ImGuiTableFlags_Sortable: ImGuiTableFlags_ = 8;
|
||||
pub const ImGuiTableFlags_NoSavedSettings: ImGuiTableFlags_ = 16;
|
||||
pub const ImGuiTableFlags_ContextMenuInBody: ImGuiTableFlags_ = 32;
|
||||
pub const ImGuiTableFlags_RowBg: ImGuiTableFlags_ = 64;
|
||||
pub const ImGuiTableFlags_BordersInnerH: ImGuiTableFlags_ = 128;
|
||||
pub const ImGuiTableFlags_BordersOuterH: ImGuiTableFlags_ = 256;
|
||||
pub const ImGuiTableFlags_BordersInnerV: ImGuiTableFlags_ = 512;
|
||||
pub const ImGuiTableFlags_BordersOuterV: ImGuiTableFlags_ = 1024;
|
||||
pub const ImGuiTableFlags_BordersH: ImGuiTableFlags_ = 384;
|
||||
pub const ImGuiTableFlags_BordersV: ImGuiTableFlags_ = 1536;
|
||||
pub const ImGuiTableFlags_BordersInner: ImGuiTableFlags_ = 640;
|
||||
pub const ImGuiTableFlags_BordersOuter: ImGuiTableFlags_ = 1280;
|
||||
pub const ImGuiTableFlags_Borders: ImGuiTableFlags_ = 1920;
|
||||
pub const ImGuiTableFlags_NoBordersInBody: ImGuiTableFlags_ = 2048;
|
||||
pub const ImGuiTableFlags_NoBordersInBodyUntilResize: ImGuiTableFlags_ = 4096;
|
||||
pub const ImGuiTableFlags_SizingFixedFit: ImGuiTableFlags_ = 8192;
|
||||
pub const ImGuiTableFlags_SizingFixedSame: ImGuiTableFlags_ = 16384;
|
||||
pub const ImGuiTableFlags_SizingStretchProp: ImGuiTableFlags_ = 24576;
|
||||
pub const ImGuiTableFlags_SizingStretchSame: ImGuiTableFlags_ = 32768;
|
||||
pub const ImGuiTableFlags_NoHostExtendX: ImGuiTableFlags_ = 65536;
|
||||
pub const ImGuiTableFlags_NoHostExtendY: ImGuiTableFlags_ = 131072;
|
||||
pub const ImGuiTableFlags_NoKeepColumnsVisible: ImGuiTableFlags_ = 262144;
|
||||
pub const ImGuiTableFlags_PreciseWidths: ImGuiTableFlags_ = 524288;
|
||||
pub const ImGuiTableFlags_NoClip: ImGuiTableFlags_ = 1048576;
|
||||
pub const ImGuiTableFlags_PadOuterX: ImGuiTableFlags_ = 2097152;
|
||||
pub const ImGuiTableFlags_NoPadOuterX: ImGuiTableFlags_ = 4194304;
|
||||
pub const ImGuiTableFlags_NoPadInnerX: ImGuiTableFlags_ = 8388608;
|
||||
pub const ImGuiTableFlags_ScrollX: ImGuiTableFlags_ = 16777216;
|
||||
pub const ImGuiTableFlags_ScrollY: ImGuiTableFlags_ = 33554432;
|
||||
pub const ImGuiTableFlags_SortMulti: ImGuiTableFlags_ = 67108864;
|
||||
pub const ImGuiTableFlags_SortTristate: ImGuiTableFlags_ = 134217728;
|
||||
pub const ImGuiTableFlags_SizingMask_: ImGuiTableFlags_ = 57344;
|
||||
pub type ImGuiTableFlags_ = cty::c_uint;
|
||||
pub const ImGuiTableColumnFlags_None: ImGuiTableColumnFlags_ = 0;
|
||||
pub const ImGuiTableColumnFlags_DefaultHide: ImGuiTableColumnFlags_ = 1;
|
||||
pub const ImGuiTableColumnFlags_DefaultSort: ImGuiTableColumnFlags_ = 2;
|
||||
pub const ImGuiTableColumnFlags_WidthStretch: ImGuiTableColumnFlags_ = 4;
|
||||
pub const ImGuiTableColumnFlags_WidthFixed: ImGuiTableColumnFlags_ = 8;
|
||||
pub const ImGuiTableColumnFlags_NoResize: ImGuiTableColumnFlags_ = 16;
|
||||
pub const ImGuiTableColumnFlags_NoReorder: ImGuiTableColumnFlags_ = 32;
|
||||
pub const ImGuiTableColumnFlags_NoHide: ImGuiTableColumnFlags_ = 64;
|
||||
pub const ImGuiTableColumnFlags_NoClip: ImGuiTableColumnFlags_ = 128;
|
||||
pub const ImGuiTableColumnFlags_NoSort: ImGuiTableColumnFlags_ = 256;
|
||||
pub const ImGuiTableColumnFlags_NoSortAscending: ImGuiTableColumnFlags_ = 512;
|
||||
pub const ImGuiTableColumnFlags_NoSortDescending: ImGuiTableColumnFlags_ = 1024;
|
||||
pub const ImGuiTableColumnFlags_NoHeaderWidth: ImGuiTableColumnFlags_ = 2048;
|
||||
pub const ImGuiTableColumnFlags_PreferSortAscending: ImGuiTableColumnFlags_ = 4096;
|
||||
pub const ImGuiTableColumnFlags_PreferSortDescending: ImGuiTableColumnFlags_ = 8192;
|
||||
pub const ImGuiTableColumnFlags_IndentEnable: ImGuiTableColumnFlags_ = 16384;
|
||||
pub const ImGuiTableColumnFlags_IndentDisable: ImGuiTableColumnFlags_ = 32768;
|
||||
pub const ImGuiTableColumnFlags_IsEnabled: ImGuiTableColumnFlags_ = 1048576;
|
||||
pub const ImGuiTableColumnFlags_IsVisible: ImGuiTableColumnFlags_ = 2097152;
|
||||
pub const ImGuiTableColumnFlags_IsSorted: ImGuiTableColumnFlags_ = 4194304;
|
||||
pub const ImGuiTableColumnFlags_IsHovered: ImGuiTableColumnFlags_ = 8388608;
|
||||
pub const ImGuiTableColumnFlags_WidthMask_: ImGuiTableColumnFlags_ = 12;
|
||||
pub const ImGuiTableColumnFlags_IndentMask_: ImGuiTableColumnFlags_ = 49152;
|
||||
pub const ImGuiTableColumnFlags_StatusMask_: ImGuiTableColumnFlags_ = 15728640;
|
||||
pub const ImGuiTableColumnFlags_NoDirectResize_: ImGuiTableColumnFlags_ = 1073741824;
|
||||
pub type ImGuiTableColumnFlags_ = cty::c_uint;
|
||||
pub const ImGuiTableRowFlags_None: ImGuiTableRowFlags_ = 0;
|
||||
pub const ImGuiTableRowFlags_Headers: ImGuiTableRowFlags_ = 1;
|
||||
pub type ImGuiTableRowFlags_ = cty::c_uint;
|
||||
pub const ImGuiTableBgTarget_None: ImGuiTableBgTarget_ = 0;
|
||||
pub const ImGuiTableBgTarget_RowBg0: ImGuiTableBgTarget_ = 1;
|
||||
pub const ImGuiTableBgTarget_RowBg1: ImGuiTableBgTarget_ = 2;
|
||||
pub const ImGuiTableBgTarget_CellBg: ImGuiTableBgTarget_ = 3;
|
||||
pub type ImGuiTableBgTarget_ = cty::c_uint;
|
||||
pub const ImGuiFocusedFlags_None: ImGuiFocusedFlags_ = 0;
|
||||
pub const ImGuiFocusedFlags_ChildWindows: ImGuiFocusedFlags_ = 1;
|
||||
pub const ImGuiFocusedFlags_RootWindow: ImGuiFocusedFlags_ = 2;
|
||||
@ -525,6 +602,10 @@ pub const ImGuiDir_Up: ImGuiDir_ = 2;
|
||||
pub const ImGuiDir_Down: ImGuiDir_ = 3;
|
||||
pub const ImGuiDir_COUNT: ImGuiDir_ = 4;
|
||||
pub type ImGuiDir_ = cty::c_int;
|
||||
pub const ImGuiSortDirection_None: ImGuiSortDirection_ = 0;
|
||||
pub const ImGuiSortDirection_Ascending: ImGuiSortDirection_ = 1;
|
||||
pub const ImGuiSortDirection_Descending: ImGuiSortDirection_ = 2;
|
||||
pub type ImGuiSortDirection_ = cty::c_uint;
|
||||
pub const ImGuiKey_Tab: ImGuiKey_ = 0;
|
||||
pub const ImGuiKey_LeftArrow: ImGuiKey_ = 1;
|
||||
pub const ImGuiKey_RightArrow: ImGuiKey_ = 2;
|
||||
@ -637,13 +718,18 @@ pub const ImGuiCol_PlotLines: ImGuiCol_ = 38;
|
||||
pub const ImGuiCol_PlotLinesHovered: ImGuiCol_ = 39;
|
||||
pub const ImGuiCol_PlotHistogram: ImGuiCol_ = 40;
|
||||
pub const ImGuiCol_PlotHistogramHovered: ImGuiCol_ = 41;
|
||||
pub const ImGuiCol_TextSelectedBg: ImGuiCol_ = 42;
|
||||
pub const ImGuiCol_DragDropTarget: ImGuiCol_ = 43;
|
||||
pub const ImGuiCol_NavHighlight: ImGuiCol_ = 44;
|
||||
pub const ImGuiCol_NavWindowingHighlight: ImGuiCol_ = 45;
|
||||
pub const ImGuiCol_NavWindowingDimBg: ImGuiCol_ = 46;
|
||||
pub const ImGuiCol_ModalWindowDimBg: ImGuiCol_ = 47;
|
||||
pub const ImGuiCol_COUNT: ImGuiCol_ = 48;
|
||||
pub const ImGuiCol_TableHeaderBg: ImGuiCol_ = 42;
|
||||
pub const ImGuiCol_TableBorderStrong: ImGuiCol_ = 43;
|
||||
pub const ImGuiCol_TableBorderLight: ImGuiCol_ = 44;
|
||||
pub const ImGuiCol_TableRowBg: ImGuiCol_ = 45;
|
||||
pub const ImGuiCol_TableRowBgAlt: ImGuiCol_ = 46;
|
||||
pub const ImGuiCol_TextSelectedBg: ImGuiCol_ = 47;
|
||||
pub const ImGuiCol_DragDropTarget: ImGuiCol_ = 48;
|
||||
pub const ImGuiCol_NavHighlight: ImGuiCol_ = 49;
|
||||
pub const ImGuiCol_NavWindowingHighlight: ImGuiCol_ = 50;
|
||||
pub const ImGuiCol_NavWindowingDimBg: ImGuiCol_ = 51;
|
||||
pub const ImGuiCol_ModalWindowDimBg: ImGuiCol_ = 52;
|
||||
pub const ImGuiCol_COUNT: ImGuiCol_ = 53;
|
||||
pub type ImGuiCol_ = cty::c_uint;
|
||||
pub const ImGuiStyleVar_Alpha: ImGuiStyleVar_ = 0;
|
||||
pub const ImGuiStyleVar_WindowPadding: ImGuiStyleVar_ = 1;
|
||||
@ -661,14 +747,15 @@ pub const ImGuiStyleVar_FrameBorderSize: ImGuiStyleVar_ = 12;
|
||||
pub const ImGuiStyleVar_ItemSpacing: ImGuiStyleVar_ = 13;
|
||||
pub const ImGuiStyleVar_ItemInnerSpacing: ImGuiStyleVar_ = 14;
|
||||
pub const ImGuiStyleVar_IndentSpacing: ImGuiStyleVar_ = 15;
|
||||
pub const ImGuiStyleVar_ScrollbarSize: ImGuiStyleVar_ = 16;
|
||||
pub const ImGuiStyleVar_ScrollbarRounding: ImGuiStyleVar_ = 17;
|
||||
pub const ImGuiStyleVar_GrabMinSize: ImGuiStyleVar_ = 18;
|
||||
pub const ImGuiStyleVar_GrabRounding: ImGuiStyleVar_ = 19;
|
||||
pub const ImGuiStyleVar_TabRounding: ImGuiStyleVar_ = 20;
|
||||
pub const ImGuiStyleVar_ButtonTextAlign: ImGuiStyleVar_ = 21;
|
||||
pub const ImGuiStyleVar_SelectableTextAlign: ImGuiStyleVar_ = 22;
|
||||
pub const ImGuiStyleVar_COUNT: ImGuiStyleVar_ = 23;
|
||||
pub const ImGuiStyleVar_CellPadding: ImGuiStyleVar_ = 16;
|
||||
pub const ImGuiStyleVar_ScrollbarSize: ImGuiStyleVar_ = 17;
|
||||
pub const ImGuiStyleVar_ScrollbarRounding: ImGuiStyleVar_ = 18;
|
||||
pub const ImGuiStyleVar_GrabMinSize: ImGuiStyleVar_ = 19;
|
||||
pub const ImGuiStyleVar_GrabRounding: ImGuiStyleVar_ = 20;
|
||||
pub const ImGuiStyleVar_TabRounding: ImGuiStyleVar_ = 21;
|
||||
pub const ImGuiStyleVar_ButtonTextAlign: ImGuiStyleVar_ = 22;
|
||||
pub const ImGuiStyleVar_SelectableTextAlign: ImGuiStyleVar_ = 23;
|
||||
pub const ImGuiStyleVar_COUNT: ImGuiStyleVar_ = 24;
|
||||
pub type ImGuiStyleVar_ = cty::c_uint;
|
||||
pub const ImGuiButtonFlags_None: ImGuiButtonFlags_ = 0;
|
||||
pub const ImGuiButtonFlags_MouseButtonLeft: ImGuiButtonFlags_ = 1;
|
||||
@ -756,6 +843,7 @@ pub struct ImGuiStyle {
|
||||
pub FrameBorderSize: f32,
|
||||
pub ItemSpacing: ImVec2,
|
||||
pub ItemInnerSpacing: ImVec2,
|
||||
pub CellPadding: ImVec2,
|
||||
pub TouchExtraPadding: ImVec2,
|
||||
pub IndentSpacing: f32,
|
||||
pub ColumnsMinSpacing: f32,
|
||||
@ -778,7 +866,7 @@ pub struct ImGuiStyle {
|
||||
pub AntiAliasedFill: bool,
|
||||
pub CurveTessellationTol: f32,
|
||||
pub CircleSegmentMaxError: f32,
|
||||
pub Colors: [ImVec4; 48usize],
|
||||
pub Colors: [ImVec4; 53usize],
|
||||
}
|
||||
impl Default for ImGuiStyle {
|
||||
fn default() -> Self {
|
||||
@ -787,7 +875,7 @@ impl Default for ImGuiStyle {
|
||||
}
|
||||
impl ::core::fmt::Debug for ImGuiStyle {
|
||||
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
|
||||
write ! (f , "ImGuiStyle {{ Alpha: {:?}, WindowPadding: {:?}, WindowRounding: {:?}, WindowBorderSize: {:?}, WindowMinSize: {:?}, WindowTitleAlign: {:?}, WindowMenuButtonPosition: {:?}, ChildRounding: {:?}, ChildBorderSize: {:?}, PopupRounding: {:?}, PopupBorderSize: {:?}, FramePadding: {:?}, FrameRounding: {:?}, FrameBorderSize: {:?}, ItemSpacing: {:?}, ItemInnerSpacing: {:?}, TouchExtraPadding: {:?}, IndentSpacing: {:?}, ColumnsMinSpacing: {:?}, ScrollbarSize: {:?}, ScrollbarRounding: {:?}, GrabMinSize: {:?}, GrabRounding: {:?}, LogSliderDeadzone: {:?}, TabRounding: {:?}, TabBorderSize: {:?}, TabMinWidthForCloseButton: {:?}, ColorButtonPosition: {:?}, ButtonTextAlign: {:?}, SelectableTextAlign: {:?}, DisplayWindowPadding: {:?}, DisplaySafeAreaPadding: {:?}, MouseCursorScale: {:?}, AntiAliasedLines: {:?}, AntiAliasedLinesUseTex: {:?}, AntiAliasedFill: {:?}, CurveTessellationTol: {:?}, CircleSegmentMaxError: {:?}, Colors: [...] }}" , self . Alpha , self . WindowPadding , self . WindowRounding , self . WindowBorderSize , self . WindowMinSize , self . WindowTitleAlign , self . WindowMenuButtonPosition , self . ChildRounding , self . ChildBorderSize , self . PopupRounding , self . PopupBorderSize , self . FramePadding , self . FrameRounding , self . FrameBorderSize , self . ItemSpacing , self . ItemInnerSpacing , self . TouchExtraPadding , self . IndentSpacing , self . ColumnsMinSpacing , self . ScrollbarSize , self . ScrollbarRounding , self . GrabMinSize , self . GrabRounding , self . LogSliderDeadzone , self . TabRounding , self . TabBorderSize , self . TabMinWidthForCloseButton , self . ColorButtonPosition , self . ButtonTextAlign , self . SelectableTextAlign , self . DisplayWindowPadding , self . DisplaySafeAreaPadding , self . MouseCursorScale , self . AntiAliasedLines , self . AntiAliasedLinesUseTex , self . AntiAliasedFill , self . CurveTessellationTol , self . CircleSegmentMaxError)
|
||||
write ! (f , "ImGuiStyle {{ Alpha: {:?}, WindowPadding: {:?}, WindowRounding: {:?}, WindowBorderSize: {:?}, WindowMinSize: {:?}, WindowTitleAlign: {:?}, WindowMenuButtonPosition: {:?}, ChildRounding: {:?}, ChildBorderSize: {:?}, PopupRounding: {:?}, PopupBorderSize: {:?}, FramePadding: {:?}, FrameRounding: {:?}, FrameBorderSize: {:?}, ItemSpacing: {:?}, ItemInnerSpacing: {:?}, CellPadding: {:?}, TouchExtraPadding: {:?}, IndentSpacing: {:?}, ColumnsMinSpacing: {:?}, ScrollbarSize: {:?}, ScrollbarRounding: {:?}, GrabMinSize: {:?}, GrabRounding: {:?}, LogSliderDeadzone: {:?}, TabRounding: {:?}, TabBorderSize: {:?}, TabMinWidthForCloseButton: {:?}, ColorButtonPosition: {:?}, ButtonTextAlign: {:?}, SelectableTextAlign: {:?}, DisplayWindowPadding: {:?}, DisplaySafeAreaPadding: {:?}, MouseCursorScale: {:?}, AntiAliasedLines: {:?}, AntiAliasedLinesUseTex: {:?}, AntiAliasedFill: {:?}, CurveTessellationTol: {:?}, CircleSegmentMaxError: {:?}, Colors: [...] }}" , self . Alpha , self . WindowPadding , self . WindowRounding , self . WindowBorderSize , self . WindowMinSize , self . WindowTitleAlign , self . WindowMenuButtonPosition , self . ChildRounding , self . ChildBorderSize , self . PopupRounding , self . PopupBorderSize , self . FramePadding , self . FrameRounding , self . FrameBorderSize , self . ItemSpacing , self . ItemInnerSpacing , self . CellPadding , self . TouchExtraPadding , self . IndentSpacing , self . ColumnsMinSpacing , self . ScrollbarSize , self . ScrollbarRounding , self . GrabMinSize , self . GrabRounding , self . LogSliderDeadzone , self . TabRounding , self . TabBorderSize , self . TabMinWidthForCloseButton , self . ColorButtonPosition , self . ButtonTextAlign , self . SelectableTextAlign , self . DisplayWindowPadding , self . DisplaySafeAreaPadding , self . MouseCursorScale , self . AntiAliasedLines , self . AntiAliasedLinesUseTex , self . AntiAliasedFill , self . CurveTessellationTol , self . CircleSegmentMaxError)
|
||||
}
|
||||
}
|
||||
#[repr(C)]
|
||||
@ -815,9 +903,10 @@ pub struct ImGuiIO {
|
||||
pub MouseDrawCursor: bool,
|
||||
pub ConfigMacOSXBehaviors: bool,
|
||||
pub ConfigInputTextCursorBlink: bool,
|
||||
pub ConfigDragClickToInputText: bool,
|
||||
pub ConfigWindowsResizeFromEdges: bool,
|
||||
pub ConfigWindowsMoveFromTitleBarOnly: bool,
|
||||
pub ConfigWindowsMemoryCompactTimer: f32,
|
||||
pub ConfigMemoryCompactTimer: f32,
|
||||
pub BackendPlatformName: *const cty::c_char,
|
||||
pub BackendRendererName: *const cty::c_char,
|
||||
pub BackendPlatformUserData: *mut cty::c_void,
|
||||
@ -833,7 +922,6 @@ pub struct ImGuiIO {
|
||||
pub ImeSetInputScreenPosFn:
|
||||
::core::option::Option<unsafe extern "C" fn(x: cty::c_int, y: cty::c_int)>,
|
||||
pub ImeWindowHandle: *mut cty::c_void,
|
||||
pub RenderDrawListsFnUnused: *mut cty::c_void,
|
||||
pub MousePos: ImVec2,
|
||||
pub MouseDown: [bool; 5usize],
|
||||
pub MouseWheel: f32,
|
||||
@ -886,7 +974,7 @@ impl Default for ImGuiIO {
|
||||
}
|
||||
impl ::core::fmt::Debug for ImGuiIO {
|
||||
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
|
||||
write ! (f , "ImGuiIO {{ ConfigFlags: {:?}, BackendFlags: {:?}, DisplaySize: {:?}, DeltaTime: {:?}, IniSavingRate: {:?}, IniFilename: {:?}, LogFilename: {:?}, MouseDoubleClickTime: {:?}, MouseDoubleClickMaxDist: {:?}, MouseDragThreshold: {:?}, KeyMap: {:?}, KeyRepeatDelay: {:?}, KeyRepeatRate: {:?}, UserData: {:?}, Fonts: {:?}, FontGlobalScale: {:?}, FontAllowUserScaling: {:?}, FontDefault: {:?}, DisplayFramebufferScale: {:?}, MouseDrawCursor: {:?}, ConfigMacOSXBehaviors: {:?}, ConfigInputTextCursorBlink: {:?}, ConfigWindowsResizeFromEdges: {:?}, ConfigWindowsMoveFromTitleBarOnly: {:?}, ConfigWindowsMemoryCompactTimer: {:?}, BackendPlatformName: {:?}, BackendRendererName: {:?}, BackendPlatformUserData: {:?}, BackendRendererUserData: {:?}, BackendLanguageUserData: {:?}, GetClipboardTextFn: {:?}, SetClipboardTextFn: {:?}, ClipboardUserData: {:?}, ImeSetInputScreenPosFn: {:?}, ImeWindowHandle: {:?}, RenderDrawListsFnUnused: {:?}, MousePos: {:?}, MouseDown: {:?}, MouseWheel: {:?}, MouseWheelH: {:?}, KeyCtrl: {:?}, KeyShift: {:?}, KeyAlt: {:?}, KeySuper: {:?}, KeysDown: [...], NavInputs: {:?}, WantCaptureMouse: {:?}, WantCaptureKeyboard: {:?}, WantTextInput: {:?}, WantSetMousePos: {:?}, WantSaveIniSettings: {:?}, NavActive: {:?}, NavVisible: {:?}, Framerate: {:?}, MetricsRenderVertices: {:?}, MetricsRenderIndices: {:?}, MetricsRenderWindows: {:?}, MetricsActiveWindows: {:?}, MetricsActiveAllocations: {:?}, MouseDelta: {:?}, KeyMods: {:?}, MousePosPrev: {:?}, MouseClickedPos: {:?}, MouseClickedTime: {:?}, MouseClicked: {:?}, MouseDoubleClicked: {:?}, MouseReleased: {:?}, MouseDownOwned: {:?}, MouseDownWasDoubleClick: {:?}, MouseDownDuration: {:?}, MouseDownDurationPrev: {:?}, MouseDragMaxDistanceAbs: {:?}, MouseDragMaxDistanceSqr: {:?}, KeysDownDuration: [...], KeysDownDurationPrev: [...], NavInputsDownDuration: {:?}, NavInputsDownDurationPrev: {:?}, PenPressure: {:?}, InputQueueSurrogate: {:?}, InputQueueCharacters: {:?} }}" , self . ConfigFlags , self . BackendFlags , self . DisplaySize , self . DeltaTime , self . IniSavingRate , self . IniFilename , self . LogFilename , self . MouseDoubleClickTime , self . MouseDoubleClickMaxDist , self . MouseDragThreshold , self . KeyMap , self . KeyRepeatDelay , self . KeyRepeatRate , self . UserData , self . Fonts , self . FontGlobalScale , self . FontAllowUserScaling , self . FontDefault , self . DisplayFramebufferScale , self . MouseDrawCursor , self . ConfigMacOSXBehaviors , self . ConfigInputTextCursorBlink , self . ConfigWindowsResizeFromEdges , self . ConfigWindowsMoveFromTitleBarOnly , self . ConfigWindowsMemoryCompactTimer , self . BackendPlatformName , self . BackendRendererName , self . BackendPlatformUserData , self . BackendRendererUserData , self . BackendLanguageUserData , self . GetClipboardTextFn , self . SetClipboardTextFn , self . ClipboardUserData , self . ImeSetInputScreenPosFn , self . ImeWindowHandle , self . RenderDrawListsFnUnused , self . MousePos , self . MouseDown , self . MouseWheel , self . MouseWheelH , self . KeyCtrl , self . KeyShift , self . KeyAlt , self . KeySuper , self . NavInputs , self . WantCaptureMouse , self . WantCaptureKeyboard , self . WantTextInput , self . WantSetMousePos , self . WantSaveIniSettings , self . NavActive , self . NavVisible , self . Framerate , self . MetricsRenderVertices , self . MetricsRenderIndices , self . MetricsRenderWindows , self . MetricsActiveWindows , self . MetricsActiveAllocations , self . MouseDelta , self . KeyMods , self . MousePosPrev , self . MouseClickedPos , self . MouseClickedTime , self . MouseClicked , self . MouseDoubleClicked , self . MouseReleased , self . MouseDownOwned , self . MouseDownWasDoubleClick , self . MouseDownDuration , self . MouseDownDurationPrev , self . MouseDragMaxDistanceAbs , self . MouseDragMaxDistanceSqr , self . NavInputsDownDuration , self . NavInputsDownDurationPrev , self . PenPressure , self . InputQueueSurrogate , self . InputQueueCharacters)
|
||||
write ! (f , "ImGuiIO {{ ConfigFlags: {:?}, BackendFlags: {:?}, DisplaySize: {:?}, DeltaTime: {:?}, IniSavingRate: {:?}, IniFilename: {:?}, LogFilename: {:?}, MouseDoubleClickTime: {:?}, MouseDoubleClickMaxDist: {:?}, MouseDragThreshold: {:?}, KeyMap: {:?}, KeyRepeatDelay: {:?}, KeyRepeatRate: {:?}, UserData: {:?}, Fonts: {:?}, FontGlobalScale: {:?}, FontAllowUserScaling: {:?}, FontDefault: {:?}, DisplayFramebufferScale: {:?}, MouseDrawCursor: {:?}, ConfigMacOSXBehaviors: {:?}, ConfigInputTextCursorBlink: {:?}, ConfigDragClickToInputText: {:?}, ConfigWindowsResizeFromEdges: {:?}, ConfigWindowsMoveFromTitleBarOnly: {:?}, ConfigMemoryCompactTimer: {:?}, BackendPlatformName: {:?}, BackendRendererName: {:?}, BackendPlatformUserData: {:?}, BackendRendererUserData: {:?}, BackendLanguageUserData: {:?}, GetClipboardTextFn: {:?}, SetClipboardTextFn: {:?}, ClipboardUserData: {:?}, ImeSetInputScreenPosFn: {:?}, ImeWindowHandle: {:?}, MousePos: {:?}, MouseDown: {:?}, MouseWheel: {:?}, MouseWheelH: {:?}, KeyCtrl: {:?}, KeyShift: {:?}, KeyAlt: {:?}, KeySuper: {:?}, KeysDown: [...], NavInputs: {:?}, WantCaptureMouse: {:?}, WantCaptureKeyboard: {:?}, WantTextInput: {:?}, WantSetMousePos: {:?}, WantSaveIniSettings: {:?}, NavActive: {:?}, NavVisible: {:?}, Framerate: {:?}, MetricsRenderVertices: {:?}, MetricsRenderIndices: {:?}, MetricsRenderWindows: {:?}, MetricsActiveWindows: {:?}, MetricsActiveAllocations: {:?}, MouseDelta: {:?}, KeyMods: {:?}, MousePosPrev: {:?}, MouseClickedPos: {:?}, MouseClickedTime: {:?}, MouseClicked: {:?}, MouseDoubleClicked: {:?}, MouseReleased: {:?}, MouseDownOwned: {:?}, MouseDownWasDoubleClick: {:?}, MouseDownDuration: {:?}, MouseDownDurationPrev: {:?}, MouseDragMaxDistanceAbs: {:?}, MouseDragMaxDistanceSqr: {:?}, KeysDownDuration: [...], KeysDownDurationPrev: [...], NavInputsDownDuration: {:?}, NavInputsDownDurationPrev: {:?}, PenPressure: {:?}, InputQueueSurrogate: {:?}, InputQueueCharacters: {:?} }}" , self . ConfigFlags , self . BackendFlags , self . DisplaySize , self . DeltaTime , self . IniSavingRate , self . IniFilename , self . LogFilename , self . MouseDoubleClickTime , self . MouseDoubleClickMaxDist , self . MouseDragThreshold , self . KeyMap , self . KeyRepeatDelay , self . KeyRepeatRate , self . UserData , self . Fonts , self . FontGlobalScale , self . FontAllowUserScaling , self . FontDefault , self . DisplayFramebufferScale , self . MouseDrawCursor , self . ConfigMacOSXBehaviors , self . ConfigInputTextCursorBlink , self . ConfigDragClickToInputText , self . ConfigWindowsResizeFromEdges , self . ConfigWindowsMoveFromTitleBarOnly , self . ConfigMemoryCompactTimer , self . BackendPlatformName , self . BackendRendererName , self . BackendPlatformUserData , self . BackendRendererUserData , self . BackendLanguageUserData , self . GetClipboardTextFn , self . SetClipboardTextFn , self . ClipboardUserData , self . ImeSetInputScreenPosFn , self . ImeWindowHandle , self . MousePos , self . MouseDown , self . MouseWheel , self . MouseWheelH , self . KeyCtrl , self . KeyShift , self . KeyAlt , self . KeySuper , self . NavInputs , self . WantCaptureMouse , self . WantCaptureKeyboard , self . WantTextInput , self . WantSetMousePos , self . WantSaveIniSettings , self . NavActive , self . NavVisible , self . Framerate , self . MetricsRenderVertices , self . MetricsRenderIndices , self . MetricsRenderWindows , self . MetricsActiveWindows , self . MetricsActiveAllocations , self . MouseDelta , self . KeyMods , self . MousePosPrev , self . MouseClickedPos , self . MouseClickedTime , self . MouseClicked , self . MouseDoubleClicked , self . MouseReleased , self . MouseDownOwned , self . MouseDownWasDoubleClick , self . MouseDownDuration , self . MouseDownDurationPrev , self . MouseDragMaxDistanceAbs , self . MouseDragMaxDistanceSqr , self . NavInputsDownDuration , self . NavInputsDownDurationPrev , self . PenPressure , self . InputQueueSurrogate , self . InputQueueCharacters)
|
||||
}
|
||||
}
|
||||
#[repr(C)]
|
||||
@ -947,6 +1035,52 @@ impl ::core::fmt::Debug for ImGuiPayload {
|
||||
}
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
|
||||
pub struct ImGuiTableColumnSortSpecs {
|
||||
pub ColumnUserID: ImGuiID,
|
||||
pub ColumnIndex: ImS16,
|
||||
pub SortOrder: ImS16,
|
||||
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
|
||||
pub __bindgen_padding_0: [u8; 3usize],
|
||||
}
|
||||
impl ImGuiTableColumnSortSpecs {
|
||||
#[inline]
|
||||
pub fn SortDirection(&self) -> ImGuiSortDirection {
|
||||
unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u32) }
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_SortDirection(&mut self, val: ImGuiSortDirection) {
|
||||
unsafe {
|
||||
let val: u32 = ::core::mem::transmute(val);
|
||||
self._bitfield_1.set(0usize, 8u8, val as u64)
|
||||
}
|
||||
}
|
||||
#[inline]
|
||||
pub fn new_bitfield_1(
|
||||
SortDirection: ImGuiSortDirection,
|
||||
) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
|
||||
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
|
||||
Default::default();
|
||||
__bindgen_bitfield_unit.set(0usize, 8u8, {
|
||||
let SortDirection: u32 = unsafe { ::core::mem::transmute(SortDirection) };
|
||||
SortDirection as u64
|
||||
});
|
||||
__bindgen_bitfield_unit
|
||||
}
|
||||
}
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
|
||||
pub struct ImGuiTableSortSpecs {
|
||||
pub Specs: *const ImGuiTableColumnSortSpecs,
|
||||
pub SpecsCount: cty::c_int,
|
||||
pub SpecsDirty: bool,
|
||||
}
|
||||
impl Default for ImGuiTableSortSpecs {
|
||||
fn default() -> Self {
|
||||
unsafe { ::core::mem::zeroed() }
|
||||
}
|
||||
}
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
|
||||
pub struct ImGuiOnceUponAFrame {
|
||||
pub RefFrame: cty::c_int,
|
||||
}
|
||||
@ -1047,6 +1181,7 @@ pub struct ImGuiListClipper {
|
||||
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,
|
||||
}
|
||||
@ -1079,6 +1214,18 @@ pub struct ImDrawVert {
|
||||
pub col: ImU32,
|
||||
}
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy, Clone, PartialEq)]
|
||||
pub struct ImDrawCmdHeader {
|
||||
pub ClipRect: ImVec4,
|
||||
pub TextureId: ImTextureID,
|
||||
pub VtxOffset: cty::c_uint,
|
||||
}
|
||||
impl Default for ImDrawCmdHeader {
|
||||
fn default() -> Self {
|
||||
unsafe { ::core::mem::zeroed() }
|
||||
}
|
||||
}
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
|
||||
pub struct ImDrawChannel {
|
||||
pub _CmdBuffer: ImVector_ImDrawCmd,
|
||||
@ -1125,16 +1272,17 @@ pub struct ImDrawList {
|
||||
pub IdxBuffer: ImVector_ImDrawIdx,
|
||||
pub VtxBuffer: ImVector_ImDrawVert,
|
||||
pub Flags: ImDrawListFlags,
|
||||
pub _VtxCurrentIdx: cty::c_uint,
|
||||
pub _Data: *const ImDrawListSharedData,
|
||||
pub _OwnerName: *const cty::c_char,
|
||||
pub _VtxCurrentIdx: cty::c_uint,
|
||||
pub _VtxWritePtr: *mut ImDrawVert,
|
||||
pub _IdxWritePtr: *mut ImDrawIdx,
|
||||
pub _ClipRectStack: ImVector_ImVec4,
|
||||
pub _TextureIdStack: ImVector_ImTextureID,
|
||||
pub _Path: ImVector_ImVec2,
|
||||
pub _CmdHeader: ImDrawCmd,
|
||||
pub _CmdHeader: ImDrawCmdHeader,
|
||||
pub _Splitter: ImDrawListSplitter,
|
||||
pub _FringeScale: f32,
|
||||
}
|
||||
impl Default for ImDrawList {
|
||||
fn default() -> Self {
|
||||
@ -1387,10 +1535,10 @@ extern "C" {
|
||||
pub fn igShowDemoWindow(p_open: *mut bool);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igShowAboutWindow(p_open: *mut bool);
|
||||
pub fn igShowMetricsWindow(p_open: *mut bool);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igShowMetricsWindow(p_open: *mut bool);
|
||||
pub fn igShowAboutWindow(p_open: *mut bool);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igShowStyleEditor(ref_: *mut ImGuiStyle);
|
||||
@ -1411,10 +1559,10 @@ extern "C" {
|
||||
pub fn igStyleColorsDark(dst: *mut ImGuiStyle);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igStyleColorsClassic(dst: *mut ImGuiStyle);
|
||||
pub fn igStyleColorsLight(dst: *mut ImGuiStyle);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igStyleColorsLight(dst: *mut ImGuiStyle);
|
||||
pub fn igStyleColorsClassic(dst: *mut ImGuiStyle);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igBegin(name: *const cty::c_char, p_open: *mut bool, flags: ImGuiWindowFlags) -> bool;
|
||||
@ -1518,10 +1666,10 @@ extern "C" {
|
||||
pub fn igSetWindowFocusStr(name: *const cty::c_char);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igGetContentRegionMax(pOut: *mut ImVec2);
|
||||
pub fn igGetContentRegionAvail(pOut: *mut ImVec2);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igGetContentRegionAvail(pOut: *mut ImVec2);
|
||||
pub fn igGetContentRegionMax(pOut: *mut ImVec2);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igGetWindowContentRegionMin(pOut: *mut ImVec2);
|
||||
@ -1538,18 +1686,18 @@ extern "C" {
|
||||
extern "C" {
|
||||
pub fn igGetScrollY() -> f32;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igGetScrollMaxX() -> f32;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igGetScrollMaxY() -> f32;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igSetScrollX(scroll_x: f32);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igSetScrollY(scroll_y: f32);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igGetScrollMaxX() -> f32;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igGetScrollMaxY() -> f32;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igSetScrollHereX(center_x_ratio: f32);
|
||||
}
|
||||
@ -1587,25 +1735,16 @@ extern "C" {
|
||||
pub fn igPopStyleVar(count: cty::c_int);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igGetStyleColorVec4(idx: ImGuiCol) -> *const ImVec4;
|
||||
pub fn igPushAllowKeyboardFocus(allow_keyboard_focus: bool);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igGetFont() -> *mut ImFont;
|
||||
pub fn igPopAllowKeyboardFocus();
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igGetFontSize() -> f32;
|
||||
pub fn igPushButtonRepeat(repeat: bool);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igGetFontTexUvWhitePixel(pOut: *mut ImVec2);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igGetColorU32Col(idx: ImGuiCol, alpha_mul: f32) -> ImU32;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igGetColorU32Vec4(col: ImVec4) -> ImU32;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igGetColorU32U32(col: ImU32) -> ImU32;
|
||||
pub fn igPopButtonRepeat();
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igPushItemWidth(item_width: f32);
|
||||
@ -1626,16 +1765,25 @@ extern "C" {
|
||||
pub fn igPopTextWrapPos();
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igPushAllowKeyboardFocus(allow_keyboard_focus: bool);
|
||||
pub fn igGetFont() -> *mut ImFont;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igPopAllowKeyboardFocus();
|
||||
pub fn igGetFontSize() -> f32;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igPushButtonRepeat(repeat: bool);
|
||||
pub fn igGetFontTexUvWhitePixel(pOut: *mut ImVec2);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igPopButtonRepeat();
|
||||
pub fn igGetColorU32Col(idx: ImGuiCol, alpha_mul: f32) -> ImU32;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igGetColorU32Vec4(col: ImVec4) -> ImU32;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igGetColorU32U32(col: ImU32) -> ImU32;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igGetStyleColorVec4(idx: ImGuiCol) -> *const ImVec4;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igSeparator();
|
||||
@ -1795,7 +1943,14 @@ extern "C" {
|
||||
pub fn igCheckbox(label: *const cty::c_char, v: *mut bool) -> bool;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igCheckboxFlags(
|
||||
pub fn igCheckboxFlagsIntPtr(
|
||||
label: *const cty::c_char,
|
||||
flags: *mut cty::c_int,
|
||||
flags_value: cty::c_int,
|
||||
) -> bool;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igCheckboxFlagsUintPtr(
|
||||
label: *const cty::c_char,
|
||||
flags: *mut cty::c_uint,
|
||||
flags_value: cty::c_uint,
|
||||
@ -2364,7 +2519,7 @@ extern "C" {
|
||||
extern "C" {
|
||||
pub fn igCollapsingHeaderBoolPtr(
|
||||
label: *const cty::c_char,
|
||||
p_open: *mut bool,
|
||||
p_visible: *mut bool,
|
||||
flags: ImGuiTreeNodeFlags,
|
||||
) -> bool;
|
||||
}
|
||||
@ -2579,6 +2734,65 @@ extern "C" {
|
||||
extern "C" {
|
||||
pub fn igIsPopupOpen(str_id: *const cty::c_char, flags: ImGuiPopupFlags) -> bool;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igBeginTable(
|
||||
str_id: *const cty::c_char,
|
||||
column: cty::c_int,
|
||||
flags: ImGuiTableFlags,
|
||||
outer_size: ImVec2,
|
||||
inner_width: f32,
|
||||
) -> bool;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igEndTable();
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igTableNextRow(row_flags: ImGuiTableRowFlags, min_row_height: f32);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igTableNextColumn() -> bool;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igTableSetColumnIndex(column_n: cty::c_int) -> bool;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igTableSetupColumn(
|
||||
label: *const cty::c_char,
|
||||
flags: ImGuiTableColumnFlags,
|
||||
init_width_or_weight: f32,
|
||||
user_id: ImU32,
|
||||
);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igTableSetupScrollFreeze(cols: cty::c_int, rows: cty::c_int);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igTableHeadersRow();
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igTableHeader(label: *const cty::c_char);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igTableGetSortSpecs() -> *mut ImGuiTableSortSpecs;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igTableGetColumnCount() -> cty::c_int;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igTableGetColumnIndex() -> cty::c_int;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igTableGetRowIndex() -> cty::c_int;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igTableGetColumnName(column_n: cty::c_int) -> *const cty::c_char;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igTableGetColumnFlags(column_n: cty::c_int) -> ImGuiTableColumnFlags;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igTableSetBgColor(target: ImGuiTableBgTarget, color: ImU32, column_n: cty::c_int);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn igColumns(count: cty::c_int, id: *const cty::c_char, border: bool);
|
||||
}
|
||||
@ -3000,6 +3214,18 @@ extern "C" {
|
||||
extern "C" {
|
||||
pub fn ImGuiPayload_IsDelivery(self_: *mut ImGuiPayload) -> bool;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn ImGuiTableColumnSortSpecs_ImGuiTableColumnSortSpecs() -> *mut ImGuiTableColumnSortSpecs;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn ImGuiTableColumnSortSpecs_destroy(self_: *mut ImGuiTableColumnSortSpecs);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn ImGuiTableSortSpecs_ImGuiTableSortSpecs() -> *mut ImGuiTableSortSpecs;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn ImGuiTableSortSpecs_destroy(self_: *mut ImGuiTableSortSpecs);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn ImGuiOnceUponAFrame_ImGuiOnceUponAFrame() -> *mut ImGuiOnceUponAFrame;
|
||||
}
|
||||
@ -3454,7 +3680,7 @@ extern "C" {
|
||||
);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn ImDrawList_AddBezierCurve(
|
||||
pub fn ImDrawList_AddBezierCubic(
|
||||
self_: *mut ImDrawList,
|
||||
p1: ImVec2,
|
||||
p2: ImVec2,
|
||||
@ -3465,6 +3691,17 @@ extern "C" {
|
||||
num_segments: cty::c_int,
|
||||
);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn ImDrawList_AddBezierQuadratic(
|
||||
self_: *mut ImDrawList,
|
||||
p1: ImVec2,
|
||||
p2: ImVec2,
|
||||
p3: ImVec2,
|
||||
col: ImU32,
|
||||
thickness: f32,
|
||||
num_segments: cty::c_int,
|
||||
);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn ImDrawList_AddImage(
|
||||
self_: *mut ImDrawList,
|
||||
@ -3539,7 +3776,7 @@ extern "C" {
|
||||
);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn ImDrawList_PathBezierCurveTo(
|
||||
pub fn ImDrawList_PathBezierCubicCurveTo(
|
||||
self_: *mut ImDrawList,
|
||||
p2: ImVec2,
|
||||
p3: ImVec2,
|
||||
@ -3547,6 +3784,14 @@ extern "C" {
|
||||
num_segments: cty::c_int,
|
||||
);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn ImDrawList_PathBezierQuadraticCurveTo(
|
||||
self_: *mut ImDrawList,
|
||||
p2: ImVec2,
|
||||
p3: ImVec2,
|
||||
num_segments: cty::c_int,
|
||||
);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn ImDrawList_PathRect(
|
||||
self_: *mut ImDrawList,
|
||||
|
||||
@ -13,11 +13,11 @@ pub use crate::bindings::*;
|
||||
|
||||
impl ImVec2 {
|
||||
#[inline]
|
||||
pub fn new(x: f32, y: f32) -> ImVec2 {
|
||||
pub const fn new(x: f32, y: f32) -> ImVec2 {
|
||||
ImVec2 { x, y }
|
||||
}
|
||||
#[inline]
|
||||
pub fn zero() -> ImVec2 {
|
||||
pub const fn zero() -> ImVec2 {
|
||||
ImVec2 { x: 0.0, y: 0.0 }
|
||||
}
|
||||
}
|
||||
@ -36,27 +36,27 @@ impl From<(f32, f32)> for ImVec2 {
|
||||
}
|
||||
}
|
||||
|
||||
impl Into<[f32; 2]> for ImVec2 {
|
||||
impl From<ImVec2> for [f32; 2] {
|
||||
#[inline]
|
||||
fn into(self) -> [f32; 2] {
|
||||
[self.x, self.y]
|
||||
fn from(v: ImVec2) -> [f32; 2] {
|
||||
[v.x, v.y]
|
||||
}
|
||||
}
|
||||
|
||||
impl Into<(f32, f32)> for ImVec2 {
|
||||
impl From<ImVec2> for (f32, f32) {
|
||||
#[inline]
|
||||
fn into(self) -> (f32, f32) {
|
||||
(self.x, self.y)
|
||||
fn from(v: ImVec2) -> (f32, f32) {
|
||||
(v.x, v.y)
|
||||
}
|
||||
}
|
||||
|
||||
impl ImVec4 {
|
||||
#[inline]
|
||||
pub fn new(x: f32, y: f32, z: f32, w: f32) -> ImVec4 {
|
||||
pub const fn new(x: f32, y: f32, z: f32, w: f32) -> ImVec4 {
|
||||
ImVec4 { x, y, z, w }
|
||||
}
|
||||
#[inline]
|
||||
pub fn zero() -> ImVec4 {
|
||||
pub const fn zero() -> ImVec4 {
|
||||
ImVec4 {
|
||||
x: 0.0,
|
||||
y: 0.0,
|
||||
@ -80,17 +80,17 @@ impl From<(f32, f32, f32, f32)> for ImVec4 {
|
||||
}
|
||||
}
|
||||
|
||||
impl Into<[f32; 4]> for ImVec4 {
|
||||
impl From<ImVec4> for [f32; 4] {
|
||||
#[inline]
|
||||
fn into(self) -> [f32; 4] {
|
||||
[self.x, self.y, self.z, self.w]
|
||||
fn from(v: ImVec4) -> [f32; 4] {
|
||||
[v.x, v.y, v.z, v.w]
|
||||
}
|
||||
}
|
||||
|
||||
impl Into<(f32, f32, f32, f32)> for ImVec4 {
|
||||
impl From<ImVec4> for (f32, f32, f32, f32) {
|
||||
#[inline]
|
||||
fn into(self) -> (f32, f32, f32, f32) {
|
||||
(self.x, self.y, self.z, self.w)
|
||||
fn from(v: ImVec4) -> (f32, f32, f32, f32) {
|
||||
(v.x, v.y, v.z, v.w)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -100,7 +100,9 @@ pub type ImGuiDir = cty::c_int;
|
||||
pub type ImGuiKey = cty::c_int;
|
||||
pub type ImGuiMouseButton = cty::c_int;
|
||||
pub type ImGuiMouseCursor = cty::c_int;
|
||||
pub type ImGuiSortDirection = cty::c_int;
|
||||
pub type ImGuiStyleVar = cty::c_int;
|
||||
pub type ImGuiTableBgTarget = cty::c_int;
|
||||
pub type ImDrawCornerFlags = cty::c_int;
|
||||
pub type ImDrawListFlags = cty::c_int;
|
||||
pub type ImFontAtlasFlags = cty::c_int;
|
||||
@ -119,6 +121,9 @@ pub type ImGuiSelectableFlags = cty::c_int;
|
||||
pub type ImGuiSliderFlags = cty::c_int;
|
||||
pub type ImGuiTabBarFlags = cty::c_int;
|
||||
pub type ImGuiTabItemFlags = cty::c_int;
|
||||
pub type ImGuiTableFlags = cty::c_int;
|
||||
pub type ImGuiTableColumnFlags = cty::c_int;
|
||||
pub type ImGuiTableRowFlags = cty::c_int;
|
||||
pub type ImGuiTreeNodeFlags = cty::c_int;
|
||||
pub type ImGuiWindowFlags = cty::c_int;
|
||||
pub type ImTextureID = *mut cty::c_void;
|
||||
@ -131,6 +136,7 @@ pub type ImGuiSizeCallback =
|
||||
pub type ImWchar16 = cty::c_ushort;
|
||||
pub type ImWchar = ImWchar16;
|
||||
pub type ImU8 = cty::c_uchar;
|
||||
pub type ImS16 = cty::c_short;
|
||||
pub type ImU32 = cty::c_uint;
|
||||
pub type ImDrawCallback = ::core::option::Option<
|
||||
unsafe extern "C" fn(parent_list: *const ImDrawList, cmd: *const ImDrawCmd),
|
||||
@ -477,6 +483,77 @@ pub const ImGuiTabItemFlags_NoReorder: ImGuiTabItemFlags_ = 32;
|
||||
pub const ImGuiTabItemFlags_Leading: ImGuiTabItemFlags_ = 64;
|
||||
pub const ImGuiTabItemFlags_Trailing: ImGuiTabItemFlags_ = 128;
|
||||
pub type ImGuiTabItemFlags_ = cty::c_uint;
|
||||
pub const ImGuiTableFlags_None: ImGuiTableFlags_ = 0;
|
||||
pub const ImGuiTableFlags_Resizable: ImGuiTableFlags_ = 1;
|
||||
pub const ImGuiTableFlags_Reorderable: ImGuiTableFlags_ = 2;
|
||||
pub const ImGuiTableFlags_Hideable: ImGuiTableFlags_ = 4;
|
||||
pub const ImGuiTableFlags_Sortable: ImGuiTableFlags_ = 8;
|
||||
pub const ImGuiTableFlags_NoSavedSettings: ImGuiTableFlags_ = 16;
|
||||
pub const ImGuiTableFlags_ContextMenuInBody: ImGuiTableFlags_ = 32;
|
||||
pub const ImGuiTableFlags_RowBg: ImGuiTableFlags_ = 64;
|
||||
pub const ImGuiTableFlags_BordersInnerH: ImGuiTableFlags_ = 128;
|
||||
pub const ImGuiTableFlags_BordersOuterH: ImGuiTableFlags_ = 256;
|
||||
pub const ImGuiTableFlags_BordersInnerV: ImGuiTableFlags_ = 512;
|
||||
pub const ImGuiTableFlags_BordersOuterV: ImGuiTableFlags_ = 1024;
|
||||
pub const ImGuiTableFlags_BordersH: ImGuiTableFlags_ = 384;
|
||||
pub const ImGuiTableFlags_BordersV: ImGuiTableFlags_ = 1536;
|
||||
pub const ImGuiTableFlags_BordersInner: ImGuiTableFlags_ = 640;
|
||||
pub const ImGuiTableFlags_BordersOuter: ImGuiTableFlags_ = 1280;
|
||||
pub const ImGuiTableFlags_Borders: ImGuiTableFlags_ = 1920;
|
||||
pub const ImGuiTableFlags_NoBordersInBody: ImGuiTableFlags_ = 2048;
|
||||
pub const ImGuiTableFlags_NoBordersInBodyUntilResize: ImGuiTableFlags_ = 4096;
|
||||
pub const ImGuiTableFlags_SizingFixedFit: ImGuiTableFlags_ = 8192;
|
||||
pub const ImGuiTableFlags_SizingFixedSame: ImGuiTableFlags_ = 16384;
|
||||
pub const ImGuiTableFlags_SizingStretchProp: ImGuiTableFlags_ = 24576;
|
||||
pub const ImGuiTableFlags_SizingStretchSame: ImGuiTableFlags_ = 32768;
|
||||
pub const ImGuiTableFlags_NoHostExtendX: ImGuiTableFlags_ = 65536;
|
||||
pub const ImGuiTableFlags_NoHostExtendY: ImGuiTableFlags_ = 131072;
|
||||
pub const ImGuiTableFlags_NoKeepColumnsVisible: ImGuiTableFlags_ = 262144;
|
||||
pub const ImGuiTableFlags_PreciseWidths: ImGuiTableFlags_ = 524288;
|
||||
pub const ImGuiTableFlags_NoClip: ImGuiTableFlags_ = 1048576;
|
||||
pub const ImGuiTableFlags_PadOuterX: ImGuiTableFlags_ = 2097152;
|
||||
pub const ImGuiTableFlags_NoPadOuterX: ImGuiTableFlags_ = 4194304;
|
||||
pub const ImGuiTableFlags_NoPadInnerX: ImGuiTableFlags_ = 8388608;
|
||||
pub const ImGuiTableFlags_ScrollX: ImGuiTableFlags_ = 16777216;
|
||||
pub const ImGuiTableFlags_ScrollY: ImGuiTableFlags_ = 33554432;
|
||||
pub const ImGuiTableFlags_SortMulti: ImGuiTableFlags_ = 67108864;
|
||||
pub const ImGuiTableFlags_SortTristate: ImGuiTableFlags_ = 134217728;
|
||||
pub const ImGuiTableFlags_SizingMask_: ImGuiTableFlags_ = 57344;
|
||||
pub type ImGuiTableFlags_ = cty::c_uint;
|
||||
pub const ImGuiTableColumnFlags_None: ImGuiTableColumnFlags_ = 0;
|
||||
pub const ImGuiTableColumnFlags_DefaultHide: ImGuiTableColumnFlags_ = 1;
|
||||
pub const ImGuiTableColumnFlags_DefaultSort: ImGuiTableColumnFlags_ = 2;
|
||||
pub const ImGuiTableColumnFlags_WidthStretch: ImGuiTableColumnFlags_ = 4;
|
||||
pub const ImGuiTableColumnFlags_WidthFixed: ImGuiTableColumnFlags_ = 8;
|
||||
pub const ImGuiTableColumnFlags_NoResize: ImGuiTableColumnFlags_ = 16;
|
||||
pub const ImGuiTableColumnFlags_NoReorder: ImGuiTableColumnFlags_ = 32;
|
||||
pub const ImGuiTableColumnFlags_NoHide: ImGuiTableColumnFlags_ = 64;
|
||||
pub const ImGuiTableColumnFlags_NoClip: ImGuiTableColumnFlags_ = 128;
|
||||
pub const ImGuiTableColumnFlags_NoSort: ImGuiTableColumnFlags_ = 256;
|
||||
pub const ImGuiTableColumnFlags_NoSortAscending: ImGuiTableColumnFlags_ = 512;
|
||||
pub const ImGuiTableColumnFlags_NoSortDescending: ImGuiTableColumnFlags_ = 1024;
|
||||
pub const ImGuiTableColumnFlags_NoHeaderWidth: ImGuiTableColumnFlags_ = 2048;
|
||||
pub const ImGuiTableColumnFlags_PreferSortAscending: ImGuiTableColumnFlags_ = 4096;
|
||||
pub const ImGuiTableColumnFlags_PreferSortDescending: ImGuiTableColumnFlags_ = 8192;
|
||||
pub const ImGuiTableColumnFlags_IndentEnable: ImGuiTableColumnFlags_ = 16384;
|
||||
pub const ImGuiTableColumnFlags_IndentDisable: ImGuiTableColumnFlags_ = 32768;
|
||||
pub const ImGuiTableColumnFlags_IsEnabled: ImGuiTableColumnFlags_ = 1048576;
|
||||
pub const ImGuiTableColumnFlags_IsVisible: ImGuiTableColumnFlags_ = 2097152;
|
||||
pub const ImGuiTableColumnFlags_IsSorted: ImGuiTableColumnFlags_ = 4194304;
|
||||
pub const ImGuiTableColumnFlags_IsHovered: ImGuiTableColumnFlags_ = 8388608;
|
||||
pub const ImGuiTableColumnFlags_WidthMask_: ImGuiTableColumnFlags_ = 12;
|
||||
pub const ImGuiTableColumnFlags_IndentMask_: ImGuiTableColumnFlags_ = 49152;
|
||||
pub const ImGuiTableColumnFlags_StatusMask_: ImGuiTableColumnFlags_ = 15728640;
|
||||
pub const ImGuiTableColumnFlags_NoDirectResize_: ImGuiTableColumnFlags_ = 1073741824;
|
||||
pub type ImGuiTableColumnFlags_ = cty::c_uint;
|
||||
pub const ImGuiTableRowFlags_None: ImGuiTableRowFlags_ = 0;
|
||||
pub const ImGuiTableRowFlags_Headers: ImGuiTableRowFlags_ = 1;
|
||||
pub type ImGuiTableRowFlags_ = cty::c_uint;
|
||||
pub const ImGuiTableBgTarget_None: ImGuiTableBgTarget_ = 0;
|
||||
pub const ImGuiTableBgTarget_RowBg0: ImGuiTableBgTarget_ = 1;
|
||||
pub const ImGuiTableBgTarget_RowBg1: ImGuiTableBgTarget_ = 2;
|
||||
pub const ImGuiTableBgTarget_CellBg: ImGuiTableBgTarget_ = 3;
|
||||
pub type ImGuiTableBgTarget_ = cty::c_uint;
|
||||
pub const ImGuiFocusedFlags_None: ImGuiFocusedFlags_ = 0;
|
||||
pub const ImGuiFocusedFlags_ChildWindows: ImGuiFocusedFlags_ = 1;
|
||||
pub const ImGuiFocusedFlags_RootWindow: ImGuiFocusedFlags_ = 2;
|
||||
@ -525,6 +602,10 @@ pub const ImGuiDir_Up: ImGuiDir_ = 2;
|
||||
pub const ImGuiDir_Down: ImGuiDir_ = 3;
|
||||
pub const ImGuiDir_COUNT: ImGuiDir_ = 4;
|
||||
pub type ImGuiDir_ = cty::c_int;
|
||||
pub const ImGuiSortDirection_None: ImGuiSortDirection_ = 0;
|
||||
pub const ImGuiSortDirection_Ascending: ImGuiSortDirection_ = 1;
|
||||
pub const ImGuiSortDirection_Descending: ImGuiSortDirection_ = 2;
|
||||
pub type ImGuiSortDirection_ = cty::c_uint;
|
||||
pub const ImGuiKey_Tab: ImGuiKey_ = 0;
|
||||
pub const ImGuiKey_LeftArrow: ImGuiKey_ = 1;
|
||||
pub const ImGuiKey_RightArrow: ImGuiKey_ = 2;
|
||||
@ -637,13 +718,18 @@ pub const ImGuiCol_PlotLines: ImGuiCol_ = 38;
|
||||
pub const ImGuiCol_PlotLinesHovered: ImGuiCol_ = 39;
|
||||
pub const ImGuiCol_PlotHistogram: ImGuiCol_ = 40;
|
||||
pub const ImGuiCol_PlotHistogramHovered: ImGuiCol_ = 41;
|
||||
pub const ImGuiCol_TextSelectedBg: ImGuiCol_ = 42;
|
||||
pub const ImGuiCol_DragDropTarget: ImGuiCol_ = 43;
|
||||
pub const ImGuiCol_NavHighlight: ImGuiCol_ = 44;
|
||||
pub const ImGuiCol_NavWindowingHighlight: ImGuiCol_ = 45;
|
||||
pub const ImGuiCol_NavWindowingDimBg: ImGuiCol_ = 46;
|
||||
pub const ImGuiCol_ModalWindowDimBg: ImGuiCol_ = 47;
|
||||
pub const ImGuiCol_COUNT: ImGuiCol_ = 48;
|
||||
pub const ImGuiCol_TableHeaderBg: ImGuiCol_ = 42;
|
||||
pub const ImGuiCol_TableBorderStrong: ImGuiCol_ = 43;
|
||||
pub const ImGuiCol_TableBorderLight: ImGuiCol_ = 44;
|
||||
pub const ImGuiCol_TableRowBg: ImGuiCol_ = 45;
|
||||
pub const ImGuiCol_TableRowBgAlt: ImGuiCol_ = 46;
|
||||
pub const ImGuiCol_TextSelectedBg: ImGuiCol_ = 47;
|
||||
pub const ImGuiCol_DragDropTarget: ImGuiCol_ = 48;
|
||||
pub const ImGuiCol_NavHighlight: ImGuiCol_ = 49;
|
||||
pub const ImGuiCol_NavWindowingHighlight: ImGuiCol_ = 50;
|
||||
pub const ImGuiCol_NavWindowingDimBg: ImGuiCol_ = 51;
|
||||
pub const ImGuiCol_ModalWindowDimBg: ImGuiCol_ = 52;
|
||||
pub const ImGuiCol_COUNT: ImGuiCol_ = 53;
|
||||
pub type ImGuiCol_ = cty::c_uint;
|
||||
pub const ImGuiStyleVar_Alpha: ImGuiStyleVar_ = 0;
|
||||
pub const ImGuiStyleVar_WindowPadding: ImGuiStyleVar_ = 1;
|
||||
@ -661,14 +747,15 @@ pub const ImGuiStyleVar_FrameBorderSize: ImGuiStyleVar_ = 12;
|
||||
pub const ImGuiStyleVar_ItemSpacing: ImGuiStyleVar_ = 13;
|
||||
pub const ImGuiStyleVar_ItemInnerSpacing: ImGuiStyleVar_ = 14;
|
||||
pub const ImGuiStyleVar_IndentSpacing: ImGuiStyleVar_ = 15;
|
||||
pub const ImGuiStyleVar_ScrollbarSize: ImGuiStyleVar_ = 16;
|
||||
pub const ImGuiStyleVar_ScrollbarRounding: ImGuiStyleVar_ = 17;
|
||||
pub const ImGuiStyleVar_GrabMinSize: ImGuiStyleVar_ = 18;
|
||||
pub const ImGuiStyleVar_GrabRounding: ImGuiStyleVar_ = 19;
|
||||
pub const ImGuiStyleVar_TabRounding: ImGuiStyleVar_ = 20;
|
||||
pub const ImGuiStyleVar_ButtonTextAlign: ImGuiStyleVar_ = 21;
|
||||
pub const ImGuiStyleVar_SelectableTextAlign: ImGuiStyleVar_ = 22;
|
||||
pub const ImGuiStyleVar_COUNT: ImGuiStyleVar_ = 23;
|
||||
pub const ImGuiStyleVar_CellPadding: ImGuiStyleVar_ = 16;
|
||||
pub const ImGuiStyleVar_ScrollbarSize: ImGuiStyleVar_ = 17;
|
||||
pub const ImGuiStyleVar_ScrollbarRounding: ImGuiStyleVar_ = 18;
|
||||
pub const ImGuiStyleVar_GrabMinSize: ImGuiStyleVar_ = 19;
|
||||
pub const ImGuiStyleVar_GrabRounding: ImGuiStyleVar_ = 20;
|
||||
pub const ImGuiStyleVar_TabRounding: ImGuiStyleVar_ = 21;
|
||||
pub const ImGuiStyleVar_ButtonTextAlign: ImGuiStyleVar_ = 22;
|
||||
pub const ImGuiStyleVar_SelectableTextAlign: ImGuiStyleVar_ = 23;
|
||||
pub const ImGuiStyleVar_COUNT: ImGuiStyleVar_ = 24;
|
||||
pub type ImGuiStyleVar_ = cty::c_uint;
|
||||
pub const ImGuiButtonFlags_None: ImGuiButtonFlags_ = 0;
|
||||
pub const ImGuiButtonFlags_MouseButtonLeft: ImGuiButtonFlags_ = 1;
|
||||
@ -756,6 +843,7 @@ pub struct ImGuiStyle {
|
||||
pub FrameBorderSize: f32,
|
||||
pub ItemSpacing: ImVec2,
|
||||
pub ItemInnerSpacing: ImVec2,
|
||||
pub CellPadding: ImVec2,
|
||||
pub TouchExtraPadding: ImVec2,
|
||||
pub IndentSpacing: f32,
|
||||
pub ColumnsMinSpacing: f32,
|
||||
@ -778,7 +866,7 @@ pub struct ImGuiStyle {
|
||||
pub AntiAliasedFill: bool,
|
||||
pub CurveTessellationTol: f32,
|
||||
pub CircleSegmentMaxError: f32,
|
||||
pub Colors: [ImVec4; 48usize],
|
||||
pub Colors: [ImVec4; 53usize],
|
||||
}
|
||||
impl Default for ImGuiStyle {
|
||||
fn default() -> Self {
|
||||
@ -787,7 +875,7 @@ impl Default for ImGuiStyle {
|
||||
}
|
||||
impl ::core::fmt::Debug for ImGuiStyle {
|
||||
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
|
||||
write ! (f , "ImGuiStyle {{ Alpha: {:?}, WindowPadding: {:?}, WindowRounding: {:?}, WindowBorderSize: {:?}, WindowMinSize: {:?}, WindowTitleAlign: {:?}, WindowMenuButtonPosition: {:?}, ChildRounding: {:?}, ChildBorderSize: {:?}, PopupRounding: {:?}, PopupBorderSize: {:?}, FramePadding: {:?}, FrameRounding: {:?}, FrameBorderSize: {:?}, ItemSpacing: {:?}, ItemInnerSpacing: {:?}, TouchExtraPadding: {:?}, IndentSpacing: {:?}, ColumnsMinSpacing: {:?}, ScrollbarSize: {:?}, ScrollbarRounding: {:?}, GrabMinSize: {:?}, GrabRounding: {:?}, LogSliderDeadzone: {:?}, TabRounding: {:?}, TabBorderSize: {:?}, TabMinWidthForCloseButton: {:?}, ColorButtonPosition: {:?}, ButtonTextAlign: {:?}, SelectableTextAlign: {:?}, DisplayWindowPadding: {:?}, DisplaySafeAreaPadding: {:?}, MouseCursorScale: {:?}, AntiAliasedLines: {:?}, AntiAliasedLinesUseTex: {:?}, AntiAliasedFill: {:?}, CurveTessellationTol: {:?}, CircleSegmentMaxError: {:?}, Colors: [...] }}" , self . Alpha , self . WindowPadding , self . WindowRounding , self . WindowBorderSize , self . WindowMinSize , self . WindowTitleAlign , self . WindowMenuButtonPosition , self . ChildRounding , self . ChildBorderSize , self . PopupRounding , self . PopupBorderSize , self . FramePadding , self . FrameRounding , self . FrameBorderSize , self . ItemSpacing , self . ItemInnerSpacing , self . TouchExtraPadding , self . IndentSpacing , self . ColumnsMinSpacing , self . ScrollbarSize , self . ScrollbarRounding , self . GrabMinSize , self . GrabRounding , self . LogSliderDeadzone , self . TabRounding , self . TabBorderSize , self . TabMinWidthForCloseButton , self . ColorButtonPosition , self . ButtonTextAlign , self . SelectableTextAlign , self . DisplayWindowPadding , self . DisplaySafeAreaPadding , self . MouseCursorScale , self . AntiAliasedLines , self . AntiAliasedLinesUseTex , self . AntiAliasedFill , self . CurveTessellationTol , self . CircleSegmentMaxError)
|
||||
write ! (f , "ImGuiStyle {{ Alpha: {:?}, WindowPadding: {:?}, WindowRounding: {:?}, WindowBorderSize: {:?}, WindowMinSize: {:?}, WindowTitleAlign: {:?}, WindowMenuButtonPosition: {:?}, ChildRounding: {:?}, ChildBorderSize: {:?}, PopupRounding: {:?}, PopupBorderSize: {:?}, FramePadding: {:?}, FrameRounding: {:?}, FrameBorderSize: {:?}, ItemSpacing: {:?}, ItemInnerSpacing: {:?}, CellPadding: {:?}, TouchExtraPadding: {:?}, IndentSpacing: {:?}, ColumnsMinSpacing: {:?}, ScrollbarSize: {:?}, ScrollbarRounding: {:?}, GrabMinSize: {:?}, GrabRounding: {:?}, LogSliderDeadzone: {:?}, TabRounding: {:?}, TabBorderSize: {:?}, TabMinWidthForCloseButton: {:?}, ColorButtonPosition: {:?}, ButtonTextAlign: {:?}, SelectableTextAlign: {:?}, DisplayWindowPadding: {:?}, DisplaySafeAreaPadding: {:?}, MouseCursorScale: {:?}, AntiAliasedLines: {:?}, AntiAliasedLinesUseTex: {:?}, AntiAliasedFill: {:?}, CurveTessellationTol: {:?}, CircleSegmentMaxError: {:?}, Colors: [...] }}" , self . Alpha , self . WindowPadding , self . WindowRounding , self . WindowBorderSize , self . WindowMinSize , self . WindowTitleAlign , self . WindowMenuButtonPosition , self . ChildRounding , self . ChildBorderSize , self . PopupRounding , self . PopupBorderSize , self . FramePadding , self . FrameRounding , self . FrameBorderSize , self . ItemSpacing , self . ItemInnerSpacing , self . CellPadding , self . TouchExtraPadding , self . IndentSpacing , self . ColumnsMinSpacing , self . ScrollbarSize , self . ScrollbarRounding , self . GrabMinSize , self . GrabRounding , self . LogSliderDeadzone , self . TabRounding , self . TabBorderSize , self . TabMinWidthForCloseButton , self . ColorButtonPosition , self . ButtonTextAlign , self . SelectableTextAlign , self . DisplayWindowPadding , self . DisplaySafeAreaPadding , self . MouseCursorScale , self . AntiAliasedLines , self . AntiAliasedLinesUseTex , self . AntiAliasedFill , self . CurveTessellationTol , self . CircleSegmentMaxError)
|
||||
}
|
||||
}
|
||||
#[repr(C)]
|
||||
@ -815,9 +903,10 @@ pub struct ImGuiIO {
|
||||
pub MouseDrawCursor: bool,
|
||||
pub ConfigMacOSXBehaviors: bool,
|
||||
pub ConfigInputTextCursorBlink: bool,
|
||||
pub ConfigDragClickToInputText: bool,
|
||||
pub ConfigWindowsResizeFromEdges: bool,
|
||||
pub ConfigWindowsMoveFromTitleBarOnly: bool,
|
||||
pub ConfigWindowsMemoryCompactTimer: f32,
|
||||
pub ConfigMemoryCompactTimer: f32,
|
||||
pub BackendPlatformName: *const cty::c_char,
|
||||
pub BackendRendererName: *const cty::c_char,
|
||||
pub BackendPlatformUserData: *mut cty::c_void,
|
||||
@ -833,7 +922,6 @@ pub struct ImGuiIO {
|
||||
pub ImeSetInputScreenPosFn:
|
||||
::core::option::Option<unsafe extern "C" fn(x: cty::c_int, y: cty::c_int)>,
|
||||
pub ImeWindowHandle: *mut cty::c_void,
|
||||
pub RenderDrawListsFnUnused: *mut cty::c_void,
|
||||
pub MousePos: ImVec2,
|
||||
pub MouseDown: [bool; 5usize],
|
||||
pub MouseWheel: f32,
|
||||
@ -886,7 +974,7 @@ impl Default for ImGuiIO {
|
||||
}
|
||||
impl ::core::fmt::Debug for ImGuiIO {
|
||||
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
|
||||
write ! (f , "ImGuiIO {{ ConfigFlags: {:?}, BackendFlags: {:?}, DisplaySize: {:?}, DeltaTime: {:?}, IniSavingRate: {:?}, IniFilename: {:?}, LogFilename: {:?}, MouseDoubleClickTime: {:?}, MouseDoubleClickMaxDist: {:?}, MouseDragThreshold: {:?}, KeyMap: {:?}, KeyRepeatDelay: {:?}, KeyRepeatRate: {:?}, UserData: {:?}, Fonts: {:?}, FontGlobalScale: {:?}, FontAllowUserScaling: {:?}, FontDefault: {:?}, DisplayFramebufferScale: {:?}, MouseDrawCursor: {:?}, ConfigMacOSXBehaviors: {:?}, ConfigInputTextCursorBlink: {:?}, ConfigWindowsResizeFromEdges: {:?}, ConfigWindowsMoveFromTitleBarOnly: {:?}, ConfigWindowsMemoryCompactTimer: {:?}, BackendPlatformName: {:?}, BackendRendererName: {:?}, BackendPlatformUserData: {:?}, BackendRendererUserData: {:?}, BackendLanguageUserData: {:?}, GetClipboardTextFn: {:?}, SetClipboardTextFn: {:?}, ClipboardUserData: {:?}, ImeSetInputScreenPosFn: {:?}, ImeWindowHandle: {:?}, RenderDrawListsFnUnused: {:?}, MousePos: {:?}, MouseDown: {:?}, MouseWheel: {:?}, MouseWheelH: {:?}, KeyCtrl: {:?}, KeyShift: {:?}, KeyAlt: {:?}, KeySuper: {:?}, KeysDown: [...], NavInputs: {:?}, WantCaptureMouse: {:?}, WantCaptureKeyboard: {:?}, WantTextInput: {:?}, WantSetMousePos: {:?}, WantSaveIniSettings: {:?}, NavActive: {:?}, NavVisible: {:?}, Framerate: {:?}, MetricsRenderVertices: {:?}, MetricsRenderIndices: {:?}, MetricsRenderWindows: {:?}, MetricsActiveWindows: {:?}, MetricsActiveAllocations: {:?}, MouseDelta: {:?}, KeyMods: {:?}, MousePosPrev: {:?}, MouseClickedPos: {:?}, MouseClickedTime: {:?}, MouseClicked: {:?}, MouseDoubleClicked: {:?}, MouseReleased: {:?}, MouseDownOwned: {:?}, MouseDownWasDoubleClick: {:?}, MouseDownDuration: {:?}, MouseDownDurationPrev: {:?}, MouseDragMaxDistanceAbs: {:?}, MouseDragMaxDistanceSqr: {:?}, KeysDownDuration: [...], KeysDownDurationPrev: [...], NavInputsDownDuration: {:?}, NavInputsDownDurationPrev: {:?}, PenPressure: {:?}, InputQueueSurrogate: {:?}, InputQueueCharacters: {:?} }}" , self . ConfigFlags , self . BackendFlags , self . DisplaySize , self . DeltaTime , self . IniSavingRate , self . IniFilename , self . LogFilename , self . MouseDoubleClickTime , self . MouseDoubleClickMaxDist , self . MouseDragThreshold , self . KeyMap , self . KeyRepeatDelay , self . KeyRepeatRate , self . UserData , self . Fonts , self . FontGlobalScale , self . FontAllowUserScaling , self . FontDefault , self . DisplayFramebufferScale , self . MouseDrawCursor , self . ConfigMacOSXBehaviors , self . ConfigInputTextCursorBlink , self . ConfigWindowsResizeFromEdges , self . ConfigWindowsMoveFromTitleBarOnly , self . ConfigWindowsMemoryCompactTimer , self . BackendPlatformName , self . BackendRendererName , self . BackendPlatformUserData , self . BackendRendererUserData , self . BackendLanguageUserData , self . GetClipboardTextFn , self . SetClipboardTextFn , self . ClipboardUserData , self . ImeSetInputScreenPosFn , self . ImeWindowHandle , self . RenderDrawListsFnUnused , self . MousePos , self . MouseDown , self . MouseWheel , self . MouseWheelH , self . KeyCtrl , self . KeyShift , self . KeyAlt , self . KeySuper , self . NavInputs , self . WantCaptureMouse , self . WantCaptureKeyboard , self . WantTextInput , self . WantSetMousePos , self . WantSaveIniSettings , self . NavActive , self . NavVisible , self . Framerate , self . MetricsRenderVertices , self . MetricsRenderIndices , self . MetricsRenderWindows , self . MetricsActiveWindows , self . MetricsActiveAllocations , self . MouseDelta , self . KeyMods , self . MousePosPrev , self . MouseClickedPos , self . MouseClickedTime , self . MouseClicked , self . MouseDoubleClicked , self . MouseReleased , self . MouseDownOwned , self . MouseDownWasDoubleClick , self . MouseDownDuration , self . MouseDownDurationPrev , self . MouseDragMaxDistanceAbs , self . MouseDragMaxDistanceSqr , self . NavInputsDownDuration , self . NavInputsDownDurationPrev , self . PenPressure , self . InputQueueSurrogate , self . InputQueueCharacters)
|
||||
write ! (f , "ImGuiIO {{ ConfigFlags: {:?}, BackendFlags: {:?}, DisplaySize: {:?}, DeltaTime: {:?}, IniSavingRate: {:?}, IniFilename: {:?}, LogFilename: {:?}, MouseDoubleClickTime: {:?}, MouseDoubleClickMaxDist: {:?}, MouseDragThreshold: {:?}, KeyMap: {:?}, KeyRepeatDelay: {:?}, KeyRepeatRate: {:?}, UserData: {:?}, Fonts: {:?}, FontGlobalScale: {:?}, FontAllowUserScaling: {:?}, FontDefault: {:?}, DisplayFramebufferScale: {:?}, MouseDrawCursor: {:?}, ConfigMacOSXBehaviors: {:?}, ConfigInputTextCursorBlink: {:?}, ConfigDragClickToInputText: {:?}, ConfigWindowsResizeFromEdges: {:?}, ConfigWindowsMoveFromTitleBarOnly: {:?}, ConfigMemoryCompactTimer: {:?}, BackendPlatformName: {:?}, BackendRendererName: {:?}, BackendPlatformUserData: {:?}, BackendRendererUserData: {:?}, BackendLanguageUserData: {:?}, GetClipboardTextFn: {:?}, SetClipboardTextFn: {:?}, ClipboardUserData: {:?}, ImeSetInputScreenPosFn: {:?}, ImeWindowHandle: {:?}, MousePos: {:?}, MouseDown: {:?}, MouseWheel: {:?}, MouseWheelH: {:?}, KeyCtrl: {:?}, KeyShift: {:?}, KeyAlt: {:?}, KeySuper: {:?}, KeysDown: [...], NavInputs: {:?}, WantCaptureMouse: {:?}, WantCaptureKeyboard: {:?}, WantTextInput: {:?}, WantSetMousePos: {:?}, WantSaveIniSettings: {:?}, NavActive: {:?}, NavVisible: {:?}, Framerate: {:?}, MetricsRenderVertices: {:?}, MetricsRenderIndices: {:?}, MetricsRenderWindows: {:?}, MetricsActiveWindows: {:?}, MetricsActiveAllocations: {:?}, MouseDelta: {:?}, KeyMods: {:?}, MousePosPrev: {:?}, MouseClickedPos: {:?}, MouseClickedTime: {:?}, MouseClicked: {:?}, MouseDoubleClicked: {:?}, MouseReleased: {:?}, MouseDownOwned: {:?}, MouseDownWasDoubleClick: {:?}, MouseDownDuration: {:?}, MouseDownDurationPrev: {:?}, MouseDragMaxDistanceAbs: {:?}, MouseDragMaxDistanceSqr: {:?}, KeysDownDuration: [...], KeysDownDurationPrev: [...], NavInputsDownDuration: {:?}, NavInputsDownDurationPrev: {:?}, PenPressure: {:?}, InputQueueSurrogate: {:?}, InputQueueCharacters: {:?} }}" , self . ConfigFlags , self . BackendFlags , self . DisplaySize , self . DeltaTime , self . IniSavingRate , self . IniFilename , self . LogFilename , self . MouseDoubleClickTime , self . MouseDoubleClickMaxDist , self . MouseDragThreshold , self . KeyMap , self . KeyRepeatDelay , self . KeyRepeatRate , self . UserData , self . Fonts , self . FontGlobalScale , self . FontAllowUserScaling , self . FontDefault , self . DisplayFramebufferScale , self . MouseDrawCursor , self . ConfigMacOSXBehaviors , self . ConfigInputTextCursorBlink , self . ConfigDragClickToInputText , self . ConfigWindowsResizeFromEdges , self . ConfigWindowsMoveFromTitleBarOnly , self . ConfigMemoryCompactTimer , self . BackendPlatformName , self . BackendRendererName , self . BackendPlatformUserData , self . BackendRendererUserData , self . BackendLanguageUserData , self . GetClipboardTextFn , self . SetClipboardTextFn , self . ClipboardUserData , self . ImeSetInputScreenPosFn , self . ImeWindowHandle , self . MousePos , self . MouseDown , self . MouseWheel , self . MouseWheelH , self . KeyCtrl , self . KeyShift , self . KeyAlt , self . KeySuper , self . NavInputs , self . WantCaptureMouse , self . WantCaptureKeyboard , self . WantTextInput , self . WantSetMousePos , self . WantSaveIniSettings , self . NavActive , self . NavVisible , self . Framerate , self . MetricsRenderVertices , self . MetricsRenderIndices , self . MetricsRenderWindows , self . MetricsActiveWindows , self . MetricsActiveAllocations , self . MouseDelta , self . KeyMods , self . MousePosPrev , self . MouseClickedPos , self . MouseClickedTime , self . MouseClicked , self . MouseDoubleClicked , self . MouseReleased , self . MouseDownOwned , self . MouseDownWasDoubleClick , self . MouseDownDuration , self . MouseDownDurationPrev , self . MouseDragMaxDistanceAbs , self . MouseDragMaxDistanceSqr , self . NavInputsDownDuration , self . NavInputsDownDurationPrev , self . PenPressure , self . InputQueueSurrogate , self . InputQueueCharacters)
|
||||
}
|
||||
}
|
||||
#[repr(C)]
|
||||
@ -947,6 +1035,52 @@ impl ::core::fmt::Debug for ImGuiPayload {
|
||||
}
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
|
||||
pub struct ImGuiTableColumnSortSpecs {
|
||||
pub ColumnUserID: ImGuiID,
|
||||
pub ColumnIndex: ImS16,
|
||||
pub SortOrder: ImS16,
|
||||
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
|
||||
pub __bindgen_padding_0: [u8; 3usize],
|
||||
}
|
||||
impl ImGuiTableColumnSortSpecs {
|
||||
#[inline]
|
||||
pub fn SortDirection(&self) -> ImGuiSortDirection {
|
||||
unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u32) }
|
||||
}
|
||||
#[inline]
|
||||
pub fn set_SortDirection(&mut self, val: ImGuiSortDirection) {
|
||||
unsafe {
|
||||
let val: u32 = ::core::mem::transmute(val);
|
||||
self._bitfield_1.set(0usize, 8u8, val as u64)
|
||||
}
|
||||
}
|
||||
#[inline]
|
||||
pub fn new_bitfield_1(
|
||||
SortDirection: ImGuiSortDirection,
|
||||
) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
|
||||
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
|
||||
Default::default();
|
||||
__bindgen_bitfield_unit.set(0usize, 8u8, {
|
||||
let SortDirection: u32 = unsafe { ::core::mem::transmute(SortDirection) };
|
||||
SortDirection as u64
|
||||
});
|
||||
__bindgen_bitfield_unit
|
||||
}
|
||||
}
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
|
||||
pub struct ImGuiTableSortSpecs {
|
||||
pub Specs: *const ImGuiTableColumnSortSpecs,
|
||||
pub SpecsCount: cty::c_int,
|
||||
pub SpecsDirty: bool,
|
||||
}
|
||||
impl Default for ImGuiTableSortSpecs {
|
||||
fn default() -> Self {
|
||||
unsafe { ::core::mem::zeroed() }
|
||||
}
|
||||
}
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
|
||||
pub struct ImGuiOnceUponAFrame {
|
||||
pub RefFrame: cty::c_int,
|
||||
}
|
||||
@ -1047,6 +1181,7 @@ pub struct ImGuiListClipper {
|
||||
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,
|
||||
}
|
||||
@ -1079,6 +1214,18 @@ pub struct ImDrawVert {
|
||||
pub col: ImU32,
|
||||
}
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy, Clone, PartialEq)]
|
||||
pub struct ImDrawCmdHeader {
|
||||
pub ClipRect: ImVec4,
|
||||
pub TextureId: ImTextureID,
|
||||
pub VtxOffset: cty::c_uint,
|
||||
}
|
||||
impl Default for ImDrawCmdHeader {
|
||||
fn default() -> Self {
|
||||
unsafe { ::core::mem::zeroed() }
|
||||
}
|
||||
}
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
|
||||
pub struct ImDrawChannel {
|
||||
pub _CmdBuffer: ImVector_ImDrawCmd,
|
||||
@ -1125,16 +1272,17 @@ pub struct ImDrawList {
|
||||
pub IdxBuffer: ImVector_ImDrawIdx,
|
||||
pub VtxBuffer: ImVector_ImDrawVert,
|
||||
pub Flags: ImDrawListFlags,
|
||||
pub _VtxCurrentIdx: cty::c_uint,
|
||||
pub _Data: *const ImDrawListSharedData,
|
||||
pub _OwnerName: *const cty::c_char,
|
||||
pub _VtxCurrentIdx: cty::c_uint,
|
||||
pub _VtxWritePtr: *mut ImDrawVert,
|
||||
pub _IdxWritePtr: *mut ImDrawIdx,
|
||||
pub _ClipRectStack: ImVector_ImVec4,
|
||||
pub _TextureIdStack: ImVector_ImTextureID,
|
||||
pub _Path: ImVector_ImVec2,
|
||||
pub _CmdHeader: ImDrawCmd,
|
||||
pub _CmdHeader: ImDrawCmdHeader,
|
||||
pub _Splitter: ImDrawListSplitter,
|
||||
pub _FringeScale: f32,
|
||||
}
|
||||
impl Default for ImDrawList {
|
||||
fn default() -> Self {
|
||||
@ -1405,11 +1553,11 @@ extern "C" {
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igShowAboutWindow(p_open: *mut bool);
|
||||
pub fn igShowMetricsWindow(p_open: *mut bool);
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igShowMetricsWindow(p_open: *mut bool);
|
||||
pub fn igShowAboutWindow(p_open: *mut bool);
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
@ -1437,11 +1585,11 @@ extern "C" {
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igStyleColorsClassic(dst: *mut ImGuiStyle);
|
||||
pub fn igStyleColorsLight(dst: *mut ImGuiStyle);
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igStyleColorsLight(dst: *mut ImGuiStyle);
|
||||
pub fn igStyleColorsClassic(dst: *mut ImGuiStyle);
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
@ -1576,11 +1724,11 @@ extern "C" {
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igGetContentRegionMax(pOut: *mut ImVec2);
|
||||
pub fn igGetContentRegionAvail(pOut: *mut ImVec2);
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igGetContentRegionAvail(pOut: *mut ImVec2);
|
||||
pub fn igGetContentRegionMax(pOut: *mut ImVec2);
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
@ -1603,14 +1751,6 @@ extern "C" {
|
||||
pub fn igGetScrollY() -> f32;
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igGetScrollMaxX() -> f32;
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igGetScrollMaxY() -> f32;
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igSetScrollX(scroll_x: f32);
|
||||
}
|
||||
@ -1619,6 +1759,14 @@ extern "C" {
|
||||
pub fn igSetScrollY(scroll_y: f32);
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igGetScrollMaxX() -> f32;
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igGetScrollMaxY() -> f32;
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igSetScrollHereX(center_x_ratio: f32);
|
||||
}
|
||||
@ -1668,31 +1816,19 @@ extern "C" {
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igGetStyleColorVec4(idx: ImGuiCol) -> *const ImVec4;
|
||||
pub fn igPushAllowKeyboardFocus(allow_keyboard_focus: bool);
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igGetFont() -> *mut ImFont;
|
||||
pub fn igPopAllowKeyboardFocus();
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igGetFontSize() -> f32;
|
||||
pub fn igPushButtonRepeat(repeat: bool);
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igGetFontTexUvWhitePixel(pOut: *mut ImVec2);
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igGetColorU32Col(idx: ImGuiCol, alpha_mul: f32) -> ImU32;
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igGetColorU32Vec4(col: ImVec4) -> ImU32;
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igGetColorU32U32(col: ImU32) -> ImU32;
|
||||
pub fn igPopButtonRepeat();
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
@ -1720,19 +1856,31 @@ extern "C" {
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igPushAllowKeyboardFocus(allow_keyboard_focus: bool);
|
||||
pub fn igGetFont() -> *mut ImFont;
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igPopAllowKeyboardFocus();
|
||||
pub fn igGetFontSize() -> f32;
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igPushButtonRepeat(repeat: bool);
|
||||
pub fn igGetFontTexUvWhitePixel(pOut: *mut ImVec2);
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igPopButtonRepeat();
|
||||
pub fn igGetColorU32Col(idx: ImGuiCol, alpha_mul: f32) -> ImU32;
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igGetColorU32Vec4(col: ImVec4) -> ImU32;
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igGetColorU32U32(col: ImU32) -> ImU32;
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igGetStyleColorVec4(idx: ImGuiCol) -> *const ImVec4;
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
@ -1938,7 +2086,15 @@ extern "C" {
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igCheckboxFlags(
|
||||
pub fn igCheckboxFlagsIntPtr(
|
||||
label: *const cty::c_char,
|
||||
flags: *mut cty::c_int,
|
||||
flags_value: cty::c_int,
|
||||
) -> bool;
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igCheckboxFlagsUintPtr(
|
||||
label: *const cty::c_char,
|
||||
flags: *mut cty::c_uint,
|
||||
flags_value: cty::c_uint,
|
||||
@ -2574,7 +2730,7 @@ extern "C" {
|
||||
extern "C" {
|
||||
pub fn igCollapsingHeaderBoolPtr(
|
||||
label: *const cty::c_char,
|
||||
p_open: *mut bool,
|
||||
p_visible: *mut bool,
|
||||
flags: ImGuiTreeNodeFlags,
|
||||
) -> bool;
|
||||
}
|
||||
@ -2827,6 +2983,81 @@ extern "C" {
|
||||
pub fn igIsPopupOpen(str_id: *const cty::c_char, flags: ImGuiPopupFlags) -> bool;
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igBeginTable(
|
||||
str_id: *const cty::c_char,
|
||||
column: cty::c_int,
|
||||
flags: ImGuiTableFlags,
|
||||
outer_size: ImVec2,
|
||||
inner_width: f32,
|
||||
) -> bool;
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igEndTable();
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igTableNextRow(row_flags: ImGuiTableRowFlags, min_row_height: f32);
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igTableNextColumn() -> bool;
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igTableSetColumnIndex(column_n: cty::c_int) -> bool;
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igTableSetupColumn(
|
||||
label: *const cty::c_char,
|
||||
flags: ImGuiTableColumnFlags,
|
||||
init_width_or_weight: f32,
|
||||
user_id: ImU32,
|
||||
);
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igTableSetupScrollFreeze(cols: cty::c_int, rows: cty::c_int);
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igTableHeadersRow();
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igTableHeader(label: *const cty::c_char);
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igTableGetSortSpecs() -> *mut ImGuiTableSortSpecs;
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igTableGetColumnCount() -> cty::c_int;
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igTableGetColumnIndex() -> cty::c_int;
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igTableGetRowIndex() -> cty::c_int;
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igTableGetColumnName(column_n: cty::c_int) -> *const cty::c_char;
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igTableGetColumnFlags(column_n: cty::c_int) -> ImGuiTableColumnFlags;
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igTableSetBgColor(target: ImGuiTableBgTarget, color: ImU32, column_n: cty::c_int);
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn igColumns(count: cty::c_int, id: *const cty::c_char, border: bool);
|
||||
}
|
||||
@ -3366,6 +3597,22 @@ extern "C" {
|
||||
pub fn ImGuiPayload_IsDelivery(self_: *mut ImGuiPayload) -> bool;
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn ImGuiTableColumnSortSpecs_ImGuiTableColumnSortSpecs() -> *mut ImGuiTableColumnSortSpecs;
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn ImGuiTableColumnSortSpecs_destroy(self_: *mut ImGuiTableColumnSortSpecs);
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn ImGuiTableSortSpecs_ImGuiTableSortSpecs() -> *mut ImGuiTableSortSpecs;
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn ImGuiTableSortSpecs_destroy(self_: *mut ImGuiTableSortSpecs);
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn ImGuiOnceUponAFrame_ImGuiOnceUponAFrame() -> *mut ImGuiOnceUponAFrame;
|
||||
}
|
||||
@ -3910,7 +4157,7 @@ extern "C" {
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn ImDrawList_AddBezierCurve(
|
||||
pub fn ImDrawList_AddBezierCubic(
|
||||
self_: *mut ImDrawList,
|
||||
p1: ImVec2,
|
||||
p2: ImVec2,
|
||||
@ -3922,6 +4169,18 @@ extern "C" {
|
||||
);
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn ImDrawList_AddBezierQuadratic(
|
||||
self_: *mut ImDrawList,
|
||||
p1: ImVec2,
|
||||
p2: ImVec2,
|
||||
p3: ImVec2,
|
||||
col: ImU32,
|
||||
thickness: f32,
|
||||
num_segments: cty::c_int,
|
||||
);
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn ImDrawList_AddImage(
|
||||
self_: *mut ImDrawList,
|
||||
@ -4006,7 +4265,7 @@ extern "C" {
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn ImDrawList_PathBezierCurveTo(
|
||||
pub fn ImDrawList_PathBezierCubicCurveTo(
|
||||
self_: *mut ImDrawList,
|
||||
p2: ImVec2,
|
||||
p3: ImVec2,
|
||||
@ -4015,6 +4274,15 @@ extern "C" {
|
||||
);
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn ImDrawList_PathBezierQuadraticCurveTo(
|
||||
self_: *mut ImDrawList,
|
||||
p2: ImVec2,
|
||||
p3: ImVec2,
|
||||
num_segments: cty::c_int,
|
||||
);
|
||||
}
|
||||
#[link(wasm_import_module = "imgui-sys-v0")]
|
||||
extern "C" {
|
||||
pub fn ImDrawList_PathRect(
|
||||
self_: *mut ImDrawList,
|
||||
|
||||
209
imgui-sys/third-party/cimgui.cpp
vendored
209
imgui-sys/third-party/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.79" from Dear ImGui https://github.com/ocornut/imgui
|
||||
//based on imgui.h file version "1.80" from Dear ImGui https://github.com/ocornut/imgui
|
||||
|
||||
#include "./imgui/imgui.h"
|
||||
#ifdef CIMGUI_FREETYPE
|
||||
@ -78,14 +78,14 @@ CIMGUI_API void igShowDemoWindow(bool* p_open)
|
||||
{
|
||||
return ImGui::ShowDemoWindow(p_open);
|
||||
}
|
||||
CIMGUI_API void igShowAboutWindow(bool* p_open)
|
||||
{
|
||||
return ImGui::ShowAboutWindow(p_open);
|
||||
}
|
||||
CIMGUI_API void igShowMetricsWindow(bool* p_open)
|
||||
{
|
||||
return ImGui::ShowMetricsWindow(p_open);
|
||||
}
|
||||
CIMGUI_API void igShowAboutWindow(bool* p_open)
|
||||
{
|
||||
return ImGui::ShowAboutWindow(p_open);
|
||||
}
|
||||
CIMGUI_API void igShowStyleEditor(ImGuiStyle* ref)
|
||||
{
|
||||
return ImGui::ShowStyleEditor(ref);
|
||||
@ -110,14 +110,14 @@ CIMGUI_API void igStyleColorsDark(ImGuiStyle* dst)
|
||||
{
|
||||
return ImGui::StyleColorsDark(dst);
|
||||
}
|
||||
CIMGUI_API void igStyleColorsClassic(ImGuiStyle* dst)
|
||||
{
|
||||
return ImGui::StyleColorsClassic(dst);
|
||||
}
|
||||
CIMGUI_API void igStyleColorsLight(ImGuiStyle* dst)
|
||||
{
|
||||
return ImGui::StyleColorsLight(dst);
|
||||
}
|
||||
CIMGUI_API void igStyleColorsClassic(ImGuiStyle* dst)
|
||||
{
|
||||
return ImGui::StyleColorsClassic(dst);
|
||||
}
|
||||
CIMGUI_API bool igBegin(const char* name,bool* p_open,ImGuiWindowFlags flags)
|
||||
{
|
||||
return ImGui::Begin(name,p_open,flags);
|
||||
@ -238,14 +238,14 @@ CIMGUI_API void igSetWindowFocusStr(const char* name)
|
||||
{
|
||||
return ImGui::SetWindowFocus(name);
|
||||
}
|
||||
CIMGUI_API void igGetContentRegionMax(ImVec2 *pOut)
|
||||
{
|
||||
*pOut = ImGui::GetContentRegionMax();
|
||||
}
|
||||
CIMGUI_API void igGetContentRegionAvail(ImVec2 *pOut)
|
||||
{
|
||||
*pOut = ImGui::GetContentRegionAvail();
|
||||
}
|
||||
CIMGUI_API void igGetContentRegionMax(ImVec2 *pOut)
|
||||
{
|
||||
*pOut = ImGui::GetContentRegionMax();
|
||||
}
|
||||
CIMGUI_API void igGetWindowContentRegionMin(ImVec2 *pOut)
|
||||
{
|
||||
*pOut = ImGui::GetWindowContentRegionMin();
|
||||
@ -266,14 +266,6 @@ CIMGUI_API float igGetScrollY()
|
||||
{
|
||||
return ImGui::GetScrollY();
|
||||
}
|
||||
CIMGUI_API float igGetScrollMaxX()
|
||||
{
|
||||
return ImGui::GetScrollMaxX();
|
||||
}
|
||||
CIMGUI_API float igGetScrollMaxY()
|
||||
{
|
||||
return ImGui::GetScrollMaxY();
|
||||
}
|
||||
CIMGUI_API void igSetScrollX(float scroll_x)
|
||||
{
|
||||
return ImGui::SetScrollX(scroll_x);
|
||||
@ -282,6 +274,14 @@ CIMGUI_API void igSetScrollY(float scroll_y)
|
||||
{
|
||||
return ImGui::SetScrollY(scroll_y);
|
||||
}
|
||||
CIMGUI_API float igGetScrollMaxX()
|
||||
{
|
||||
return ImGui::GetScrollMaxX();
|
||||
}
|
||||
CIMGUI_API float igGetScrollMaxY()
|
||||
{
|
||||
return ImGui::GetScrollMaxY();
|
||||
}
|
||||
CIMGUI_API void igSetScrollHereX(float center_x_ratio)
|
||||
{
|
||||
return ImGui::SetScrollHereX(center_x_ratio);
|
||||
@ -330,33 +330,21 @@ CIMGUI_API void igPopStyleVar(int count)
|
||||
{
|
||||
return ImGui::PopStyleVar(count);
|
||||
}
|
||||
CIMGUI_API const ImVec4* igGetStyleColorVec4(ImGuiCol idx)
|
||||
CIMGUI_API void igPushAllowKeyboardFocus(bool allow_keyboard_focus)
|
||||
{
|
||||
return &ImGui::GetStyleColorVec4(idx);
|
||||
return ImGui::PushAllowKeyboardFocus(allow_keyboard_focus);
|
||||
}
|
||||
CIMGUI_API ImFont* igGetFont()
|
||||
CIMGUI_API void igPopAllowKeyboardFocus()
|
||||
{
|
||||
return ImGui::GetFont();
|
||||
return ImGui::PopAllowKeyboardFocus();
|
||||
}
|
||||
CIMGUI_API float igGetFontSize()
|
||||
CIMGUI_API void igPushButtonRepeat(bool repeat)
|
||||
{
|
||||
return ImGui::GetFontSize();
|
||||
return ImGui::PushButtonRepeat(repeat);
|
||||
}
|
||||
CIMGUI_API void igGetFontTexUvWhitePixel(ImVec2 *pOut)
|
||||
CIMGUI_API void igPopButtonRepeat()
|
||||
{
|
||||
*pOut = ImGui::GetFontTexUvWhitePixel();
|
||||
}
|
||||
CIMGUI_API ImU32 igGetColorU32Col(ImGuiCol idx,float alpha_mul)
|
||||
{
|
||||
return ImGui::GetColorU32(idx,alpha_mul);
|
||||
}
|
||||
CIMGUI_API ImU32 igGetColorU32Vec4(const ImVec4 col)
|
||||
{
|
||||
return ImGui::GetColorU32(col);
|
||||
}
|
||||
CIMGUI_API ImU32 igGetColorU32U32(ImU32 col)
|
||||
{
|
||||
return ImGui::GetColorU32(col);
|
||||
return ImGui::PopButtonRepeat();
|
||||
}
|
||||
CIMGUI_API void igPushItemWidth(float item_width)
|
||||
{
|
||||
@ -382,21 +370,33 @@ CIMGUI_API void igPopTextWrapPos()
|
||||
{
|
||||
return ImGui::PopTextWrapPos();
|
||||
}
|
||||
CIMGUI_API void igPushAllowKeyboardFocus(bool allow_keyboard_focus)
|
||||
CIMGUI_API ImFont* igGetFont()
|
||||
{
|
||||
return ImGui::PushAllowKeyboardFocus(allow_keyboard_focus);
|
||||
return ImGui::GetFont();
|
||||
}
|
||||
CIMGUI_API void igPopAllowKeyboardFocus()
|
||||
CIMGUI_API float igGetFontSize()
|
||||
{
|
||||
return ImGui::PopAllowKeyboardFocus();
|
||||
return ImGui::GetFontSize();
|
||||
}
|
||||
CIMGUI_API void igPushButtonRepeat(bool repeat)
|
||||
CIMGUI_API void igGetFontTexUvWhitePixel(ImVec2 *pOut)
|
||||
{
|
||||
return ImGui::PushButtonRepeat(repeat);
|
||||
*pOut = ImGui::GetFontTexUvWhitePixel();
|
||||
}
|
||||
CIMGUI_API void igPopButtonRepeat()
|
||||
CIMGUI_API ImU32 igGetColorU32Col(ImGuiCol idx,float alpha_mul)
|
||||
{
|
||||
return ImGui::PopButtonRepeat();
|
||||
return ImGui::GetColorU32(idx,alpha_mul);
|
||||
}
|
||||
CIMGUI_API ImU32 igGetColorU32Vec4(const ImVec4 col)
|
||||
{
|
||||
return ImGui::GetColorU32(col);
|
||||
}
|
||||
CIMGUI_API ImU32 igGetColorU32U32(ImU32 col)
|
||||
{
|
||||
return ImGui::GetColorU32(col);
|
||||
}
|
||||
CIMGUI_API const ImVec4* igGetStyleColorVec4(ImGuiCol idx)
|
||||
{
|
||||
return &ImGui::GetStyleColorVec4(idx);
|
||||
}
|
||||
CIMGUI_API void igSeparator()
|
||||
{
|
||||
@ -620,7 +620,11 @@ CIMGUI_API bool igCheckbox(const char* label,bool* v)
|
||||
{
|
||||
return ImGui::Checkbox(label,v);
|
||||
}
|
||||
CIMGUI_API bool igCheckboxFlags(const char* label,unsigned int* flags,unsigned int flags_value)
|
||||
CIMGUI_API bool igCheckboxFlagsIntPtr(const char* label,int* flags,int flags_value)
|
||||
{
|
||||
return ImGui::CheckboxFlags(label,flags,flags_value);
|
||||
}
|
||||
CIMGUI_API bool igCheckboxFlagsUintPtr(const char* label,unsigned int* flags,unsigned int flags_value)
|
||||
{
|
||||
return ImGui::CheckboxFlags(label,flags,flags_value);
|
||||
}
|
||||
@ -920,9 +924,9 @@ CIMGUI_API bool igCollapsingHeaderTreeNodeFlags(const char* label,ImGuiTreeNodeF
|
||||
{
|
||||
return ImGui::CollapsingHeader(label,flags);
|
||||
}
|
||||
CIMGUI_API bool igCollapsingHeaderBoolPtr(const char* label,bool* p_open,ImGuiTreeNodeFlags flags)
|
||||
CIMGUI_API bool igCollapsingHeaderBoolPtr(const char* label,bool* p_visible,ImGuiTreeNodeFlags flags)
|
||||
{
|
||||
return ImGui::CollapsingHeader(label,p_open,flags);
|
||||
return ImGui::CollapsingHeader(label,p_visible,flags);
|
||||
}
|
||||
CIMGUI_API void igSetNextItemOpen(bool is_open,ImGuiCond cond)
|
||||
{
|
||||
@ -1079,6 +1083,70 @@ CIMGUI_API bool igIsPopupOpen(const char* str_id,ImGuiPopupFlags flags)
|
||||
{
|
||||
return ImGui::IsPopupOpen(str_id,flags);
|
||||
}
|
||||
CIMGUI_API bool igBeginTable(const char* str_id,int column,ImGuiTableFlags flags,const ImVec2 outer_size,float inner_width)
|
||||
{
|
||||
return ImGui::BeginTable(str_id,column,flags,outer_size,inner_width);
|
||||
}
|
||||
CIMGUI_API void igEndTable()
|
||||
{
|
||||
return ImGui::EndTable();
|
||||
}
|
||||
CIMGUI_API void igTableNextRow(ImGuiTableRowFlags row_flags,float min_row_height)
|
||||
{
|
||||
return ImGui::TableNextRow(row_flags,min_row_height);
|
||||
}
|
||||
CIMGUI_API bool igTableNextColumn()
|
||||
{
|
||||
return ImGui::TableNextColumn();
|
||||
}
|
||||
CIMGUI_API bool igTableSetColumnIndex(int column_n)
|
||||
{
|
||||
return ImGui::TableSetColumnIndex(column_n);
|
||||
}
|
||||
CIMGUI_API void igTableSetupColumn(const char* label,ImGuiTableColumnFlags flags,float init_width_or_weight,ImU32 user_id)
|
||||
{
|
||||
return ImGui::TableSetupColumn(label,flags,init_width_or_weight,user_id);
|
||||
}
|
||||
CIMGUI_API void igTableSetupScrollFreeze(int cols,int rows)
|
||||
{
|
||||
return ImGui::TableSetupScrollFreeze(cols,rows);
|
||||
}
|
||||
CIMGUI_API void igTableHeadersRow()
|
||||
{
|
||||
return ImGui::TableHeadersRow();
|
||||
}
|
||||
CIMGUI_API void igTableHeader(const char* label)
|
||||
{
|
||||
return ImGui::TableHeader(label);
|
||||
}
|
||||
CIMGUI_API ImGuiTableSortSpecs* igTableGetSortSpecs()
|
||||
{
|
||||
return ImGui::TableGetSortSpecs();
|
||||
}
|
||||
CIMGUI_API int igTableGetColumnCount()
|
||||
{
|
||||
return ImGui::TableGetColumnCount();
|
||||
}
|
||||
CIMGUI_API int igTableGetColumnIndex()
|
||||
{
|
||||
return ImGui::TableGetColumnIndex();
|
||||
}
|
||||
CIMGUI_API int igTableGetRowIndex()
|
||||
{
|
||||
return ImGui::TableGetRowIndex();
|
||||
}
|
||||
CIMGUI_API const char* igTableGetColumnName(int column_n)
|
||||
{
|
||||
return ImGui::TableGetColumnName(column_n);
|
||||
}
|
||||
CIMGUI_API ImGuiTableColumnFlags igTableGetColumnFlags(int column_n)
|
||||
{
|
||||
return ImGui::TableGetColumnFlags(column_n);
|
||||
}
|
||||
CIMGUI_API void igTableSetBgColor(ImGuiTableBgTarget target,ImU32 color,int column_n)
|
||||
{
|
||||
return ImGui::TableSetBgColor(target,color,column_n);
|
||||
}
|
||||
CIMGUI_API void igColumns(int count,const char* id,bool border)
|
||||
{
|
||||
return ImGui::Columns(count,id,border);
|
||||
@ -1551,6 +1619,22 @@ CIMGUI_API bool ImGuiPayload_IsDelivery(ImGuiPayload* self)
|
||||
{
|
||||
return self->IsDelivery();
|
||||
}
|
||||
CIMGUI_API ImGuiTableColumnSortSpecs* ImGuiTableColumnSortSpecs_ImGuiTableColumnSortSpecs(void)
|
||||
{
|
||||
return IM_NEW(ImGuiTableColumnSortSpecs)();
|
||||
}
|
||||
CIMGUI_API void ImGuiTableColumnSortSpecs_destroy(ImGuiTableColumnSortSpecs* self)
|
||||
{
|
||||
IM_DELETE(self);
|
||||
}
|
||||
CIMGUI_API ImGuiTableSortSpecs* ImGuiTableSortSpecs_ImGuiTableSortSpecs(void)
|
||||
{
|
||||
return IM_NEW(ImGuiTableSortSpecs)();
|
||||
}
|
||||
CIMGUI_API void ImGuiTableSortSpecs_destroy(ImGuiTableSortSpecs* self)
|
||||
{
|
||||
IM_DELETE(self);
|
||||
}
|
||||
CIMGUI_API ImGuiOnceUponAFrame* ImGuiOnceUponAFrame_ImGuiOnceUponAFrame(void)
|
||||
{
|
||||
return IM_NEW(ImGuiOnceUponAFrame)();
|
||||
@ -1915,9 +1999,13 @@ CIMGUI_API void ImDrawList_AddConvexPolyFilled(ImDrawList* self,const ImVec2* po
|
||||
{
|
||||
return self->AddConvexPolyFilled(points,num_points,col);
|
||||
}
|
||||
CIMGUI_API void ImDrawList_AddBezierCurve(ImDrawList* self,const ImVec2 p1,const ImVec2 p2,const ImVec2 p3,const ImVec2 p4,ImU32 col,float thickness,int num_segments)
|
||||
CIMGUI_API void ImDrawList_AddBezierCubic(ImDrawList* self,const ImVec2 p1,const ImVec2 p2,const ImVec2 p3,const ImVec2 p4,ImU32 col,float thickness,int num_segments)
|
||||
{
|
||||
return self->AddBezierCurve(p1,p2,p3,p4,col,thickness,num_segments);
|
||||
return self->AddBezierCubic(p1,p2,p3,p4,col,thickness,num_segments);
|
||||
}
|
||||
CIMGUI_API void ImDrawList_AddBezierQuadratic(ImDrawList* self,const ImVec2 p1,const ImVec2 p2,const ImVec2 p3,ImU32 col,float thickness,int num_segments)
|
||||
{
|
||||
return self->AddBezierQuadratic(p1,p2,p3,col,thickness,num_segments);
|
||||
}
|
||||
CIMGUI_API void ImDrawList_AddImage(ImDrawList* self,ImTextureID user_texture_id,const ImVec2 p_min,const ImVec2 p_max,const ImVec2 uv_min,const ImVec2 uv_max,ImU32 col)
|
||||
{
|
||||
@ -1959,9 +2047,13 @@ CIMGUI_API void ImDrawList_PathArcToFast(ImDrawList* self,const ImVec2 center,fl
|
||||
{
|
||||
return self->PathArcToFast(center,radius,a_min_of_12,a_max_of_12);
|
||||
}
|
||||
CIMGUI_API void ImDrawList_PathBezierCurveTo(ImDrawList* self,const ImVec2 p2,const ImVec2 p3,const ImVec2 p4,int num_segments)
|
||||
CIMGUI_API void ImDrawList_PathBezierCubicCurveTo(ImDrawList* self,const ImVec2 p2,const ImVec2 p3,const ImVec2 p4,int num_segments)
|
||||
{
|
||||
return self->PathBezierCurveTo(p2,p3,p4,num_segments);
|
||||
return self->PathBezierCubicCurveTo(p2,p3,p4,num_segments);
|
||||
}
|
||||
CIMGUI_API void ImDrawList_PathBezierQuadraticCurveTo(ImDrawList* self,const ImVec2 p2,const ImVec2 p3,int num_segments)
|
||||
{
|
||||
return self->PathBezierQuadraticCurveTo(p2,p3,num_segments);
|
||||
}
|
||||
CIMGUI_API void ImDrawList_PathRect(ImDrawList* self,const ImVec2 rect_min,const ImVec2 rect_max,float rounding,ImDrawCornerFlags rounding_corners)
|
||||
{
|
||||
@ -2346,6 +2438,11 @@ CIMGUI_API float igGET_FLT_MAX()
|
||||
return FLT_MAX;
|
||||
}
|
||||
|
||||
CIMGUI_API float igGET_FLT_MIN()
|
||||
{
|
||||
return FLT_MIN;
|
||||
}
|
||||
|
||||
|
||||
CIMGUI_API ImVector_ImWchar* ImVector_ImWchar_create()
|
||||
{
|
||||
|
||||
193
imgui-sys/third-party/cimgui.h
vendored
193
imgui-sys/third-party/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.79" from Dear ImGui https://github.com/ocornut/imgui
|
||||
//based on imgui.h file version "1.80" from Dear ImGui https://github.com/ocornut/imgui
|
||||
#ifndef CIMGUI_INCLUDED
|
||||
#define CIMGUI_INCLUDED
|
||||
#include <stdio.h>
|
||||
@ -42,12 +42,15 @@ typedef unsigned __int64 ImU64;
|
||||
|
||||
#ifdef CIMGUI_DEFINE_ENUMS_AND_STRUCTS
|
||||
typedef struct ImFontAtlasCustomRect ImFontAtlasCustomRect;
|
||||
typedef struct ImDrawCmdHeader ImDrawCmdHeader;
|
||||
typedef struct ImGuiStoragePair ImGuiStoragePair;
|
||||
typedef struct ImGuiTextRange ImGuiTextRange;
|
||||
typedef struct ImVec4 ImVec4;
|
||||
typedef struct ImVec2 ImVec2;
|
||||
typedef struct ImGuiTextFilter ImGuiTextFilter;
|
||||
typedef struct ImGuiTextBuffer ImGuiTextBuffer;
|
||||
typedef struct ImGuiTableColumnSortSpecs ImGuiTableColumnSortSpecs;
|
||||
typedef struct ImGuiTableSortSpecs ImGuiTableSortSpecs;
|
||||
typedef struct ImGuiStyle ImGuiStyle;
|
||||
typedef struct ImGuiStorage ImGuiStorage;
|
||||
typedef struct ImGuiSizeCallbackData ImGuiSizeCallbackData;
|
||||
@ -93,6 +96,8 @@ struct ImGuiPayload;
|
||||
struct ImGuiSizeCallbackData;
|
||||
struct ImGuiStorage;
|
||||
struct ImGuiStyle;
|
||||
struct ImGuiTableSortSpecs;
|
||||
struct ImGuiTableColumnSortSpecs;
|
||||
struct ImGuiTextBuffer;
|
||||
struct ImGuiTextFilter;
|
||||
typedef int ImGuiCol;
|
||||
@ -103,7 +108,9 @@ typedef int ImGuiKey;
|
||||
typedef int ImGuiNavInput;
|
||||
typedef int ImGuiMouseButton;
|
||||
typedef int ImGuiMouseCursor;
|
||||
typedef int ImGuiSortDirection;
|
||||
typedef int ImGuiStyleVar;
|
||||
typedef int ImGuiTableBgTarget;
|
||||
typedef int ImDrawCornerFlags;
|
||||
typedef int ImDrawListFlags;
|
||||
typedef int ImFontAtlasFlags;
|
||||
@ -122,6 +129,9 @@ typedef int ImGuiSelectableFlags;
|
||||
typedef int ImGuiSliderFlags;
|
||||
typedef int ImGuiTabBarFlags;
|
||||
typedef int ImGuiTabItemFlags;
|
||||
typedef int ImGuiTableFlags;
|
||||
typedef int ImGuiTableColumnFlags;
|
||||
typedef int ImGuiTableRowFlags;
|
||||
typedef int ImGuiTreeNodeFlags;
|
||||
typedef int ImGuiWindowFlags;
|
||||
typedef void* ImTextureID;
|
||||
@ -299,6 +309,81 @@ typedef enum {
|
||||
ImGuiTabItemFlags_Leading = 1 << 6,
|
||||
ImGuiTabItemFlags_Trailing = 1 << 7
|
||||
}ImGuiTabItemFlags_;
|
||||
typedef enum {
|
||||
ImGuiTableFlags_None = 0,
|
||||
ImGuiTableFlags_Resizable = 1 << 0,
|
||||
ImGuiTableFlags_Reorderable = 1 << 1,
|
||||
ImGuiTableFlags_Hideable = 1 << 2,
|
||||
ImGuiTableFlags_Sortable = 1 << 3,
|
||||
ImGuiTableFlags_NoSavedSettings = 1 << 4,
|
||||
ImGuiTableFlags_ContextMenuInBody = 1 << 5,
|
||||
ImGuiTableFlags_RowBg = 1 << 6,
|
||||
ImGuiTableFlags_BordersInnerH = 1 << 7,
|
||||
ImGuiTableFlags_BordersOuterH = 1 << 8,
|
||||
ImGuiTableFlags_BordersInnerV = 1 << 9,
|
||||
ImGuiTableFlags_BordersOuterV = 1 << 10,
|
||||
ImGuiTableFlags_BordersH = ImGuiTableFlags_BordersInnerH | ImGuiTableFlags_BordersOuterH,
|
||||
ImGuiTableFlags_BordersV = ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersOuterV,
|
||||
ImGuiTableFlags_BordersInner = ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersInnerH,
|
||||
ImGuiTableFlags_BordersOuter = ImGuiTableFlags_BordersOuterV | ImGuiTableFlags_BordersOuterH,
|
||||
ImGuiTableFlags_Borders = ImGuiTableFlags_BordersInner | ImGuiTableFlags_BordersOuter,
|
||||
ImGuiTableFlags_NoBordersInBody = 1 << 11,
|
||||
ImGuiTableFlags_NoBordersInBodyUntilResize = 1 << 12,
|
||||
ImGuiTableFlags_SizingFixedFit = 1 << 13,
|
||||
ImGuiTableFlags_SizingFixedSame = 2 << 13,
|
||||
ImGuiTableFlags_SizingStretchProp = 3 << 13,
|
||||
ImGuiTableFlags_SizingStretchSame = 4 << 13,
|
||||
ImGuiTableFlags_NoHostExtendX = 1 << 16,
|
||||
ImGuiTableFlags_NoHostExtendY = 1 << 17,
|
||||
ImGuiTableFlags_NoKeepColumnsVisible = 1 << 18,
|
||||
ImGuiTableFlags_PreciseWidths = 1 << 19,
|
||||
ImGuiTableFlags_NoClip = 1 << 20,
|
||||
ImGuiTableFlags_PadOuterX = 1 << 21,
|
||||
ImGuiTableFlags_NoPadOuterX = 1 << 22,
|
||||
ImGuiTableFlags_NoPadInnerX = 1 << 23,
|
||||
ImGuiTableFlags_ScrollX = 1 << 24,
|
||||
ImGuiTableFlags_ScrollY = 1 << 25,
|
||||
ImGuiTableFlags_SortMulti = 1 << 26,
|
||||
ImGuiTableFlags_SortTristate = 1 << 27,
|
||||
ImGuiTableFlags_SizingMask_ = ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_SizingFixedSame | ImGuiTableFlags_SizingStretchProp | ImGuiTableFlags_SizingStretchSame
|
||||
}ImGuiTableFlags_;
|
||||
typedef enum {
|
||||
ImGuiTableColumnFlags_None = 0,
|
||||
ImGuiTableColumnFlags_DefaultHide = 1 << 0,
|
||||
ImGuiTableColumnFlags_DefaultSort = 1 << 1,
|
||||
ImGuiTableColumnFlags_WidthStretch = 1 << 2,
|
||||
ImGuiTableColumnFlags_WidthFixed = 1 << 3,
|
||||
ImGuiTableColumnFlags_NoResize = 1 << 4,
|
||||
ImGuiTableColumnFlags_NoReorder = 1 << 5,
|
||||
ImGuiTableColumnFlags_NoHide = 1 << 6,
|
||||
ImGuiTableColumnFlags_NoClip = 1 << 7,
|
||||
ImGuiTableColumnFlags_NoSort = 1 << 8,
|
||||
ImGuiTableColumnFlags_NoSortAscending = 1 << 9,
|
||||
ImGuiTableColumnFlags_NoSortDescending = 1 << 10,
|
||||
ImGuiTableColumnFlags_NoHeaderWidth = 1 << 11,
|
||||
ImGuiTableColumnFlags_PreferSortAscending = 1 << 12,
|
||||
ImGuiTableColumnFlags_PreferSortDescending = 1 << 13,
|
||||
ImGuiTableColumnFlags_IndentEnable = 1 << 14,
|
||||
ImGuiTableColumnFlags_IndentDisable = 1 << 15,
|
||||
ImGuiTableColumnFlags_IsEnabled = 1 << 20,
|
||||
ImGuiTableColumnFlags_IsVisible = 1 << 21,
|
||||
ImGuiTableColumnFlags_IsSorted = 1 << 22,
|
||||
ImGuiTableColumnFlags_IsHovered = 1 << 23,
|
||||
ImGuiTableColumnFlags_WidthMask_ = ImGuiTableColumnFlags_WidthStretch | ImGuiTableColumnFlags_WidthFixed,
|
||||
ImGuiTableColumnFlags_IndentMask_ = ImGuiTableColumnFlags_IndentEnable | ImGuiTableColumnFlags_IndentDisable,
|
||||
ImGuiTableColumnFlags_StatusMask_ = ImGuiTableColumnFlags_IsEnabled | ImGuiTableColumnFlags_IsVisible | ImGuiTableColumnFlags_IsSorted | ImGuiTableColumnFlags_IsHovered,
|
||||
ImGuiTableColumnFlags_NoDirectResize_ = 1 << 30
|
||||
}ImGuiTableColumnFlags_;
|
||||
typedef enum {
|
||||
ImGuiTableRowFlags_None = 0,
|
||||
ImGuiTableRowFlags_Headers = 1 << 0
|
||||
}ImGuiTableRowFlags_;
|
||||
typedef enum {
|
||||
ImGuiTableBgTarget_None = 0,
|
||||
ImGuiTableBgTarget_RowBg0 = 1,
|
||||
ImGuiTableBgTarget_RowBg1 = 2,
|
||||
ImGuiTableBgTarget_CellBg = 3
|
||||
}ImGuiTableBgTarget_;
|
||||
typedef enum {
|
||||
ImGuiFocusedFlags_None = 0,
|
||||
ImGuiFocusedFlags_ChildWindows = 1 << 0,
|
||||
@ -352,6 +437,11 @@ typedef enum {
|
||||
ImGuiDir_Down = 3,
|
||||
ImGuiDir_COUNT
|
||||
}ImGuiDir_;
|
||||
typedef enum {
|
||||
ImGuiSortDirection_None = 0,
|
||||
ImGuiSortDirection_Ascending = 1,
|
||||
ImGuiSortDirection_Descending = 2
|
||||
}ImGuiSortDirection_;
|
||||
typedef enum {
|
||||
ImGuiKey_Tab,
|
||||
ImGuiKey_LeftArrow,
|
||||
@ -470,6 +560,11 @@ typedef enum {
|
||||
ImGuiCol_PlotLinesHovered,
|
||||
ImGuiCol_PlotHistogram,
|
||||
ImGuiCol_PlotHistogramHovered,
|
||||
ImGuiCol_TableHeaderBg,
|
||||
ImGuiCol_TableBorderStrong,
|
||||
ImGuiCol_TableBorderLight,
|
||||
ImGuiCol_TableRowBg,
|
||||
ImGuiCol_TableRowBgAlt,
|
||||
ImGuiCol_TextSelectedBg,
|
||||
ImGuiCol_DragDropTarget,
|
||||
ImGuiCol_NavHighlight,
|
||||
@ -495,6 +590,7 @@ typedef enum {
|
||||
ImGuiStyleVar_ItemSpacing,
|
||||
ImGuiStyleVar_ItemInnerSpacing,
|
||||
ImGuiStyleVar_IndentSpacing,
|
||||
ImGuiStyleVar_CellPadding,
|
||||
ImGuiStyleVar_ScrollbarSize,
|
||||
ImGuiStyleVar_ScrollbarRounding,
|
||||
ImGuiStyleVar_GrabMinSize,
|
||||
@ -595,6 +691,7 @@ struct ImGuiStyle
|
||||
float FrameBorderSize;
|
||||
ImVec2 ItemSpacing;
|
||||
ImVec2 ItemInnerSpacing;
|
||||
ImVec2 CellPadding;
|
||||
ImVec2 TouchExtraPadding;
|
||||
float IndentSpacing;
|
||||
float ColumnsMinSpacing;
|
||||
@ -643,9 +740,10 @@ struct ImGuiIO
|
||||
bool MouseDrawCursor;
|
||||
bool ConfigMacOSXBehaviors;
|
||||
bool ConfigInputTextCursorBlink;
|
||||
bool ConfigDragClickToInputText;
|
||||
bool ConfigWindowsResizeFromEdges;
|
||||
bool ConfigWindowsMoveFromTitleBarOnly;
|
||||
float ConfigWindowsMemoryCompactTimer;
|
||||
float ConfigMemoryCompactTimer;
|
||||
const char* BackendPlatformName;
|
||||
const char* BackendRendererName;
|
||||
void* BackendPlatformUserData;
|
||||
@ -656,7 +754,6 @@ struct ImGuiIO
|
||||
void* ClipboardUserData;
|
||||
void (*ImeSetInputScreenPosFn)(int x, int y);
|
||||
void* ImeWindowHandle;
|
||||
void* RenderDrawListsFnUnused;
|
||||
ImVec2 MousePos;
|
||||
bool MouseDown[5];
|
||||
float MouseWheel;
|
||||
@ -735,6 +832,19 @@ struct ImGuiPayload
|
||||
bool Preview;
|
||||
bool Delivery;
|
||||
};
|
||||
struct ImGuiTableColumnSortSpecs
|
||||
{
|
||||
ImGuiID ColumnUserID;
|
||||
ImS16 ColumnIndex;
|
||||
ImS16 SortOrder;
|
||||
ImGuiSortDirection SortDirection : 8;
|
||||
};
|
||||
struct ImGuiTableSortSpecs
|
||||
{
|
||||
const ImGuiTableColumnSortSpecs* Specs;
|
||||
int SpecsCount;
|
||||
bool SpecsDirty;
|
||||
};
|
||||
struct ImGuiOnceUponAFrame
|
||||
{
|
||||
int RefFrame;
|
||||
@ -769,6 +879,7 @@ struct ImGuiListClipper
|
||||
int DisplayEnd;
|
||||
int ItemsCount;
|
||||
int StepNo;
|
||||
int ItemsFrozen;
|
||||
float ItemsHeight;
|
||||
float StartPosY;
|
||||
};
|
||||
@ -792,6 +903,12 @@ struct ImDrawVert
|
||||
ImVec2 uv;
|
||||
ImU32 col;
|
||||
};
|
||||
struct ImDrawCmdHeader
|
||||
{
|
||||
ImVec4 ClipRect;
|
||||
ImTextureID TextureId;
|
||||
unsigned int VtxOffset;
|
||||
};
|
||||
struct ImDrawChannel
|
||||
{
|
||||
ImVector_ImDrawCmd _CmdBuffer;
|
||||
@ -828,16 +945,17 @@ struct ImDrawList
|
||||
ImVector_ImDrawIdx IdxBuffer;
|
||||
ImVector_ImDrawVert VtxBuffer;
|
||||
ImDrawListFlags Flags;
|
||||
unsigned int _VtxCurrentIdx;
|
||||
const ImDrawListSharedData* _Data;
|
||||
const char* _OwnerName;
|
||||
unsigned int _VtxCurrentIdx;
|
||||
ImDrawVert* _VtxWritePtr;
|
||||
ImDrawIdx* _IdxWritePtr;
|
||||
ImVector_ImVec4 _ClipRectStack;
|
||||
ImVector_ImTextureID _TextureIdStack;
|
||||
ImVector_ImVec2 _Path;
|
||||
ImDrawCmd _CmdHeader;
|
||||
ImDrawCmdHeader _CmdHeader;
|
||||
ImDrawListSplitter _Splitter;
|
||||
float _FringeScale;
|
||||
};
|
||||
struct ImDrawData
|
||||
{
|
||||
@ -982,16 +1100,16 @@ CIMGUI_API void igEndFrame(void);
|
||||
CIMGUI_API void igRender(void);
|
||||
CIMGUI_API ImDrawData* igGetDrawData(void);
|
||||
CIMGUI_API void igShowDemoWindow(bool* p_open);
|
||||
CIMGUI_API void igShowAboutWindow(bool* p_open);
|
||||
CIMGUI_API void igShowMetricsWindow(bool* p_open);
|
||||
CIMGUI_API void igShowAboutWindow(bool* p_open);
|
||||
CIMGUI_API void igShowStyleEditor(ImGuiStyle* ref);
|
||||
CIMGUI_API bool igShowStyleSelector(const char* label);
|
||||
CIMGUI_API void igShowFontSelector(const char* label);
|
||||
CIMGUI_API void igShowUserGuide(void);
|
||||
CIMGUI_API const char* igGetVersion(void);
|
||||
CIMGUI_API void igStyleColorsDark(ImGuiStyle* dst);
|
||||
CIMGUI_API void igStyleColorsClassic(ImGuiStyle* dst);
|
||||
CIMGUI_API void igStyleColorsLight(ImGuiStyle* dst);
|
||||
CIMGUI_API void igStyleColorsClassic(ImGuiStyle* dst);
|
||||
CIMGUI_API bool igBegin(const char* name,bool* p_open,ImGuiWindowFlags flags);
|
||||
CIMGUI_API void igEnd(void);
|
||||
CIMGUI_API bool igBeginChildStr(const char* str_id,const ImVec2 size,bool border,ImGuiWindowFlags flags);
|
||||
@ -1022,17 +1140,17 @@ CIMGUI_API void igSetWindowPosStr(const char* name,const ImVec2 pos,ImGuiCond co
|
||||
CIMGUI_API void igSetWindowSizeStr(const char* name,const ImVec2 size,ImGuiCond cond);
|
||||
CIMGUI_API void igSetWindowCollapsedStr(const char* name,bool collapsed,ImGuiCond cond);
|
||||
CIMGUI_API void igSetWindowFocusStr(const char* name);
|
||||
CIMGUI_API void igGetContentRegionMax(ImVec2 *pOut);
|
||||
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 float igGetScrollMaxX(void);
|
||||
CIMGUI_API float igGetScrollMaxY(void);
|
||||
CIMGUI_API void igSetScrollX(float scroll_x);
|
||||
CIMGUI_API void igSetScrollY(float scroll_y);
|
||||
CIMGUI_API float igGetScrollMaxX(void);
|
||||
CIMGUI_API float igGetScrollMaxY(void);
|
||||
CIMGUI_API void igSetScrollHereX(float center_x_ratio);
|
||||
CIMGUI_API void igSetScrollHereY(float center_y_ratio);
|
||||
CIMGUI_API void igSetScrollFromPosX(float local_x,float center_x_ratio);
|
||||
@ -1045,23 +1163,23 @@ CIMGUI_API void igPopStyleColor(int count);
|
||||
CIMGUI_API void igPushStyleVarFloat(ImGuiStyleVar idx,float val);
|
||||
CIMGUI_API void igPushStyleVarVec2(ImGuiStyleVar idx,const ImVec2 val);
|
||||
CIMGUI_API void igPopStyleVar(int count);
|
||||
CIMGUI_API const ImVec4* igGetStyleColorVec4(ImGuiCol idx);
|
||||
CIMGUI_API ImFont* igGetFont(void);
|
||||
CIMGUI_API float igGetFontSize(void);
|
||||
CIMGUI_API void igGetFontTexUvWhitePixel(ImVec2 *pOut);
|
||||
CIMGUI_API ImU32 igGetColorU32Col(ImGuiCol idx,float alpha_mul);
|
||||
CIMGUI_API ImU32 igGetColorU32Vec4(const ImVec4 col);
|
||||
CIMGUI_API ImU32 igGetColorU32U32(ImU32 col);
|
||||
CIMGUI_API void igPushAllowKeyboardFocus(bool allow_keyboard_focus);
|
||||
CIMGUI_API void igPopAllowKeyboardFocus(void);
|
||||
CIMGUI_API void igPushButtonRepeat(bool repeat);
|
||||
CIMGUI_API void igPopButtonRepeat(void);
|
||||
CIMGUI_API void igPushItemWidth(float item_width);
|
||||
CIMGUI_API void igPopItemWidth(void);
|
||||
CIMGUI_API void igSetNextItemWidth(float item_width);
|
||||
CIMGUI_API float igCalcItemWidth(void);
|
||||
CIMGUI_API void igPushTextWrapPos(float wrap_local_pos_x);
|
||||
CIMGUI_API void igPopTextWrapPos(void);
|
||||
CIMGUI_API void igPushAllowKeyboardFocus(bool allow_keyboard_focus);
|
||||
CIMGUI_API void igPopAllowKeyboardFocus(void);
|
||||
CIMGUI_API void igPushButtonRepeat(bool repeat);
|
||||
CIMGUI_API void igPopButtonRepeat(void);
|
||||
CIMGUI_API ImFont* igGetFont(void);
|
||||
CIMGUI_API float igGetFontSize(void);
|
||||
CIMGUI_API void igGetFontTexUvWhitePixel(ImVec2 *pOut);
|
||||
CIMGUI_API ImU32 igGetColorU32Col(ImGuiCol idx,float alpha_mul);
|
||||
CIMGUI_API ImU32 igGetColorU32Vec4(const ImVec4 col);
|
||||
CIMGUI_API ImU32 igGetColorU32U32(ImU32 col);
|
||||
CIMGUI_API const ImVec4* igGetStyleColorVec4(ImGuiCol idx);
|
||||
CIMGUI_API void igSeparator(void);
|
||||
CIMGUI_API void igSameLine(float offset_from_start_x,float spacing);
|
||||
CIMGUI_API void igNewLine(void);
|
||||
@ -1113,7 +1231,8 @@ CIMGUI_API bool igArrowButton(const char* str_id,ImGuiDir dir);
|
||||
CIMGUI_API void igImage(ImTextureID user_texture_id,const ImVec2 size,const ImVec2 uv0,const ImVec2 uv1,const ImVec4 tint_col,const ImVec4 border_col);
|
||||
CIMGUI_API bool igImageButton(ImTextureID user_texture_id,const ImVec2 size,const ImVec2 uv0,const ImVec2 uv1,int frame_padding,const ImVec4 bg_col,const ImVec4 tint_col);
|
||||
CIMGUI_API bool igCheckbox(const char* label,bool* v);
|
||||
CIMGUI_API bool igCheckboxFlags(const char* label,unsigned int* flags,unsigned int flags_value);
|
||||
CIMGUI_API bool igCheckboxFlagsIntPtr(const char* label,int* flags,int flags_value);
|
||||
CIMGUI_API bool igCheckboxFlagsUintPtr(const char* label,unsigned int* flags,unsigned int flags_value);
|
||||
CIMGUI_API bool igRadioButtonBool(const char* label,bool active);
|
||||
CIMGUI_API bool igRadioButtonIntPtr(const char* label,int* v,int v_button);
|
||||
CIMGUI_API void igProgressBar(float fraction,const ImVec2 size_arg,const char* overlay);
|
||||
@ -1184,7 +1303,7 @@ CIMGUI_API void igTreePushPtr(const void* ptr_id);
|
||||
CIMGUI_API void igTreePop(void);
|
||||
CIMGUI_API float igGetTreeNodeToLabelSpacing(void);
|
||||
CIMGUI_API bool igCollapsingHeaderTreeNodeFlags(const char* label,ImGuiTreeNodeFlags flags);
|
||||
CIMGUI_API bool igCollapsingHeaderBoolPtr(const char* label,bool* p_open,ImGuiTreeNodeFlags flags);
|
||||
CIMGUI_API bool igCollapsingHeaderBoolPtr(const char* label,bool* p_visible,ImGuiTreeNodeFlags flags);
|
||||
CIMGUI_API void igSetNextItemOpen(bool is_open,ImGuiCond cond);
|
||||
CIMGUI_API bool igSelectableBool(const char* label,bool selected,ImGuiSelectableFlags flags,const ImVec2 size);
|
||||
CIMGUI_API bool igSelectableBoolPtr(const char* label,bool* p_selected,ImGuiSelectableFlags flags,const ImVec2 size);
|
||||
@ -1223,6 +1342,22 @@ CIMGUI_API bool igBeginPopupContextItem(const char* str_id,ImGuiPopupFlags popup
|
||||
CIMGUI_API bool igBeginPopupContextWindow(const char* str_id,ImGuiPopupFlags popup_flags);
|
||||
CIMGUI_API bool igBeginPopupContextVoid(const char* str_id,ImGuiPopupFlags popup_flags);
|
||||
CIMGUI_API bool igIsPopupOpen(const char* str_id,ImGuiPopupFlags flags);
|
||||
CIMGUI_API bool igBeginTable(const char* str_id,int column,ImGuiTableFlags flags,const ImVec2 outer_size,float inner_width);
|
||||
CIMGUI_API void igEndTable(void);
|
||||
CIMGUI_API void igTableNextRow(ImGuiTableRowFlags row_flags,float min_row_height);
|
||||
CIMGUI_API bool igTableNextColumn(void);
|
||||
CIMGUI_API bool igTableSetColumnIndex(int column_n);
|
||||
CIMGUI_API void igTableSetupColumn(const char* label,ImGuiTableColumnFlags flags,float init_width_or_weight,ImU32 user_id);
|
||||
CIMGUI_API void igTableSetupScrollFreeze(int cols,int rows);
|
||||
CIMGUI_API void igTableHeadersRow(void);
|
||||
CIMGUI_API void igTableHeader(const char* label);
|
||||
CIMGUI_API ImGuiTableSortSpecs* igTableGetSortSpecs(void);
|
||||
CIMGUI_API int igTableGetColumnCount(void);
|
||||
CIMGUI_API int igTableGetColumnIndex(void);
|
||||
CIMGUI_API int igTableGetRowIndex(void);
|
||||
CIMGUI_API const char* igTableGetColumnName(int column_n);
|
||||
CIMGUI_API ImGuiTableColumnFlags igTableGetColumnFlags(int column_n);
|
||||
CIMGUI_API void igTableSetBgColor(ImGuiTableBgTarget target,ImU32 color,int column_n);
|
||||
CIMGUI_API void igColumns(int count,const char* id,bool border);
|
||||
CIMGUI_API void igNextColumn(void);
|
||||
CIMGUI_API int igGetColumnIndex(void);
|
||||
@ -1341,6 +1476,10 @@ CIMGUI_API void ImGuiPayload_Clear(ImGuiPayload* self);
|
||||
CIMGUI_API bool ImGuiPayload_IsDataType(ImGuiPayload* self,const char* type);
|
||||
CIMGUI_API bool ImGuiPayload_IsPreview(ImGuiPayload* self);
|
||||
CIMGUI_API bool ImGuiPayload_IsDelivery(ImGuiPayload* self);
|
||||
CIMGUI_API ImGuiTableColumnSortSpecs* ImGuiTableColumnSortSpecs_ImGuiTableColumnSortSpecs(void);
|
||||
CIMGUI_API void ImGuiTableColumnSortSpecs_destroy(ImGuiTableColumnSortSpecs* self);
|
||||
CIMGUI_API ImGuiTableSortSpecs* ImGuiTableSortSpecs_ImGuiTableSortSpecs(void);
|
||||
CIMGUI_API void ImGuiTableSortSpecs_destroy(ImGuiTableSortSpecs* self);
|
||||
CIMGUI_API ImGuiOnceUponAFrame* ImGuiOnceUponAFrame_ImGuiOnceUponAFrame(void);
|
||||
CIMGUI_API void ImGuiOnceUponAFrame_destroy(ImGuiOnceUponAFrame* self);
|
||||
CIMGUI_API ImGuiTextFilter* ImGuiTextFilter_ImGuiTextFilter(const char* default_filter);
|
||||
@ -1432,7 +1571,8 @@ CIMGUI_API void ImDrawList_AddTextVec2(ImDrawList* self,const ImVec2 pos,ImU32 c
|
||||
CIMGUI_API void ImDrawList_AddTextFontPtr(ImDrawList* self,const ImFont* font,float font_size,const ImVec2 pos,ImU32 col,const char* text_begin,const char* text_end,float wrap_width,const ImVec4* cpu_fine_clip_rect);
|
||||
CIMGUI_API void ImDrawList_AddPolyline(ImDrawList* self,const ImVec2* points,int num_points,ImU32 col,bool closed,float thickness);
|
||||
CIMGUI_API void ImDrawList_AddConvexPolyFilled(ImDrawList* self,const ImVec2* points,int num_points,ImU32 col);
|
||||
CIMGUI_API void ImDrawList_AddBezierCurve(ImDrawList* self,const ImVec2 p1,const ImVec2 p2,const ImVec2 p3,const ImVec2 p4,ImU32 col,float thickness,int num_segments);
|
||||
CIMGUI_API void ImDrawList_AddBezierCubic(ImDrawList* self,const ImVec2 p1,const ImVec2 p2,const ImVec2 p3,const ImVec2 p4,ImU32 col,float thickness,int num_segments);
|
||||
CIMGUI_API void ImDrawList_AddBezierQuadratic(ImDrawList* self,const ImVec2 p1,const ImVec2 p2,const ImVec2 p3,ImU32 col,float thickness,int num_segments);
|
||||
CIMGUI_API void ImDrawList_AddImage(ImDrawList* self,ImTextureID user_texture_id,const ImVec2 p_min,const ImVec2 p_max,const ImVec2 uv_min,const ImVec2 uv_max,ImU32 col);
|
||||
CIMGUI_API void ImDrawList_AddImageQuad(ImDrawList* self,ImTextureID user_texture_id,const ImVec2 p1,const ImVec2 p2,const ImVec2 p3,const ImVec2 p4,const ImVec2 uv1,const ImVec2 uv2,const ImVec2 uv3,const ImVec2 uv4,ImU32 col);
|
||||
CIMGUI_API void ImDrawList_AddImageRounded(ImDrawList* self,ImTextureID user_texture_id,const ImVec2 p_min,const ImVec2 p_max,const ImVec2 uv_min,const ImVec2 uv_max,ImU32 col,float rounding,ImDrawCornerFlags rounding_corners);
|
||||
@ -1443,7 +1583,8 @@ CIMGUI_API void ImDrawList_PathFillConvex(ImDrawList* self,ImU32 col);
|
||||
CIMGUI_API void ImDrawList_PathStroke(ImDrawList* self,ImU32 col,bool closed,float thickness);
|
||||
CIMGUI_API void ImDrawList_PathArcTo(ImDrawList* self,const ImVec2 center,float radius,float a_min,float a_max,int num_segments);
|
||||
CIMGUI_API void ImDrawList_PathArcToFast(ImDrawList* self,const ImVec2 center,float radius,int a_min_of_12,int a_max_of_12);
|
||||
CIMGUI_API void ImDrawList_PathBezierCurveTo(ImDrawList* self,const ImVec2 p2,const ImVec2 p3,const ImVec2 p4,int num_segments);
|
||||
CIMGUI_API void ImDrawList_PathBezierCubicCurveTo(ImDrawList* self,const ImVec2 p2,const ImVec2 p3,const ImVec2 p4,int num_segments);
|
||||
CIMGUI_API void ImDrawList_PathBezierQuadraticCurveTo(ImDrawList* self,const ImVec2 p2,const ImVec2 p3,int num_segments);
|
||||
CIMGUI_API void ImDrawList_PathRect(ImDrawList* self,const ImVec2 rect_min,const ImVec2 rect_max,float rounding,ImDrawCornerFlags rounding_corners);
|
||||
CIMGUI_API void ImDrawList_AddCallback(ImDrawList* self,ImDrawCallback callback,void* callback_data);
|
||||
CIMGUI_API void ImDrawList_AddDrawCmd(ImDrawList* self);
|
||||
@ -1542,6 +1683,8 @@ CIMGUI_API void igLogText(CONST char *fmt, ...);
|
||||
CIMGUI_API void ImGuiTextBuffer_appendf(struct ImGuiTextBuffer *buffer, const char *fmt, ...);
|
||||
//for getting FLT_MAX in bindings
|
||||
CIMGUI_API float igGET_FLT_MAX();
|
||||
//for getting FLT_MIN in bindings
|
||||
CIMGUI_API float igGET_FLT_MIN();
|
||||
|
||||
|
||||
CIMGUI_API ImVector_ImWchar* ImVector_ImWchar_create();
|
||||
|
||||
1776
imgui-sys/third-party/definitions.json
vendored
1776
imgui-sys/third-party/definitions.json
vendored
File diff suppressed because it is too large
Load Diff
1830
imgui-sys/third-party/definitions.lua
vendored
1830
imgui-sys/third-party/definitions.lua
vendored
File diff suppressed because it is too large
Load Diff
2
imgui-sys/third-party/imgui
vendored
2
imgui-sys/third-party/imgui
vendored
@ -1 +1 @@
|
||||
Subproject commit e5cb04b132cba94f902beb6186cb58b864777012
|
||||
Subproject commit 58075c4414b985b352d10718b02a8c43f25efd7c
|
||||
5
imgui-sys/third-party/overloads.txt
vendored
5
imgui-sys/third-party/overloads.txt
vendored
@ -48,6 +48,9 @@ ImVector_resize 2
|
||||
igBeginChild 2
|
||||
1 bool igBeginChildStr (const char*,const ImVec2,bool,ImGuiWindowFlags)
|
||||
2 bool igBeginChildID (ImGuiID,const ImVec2,bool,ImGuiWindowFlags)
|
||||
igCheckboxFlags 2
|
||||
1 bool igCheckboxFlagsIntPtr (const char*,int*,int)
|
||||
2 bool igCheckboxFlagsUintPtr (const char*,unsigned int*,unsigned int)
|
||||
igCollapsingHeader 2
|
||||
1 bool igCollapsingHeaderTreeNodeFlags (const char*,ImGuiTreeNodeFlags)
|
||||
2 bool igCollapsingHeaderBoolPtr (const char*,bool*,ImGuiTreeNodeFlags)
|
||||
@ -132,4 +135,4 @@ igValue 4
|
||||
2 void igValueInt (const char*,int)
|
||||
3 void igValueUint (const char*,unsigned int)
|
||||
4 void igValueFloat (const char*,float,const char*)
|
||||
93 overloaded
|
||||
95 overloaded
|
||||
622
imgui-sys/third-party/structs_and_enums.json
vendored
622
imgui-sys/third-party/structs_and_enums.json
vendored
@ -373,38 +373,63 @@
|
||||
},
|
||||
{
|
||||
"calc_value": 42,
|
||||
"name": "ImGuiCol_TextSelectedBg",
|
||||
"name": "ImGuiCol_TableHeaderBg",
|
||||
"value": "42"
|
||||
},
|
||||
{
|
||||
"calc_value": 43,
|
||||
"name": "ImGuiCol_DragDropTarget",
|
||||
"name": "ImGuiCol_TableBorderStrong",
|
||||
"value": "43"
|
||||
},
|
||||
{
|
||||
"calc_value": 44,
|
||||
"name": "ImGuiCol_NavHighlight",
|
||||
"name": "ImGuiCol_TableBorderLight",
|
||||
"value": "44"
|
||||
},
|
||||
{
|
||||
"calc_value": 45,
|
||||
"name": "ImGuiCol_NavWindowingHighlight",
|
||||
"name": "ImGuiCol_TableRowBg",
|
||||
"value": "45"
|
||||
},
|
||||
{
|
||||
"calc_value": 46,
|
||||
"name": "ImGuiCol_NavWindowingDimBg",
|
||||
"name": "ImGuiCol_TableRowBgAlt",
|
||||
"value": "46"
|
||||
},
|
||||
{
|
||||
"calc_value": 47,
|
||||
"name": "ImGuiCol_ModalWindowDimBg",
|
||||
"name": "ImGuiCol_TextSelectedBg",
|
||||
"value": "47"
|
||||
},
|
||||
{
|
||||
"calc_value": 48,
|
||||
"name": "ImGuiCol_COUNT",
|
||||
"name": "ImGuiCol_DragDropTarget",
|
||||
"value": "48"
|
||||
},
|
||||
{
|
||||
"calc_value": 49,
|
||||
"name": "ImGuiCol_NavHighlight",
|
||||
"value": "49"
|
||||
},
|
||||
{
|
||||
"calc_value": 50,
|
||||
"name": "ImGuiCol_NavWindowingHighlight",
|
||||
"value": "50"
|
||||
},
|
||||
{
|
||||
"calc_value": 51,
|
||||
"name": "ImGuiCol_NavWindowingDimBg",
|
||||
"value": "51"
|
||||
},
|
||||
{
|
||||
"calc_value": 52,
|
||||
"name": "ImGuiCol_ModalWindowDimBg",
|
||||
"value": "52"
|
||||
},
|
||||
{
|
||||
"calc_value": 53,
|
||||
"name": "ImGuiCol_COUNT",
|
||||
"value": "53"
|
||||
}
|
||||
],
|
||||
"ImGuiColorEditFlags_": [
|
||||
@ -1478,6 +1503,23 @@
|
||||
"value": "0x7000000F"
|
||||
}
|
||||
],
|
||||
"ImGuiSortDirection_": [
|
||||
{
|
||||
"calc_value": 0,
|
||||
"name": "ImGuiSortDirection_None",
|
||||
"value": "0"
|
||||
},
|
||||
{
|
||||
"calc_value": 1,
|
||||
"name": "ImGuiSortDirection_Ascending",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"calc_value": 2,
|
||||
"name": "ImGuiSortDirection_Descending",
|
||||
"value": "2"
|
||||
}
|
||||
],
|
||||
"ImGuiStyleVar_": [
|
||||
{
|
||||
"calc_value": 0,
|
||||
@ -1561,43 +1603,48 @@
|
||||
},
|
||||
{
|
||||
"calc_value": 16,
|
||||
"name": "ImGuiStyleVar_ScrollbarSize",
|
||||
"name": "ImGuiStyleVar_CellPadding",
|
||||
"value": "16"
|
||||
},
|
||||
{
|
||||
"calc_value": 17,
|
||||
"name": "ImGuiStyleVar_ScrollbarRounding",
|
||||
"name": "ImGuiStyleVar_ScrollbarSize",
|
||||
"value": "17"
|
||||
},
|
||||
{
|
||||
"calc_value": 18,
|
||||
"name": "ImGuiStyleVar_GrabMinSize",
|
||||
"name": "ImGuiStyleVar_ScrollbarRounding",
|
||||
"value": "18"
|
||||
},
|
||||
{
|
||||
"calc_value": 19,
|
||||
"name": "ImGuiStyleVar_GrabRounding",
|
||||
"name": "ImGuiStyleVar_GrabMinSize",
|
||||
"value": "19"
|
||||
},
|
||||
{
|
||||
"calc_value": 20,
|
||||
"name": "ImGuiStyleVar_TabRounding",
|
||||
"name": "ImGuiStyleVar_GrabRounding",
|
||||
"value": "20"
|
||||
},
|
||||
{
|
||||
"calc_value": 21,
|
||||
"name": "ImGuiStyleVar_ButtonTextAlign",
|
||||
"name": "ImGuiStyleVar_TabRounding",
|
||||
"value": "21"
|
||||
},
|
||||
{
|
||||
"calc_value": 22,
|
||||
"name": "ImGuiStyleVar_SelectableTextAlign",
|
||||
"name": "ImGuiStyleVar_ButtonTextAlign",
|
||||
"value": "22"
|
||||
},
|
||||
{
|
||||
"calc_value": 23,
|
||||
"name": "ImGuiStyleVar_COUNT",
|
||||
"name": "ImGuiStyleVar_SelectableTextAlign",
|
||||
"value": "23"
|
||||
},
|
||||
{
|
||||
"calc_value": 24,
|
||||
"name": "ImGuiStyleVar_COUNT",
|
||||
"value": "24"
|
||||
}
|
||||
],
|
||||
"ImGuiTabBarFlags_": [
|
||||
@ -1704,6 +1751,349 @@
|
||||
"value": "1 << 7"
|
||||
}
|
||||
],
|
||||
"ImGuiTableBgTarget_": [
|
||||
{
|
||||
"calc_value": 0,
|
||||
"name": "ImGuiTableBgTarget_None",
|
||||
"value": "0"
|
||||
},
|
||||
{
|
||||
"calc_value": 1,
|
||||
"name": "ImGuiTableBgTarget_RowBg0",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"calc_value": 2,
|
||||
"name": "ImGuiTableBgTarget_RowBg1",
|
||||
"value": "2"
|
||||
},
|
||||
{
|
||||
"calc_value": 3,
|
||||
"name": "ImGuiTableBgTarget_CellBg",
|
||||
"value": "3"
|
||||
}
|
||||
],
|
||||
"ImGuiTableColumnFlags_": [
|
||||
{
|
||||
"calc_value": 0,
|
||||
"name": "ImGuiTableColumnFlags_None",
|
||||
"value": "0"
|
||||
},
|
||||
{
|
||||
"calc_value": 1,
|
||||
"name": "ImGuiTableColumnFlags_DefaultHide",
|
||||
"value": "1 << 0"
|
||||
},
|
||||
{
|
||||
"calc_value": 2,
|
||||
"name": "ImGuiTableColumnFlags_DefaultSort",
|
||||
"value": "1 << 1"
|
||||
},
|
||||
{
|
||||
"calc_value": 4,
|
||||
"name": "ImGuiTableColumnFlags_WidthStretch",
|
||||
"value": "1 << 2"
|
||||
},
|
||||
{
|
||||
"calc_value": 8,
|
||||
"name": "ImGuiTableColumnFlags_WidthFixed",
|
||||
"value": "1 << 3"
|
||||
},
|
||||
{
|
||||
"calc_value": 16,
|
||||
"name": "ImGuiTableColumnFlags_NoResize",
|
||||
"value": "1 << 4"
|
||||
},
|
||||
{
|
||||
"calc_value": 32,
|
||||
"name": "ImGuiTableColumnFlags_NoReorder",
|
||||
"value": "1 << 5"
|
||||
},
|
||||
{
|
||||
"calc_value": 64,
|
||||
"name": "ImGuiTableColumnFlags_NoHide",
|
||||
"value": "1 << 6"
|
||||
},
|
||||
{
|
||||
"calc_value": 128,
|
||||
"name": "ImGuiTableColumnFlags_NoClip",
|
||||
"value": "1 << 7"
|
||||
},
|
||||
{
|
||||
"calc_value": 256,
|
||||
"name": "ImGuiTableColumnFlags_NoSort",
|
||||
"value": "1 << 8"
|
||||
},
|
||||
{
|
||||
"calc_value": 512,
|
||||
"name": "ImGuiTableColumnFlags_NoSortAscending",
|
||||
"value": "1 << 9"
|
||||
},
|
||||
{
|
||||
"calc_value": 1024,
|
||||
"name": "ImGuiTableColumnFlags_NoSortDescending",
|
||||
"value": "1 << 10"
|
||||
},
|
||||
{
|
||||
"calc_value": 2048,
|
||||
"name": "ImGuiTableColumnFlags_NoHeaderWidth",
|
||||
"value": "1 << 11"
|
||||
},
|
||||
{
|
||||
"calc_value": 4096,
|
||||
"name": "ImGuiTableColumnFlags_PreferSortAscending",
|
||||
"value": "1 << 12"
|
||||
},
|
||||
{
|
||||
"calc_value": 8192,
|
||||
"name": "ImGuiTableColumnFlags_PreferSortDescending",
|
||||
"value": "1 << 13"
|
||||
},
|
||||
{
|
||||
"calc_value": 16384,
|
||||
"name": "ImGuiTableColumnFlags_IndentEnable",
|
||||
"value": "1 << 14"
|
||||
},
|
||||
{
|
||||
"calc_value": 32768,
|
||||
"name": "ImGuiTableColumnFlags_IndentDisable",
|
||||
"value": "1 << 15"
|
||||
},
|
||||
{
|
||||
"calc_value": 1048576,
|
||||
"name": "ImGuiTableColumnFlags_IsEnabled",
|
||||
"value": "1 << 20"
|
||||
},
|
||||
{
|
||||
"calc_value": 2097152,
|
||||
"name": "ImGuiTableColumnFlags_IsVisible",
|
||||
"value": "1 << 21"
|
||||
},
|
||||
{
|
||||
"calc_value": 4194304,
|
||||
"name": "ImGuiTableColumnFlags_IsSorted",
|
||||
"value": "1 << 22"
|
||||
},
|
||||
{
|
||||
"calc_value": 8388608,
|
||||
"name": "ImGuiTableColumnFlags_IsHovered",
|
||||
"value": "1 << 23"
|
||||
},
|
||||
{
|
||||
"calc_value": 12,
|
||||
"name": "ImGuiTableColumnFlags_WidthMask_",
|
||||
"value": "ImGuiTableColumnFlags_WidthStretch | ImGuiTableColumnFlags_WidthFixed"
|
||||
},
|
||||
{
|
||||
"calc_value": 49152,
|
||||
"name": "ImGuiTableColumnFlags_IndentMask_",
|
||||
"value": "ImGuiTableColumnFlags_IndentEnable | ImGuiTableColumnFlags_IndentDisable"
|
||||
},
|
||||
{
|
||||
"calc_value": 15728640,
|
||||
"name": "ImGuiTableColumnFlags_StatusMask_",
|
||||
"value": "ImGuiTableColumnFlags_IsEnabled | ImGuiTableColumnFlags_IsVisible | ImGuiTableColumnFlags_IsSorted | ImGuiTableColumnFlags_IsHovered"
|
||||
},
|
||||
{
|
||||
"calc_value": 1073741824,
|
||||
"name": "ImGuiTableColumnFlags_NoDirectResize_",
|
||||
"value": "1 << 30"
|
||||
}
|
||||
],
|
||||
"ImGuiTableFlags_": [
|
||||
{
|
||||
"calc_value": 0,
|
||||
"name": "ImGuiTableFlags_None",
|
||||
"value": "0"
|
||||
},
|
||||
{
|
||||
"calc_value": 1,
|
||||
"name": "ImGuiTableFlags_Resizable",
|
||||
"value": "1 << 0"
|
||||
},
|
||||
{
|
||||
"calc_value": 2,
|
||||
"name": "ImGuiTableFlags_Reorderable",
|
||||
"value": "1 << 1"
|
||||
},
|
||||
{
|
||||
"calc_value": 4,
|
||||
"name": "ImGuiTableFlags_Hideable",
|
||||
"value": "1 << 2"
|
||||
},
|
||||
{
|
||||
"calc_value": 8,
|
||||
"name": "ImGuiTableFlags_Sortable",
|
||||
"value": "1 << 3"
|
||||
},
|
||||
{
|
||||
"calc_value": 16,
|
||||
"name": "ImGuiTableFlags_NoSavedSettings",
|
||||
"value": "1 << 4"
|
||||
},
|
||||
{
|
||||
"calc_value": 32,
|
||||
"name": "ImGuiTableFlags_ContextMenuInBody",
|
||||
"value": "1 << 5"
|
||||
},
|
||||
{
|
||||
"calc_value": 64,
|
||||
"name": "ImGuiTableFlags_RowBg",
|
||||
"value": "1 << 6"
|
||||
},
|
||||
{
|
||||
"calc_value": 128,
|
||||
"name": "ImGuiTableFlags_BordersInnerH",
|
||||
"value": "1 << 7"
|
||||
},
|
||||
{
|
||||
"calc_value": 256,
|
||||
"name": "ImGuiTableFlags_BordersOuterH",
|
||||
"value": "1 << 8"
|
||||
},
|
||||
{
|
||||
"calc_value": 512,
|
||||
"name": "ImGuiTableFlags_BordersInnerV",
|
||||
"value": "1 << 9"
|
||||
},
|
||||
{
|
||||
"calc_value": 1024,
|
||||
"name": "ImGuiTableFlags_BordersOuterV",
|
||||
"value": "1 << 10"
|
||||
},
|
||||
{
|
||||
"calc_value": 384,
|
||||
"name": "ImGuiTableFlags_BordersH",
|
||||
"value": "ImGuiTableFlags_BordersInnerH | ImGuiTableFlags_BordersOuterH"
|
||||
},
|
||||
{
|
||||
"calc_value": 1536,
|
||||
"name": "ImGuiTableFlags_BordersV",
|
||||
"value": "ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersOuterV"
|
||||
},
|
||||
{
|
||||
"calc_value": 640,
|
||||
"name": "ImGuiTableFlags_BordersInner",
|
||||
"value": "ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersInnerH"
|
||||
},
|
||||
{
|
||||
"calc_value": 1280,
|
||||
"name": "ImGuiTableFlags_BordersOuter",
|
||||
"value": "ImGuiTableFlags_BordersOuterV | ImGuiTableFlags_BordersOuterH"
|
||||
},
|
||||
{
|
||||
"calc_value": 1920,
|
||||
"name": "ImGuiTableFlags_Borders",
|
||||
"value": "ImGuiTableFlags_BordersInner | ImGuiTableFlags_BordersOuter"
|
||||
},
|
||||
{
|
||||
"calc_value": 2048,
|
||||
"name": "ImGuiTableFlags_NoBordersInBody",
|
||||
"value": "1 << 11"
|
||||
},
|
||||
{
|
||||
"calc_value": 4096,
|
||||
"name": "ImGuiTableFlags_NoBordersInBodyUntilResize",
|
||||
"value": "1 << 12"
|
||||
},
|
||||
{
|
||||
"calc_value": 8192,
|
||||
"name": "ImGuiTableFlags_SizingFixedFit",
|
||||
"value": "1 << 13"
|
||||
},
|
||||
{
|
||||
"calc_value": 16384,
|
||||
"name": "ImGuiTableFlags_SizingFixedSame",
|
||||
"value": "2 << 13"
|
||||
},
|
||||
{
|
||||
"calc_value": 24576,
|
||||
"name": "ImGuiTableFlags_SizingStretchProp",
|
||||
"value": "3 << 13"
|
||||
},
|
||||
{
|
||||
"calc_value": 32768,
|
||||
"name": "ImGuiTableFlags_SizingStretchSame",
|
||||
"value": "4 << 13"
|
||||
},
|
||||
{
|
||||
"calc_value": 65536,
|
||||
"name": "ImGuiTableFlags_NoHostExtendX",
|
||||
"value": "1 << 16"
|
||||
},
|
||||
{
|
||||
"calc_value": 131072,
|
||||
"name": "ImGuiTableFlags_NoHostExtendY",
|
||||
"value": "1 << 17"
|
||||
},
|
||||
{
|
||||
"calc_value": 262144,
|
||||
"name": "ImGuiTableFlags_NoKeepColumnsVisible",
|
||||
"value": "1 << 18"
|
||||
},
|
||||
{
|
||||
"calc_value": 524288,
|
||||
"name": "ImGuiTableFlags_PreciseWidths",
|
||||
"value": "1 << 19"
|
||||
},
|
||||
{
|
||||
"calc_value": 1048576,
|
||||
"name": "ImGuiTableFlags_NoClip",
|
||||
"value": "1 << 20"
|
||||
},
|
||||
{
|
||||
"calc_value": 2097152,
|
||||
"name": "ImGuiTableFlags_PadOuterX",
|
||||
"value": "1 << 21"
|
||||
},
|
||||
{
|
||||
"calc_value": 4194304,
|
||||
"name": "ImGuiTableFlags_NoPadOuterX",
|
||||
"value": "1 << 22"
|
||||
},
|
||||
{
|
||||
"calc_value": 8388608,
|
||||
"name": "ImGuiTableFlags_NoPadInnerX",
|
||||
"value": "1 << 23"
|
||||
},
|
||||
{
|
||||
"calc_value": 16777216,
|
||||
"name": "ImGuiTableFlags_ScrollX",
|
||||
"value": "1 << 24"
|
||||
},
|
||||
{
|
||||
"calc_value": 33554432,
|
||||
"name": "ImGuiTableFlags_ScrollY",
|
||||
"value": "1 << 25"
|
||||
},
|
||||
{
|
||||
"calc_value": 67108864,
|
||||
"name": "ImGuiTableFlags_SortMulti",
|
||||
"value": "1 << 26"
|
||||
},
|
||||
{
|
||||
"calc_value": 134217728,
|
||||
"name": "ImGuiTableFlags_SortTristate",
|
||||
"value": "1 << 27"
|
||||
},
|
||||
{
|
||||
"calc_value": 57344,
|
||||
"name": "ImGuiTableFlags_SizingMask_",
|
||||
"value": "ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_SizingFixedSame | ImGuiTableFlags_SizingStretchProp | ImGuiTableFlags_SizingStretchSame"
|
||||
}
|
||||
],
|
||||
"ImGuiTableRowFlags_": [
|
||||
{
|
||||
"calc_value": 0,
|
||||
"name": "ImGuiTableRowFlags_None",
|
||||
"value": "0"
|
||||
},
|
||||
{
|
||||
"calc_value": 1,
|
||||
"name": "ImGuiTableRowFlags_Headers",
|
||||
"value": "1 << 0"
|
||||
}
|
||||
],
|
||||
"ImGuiTreeNodeFlags_": [
|
||||
{
|
||||
"calc_value": 0,
|
||||
@ -1939,63 +2329,72 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"enumtypes": [],
|
||||
"locations": {
|
||||
"ImColor": "imgui:1953",
|
||||
"ImDrawChannel": "imgui:2039",
|
||||
"ImDrawCmd": "imgui:2002",
|
||||
"ImDrawCornerFlags_": "imgui:2062",
|
||||
"ImDrawData": "imgui:2209",
|
||||
"ImDrawList": "imgui:2095",
|
||||
"ImDrawListFlags_": "imgui:2078",
|
||||
"ImDrawListSplitter": "imgui:2047",
|
||||
"ImDrawVert": "imgui:2024",
|
||||
"ImFont": "imgui:2420",
|
||||
"ImFontAtlas": "imgui:2325",
|
||||
"ImFontAtlasCustomRect": "imgui:2287",
|
||||
"ImFontAtlasFlags_": "imgui:2300",
|
||||
"ImFontConfig": "imgui:2232",
|
||||
"ImFontGlyph": "imgui:2261",
|
||||
"ImFontGlyphRangesBuilder": "imgui:2272",
|
||||
"ImGuiBackendFlags_": "imgui:1131",
|
||||
"ImGuiButtonFlags_": "imgui:1242",
|
||||
"ImGuiCol_": "imgui:1141",
|
||||
"ImGuiColorEditFlags_": "imgui:1255",
|
||||
"ImGuiComboFlags_": "imgui:921",
|
||||
"ImGuiCond_": "imgui:1352",
|
||||
"ImGuiConfigFlags_": "imgui:1115",
|
||||
"ImGuiDataType_": "imgui:1015",
|
||||
"ImGuiDir_": "imgui:1031",
|
||||
"ImGuiDragDropFlags_": "imgui:993",
|
||||
"ImGuiFocusedFlags_": "imgui:965",
|
||||
"ImGuiHoveredFlags_": "imgui:977",
|
||||
"ImGuiIO": "imgui:1506",
|
||||
"ImGuiInputTextCallbackData": "imgui:1656",
|
||||
"ImGuiInputTextFlags_": "imgui:836",
|
||||
"ImGuiKeyModFlags_": "imgui:1070",
|
||||
"ImGuiKey_": "imgui:1042",
|
||||
"ImGuiListClipper": "imgui:1905",
|
||||
"ImGuiMouseButton_": "imgui:1319",
|
||||
"ImGuiMouseCursor_": "imgui:1329",
|
||||
"ImGuiNavInput_": "imgui:1083",
|
||||
"ImGuiOnceUponAFrame": "imgui:1783",
|
||||
"ImGuiPayload": "imgui:1696",
|
||||
"ImGuiPopupFlags_": "imgui:894",
|
||||
"ImGuiSelectableFlags_": "imgui:910",
|
||||
"ImGuiSizeCallbackData": "imgui:1687",
|
||||
"ImGuiSliderFlags_": "imgui:1302",
|
||||
"ImGuiStorage": "imgui:1845",
|
||||
"ImGuiStoragePair": "imgui:1848",
|
||||
"ImGuiStyle": "imgui:1454",
|
||||
"ImGuiStyleVar_": "imgui:1207",
|
||||
"ImGuiTabBarFlags_": "imgui:935",
|
||||
"ImGuiTabItemFlags_": "imgui:951",
|
||||
"ImGuiTextBuffer": "imgui:1818",
|
||||
"ImGuiTextFilter": "imgui:1791",
|
||||
"ImGuiTextRange": "imgui:1801",
|
||||
"ImGuiTreeNodeFlags_": "imgui:865",
|
||||
"ImGuiWindowFlags_": "imgui:795",
|
||||
"ImVec2": "imgui:211",
|
||||
"ImVec4": "imgui:224"
|
||||
"ImColor": "imgui:2179",
|
||||
"ImDrawChannel": "imgui:2273",
|
||||
"ImDrawCmd": "imgui:2228",
|
||||
"ImDrawCmdHeader": "imgui:2265",
|
||||
"ImDrawCornerFlags_": "imgui:2297",
|
||||
"ImDrawData": "imgui:2452",
|
||||
"ImDrawList": "imgui:2330",
|
||||
"ImDrawListFlags_": "imgui:2313",
|
||||
"ImDrawListSplitter": "imgui:2282",
|
||||
"ImDrawVert": "imgui:2250",
|
||||
"ImFont": "imgui:2663",
|
||||
"ImFontAtlas": "imgui:2568",
|
||||
"ImFontAtlasCustomRect": "imgui:2530",
|
||||
"ImFontAtlasFlags_": "imgui:2543",
|
||||
"ImFontConfig": "imgui:2475",
|
||||
"ImFontGlyph": "imgui:2504",
|
||||
"ImFontGlyphRangesBuilder": "imgui:2515",
|
||||
"ImGuiBackendFlags_": "imgui:1355",
|
||||
"ImGuiButtonFlags_": "imgui:1461",
|
||||
"ImGuiCol_": "imgui:1365",
|
||||
"ImGuiColorEditFlags_": "imgui:1474",
|
||||
"ImGuiComboFlags_": "imgui:994",
|
||||
"ImGuiCond_": "imgui:1566",
|
||||
"ImGuiConfigFlags_": "imgui:1339",
|
||||
"ImGuiDataType_": "imgui:1231",
|
||||
"ImGuiDir_": "imgui:1247",
|
||||
"ImGuiDragDropFlags_": "imgui:1209",
|
||||
"ImGuiFocusedFlags_": "imgui:1181",
|
||||
"ImGuiHoveredFlags_": "imgui:1193",
|
||||
"ImGuiIO": "imgui:1726",
|
||||
"ImGuiInputTextCallbackData": "imgui:1868",
|
||||
"ImGuiInputTextFlags_": "imgui:909",
|
||||
"ImGuiKeyModFlags_": "imgui:1294",
|
||||
"ImGuiKey_": "imgui:1266",
|
||||
"ImGuiListClipper": "imgui:2130",
|
||||
"ImGuiMouseButton_": "imgui:1538",
|
||||
"ImGuiMouseCursor_": "imgui:1548",
|
||||
"ImGuiNavInput_": "imgui:1307",
|
||||
"ImGuiOnceUponAFrame": "imgui:2008",
|
||||
"ImGuiPayload": "imgui:1908",
|
||||
"ImGuiPopupFlags_": "imgui:967",
|
||||
"ImGuiSelectableFlags_": "imgui:983",
|
||||
"ImGuiSizeCallbackData": "imgui:1899",
|
||||
"ImGuiSliderFlags_": "imgui:1521",
|
||||
"ImGuiSortDirection_": "imgui:1258",
|
||||
"ImGuiStorage": "imgui:2070",
|
||||
"ImGuiStoragePair": "imgui:2073",
|
||||
"ImGuiStyle": "imgui:1672",
|
||||
"ImGuiStyleVar_": "imgui:1430",
|
||||
"ImGuiTabBarFlags_": "imgui:1008",
|
||||
"ImGuiTabItemFlags_": "imgui:1024",
|
||||
"ImGuiTableBgTarget_": "imgui:1172",
|
||||
"ImGuiTableColumnFlags_": "imgui:1117",
|
||||
"ImGuiTableColumnSortSpecs": "imgui:1930",
|
||||
"ImGuiTableFlags_": "imgui:1060",
|
||||
"ImGuiTableRowFlags_": "imgui:1157",
|
||||
"ImGuiTableSortSpecs": "imgui:1944",
|
||||
"ImGuiTextBuffer": "imgui:2043",
|
||||
"ImGuiTextFilter": "imgui:2016",
|
||||
"ImGuiTextRange": "imgui:2026",
|
||||
"ImGuiTreeNodeFlags_": "imgui:938",
|
||||
"ImGuiWindowFlags_": "imgui:869",
|
||||
"ImVec2": "imgui:223",
|
||||
"ImVec4": "imgui:236"
|
||||
},
|
||||
"structs": {
|
||||
"ImColor": [
|
||||
@ -2046,6 +2445,20 @@
|
||||
"type": "void*"
|
||||
}
|
||||
],
|
||||
"ImDrawCmdHeader": [
|
||||
{
|
||||
"name": "ClipRect",
|
||||
"type": "ImVec4"
|
||||
},
|
||||
{
|
||||
"name": "TextureId",
|
||||
"type": "ImTextureID"
|
||||
},
|
||||
{
|
||||
"name": "VtxOffset",
|
||||
"type": "unsigned int"
|
||||
}
|
||||
],
|
||||
"ImDrawData": [
|
||||
{
|
||||
"name": "Valid",
|
||||
@ -2100,6 +2513,10 @@
|
||||
"name": "Flags",
|
||||
"type": "ImDrawListFlags"
|
||||
},
|
||||
{
|
||||
"name": "_VtxCurrentIdx",
|
||||
"type": "unsigned int"
|
||||
},
|
||||
{
|
||||
"name": "_Data",
|
||||
"type": "const ImDrawListSharedData*"
|
||||
@ -2108,10 +2525,6 @@
|
||||
"name": "_OwnerName",
|
||||
"type": "const char*"
|
||||
},
|
||||
{
|
||||
"name": "_VtxCurrentIdx",
|
||||
"type": "unsigned int"
|
||||
},
|
||||
{
|
||||
"name": "_VtxWritePtr",
|
||||
"type": "ImDrawVert*"
|
||||
@ -2137,11 +2550,15 @@
|
||||
},
|
||||
{
|
||||
"name": "_CmdHeader",
|
||||
"type": "ImDrawCmd"
|
||||
"type": "ImDrawCmdHeader"
|
||||
},
|
||||
{
|
||||
"name": "_Splitter",
|
||||
"type": "ImDrawListSplitter"
|
||||
},
|
||||
{
|
||||
"name": "_FringeScale",
|
||||
"type": "float"
|
||||
}
|
||||
],
|
||||
"ImDrawListSplitter": [
|
||||
@ -2579,6 +2996,10 @@
|
||||
"name": "ConfigInputTextCursorBlink",
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"name": "ConfigDragClickToInputText",
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"name": "ConfigWindowsResizeFromEdges",
|
||||
"type": "bool"
|
||||
@ -2588,7 +3009,7 @@
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"name": "ConfigWindowsMemoryCompactTimer",
|
||||
"name": "ConfigMemoryCompactTimer",
|
||||
"type": "float"
|
||||
},
|
||||
{
|
||||
@ -2631,10 +3052,6 @@
|
||||
"name": "ImeWindowHandle",
|
||||
"type": "void*"
|
||||
},
|
||||
{
|
||||
"name": "RenderDrawListsFnUnused",
|
||||
"type": "void*"
|
||||
},
|
||||
{
|
||||
"name": "MousePos",
|
||||
"type": "ImVec2"
|
||||
@ -2898,6 +3315,10 @@
|
||||
"name": "StepNo",
|
||||
"type": "int"
|
||||
},
|
||||
{
|
||||
"name": "ItemsFrozen",
|
||||
"type": "int"
|
||||
},
|
||||
{
|
||||
"name": "ItemsHeight",
|
||||
"type": "float"
|
||||
@ -3048,6 +3469,10 @@
|
||||
"name": "ItemInnerSpacing",
|
||||
"type": "ImVec2"
|
||||
},
|
||||
{
|
||||
"name": "CellPadding",
|
||||
"type": "ImVec2"
|
||||
},
|
||||
{
|
||||
"name": "TouchExtraPadding",
|
||||
"type": "ImVec2"
|
||||
@ -3138,10 +3563,43 @@
|
||||
},
|
||||
{
|
||||
"name": "Colors[ImGuiCol_COUNT]",
|
||||
"size": 48,
|
||||
"size": 53,
|
||||
"type": "ImVec4"
|
||||
}
|
||||
],
|
||||
"ImGuiTableColumnSortSpecs": [
|
||||
{
|
||||
"name": "ColumnUserID",
|
||||
"type": "ImGuiID"
|
||||
},
|
||||
{
|
||||
"name": "ColumnIndex",
|
||||
"type": "ImS16"
|
||||
},
|
||||
{
|
||||
"name": "SortOrder",
|
||||
"type": "ImS16"
|
||||
},
|
||||
{
|
||||
"bitfield": "8",
|
||||
"name": "SortDirection",
|
||||
"type": "ImGuiSortDirection"
|
||||
}
|
||||
],
|
||||
"ImGuiTableSortSpecs": [
|
||||
{
|
||||
"name": "Specs",
|
||||
"type": "const ImGuiTableColumnSortSpecs*"
|
||||
},
|
||||
{
|
||||
"name": "SpecsCount",
|
||||
"type": "int"
|
||||
},
|
||||
{
|
||||
"name": "SpecsDirty",
|
||||
"type": "bool"
|
||||
}
|
||||
],
|
||||
"ImGuiTextBuffer": [
|
||||
{
|
||||
"name": "Buf",
|
||||
|
||||
629
imgui-sys/third-party/structs_and_enums.lua
vendored
629
imgui-sys/third-party/structs_and_enums.lua
vendored
@ -296,32 +296,52 @@ defs["enums"]["ImGuiCol_"][42]["name"] = "ImGuiCol_PlotHistogramHovered"
|
||||
defs["enums"]["ImGuiCol_"][42]["value"] = "41"
|
||||
defs["enums"]["ImGuiCol_"][43] = {}
|
||||
defs["enums"]["ImGuiCol_"][43]["calc_value"] = 42
|
||||
defs["enums"]["ImGuiCol_"][43]["name"] = "ImGuiCol_TextSelectedBg"
|
||||
defs["enums"]["ImGuiCol_"][43]["name"] = "ImGuiCol_TableHeaderBg"
|
||||
defs["enums"]["ImGuiCol_"][43]["value"] = "42"
|
||||
defs["enums"]["ImGuiCol_"][44] = {}
|
||||
defs["enums"]["ImGuiCol_"][44]["calc_value"] = 43
|
||||
defs["enums"]["ImGuiCol_"][44]["name"] = "ImGuiCol_DragDropTarget"
|
||||
defs["enums"]["ImGuiCol_"][44]["name"] = "ImGuiCol_TableBorderStrong"
|
||||
defs["enums"]["ImGuiCol_"][44]["value"] = "43"
|
||||
defs["enums"]["ImGuiCol_"][45] = {}
|
||||
defs["enums"]["ImGuiCol_"][45]["calc_value"] = 44
|
||||
defs["enums"]["ImGuiCol_"][45]["name"] = "ImGuiCol_NavHighlight"
|
||||
defs["enums"]["ImGuiCol_"][45]["name"] = "ImGuiCol_TableBorderLight"
|
||||
defs["enums"]["ImGuiCol_"][45]["value"] = "44"
|
||||
defs["enums"]["ImGuiCol_"][46] = {}
|
||||
defs["enums"]["ImGuiCol_"][46]["calc_value"] = 45
|
||||
defs["enums"]["ImGuiCol_"][46]["name"] = "ImGuiCol_NavWindowingHighlight"
|
||||
defs["enums"]["ImGuiCol_"][46]["name"] = "ImGuiCol_TableRowBg"
|
||||
defs["enums"]["ImGuiCol_"][46]["value"] = "45"
|
||||
defs["enums"]["ImGuiCol_"][47] = {}
|
||||
defs["enums"]["ImGuiCol_"][47]["calc_value"] = 46
|
||||
defs["enums"]["ImGuiCol_"][47]["name"] = "ImGuiCol_NavWindowingDimBg"
|
||||
defs["enums"]["ImGuiCol_"][47]["name"] = "ImGuiCol_TableRowBgAlt"
|
||||
defs["enums"]["ImGuiCol_"][47]["value"] = "46"
|
||||
defs["enums"]["ImGuiCol_"][48] = {}
|
||||
defs["enums"]["ImGuiCol_"][48]["calc_value"] = 47
|
||||
defs["enums"]["ImGuiCol_"][48]["name"] = "ImGuiCol_ModalWindowDimBg"
|
||||
defs["enums"]["ImGuiCol_"][48]["name"] = "ImGuiCol_TextSelectedBg"
|
||||
defs["enums"]["ImGuiCol_"][48]["value"] = "47"
|
||||
defs["enums"]["ImGuiCol_"][49] = {}
|
||||
defs["enums"]["ImGuiCol_"][49]["calc_value"] = 48
|
||||
defs["enums"]["ImGuiCol_"][49]["name"] = "ImGuiCol_COUNT"
|
||||
defs["enums"]["ImGuiCol_"][49]["name"] = "ImGuiCol_DragDropTarget"
|
||||
defs["enums"]["ImGuiCol_"][49]["value"] = "48"
|
||||
defs["enums"]["ImGuiCol_"][50] = {}
|
||||
defs["enums"]["ImGuiCol_"][50]["calc_value"] = 49
|
||||
defs["enums"]["ImGuiCol_"][50]["name"] = "ImGuiCol_NavHighlight"
|
||||
defs["enums"]["ImGuiCol_"][50]["value"] = "49"
|
||||
defs["enums"]["ImGuiCol_"][51] = {}
|
||||
defs["enums"]["ImGuiCol_"][51]["calc_value"] = 50
|
||||
defs["enums"]["ImGuiCol_"][51]["name"] = "ImGuiCol_NavWindowingHighlight"
|
||||
defs["enums"]["ImGuiCol_"][51]["value"] = "50"
|
||||
defs["enums"]["ImGuiCol_"][52] = {}
|
||||
defs["enums"]["ImGuiCol_"][52]["calc_value"] = 51
|
||||
defs["enums"]["ImGuiCol_"][52]["name"] = "ImGuiCol_NavWindowingDimBg"
|
||||
defs["enums"]["ImGuiCol_"][52]["value"] = "51"
|
||||
defs["enums"]["ImGuiCol_"][53] = {}
|
||||
defs["enums"]["ImGuiCol_"][53]["calc_value"] = 52
|
||||
defs["enums"]["ImGuiCol_"][53]["name"] = "ImGuiCol_ModalWindowDimBg"
|
||||
defs["enums"]["ImGuiCol_"][53]["value"] = "52"
|
||||
defs["enums"]["ImGuiCol_"][54] = {}
|
||||
defs["enums"]["ImGuiCol_"][54]["calc_value"] = 53
|
||||
defs["enums"]["ImGuiCol_"][54]["name"] = "ImGuiCol_COUNT"
|
||||
defs["enums"]["ImGuiCol_"][54]["value"] = "53"
|
||||
defs["enums"]["ImGuiColorEditFlags_"] = {}
|
||||
defs["enums"]["ImGuiColorEditFlags_"][1] = {}
|
||||
defs["enums"]["ImGuiColorEditFlags_"][1]["calc_value"] = 0
|
||||
@ -1168,6 +1188,19 @@ defs["enums"]["ImGuiSliderFlags_"][6] = {}
|
||||
defs["enums"]["ImGuiSliderFlags_"][6]["calc_value"] = 1879048207
|
||||
defs["enums"]["ImGuiSliderFlags_"][6]["name"] = "ImGuiSliderFlags_InvalidMask_"
|
||||
defs["enums"]["ImGuiSliderFlags_"][6]["value"] = "0x7000000F"
|
||||
defs["enums"]["ImGuiSortDirection_"] = {}
|
||||
defs["enums"]["ImGuiSortDirection_"][1] = {}
|
||||
defs["enums"]["ImGuiSortDirection_"][1]["calc_value"] = 0
|
||||
defs["enums"]["ImGuiSortDirection_"][1]["name"] = "ImGuiSortDirection_None"
|
||||
defs["enums"]["ImGuiSortDirection_"][1]["value"] = "0"
|
||||
defs["enums"]["ImGuiSortDirection_"][2] = {}
|
||||
defs["enums"]["ImGuiSortDirection_"][2]["calc_value"] = 1
|
||||
defs["enums"]["ImGuiSortDirection_"][2]["name"] = "ImGuiSortDirection_Ascending"
|
||||
defs["enums"]["ImGuiSortDirection_"][2]["value"] = "1"
|
||||
defs["enums"]["ImGuiSortDirection_"][3] = {}
|
||||
defs["enums"]["ImGuiSortDirection_"][3]["calc_value"] = 2
|
||||
defs["enums"]["ImGuiSortDirection_"][3]["name"] = "ImGuiSortDirection_Descending"
|
||||
defs["enums"]["ImGuiSortDirection_"][3]["value"] = "2"
|
||||
defs["enums"]["ImGuiStyleVar_"] = {}
|
||||
defs["enums"]["ImGuiStyleVar_"][1] = {}
|
||||
defs["enums"]["ImGuiStyleVar_"][1]["calc_value"] = 0
|
||||
@ -1235,36 +1268,40 @@ defs["enums"]["ImGuiStyleVar_"][16]["name"] = "ImGuiStyleVar_IndentSpacing"
|
||||
defs["enums"]["ImGuiStyleVar_"][16]["value"] = "15"
|
||||
defs["enums"]["ImGuiStyleVar_"][17] = {}
|
||||
defs["enums"]["ImGuiStyleVar_"][17]["calc_value"] = 16
|
||||
defs["enums"]["ImGuiStyleVar_"][17]["name"] = "ImGuiStyleVar_ScrollbarSize"
|
||||
defs["enums"]["ImGuiStyleVar_"][17]["name"] = "ImGuiStyleVar_CellPadding"
|
||||
defs["enums"]["ImGuiStyleVar_"][17]["value"] = "16"
|
||||
defs["enums"]["ImGuiStyleVar_"][18] = {}
|
||||
defs["enums"]["ImGuiStyleVar_"][18]["calc_value"] = 17
|
||||
defs["enums"]["ImGuiStyleVar_"][18]["name"] = "ImGuiStyleVar_ScrollbarRounding"
|
||||
defs["enums"]["ImGuiStyleVar_"][18]["name"] = "ImGuiStyleVar_ScrollbarSize"
|
||||
defs["enums"]["ImGuiStyleVar_"][18]["value"] = "17"
|
||||
defs["enums"]["ImGuiStyleVar_"][19] = {}
|
||||
defs["enums"]["ImGuiStyleVar_"][19]["calc_value"] = 18
|
||||
defs["enums"]["ImGuiStyleVar_"][19]["name"] = "ImGuiStyleVar_GrabMinSize"
|
||||
defs["enums"]["ImGuiStyleVar_"][19]["name"] = "ImGuiStyleVar_ScrollbarRounding"
|
||||
defs["enums"]["ImGuiStyleVar_"][19]["value"] = "18"
|
||||
defs["enums"]["ImGuiStyleVar_"][20] = {}
|
||||
defs["enums"]["ImGuiStyleVar_"][20]["calc_value"] = 19
|
||||
defs["enums"]["ImGuiStyleVar_"][20]["name"] = "ImGuiStyleVar_GrabRounding"
|
||||
defs["enums"]["ImGuiStyleVar_"][20]["name"] = "ImGuiStyleVar_GrabMinSize"
|
||||
defs["enums"]["ImGuiStyleVar_"][20]["value"] = "19"
|
||||
defs["enums"]["ImGuiStyleVar_"][21] = {}
|
||||
defs["enums"]["ImGuiStyleVar_"][21]["calc_value"] = 20
|
||||
defs["enums"]["ImGuiStyleVar_"][21]["name"] = "ImGuiStyleVar_TabRounding"
|
||||
defs["enums"]["ImGuiStyleVar_"][21]["name"] = "ImGuiStyleVar_GrabRounding"
|
||||
defs["enums"]["ImGuiStyleVar_"][21]["value"] = "20"
|
||||
defs["enums"]["ImGuiStyleVar_"][22] = {}
|
||||
defs["enums"]["ImGuiStyleVar_"][22]["calc_value"] = 21
|
||||
defs["enums"]["ImGuiStyleVar_"][22]["name"] = "ImGuiStyleVar_ButtonTextAlign"
|
||||
defs["enums"]["ImGuiStyleVar_"][22]["name"] = "ImGuiStyleVar_TabRounding"
|
||||
defs["enums"]["ImGuiStyleVar_"][22]["value"] = "21"
|
||||
defs["enums"]["ImGuiStyleVar_"][23] = {}
|
||||
defs["enums"]["ImGuiStyleVar_"][23]["calc_value"] = 22
|
||||
defs["enums"]["ImGuiStyleVar_"][23]["name"] = "ImGuiStyleVar_SelectableTextAlign"
|
||||
defs["enums"]["ImGuiStyleVar_"][23]["name"] = "ImGuiStyleVar_ButtonTextAlign"
|
||||
defs["enums"]["ImGuiStyleVar_"][23]["value"] = "22"
|
||||
defs["enums"]["ImGuiStyleVar_"][24] = {}
|
||||
defs["enums"]["ImGuiStyleVar_"][24]["calc_value"] = 23
|
||||
defs["enums"]["ImGuiStyleVar_"][24]["name"] = "ImGuiStyleVar_COUNT"
|
||||
defs["enums"]["ImGuiStyleVar_"][24]["name"] = "ImGuiStyleVar_SelectableTextAlign"
|
||||
defs["enums"]["ImGuiStyleVar_"][24]["value"] = "23"
|
||||
defs["enums"]["ImGuiStyleVar_"][25] = {}
|
||||
defs["enums"]["ImGuiStyleVar_"][25]["calc_value"] = 24
|
||||
defs["enums"]["ImGuiStyleVar_"][25]["name"] = "ImGuiStyleVar_COUNT"
|
||||
defs["enums"]["ImGuiStyleVar_"][25]["value"] = "24"
|
||||
defs["enums"]["ImGuiTabBarFlags_"] = {}
|
||||
defs["enums"]["ImGuiTabBarFlags_"][1] = {}
|
||||
defs["enums"]["ImGuiTabBarFlags_"][1]["calc_value"] = 0
|
||||
@ -1347,6 +1384,278 @@ defs["enums"]["ImGuiTabItemFlags_"][9] = {}
|
||||
defs["enums"]["ImGuiTabItemFlags_"][9]["calc_value"] = 128
|
||||
defs["enums"]["ImGuiTabItemFlags_"][9]["name"] = "ImGuiTabItemFlags_Trailing"
|
||||
defs["enums"]["ImGuiTabItemFlags_"][9]["value"] = "1 << 7"
|
||||
defs["enums"]["ImGuiTableBgTarget_"] = {}
|
||||
defs["enums"]["ImGuiTableBgTarget_"][1] = {}
|
||||
defs["enums"]["ImGuiTableBgTarget_"][1]["calc_value"] = 0
|
||||
defs["enums"]["ImGuiTableBgTarget_"][1]["name"] = "ImGuiTableBgTarget_None"
|
||||
defs["enums"]["ImGuiTableBgTarget_"][1]["value"] = "0"
|
||||
defs["enums"]["ImGuiTableBgTarget_"][2] = {}
|
||||
defs["enums"]["ImGuiTableBgTarget_"][2]["calc_value"] = 1
|
||||
defs["enums"]["ImGuiTableBgTarget_"][2]["name"] = "ImGuiTableBgTarget_RowBg0"
|
||||
defs["enums"]["ImGuiTableBgTarget_"][2]["value"] = "1"
|
||||
defs["enums"]["ImGuiTableBgTarget_"][3] = {}
|
||||
defs["enums"]["ImGuiTableBgTarget_"][3]["calc_value"] = 2
|
||||
defs["enums"]["ImGuiTableBgTarget_"][3]["name"] = "ImGuiTableBgTarget_RowBg1"
|
||||
defs["enums"]["ImGuiTableBgTarget_"][3]["value"] = "2"
|
||||
defs["enums"]["ImGuiTableBgTarget_"][4] = {}
|
||||
defs["enums"]["ImGuiTableBgTarget_"][4]["calc_value"] = 3
|
||||
defs["enums"]["ImGuiTableBgTarget_"][4]["name"] = "ImGuiTableBgTarget_CellBg"
|
||||
defs["enums"]["ImGuiTableBgTarget_"][4]["value"] = "3"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"] = {}
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][1] = {}
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][1]["calc_value"] = 0
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][1]["name"] = "ImGuiTableColumnFlags_None"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][1]["value"] = "0"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][2] = {}
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][2]["calc_value"] = 1
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][2]["name"] = "ImGuiTableColumnFlags_DefaultHide"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][2]["value"] = "1 << 0"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][3] = {}
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][3]["calc_value"] = 2
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][3]["name"] = "ImGuiTableColumnFlags_DefaultSort"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][3]["value"] = "1 << 1"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][4] = {}
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][4]["calc_value"] = 4
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][4]["name"] = "ImGuiTableColumnFlags_WidthStretch"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][4]["value"] = "1 << 2"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][5] = {}
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][5]["calc_value"] = 8
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][5]["name"] = "ImGuiTableColumnFlags_WidthFixed"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][5]["value"] = "1 << 3"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][6] = {}
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][6]["calc_value"] = 16
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][6]["name"] = "ImGuiTableColumnFlags_NoResize"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][6]["value"] = "1 << 4"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][7] = {}
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][7]["calc_value"] = 32
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][7]["name"] = "ImGuiTableColumnFlags_NoReorder"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][7]["value"] = "1 << 5"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][8] = {}
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][8]["calc_value"] = 64
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][8]["name"] = "ImGuiTableColumnFlags_NoHide"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][8]["value"] = "1 << 6"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][9] = {}
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][9]["calc_value"] = 128
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][9]["name"] = "ImGuiTableColumnFlags_NoClip"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][9]["value"] = "1 << 7"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][10] = {}
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][10]["calc_value"] = 256
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][10]["name"] = "ImGuiTableColumnFlags_NoSort"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][10]["value"] = "1 << 8"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][11] = {}
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][11]["calc_value"] = 512
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][11]["name"] = "ImGuiTableColumnFlags_NoSortAscending"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][11]["value"] = "1 << 9"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][12] = {}
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][12]["calc_value"] = 1024
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][12]["name"] = "ImGuiTableColumnFlags_NoSortDescending"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][12]["value"] = "1 << 10"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][13] = {}
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][13]["calc_value"] = 2048
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][13]["name"] = "ImGuiTableColumnFlags_NoHeaderWidth"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][13]["value"] = "1 << 11"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][14] = {}
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][14]["calc_value"] = 4096
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][14]["name"] = "ImGuiTableColumnFlags_PreferSortAscending"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][14]["value"] = "1 << 12"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][15] = {}
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][15]["calc_value"] = 8192
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][15]["name"] = "ImGuiTableColumnFlags_PreferSortDescending"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][15]["value"] = "1 << 13"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][16] = {}
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][16]["calc_value"] = 16384
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][16]["name"] = "ImGuiTableColumnFlags_IndentEnable"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][16]["value"] = "1 << 14"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][17] = {}
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][17]["calc_value"] = 32768
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][17]["name"] = "ImGuiTableColumnFlags_IndentDisable"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][17]["value"] = "1 << 15"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][18] = {}
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][18]["calc_value"] = 1048576
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][18]["name"] = "ImGuiTableColumnFlags_IsEnabled"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][18]["value"] = "1 << 20"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][19] = {}
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][19]["calc_value"] = 2097152
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][19]["name"] = "ImGuiTableColumnFlags_IsVisible"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][19]["value"] = "1 << 21"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][20] = {}
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][20]["calc_value"] = 4194304
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][20]["name"] = "ImGuiTableColumnFlags_IsSorted"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][20]["value"] = "1 << 22"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][21] = {}
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][21]["calc_value"] = 8388608
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][21]["name"] = "ImGuiTableColumnFlags_IsHovered"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][21]["value"] = "1 << 23"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][22] = {}
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][22]["calc_value"] = 12
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][22]["name"] = "ImGuiTableColumnFlags_WidthMask_"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][22]["value"] = "ImGuiTableColumnFlags_WidthStretch | ImGuiTableColumnFlags_WidthFixed"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][23] = {}
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][23]["calc_value"] = 49152
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][23]["name"] = "ImGuiTableColumnFlags_IndentMask_"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][23]["value"] = "ImGuiTableColumnFlags_IndentEnable | ImGuiTableColumnFlags_IndentDisable"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][24] = {}
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][24]["calc_value"] = 15728640
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][24]["name"] = "ImGuiTableColumnFlags_StatusMask_"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][24]["value"] = "ImGuiTableColumnFlags_IsEnabled | ImGuiTableColumnFlags_IsVisible | ImGuiTableColumnFlags_IsSorted | ImGuiTableColumnFlags_IsHovered"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][25] = {}
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][25]["calc_value"] = 1073741824
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][25]["name"] = "ImGuiTableColumnFlags_NoDirectResize_"
|
||||
defs["enums"]["ImGuiTableColumnFlags_"][25]["value"] = "1 << 30"
|
||||
defs["enums"]["ImGuiTableFlags_"] = {}
|
||||
defs["enums"]["ImGuiTableFlags_"][1] = {}
|
||||
defs["enums"]["ImGuiTableFlags_"][1]["calc_value"] = 0
|
||||
defs["enums"]["ImGuiTableFlags_"][1]["name"] = "ImGuiTableFlags_None"
|
||||
defs["enums"]["ImGuiTableFlags_"][1]["value"] = "0"
|
||||
defs["enums"]["ImGuiTableFlags_"][2] = {}
|
||||
defs["enums"]["ImGuiTableFlags_"][2]["calc_value"] = 1
|
||||
defs["enums"]["ImGuiTableFlags_"][2]["name"] = "ImGuiTableFlags_Resizable"
|
||||
defs["enums"]["ImGuiTableFlags_"][2]["value"] = "1 << 0"
|
||||
defs["enums"]["ImGuiTableFlags_"][3] = {}
|
||||
defs["enums"]["ImGuiTableFlags_"][3]["calc_value"] = 2
|
||||
defs["enums"]["ImGuiTableFlags_"][3]["name"] = "ImGuiTableFlags_Reorderable"
|
||||
defs["enums"]["ImGuiTableFlags_"][3]["value"] = "1 << 1"
|
||||
defs["enums"]["ImGuiTableFlags_"][4] = {}
|
||||
defs["enums"]["ImGuiTableFlags_"][4]["calc_value"] = 4
|
||||
defs["enums"]["ImGuiTableFlags_"][4]["name"] = "ImGuiTableFlags_Hideable"
|
||||
defs["enums"]["ImGuiTableFlags_"][4]["value"] = "1 << 2"
|
||||
defs["enums"]["ImGuiTableFlags_"][5] = {}
|
||||
defs["enums"]["ImGuiTableFlags_"][5]["calc_value"] = 8
|
||||
defs["enums"]["ImGuiTableFlags_"][5]["name"] = "ImGuiTableFlags_Sortable"
|
||||
defs["enums"]["ImGuiTableFlags_"][5]["value"] = "1 << 3"
|
||||
defs["enums"]["ImGuiTableFlags_"][6] = {}
|
||||
defs["enums"]["ImGuiTableFlags_"][6]["calc_value"] = 16
|
||||
defs["enums"]["ImGuiTableFlags_"][6]["name"] = "ImGuiTableFlags_NoSavedSettings"
|
||||
defs["enums"]["ImGuiTableFlags_"][6]["value"] = "1 << 4"
|
||||
defs["enums"]["ImGuiTableFlags_"][7] = {}
|
||||
defs["enums"]["ImGuiTableFlags_"][7]["calc_value"] = 32
|
||||
defs["enums"]["ImGuiTableFlags_"][7]["name"] = "ImGuiTableFlags_ContextMenuInBody"
|
||||
defs["enums"]["ImGuiTableFlags_"][7]["value"] = "1 << 5"
|
||||
defs["enums"]["ImGuiTableFlags_"][8] = {}
|
||||
defs["enums"]["ImGuiTableFlags_"][8]["calc_value"] = 64
|
||||
defs["enums"]["ImGuiTableFlags_"][8]["name"] = "ImGuiTableFlags_RowBg"
|
||||
defs["enums"]["ImGuiTableFlags_"][8]["value"] = "1 << 6"
|
||||
defs["enums"]["ImGuiTableFlags_"][9] = {}
|
||||
defs["enums"]["ImGuiTableFlags_"][9]["calc_value"] = 128
|
||||
defs["enums"]["ImGuiTableFlags_"][9]["name"] = "ImGuiTableFlags_BordersInnerH"
|
||||
defs["enums"]["ImGuiTableFlags_"][9]["value"] = "1 << 7"
|
||||
defs["enums"]["ImGuiTableFlags_"][10] = {}
|
||||
defs["enums"]["ImGuiTableFlags_"][10]["calc_value"] = 256
|
||||
defs["enums"]["ImGuiTableFlags_"][10]["name"] = "ImGuiTableFlags_BordersOuterH"
|
||||
defs["enums"]["ImGuiTableFlags_"][10]["value"] = "1 << 8"
|
||||
defs["enums"]["ImGuiTableFlags_"][11] = {}
|
||||
defs["enums"]["ImGuiTableFlags_"][11]["calc_value"] = 512
|
||||
defs["enums"]["ImGuiTableFlags_"][11]["name"] = "ImGuiTableFlags_BordersInnerV"
|
||||
defs["enums"]["ImGuiTableFlags_"][11]["value"] = "1 << 9"
|
||||
defs["enums"]["ImGuiTableFlags_"][12] = {}
|
||||
defs["enums"]["ImGuiTableFlags_"][12]["calc_value"] = 1024
|
||||
defs["enums"]["ImGuiTableFlags_"][12]["name"] = "ImGuiTableFlags_BordersOuterV"
|
||||
defs["enums"]["ImGuiTableFlags_"][12]["value"] = "1 << 10"
|
||||
defs["enums"]["ImGuiTableFlags_"][13] = {}
|
||||
defs["enums"]["ImGuiTableFlags_"][13]["calc_value"] = 384
|
||||
defs["enums"]["ImGuiTableFlags_"][13]["name"] = "ImGuiTableFlags_BordersH"
|
||||
defs["enums"]["ImGuiTableFlags_"][13]["value"] = "ImGuiTableFlags_BordersInnerH | ImGuiTableFlags_BordersOuterH"
|
||||
defs["enums"]["ImGuiTableFlags_"][14] = {}
|
||||
defs["enums"]["ImGuiTableFlags_"][14]["calc_value"] = 1536
|
||||
defs["enums"]["ImGuiTableFlags_"][14]["name"] = "ImGuiTableFlags_BordersV"
|
||||
defs["enums"]["ImGuiTableFlags_"][14]["value"] = "ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersOuterV"
|
||||
defs["enums"]["ImGuiTableFlags_"][15] = {}
|
||||
defs["enums"]["ImGuiTableFlags_"][15]["calc_value"] = 640
|
||||
defs["enums"]["ImGuiTableFlags_"][15]["name"] = "ImGuiTableFlags_BordersInner"
|
||||
defs["enums"]["ImGuiTableFlags_"][15]["value"] = "ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersInnerH"
|
||||
defs["enums"]["ImGuiTableFlags_"][16] = {}
|
||||
defs["enums"]["ImGuiTableFlags_"][16]["calc_value"] = 1280
|
||||
defs["enums"]["ImGuiTableFlags_"][16]["name"] = "ImGuiTableFlags_BordersOuter"
|
||||
defs["enums"]["ImGuiTableFlags_"][16]["value"] = "ImGuiTableFlags_BordersOuterV | ImGuiTableFlags_BordersOuterH"
|
||||
defs["enums"]["ImGuiTableFlags_"][17] = {}
|
||||
defs["enums"]["ImGuiTableFlags_"][17]["calc_value"] = 1920
|
||||
defs["enums"]["ImGuiTableFlags_"][17]["name"] = "ImGuiTableFlags_Borders"
|
||||
defs["enums"]["ImGuiTableFlags_"][17]["value"] = "ImGuiTableFlags_BordersInner | ImGuiTableFlags_BordersOuter"
|
||||
defs["enums"]["ImGuiTableFlags_"][18] = {}
|
||||
defs["enums"]["ImGuiTableFlags_"][18]["calc_value"] = 2048
|
||||
defs["enums"]["ImGuiTableFlags_"][18]["name"] = "ImGuiTableFlags_NoBordersInBody"
|
||||
defs["enums"]["ImGuiTableFlags_"][18]["value"] = "1 << 11"
|
||||
defs["enums"]["ImGuiTableFlags_"][19] = {}
|
||||
defs["enums"]["ImGuiTableFlags_"][19]["calc_value"] = 4096
|
||||
defs["enums"]["ImGuiTableFlags_"][19]["name"] = "ImGuiTableFlags_NoBordersInBodyUntilResize"
|
||||
defs["enums"]["ImGuiTableFlags_"][19]["value"] = "1 << 12"
|
||||
defs["enums"]["ImGuiTableFlags_"][20] = {}
|
||||
defs["enums"]["ImGuiTableFlags_"][20]["calc_value"] = 8192
|
||||
defs["enums"]["ImGuiTableFlags_"][20]["name"] = "ImGuiTableFlags_SizingFixedFit"
|
||||
defs["enums"]["ImGuiTableFlags_"][20]["value"] = "1 << 13"
|
||||
defs["enums"]["ImGuiTableFlags_"][21] = {}
|
||||
defs["enums"]["ImGuiTableFlags_"][21]["calc_value"] = 16384
|
||||
defs["enums"]["ImGuiTableFlags_"][21]["name"] = "ImGuiTableFlags_SizingFixedSame"
|
||||
defs["enums"]["ImGuiTableFlags_"][21]["value"] = "2 << 13"
|
||||
defs["enums"]["ImGuiTableFlags_"][22] = {}
|
||||
defs["enums"]["ImGuiTableFlags_"][22]["calc_value"] = 24576
|
||||
defs["enums"]["ImGuiTableFlags_"][22]["name"] = "ImGuiTableFlags_SizingStretchProp"
|
||||
defs["enums"]["ImGuiTableFlags_"][22]["value"] = "3 << 13"
|
||||
defs["enums"]["ImGuiTableFlags_"][23] = {}
|
||||
defs["enums"]["ImGuiTableFlags_"][23]["calc_value"] = 32768
|
||||
defs["enums"]["ImGuiTableFlags_"][23]["name"] = "ImGuiTableFlags_SizingStretchSame"
|
||||
defs["enums"]["ImGuiTableFlags_"][23]["value"] = "4 << 13"
|
||||
defs["enums"]["ImGuiTableFlags_"][24] = {}
|
||||
defs["enums"]["ImGuiTableFlags_"][24]["calc_value"] = 65536
|
||||
defs["enums"]["ImGuiTableFlags_"][24]["name"] = "ImGuiTableFlags_NoHostExtendX"
|
||||
defs["enums"]["ImGuiTableFlags_"][24]["value"] = "1 << 16"
|
||||
defs["enums"]["ImGuiTableFlags_"][25] = {}
|
||||
defs["enums"]["ImGuiTableFlags_"][25]["calc_value"] = 131072
|
||||
defs["enums"]["ImGuiTableFlags_"][25]["name"] = "ImGuiTableFlags_NoHostExtendY"
|
||||
defs["enums"]["ImGuiTableFlags_"][25]["value"] = "1 << 17"
|
||||
defs["enums"]["ImGuiTableFlags_"][26] = {}
|
||||
defs["enums"]["ImGuiTableFlags_"][26]["calc_value"] = 262144
|
||||
defs["enums"]["ImGuiTableFlags_"][26]["name"] = "ImGuiTableFlags_NoKeepColumnsVisible"
|
||||
defs["enums"]["ImGuiTableFlags_"][26]["value"] = "1 << 18"
|
||||
defs["enums"]["ImGuiTableFlags_"][27] = {}
|
||||
defs["enums"]["ImGuiTableFlags_"][27]["calc_value"] = 524288
|
||||
defs["enums"]["ImGuiTableFlags_"][27]["name"] = "ImGuiTableFlags_PreciseWidths"
|
||||
defs["enums"]["ImGuiTableFlags_"][27]["value"] = "1 << 19"
|
||||
defs["enums"]["ImGuiTableFlags_"][28] = {}
|
||||
defs["enums"]["ImGuiTableFlags_"][28]["calc_value"] = 1048576
|
||||
defs["enums"]["ImGuiTableFlags_"][28]["name"] = "ImGuiTableFlags_NoClip"
|
||||
defs["enums"]["ImGuiTableFlags_"][28]["value"] = "1 << 20"
|
||||
defs["enums"]["ImGuiTableFlags_"][29] = {}
|
||||
defs["enums"]["ImGuiTableFlags_"][29]["calc_value"] = 2097152
|
||||
defs["enums"]["ImGuiTableFlags_"][29]["name"] = "ImGuiTableFlags_PadOuterX"
|
||||
defs["enums"]["ImGuiTableFlags_"][29]["value"] = "1 << 21"
|
||||
defs["enums"]["ImGuiTableFlags_"][30] = {}
|
||||
defs["enums"]["ImGuiTableFlags_"][30]["calc_value"] = 4194304
|
||||
defs["enums"]["ImGuiTableFlags_"][30]["name"] = "ImGuiTableFlags_NoPadOuterX"
|
||||
defs["enums"]["ImGuiTableFlags_"][30]["value"] = "1 << 22"
|
||||
defs["enums"]["ImGuiTableFlags_"][31] = {}
|
||||
defs["enums"]["ImGuiTableFlags_"][31]["calc_value"] = 8388608
|
||||
defs["enums"]["ImGuiTableFlags_"][31]["name"] = "ImGuiTableFlags_NoPadInnerX"
|
||||
defs["enums"]["ImGuiTableFlags_"][31]["value"] = "1 << 23"
|
||||
defs["enums"]["ImGuiTableFlags_"][32] = {}
|
||||
defs["enums"]["ImGuiTableFlags_"][32]["calc_value"] = 16777216
|
||||
defs["enums"]["ImGuiTableFlags_"][32]["name"] = "ImGuiTableFlags_ScrollX"
|
||||
defs["enums"]["ImGuiTableFlags_"][32]["value"] = "1 << 24"
|
||||
defs["enums"]["ImGuiTableFlags_"][33] = {}
|
||||
defs["enums"]["ImGuiTableFlags_"][33]["calc_value"] = 33554432
|
||||
defs["enums"]["ImGuiTableFlags_"][33]["name"] = "ImGuiTableFlags_ScrollY"
|
||||
defs["enums"]["ImGuiTableFlags_"][33]["value"] = "1 << 25"
|
||||
defs["enums"]["ImGuiTableFlags_"][34] = {}
|
||||
defs["enums"]["ImGuiTableFlags_"][34]["calc_value"] = 67108864
|
||||
defs["enums"]["ImGuiTableFlags_"][34]["name"] = "ImGuiTableFlags_SortMulti"
|
||||
defs["enums"]["ImGuiTableFlags_"][34]["value"] = "1 << 26"
|
||||
defs["enums"]["ImGuiTableFlags_"][35] = {}
|
||||
defs["enums"]["ImGuiTableFlags_"][35]["calc_value"] = 134217728
|
||||
defs["enums"]["ImGuiTableFlags_"][35]["name"] = "ImGuiTableFlags_SortTristate"
|
||||
defs["enums"]["ImGuiTableFlags_"][35]["value"] = "1 << 27"
|
||||
defs["enums"]["ImGuiTableFlags_"][36] = {}
|
||||
defs["enums"]["ImGuiTableFlags_"][36]["calc_value"] = 57344
|
||||
defs["enums"]["ImGuiTableFlags_"][36]["name"] = "ImGuiTableFlags_SizingMask_"
|
||||
defs["enums"]["ImGuiTableFlags_"][36]["value"] = "ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_SizingFixedSame | ImGuiTableFlags_SizingStretchProp | ImGuiTableFlags_SizingStretchSame"
|
||||
defs["enums"]["ImGuiTableRowFlags_"] = {}
|
||||
defs["enums"]["ImGuiTableRowFlags_"][1] = {}
|
||||
defs["enums"]["ImGuiTableRowFlags_"][1]["calc_value"] = 0
|
||||
defs["enums"]["ImGuiTableRowFlags_"][1]["name"] = "ImGuiTableRowFlags_None"
|
||||
defs["enums"]["ImGuiTableRowFlags_"][1]["value"] = "0"
|
||||
defs["enums"]["ImGuiTableRowFlags_"][2] = {}
|
||||
defs["enums"]["ImGuiTableRowFlags_"][2]["calc_value"] = 1
|
||||
defs["enums"]["ImGuiTableRowFlags_"][2]["name"] = "ImGuiTableRowFlags_Headers"
|
||||
defs["enums"]["ImGuiTableRowFlags_"][2]["value"] = "1 << 0"
|
||||
defs["enums"]["ImGuiTreeNodeFlags_"] = {}
|
||||
defs["enums"]["ImGuiTreeNodeFlags_"][1] = {}
|
||||
defs["enums"]["ImGuiTreeNodeFlags_"][1]["calc_value"] = 0
|
||||
@ -1533,63 +1842,72 @@ defs["enums"]["ImGuiWindowFlags_"][30] = {}
|
||||
defs["enums"]["ImGuiWindowFlags_"][30]["calc_value"] = 268435456
|
||||
defs["enums"]["ImGuiWindowFlags_"][30]["name"] = "ImGuiWindowFlags_ChildMenu"
|
||||
defs["enums"]["ImGuiWindowFlags_"][30]["value"] = "1 << 28"
|
||||
defs["enumtypes"] = {}
|
||||
defs["locations"] = {}
|
||||
defs["locations"]["ImColor"] = "imgui:1953"
|
||||
defs["locations"]["ImDrawChannel"] = "imgui:2039"
|
||||
defs["locations"]["ImDrawCmd"] = "imgui:2002"
|
||||
defs["locations"]["ImDrawCornerFlags_"] = "imgui:2062"
|
||||
defs["locations"]["ImDrawData"] = "imgui:2209"
|
||||
defs["locations"]["ImDrawList"] = "imgui:2095"
|
||||
defs["locations"]["ImDrawListFlags_"] = "imgui:2078"
|
||||
defs["locations"]["ImDrawListSplitter"] = "imgui:2047"
|
||||
defs["locations"]["ImDrawVert"] = "imgui:2024"
|
||||
defs["locations"]["ImFont"] = "imgui:2420"
|
||||
defs["locations"]["ImFontAtlas"] = "imgui:2325"
|
||||
defs["locations"]["ImFontAtlasCustomRect"] = "imgui:2287"
|
||||
defs["locations"]["ImFontAtlasFlags_"] = "imgui:2300"
|
||||
defs["locations"]["ImFontConfig"] = "imgui:2232"
|
||||
defs["locations"]["ImFontGlyph"] = "imgui:2261"
|
||||
defs["locations"]["ImFontGlyphRangesBuilder"] = "imgui:2272"
|
||||
defs["locations"]["ImGuiBackendFlags_"] = "imgui:1131"
|
||||
defs["locations"]["ImGuiButtonFlags_"] = "imgui:1242"
|
||||
defs["locations"]["ImGuiCol_"] = "imgui:1141"
|
||||
defs["locations"]["ImGuiColorEditFlags_"] = "imgui:1255"
|
||||
defs["locations"]["ImGuiComboFlags_"] = "imgui:921"
|
||||
defs["locations"]["ImGuiCond_"] = "imgui:1352"
|
||||
defs["locations"]["ImGuiConfigFlags_"] = "imgui:1115"
|
||||
defs["locations"]["ImGuiDataType_"] = "imgui:1015"
|
||||
defs["locations"]["ImGuiDir_"] = "imgui:1031"
|
||||
defs["locations"]["ImGuiDragDropFlags_"] = "imgui:993"
|
||||
defs["locations"]["ImGuiFocusedFlags_"] = "imgui:965"
|
||||
defs["locations"]["ImGuiHoveredFlags_"] = "imgui:977"
|
||||
defs["locations"]["ImGuiIO"] = "imgui:1506"
|
||||
defs["locations"]["ImGuiInputTextCallbackData"] = "imgui:1656"
|
||||
defs["locations"]["ImGuiInputTextFlags_"] = "imgui:836"
|
||||
defs["locations"]["ImGuiKeyModFlags_"] = "imgui:1070"
|
||||
defs["locations"]["ImGuiKey_"] = "imgui:1042"
|
||||
defs["locations"]["ImGuiListClipper"] = "imgui:1905"
|
||||
defs["locations"]["ImGuiMouseButton_"] = "imgui:1319"
|
||||
defs["locations"]["ImGuiMouseCursor_"] = "imgui:1329"
|
||||
defs["locations"]["ImGuiNavInput_"] = "imgui:1083"
|
||||
defs["locations"]["ImGuiOnceUponAFrame"] = "imgui:1783"
|
||||
defs["locations"]["ImGuiPayload"] = "imgui:1696"
|
||||
defs["locations"]["ImGuiPopupFlags_"] = "imgui:894"
|
||||
defs["locations"]["ImGuiSelectableFlags_"] = "imgui:910"
|
||||
defs["locations"]["ImGuiSizeCallbackData"] = "imgui:1687"
|
||||
defs["locations"]["ImGuiSliderFlags_"] = "imgui:1302"
|
||||
defs["locations"]["ImGuiStorage"] = "imgui:1845"
|
||||
defs["locations"]["ImGuiStoragePair"] = "imgui:1848"
|
||||
defs["locations"]["ImGuiStyle"] = "imgui:1454"
|
||||
defs["locations"]["ImGuiStyleVar_"] = "imgui:1207"
|
||||
defs["locations"]["ImGuiTabBarFlags_"] = "imgui:935"
|
||||
defs["locations"]["ImGuiTabItemFlags_"] = "imgui:951"
|
||||
defs["locations"]["ImGuiTextBuffer"] = "imgui:1818"
|
||||
defs["locations"]["ImGuiTextFilter"] = "imgui:1791"
|
||||
defs["locations"]["ImGuiTextRange"] = "imgui:1801"
|
||||
defs["locations"]["ImGuiTreeNodeFlags_"] = "imgui:865"
|
||||
defs["locations"]["ImGuiWindowFlags_"] = "imgui:795"
|
||||
defs["locations"]["ImVec2"] = "imgui:211"
|
||||
defs["locations"]["ImVec4"] = "imgui:224"
|
||||
defs["locations"]["ImColor"] = "imgui:2179"
|
||||
defs["locations"]["ImDrawChannel"] = "imgui:2273"
|
||||
defs["locations"]["ImDrawCmd"] = "imgui:2228"
|
||||
defs["locations"]["ImDrawCmdHeader"] = "imgui:2265"
|
||||
defs["locations"]["ImDrawCornerFlags_"] = "imgui:2297"
|
||||
defs["locations"]["ImDrawData"] = "imgui:2452"
|
||||
defs["locations"]["ImDrawList"] = "imgui:2330"
|
||||
defs["locations"]["ImDrawListFlags_"] = "imgui:2313"
|
||||
defs["locations"]["ImDrawListSplitter"] = "imgui:2282"
|
||||
defs["locations"]["ImDrawVert"] = "imgui:2250"
|
||||
defs["locations"]["ImFont"] = "imgui:2663"
|
||||
defs["locations"]["ImFontAtlas"] = "imgui:2568"
|
||||
defs["locations"]["ImFontAtlasCustomRect"] = "imgui:2530"
|
||||
defs["locations"]["ImFontAtlasFlags_"] = "imgui:2543"
|
||||
defs["locations"]["ImFontConfig"] = "imgui:2475"
|
||||
defs["locations"]["ImFontGlyph"] = "imgui:2504"
|
||||
defs["locations"]["ImFontGlyphRangesBuilder"] = "imgui:2515"
|
||||
defs["locations"]["ImGuiBackendFlags_"] = "imgui:1355"
|
||||
defs["locations"]["ImGuiButtonFlags_"] = "imgui:1461"
|
||||
defs["locations"]["ImGuiCol_"] = "imgui:1365"
|
||||
defs["locations"]["ImGuiColorEditFlags_"] = "imgui:1474"
|
||||
defs["locations"]["ImGuiComboFlags_"] = "imgui:994"
|
||||
defs["locations"]["ImGuiCond_"] = "imgui:1566"
|
||||
defs["locations"]["ImGuiConfigFlags_"] = "imgui:1339"
|
||||
defs["locations"]["ImGuiDataType_"] = "imgui:1231"
|
||||
defs["locations"]["ImGuiDir_"] = "imgui:1247"
|
||||
defs["locations"]["ImGuiDragDropFlags_"] = "imgui:1209"
|
||||
defs["locations"]["ImGuiFocusedFlags_"] = "imgui:1181"
|
||||
defs["locations"]["ImGuiHoveredFlags_"] = "imgui:1193"
|
||||
defs["locations"]["ImGuiIO"] = "imgui:1726"
|
||||
defs["locations"]["ImGuiInputTextCallbackData"] = "imgui:1868"
|
||||
defs["locations"]["ImGuiInputTextFlags_"] = "imgui:909"
|
||||
defs["locations"]["ImGuiKeyModFlags_"] = "imgui:1294"
|
||||
defs["locations"]["ImGuiKey_"] = "imgui:1266"
|
||||
defs["locations"]["ImGuiListClipper"] = "imgui:2130"
|
||||
defs["locations"]["ImGuiMouseButton_"] = "imgui:1538"
|
||||
defs["locations"]["ImGuiMouseCursor_"] = "imgui:1548"
|
||||
defs["locations"]["ImGuiNavInput_"] = "imgui:1307"
|
||||
defs["locations"]["ImGuiOnceUponAFrame"] = "imgui:2008"
|
||||
defs["locations"]["ImGuiPayload"] = "imgui:1908"
|
||||
defs["locations"]["ImGuiPopupFlags_"] = "imgui:967"
|
||||
defs["locations"]["ImGuiSelectableFlags_"] = "imgui:983"
|
||||
defs["locations"]["ImGuiSizeCallbackData"] = "imgui:1899"
|
||||
defs["locations"]["ImGuiSliderFlags_"] = "imgui:1521"
|
||||
defs["locations"]["ImGuiSortDirection_"] = "imgui:1258"
|
||||
defs["locations"]["ImGuiStorage"] = "imgui:2070"
|
||||
defs["locations"]["ImGuiStoragePair"] = "imgui:2073"
|
||||
defs["locations"]["ImGuiStyle"] = "imgui:1672"
|
||||
defs["locations"]["ImGuiStyleVar_"] = "imgui:1430"
|
||||
defs["locations"]["ImGuiTabBarFlags_"] = "imgui:1008"
|
||||
defs["locations"]["ImGuiTabItemFlags_"] = "imgui:1024"
|
||||
defs["locations"]["ImGuiTableBgTarget_"] = "imgui:1172"
|
||||
defs["locations"]["ImGuiTableColumnFlags_"] = "imgui:1117"
|
||||
defs["locations"]["ImGuiTableColumnSortSpecs"] = "imgui:1930"
|
||||
defs["locations"]["ImGuiTableFlags_"] = "imgui:1060"
|
||||
defs["locations"]["ImGuiTableRowFlags_"] = "imgui:1157"
|
||||
defs["locations"]["ImGuiTableSortSpecs"] = "imgui:1944"
|
||||
defs["locations"]["ImGuiTextBuffer"] = "imgui:2043"
|
||||
defs["locations"]["ImGuiTextFilter"] = "imgui:2016"
|
||||
defs["locations"]["ImGuiTextRange"] = "imgui:2026"
|
||||
defs["locations"]["ImGuiTreeNodeFlags_"] = "imgui:938"
|
||||
defs["locations"]["ImGuiWindowFlags_"] = "imgui:869"
|
||||
defs["locations"]["ImVec2"] = "imgui:223"
|
||||
defs["locations"]["ImVec4"] = "imgui:236"
|
||||
defs["structs"] = {}
|
||||
defs["structs"]["ImColor"] = {}
|
||||
defs["structs"]["ImColor"][1] = {}
|
||||
@ -1626,6 +1944,16 @@ defs["structs"]["ImDrawCmd"][6]["type"] = "ImDrawCallback"
|
||||
defs["structs"]["ImDrawCmd"][7] = {}
|
||||
defs["structs"]["ImDrawCmd"][7]["name"] = "UserCallbackData"
|
||||
defs["structs"]["ImDrawCmd"][7]["type"] = "void*"
|
||||
defs["structs"]["ImDrawCmdHeader"] = {}
|
||||
defs["structs"]["ImDrawCmdHeader"][1] = {}
|
||||
defs["structs"]["ImDrawCmdHeader"][1]["name"] = "ClipRect"
|
||||
defs["structs"]["ImDrawCmdHeader"][1]["type"] = "ImVec4"
|
||||
defs["structs"]["ImDrawCmdHeader"][2] = {}
|
||||
defs["structs"]["ImDrawCmdHeader"][2]["name"] = "TextureId"
|
||||
defs["structs"]["ImDrawCmdHeader"][2]["type"] = "ImTextureID"
|
||||
defs["structs"]["ImDrawCmdHeader"][3] = {}
|
||||
defs["structs"]["ImDrawCmdHeader"][3]["name"] = "VtxOffset"
|
||||
defs["structs"]["ImDrawCmdHeader"][3]["type"] = "unsigned int"
|
||||
defs["structs"]["ImDrawData"] = {}
|
||||
defs["structs"]["ImDrawData"][1] = {}
|
||||
defs["structs"]["ImDrawData"][1]["name"] = "Valid"
|
||||
@ -1668,14 +1996,14 @@ defs["structs"]["ImDrawList"][4] = {}
|
||||
defs["structs"]["ImDrawList"][4]["name"] = "Flags"
|
||||
defs["structs"]["ImDrawList"][4]["type"] = "ImDrawListFlags"
|
||||
defs["structs"]["ImDrawList"][5] = {}
|
||||
defs["structs"]["ImDrawList"][5]["name"] = "_Data"
|
||||
defs["structs"]["ImDrawList"][5]["type"] = "const ImDrawListSharedData*"
|
||||
defs["structs"]["ImDrawList"][5]["name"] = "_VtxCurrentIdx"
|
||||
defs["structs"]["ImDrawList"][5]["type"] = "unsigned int"
|
||||
defs["structs"]["ImDrawList"][6] = {}
|
||||
defs["structs"]["ImDrawList"][6]["name"] = "_OwnerName"
|
||||
defs["structs"]["ImDrawList"][6]["type"] = "const char*"
|
||||
defs["structs"]["ImDrawList"][6]["name"] = "_Data"
|
||||
defs["structs"]["ImDrawList"][6]["type"] = "const ImDrawListSharedData*"
|
||||
defs["structs"]["ImDrawList"][7] = {}
|
||||
defs["structs"]["ImDrawList"][7]["name"] = "_VtxCurrentIdx"
|
||||
defs["structs"]["ImDrawList"][7]["type"] = "unsigned int"
|
||||
defs["structs"]["ImDrawList"][7]["name"] = "_OwnerName"
|
||||
defs["structs"]["ImDrawList"][7]["type"] = "const char*"
|
||||
defs["structs"]["ImDrawList"][8] = {}
|
||||
defs["structs"]["ImDrawList"][8]["name"] = "_VtxWritePtr"
|
||||
defs["structs"]["ImDrawList"][8]["type"] = "ImDrawVert*"
|
||||
@ -1696,10 +2024,13 @@ defs["structs"]["ImDrawList"][12]["template_type"] = "ImVec2"
|
||||
defs["structs"]["ImDrawList"][12]["type"] = "ImVector_ImVec2"
|
||||
defs["structs"]["ImDrawList"][13] = {}
|
||||
defs["structs"]["ImDrawList"][13]["name"] = "_CmdHeader"
|
||||
defs["structs"]["ImDrawList"][13]["type"] = "ImDrawCmd"
|
||||
defs["structs"]["ImDrawList"][13]["type"] = "ImDrawCmdHeader"
|
||||
defs["structs"]["ImDrawList"][14] = {}
|
||||
defs["structs"]["ImDrawList"][14]["name"] = "_Splitter"
|
||||
defs["structs"]["ImDrawList"][14]["type"] = "ImDrawListSplitter"
|
||||
defs["structs"]["ImDrawList"][15] = {}
|
||||
defs["structs"]["ImDrawList"][15]["name"] = "_FringeScale"
|
||||
defs["structs"]["ImDrawList"][15]["type"] = "float"
|
||||
defs["structs"]["ImDrawListSplitter"] = {}
|
||||
defs["structs"]["ImDrawListSplitter"][1] = {}
|
||||
defs["structs"]["ImDrawListSplitter"][1]["name"] = "_Current"
|
||||
@ -2027,46 +2358,46 @@ defs["structs"]["ImGuiIO"][22] = {}
|
||||
defs["structs"]["ImGuiIO"][22]["name"] = "ConfigInputTextCursorBlink"
|
||||
defs["structs"]["ImGuiIO"][22]["type"] = "bool"
|
||||
defs["structs"]["ImGuiIO"][23] = {}
|
||||
defs["structs"]["ImGuiIO"][23]["name"] = "ConfigWindowsResizeFromEdges"
|
||||
defs["structs"]["ImGuiIO"][23]["name"] = "ConfigDragClickToInputText"
|
||||
defs["structs"]["ImGuiIO"][23]["type"] = "bool"
|
||||
defs["structs"]["ImGuiIO"][24] = {}
|
||||
defs["structs"]["ImGuiIO"][24]["name"] = "ConfigWindowsMoveFromTitleBarOnly"
|
||||
defs["structs"]["ImGuiIO"][24]["name"] = "ConfigWindowsResizeFromEdges"
|
||||
defs["structs"]["ImGuiIO"][24]["type"] = "bool"
|
||||
defs["structs"]["ImGuiIO"][25] = {}
|
||||
defs["structs"]["ImGuiIO"][25]["name"] = "ConfigWindowsMemoryCompactTimer"
|
||||
defs["structs"]["ImGuiIO"][25]["type"] = "float"
|
||||
defs["structs"]["ImGuiIO"][25]["name"] = "ConfigWindowsMoveFromTitleBarOnly"
|
||||
defs["structs"]["ImGuiIO"][25]["type"] = "bool"
|
||||
defs["structs"]["ImGuiIO"][26] = {}
|
||||
defs["structs"]["ImGuiIO"][26]["name"] = "BackendPlatformName"
|
||||
defs["structs"]["ImGuiIO"][26]["type"] = "const char*"
|
||||
defs["structs"]["ImGuiIO"][26]["name"] = "ConfigMemoryCompactTimer"
|
||||
defs["structs"]["ImGuiIO"][26]["type"] = "float"
|
||||
defs["structs"]["ImGuiIO"][27] = {}
|
||||
defs["structs"]["ImGuiIO"][27]["name"] = "BackendRendererName"
|
||||
defs["structs"]["ImGuiIO"][27]["name"] = "BackendPlatformName"
|
||||
defs["structs"]["ImGuiIO"][27]["type"] = "const char*"
|
||||
defs["structs"]["ImGuiIO"][28] = {}
|
||||
defs["structs"]["ImGuiIO"][28]["name"] = "BackendPlatformUserData"
|
||||
defs["structs"]["ImGuiIO"][28]["type"] = "void*"
|
||||
defs["structs"]["ImGuiIO"][28]["name"] = "BackendRendererName"
|
||||
defs["structs"]["ImGuiIO"][28]["type"] = "const char*"
|
||||
defs["structs"]["ImGuiIO"][29] = {}
|
||||
defs["structs"]["ImGuiIO"][29]["name"] = "BackendRendererUserData"
|
||||
defs["structs"]["ImGuiIO"][29]["name"] = "BackendPlatformUserData"
|
||||
defs["structs"]["ImGuiIO"][29]["type"] = "void*"
|
||||
defs["structs"]["ImGuiIO"][30] = {}
|
||||
defs["structs"]["ImGuiIO"][30]["name"] = "BackendLanguageUserData"
|
||||
defs["structs"]["ImGuiIO"][30]["name"] = "BackendRendererUserData"
|
||||
defs["structs"]["ImGuiIO"][30]["type"] = "void*"
|
||||
defs["structs"]["ImGuiIO"][31] = {}
|
||||
defs["structs"]["ImGuiIO"][31]["name"] = "GetClipboardTextFn"
|
||||
defs["structs"]["ImGuiIO"][31]["type"] = "const char*(*)(void* user_data)"
|
||||
defs["structs"]["ImGuiIO"][31]["name"] = "BackendLanguageUserData"
|
||||
defs["structs"]["ImGuiIO"][31]["type"] = "void*"
|
||||
defs["structs"]["ImGuiIO"][32] = {}
|
||||
defs["structs"]["ImGuiIO"][32]["name"] = "SetClipboardTextFn"
|
||||
defs["structs"]["ImGuiIO"][32]["type"] = "void(*)(void* user_data,const char* text)"
|
||||
defs["structs"]["ImGuiIO"][32]["name"] = "GetClipboardTextFn"
|
||||
defs["structs"]["ImGuiIO"][32]["type"] = "const char*(*)(void* user_data)"
|
||||
defs["structs"]["ImGuiIO"][33] = {}
|
||||
defs["structs"]["ImGuiIO"][33]["name"] = "ClipboardUserData"
|
||||
defs["structs"]["ImGuiIO"][33]["type"] = "void*"
|
||||
defs["structs"]["ImGuiIO"][33]["name"] = "SetClipboardTextFn"
|
||||
defs["structs"]["ImGuiIO"][33]["type"] = "void(*)(void* user_data,const char* text)"
|
||||
defs["structs"]["ImGuiIO"][34] = {}
|
||||
defs["structs"]["ImGuiIO"][34]["name"] = "ImeSetInputScreenPosFn"
|
||||
defs["structs"]["ImGuiIO"][34]["type"] = "void(*)(int x,int y)"
|
||||
defs["structs"]["ImGuiIO"][34]["name"] = "ClipboardUserData"
|
||||
defs["structs"]["ImGuiIO"][34]["type"] = "void*"
|
||||
defs["structs"]["ImGuiIO"][35] = {}
|
||||
defs["structs"]["ImGuiIO"][35]["name"] = "ImeWindowHandle"
|
||||
defs["structs"]["ImGuiIO"][35]["type"] = "void*"
|
||||
defs["structs"]["ImGuiIO"][35]["name"] = "ImeSetInputScreenPosFn"
|
||||
defs["structs"]["ImGuiIO"][35]["type"] = "void(*)(int x,int y)"
|
||||
defs["structs"]["ImGuiIO"][36] = {}
|
||||
defs["structs"]["ImGuiIO"][36]["name"] = "RenderDrawListsFnUnused"
|
||||
defs["structs"]["ImGuiIO"][36]["name"] = "ImeWindowHandle"
|
||||
defs["structs"]["ImGuiIO"][36]["type"] = "void*"
|
||||
defs["structs"]["ImGuiIO"][37] = {}
|
||||
defs["structs"]["ImGuiIO"][37]["name"] = "MousePos"
|
||||
@ -2270,11 +2601,14 @@ defs["structs"]["ImGuiListClipper"][4] = {}
|
||||
defs["structs"]["ImGuiListClipper"][4]["name"] = "StepNo"
|
||||
defs["structs"]["ImGuiListClipper"][4]["type"] = "int"
|
||||
defs["structs"]["ImGuiListClipper"][5] = {}
|
||||
defs["structs"]["ImGuiListClipper"][5]["name"] = "ItemsHeight"
|
||||
defs["structs"]["ImGuiListClipper"][5]["type"] = "float"
|
||||
defs["structs"]["ImGuiListClipper"][5]["name"] = "ItemsFrozen"
|
||||
defs["structs"]["ImGuiListClipper"][5]["type"] = "int"
|
||||
defs["structs"]["ImGuiListClipper"][6] = {}
|
||||
defs["structs"]["ImGuiListClipper"][6]["name"] = "StartPosY"
|
||||
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"]["ImGuiOnceUponAFrame"] = {}
|
||||
defs["structs"]["ImGuiOnceUponAFrame"][1] = {}
|
||||
defs["structs"]["ImGuiOnceUponAFrame"][1]["name"] = "RefFrame"
|
||||
@ -2380,75 +2714,102 @@ defs["structs"]["ImGuiStyle"][16] = {}
|
||||
defs["structs"]["ImGuiStyle"][16]["name"] = "ItemInnerSpacing"
|
||||
defs["structs"]["ImGuiStyle"][16]["type"] = "ImVec2"
|
||||
defs["structs"]["ImGuiStyle"][17] = {}
|
||||
defs["structs"]["ImGuiStyle"][17]["name"] = "TouchExtraPadding"
|
||||
defs["structs"]["ImGuiStyle"][17]["name"] = "CellPadding"
|
||||
defs["structs"]["ImGuiStyle"][17]["type"] = "ImVec2"
|
||||
defs["structs"]["ImGuiStyle"][18] = {}
|
||||
defs["structs"]["ImGuiStyle"][18]["name"] = "IndentSpacing"
|
||||
defs["structs"]["ImGuiStyle"][18]["type"] = "float"
|
||||
defs["structs"]["ImGuiStyle"][18]["name"] = "TouchExtraPadding"
|
||||
defs["structs"]["ImGuiStyle"][18]["type"] = "ImVec2"
|
||||
defs["structs"]["ImGuiStyle"][19] = {}
|
||||
defs["structs"]["ImGuiStyle"][19]["name"] = "ColumnsMinSpacing"
|
||||
defs["structs"]["ImGuiStyle"][19]["name"] = "IndentSpacing"
|
||||
defs["structs"]["ImGuiStyle"][19]["type"] = "float"
|
||||
defs["structs"]["ImGuiStyle"][20] = {}
|
||||
defs["structs"]["ImGuiStyle"][20]["name"] = "ScrollbarSize"
|
||||
defs["structs"]["ImGuiStyle"][20]["name"] = "ColumnsMinSpacing"
|
||||
defs["structs"]["ImGuiStyle"][20]["type"] = "float"
|
||||
defs["structs"]["ImGuiStyle"][21] = {}
|
||||
defs["structs"]["ImGuiStyle"][21]["name"] = "ScrollbarRounding"
|
||||
defs["structs"]["ImGuiStyle"][21]["name"] = "ScrollbarSize"
|
||||
defs["structs"]["ImGuiStyle"][21]["type"] = "float"
|
||||
defs["structs"]["ImGuiStyle"][22] = {}
|
||||
defs["structs"]["ImGuiStyle"][22]["name"] = "GrabMinSize"
|
||||
defs["structs"]["ImGuiStyle"][22]["name"] = "ScrollbarRounding"
|
||||
defs["structs"]["ImGuiStyle"][22]["type"] = "float"
|
||||
defs["structs"]["ImGuiStyle"][23] = {}
|
||||
defs["structs"]["ImGuiStyle"][23]["name"] = "GrabRounding"
|
||||
defs["structs"]["ImGuiStyle"][23]["name"] = "GrabMinSize"
|
||||
defs["structs"]["ImGuiStyle"][23]["type"] = "float"
|
||||
defs["structs"]["ImGuiStyle"][24] = {}
|
||||
defs["structs"]["ImGuiStyle"][24]["name"] = "LogSliderDeadzone"
|
||||
defs["structs"]["ImGuiStyle"][24]["name"] = "GrabRounding"
|
||||
defs["structs"]["ImGuiStyle"][24]["type"] = "float"
|
||||
defs["structs"]["ImGuiStyle"][25] = {}
|
||||
defs["structs"]["ImGuiStyle"][25]["name"] = "TabRounding"
|
||||
defs["structs"]["ImGuiStyle"][25]["name"] = "LogSliderDeadzone"
|
||||
defs["structs"]["ImGuiStyle"][25]["type"] = "float"
|
||||
defs["structs"]["ImGuiStyle"][26] = {}
|
||||
defs["structs"]["ImGuiStyle"][26]["name"] = "TabBorderSize"
|
||||
defs["structs"]["ImGuiStyle"][26]["name"] = "TabRounding"
|
||||
defs["structs"]["ImGuiStyle"][26]["type"] = "float"
|
||||
defs["structs"]["ImGuiStyle"][27] = {}
|
||||
defs["structs"]["ImGuiStyle"][27]["name"] = "TabMinWidthForCloseButton"
|
||||
defs["structs"]["ImGuiStyle"][27]["name"] = "TabBorderSize"
|
||||
defs["structs"]["ImGuiStyle"][27]["type"] = "float"
|
||||
defs["structs"]["ImGuiStyle"][28] = {}
|
||||
defs["structs"]["ImGuiStyle"][28]["name"] = "ColorButtonPosition"
|
||||
defs["structs"]["ImGuiStyle"][28]["type"] = "ImGuiDir"
|
||||
defs["structs"]["ImGuiStyle"][28]["name"] = "TabMinWidthForCloseButton"
|
||||
defs["structs"]["ImGuiStyle"][28]["type"] = "float"
|
||||
defs["structs"]["ImGuiStyle"][29] = {}
|
||||
defs["structs"]["ImGuiStyle"][29]["name"] = "ButtonTextAlign"
|
||||
defs["structs"]["ImGuiStyle"][29]["type"] = "ImVec2"
|
||||
defs["structs"]["ImGuiStyle"][29]["name"] = "ColorButtonPosition"
|
||||
defs["structs"]["ImGuiStyle"][29]["type"] = "ImGuiDir"
|
||||
defs["structs"]["ImGuiStyle"][30] = {}
|
||||
defs["structs"]["ImGuiStyle"][30]["name"] = "SelectableTextAlign"
|
||||
defs["structs"]["ImGuiStyle"][30]["name"] = "ButtonTextAlign"
|
||||
defs["structs"]["ImGuiStyle"][30]["type"] = "ImVec2"
|
||||
defs["structs"]["ImGuiStyle"][31] = {}
|
||||
defs["structs"]["ImGuiStyle"][31]["name"] = "DisplayWindowPadding"
|
||||
defs["structs"]["ImGuiStyle"][31]["name"] = "SelectableTextAlign"
|
||||
defs["structs"]["ImGuiStyle"][31]["type"] = "ImVec2"
|
||||
defs["structs"]["ImGuiStyle"][32] = {}
|
||||
defs["structs"]["ImGuiStyle"][32]["name"] = "DisplaySafeAreaPadding"
|
||||
defs["structs"]["ImGuiStyle"][32]["name"] = "DisplayWindowPadding"
|
||||
defs["structs"]["ImGuiStyle"][32]["type"] = "ImVec2"
|
||||
defs["structs"]["ImGuiStyle"][33] = {}
|
||||
defs["structs"]["ImGuiStyle"][33]["name"] = "MouseCursorScale"
|
||||
defs["structs"]["ImGuiStyle"][33]["type"] = "float"
|
||||
defs["structs"]["ImGuiStyle"][33]["name"] = "DisplaySafeAreaPadding"
|
||||
defs["structs"]["ImGuiStyle"][33]["type"] = "ImVec2"
|
||||
defs["structs"]["ImGuiStyle"][34] = {}
|
||||
defs["structs"]["ImGuiStyle"][34]["name"] = "AntiAliasedLines"
|
||||
defs["structs"]["ImGuiStyle"][34]["type"] = "bool"
|
||||
defs["structs"]["ImGuiStyle"][34]["name"] = "MouseCursorScale"
|
||||
defs["structs"]["ImGuiStyle"][34]["type"] = "float"
|
||||
defs["structs"]["ImGuiStyle"][35] = {}
|
||||
defs["structs"]["ImGuiStyle"][35]["name"] = "AntiAliasedLinesUseTex"
|
||||
defs["structs"]["ImGuiStyle"][35]["name"] = "AntiAliasedLines"
|
||||
defs["structs"]["ImGuiStyle"][35]["type"] = "bool"
|
||||
defs["structs"]["ImGuiStyle"][36] = {}
|
||||
defs["structs"]["ImGuiStyle"][36]["name"] = "AntiAliasedFill"
|
||||
defs["structs"]["ImGuiStyle"][36]["name"] = "AntiAliasedLinesUseTex"
|
||||
defs["structs"]["ImGuiStyle"][36]["type"] = "bool"
|
||||
defs["structs"]["ImGuiStyle"][37] = {}
|
||||
defs["structs"]["ImGuiStyle"][37]["name"] = "CurveTessellationTol"
|
||||
defs["structs"]["ImGuiStyle"][37]["type"] = "float"
|
||||
defs["structs"]["ImGuiStyle"][37]["name"] = "AntiAliasedFill"
|
||||
defs["structs"]["ImGuiStyle"][37]["type"] = "bool"
|
||||
defs["structs"]["ImGuiStyle"][38] = {}
|
||||
defs["structs"]["ImGuiStyle"][38]["name"] = "CircleSegmentMaxError"
|
||||
defs["structs"]["ImGuiStyle"][38]["name"] = "CurveTessellationTol"
|
||||
defs["structs"]["ImGuiStyle"][38]["type"] = "float"
|
||||
defs["structs"]["ImGuiStyle"][39] = {}
|
||||
defs["structs"]["ImGuiStyle"][39]["name"] = "Colors[ImGuiCol_COUNT]"
|
||||
defs["structs"]["ImGuiStyle"][39]["size"] = 48
|
||||
defs["structs"]["ImGuiStyle"][39]["type"] = "ImVec4"
|
||||
defs["structs"]["ImGuiStyle"][39]["name"] = "CircleSegmentMaxError"
|
||||
defs["structs"]["ImGuiStyle"][39]["type"] = "float"
|
||||
defs["structs"]["ImGuiStyle"][40] = {}
|
||||
defs["structs"]["ImGuiStyle"][40]["name"] = "Colors[ImGuiCol_COUNT]"
|
||||
defs["structs"]["ImGuiStyle"][40]["size"] = 53
|
||||
defs["structs"]["ImGuiStyle"][40]["type"] = "ImVec4"
|
||||
defs["structs"]["ImGuiTableColumnSortSpecs"] = {}
|
||||
defs["structs"]["ImGuiTableColumnSortSpecs"][1] = {}
|
||||
defs["structs"]["ImGuiTableColumnSortSpecs"][1]["name"] = "ColumnUserID"
|
||||
defs["structs"]["ImGuiTableColumnSortSpecs"][1]["type"] = "ImGuiID"
|
||||
defs["structs"]["ImGuiTableColumnSortSpecs"][2] = {}
|
||||
defs["structs"]["ImGuiTableColumnSortSpecs"][2]["name"] = "ColumnIndex"
|
||||
defs["structs"]["ImGuiTableColumnSortSpecs"][2]["type"] = "ImS16"
|
||||
defs["structs"]["ImGuiTableColumnSortSpecs"][3] = {}
|
||||
defs["structs"]["ImGuiTableColumnSortSpecs"][3]["name"] = "SortOrder"
|
||||
defs["structs"]["ImGuiTableColumnSortSpecs"][3]["type"] = "ImS16"
|
||||
defs["structs"]["ImGuiTableColumnSortSpecs"][4] = {}
|
||||
defs["structs"]["ImGuiTableColumnSortSpecs"][4]["bitfield"] = "8"
|
||||
defs["structs"]["ImGuiTableColumnSortSpecs"][4]["name"] = "SortDirection"
|
||||
defs["structs"]["ImGuiTableColumnSortSpecs"][4]["type"] = "ImGuiSortDirection"
|
||||
defs["structs"]["ImGuiTableSortSpecs"] = {}
|
||||
defs["structs"]["ImGuiTableSortSpecs"][1] = {}
|
||||
defs["structs"]["ImGuiTableSortSpecs"][1]["name"] = "Specs"
|
||||
defs["structs"]["ImGuiTableSortSpecs"][1]["type"] = "const ImGuiTableColumnSortSpecs*"
|
||||
defs["structs"]["ImGuiTableSortSpecs"][2] = {}
|
||||
defs["structs"]["ImGuiTableSortSpecs"][2]["name"] = "SpecsCount"
|
||||
defs["structs"]["ImGuiTableSortSpecs"][2]["type"] = "int"
|
||||
defs["structs"]["ImGuiTableSortSpecs"][3] = {}
|
||||
defs["structs"]["ImGuiTableSortSpecs"][3]["name"] = "SpecsDirty"
|
||||
defs["structs"]["ImGuiTableSortSpecs"][3]["type"] = "bool"
|
||||
defs["structs"]["ImGuiTextBuffer"] = {}
|
||||
defs["structs"]["ImGuiTextBuffer"][1] = {}
|
||||
defs["structs"]["ImGuiTextBuffer"][1]["name"] = "Buf"
|
||||
|
||||
8
imgui-sys/third-party/typedefs_dict.json
vendored
8
imgui-sys/third-party/typedefs_dict.json
vendored
@ -3,6 +3,7 @@
|
||||
"ImDrawCallback": "void(*)(const ImDrawList* parent_list,const ImDrawCmd* cmd);",
|
||||
"ImDrawChannel": "struct ImDrawChannel",
|
||||
"ImDrawCmd": "struct ImDrawCmd",
|
||||
"ImDrawCmdHeader": "struct ImDrawCmdHeader",
|
||||
"ImDrawCornerFlags": "int",
|
||||
"ImDrawData": "struct ImDrawData",
|
||||
"ImDrawIdx": "unsigned short",
|
||||
@ -49,12 +50,19 @@
|
||||
"ImGuiSizeCallback": "void(*)(ImGuiSizeCallbackData* data);",
|
||||
"ImGuiSizeCallbackData": "struct ImGuiSizeCallbackData",
|
||||
"ImGuiSliderFlags": "int",
|
||||
"ImGuiSortDirection": "int",
|
||||
"ImGuiStorage": "struct ImGuiStorage",
|
||||
"ImGuiStoragePair": "struct ImGuiStoragePair",
|
||||
"ImGuiStyle": "struct ImGuiStyle",
|
||||
"ImGuiStyleVar": "int",
|
||||
"ImGuiTabBarFlags": "int",
|
||||
"ImGuiTabItemFlags": "int",
|
||||
"ImGuiTableBgTarget": "int",
|
||||
"ImGuiTableColumnFlags": "int",
|
||||
"ImGuiTableColumnSortSpecs": "struct ImGuiTableColumnSortSpecs",
|
||||
"ImGuiTableFlags": "int",
|
||||
"ImGuiTableRowFlags": "int",
|
||||
"ImGuiTableSortSpecs": "struct ImGuiTableSortSpecs",
|
||||
"ImGuiTextBuffer": "struct ImGuiTextBuffer",
|
||||
"ImGuiTextFilter": "struct ImGuiTextFilter",
|
||||
"ImGuiTextRange": "struct ImGuiTextRange",
|
||||
|
||||
8
imgui-sys/third-party/typedefs_dict.lua
vendored
8
imgui-sys/third-party/typedefs_dict.lua
vendored
@ -3,6 +3,7 @@ defs["ImColor"] = "struct ImColor"
|
||||
defs["ImDrawCallback"] = "void(*)(const ImDrawList* parent_list,const ImDrawCmd* cmd);"
|
||||
defs["ImDrawChannel"] = "struct ImDrawChannel"
|
||||
defs["ImDrawCmd"] = "struct ImDrawCmd"
|
||||
defs["ImDrawCmdHeader"] = "struct ImDrawCmdHeader"
|
||||
defs["ImDrawCornerFlags"] = "int"
|
||||
defs["ImDrawData"] = "struct ImDrawData"
|
||||
defs["ImDrawIdx"] = "unsigned short"
|
||||
@ -49,12 +50,19 @@ defs["ImGuiSelectableFlags"] = "int"
|
||||
defs["ImGuiSizeCallback"] = "void(*)(ImGuiSizeCallbackData* data);"
|
||||
defs["ImGuiSizeCallbackData"] = "struct ImGuiSizeCallbackData"
|
||||
defs["ImGuiSliderFlags"] = "int"
|
||||
defs["ImGuiSortDirection"] = "int"
|
||||
defs["ImGuiStorage"] = "struct ImGuiStorage"
|
||||
defs["ImGuiStoragePair"] = "struct ImGuiStoragePair"
|
||||
defs["ImGuiStyle"] = "struct ImGuiStyle"
|
||||
defs["ImGuiStyleVar"] = "int"
|
||||
defs["ImGuiTabBarFlags"] = "int"
|
||||
defs["ImGuiTabItemFlags"] = "int"
|
||||
defs["ImGuiTableBgTarget"] = "int"
|
||||
defs["ImGuiTableColumnFlags"] = "int"
|
||||
defs["ImGuiTableColumnSortSpecs"] = "struct ImGuiTableColumnSortSpecs"
|
||||
defs["ImGuiTableFlags"] = "int"
|
||||
defs["ImGuiTableRowFlags"] = "int"
|
||||
defs["ImGuiTableSortSpecs"] = "struct ImGuiTableSortSpecs"
|
||||
defs["ImGuiTextBuffer"] = "struct ImGuiTextBuffer"
|
||||
defs["ImGuiTextFilter"] = "struct ImGuiTextFilter"
|
||||
defs["ImGuiTextRange"] = "struct ImGuiTextRange"
|
||||
|
||||
@ -23,6 +23,7 @@ pub(crate) struct ClipboardContext {
|
||||
}
|
||||
|
||||
impl ClipboardContext {
|
||||
#[inline]
|
||||
pub fn new(backend: Box<dyn ClipboardBackend>) -> ClipboardContext {
|
||||
ClipboardContext {
|
||||
backend,
|
||||
|
||||
370
imgui/src/color.rs
Normal file
370
imgui/src/color.rs
Normal file
@ -0,0 +1,370 @@
|
||||
/// Wraps u32 that represents a packed RGBA color. Mostly used by types in the
|
||||
/// low level custom drawing API, such as [`DrawListMut`](crate::DrawListMut).
|
||||
///
|
||||
/// The bits of a color are in "`0xAABBGGRR`" format (e.g. RGBA as little endian
|
||||
/// bytes). For clarity: we don't support an equivalent to the
|
||||
/// `IMGUI_USE_BGRA_PACKED_COLOR` define.
|
||||
///
|
||||
/// This used to be named `ImColor32`, but was renamed to avoid confusion with
|
||||
/// the type with that name in the C++ API (which uses 32 bits per channel).
|
||||
///
|
||||
/// While it doesn't provide methods to access the fields, they can be accessed
|
||||
/// via the `Deref`/`DerefMut` impls it provides targeting
|
||||
/// [`imgui::color::ImColor32Fields`](crate::color::ImColor32Fields), which has
|
||||
/// no other meaningful uses.
|
||||
///
|
||||
/// # Example
|
||||
/// ```
|
||||
/// let mut c = imgui::ImColor32::from_rgba(0x80, 0xc0, 0x40, 0xff);
|
||||
/// assert_eq!(c.to_bits(), 0xff_40_c0_80); // Note: 0xAA_BB_GG_RR
|
||||
/// // Field access
|
||||
/// assert_eq!(c.r, 0x80);
|
||||
/// assert_eq!(c.g, 0xc0);
|
||||
/// assert_eq!(c.b, 0x40);
|
||||
/// assert_eq!(c.a, 0xff);
|
||||
/// c.b = 0xbb;
|
||||
/// assert_eq!(c.to_bits(), 0xff_bb_c0_80);
|
||||
/// ```
|
||||
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
||||
#[repr(transparent)]
|
||||
pub struct ImColor32(u32); // TBH maybe the wrapped field should be `pub`.
|
||||
|
||||
impl ImColor32 {
|
||||
/// Convenience constant for solid black.
|
||||
pub const BLACK: Self = Self(0xff_00_00_00);
|
||||
|
||||
/// Convenience constant for solid white.
|
||||
pub const WHITE: Self = Self(0xff_ff_ff_ff);
|
||||
|
||||
/// Convenience constant for full transparency.
|
||||
pub const TRANSPARENT: Self = Self(0);
|
||||
|
||||
/// Construct a color from 4 single-byte `u8` channel values, which should
|
||||
/// be between 0 and 255.
|
||||
#[inline]
|
||||
pub const fn from_rgba(r: u8, g: u8, b: u8, a: u8) -> Self {
|
||||
Self(
|
||||
((a as u32) << Self::A_SHIFT)
|
||||
| ((r as u32) << Self::R_SHIFT)
|
||||
| ((g as u32) << Self::G_SHIFT)
|
||||
| ((b as u32) << Self::B_SHIFT),
|
||||
)
|
||||
}
|
||||
|
||||
/// Construct a fully opaque color from 3 single-byte `u8` channel values.
|
||||
/// Same as [`Self::from_rgba`] with a == 255
|
||||
#[inline]
|
||||
pub const fn from_rgb(r: u8, g: u8, b: u8) -> Self {
|
||||
Self::from_rgba(r, g, b, 0xff)
|
||||
}
|
||||
|
||||
/// Construct a fully opaque color from 4 `f32` channel values in the range
|
||||
/// `0.0 ..= 1.0` (values outside this range are clamped to it, with NaN
|
||||
/// mapped to 0.0).
|
||||
///
|
||||
/// Note: No alpha premultiplication is done, so your input should be have
|
||||
/// premultiplied alpha if needed.
|
||||
#[inline]
|
||||
// not const fn because no float math in const eval yet 😩
|
||||
pub fn from_rgba_f32s(r: f32, g: f32, b: f32, a: f32) -> Self {
|
||||
Self::from_rgba(
|
||||
f32_to_u8_sat(r),
|
||||
f32_to_u8_sat(g),
|
||||
f32_to_u8_sat(b),
|
||||
f32_to_u8_sat(a),
|
||||
)
|
||||
}
|
||||
|
||||
/// Return the channels as an array of f32 in `[r, g, b, a]` order.
|
||||
#[inline]
|
||||
pub fn to_rgba_f32s(self) -> [f32; 4] {
|
||||
let &ImColor32Fields { r, g, b, a } = &*self;
|
||||
[
|
||||
u8_to_f32_sat(r),
|
||||
u8_to_f32_sat(g),
|
||||
u8_to_f32_sat(b),
|
||||
u8_to_f32_sat(a),
|
||||
]
|
||||
}
|
||||
|
||||
/// Return the channels as an array of u8 in `[r, g, b, a]` order.
|
||||
#[inline]
|
||||
pub fn to_rgba(self) -> [u8; 4] {
|
||||
let &ImColor32Fields { r, g, b, a } = &*self;
|
||||
[r, g, b, a]
|
||||
}
|
||||
|
||||
/// Equivalent to [`Self::from_rgba_f32s`], but with an alpha of 1.0 (e.g.
|
||||
/// opaque).
|
||||
#[inline]
|
||||
pub fn from_rgb_f32s(r: f32, g: f32, b: f32) -> Self {
|
||||
Self::from_rgba(f32_to_u8_sat(r), f32_to_u8_sat(g), f32_to_u8_sat(b), 0xff)
|
||||
}
|
||||
|
||||
/// Construct a color from the `u32` that makes up the bits in `0xAABBGGRR`
|
||||
/// format.
|
||||
///
|
||||
/// Specifically, this takes the RGBA values as a little-endian u32 with 8
|
||||
/// bits per channel.
|
||||
///
|
||||
/// Note that [`ImColor32::from_rgba`] may be a bit easier to use.
|
||||
#[inline]
|
||||
pub const fn from_bits(u: u32) -> Self {
|
||||
Self(u)
|
||||
}
|
||||
|
||||
/// Return the bits of the color as a u32. These are in "`0xAABBGGRR`" format, that
|
||||
/// is, little-endian RGBA with 8 bits per channel.
|
||||
#[inline]
|
||||
pub const fn to_bits(self) -> u32 {
|
||||
self.0
|
||||
}
|
||||
|
||||
// These are public in C++ ImGui, should they be public here?
|
||||
/// The number of bits to shift the byte of the red channel. Always 0.
|
||||
const R_SHIFT: u32 = 0;
|
||||
/// The number of bits to shift the byte of the green channel. Always 8.
|
||||
const G_SHIFT: u32 = 8;
|
||||
/// The number of bits to shift the byte of the blue channel. Always 16.
|
||||
const B_SHIFT: u32 = 16;
|
||||
/// The number of bits to shift the byte of the alpha channel. Always 24.
|
||||
const A_SHIFT: u32 = 24;
|
||||
}
|
||||
|
||||
impl Default for ImColor32 {
|
||||
#[inline]
|
||||
fn default() -> Self {
|
||||
Self::TRANSPARENT
|
||||
}
|
||||
}
|
||||
|
||||
impl std::fmt::Debug for ImColor32 {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
f.debug_struct("ImColor32")
|
||||
.field("r", &self.r)
|
||||
.field("g", &self.g)
|
||||
.field("b", &self.b)
|
||||
.field("a", &self.a)
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
/// A struct that exists to allow field access to [`ImColor32`]. It essentially
|
||||
/// exists to be a `Deref`/`DerefMut` target and provide field access.
|
||||
///
|
||||
/// Note that while this is repr(C), be aware that on big-endian machines
|
||||
/// (`cfg(target_endian = "big")`) the order of the fields is reversed, as this
|
||||
/// is a view into a packed u32.
|
||||
///
|
||||
/// Generally should not be used, except as the target of the `Deref` impl of
|
||||
/// [`ImColor32`].
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
#[repr(C, align(4))]
|
||||
// Should this be #[non_exhaustive] to discourage direct use?
|
||||
#[rustfmt::skip]
|
||||
pub struct ImColor32Fields {
|
||||
#[cfg(target_endian = "little")] pub r: u8,
|
||||
#[cfg(target_endian = "little")] pub g: u8,
|
||||
#[cfg(target_endian = "little")] pub b: u8,
|
||||
#[cfg(target_endian = "little")] pub a: u8,
|
||||
// TODO(someday): i guess we should have BE tests, but for now I verified
|
||||
// this locally.
|
||||
#[cfg(target_endian = "big")] pub a: u8,
|
||||
#[cfg(target_endian = "big")] pub b: u8,
|
||||
#[cfg(target_endian = "big")] pub g: u8,
|
||||
#[cfg(target_endian = "big")] pub r: u8,
|
||||
}
|
||||
|
||||
// We assume that big and little are the only endiannesses, and that exactly one
|
||||
// is set. That is, PDP endian is not in use, and the we aren't using a
|
||||
// completely broken custom target json or something.
|
||||
#[cfg(any(
|
||||
all(target_endian = "little", target_endian = "big"),
|
||||
all(not(target_endian = "little"), not(target_endian = "big")),
|
||||
))]
|
||||
compile_error!("`cfg(target_endian = \"little\")` must be `cfg(not(target_endian = \"big\")`");
|
||||
|
||||
// static assert sizes match
|
||||
const _: [(); core::mem::size_of::<ImColor32>()] = [(); core::mem::size_of::<ImColor32Fields>()];
|
||||
const _: [(); core::mem::align_of::<ImColor32>()] = [(); core::mem::align_of::<ImColor32Fields>()];
|
||||
|
||||
impl core::ops::Deref for ImColor32 {
|
||||
type Target = ImColor32Fields;
|
||||
#[inline]
|
||||
fn deref(&self) -> &ImColor32Fields {
|
||||
// Safety: we statically assert the size and align match, and neither
|
||||
// type has any special invariants.
|
||||
unsafe { &*(self as *const Self as *const ImColor32Fields) }
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for ImColor32 {
|
||||
#[inline]
|
||||
fn deref_mut(&mut self) -> &mut ImColor32Fields {
|
||||
// Safety: we statically assert the size and align match, and neither
|
||||
// type has any special invariants.
|
||||
unsafe { &mut *(self as *mut Self as *mut ImColor32Fields) }
|
||||
}
|
||||
}
|
||||
|
||||
impl From<ImColor32> for u32 {
|
||||
#[inline]
|
||||
fn from(color: ImColor32) -> Self {
|
||||
color.0
|
||||
}
|
||||
}
|
||||
|
||||
impl From<u32> for ImColor32 {
|
||||
#[inline]
|
||||
fn from(color: u32) -> Self {
|
||||
ImColor32(color)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<[f32; 4]> for ImColor32 {
|
||||
#[inline]
|
||||
fn from(v: [f32; 4]) -> Self {
|
||||
Self::from_rgba_f32s(v[0], v[1], v[2], v[3])
|
||||
}
|
||||
}
|
||||
|
||||
impl From<(f32, f32, f32, f32)> for ImColor32 {
|
||||
#[inline]
|
||||
fn from(v: (f32, f32, f32, f32)) -> Self {
|
||||
Self::from_rgba_f32s(v.0, v.1, v.2, v.3)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<[f32; 3]> for ImColor32 {
|
||||
#[inline]
|
||||
fn from(v: [f32; 3]) -> Self {
|
||||
Self::from_rgb_f32s(v[0], v[1], v[2])
|
||||
}
|
||||
}
|
||||
|
||||
impl From<(f32, f32, f32)> for ImColor32 {
|
||||
fn from(v: (f32, f32, f32)) -> Self {
|
||||
Self::from_rgb_f32s(v.0, v.1, v.2)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<ImColor32> for [f32; 4] {
|
||||
#[inline]
|
||||
fn from(v: ImColor32) -> Self {
|
||||
v.to_rgba_f32s()
|
||||
}
|
||||
}
|
||||
impl From<ImColor32> for (f32, f32, f32, f32) {
|
||||
#[inline]
|
||||
fn from(color: ImColor32) -> Self {
|
||||
let [r, g, b, a]: [f32; 4] = color.into();
|
||||
(r, g, b, a)
|
||||
}
|
||||
}
|
||||
|
||||
// These utilities might be worth making `pub` as free functions in
|
||||
// `crate::color` so user code can ensure their numeric handling is
|
||||
// consistent...
|
||||
|
||||
/// Clamp `v` to between 0.0 and 1.0, always returning a value between those.
|
||||
///
|
||||
/// Never returns NaN, or -0.0 — instead returns +0.0 for these (We differ from
|
||||
/// C++ Dear ImGUI here which probably is just ignoring values like these).
|
||||
#[inline]
|
||||
pub(crate) fn saturate(v: f32) -> f32 {
|
||||
// Note: written strangely so that special values (NaN/-0.0) are handled
|
||||
// automatically with no extra checks.
|
||||
if v > 0.0 {
|
||||
if v <= 1.0 {
|
||||
v
|
||||
} else {
|
||||
1.0
|
||||
}
|
||||
} else {
|
||||
0.0
|
||||
}
|
||||
}
|
||||
|
||||
/// Quantize a value in `0.0..=1.0` to `0..=u8::MAX`. Input outside 0.0..=1.0 is
|
||||
/// clamped. Uses a bias of 0.5, because we assume centered quantization is used
|
||||
/// (and because C++ imgui does it too). See:
|
||||
/// - https://github.com/ocornut/imgui/blob/e28b51786eae60f32c18214658c15952639085a2/imgui_internal.h#L218
|
||||
/// - https://cbloomrants.blogspot.com/2020/09/topics-in-quantization-for-games.html
|
||||
/// (see `quantize_centered`)
|
||||
#[inline]
|
||||
pub(crate) fn f32_to_u8_sat(f: f32) -> u8 {
|
||||
let f = saturate(f) * 255.0 + 0.5;
|
||||
// Safety: `saturate`'s result is between 0.0 and 1.0 (never NaN even for
|
||||
// NaN input), and so for all inputs, `saturate(f) * 255.0 + 0.5` is inside
|
||||
// `0.5 ..= 255.5`.
|
||||
//
|
||||
// This is verified for all f32 in `test_f32_to_u8_sat_exhaustive`.
|
||||
//
|
||||
// Also note that LLVM doesn't bother trying to figure this out so the
|
||||
// unchecked does actually help. (That said, this likely doesn't matter
|
||||
// for imgui-rs, but I had this code in another project and it felt
|
||||
// silly to needlessly pessimize it).
|
||||
unsafe { f.to_int_unchecked() }
|
||||
}
|
||||
|
||||
/// Opposite of `f32_to_u8_sat`. Since we assume centered quantization, this is
|
||||
/// equivalent to dividing by 255 (or, multiplying by 1.0/255.0)
|
||||
#[inline]
|
||||
pub(crate) fn u8_to_f32_sat(u: u8) -> f32 {
|
||||
(u as f32) * (1.0 / 255.0)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn check_sat() {
|
||||
assert_eq!(saturate(1.0), 1.0);
|
||||
assert_eq!(saturate(0.5), 0.5);
|
||||
assert_eq!(saturate(0.0), 0.0);
|
||||
assert_eq!(saturate(-1.0), 0.0);
|
||||
// next float from 1.0
|
||||
assert_eq!(saturate(1.0 + f32::EPSILON), 1.0);
|
||||
// prev float from 0.0 (Well, from -0.0)
|
||||
assert_eq!(saturate(-f32::MIN_POSITIVE), 0.0);
|
||||
// some NaNs.
|
||||
assert_eq!(saturate(f32::NAN), 0.0);
|
||||
assert_eq!(saturate(-f32::NAN), 0.0);
|
||||
// neg zero comes through as +0
|
||||
assert_eq!(saturate(-0.0).to_bits(), 0.0f32.to_bits());
|
||||
}
|
||||
|
||||
// Check that the unsafe in `f32_to_u8_sat` is fine for all f32 (and that the
|
||||
// comments I wrote about `saturate` are actually true). This is way too slow in
|
||||
// debug mode, but finishes in ~15s on my machine for release (just this test).
|
||||
// This is tested in CI, but will only run if invoked manually with something
|
||||
// like: `cargo test -p imgui --release -- --ignored`.
|
||||
#[test]
|
||||
#[ignore]
|
||||
fn test_f32_to_u8_sat_exhaustive() {
|
||||
for f in (0..=u32::MAX).map(f32::from_bits) {
|
||||
let v = saturate(f);
|
||||
assert!(
|
||||
(0.0..=1.0).contains(&v) && (v.to_bits() != (-0.0f32).to_bits()),
|
||||
"sat({} [e.g. {:#x}]) => {} [e.g {:#x}]",
|
||||
f,
|
||||
f.to_bits(),
|
||||
v,
|
||||
v.to_bits(),
|
||||
);
|
||||
let sat = v * 255.0 + 0.5;
|
||||
// Note: This checks what's required by is the safety predicate for
|
||||
// `f32::to_int_unchecked`:
|
||||
// https://doc.rust-lang.org/std/primitive.f32.html#method.to_int_unchecked
|
||||
assert!(
|
||||
sat.trunc() >= 0.0 && sat.trunc() <= (u8::MAX as f32) && sat.is_finite(),
|
||||
"f32_to_u8_sat({} [e.g. {:#x}]) would be UB!",
|
||||
f,
|
||||
f.to_bits(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_saturate_all_u8s() {
|
||||
for u in 0..=u8::MAX {
|
||||
let v = f32_to_u8_sat(u8_to_f32_sat(u));
|
||||
assert_eq!(u, v);
|
||||
}
|
||||
}
|
||||
@ -1,56 +1,11 @@
|
||||
use sys::{ImDrawList, ImU32};
|
||||
use crate::ImColor32;
|
||||
use sys::ImDrawList;
|
||||
|
||||
use super::Ui;
|
||||
use crate::legacy::ImDrawCornerFlags;
|
||||
|
||||
use std::marker::PhantomData;
|
||||
|
||||
/// Wrap `ImU32` (a type typically used by ImGui to store packed colors)
|
||||
/// This type is used to represent the color of drawing primitives in ImGui's
|
||||
/// custom drawing API.
|
||||
///
|
||||
/// The type implements `From<ImU32>`, `From<ImVec4>`, `From<[f32; 4]>`,
|
||||
/// `From<[f32; 3]>`, `From<(f32, f32, f32, f32)>` and `From<(f32, f32, f32)>`
|
||||
/// for convenience. If alpha is not provided, it is assumed to be 1.0 (255).
|
||||
#[derive(Copy, Clone, Eq, PartialEq, Debug)]
|
||||
pub struct ImColor(ImU32);
|
||||
|
||||
impl From<ImColor> for ImU32 {
|
||||
fn from(color: ImColor) -> Self {
|
||||
color.0
|
||||
}
|
||||
}
|
||||
|
||||
impl From<ImU32> for ImColor {
|
||||
fn from(color: ImU32) -> Self {
|
||||
ImColor(color)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<[f32; 4]> for ImColor {
|
||||
fn from(v: [f32; 4]) -> Self {
|
||||
ImColor(unsafe { sys::igColorConvertFloat4ToU32(v.into()) })
|
||||
}
|
||||
}
|
||||
|
||||
impl From<(f32, f32, f32, f32)> for ImColor {
|
||||
fn from(v: (f32, f32, f32, f32)) -> Self {
|
||||
ImColor(unsafe { sys::igColorConvertFloat4ToU32(v.into()) })
|
||||
}
|
||||
}
|
||||
|
||||
impl From<[f32; 3]> for ImColor {
|
||||
fn from(v: [f32; 3]) -> Self {
|
||||
[v[0], v[1], v[2], 1.0].into()
|
||||
}
|
||||
}
|
||||
|
||||
impl From<(f32, f32, f32)> for ImColor {
|
||||
fn from(v: (f32, f32, f32)) -> Self {
|
||||
[v.0, v.1, v.2, 1.0].into()
|
||||
}
|
||||
}
|
||||
|
||||
/// Object implementing the custom draw API.
|
||||
///
|
||||
/// Called from [`Ui::get_window_draw_list`], [`Ui::get_background_draw_list`] or [`Ui::get_foreground_draw_list`].
|
||||
@ -167,7 +122,7 @@ impl<'ui> DrawListMut<'ui> {
|
||||
/// Returns a line from point `p1` to `p2` with color `c`.
|
||||
pub fn add_line<C>(&'ui self, p1: [f32; 2], p2: [f32; 2], c: C) -> Line<'ui>
|
||||
where
|
||||
C: Into<ImColor>,
|
||||
C: Into<ImColor32>,
|
||||
{
|
||||
Line::new(self, p1, p2, c)
|
||||
}
|
||||
@ -176,7 +131,7 @@ impl<'ui> DrawListMut<'ui> {
|
||||
/// and lower-right corner is at point `p2`, with color `c`.
|
||||
pub fn add_rect<C>(&'ui self, p1: [f32; 2], p2: [f32; 2], c: C) -> Rect<'ui>
|
||||
where
|
||||
C: Into<ImColor>,
|
||||
C: Into<ImColor32>,
|
||||
{
|
||||
Rect::new(self, p1, p2, c)
|
||||
}
|
||||
@ -195,10 +150,10 @@ impl<'ui> DrawListMut<'ui> {
|
||||
col_bot_right: C3,
|
||||
col_bot_left: C4,
|
||||
) where
|
||||
C1: Into<ImColor>,
|
||||
C2: Into<ImColor>,
|
||||
C3: Into<ImColor>,
|
||||
C4: Into<ImColor>,
|
||||
C1: Into<ImColor32>,
|
||||
C2: Into<ImColor32>,
|
||||
C3: Into<ImColor32>,
|
||||
C4: Into<ImColor32>,
|
||||
{
|
||||
unsafe {
|
||||
sys::ImDrawList_AddRectFilledMultiColor(
|
||||
@ -223,7 +178,7 @@ impl<'ui> DrawListMut<'ui> {
|
||||
c: C,
|
||||
) -> Triangle<'ui>
|
||||
where
|
||||
C: Into<ImColor>,
|
||||
C: Into<ImColor32>,
|
||||
{
|
||||
Triangle::new(self, p1, p2, p3, c)
|
||||
}
|
||||
@ -231,7 +186,7 @@ impl<'ui> DrawListMut<'ui> {
|
||||
/// Returns a circle with the given `center`, `radius` and `color`.
|
||||
pub fn add_circle<C>(&'ui self, center: [f32; 2], radius: f32, color: C) -> Circle<'ui>
|
||||
where
|
||||
C: Into<ImColor>,
|
||||
C: Into<ImColor32>,
|
||||
{
|
||||
Circle::new(self, center, radius, color)
|
||||
}
|
||||
@ -239,7 +194,7 @@ impl<'ui> DrawListMut<'ui> {
|
||||
/// Draw a text whose upper-left corner is at point `pos`.
|
||||
pub fn add_text<C, T>(&self, pos: [f32; 2], col: C, text: T)
|
||||
where
|
||||
C: Into<ImColor>,
|
||||
C: Into<ImColor32>,
|
||||
T: AsRef<str>,
|
||||
{
|
||||
use std::os::raw::c_char;
|
||||
@ -263,7 +218,7 @@ impl<'ui> DrawListMut<'ui> {
|
||||
color: C,
|
||||
) -> BezierCurve<'ui>
|
||||
where
|
||||
C: Into<ImColor>,
|
||||
C: Into<ImColor32>,
|
||||
{
|
||||
BezierCurve::new(self, pos0, cp0, cp1, pos1, color)
|
||||
}
|
||||
@ -301,7 +256,7 @@ impl<'ui> DrawListMut<'ui> {
|
||||
pub struct Line<'ui> {
|
||||
p1: [f32; 2],
|
||||
p2: [f32; 2],
|
||||
color: ImColor,
|
||||
color: ImColor32,
|
||||
thickness: f32,
|
||||
draw_list: &'ui DrawListMut<'ui>,
|
||||
}
|
||||
@ -309,7 +264,7 @@ pub struct Line<'ui> {
|
||||
impl<'ui> Line<'ui> {
|
||||
fn new<C>(draw_list: &'ui DrawListMut, p1: [f32; 2], p2: [f32; 2], c: C) -> Self
|
||||
where
|
||||
C: Into<ImColor>,
|
||||
C: Into<ImColor32>,
|
||||
{
|
||||
Self {
|
||||
p1,
|
||||
@ -345,7 +300,7 @@ impl<'ui> Line<'ui> {
|
||||
pub struct Rect<'ui> {
|
||||
p1: [f32; 2],
|
||||
p2: [f32; 2],
|
||||
color: ImColor,
|
||||
color: ImColor32,
|
||||
rounding: f32,
|
||||
flags: ImDrawCornerFlags,
|
||||
thickness: f32,
|
||||
@ -356,7 +311,7 @@ pub struct Rect<'ui> {
|
||||
impl<'ui> Rect<'ui> {
|
||||
fn new<C>(draw_list: &'ui DrawListMut, p1: [f32; 2], p2: [f32; 2], c: C) -> Self
|
||||
where
|
||||
C: Into<ImColor>,
|
||||
C: Into<ImColor32>,
|
||||
{
|
||||
Self {
|
||||
p1,
|
||||
@ -448,7 +403,7 @@ pub struct Triangle<'ui> {
|
||||
p1: [f32; 2],
|
||||
p2: [f32; 2],
|
||||
p3: [f32; 2],
|
||||
color: ImColor,
|
||||
color: ImColor32,
|
||||
thickness: f32,
|
||||
filled: bool,
|
||||
draw_list: &'ui DrawListMut<'ui>,
|
||||
@ -457,7 +412,7 @@ pub struct Triangle<'ui> {
|
||||
impl<'ui> Triangle<'ui> {
|
||||
fn new<C>(draw_list: &'ui DrawListMut, p1: [f32; 2], p2: [f32; 2], p3: [f32; 2], c: C) -> Self
|
||||
where
|
||||
C: Into<ImColor>,
|
||||
C: Into<ImColor32>,
|
||||
{
|
||||
Self {
|
||||
p1,
|
||||
@ -514,7 +469,7 @@ impl<'ui> Triangle<'ui> {
|
||||
pub struct Circle<'ui> {
|
||||
center: [f32; 2],
|
||||
radius: f32,
|
||||
color: ImColor,
|
||||
color: ImColor32,
|
||||
num_segments: u32,
|
||||
thickness: f32,
|
||||
filled: bool,
|
||||
@ -524,7 +479,7 @@ pub struct Circle<'ui> {
|
||||
impl<'ui> Circle<'ui> {
|
||||
pub fn new<C>(draw_list: &'ui DrawListMut, center: [f32; 2], radius: f32, color: C) -> Self
|
||||
where
|
||||
C: Into<ImColor>,
|
||||
C: Into<ImColor32>,
|
||||
{
|
||||
Self {
|
||||
center,
|
||||
@ -590,7 +545,7 @@ pub struct BezierCurve<'ui> {
|
||||
cp0: [f32; 2],
|
||||
pos1: [f32; 2],
|
||||
cp1: [f32; 2],
|
||||
color: ImColor,
|
||||
color: ImColor32,
|
||||
thickness: f32,
|
||||
/// If num_segments is not set, the bezier curve is auto-tessalated.
|
||||
num_segments: Option<u32>,
|
||||
@ -607,7 +562,7 @@ impl<'ui> BezierCurve<'ui> {
|
||||
c: C,
|
||||
) -> Self
|
||||
where
|
||||
C: Into<ImColor>,
|
||||
C: Into<ImColor32>,
|
||||
{
|
||||
Self {
|
||||
pos0,
|
||||
@ -637,7 +592,7 @@ impl<'ui> BezierCurve<'ui> {
|
||||
/// Draw the curve on the window.
|
||||
pub fn build(self) {
|
||||
unsafe {
|
||||
sys::ImDrawList_AddBezierCurve(
|
||||
sys::ImDrawList_AddBezierCubic(
|
||||
self.draw_list.draw_list,
|
||||
self.pos0.into(),
|
||||
self.cp0.into(),
|
||||
|
||||
@ -80,6 +80,7 @@ pub enum FocusedWidget {
|
||||
}
|
||||
|
||||
impl FocusedWidget {
|
||||
#[inline]
|
||||
fn as_offset(self) -> i32 {
|
||||
match self {
|
||||
FocusedWidget::Previous => -1,
|
||||
@ -94,12 +95,14 @@ impl<'ui> Ui<'ui> {
|
||||
/// Returns the key index of the given key identifier.
|
||||
///
|
||||
/// Equivalent to indexing the Io struct `key_map` field: `ui.io().key_map[key]`
|
||||
#[inline]
|
||||
fn key_index(&self, key: Key) -> i32 {
|
||||
unsafe { sys::igGetKeyIndex(key as i32) }
|
||||
}
|
||||
/// Returns true if the key is being held.
|
||||
///
|
||||
/// Equivalent to indexing the Io struct `keys_down` field: `ui.io().keys_down[key_index]`
|
||||
#[inline]
|
||||
pub fn is_key_down(&self, key: Key) -> bool {
|
||||
let key_index = self.key_index(key);
|
||||
unsafe { sys::igIsKeyDown(key_index) }
|
||||
@ -107,11 +110,13 @@ impl<'ui> Ui<'ui> {
|
||||
/// Returns true if the key was pressed (went from !down to down).
|
||||
///
|
||||
/// Affected by key repeat settings (`io.key_repeat_delay`, `io.key_repeat_rate`)
|
||||
#[inline]
|
||||
pub fn is_key_pressed(&self, key: Key) -> bool {
|
||||
let key_index = self.key_index(key);
|
||||
unsafe { sys::igIsKeyPressed(key_index, true) }
|
||||
}
|
||||
/// Returns true if the key was released (went from down to !down)
|
||||
#[inline]
|
||||
pub fn is_key_released(&self, key: Key) -> bool {
|
||||
let key_index = self.key_index(key);
|
||||
unsafe { sys::igIsKeyReleased(key_index) }
|
||||
@ -120,11 +125,13 @@ impl<'ui> Ui<'ui> {
|
||||
///
|
||||
/// Usually returns 0 or 1, but might be >1 if `rate` is small enough that `io.delta_time` >
|
||||
/// `rate`.
|
||||
#[inline]
|
||||
pub fn key_pressed_amount(&self, key: Key, repeat_delay: f32, rate: f32) -> u32 {
|
||||
let key_index = self.key_index(key);
|
||||
unsafe { sys::igGetKeyPressedAmount(key_index, repeat_delay, rate) as u32 }
|
||||
}
|
||||
/// Focuses keyboard on a widget relative to current position
|
||||
#[inline]
|
||||
pub fn set_keyboard_focus_here(&self, target_widget: FocusedWidget) {
|
||||
unsafe {
|
||||
sys::igSetKeyboardFocusHere(target_widget.as_offset());
|
||||
|
||||
@ -36,6 +36,11 @@ fn test_mouse_button_variants() {
|
||||
/// Mouse cursor type identifier
|
||||
#[repr(i32)]
|
||||
#[derive(Copy, Clone, Debug, Hash, Eq, PartialEq)]
|
||||
// TODO: this should just be `#[allow(clippy::upper_case_acronyms)]`, but doing
|
||||
// so in a way that works before it stabilizes is a pain (in part because
|
||||
// `unknown_clippy_lints` was renamed to unknown_lints). Oh well, it's over a
|
||||
// small amount of code.
|
||||
#[allow(warnings)]
|
||||
pub enum MouseCursor {
|
||||
Arrow = sys::ImGuiMouseCursor_Arrow,
|
||||
/// Automatically used when hovering over text inputs, etc.
|
||||
|
||||
@ -12,6 +12,7 @@ pub struct ImVector<T> {
|
||||
}
|
||||
|
||||
impl<T> ImVector<T> {
|
||||
#[inline]
|
||||
pub fn as_slice(&self) -> &[T] {
|
||||
unsafe { slice::from_raw_parts(self.data, self.size as usize) }
|
||||
}
|
||||
@ -71,6 +72,7 @@ pub unsafe trait RawCast<T>: Sized {
|
||||
/// # Safety
|
||||
///
|
||||
/// It is up to the caller to guarantee the cast is valid.
|
||||
#[inline]
|
||||
unsafe fn from_raw(raw: &T) -> &Self {
|
||||
&*(raw as *const _ as *const Self)
|
||||
}
|
||||
@ -79,6 +81,7 @@ pub unsafe trait RawCast<T>: Sized {
|
||||
/// # Safety
|
||||
///
|
||||
/// It is up to the caller to guarantee the cast is valid.
|
||||
#[inline]
|
||||
unsafe fn from_raw_mut(raw: &mut T) -> &mut Self {
|
||||
&mut *(raw as *mut _ as *mut Self)
|
||||
}
|
||||
@ -87,6 +90,7 @@ pub unsafe trait RawCast<T>: Sized {
|
||||
/// # Safety
|
||||
///
|
||||
/// It is up to the caller to guarantee the cast is valid.
|
||||
#[inline]
|
||||
unsafe fn raw(&self) -> &T {
|
||||
&*(self as *const _ as *const T)
|
||||
}
|
||||
@ -95,6 +99,7 @@ pub unsafe trait RawCast<T>: Sized {
|
||||
/// # Safety
|
||||
///
|
||||
/// It is up to the caller to guarantee the cast is valid.
|
||||
#[inline]
|
||||
unsafe fn raw_mut(&mut self) -> &mut T {
|
||||
&mut *(self as *mut _ as *mut T)
|
||||
}
|
||||
@ -182,27 +187,33 @@ pub trait InclusiveRangeBounds<T: Copy> {
|
||||
}
|
||||
|
||||
impl<T: Copy> InclusiveRangeBounds<T> for RangeFrom<T> {
|
||||
#[inline]
|
||||
fn start_bound(&self) -> Option<&T> {
|
||||
Some(&self.start)
|
||||
}
|
||||
#[inline]
|
||||
fn end_bound(&self) -> Option<&T> {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Copy> InclusiveRangeBounds<T> for RangeInclusive<T> {
|
||||
#[inline]
|
||||
fn start_bound(&self) -> Option<&T> {
|
||||
Some(self.start())
|
||||
}
|
||||
#[inline]
|
||||
fn end_bound(&self) -> Option<&T> {
|
||||
Some(self.end())
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Copy> InclusiveRangeBounds<T> for RangeToInclusive<T> {
|
||||
#[inline]
|
||||
fn start_bound(&self) -> Option<&T> {
|
||||
None
|
||||
}
|
||||
#[inline]
|
||||
fn end_bound(&self) -> Option<&T> {
|
||||
Some(&self.end)
|
||||
}
|
||||
|
||||
@ -188,6 +188,10 @@ pub struct Io {
|
||||
pub config_mac_os_behaviors: bool,
|
||||
/// Set to false to disable blinking cursor
|
||||
pub config_input_text_cursor_blink: bool,
|
||||
/// Enable turning DragXXX widgets into text input with a simple mouse
|
||||
/// click-release (without moving). Not desirable on devices without a
|
||||
/// keyboard.
|
||||
pub config_drag_click_to_input_text: bool,
|
||||
/// Enable resizing of windows from their edges and from the lower-left corner.
|
||||
///
|
||||
/// Requires `HasMouserCursors` in `backend_flags`, because it needs mouse cursor feedback.
|
||||
@ -196,10 +200,10 @@ pub struct Io {
|
||||
///
|
||||
/// Windows without a title bar are not affected.
|
||||
pub config_windows_move_from_title_bar_only: bool,
|
||||
/// Compact window memory usage when unused.
|
||||
/// Compact memory usage when unused.
|
||||
///
|
||||
/// Set to -1.0 to disable.
|
||||
pub config_windows_memory_compact_timer: f32,
|
||||
pub config_memory_compact_timer: f32,
|
||||
|
||||
pub(crate) backend_platform_name: *const c_char,
|
||||
pub(crate) backend_renderer_name: *const c_char,
|
||||
@ -213,8 +217,6 @@ pub struct Io {
|
||||
pub(crate) clipboard_user_data: *mut c_void,
|
||||
ime_set_input_screen_pos_fn: Option<unsafe extern "C" fn(x: c_int, y: c_int)>,
|
||||
ime_window_handle: *mut c_void,
|
||||
render_draw_lists_fn_unused: *mut c_void,
|
||||
|
||||
/// Mouse position, in pixels.
|
||||
///
|
||||
/// Set to [f32::MAX, f32::MAX] if mouse is unavailable (on another screen, etc.).
|
||||
@ -438,7 +440,6 @@ fn test_io_memory_layout() {
|
||||
assert_field_offset!(clipboard_user_data, ClipboardUserData);
|
||||
assert_field_offset!(ime_set_input_screen_pos_fn, ImeSetInputScreenPosFn);
|
||||
assert_field_offset!(ime_window_handle, ImeWindowHandle);
|
||||
assert_field_offset!(render_draw_lists_fn_unused, RenderDrawListsFnUnused);
|
||||
assert_field_offset!(mouse_pos, MousePos);
|
||||
assert_field_offset!(mouse_down, MouseDown);
|
||||
assert_field_offset!(mouse_wheel, MouseWheel);
|
||||
|
||||
@ -9,9 +9,10 @@ use std::str;
|
||||
use std::thread;
|
||||
|
||||
pub use self::clipboard::*;
|
||||
pub use self::color::ImColor32;
|
||||
pub use self::context::*;
|
||||
pub use self::drag_drop::{DragDropFlags, DragDropSource, DragDropTarget};
|
||||
pub use self::draw_list::{ChannelsSplit, DrawListMut, ImColor};
|
||||
pub use self::draw_list::{ChannelsSplit, DrawListMut};
|
||||
pub use self::fonts::atlas::*;
|
||||
pub use self::fonts::font::*;
|
||||
pub use self::fonts::glyph::*;
|
||||
@ -50,7 +51,11 @@ pub use self::window::child_window::*;
|
||||
pub use self::window::*;
|
||||
use internal::RawCast;
|
||||
|
||||
#[macro_use]
|
||||
mod string;
|
||||
|
||||
mod clipboard;
|
||||
pub mod color;
|
||||
mod columns;
|
||||
mod context;
|
||||
pub mod drag_drop;
|
||||
@ -68,7 +73,6 @@ mod plotlines;
|
||||
mod popup_modal;
|
||||
mod render;
|
||||
mod stacks;
|
||||
mod string;
|
||||
mod style;
|
||||
#[cfg(test)]
|
||||
mod test;
|
||||
@ -76,6 +80,11 @@ mod utils;
|
||||
mod widget;
|
||||
mod window;
|
||||
|
||||
// Used by macros. Underscores are just to make it clear it's not part of the
|
||||
// public API.
|
||||
#[doc(hidden)]
|
||||
pub use core as __core;
|
||||
|
||||
/// Returns the underlying Dear ImGui library version
|
||||
pub fn dear_imgui_version() -> &'static str {
|
||||
unsafe {
|
||||
@ -86,7 +95,8 @@ pub fn dear_imgui_version() -> &'static str {
|
||||
|
||||
#[test]
|
||||
fn test_version() {
|
||||
assert_eq!(dear_imgui_version(), "1.79");
|
||||
// TODO: what's the point of this test?
|
||||
assert_eq!(dear_imgui_version(), "1.80");
|
||||
}
|
||||
|
||||
impl Context {
|
||||
@ -199,24 +209,28 @@ pub enum Id<'a> {
|
||||
}
|
||||
|
||||
impl From<i32> for Id<'static> {
|
||||
#[inline]
|
||||
fn from(i: i32) -> Self {
|
||||
Id::Int(i)
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, T: ?Sized + AsRef<str>> From<&'a T> for Id<'a> {
|
||||
#[inline]
|
||||
fn from(s: &'a T) -> Self {
|
||||
Id::Str(s.as_ref())
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> From<*const T> for Id<'static> {
|
||||
#[inline]
|
||||
fn from(p: *const T) -> Self {
|
||||
Id::Ptr(p as *const c_void)
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> From<*mut T> for Id<'static> {
|
||||
#[inline]
|
||||
fn from(p: *mut T) -> Self {
|
||||
Id::Ptr(p as *const T as *const c_void)
|
||||
}
|
||||
|
||||
@ -10,14 +10,14 @@ pub struct ListClipper {
|
||||
}
|
||||
|
||||
impl ListClipper {
|
||||
pub fn new(items_count: i32) -> Self {
|
||||
pub const fn new(items_count: i32) -> Self {
|
||||
ListClipper {
|
||||
items_count,
|
||||
items_height: -1.0,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn items_height(mut self, items_height: f32) -> Self {
|
||||
pub const fn items_height(mut self, items_height: f32) -> Self {
|
||||
self.items_height = items_height;
|
||||
self
|
||||
}
|
||||
|
||||
@ -17,7 +17,7 @@ pub struct PlotHistogram<'ui, 'p> {
|
||||
}
|
||||
|
||||
impl<'ui, 'p> PlotHistogram<'ui, 'p> {
|
||||
pub fn new(_: &Ui<'ui>, label: &'p ImStr, values: &'p [f32]) -> Self {
|
||||
pub const fn new(_: &Ui<'ui>, label: &'p ImStr, values: &'p [f32]) -> Self {
|
||||
PlotHistogram {
|
||||
label,
|
||||
values,
|
||||
@ -31,31 +31,31 @@ impl<'ui, 'p> PlotHistogram<'ui, 'p> {
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn values_offset(mut self, values_offset: usize) -> Self {
|
||||
pub const fn values_offset(mut self, values_offset: usize) -> Self {
|
||||
self.values_offset = values_offset;
|
||||
self
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn overlay_text(mut self, overlay_text: &'p ImStr) -> Self {
|
||||
pub const fn overlay_text(mut self, overlay_text: &'p ImStr) -> Self {
|
||||
self.overlay_text = Some(overlay_text);
|
||||
self
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn scale_min(mut self, scale_min: f32) -> Self {
|
||||
pub const fn scale_min(mut self, scale_min: f32) -> Self {
|
||||
self.scale_min = scale_min;
|
||||
self
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn scale_max(mut self, scale_max: f32) -> Self {
|
||||
pub const fn scale_max(mut self, scale_max: f32) -> Self {
|
||||
self.scale_max = scale_max;
|
||||
self
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn graph_size(mut self, graph_size: [f32; 2]) -> Self {
|
||||
pub const fn graph_size(mut self, graph_size: [f32; 2]) -> Self {
|
||||
self.graph_size = graph_size;
|
||||
self
|
||||
}
|
||||
|
||||
@ -17,7 +17,7 @@ pub struct PlotLines<'ui, 'p> {
|
||||
}
|
||||
|
||||
impl<'ui, 'p> PlotLines<'ui, 'p> {
|
||||
pub fn new(_: &Ui<'ui>, label: &'p ImStr, values: &'p [f32]) -> Self {
|
||||
pub const fn new(_: &Ui<'ui>, label: &'p ImStr, values: &'p [f32]) -> Self {
|
||||
PlotLines {
|
||||
label,
|
||||
values,
|
||||
@ -31,31 +31,31 @@ impl<'ui, 'p> PlotLines<'ui, 'p> {
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn values_offset(mut self, values_offset: usize) -> Self {
|
||||
pub const fn values_offset(mut self, values_offset: usize) -> Self {
|
||||
self.values_offset = values_offset;
|
||||
self
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn overlay_text(mut self, overlay_text: &'p ImStr) -> Self {
|
||||
pub const fn overlay_text(mut self, overlay_text: &'p ImStr) -> Self {
|
||||
self.overlay_text = Some(overlay_text);
|
||||
self
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn scale_min(mut self, scale_min: f32) -> Self {
|
||||
pub const fn scale_min(mut self, scale_min: f32) -> Self {
|
||||
self.scale_min = scale_min;
|
||||
self
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn scale_max(mut self, scale_max: f32) -> Self {
|
||||
pub const fn scale_max(mut self, scale_max: f32) -> Self {
|
||||
self.scale_max = scale_max;
|
||||
self
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn graph_size(mut self, graph_size: [f32; 2]) -> Self {
|
||||
pub const fn graph_size(mut self, graph_size: [f32; 2]) -> Self {
|
||||
self.graph_size = graph_size;
|
||||
self
|
||||
}
|
||||
|
||||
@ -36,6 +36,7 @@ unsafe impl RawCast<sys::ImDrawData> for DrawData {}
|
||||
|
||||
impl DrawData {
|
||||
/// Returns an iterator over the draw lists included in the draw data.
|
||||
#[inline]
|
||||
pub fn draw_lists(&self) -> DrawListIterator {
|
||||
unsafe {
|
||||
DrawListIterator {
|
||||
@ -44,10 +45,12 @@ impl DrawData {
|
||||
}
|
||||
}
|
||||
/// Returns the number of draw lists included in the draw data.
|
||||
#[inline]
|
||||
pub fn draw_lists_count(&self) -> usize {
|
||||
use std::convert::TryInto;
|
||||
self.cmd_lists_count.try_into().unwrap()
|
||||
}
|
||||
#[inline]
|
||||
pub(crate) unsafe fn cmd_lists(&self) -> &[*const DrawList] {
|
||||
slice::from_raw_parts(
|
||||
self.cmd_lists as *const *const DrawList,
|
||||
@ -124,21 +127,25 @@ pub struct DrawList(sys::ImDrawList);
|
||||
|
||||
impl RawWrapper for DrawList {
|
||||
type Raw = sys::ImDrawList;
|
||||
#[inline]
|
||||
unsafe fn raw(&self) -> &sys::ImDrawList {
|
||||
&self.0
|
||||
}
|
||||
#[inline]
|
||||
unsafe fn raw_mut(&mut self) -> &mut sys::ImDrawList {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
|
||||
impl DrawList {
|
||||
#[inline]
|
||||
pub(crate) unsafe fn cmd_buffer(&self) -> &[sys::ImDrawCmd] {
|
||||
slice::from_raw_parts(
|
||||
self.0.CmdBuffer.Data as *const sys::ImDrawCmd,
|
||||
self.0.CmdBuffer.Size as usize,
|
||||
)
|
||||
}
|
||||
#[inline]
|
||||
pub fn idx_buffer(&self) -> &[DrawIdx] {
|
||||
unsafe {
|
||||
slice::from_raw_parts(
|
||||
@ -147,6 +154,7 @@ impl DrawList {
|
||||
)
|
||||
}
|
||||
}
|
||||
#[inline]
|
||||
pub fn vtx_buffer(&self) -> &[DrawVert] {
|
||||
unsafe {
|
||||
slice::from_raw_parts(
|
||||
@ -170,6 +178,7 @@ impl DrawList {
|
||||
slice::from_raw_parts(self.0.VtxBuffer.Data.cast(), self.0.VtxBuffer.Size as usize)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn commands(&self) -> DrawCmdIterator {
|
||||
unsafe {
|
||||
DrawCmdIterator {
|
||||
@ -186,6 +195,7 @@ pub struct DrawCmdIterator<'a> {
|
||||
impl<'a> Iterator for DrawCmdIterator<'a> {
|
||||
type Item = DrawCmd;
|
||||
|
||||
#[inline]
|
||||
fn next(&mut self) -> Option<Self::Item> {
|
||||
self.iter.next().map(|cmd| {
|
||||
let cmd_params = DrawCmdParams {
|
||||
|
||||
@ -7,29 +7,34 @@ pub struct TextureId(usize);
|
||||
|
||||
impl TextureId {
|
||||
/// Creates a new texture id with the given identifier.
|
||||
pub fn new(id: usize) -> Self {
|
||||
#[inline]
|
||||
pub const fn new(id: usize) -> Self {
|
||||
Self(id)
|
||||
}
|
||||
|
||||
/// Returns the id of the TextureId.
|
||||
pub fn id(self) -> usize {
|
||||
#[inline]
|
||||
pub const fn id(self) -> usize {
|
||||
self.0
|
||||
}
|
||||
}
|
||||
|
||||
impl From<usize> for TextureId {
|
||||
#[inline]
|
||||
fn from(id: usize) -> Self {
|
||||
TextureId(id)
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> From<*const T> for TextureId {
|
||||
#[inline]
|
||||
fn from(ptr: *const T) -> Self {
|
||||
TextureId(ptr as usize)
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> From<*mut T> for TextureId {
|
||||
#[inline]
|
||||
fn from(ptr: *mut T) -> Self {
|
||||
TextureId(ptr as usize)
|
||||
}
|
||||
@ -56,6 +61,8 @@ pub struct Textures<T> {
|
||||
}
|
||||
|
||||
impl<T> Textures<T> {
|
||||
// TODO: hasher like rustc_hash::FxHashMap or something would let this be
|
||||
// `const fn`
|
||||
pub fn new() -> Self {
|
||||
Textures {
|
||||
textures: HashMap::new(),
|
||||
|
||||
@ -272,7 +272,7 @@ impl<'ui> Ui<'ui> {
|
||||
/// the right side)
|
||||
pub fn push_item_width(&self, item_width: f32) -> ItemWidthStackToken {
|
||||
unsafe { sys::igPushItemWidth(item_width) };
|
||||
ItemWidthStackToken { ctx: self.ctx }
|
||||
ItemWidthStackToken { _ctx: self.ctx }
|
||||
}
|
||||
/// Sets the width of the next item.
|
||||
///
|
||||
@ -298,7 +298,7 @@ impl<'ui> Ui<'ui> {
|
||||
/// - `< 0.0`: no wrapping
|
||||
pub fn push_text_wrap_pos(&self, wrap_pos_x: f32) -> TextWrapPosStackToken {
|
||||
unsafe { sys::igPushTextWrapPos(wrap_pos_x) };
|
||||
TextWrapPosStackToken { ctx: self.ctx }
|
||||
TextWrapPosStackToken { _ctx: self.ctx }
|
||||
}
|
||||
/// Changes an item flag by pushing a change to the item flag stack.
|
||||
///
|
||||
@ -311,7 +311,7 @@ impl<'ui> Ui<'ui> {
|
||||
}
|
||||
ItemFlagsStackToken {
|
||||
discriminant: mem::discriminant(&item_flag),
|
||||
ctx: self.ctx,
|
||||
_ctx: self.ctx,
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -325,26 +325,26 @@ pub enum ItemFlag {
|
||||
|
||||
/// Tracks a change pushed to the item width stack
|
||||
pub struct ItemWidthStackToken {
|
||||
ctx: *const Context,
|
||||
_ctx: *const Context,
|
||||
}
|
||||
|
||||
impl ItemWidthStackToken {
|
||||
/// Pops a change from the item width stack
|
||||
pub fn pop(mut self, _: &Ui) {
|
||||
self.ctx = ptr::null();
|
||||
self._ctx = ptr::null();
|
||||
unsafe { sys::igPopItemWidth() };
|
||||
}
|
||||
}
|
||||
|
||||
/// Tracks a change pushed to the text wrap position stack
|
||||
pub struct TextWrapPosStackToken {
|
||||
ctx: *const Context,
|
||||
_ctx: *const Context,
|
||||
}
|
||||
|
||||
impl TextWrapPosStackToken {
|
||||
/// Pops a change from the text wrap position stack
|
||||
pub fn pop(mut self, _: &Ui) {
|
||||
self.ctx = ptr::null();
|
||||
self._ctx = ptr::null();
|
||||
unsafe { sys::igPopTextWrapPos() };
|
||||
}
|
||||
}
|
||||
@ -352,13 +352,13 @@ impl TextWrapPosStackToken {
|
||||
/// Tracks a change pushed to the item flags stack
|
||||
pub struct ItemFlagsStackToken {
|
||||
discriminant: mem::Discriminant<ItemFlag>,
|
||||
ctx: *const Context,
|
||||
_ctx: *const Context,
|
||||
}
|
||||
|
||||
impl ItemFlagsStackToken {
|
||||
/// Pops a change from the item flags stack
|
||||
pub fn pop(mut self, _: &Ui) {
|
||||
self.ctx = ptr::null();
|
||||
self._ctx = ptr::null();
|
||||
const ALLOW_KEYBOARD_FOCUS: ItemFlag = ItemFlag::AllowKeyboardFocus(true);
|
||||
const BUTTON_REPEAT: ItemFlag = ItemFlag::ButtonRepeat(true);
|
||||
|
||||
|
||||
@ -7,19 +7,34 @@ use std::str;
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! im_str {
|
||||
($e:tt) => ({
|
||||
unsafe {
|
||||
$crate::ImStr::from_utf8_with_nul_unchecked(concat!($e, "\0").as_bytes())
|
||||
($e:literal $(,)?) => {{
|
||||
const __INPUT: &str = concat!($e, "\0");
|
||||
{
|
||||
// Trigger a compile error if there's an interior NUL character.
|
||||
const _CHECK_NUL: [(); 0] = [(); {
|
||||
let bytes = __INPUT.as_bytes();
|
||||
let mut i = 0;
|
||||
let mut found_nul = 0;
|
||||
while i < bytes.len() - 1 && found_nul == 0 {
|
||||
if bytes[i] == 0 {
|
||||
found_nul = 1;
|
||||
}
|
||||
i += 1;
|
||||
}
|
||||
found_nul
|
||||
}];
|
||||
const RESULT: &'static $crate::ImStr = unsafe {
|
||||
$crate::__core::mem::transmute::<&'static [u8], &'static $crate::ImStr>(__INPUT.as_bytes())
|
||||
};
|
||||
RESULT
|
||||
}
|
||||
}};
|
||||
($e:literal, $($arg:tt)+) => ({
|
||||
$crate::ImString::new(format!($e, $($arg)*))
|
||||
});
|
||||
($e:tt, $($arg:tt)*) => ({
|
||||
unsafe {
|
||||
$crate::ImString::from_utf8_with_nul_unchecked(format!(concat!($e, "\0"), $($arg)*).into_bytes())
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/// A UTF-8 encoded, growable, implicitly null-terminated string.
|
||||
/// A UTF-8 encoded, growable, implicitly nul-terminated string.
|
||||
#[derive(Clone, Hash, Ord, Eq, PartialOrd, PartialEq)]
|
||||
pub struct ImString(pub(crate) Vec<u8>);
|
||||
|
||||
@ -32,42 +47,54 @@ impl ImString {
|
||||
s
|
||||
}
|
||||
}
|
||||
|
||||
/// Creates a new empty `ImString` with a particular capacity
|
||||
#[inline]
|
||||
pub fn with_capacity(capacity: usize) -> ImString {
|
||||
let mut v = Vec::with_capacity(capacity + 1);
|
||||
v.push(b'\0');
|
||||
ImString(v)
|
||||
}
|
||||
|
||||
/// Converts a vector of bytes to a `ImString` without checking that the string contains valid
|
||||
/// UTF-8
|
||||
///
|
||||
/// # Safety
|
||||
///
|
||||
/// It is up to the caller to guarantee the vector contains valid UTF-8 and no null terminator.
|
||||
#[inline]
|
||||
pub unsafe fn from_utf8_unchecked(mut v: Vec<u8>) -> ImString {
|
||||
v.push(b'\0');
|
||||
ImString(v)
|
||||
}
|
||||
|
||||
/// Converts a vector of bytes to a `ImString` without checking that the string contains valid
|
||||
/// UTF-8
|
||||
///
|
||||
/// # Safety
|
||||
///
|
||||
/// It is up to the caller to guarantee the vector contains valid UTF-8 and a null terminator.
|
||||
#[inline]
|
||||
pub unsafe fn from_utf8_with_nul_unchecked(v: Vec<u8>) -> ImString {
|
||||
ImString(v)
|
||||
}
|
||||
|
||||
/// Truncates this `ImString`, removing all contents
|
||||
#[inline]
|
||||
pub fn clear(&mut self) {
|
||||
self.0.clear();
|
||||
self.0.push(b'\0');
|
||||
}
|
||||
|
||||
/// Appends the given character to the end of this `ImString`
|
||||
#[inline]
|
||||
pub fn push(&mut self, ch: char) {
|
||||
let mut buf = [0; 4];
|
||||
self.push_str(ch.encode_utf8(&mut buf));
|
||||
}
|
||||
|
||||
/// Appends a given string slice to the end of this `ImString`
|
||||
#[inline]
|
||||
pub fn push_str(&mut self, string: &str) {
|
||||
self.0.pop();
|
||||
self.0.extend(string.bytes());
|
||||
@ -76,14 +103,19 @@ impl ImString {
|
||||
self.refresh_len();
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns the capacity of this `ImString` in bytes
|
||||
#[inline]
|
||||
pub fn capacity(&self) -> usize {
|
||||
self.0.capacity() - 1
|
||||
}
|
||||
|
||||
/// Returns the capacity of this `ImString` in bytes, including the implicit null byte
|
||||
#[inline]
|
||||
pub fn capacity_with_nul(&self) -> usize {
|
||||
self.0.capacity()
|
||||
}
|
||||
|
||||
/// Ensures that the capacity of this `ImString` is at least `additional` bytes larger than the
|
||||
/// current length.
|
||||
///
|
||||
@ -91,21 +123,27 @@ impl ImString {
|
||||
pub fn reserve(&mut self, additional: usize) {
|
||||
self.0.reserve(additional);
|
||||
}
|
||||
|
||||
/// Ensures that the capacity of this `ImString` is at least `additional` bytes larger than the
|
||||
/// current length
|
||||
pub fn reserve_exact(&mut self, additional: usize) {
|
||||
self.0.reserve_exact(additional);
|
||||
}
|
||||
|
||||
/// Returns a raw pointer to the underlying buffer
|
||||
#[inline]
|
||||
pub fn as_ptr(&self) -> *const c_char {
|
||||
self.0.as_ptr() as *const c_char
|
||||
}
|
||||
|
||||
/// Returns a raw mutable pointer to the underlying buffer.
|
||||
///
|
||||
/// If the underlying data is modified, `refresh_len` *must* be called afterwards.
|
||||
#[inline]
|
||||
pub fn as_mut_ptr(&mut self) -> *mut c_char {
|
||||
self.0.as_mut_ptr() as *mut c_char
|
||||
}
|
||||
|
||||
/// Updates the underlying buffer length based on the current contents.
|
||||
///
|
||||
/// This function *must* be called if the underlying data is modified via a pointer
|
||||
@ -115,6 +153,7 @@ impl ImString {
|
||||
///
|
||||
/// It is up to the caller to guarantee the this ImString contains valid UTF-8 and a null
|
||||
/// terminator.
|
||||
#[inline]
|
||||
pub unsafe fn refresh_len(&mut self) {
|
||||
let len = CStr::from_ptr(self.0.as_ptr() as *const c_char)
|
||||
.to_bytes_with_nul()
|
||||
@ -124,54 +163,63 @@ impl ImString {
|
||||
}
|
||||
|
||||
impl<'a> Default for ImString {
|
||||
#[inline]
|
||||
fn default() -> ImString {
|
||||
ImString(vec![b'\0'])
|
||||
}
|
||||
}
|
||||
|
||||
impl From<String> for ImString {
|
||||
#[inline]
|
||||
fn from(s: String) -> ImString {
|
||||
ImString::new(s)
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> From<ImString> for Cow<'a, ImStr> {
|
||||
#[inline]
|
||||
fn from(s: ImString) -> Cow<'a, ImStr> {
|
||||
Cow::Owned(s)
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> From<&'a ImString> for Cow<'a, ImStr> {
|
||||
#[inline]
|
||||
fn from(s: &'a ImString) -> Cow<'a, ImStr> {
|
||||
Cow::Borrowed(s)
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, T: ?Sized + AsRef<ImStr>> From<&'a T> for ImString {
|
||||
#[inline]
|
||||
fn from(s: &'a T) -> ImString {
|
||||
s.as_ref().to_owned()
|
||||
}
|
||||
}
|
||||
|
||||
impl AsRef<ImStr> for ImString {
|
||||
#[inline]
|
||||
fn as_ref(&self) -> &ImStr {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
impl Borrow<ImStr> for ImString {
|
||||
#[inline]
|
||||
fn borrow(&self) -> &ImStr {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
impl AsRef<str> for ImString {
|
||||
#[inline]
|
||||
fn as_ref(&self) -> &str {
|
||||
self.to_str()
|
||||
}
|
||||
}
|
||||
|
||||
impl Borrow<str> for ImString {
|
||||
#[inline]
|
||||
fn borrow(&self) -> &str {
|
||||
self.to_str()
|
||||
}
|
||||
@ -179,18 +227,21 @@ impl Borrow<str> for ImString {
|
||||
|
||||
impl Index<RangeFull> for ImString {
|
||||
type Output = ImStr;
|
||||
#[inline]
|
||||
fn index(&self, _index: RangeFull) -> &ImStr {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Debug for ImString {
|
||||
#[inline]
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
fmt::Debug::fmt(self.to_str(), f)
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for ImString {
|
||||
#[inline]
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
fmt::Display::fmt(self.to_str(), f)
|
||||
}
|
||||
@ -198,6 +249,7 @@ impl fmt::Display for ImString {
|
||||
|
||||
impl Deref for ImString {
|
||||
type Target = ImStr;
|
||||
#[inline]
|
||||
fn deref(&self) -> &ImStr {
|
||||
// as_ptr() is used, because we need to look at the bytes to figure out the length
|
||||
// self.0.len() is incorrect, because there might be more than one nul byte in the end, or
|
||||
@ -222,11 +274,13 @@ impl fmt::Write for ImString {
|
||||
}
|
||||
}
|
||||
|
||||
/// A UTF-8 encoded, implicitly null-terminated string slice.
|
||||
/// A UTF-8 encoded, implicitly nul-terminated string slice.
|
||||
#[derive(Hash, PartialEq, Eq, PartialOrd, Ord)]
|
||||
pub struct ImStr(CStr);
|
||||
#[repr(transparent)]
|
||||
pub struct ImStr([u8]);
|
||||
|
||||
impl<'a> Default for &'a ImStr {
|
||||
#[inline]
|
||||
fn default() -> &'a ImStr {
|
||||
static SLICE: &[u8] = &[0];
|
||||
unsafe { ImStr::from_utf8_with_nul_unchecked(SLICE) }
|
||||
@ -234,12 +288,14 @@ impl<'a> Default for &'a ImStr {
|
||||
}
|
||||
|
||||
impl fmt::Debug for ImStr {
|
||||
#[inline]
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
fmt::Debug::fmt(&self.0, f)
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for ImStr {
|
||||
#[inline]
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
fmt::Display::fmt(self.to_str(), f)
|
||||
}
|
||||
@ -252,60 +308,91 @@ impl ImStr {
|
||||
///
|
||||
/// It is up to the caller to guarantee the pointer is not null and it points to a
|
||||
/// null-terminated UTF-8 string valid for the duration of the arbitrary lifetime 'a.
|
||||
#[inline]
|
||||
pub unsafe fn from_ptr_unchecked<'a>(ptr: *const c_char) -> &'a ImStr {
|
||||
ImStr::from_cstr_unchecked(CStr::from_ptr(ptr))
|
||||
}
|
||||
|
||||
/// Converts a slice of bytes to an imgui-rs string slice without checking for valid UTF-8 or
|
||||
/// null termination.
|
||||
///
|
||||
/// # Safety
|
||||
///
|
||||
/// It is up to the caller to guarantee the slice contains valid UTF-8 and a null terminator.
|
||||
#[inline]
|
||||
pub unsafe fn from_utf8_with_nul_unchecked(bytes: &[u8]) -> &ImStr {
|
||||
&*(bytes as *const [u8] as *const ImStr)
|
||||
}
|
||||
|
||||
/// Converts a CStr reference to an imgui-rs string slice without checking for valid UTF-8.
|
||||
///
|
||||
/// # Safety
|
||||
///
|
||||
/// It is up to the caller to guarantee the CStr reference contains valid UTF-8.
|
||||
#[inline]
|
||||
pub unsafe fn from_cstr_unchecked(value: &CStr) -> &ImStr {
|
||||
&*(value as *const CStr as *const ImStr)
|
||||
&*(value.to_bytes_with_nul() as *const [u8] as *const ImStr)
|
||||
}
|
||||
|
||||
/// Converts an imgui-rs string slice to a raw pointer
|
||||
#[inline]
|
||||
pub fn as_ptr(&self) -> *const c_char {
|
||||
self.0.as_ptr()
|
||||
self.0.as_ptr() as *const c_char
|
||||
}
|
||||
|
||||
/// Converts an imgui-rs string slice to a normal string slice
|
||||
#[inline]
|
||||
pub fn to_str(&self) -> &str {
|
||||
// CStr::to_bytes does *not* include the null terminator
|
||||
unsafe { str::from_utf8_unchecked(self.0.to_bytes()) }
|
||||
self.sanity_check();
|
||||
unsafe { str::from_utf8_unchecked(&self.0[..(self.0.len() - 1)]) }
|
||||
}
|
||||
|
||||
/// Returns true if the imgui-rs string slice is empty
|
||||
#[inline]
|
||||
pub fn is_empty(&self) -> bool {
|
||||
self.0.to_bytes().is_empty()
|
||||
debug_assert!(self.0.len() != 0);
|
||||
self.0.len() == 1
|
||||
}
|
||||
|
||||
// TODO: if this is too slow, avoid the UTF8 validation except if we'd
|
||||
// already be doing O(n) stuff.
|
||||
#[inline]
|
||||
fn sanity_check(&self) {
|
||||
debug_assert!(
|
||||
str::from_utf8(&self.0).is_ok()
|
||||
&& !self.0.is_empty()
|
||||
&& !self.0[..(self.0.len() - 1)].contains(&0u8)
|
||||
&& self.0[self.0.len() - 1] == 0,
|
||||
"bad ImStr: {:?}",
|
||||
&self.0
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
impl AsRef<CStr> for ImStr {
|
||||
#[inline]
|
||||
fn as_ref(&self) -> &CStr {
|
||||
&self.0
|
||||
// Safety: our safety requirements are a superset of CStr's, so this is fine
|
||||
unsafe { CStr::from_bytes_with_nul_unchecked(&self.0) }
|
||||
}
|
||||
}
|
||||
|
||||
impl AsRef<ImStr> for ImStr {
|
||||
#[inline]
|
||||
fn as_ref(&self) -> &ImStr {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
impl AsRef<str> for ImStr {
|
||||
#[inline]
|
||||
fn as_ref(&self) -> &str {
|
||||
self.to_str()
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> From<&'a ImStr> for Cow<'a, ImStr> {
|
||||
#[inline]
|
||||
fn from(s: &'a ImStr) -> Cow<'a, ImStr> {
|
||||
Cow::Borrowed(s)
|
||||
}
|
||||
@ -313,8 +400,10 @@ impl<'a> From<&'a ImStr> for Cow<'a, ImStr> {
|
||||
|
||||
impl ToOwned for ImStr {
|
||||
type Owned = ImString;
|
||||
#[inline]
|
||||
fn to_owned(&self) -> ImString {
|
||||
ImString(self.0.to_owned().into_bytes())
|
||||
self.sanity_check();
|
||||
ImString(self.0.to_owned())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -62,6 +62,8 @@ pub struct Style {
|
||||
/// Horizontal and vertical spacing between elements of a composed widget (e.g. a slider and
|
||||
/// its label)
|
||||
pub item_inner_spacing: [f32; 2],
|
||||
/// Padding within a table cell.
|
||||
pub cell_padding: [f32; 2],
|
||||
/// Expand reactive bounding box for touch-based system where touch position is not accurate
|
||||
/// enough.
|
||||
///
|
||||
@ -144,7 +146,7 @@ pub struct Style {
|
||||
/// Decrease for higher quality but more geometry.
|
||||
pub circle_segment_max_error: f32,
|
||||
/// Style colors.
|
||||
pub colors: [[f32; 4]; 48],
|
||||
pub colors: [[f32; 4]; StyleColor::COUNT],
|
||||
}
|
||||
|
||||
unsafe impl RawCast<sys::ImGuiStyle> for Style {}
|
||||
@ -182,12 +184,14 @@ impl Style {
|
||||
|
||||
impl Index<StyleColor> for Style {
|
||||
type Output = [f32; 4];
|
||||
#[inline]
|
||||
fn index(&self, index: StyleColor) -> &[f32; 4] {
|
||||
&self.colors[index as usize]
|
||||
}
|
||||
}
|
||||
|
||||
impl IndexMut<StyleColor> for Style {
|
||||
#[inline]
|
||||
fn index_mut(&mut self, index: StyleColor) -> &mut [f32; 4] {
|
||||
&mut self.colors[index as usize]
|
||||
}
|
||||
@ -243,6 +247,11 @@ pub enum StyleColor {
|
||||
PlotLinesHovered = sys::ImGuiCol_PlotLinesHovered,
|
||||
PlotHistogram = sys::ImGuiCol_PlotHistogram,
|
||||
PlotHistogramHovered = sys::ImGuiCol_PlotHistogramHovered,
|
||||
TableHeaderBg = sys::ImGuiCol_TableHeaderBg,
|
||||
TableBorderStrong = sys::ImGuiCol_TableBorderStrong,
|
||||
TableBorderLight = sys::ImGuiCol_TableBorderLight,
|
||||
TableRowBg = sys::ImGuiCol_TableRowBg,
|
||||
TableRowBgAlt = sys::ImGuiCol_TableRowBgAlt,
|
||||
TextSelectedBg = sys::ImGuiCol_TextSelectedBg,
|
||||
DragDropTarget = sys::ImGuiCol_DragDropTarget,
|
||||
/// Gamepad/keyboard: current highlighted item
|
||||
@ -300,6 +309,11 @@ impl StyleColor {
|
||||
StyleColor::PlotLinesHovered,
|
||||
StyleColor::PlotHistogram,
|
||||
StyleColor::PlotHistogramHovered,
|
||||
StyleColor::TableHeaderBg,
|
||||
StyleColor::TableBorderStrong,
|
||||
StyleColor::TableBorderLight,
|
||||
StyleColor::TableRowBg,
|
||||
StyleColor::TableRowBgAlt,
|
||||
StyleColor::TextSelectedBg,
|
||||
StyleColor::DragDropTarget,
|
||||
StyleColor::NavHighlight,
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
#![allow(clippy::clippy::float_cmp)]
|
||||
use bitflags::bitflags;
|
||||
|
||||
use crate::input::mouse::MouseButton;
|
||||
|
||||
@ -25,12 +25,14 @@ impl<'a> EditableColor<'a> {
|
||||
}
|
||||
|
||||
impl<'a> From<&'a mut [f32; 3]> for EditableColor<'a> {
|
||||
#[inline]
|
||||
fn from(value: &'a mut [f32; 3]) -> EditableColor<'a> {
|
||||
EditableColor::Float3(value)
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> From<&'a mut [f32; 4]> for EditableColor<'a> {
|
||||
#[inline]
|
||||
fn from(value: &'a mut [f32; 4]) -> EditableColor<'a> {
|
||||
EditableColor::Float4(value)
|
||||
}
|
||||
@ -40,20 +42,38 @@ impl<'a> From<&'a mut [f32; 4]> for EditableColor<'a> {
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
|
||||
pub enum ColorEditInputMode {
|
||||
/// Edit as RGB(A).
|
||||
RGB,
|
||||
Rgb,
|
||||
/// Edit as HSV(A).
|
||||
HSV,
|
||||
Hsv,
|
||||
}
|
||||
|
||||
impl ColorEditInputMode {
|
||||
// Note: Probably no point in deprecating these since they're ~0 maintance burden.
|
||||
/// Edit as RGB(A). Alias for [`Self::Rgb`] for backwards-compatibility.
|
||||
pub const RGB: Self = Self::Rgb;
|
||||
/// Edit as HSV(A). Alias for [`Self::Hsv`] for backwards-compatibility.
|
||||
pub const HSV: Self = Self::Hsv;
|
||||
}
|
||||
|
||||
/// Color editor display mode.
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
|
||||
pub enum ColorEditDisplayMode {
|
||||
/// Display as RGB(A).
|
||||
RGB,
|
||||
Rgb,
|
||||
/// Display as HSV(A).
|
||||
HSV,
|
||||
/// Display as hex (e.g. #AABBCC(DD))
|
||||
HEX,
|
||||
Hsv,
|
||||
/// Display as hex (e.g. `#AABBCC(DD)`)
|
||||
Hex,
|
||||
}
|
||||
|
||||
impl ColorEditDisplayMode {
|
||||
// Note: Probably no point in deprecating these since they're ~0 maintance burden.
|
||||
/// Display as RGB(A). Alias for [`Self::Rgb`] for backwards-compatibility.
|
||||
pub const RGB: Self = Self::Rgb;
|
||||
/// Display as HSV(A). Alias for [`Self::Hsv`] for backwards-compatibility.
|
||||
pub const HSV: Self = Self::Hsv;
|
||||
/// Display as hex. Alias for [`Self::Hex`] for backwards-compatibility.
|
||||
pub const HEX: Self = Self::Hex;
|
||||
}
|
||||
|
||||
/// Color picker hue/saturation/value editor mode
|
||||
|
||||
@ -66,25 +66,28 @@ pub struct ComboBox<'a> {
|
||||
|
||||
impl<'a> ComboBox<'a> {
|
||||
/// Constructs a new combo box builder.
|
||||
pub fn new(label: &'a ImStr) -> ComboBox<'a> {
|
||||
pub const fn new(label: &'a ImStr) -> ComboBox<'a> {
|
||||
ComboBox {
|
||||
label,
|
||||
preview_value: None,
|
||||
flags: ComboBoxFlags::empty(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Sets the preview value displayed in the preview box (if visible).
|
||||
#[inline]
|
||||
pub fn preview_value(mut self, preview_value: &'a ImStr) -> Self {
|
||||
pub const fn preview_value(mut self, preview_value: &'a ImStr) -> Self {
|
||||
self.preview_value = Some(preview_value);
|
||||
self
|
||||
}
|
||||
|
||||
/// Replaces all current settings with the given flags.
|
||||
#[inline]
|
||||
pub fn flags(mut self, flags: ComboBoxFlags) -> Self {
|
||||
pub const fn flags(mut self, flags: ComboBoxFlags) -> Self {
|
||||
self.flags = flags;
|
||||
self
|
||||
}
|
||||
|
||||
/// Enables/disables aligning the combo box popup toward the left.
|
||||
///
|
||||
/// Disabled by default.
|
||||
@ -94,6 +97,7 @@ impl<'a> ComboBox<'a> {
|
||||
.set(ComboBoxFlags::POPUP_ALIGN_LEFT, popup_align_left);
|
||||
self
|
||||
}
|
||||
|
||||
/// Sets the combo box height.
|
||||
///
|
||||
/// Default: `ComboBoxHeight::Regular`
|
||||
@ -113,6 +117,7 @@ impl<'a> ComboBox<'a> {
|
||||
);
|
||||
self
|
||||
}
|
||||
|
||||
/// Sets the combo box preview mode.
|
||||
///
|
||||
/// Default: `ComboBoxPreviewMode::Full`
|
||||
@ -128,6 +133,7 @@ impl<'a> ComboBox<'a> {
|
||||
);
|
||||
self
|
||||
}
|
||||
|
||||
/// Creates a combo box and starts appending to it.
|
||||
///
|
||||
/// Returns `Some(ComboBoxToken)` if the combo box is open. After content has been
|
||||
|
||||
@ -18,7 +18,7 @@ pub struct Image {
|
||||
|
||||
impl Image {
|
||||
/// Creates a new image builder with the given texture and size
|
||||
pub fn new(texture_id: TextureId, size: [f32; 2]) -> Image {
|
||||
pub const fn new(texture_id: TextureId, size: [f32; 2]) -> Image {
|
||||
Image {
|
||||
texture_id,
|
||||
size,
|
||||
@ -29,27 +29,27 @@ impl Image {
|
||||
}
|
||||
}
|
||||
/// Sets the image size
|
||||
pub fn size(mut self, size: [f32; 2]) -> Self {
|
||||
pub const fn size(mut self, size: [f32; 2]) -> Self {
|
||||
self.size = size;
|
||||
self
|
||||
}
|
||||
/// Sets uv0 (default `[0.0, 0.0]`)
|
||||
pub fn uv0(mut self, uv0: [f32; 2]) -> Self {
|
||||
pub const fn uv0(mut self, uv0: [f32; 2]) -> Self {
|
||||
self.uv0 = uv0;
|
||||
self
|
||||
}
|
||||
/// Sets uv1 (default `[1.0, 1.0]`)
|
||||
pub fn uv1(mut self, uv1: [f32; 2]) -> Self {
|
||||
pub const fn uv1(mut self, uv1: [f32; 2]) -> Self {
|
||||
self.uv1 = uv1;
|
||||
self
|
||||
}
|
||||
/// Sets the tint color (default: no tint color)
|
||||
pub fn tint_col(mut self, tint_col: [f32; 4]) -> Self {
|
||||
pub const fn tint_col(mut self, tint_col: [f32; 4]) -> Self {
|
||||
self.tint_col = tint_col;
|
||||
self
|
||||
}
|
||||
/// Sets the border color (default: no border)
|
||||
pub fn border_col(mut self, border_col: [f32; 4]) -> Self {
|
||||
pub const fn border_col(mut self, border_col: [f32; 4]) -> Self {
|
||||
self.border_col = border_col;
|
||||
self
|
||||
}
|
||||
|
||||
@ -9,9 +9,7 @@ use crate::Ui;
|
||||
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
enum Size {
|
||||
Vec {
|
||||
size: sys::ImVec2,
|
||||
},
|
||||
Vec(sys::ImVec2),
|
||||
Items {
|
||||
items_count: i32,
|
||||
height_in_items: i32,
|
||||
@ -27,12 +25,10 @@ pub struct ListBox<'a> {
|
||||
|
||||
impl<'a> ListBox<'a> {
|
||||
/// Constructs a new list box builder.
|
||||
pub fn new(label: &'a ImStr) -> ListBox<'a> {
|
||||
pub const fn new(label: &'a ImStr) -> ListBox<'a> {
|
||||
ListBox {
|
||||
label,
|
||||
size: Size::Vec {
|
||||
size: [0.0, 0.0].into(),
|
||||
},
|
||||
size: Size::Vec(sys::ImVec2::zero()),
|
||||
}
|
||||
}
|
||||
/// Sets the list box size based on the number of items that you want to make visible
|
||||
@ -40,13 +36,14 @@ impl<'a> ListBox<'a> {
|
||||
/// We add +25% worth of item height to allow the user to see at a glance if there are more items up/down, without looking at the scrollbar.
|
||||
/// We don't add this extra bit if items_count <= height_in_items. It is slightly dodgy, because it means a dynamic list of items will make the widget resize occasionally when it crosses that size.
|
||||
#[inline]
|
||||
pub fn calculate_size(mut self, items_count: i32, height_in_items: i32) -> Self {
|
||||
pub const fn calculate_size(mut self, items_count: i32, height_in_items: i32) -> Self {
|
||||
self.size = Size::Items {
|
||||
items_count,
|
||||
height_in_items,
|
||||
};
|
||||
self
|
||||
}
|
||||
|
||||
/// Sets the list box size based on the given width and height
|
||||
/// If width or height are 0 or smaller, a default value is calculated
|
||||
/// Helper to calculate the size of a listbox and display a label on the right.
|
||||
@ -54,8 +51,8 @@ impl<'a> ListBox<'a> {
|
||||
///
|
||||
/// Default: [0.0, 0.0], in which case the combobox calculates a sensible width and height
|
||||
#[inline]
|
||||
pub fn size(mut self, size: [f32; 2]) -> Self {
|
||||
self.size = Size::Vec { size: size.into() };
|
||||
pub const fn size(mut self, size: [f32; 2]) -> Self {
|
||||
self.size = Size::Vec(sys::ImVec2::new(size[0], size[1]));
|
||||
self
|
||||
}
|
||||
/// Creates a list box and starts appending to it.
|
||||
@ -68,7 +65,7 @@ impl<'a> ListBox<'a> {
|
||||
pub fn begin(self, ui: &Ui) -> Option<ListBoxToken> {
|
||||
let should_render = unsafe {
|
||||
match self.size {
|
||||
Size::Vec { size } => sys::igListBoxHeaderVec2(self.label.as_ptr(), size),
|
||||
Size::Vec(size) => sys::igListBoxHeaderVec2(self.label.as_ptr(), size),
|
||||
Size::Items {
|
||||
items_count,
|
||||
height_in_items,
|
||||
|
||||
@ -31,16 +31,18 @@ impl<'a> ProgressBar<'a> {
|
||||
///
|
||||
/// The progress bar will be automatically sized to fill the entire width of the window if no
|
||||
/// custom size is specified.
|
||||
pub fn new(fraction: f32) -> ProgressBar<'a> {
|
||||
#[inline]
|
||||
pub const fn new(fraction: f32) -> ProgressBar<'a> {
|
||||
ProgressBar {
|
||||
fraction,
|
||||
size: [-1.0, 0.0],
|
||||
overlay_text: None,
|
||||
}
|
||||
}
|
||||
|
||||
/// Sets an optional text that will be drawn over the progress bar.
|
||||
#[inline]
|
||||
pub fn overlay_text(mut self, overlay_text: &'a ImStr) -> ProgressBar {
|
||||
pub const fn overlay_text(mut self, overlay_text: &'a ImStr) -> ProgressBar {
|
||||
self.overlay_text = Some(overlay_text);
|
||||
self
|
||||
}
|
||||
@ -50,10 +52,11 @@ impl<'a> ProgressBar<'a> {
|
||||
/// Negative values will automatically align to the end of the axis, zero will let the progress
|
||||
/// bar choose a size, and positive values will use the given size.
|
||||
#[inline]
|
||||
pub fn size(mut self, size: [f32; 2]) -> Self {
|
||||
pub const fn size(mut self, size: [f32; 2]) -> Self {
|
||||
self.size = size;
|
||||
self
|
||||
}
|
||||
|
||||
/// Builds the progress bar
|
||||
pub fn build(self, _: &Ui) {
|
||||
unsafe {
|
||||
|
||||
@ -33,7 +33,8 @@ pub struct Selectable<'a> {
|
||||
|
||||
impl<'a> Selectable<'a> {
|
||||
/// Constructs a new selectable builder.
|
||||
pub fn new(label: &ImStr) -> Selectable {
|
||||
#[inline]
|
||||
pub const fn new(label: &ImStr) -> Selectable {
|
||||
Selectable {
|
||||
label,
|
||||
selected: false,
|
||||
|
||||
@ -182,7 +182,6 @@ pub struct AngleSlider<'a> {
|
||||
impl<'a> AngleSlider<'a> {
|
||||
/// Constructs a new angle slider builder.
|
||||
pub fn new(label: &ImStr) -> AngleSlider {
|
||||
use crate::im_str;
|
||||
AngleSlider {
|
||||
label,
|
||||
min_degrees: -360.0,
|
||||
|
||||
@ -63,7 +63,8 @@ pub struct TabBar<'a> {
|
||||
}
|
||||
|
||||
impl<'a> TabBar<'a> {
|
||||
pub fn new(id: &'a ImStr) -> Self {
|
||||
#[inline]
|
||||
pub const fn new(id: &'a ImStr) -> Self {
|
||||
Self {
|
||||
id,
|
||||
flags: TabBarFlags::empty(),
|
||||
|
||||
@ -70,18 +70,21 @@ pub enum TreeNodeId<'a> {
|
||||
}
|
||||
|
||||
impl<'a, T: ?Sized + AsRef<ImStr>> From<&'a T> for TreeNodeId<'a> {
|
||||
#[inline]
|
||||
fn from(s: &'a T) -> Self {
|
||||
TreeNodeId::Str(s.as_ref())
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> From<*const T> for TreeNodeId<'static> {
|
||||
#[inline]
|
||||
fn from(p: *const T) -> Self {
|
||||
TreeNodeId::Ptr(p as *const c_void)
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> From<*mut T> for TreeNodeId<'static> {
|
||||
#[inline]
|
||||
fn from(p: *mut T) -> Self {
|
||||
TreeNodeId::Ptr(p as *const T as *const c_void)
|
||||
}
|
||||
@ -289,6 +292,7 @@ pub struct TreeNodeToken {
|
||||
|
||||
impl TreeNodeToken {
|
||||
/// Pops a tree node
|
||||
#[inline]
|
||||
pub fn pop(mut self, _: &Ui) {
|
||||
if !self.ctx.is_null() {
|
||||
self.ctx = ptr::null();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user