|
@@ -1,4 +1,4 @@
|
|
|
-// dear imgui, v1.86
|
|
|
|
|
|
|
+// dear imgui, v1.87 WIP
|
|
|
// (headers)
|
|
// (headers)
|
|
|
|
|
|
|
|
// Help:
|
|
// Help:
|
|
@@ -35,6 +35,7 @@ Index of this file:
|
|
|
// [SECTION] Drawing API (ImDrawCallback, ImDrawCmd, ImDrawIdx, ImDrawVert, ImDrawChannel, ImDrawListSplitter, ImDrawFlags, ImDrawListFlags, ImDrawList, ImDrawData)
|
|
// [SECTION] Drawing API (ImDrawCallback, ImDrawCmd, ImDrawIdx, ImDrawVert, ImDrawChannel, ImDrawListSplitter, ImDrawFlags, ImDrawListFlags, ImDrawList, ImDrawData)
|
|
|
// [SECTION] Font API (ImFontConfig, ImFontGlyph, ImFontGlyphRangesBuilder, ImFontAtlasFlags, ImFontAtlas, ImFont)
|
|
// [SECTION] Font API (ImFontConfig, ImFontGlyph, ImFontGlyphRangesBuilder, ImFontAtlasFlags, ImFontAtlas, ImFont)
|
|
|
// [SECTION] Viewports (ImGuiViewportFlags, ImGuiViewport)
|
|
// [SECTION] Viewports (ImGuiViewportFlags, ImGuiViewport)
|
|
|
|
|
+// [SECTION] Platform Dependent Interfaces (ImGuiPlatformImeData)
|
|
|
// [SECTION] Obsolete functions and types
|
|
// [SECTION] Obsolete functions and types
|
|
|
|
|
|
|
|
*/
|
|
*/
|
|
@@ -63,8 +64,8 @@ Index of this file:
|
|
|
|
|
|
|
|
// Version
|
|
// Version
|
|
|
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals. Work in progress versions typically starts at XYY99 then bounce up to XYY00, XYY01 etc. when release tagging happens)
|
|
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals. Work in progress versions typically starts at XYY99 then bounce up to XYY00, XYY01 etc. when release tagging happens)
|
|
|
-#define IMGUI_VERSION "1.86"
|
|
|
|
|
-#define IMGUI_VERSION_NUM 18600
|
|
|
|
|
|
|
+#define IMGUI_VERSION "1.87 WIP"
|
|
|
|
|
+#define IMGUI_VERSION_NUM 18603
|
|
|
#define IMGUI_CHECKVERSION() ImGui::DebugCheckVersionAndDataLayout(IMGUI_VERSION, sizeof(ImGuiIO), sizeof(ImGuiStyle), sizeof(ImVec2), sizeof(ImVec4), sizeof(ImDrawVert), sizeof(ImDrawIdx))
|
|
#define IMGUI_CHECKVERSION() ImGui::DebugCheckVersionAndDataLayout(IMGUI_VERSION, sizeof(ImGuiIO), sizeof(ImGuiStyle), sizeof(ImVec2), sizeof(ImVec4), sizeof(ImDrawVert), sizeof(ImDrawIdx))
|
|
|
#define IMGUI_HAS_TABLE
|
|
#define IMGUI_HAS_TABLE
|
|
|
|
|
|
|
@@ -154,6 +155,7 @@ struct ImGuiInputTextCallbackData; // Shared state of InputText() when using cu
|
|
|
struct ImGuiListClipper; // Helper to manually clip large list of items
|
|
struct ImGuiListClipper; // Helper to manually clip large list of items
|
|
|
struct ImGuiOnceUponAFrame; // Helper for running a block of code not more than once a frame
|
|
struct ImGuiOnceUponAFrame; // Helper for running a block of code not more than once a frame
|
|
|
struct ImGuiPayload; // User data payload for drag and drop operations
|
|
struct ImGuiPayload; // User data payload for drag and drop operations
|
|
|
|
|
+struct ImGuiPlatformImeData; // Platform IME data for io.SetPlatformImeDataFn() function.
|
|
|
struct ImGuiSizeCallbackData; // Callback data when using SetNextWindowSizeConstraints() (rare/advanced use)
|
|
struct ImGuiSizeCallbackData; // Callback data when using SetNextWindowSizeConstraints() (rare/advanced use)
|
|
|
struct ImGuiStorage; // Helper for key->value storage
|
|
struct ImGuiStorage; // Helper for key->value storage
|
|
|
struct ImGuiStyle; // Runtime data for styling/colors
|
|
struct ImGuiStyle; // Runtime data for styling/colors
|
|
@@ -524,7 +526,8 @@ namespace ImGui
|
|
|
|
|
|
|
|
// Widgets: Drag Sliders
|
|
// Widgets: Drag Sliders
|
|
|
// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp.
|
|
// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp.
|
|
|
- // - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every functions, note that a 'float v[X]' function argument is the same as 'float* v', the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &myvector.x
|
|
|
|
|
|
|
+ // - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every functions, note that a 'float v[X]' function argument is the same as 'float* v',
|
|
|
|
|
+ // the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &myvector.x
|
|
|
// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc.
|
|
// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc.
|
|
|
// - Format string may also be set to NULL or use the default format ("%f" or "%d").
|
|
// - Format string may also be set to NULL or use the default format ("%f" or "%d").
|
|
|
// - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For gamepad/keyboard navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision).
|
|
// - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For gamepad/keyboard navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision).
|
|
@@ -711,7 +714,6 @@ namespace ImGui
|
|
|
IMGUI_API bool IsPopupOpen(const char* str_id, ImGuiPopupFlags flags = 0); // return true if the popup is open.
|
|
IMGUI_API bool IsPopupOpen(const char* str_id, ImGuiPopupFlags flags = 0); // return true if the popup is open.
|
|
|
|
|
|
|
|
// Tables
|
|
// Tables
|
|
|
- // [BETA API] API may evolve slightly! If you use this, please update to the next version when it comes out!
|
|
|
|
|
// - Full-featured replacement for old Columns API.
|
|
// - Full-featured replacement for old Columns API.
|
|
|
// - See Demo->Tables for demo code.
|
|
// - See Demo->Tables for demo code.
|
|
|
// - See top of imgui_tables.cpp for general commentary.
|
|
// - See top of imgui_tables.cpp for general commentary.
|
|
@@ -807,7 +809,7 @@ namespace ImGui
|
|
|
// - If you stop calling BeginDragDropSource() the payload is preserved however it won't have a preview tooltip (we currently display a fallback "..." tooltip, see #1725)
|
|
// - If you stop calling BeginDragDropSource() the payload is preserved however it won't have a preview tooltip (we currently display a fallback "..." tooltip, see #1725)
|
|
|
// - An item can be both drag source and drop target.
|
|
// - An item can be both drag source and drop target.
|
|
|
IMGUI_API bool BeginDragDropSource(ImGuiDragDropFlags flags = 0); // call after submitting an item which may be dragged. when this return true, you can call SetDragDropPayload() + EndDragDropSource()
|
|
IMGUI_API bool BeginDragDropSource(ImGuiDragDropFlags flags = 0); // call after submitting an item which may be dragged. when this return true, you can call SetDragDropPayload() + EndDragDropSource()
|
|
|
- IMGUI_API bool SetDragDropPayload(const char* type, const void* data, size_t sz, ImGuiCond cond = 0); // type is a user defined string of maximum 32 characters. Strings starting with '_' are reserved for dear imgui internal types. Data is copied and held by imgui.
|
|
|
|
|
|
|
+ IMGUI_API bool SetDragDropPayload(const char* type, const void* data, size_t sz, ImGuiCond cond = 0); // type is a user defined string of maximum 32 characters. Strings starting with '_' are reserved for dear imgui internal types. Data is copied and held by imgui. Return true when payload has been accepted.
|
|
|
IMGUI_API void EndDragDropSource(); // only call EndDragDropSource() if BeginDragDropSource() returns true!
|
|
IMGUI_API void EndDragDropSource(); // only call EndDragDropSource() if BeginDragDropSource() returns true!
|
|
|
IMGUI_API bool BeginDragDropTarget(); // call after submitting an item that may receive a payload. If this returns true, you can call AcceptDragDropPayload() + EndDragDropTarget()
|
|
IMGUI_API bool BeginDragDropTarget(); // call after submitting an item that may receive a payload. If this returns true, you can call AcceptDragDropPayload() + EndDragDropTarget()
|
|
|
IMGUI_API const ImGuiPayload* AcceptDragDropPayload(const char* type, ImGuiDragDropFlags flags = 0); // accept contents of a given type. If ImGuiDragDropFlags_AcceptBeforeDelivery is set you can peek into the payload before the mouse button is released.
|
|
IMGUI_API const ImGuiPayload* AcceptDragDropPayload(const char* type, ImGuiDragDropFlags flags = 0); // accept contents of a given type. If ImGuiDragDropFlags_AcceptBeforeDelivery is set you can peek into the payload before the mouse button is released.
|
|
@@ -980,9 +982,7 @@ enum ImGuiWindowFlags_
|
|
|
ImGuiWindowFlags_Popup = 1 << 26, // Don't use! For internal use by BeginPopup()
|
|
ImGuiWindowFlags_Popup = 1 << 26, // Don't use! For internal use by BeginPopup()
|
|
|
ImGuiWindowFlags_Modal = 1 << 27, // Don't use! For internal use by BeginPopupModal()
|
|
ImGuiWindowFlags_Modal = 1 << 27, // Don't use! For internal use by BeginPopupModal()
|
|
|
ImGuiWindowFlags_ChildMenu = 1 << 28 // Don't use! For internal use by BeginMenu()
|
|
ImGuiWindowFlags_ChildMenu = 1 << 28 // Don't use! For internal use by BeginMenu()
|
|
|
-
|
|
|
|
|
- // [Obsolete]
|
|
|
|
|
- //ImGuiWindowFlags_ResizeFromAnySide = 1 << 17, // --> Set io.ConfigWindowsResizeFromEdges=true and make sure mouse cursors are supported by backend (io.BackendFlags & ImGuiBackendFlags_HasMouseCursors)
|
|
|
|
|
|
|
+ //ImGuiWindowFlags_ResizeFromAnySide = 1 << 17, // [Obsolete] --> Set io.ConfigWindowsResizeFromEdges=true and make sure mouse cursors are supported by backend (io.BackendFlags & ImGuiBackendFlags_HasMouseCursors)
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
// Flags for ImGui::InputText()
|
|
// Flags for ImGui::InputText()
|
|
@@ -1117,8 +1117,7 @@ enum ImGuiTabItemFlags_
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
// Flags for ImGui::BeginTable()
|
|
// Flags for ImGui::BeginTable()
|
|
|
-// [BETA API] API may evolve slightly! If you use this, please update to the next version when it comes out!
|
|
|
|
|
-// - Important! Sizing policies have complex and subtle side effects, more so than you would expect.
|
|
|
|
|
|
|
+// - Important! Sizing policies have complex and subtle side effects, much more so than you would expect.
|
|
|
// Read comments/demos carefully + experiment with live demos to get acquainted with them.
|
|
// Read comments/demos carefully + experiment with live demos to get acquainted with them.
|
|
|
// - The DEFAULT sizing policies are:
|
|
// - The DEFAULT sizing policies are:
|
|
|
// - Default to ImGuiTableFlags_SizingFixedFit if ScrollX is on, or if host window has ImGuiWindowFlags_AlwaysAutoResize.
|
|
// - Default to ImGuiTableFlags_SizingFixedFit if ScrollX is on, or if host window has ImGuiWindowFlags_AlwaysAutoResize.
|
|
@@ -1126,8 +1125,8 @@ enum ImGuiTabItemFlags_
|
|
|
// - When ScrollX is off:
|
|
// - When ScrollX is off:
|
|
|
// - Table defaults to ImGuiTableFlags_SizingStretchSame -> all Columns defaults to ImGuiTableColumnFlags_WidthStretch with same weight.
|
|
// - Table defaults to ImGuiTableFlags_SizingStretchSame -> all Columns defaults to ImGuiTableColumnFlags_WidthStretch with same weight.
|
|
|
// - Columns sizing policy allowed: Stretch (default), Fixed/Auto.
|
|
// - Columns sizing policy allowed: Stretch (default), Fixed/Auto.
|
|
|
-// - Fixed Columns will generally obtain their requested width (unless the table cannot fit them all).
|
|
|
|
|
-// - Stretch Columns will share the remaining width.
|
|
|
|
|
|
|
+// - Fixed Columns (if any) will generally obtain their requested width (unless the table cannot fit them all).
|
|
|
|
|
+// - Stretch Columns will share the remaining width according to their respective weight.
|
|
|
// - Mixed Fixed/Stretch columns is possible but has various side-effects on resizing behaviors.
|
|
// - Mixed Fixed/Stretch columns is possible but has various side-effects on resizing behaviors.
|
|
|
// The typical use of mixing sizing policies is: any number of LEADING Fixed columns, followed by one or two TRAILING Stretch columns.
|
|
// The typical use of mixing sizing policies is: any number of LEADING Fixed columns, followed by one or two TRAILING Stretch columns.
|
|
|
// (this is because the visible order of columns have subtle but necessary effects on how they react to manual resizing).
|
|
// (this is because the visible order of columns have subtle but necessary effects on how they react to manual resizing).
|
|
@@ -1241,7 +1240,7 @@ enum ImGuiTableColumnFlags_
|
|
|
enum ImGuiTableRowFlags_
|
|
enum ImGuiTableRowFlags_
|
|
|
{
|
|
{
|
|
|
ImGuiTableRowFlags_None = 0,
|
|
ImGuiTableRowFlags_None = 0,
|
|
|
- ImGuiTableRowFlags_Headers = 1 << 0 // Identify header row (set default background color + width of its contents accounted different for auto column width)
|
|
|
|
|
|
|
+ ImGuiTableRowFlags_Headers = 1 << 0 // Identify header row (set default background color + width of its contents accounted differently for auto column width)
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
// Enum for ImGui::TableSetBgColor()
|
|
// Enum for ImGui::TableSetBgColor()
|
|
@@ -1368,7 +1367,7 @@ enum ImGuiKey_
|
|
|
ImGuiKey_Space,
|
|
ImGuiKey_Space,
|
|
|
ImGuiKey_Enter,
|
|
ImGuiKey_Enter,
|
|
|
ImGuiKey_Escape,
|
|
ImGuiKey_Escape,
|
|
|
- ImGuiKey_KeyPadEnter,
|
|
|
|
|
|
|
+ ImGuiKey_KeypadEnter,
|
|
|
ImGuiKey_A, // for text edit CTRL+A: select all
|
|
ImGuiKey_A, // for text edit CTRL+A: select all
|
|
|
ImGuiKey_C, // for text edit CTRL+C: copy
|
|
ImGuiKey_C, // for text edit CTRL+C: copy
|
|
|
ImGuiKey_V, // for text edit CTRL+V: paste
|
|
ImGuiKey_V, // for text edit CTRL+V: paste
|
|
@@ -1376,6 +1375,9 @@ enum ImGuiKey_
|
|
|
ImGuiKey_Y, // for text edit CTRL+Y: redo
|
|
ImGuiKey_Y, // for text edit CTRL+Y: redo
|
|
|
ImGuiKey_Z, // for text edit CTRL+Z: undo
|
|
ImGuiKey_Z, // for text edit CTRL+Z: undo
|
|
|
ImGuiKey_COUNT
|
|
ImGuiKey_COUNT
|
|
|
|
|
+#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
|
|
|
|
+ , ImGuiKey_KeyPadEnter = ImGuiKey_KeypadEnter // Renamed in 1.87
|
|
|
|
|
+#endif
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
// To test io.KeyMods (which is a combination of individual fields io.KeyCtrl, io.KeyShift, io.KeyAlt set by user/backend)
|
|
// To test io.KeyMods (which is a combination of individual fields io.KeyCtrl, io.KeyShift, io.KeyAlt set by user/backend)
|
|
@@ -1385,7 +1387,7 @@ enum ImGuiKeyModFlags_
|
|
|
ImGuiKeyModFlags_Ctrl = 1 << 0,
|
|
ImGuiKeyModFlags_Ctrl = 1 << 0,
|
|
|
ImGuiKeyModFlags_Shift = 1 << 1,
|
|
ImGuiKeyModFlags_Shift = 1 << 1,
|
|
|
ImGuiKeyModFlags_Alt = 1 << 2,
|
|
ImGuiKeyModFlags_Alt = 1 << 2,
|
|
|
- ImGuiKeyModFlags_Super = 1 << 3
|
|
|
|
|
|
|
+ ImGuiKeyModFlags_Super = 1 << 3 // Cmd/Super/Windows key
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
// Gamepad/Keyboard navigation
|
|
// Gamepad/Keyboard navigation
|
|
@@ -1395,29 +1397,29 @@ enum ImGuiKeyModFlags_
|
|
|
enum ImGuiNavInput_
|
|
enum ImGuiNavInput_
|
|
|
{
|
|
{
|
|
|
// Gamepad Mapping
|
|
// Gamepad Mapping
|
|
|
- ImGuiNavInput_Activate, // activate / open / toggle / tweak value // e.g. Cross (PS4), A (Xbox), A (Switch), Space (Keyboard)
|
|
|
|
|
- ImGuiNavInput_Cancel, // cancel / close / exit // e.g. Circle (PS4), B (Xbox), B (Switch), Escape (Keyboard)
|
|
|
|
|
- ImGuiNavInput_Input, // text input / on-screen keyboard // e.g. Triang.(PS4), Y (Xbox), X (Switch), Return (Keyboard)
|
|
|
|
|
- ImGuiNavInput_Menu, // tap: toggle menu / hold: focus, move, resize // e.g. Square (PS4), X (Xbox), Y (Switch), Alt (Keyboard)
|
|
|
|
|
- ImGuiNavInput_DpadLeft, // move / tweak / resize window (w/ PadMenu) // e.g. D-pad Left/Right/Up/Down (Gamepads), Arrow keys (Keyboard)
|
|
|
|
|
|
|
+ ImGuiNavInput_Activate, // Activate / Open / Toggle / Tweak value // e.g. Cross (PS4), A (Xbox), A (Switch), Space (Keyboard)
|
|
|
|
|
+ ImGuiNavInput_Cancel, // Cancel / Close / Exit // e.g. Circle (PS4), B (Xbox), B (Switch), Escape (Keyboard)
|
|
|
|
|
+ ImGuiNavInput_Input, // Text input / On-Screen keyboard // e.g. Triang.(PS4), Y (Xbox), X (Switch), Return (Keyboard)
|
|
|
|
|
+ ImGuiNavInput_Menu, // Tap: Toggle menu / Hold: Focus, Move, Resize // e.g. Square (PS4), X (Xbox), Y (Switch), Alt (Keyboard)
|
|
|
|
|
+ ImGuiNavInput_DpadLeft, // Move / Tweak / Resize window (w/ PadMenu) // e.g. D-pad Left/Right/Up/Down (Gamepads), Arrow keys (Keyboard)
|
|
|
ImGuiNavInput_DpadRight, //
|
|
ImGuiNavInput_DpadRight, //
|
|
|
ImGuiNavInput_DpadUp, //
|
|
ImGuiNavInput_DpadUp, //
|
|
|
ImGuiNavInput_DpadDown, //
|
|
ImGuiNavInput_DpadDown, //
|
|
|
- ImGuiNavInput_LStickLeft, // scroll / move window (w/ PadMenu) // e.g. Left Analog Stick Left/Right/Up/Down
|
|
|
|
|
|
|
+ ImGuiNavInput_LStickLeft, // Scroll / Move window (w/ PadMenu) // e.g. Left Analog Stick Left/Right/Up/Down
|
|
|
ImGuiNavInput_LStickRight, //
|
|
ImGuiNavInput_LStickRight, //
|
|
|
ImGuiNavInput_LStickUp, //
|
|
ImGuiNavInput_LStickUp, //
|
|
|
ImGuiNavInput_LStickDown, //
|
|
ImGuiNavInput_LStickDown, //
|
|
|
- ImGuiNavInput_FocusPrev, // next window (w/ PadMenu) // e.g. L1 or L2 (PS4), LB or LT (Xbox), L or ZL (Switch)
|
|
|
|
|
- ImGuiNavInput_FocusNext, // prev window (w/ PadMenu) // e.g. R1 or R2 (PS4), RB or RT (Xbox), R or ZL (Switch)
|
|
|
|
|
- ImGuiNavInput_TweakSlow, // slower tweaks // e.g. L1 or L2 (PS4), LB or LT (Xbox), L or ZL (Switch)
|
|
|
|
|
- ImGuiNavInput_TweakFast, // faster tweaks // e.g. R1 or R2 (PS4), RB or RT (Xbox), R or ZL (Switch)
|
|
|
|
|
|
|
+ ImGuiNavInput_FocusPrev, // Focus Next window (w/ PadMenu) // e.g. L1 or L2 (PS4), LB or LT (Xbox), L or ZL (Switch)
|
|
|
|
|
+ ImGuiNavInput_FocusNext, // Focus Prev window (w/ PadMenu) // e.g. R1 or R2 (PS4), RB or RT (Xbox), R or ZL (Switch)
|
|
|
|
|
+ ImGuiNavInput_TweakSlow, // Slower tweaks // e.g. L1 or L2 (PS4), LB or LT (Xbox), L or ZL (Switch)
|
|
|
|
|
+ ImGuiNavInput_TweakFast, // Faster tweaks // e.g. R1 or R2 (PS4), RB or RT (Xbox), R or ZL (Switch)
|
|
|
|
|
|
|
|
// [Internal] Don't use directly! This is used internally to differentiate keyboard from gamepad inputs for behaviors that require to differentiate them.
|
|
// [Internal] Don't use directly! This is used internally to differentiate keyboard from gamepad inputs for behaviors that require to differentiate them.
|
|
|
// Keyboard behavior that have no corresponding gamepad mapping (e.g. CTRL+TAB) will be directly reading from io.KeysDown[] instead of io.NavInputs[].
|
|
// Keyboard behavior that have no corresponding gamepad mapping (e.g. CTRL+TAB) will be directly reading from io.KeysDown[] instead of io.NavInputs[].
|
|
|
- ImGuiNavInput_KeyLeft_, // move left // = Arrow keys
|
|
|
|
|
- ImGuiNavInput_KeyRight_, // move right
|
|
|
|
|
- ImGuiNavInput_KeyUp_, // move up
|
|
|
|
|
- ImGuiNavInput_KeyDown_, // move down
|
|
|
|
|
|
|
+ ImGuiNavInput_KeyLeft_, // Move left // = Arrow keys
|
|
|
|
|
+ ImGuiNavInput_KeyRight_, // Move right
|
|
|
|
|
+ ImGuiNavInput_KeyUp_, // Move up
|
|
|
|
|
+ ImGuiNavInput_KeyDown_, // Move down
|
|
|
ImGuiNavInput_COUNT,
|
|
ImGuiNavInput_COUNT,
|
|
|
ImGuiNavInput_InternalStart_ = ImGuiNavInput_KeyLeft_
|
|
ImGuiNavInput_InternalStart_ = ImGuiNavInput_KeyLeft_
|
|
|
};
|
|
};
|
|
@@ -1599,9 +1601,7 @@ enum ImGuiColorEditFlags_
|
|
|
ImGuiColorEditFlags_InputMask_ = ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_InputHSV
|
|
ImGuiColorEditFlags_InputMask_ = ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_InputHSV
|
|
|
|
|
|
|
|
// Obsolete names (will be removed)
|
|
// Obsolete names (will be removed)
|
|
|
-#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
|
|
|
|
- , ImGuiColorEditFlags_RGB = ImGuiColorEditFlags_DisplayRGB, ImGuiColorEditFlags_HSV = ImGuiColorEditFlags_DisplayHSV, ImGuiColorEditFlags_HEX = ImGuiColorEditFlags_DisplayHex // [renamed in 1.69]
|
|
|
|
|
-#endif
|
|
|
|
|
|
|
+ // ImGuiColorEditFlags_RGB = ImGuiColorEditFlags_DisplayRGB, ImGuiColorEditFlags_HSV = ImGuiColorEditFlags_DisplayHSV, ImGuiColorEditFlags_HEX = ImGuiColorEditFlags_DisplayHex // [renamed in 1.69]
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
// Flags for DragFloat(), DragInt(), SliderFloat(), SliderInt() etc.
|
|
// Flags for DragFloat(), DragInt(), SliderFloat(), SliderInt() etc.
|
|
@@ -1873,8 +1873,12 @@ struct ImGuiIO
|
|
|
|
|
|
|
|
// Optional: Notify OS Input Method Editor of the screen position of your cursor for text input position (e.g. when using Japanese/Chinese IME on Windows)
|
|
// Optional: Notify OS Input Method Editor of the screen position of your cursor for text input position (e.g. when using Japanese/Chinese IME on Windows)
|
|
|
// (default to use native imm32 api on Windows)
|
|
// (default to use native imm32 api on Windows)
|
|
|
- void (*ImeSetInputScreenPosFn)(int x, int y);
|
|
|
|
|
- void* ImeWindowHandle; // = NULL // (Windows) Set this to your HWND to get automatic IME cursor positioning.
|
|
|
|
|
|
|
+ void (*SetPlatformImeDataFn)(ImGuiViewport* viewport, ImGuiPlatformImeData* data);
|
|
|
|
|
+#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
|
|
|
|
+ void* ImeWindowHandle; // = NULL // [Obsolete] Set ImGuiViewport::PlatformHandleRaw instead. Set this to your HWND to get automatic IME cursor positioning.
|
|
|
|
|
+#else
|
|
|
|
|
+ void* _UnusedPadding; // Unused field to keep data structure the same size.
|
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
//------------------------------------------------------------------
|
|
//------------------------------------------------------------------
|
|
|
// Input - Fill before calling NewFrame()
|
|
// Input - Fill before calling NewFrame()
|
|
@@ -1884,18 +1888,18 @@ struct ImGuiIO
|
|
|
bool MouseDown[5]; // Mouse buttons: 0=left, 1=right, 2=middle + extras (ImGuiMouseButton_COUNT == 5). Dear ImGui mostly uses left and right buttons. Others buttons allows us to track if the mouse is being used by your application + available to user as a convenience via IsMouse** API.
|
|
bool MouseDown[5]; // Mouse buttons: 0=left, 1=right, 2=middle + extras (ImGuiMouseButton_COUNT == 5). Dear ImGui mostly uses left and right buttons. Others buttons allows us to track if the mouse is being used by your application + available to user as a convenience via IsMouse** API.
|
|
|
float MouseWheel; // Mouse wheel Vertical: 1 unit scrolls about 5 lines text.
|
|
float MouseWheel; // Mouse wheel Vertical: 1 unit scrolls about 5 lines text.
|
|
|
float MouseWheelH; // Mouse wheel Horizontal. Most users don't have a mouse with an horizontal wheel, may not be filled by all backends.
|
|
float MouseWheelH; // Mouse wheel Horizontal. Most users don't have a mouse with an horizontal wheel, may not be filled by all backends.
|
|
|
- bool KeyCtrl; // Keyboard modifier pressed: Control
|
|
|
|
|
- bool KeyShift; // Keyboard modifier pressed: Shift
|
|
|
|
|
- bool KeyAlt; // Keyboard modifier pressed: Alt
|
|
|
|
|
- bool KeySuper; // Keyboard modifier pressed: Cmd/Super/Windows
|
|
|
|
|
|
|
+ bool KeyCtrl; // Keyboard modifier down: Control
|
|
|
|
|
+ bool KeyShift; // Keyboard modifier down: Shift
|
|
|
|
|
+ bool KeyAlt; // Keyboard modifier down: Alt
|
|
|
|
|
+ bool KeySuper; // Keyboard modifier down: Cmd/Super/Windows
|
|
|
bool KeysDown[512]; // Keyboard keys that are pressed (ideally left in the "native" order your engine has access to keyboard keys, so you can use your own defines/enums for keys).
|
|
bool KeysDown[512]; // Keyboard keys that are pressed (ideally left in the "native" order your engine has access to keyboard keys, so you can use your own defines/enums for keys).
|
|
|
float NavInputs[ImGuiNavInput_COUNT]; // Gamepad inputs. Cleared back to zero by EndFrame(). Keyboard keys will be auto-mapped and be written here by NewFrame().
|
|
float NavInputs[ImGuiNavInput_COUNT]; // Gamepad inputs. Cleared back to zero by EndFrame(). Keyboard keys will be auto-mapped and be written here by NewFrame().
|
|
|
|
|
|
|
|
- // Functions
|
|
|
|
|
|
|
+ // Input Functions
|
|
|
|
|
+ IMGUI_API void AddFocusEvent(bool focused); // Queue an hosting application/platform windows gain or loss of focus
|
|
|
IMGUI_API void AddInputCharacter(unsigned int c); // Queue new character input
|
|
IMGUI_API void AddInputCharacter(unsigned int c); // Queue new character input
|
|
|
IMGUI_API void AddInputCharacterUTF16(ImWchar16 c); // Queue new character input from an UTF-16 character, it can be a surrogate
|
|
IMGUI_API void AddInputCharacterUTF16(ImWchar16 c); // Queue new character input from an UTF-16 character, it can be a surrogate
|
|
|
IMGUI_API void AddInputCharactersUTF8(const char* str); // Queue new characters input from an UTF-8 string
|
|
IMGUI_API void AddInputCharactersUTF8(const char* str); // Queue new characters input from an UTF-8 string
|
|
|
- IMGUI_API void AddFocusEvent(bool focused); // Notifies Dear ImGui when hosting platform windows lose or gain input focus
|
|
|
|
|
IMGUI_API void ClearInputCharacters(); // [Internal] Clear the text input buffer manually
|
|
IMGUI_API void ClearInputCharacters(); // [Internal] Clear the text input buffer manually
|
|
|
IMGUI_API void ClearInputKeys(); // [Internal] Release all keys
|
|
IMGUI_API void ClearInputKeys(); // [Internal] Release all keys
|
|
|
|
|
|
|
@@ -1905,50 +1909,50 @@ struct ImGuiIO
|
|
|
// generally easier and more correct to use their state BEFORE calling NewFrame(). See FAQ for details!)
|
|
// generally easier and more correct to use their state BEFORE calling NewFrame(). See FAQ for details!)
|
|
|
//------------------------------------------------------------------
|
|
//------------------------------------------------------------------
|
|
|
|
|
|
|
|
- bool WantCaptureMouse; // Set when Dear ImGui will use mouse inputs, in this case do not dispatch them to your main game/application (either way, always pass on mouse inputs to imgui). (e.g. unclicked mouse is hovering over an imgui window, widget is active, mouse was clicked over an imgui window, etc.).
|
|
|
|
|
- bool WantCaptureKeyboard; // Set when Dear ImGui will use keyboard inputs, in this case do not dispatch them to your main game/application (either way, always pass keyboard inputs to imgui). (e.g. InputText active, or an imgui window is focused and navigation is enabled, etc.).
|
|
|
|
|
- bool WantTextInput; // Mobile/console: when set, you may display an on-screen keyboard. This is set by Dear ImGui when it wants textual keyboard input to happen (e.g. when a InputText widget is active).
|
|
|
|
|
- bool WantSetMousePos; // MousePos has been altered, backend should reposition mouse on next frame. Rarely used! Set only when ImGuiConfigFlags_NavEnableSetMousePos flag is enabled.
|
|
|
|
|
- bool WantSaveIniSettings; // When manual .ini load/save is active (io.IniFilename == NULL), this will be set to notify your application that you can call SaveIniSettingsToMemory() and save yourself. Important: clear io.WantSaveIniSettings yourself after saving!
|
|
|
|
|
- bool NavActive; // Keyboard/Gamepad navigation is currently allowed (will handle ImGuiKey_NavXXX events) = a window is focused and it doesn't use the ImGuiWindowFlags_NoNavInputs flag.
|
|
|
|
|
- bool NavVisible; // Keyboard/Gamepad navigation is visible and allowed (will handle ImGuiKey_NavXXX events).
|
|
|
|
|
- float Framerate; // Rough estimate of application framerate, in frame per second. Solely for convenience. Rolling average estimation based on io.DeltaTime over 120 frames.
|
|
|
|
|
- int MetricsRenderVertices; // Vertices output during last call to Render()
|
|
|
|
|
- int MetricsRenderIndices; // Indices output during last call to Render() = number of triangles * 3
|
|
|
|
|
- int MetricsRenderWindows; // Number of visible windows
|
|
|
|
|
- int MetricsActiveWindows; // Number of active windows
|
|
|
|
|
- int MetricsActiveAllocations; // Number of active allocations, updated by MemAlloc/MemFree based on current context. May be off if you have multiple imgui contexts.
|
|
|
|
|
- ImVec2 MouseDelta; // Mouse delta. Note that this is zero if either current or previous position are invalid (-FLT_MAX,-FLT_MAX), so a disappearing/reappearing mouse won't have a huge delta.
|
|
|
|
|
|
|
+ bool WantCaptureMouse; // Set when Dear ImGui will use mouse inputs, in this case do not dispatch them to your main game/application (either way, always pass on mouse inputs to imgui). (e.g. unclicked mouse is hovering over an imgui window, widget is active, mouse was clicked over an imgui window, etc.).
|
|
|
|
|
+ bool WantCaptureKeyboard; // Set when Dear ImGui will use keyboard inputs, in this case do not dispatch them to your main game/application (either way, always pass keyboard inputs to imgui). (e.g. InputText active, or an imgui window is focused and navigation is enabled, etc.).
|
|
|
|
|
+ bool WantTextInput; // Mobile/console: when set, you may display an on-screen keyboard. This is set by Dear ImGui when it wants textual keyboard input to happen (e.g. when a InputText widget is active).
|
|
|
|
|
+ bool WantSetMousePos; // MousePos has been altered, backend should reposition mouse on next frame. Rarely used! Set only when ImGuiConfigFlags_NavEnableSetMousePos flag is enabled.
|
|
|
|
|
+ bool WantSaveIniSettings; // When manual .ini load/save is active (io.IniFilename == NULL), this will be set to notify your application that you can call SaveIniSettingsToMemory() and save yourself. Important: clear io.WantSaveIniSettings yourself after saving!
|
|
|
|
|
+ bool NavActive; // Keyboard/Gamepad navigation is currently allowed (will handle ImGuiKey_NavXXX events) = a window is focused and it doesn't use the ImGuiWindowFlags_NoNavInputs flag.
|
|
|
|
|
+ bool NavVisible; // Keyboard/Gamepad navigation is visible and allowed (will handle ImGuiKey_NavXXX events).
|
|
|
|
|
+ float Framerate; // Rough estimate of application framerate, in frame per second. Solely for convenience. Rolling average estimation based on io.DeltaTime over 120 frames.
|
|
|
|
|
+ int MetricsRenderVertices; // Vertices output during last call to Render()
|
|
|
|
|
+ int MetricsRenderIndices; // Indices output during last call to Render() = number of triangles * 3
|
|
|
|
|
+ int MetricsRenderWindows; // Number of visible windows
|
|
|
|
|
+ int MetricsActiveWindows; // Number of active windows
|
|
|
|
|
+ int MetricsActiveAllocations; // Number of active allocations, updated by MemAlloc/MemFree based on current context. May be off if you have multiple imgui contexts.
|
|
|
|
|
+ ImVec2 MouseDelta; // Mouse delta. Note that this is zero if either current or previous position are invalid (-FLT_MAX,-FLT_MAX), so a disappearing/reappearing mouse won't have a huge delta.
|
|
|
|
|
|
|
|
//------------------------------------------------------------------
|
|
//------------------------------------------------------------------
|
|
|
// [Internal] Dear ImGui will maintain those fields. Forward compatibility not guaranteed!
|
|
// [Internal] Dear ImGui will maintain those fields. Forward compatibility not guaranteed!
|
|
|
//------------------------------------------------------------------
|
|
//------------------------------------------------------------------
|
|
|
|
|
|
|
|
- bool WantCaptureMouseUnlessPopupClose;// Alternative to WantCaptureMouse: (WantCaptureMouse == true && WantCaptureMouseUnlessPopupClose == false) when a click over void is expected to close a popup.
|
|
|
|
|
- ImGuiKeyModFlags KeyMods; // Key mods flags (same as io.KeyCtrl/KeyShift/KeyAlt/KeySuper but merged into flags), updated by NewFrame()
|
|
|
|
|
- ImGuiKeyModFlags KeyModsPrev; // Previous key mods
|
|
|
|
|
- ImVec2 MousePosPrev; // Previous mouse position (note that MouseDelta is not necessary == MousePos-MousePosPrev, in case either position is invalid)
|
|
|
|
|
- ImVec2 MouseClickedPos[5]; // Position at time of clicking
|
|
|
|
|
- double MouseClickedTime[5]; // Time of last click (used to figure out double-click)
|
|
|
|
|
- bool MouseClicked[5]; // Mouse button went from !Down to Down (same as MouseClickedCount[x] != 0)
|
|
|
|
|
- bool MouseDoubleClicked[5]; // Has mouse button been double-clicked? (same as MouseClickedCount[x] == 2)
|
|
|
|
|
- ImU16 MouseClickedCount[5]; // == 0 (not clicked), == 1 (same as MouseClicked[]), == 2 (double-clicked), == 3 (triple-clicked) etc. when going from !Down to Down
|
|
|
|
|
- ImU16 MouseClickedLastCount[5]; // Count successive number of clicks. Stays valid after mouse release. Reset after another click is done.
|
|
|
|
|
- bool MouseReleased[5]; // Mouse button went from Down to !Down
|
|
|
|
|
- bool MouseDownOwned[5]; // Track if button was clicked inside a dear imgui window or over void blocked by a popup. We don't request mouse capture from the application if click started outside ImGui bounds.
|
|
|
|
|
- bool MouseDownOwnedUnlessPopupClose[5];//Track if button was clicked inside a dear imgui window.
|
|
|
|
|
- float MouseDownDuration[5]; // Duration the mouse button has been down (0.0f == just clicked)
|
|
|
|
|
- float MouseDownDurationPrev[5]; // Previous time the mouse button has been down
|
|
|
|
|
- ImVec2 MouseDragMaxDistanceAbs[5]; // Maximum distance, absolute, on each axis, of how much mouse has traveled from the clicking point
|
|
|
|
|
- float MouseDragMaxDistanceSqr[5]; // Squared maximum distance of how much mouse has traveled from the clicking point
|
|
|
|
|
- float KeysDownDuration[512]; // Duration the keyboard key has been down (0.0f == just pressed)
|
|
|
|
|
- float KeysDownDurationPrev[512]; // Previous duration the key has been down
|
|
|
|
|
|
|
+ ImGuiKeyModFlags KeyMods; // Key mods flags (same as io.KeyCtrl/KeyShift/KeyAlt/KeySuper but merged into flags), updated by NewFrame()
|
|
|
|
|
+ ImGuiKeyModFlags KeyModsPrev; // Key mods flags (from previous frame)
|
|
|
|
|
+ float KeysDownDuration[512]; // Duration the key has been down (<0.0f: not pressed, 0.0f: just pressed, >0.0f: time held)
|
|
|
|
|
+ float KeysDownDurationPrev[512]; // Duration the key has been down (from previous frame)
|
|
|
|
|
+
|
|
|
|
|
+ bool WantCaptureMouseUnlessPopupClose; // Alternative to WantCaptureMouse: (WantCaptureMouse == true && WantCaptureMouseUnlessPopupClose == false) when a click over void is expected to close a popup.
|
|
|
|
|
+ ImVec2 MousePosPrev; // Previous mouse position (note that MouseDelta is not necessary == MousePos-MousePosPrev, in case either position is invalid)
|
|
|
|
|
+ ImVec2 MouseClickedPos[5]; // Position at time of clicking
|
|
|
|
|
+ double MouseClickedTime[5]; // Time of last click (used to figure out double-click)
|
|
|
|
|
+ bool MouseClicked[5]; // Mouse button went from !Down to Down (same as MouseClickedCount[x] != 0)
|
|
|
|
|
+ bool MouseDoubleClicked[5]; // Has mouse button been double-clicked? (same as MouseClickedCount[x] == 2)
|
|
|
|
|
+ ImU16 MouseClickedCount[5]; // == 0 (not clicked), == 1 (same as MouseClicked[]), == 2 (double-clicked), == 3 (triple-clicked) etc. when going from !Down to Down
|
|
|
|
|
+ ImU16 MouseClickedLastCount[5]; // Count successive number of clicks. Stays valid after mouse release. Reset after another click is done.
|
|
|
|
|
+ bool MouseReleased[5]; // Mouse button went from Down to !Down
|
|
|
|
|
+ bool MouseDownOwned[5]; // Track if button was clicked inside a dear imgui window or over void blocked by a popup. We don't request mouse capture from the application if click started outside ImGui bounds.
|
|
|
|
|
+ bool MouseDownOwnedUnlessPopupClose[5]; //Track if button was clicked inside a dear imgui window.
|
|
|
|
|
+ float MouseDownDuration[5]; // Duration the mouse button has been down (0.0f == just clicked)
|
|
|
|
|
+ float MouseDownDurationPrev[5]; // Previous time the mouse button has been down
|
|
|
|
|
+ float MouseDragMaxDistanceSqr[5]; // Squared maximum distance of how much mouse has traveled from the clicking point (used for moving thresholds)
|
|
|
float NavInputsDownDuration[ImGuiNavInput_COUNT];
|
|
float NavInputsDownDuration[ImGuiNavInput_COUNT];
|
|
|
float NavInputsDownDurationPrev[ImGuiNavInput_COUNT];
|
|
float NavInputsDownDurationPrev[ImGuiNavInput_COUNT];
|
|
|
- float PenPressure; // Touch/Pen pressure (0.0f to 1.0f, should be >0.0f only when MouseDown[0] == true). Helper storage currently unused by Dear ImGui.
|
|
|
|
|
|
|
+ float PenPressure; // Touch/Pen pressure (0.0f to 1.0f, should be >0.0f only when MouseDown[0] == true). Helper storage currently unused by Dear ImGui.
|
|
|
bool AppFocusLost;
|
|
bool AppFocusLost;
|
|
|
- ImWchar16 InputQueueSurrogate; // For AddInputCharacterUTF16
|
|
|
|
|
- ImVector<ImWchar> InputQueueCharacters; // Queue of _characters_ input (obtained by platform backend). Fill using AddInputCharacter() helper.
|
|
|
|
|
|
|
+ ImWchar16 InputQueueSurrogate; // For AddInputCharacterUTF16()
|
|
|
|
|
+ ImVector<ImWchar> InputQueueCharacters; // Queue of _characters_ input (obtained by platform backend). Fill using AddInputCharacter() helper.
|
|
|
|
|
|
|
|
IMGUI_API ImGuiIO();
|
|
IMGUI_API ImGuiIO();
|
|
|
};
|
|
};
|
|
@@ -2283,16 +2287,16 @@ typedef void (*ImDrawCallback)(const ImDrawList* parent_list, const ImDrawCmd* c
|
|
|
#define ImDrawCallback_ResetRenderState (ImDrawCallback)(-1)
|
|
#define ImDrawCallback_ResetRenderState (ImDrawCallback)(-1)
|
|
|
|
|
|
|
|
// Typically, 1 command = 1 GPU draw call (unless command is a callback)
|
|
// Typically, 1 command = 1 GPU draw call (unless command is a callback)
|
|
|
-// - VtxOffset/IdxOffset: When 'io.BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset' is enabled,
|
|
|
|
|
-// those fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices.
|
|
|
|
|
-// Pre-1.71 backends will typically ignore the VtxOffset/IdxOffset fields.
|
|
|
|
|
|
|
+// - VtxOffset: When 'io.BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset' is enabled,
|
|
|
|
|
+// this fields allow us to render meshes larger than 64K vertices while keeping 16-bit indices.
|
|
|
|
|
+// Backends made for <1.71. will typically ignore the VtxOffset fields.
|
|
|
// - The ClipRect/TextureId/VtxOffset fields must be contiguous as we memcmp() them together (this is asserted for).
|
|
// - The ClipRect/TextureId/VtxOffset fields must be contiguous as we memcmp() them together (this is asserted for).
|
|
|
struct ImDrawCmd
|
|
struct ImDrawCmd
|
|
|
{
|
|
{
|
|
|
ImVec4 ClipRect; // 4*4 // Clipping rectangle (x1, y1, x2, y2). Subtract ImDrawData->DisplayPos to get clipping rectangle in "viewport" coordinates
|
|
ImVec4 ClipRect; // 4*4 // Clipping rectangle (x1, y1, x2, y2). Subtract ImDrawData->DisplayPos to get clipping rectangle in "viewport" coordinates
|
|
|
ImTextureID TextureId; // 4-8 // User-provided texture ID. Set by user in ImfontAtlas::SetTexID() for fonts or passed to Image*() functions. Ignore if never using images or multiple fonts atlas.
|
|
ImTextureID TextureId; // 4-8 // User-provided texture ID. Set by user in ImfontAtlas::SetTexID() for fonts or passed to Image*() functions. Ignore if never using images or multiple fonts atlas.
|
|
|
unsigned int VtxOffset; // 4 // Start offset in vertex buffer. ImGuiBackendFlags_RendererHasVtxOffset: always 0, otherwise may be >0 to support meshes larger than 64K vertices with 16-bit indices.
|
|
unsigned int VtxOffset; // 4 // Start offset in vertex buffer. ImGuiBackendFlags_RendererHasVtxOffset: always 0, otherwise may be >0 to support meshes larger than 64K vertices with 16-bit indices.
|
|
|
- unsigned int IdxOffset; // 4 // Start offset in index buffer. Always equal to sum of ElemCount drawn so far.
|
|
|
|
|
|
|
+ unsigned int IdxOffset; // 4 // Start offset in index buffer.
|
|
|
unsigned int ElemCount; // 4 // Number of indices (multiple of 3) to be rendered as triangles. Vertices are stored in the callee ImDrawList's vtx_buffer[] array, indices in idx_buffer[].
|
|
unsigned int ElemCount; // 4 // Number of indices (multiple of 3) to be rendered as triangles. Vertices are stored in the callee ImDrawList's vtx_buffer[] array, indices in idx_buffer[].
|
|
|
ImDrawCallback UserCallback; // 4-8 // If != NULL, call the function instead of rendering the vertices. clip_rect and texture_id will be set normally.
|
|
ImDrawCallback UserCallback; // 4-8 // If != NULL, call the function instead of rendering the vertices. clip_rect and texture_id will be set normally.
|
|
|
void* UserCallbackData; // 4-8 // The draw callback code can access this.
|
|
void* UserCallbackData; // 4-8 // The draw callback code can access this.
|
|
@@ -2498,8 +2502,8 @@ struct ImDrawList
|
|
|
inline void PrimVtx(const ImVec2& pos, const ImVec2& uv, ImU32 col) { PrimWriteIdx((ImDrawIdx)_VtxCurrentIdx); PrimWriteVtx(pos, uv, col); } // Write vertex with unique index
|
|
inline void PrimVtx(const ImVec2& pos, const ImVec2& uv, ImU32 col) { PrimWriteIdx((ImDrawIdx)_VtxCurrentIdx); PrimWriteVtx(pos, uv, col); } // Write vertex with unique index
|
|
|
|
|
|
|
|
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
|
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
|
|
- inline void AddBezierCurve(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, ImU32 col, float thickness, int num_segments = 0) { AddBezierCubic(p1, p2, p3, p4, col, thickness, num_segments); }
|
|
|
|
|
- inline void PathBezierCurveTo(const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, int num_segments = 0) { PathBezierCubicCurveTo(p2, p3, p4, num_segments); }
|
|
|
|
|
|
|
+ inline void AddBezierCurve(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, ImU32 col, float thickness, int num_segments = 0) { AddBezierCubic(p1, p2, p3, p4, col, thickness, num_segments); } // OBSOLETED in 1.80 (Jan 2021)
|
|
|
|
|
+ inline void PathBezierCurveTo(const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, int num_segments = 0) { PathBezierCubicCurveTo(p2, p3, p4, num_segments); } // OBSOLETED in 1.80 (Jan 2021)
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
// [Internal helpers]
|
|
// [Internal helpers]
|
|
@@ -2728,10 +2732,9 @@ struct ImFontAtlas
|
|
|
int PackIdMouseCursors; // Custom texture rectangle ID for white pixel and mouse cursors
|
|
int PackIdMouseCursors; // Custom texture rectangle ID for white pixel and mouse cursors
|
|
|
int PackIdLines; // Custom texture rectangle ID for baked anti-aliased lines
|
|
int PackIdLines; // Custom texture rectangle ID for baked anti-aliased lines
|
|
|
|
|
|
|
|
-#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
|
|
|
|
- typedef ImFontAtlasCustomRect CustomRect; // OBSOLETED in 1.72+
|
|
|
|
|
|
|
+ // [Obsolete]
|
|
|
|
|
+ //typedef ImFontAtlasCustomRect CustomRect; // OBSOLETED in 1.72+
|
|
|
//typedef ImFontGlyphRangesBuilder GlyphRangesBuilder; // OBSOLETED in 1.67+
|
|
//typedef ImFontGlyphRangesBuilder GlyphRangesBuilder; // OBSOLETED in 1.67+
|
|
|
-#endif
|
|
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
// Font runtime data and rendering
|
|
// Font runtime data and rendering
|
|
@@ -2815,6 +2818,9 @@ struct ImGuiViewport
|
|
|
ImVec2 WorkPos; // Work Area: Position of the viewport minus task bars, menus bars, status bars (>= Pos)
|
|
ImVec2 WorkPos; // Work Area: Position of the viewport minus task bars, menus bars, status bars (>= Pos)
|
|
|
ImVec2 WorkSize; // Work Area: Size of the viewport minus task bars, menu bars, status bars (<= Size)
|
|
ImVec2 WorkSize; // Work Area: Size of the viewport minus task bars, menu bars, status bars (<= Size)
|
|
|
|
|
|
|
|
|
|
+ // Platform/Backend Dependent Data
|
|
|
|
|
+ void* PlatformHandleRaw; // void* to hold lower-level, platform-native window handle (under Win32 this is expected to be a HWND, unused for other platforms)
|
|
|
|
|
+
|
|
|
ImGuiViewport() { memset(this, 0, sizeof(*this)); }
|
|
ImGuiViewport() { memset(this, 0, sizeof(*this)); }
|
|
|
|
|
|
|
|
// Helpers
|
|
// Helpers
|
|
@@ -2822,6 +2828,20 @@ struct ImGuiViewport
|
|
|
ImVec2 GetWorkCenter() const { return ImVec2(WorkPos.x + WorkSize.x * 0.5f, WorkPos.y + WorkSize.y * 0.5f); }
|
|
ImVec2 GetWorkCenter() const { return ImVec2(WorkPos.x + WorkSize.x * 0.5f, WorkPos.y + WorkSize.y * 0.5f); }
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+//-----------------------------------------------------------------------------
|
|
|
|
|
+// [SECTION] Platform Dependent Interfaces
|
|
|
|
|
+//-----------------------------------------------------------------------------
|
|
|
|
|
+
|
|
|
|
|
+// (Optional) Support for IME (Input Method Editor) via the io.SetPlatformImeDataFn() function.
|
|
|
|
|
+struct ImGuiPlatformImeData
|
|
|
|
|
+{
|
|
|
|
|
+ bool WantVisible; // A widget wants the IME to be visible
|
|
|
|
|
+ ImVec2 InputPos; // Position of the input cursor
|
|
|
|
|
+ float InputLineHeight; // Line height
|
|
|
|
|
+
|
|
|
|
|
+ ImGuiPlatformImeData() { memset(this, 0, sizeof(*this)); }
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
//-----------------------------------------------------------------------------
|
|
//-----------------------------------------------------------------------------
|
|
|
// [SECTION] Obsolete functions and types
|
|
// [SECTION] Obsolete functions and types
|
|
|
// (Will be removed! Read 'API BREAKING CHANGES' section in imgui.cpp for details)
|
|
// (Will be removed! Read 'API BREAKING CHANGES' section in imgui.cpp for details)
|
|
@@ -2858,24 +2878,21 @@ namespace ImGui
|
|
|
static inline bool SliderFloat4(const char* label, float v[4], float v_min, float v_max, const char* format, float power) { return SliderScalarN(label, ImGuiDataType_Float, v, 4, &v_min, &v_max, format, power); }
|
|
static inline bool SliderFloat4(const char* label, float v[4], float v_min, float v_max, const char* format, float power) { return SliderScalarN(label, ImGuiDataType_Float, v, 4, &v_min, &v_max, format, power); }
|
|
|
// OBSOLETED in 1.77 (from June 2020)
|
|
// OBSOLETED in 1.77 (from June 2020)
|
|
|
static inline bool BeginPopupContextWindow(const char* str_id, ImGuiMouseButton mb, bool over_items) { return BeginPopupContextWindow(str_id, mb | (over_items ? 0 : ImGuiPopupFlags_NoOpenOverItems)); }
|
|
static inline bool BeginPopupContextWindow(const char* str_id, ImGuiMouseButton mb, bool over_items) { return BeginPopupContextWindow(str_id, mb | (over_items ? 0 : ImGuiPopupFlags_NoOpenOverItems)); }
|
|
|
- // OBSOLETED in 1.72 (from April 2019)
|
|
|
|
|
- static inline void TreeAdvanceToLabelPos() { SetCursorPosX(GetCursorPosX() + GetTreeNodeToLabelSpacing()); }
|
|
|
|
|
- // OBSOLETED in 1.71 (from June 2019)
|
|
|
|
|
- static inline void SetNextTreeNodeOpen(bool open, ImGuiCond cond = 0) { SetNextItemOpen(open, cond); }
|
|
|
|
|
- // OBSOLETED in 1.70 (from May 2019)
|
|
|
|
|
- static inline float GetContentRegionAvailWidth() { return GetContentRegionAvail().x; }
|
|
|
|
|
|
|
|
|
|
// Some of the older obsolete names along with their replacement (commented out so they are not reported in IDE)
|
|
// Some of the older obsolete names along with their replacement (commented out so they are not reported in IDE)
|
|
|
- //static inline ImDrawList* GetOverlayDrawList() { return GetForegroundDrawList(); } // OBSOLETED in 1.69 (from Mar 2019)
|
|
|
|
|
- //static inline void SetScrollHere(float ratio = 0.5f) { SetScrollHereY(ratio); } // OBSOLETED in 1.66 (from Nov 2018)
|
|
|
|
|
- //static inline bool IsItemDeactivatedAfterChange() { return IsItemDeactivatedAfterEdit(); } // OBSOLETED in 1.63 (from Aug 2018)
|
|
|
|
|
- //static inline bool IsAnyWindowFocused() { return IsWindowFocused(ImGuiFocusedFlags_AnyWindow); } // OBSOLETED in 1.60 (from Apr 2018)
|
|
|
|
|
- //static inline bool IsAnyWindowHovered() { return IsWindowHovered(ImGuiHoveredFlags_AnyWindow); } // OBSOLETED in 1.60 (between Dec 2017 and Apr 2018)
|
|
|
|
|
- //static inline void ShowTestWindow() { return ShowDemoWindow(); } // OBSOLETED in 1.53 (between Oct 2017 and Dec 2017)
|
|
|
|
|
- //static inline bool IsRootWindowFocused() { return IsWindowFocused(ImGuiFocusedFlags_RootWindow); } // OBSOLETED in 1.53 (between Oct 2017 and Dec 2017)
|
|
|
|
|
- //static inline bool IsRootWindowOrAnyChildFocused() { return IsWindowFocused(ImGuiFocusedFlags_RootAndChildWindows); } // OBSOLETED in 1.53 (between Oct 2017 and Dec 2017)
|
|
|
|
|
- //static inline void SetNextWindowContentWidth(float w) { SetNextWindowContentSize(ImVec2(w, 0.0f)); } // OBSOLETED in 1.53 (between Oct 2017 and Dec 2017)
|
|
|
|
|
- //static inline float GetItemsLineHeightWithSpacing() { return GetFrameHeightWithSpacing(); } // OBSOLETED in 1.53 (between Oct 2017 and Dec 2017)
|
|
|
|
|
|
|
+ //static inline void TreeAdvanceToLabelPos() { SetCursorPosX(GetCursorPosX() + GetTreeNodeToLabelSpacing()); } // OBSOLETED in 1.72 (from July 2019)
|
|
|
|
|
+ //static inline void SetNextTreeNodeOpen(bool open, ImGuiCond cond = 0) { SetNextItemOpen(open, cond); } // OBSOLETED in 1.71 (from June 2019)
|
|
|
|
|
+ //static inline float GetContentRegionAvailWidth() { return GetContentRegionAvail().x; } // OBSOLETED in 1.70 (from May 2019)
|
|
|
|
|
+ //static inline ImDrawList* GetOverlayDrawList() { return GetForegroundDrawList(); } // OBSOLETED in 1.69 (from Mar 2019)
|
|
|
|
|
+ //static inline void SetScrollHere(float ratio = 0.5f) { SetScrollHereY(ratio); } // OBSOLETED in 1.66 (from Nov 2018)
|
|
|
|
|
+ //static inline bool IsItemDeactivatedAfterChange() { return IsItemDeactivatedAfterEdit(); } // OBSOLETED in 1.63 (from Aug 2018)
|
|
|
|
|
+ //static inline bool IsAnyWindowFocused() { return IsWindowFocused(ImGuiFocusedFlags_AnyWindow); } // OBSOLETED in 1.60 (from Apr 2018)
|
|
|
|
|
+ //static inline bool IsAnyWindowHovered() { return IsWindowHovered(ImGuiHoveredFlags_AnyWindow); } // OBSOLETED in 1.60 (between Dec 2017 and Apr 2018)
|
|
|
|
|
+ //static inline void ShowTestWindow() { return ShowDemoWindow(); } // OBSOLETED in 1.53 (between Oct 2017 and Dec 2017)
|
|
|
|
|
+ //static inline bool IsRootWindowFocused() { return IsWindowFocused(ImGuiFocusedFlags_RootWindow); } // OBSOLETED in 1.53 (between Oct 2017 and Dec 2017)
|
|
|
|
|
+ //static inline bool IsRootWindowOrAnyChildFocused() { return IsWindowFocused(ImGuiFocusedFlags_RootAndChildWindows); } // OBSOLETED in 1.53 (between Oct 2017 and Dec 2017)
|
|
|
|
|
+ //static inline void SetNextWindowContentWidth(float w) { SetNextWindowContentSize(ImVec2(w, 0.0f)); } // OBSOLETED in 1.53 (between Oct 2017 and Dec 2017)
|
|
|
|
|
+ //static inline float GetItemsLineHeightWithSpacing() { return GetFrameHeightWithSpacing(); } // OBSOLETED in 1.53 (between Oct 2017 and Dec 2017)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// OBSOLETED in 1.82 (from Mars 2021): flags for AddRect(), AddRectFilled(), AddImageRounded(), PathRect()
|
|
// OBSOLETED in 1.82 (from Mars 2021): flags for AddRect(), AddRectFilled(), AddImageRounded(), PathRect()
|