Updates to v1.91.0-docking

This commit is contained in:
Mason Remaley 2024-08-05 21:22:30 -07:00
parent 0e71d57276
commit 045d27e9af
7 changed files with 5928 additions and 2957 deletions

View file

@ -3,8 +3,8 @@
.version = "0.0.0",
.dependencies = .{
.@"dear-imgui" = .{
.url = "https://github.com/ocornut/imgui/archive/refs/tags/v1.90.9-docking.tar.gz",
.hash = "1220854ebf6bca15874cac634f0c9e39145cc0d13c1cf74822b6ed3073e906a4f8d5",
.url = "https://github.com/ocornut/imgui/archive/refs/tags/v1.91.0-docking.tar.gz",
.hash = "12202e9be2f239ed76eee410708478443039fa503011709763f3fa6bf5869595130b",
},
.@"Vulkan-Headers" = .{
.url = "https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/v1.3.290.tar.gz",

View file

@ -412,26 +412,6 @@ CIMGUI_API void cimgui::ImGui_SetWindowFocusStr(const char* name)
::ImGui::SetWindowFocus(name);
}
CIMGUI_API cimgui::ImVec2 cimgui::ImGui_GetContentRegionAvail(void)
{
return ConvertFromCPP_ImVec2(::ImGui::GetContentRegionAvail());
}
CIMGUI_API cimgui::ImVec2 cimgui::ImGui_GetContentRegionMax(void)
{
return ConvertFromCPP_ImVec2(::ImGui::GetContentRegionMax());
}
CIMGUI_API cimgui::ImVec2 cimgui::ImGui_GetWindowContentRegionMin(void)
{
return ConvertFromCPP_ImVec2(::ImGui::GetWindowContentRegionMin());
}
CIMGUI_API cimgui::ImVec2 cimgui::ImGui_GetWindowContentRegionMax(void)
{
return ConvertFromCPP_ImVec2(::ImGui::GetWindowContentRegionMax());
}
CIMGUI_API float cimgui::ImGui_GetScrollX(void)
{
return ::ImGui::GetScrollX();
@ -532,24 +512,14 @@ CIMGUI_API void cimgui::ImGui_PopStyleVarEx(int count)
::ImGui::PopStyleVar(count);
}
CIMGUI_API void cimgui::ImGui_PushTabStop(bool tab_stop)
CIMGUI_API void cimgui::ImGui_PushItemFlag(ImGuiItemFlags option, bool enabled)
{
::ImGui::PushTabStop(tab_stop);
::ImGui::PushItemFlag(option, enabled);
}
CIMGUI_API void cimgui::ImGui_PopTabStop(void)
CIMGUI_API void cimgui::ImGui_PopItemFlag(void)
{
::ImGui::PopTabStop();
}
CIMGUI_API void cimgui::ImGui_PushButtonRepeat(bool repeat)
{
::ImGui::PushButtonRepeat(repeat);
}
CIMGUI_API void cimgui::ImGui_PopButtonRepeat(void)
{
::ImGui::PopButtonRepeat();
::ImGui::PopItemFlag();
}
CIMGUI_API void cimgui::ImGui_PushItemWidth(float item_width)
@ -637,6 +607,11 @@ CIMGUI_API void cimgui::ImGui_SetCursorScreenPos(cimgui::ImVec2 pos)
::ImGui::SetCursorScreenPos(ConvertToCPP_ImVec2(pos));
}
CIMGUI_API cimgui::ImVec2 cimgui::ImGui_GetContentRegionAvail(void)
{
return ConvertFromCPP_ImVec2(::ImGui::GetContentRegionAvail());
}
CIMGUI_API cimgui::ImVec2 cimgui::ImGui_GetCursorPos(void)
{
return ConvertFromCPP_ImVec2(::ImGui::GetCursorPos());
@ -797,6 +772,11 @@ CIMGUI_API ImGuiID cimgui::ImGui_GetIDPtr(const void* ptr_id)
return ::ImGui::GetID(ptr_id);
}
CIMGUI_API ImGuiID cimgui::ImGui_GetIDInt(int int_id)
{
return ::ImGui::GetID(int_id);
}
CIMGUI_API void cimgui::ImGui_TextUnformatted(const char* text)
{
::ImGui::TextUnformatted(text);
@ -950,6 +930,21 @@ CIMGUI_API void cimgui::ImGui_Bullet(void)
::ImGui::Bullet();
}
CIMGUI_API bool cimgui::ImGui_TextLink(const char* label)
{
return ::ImGui::TextLink(label);
}
CIMGUI_API void cimgui::ImGui_TextLinkOpenURL(const char* label)
{
::ImGui::TextLinkOpenURL(label);
}
CIMGUI_API void cimgui::ImGui_TextLinkOpenURLEx(const char* label, const char* url)
{
::ImGui::TextLinkOpenURL(label, url);
}
CIMGUI_API void cimgui::ImGui_Image(ImTextureID user_texture_id, cimgui::ImVec2 image_size)
{
::ImGui::Image(user_texture_id, ConvertToCPP_ImVec2(image_size));
@ -1527,6 +1522,11 @@ CIMGUI_API void cimgui::ImGui_SetNextItemOpen(bool is_open, ImGuiCond cond)
::ImGui::SetNextItemOpen(is_open, cond);
}
CIMGUI_API void cimgui::ImGui_SetNextItemStorageID(ImGuiID storage_id)
{
::ImGui::SetNextItemStorageID(storage_id);
}
CIMGUI_API bool cimgui::ImGui_Selectable(const char* label)
{
return ::ImGui::Selectable(label);
@ -1547,6 +1547,31 @@ CIMGUI_API bool cimgui::ImGui_SelectableBoolPtrEx(const char* label, bool* p_sel
return ::ImGui::Selectable(label, p_selected, flags, ConvertToCPP_ImVec2(size));
}
CIMGUI_API cimgui::ImGuiMultiSelectIO* cimgui::ImGui_BeginMultiSelect(ImGuiMultiSelectFlags flags)
{
return reinterpret_cast<::cimgui::ImGuiMultiSelectIO*>(::ImGui::BeginMultiSelect(flags));
}
CIMGUI_API cimgui::ImGuiMultiSelectIO* cimgui::ImGui_BeginMultiSelectEx(ImGuiMultiSelectFlags flags, int selection_size, int items_count)
{
return reinterpret_cast<::cimgui::ImGuiMultiSelectIO*>(::ImGui::BeginMultiSelect(flags, selection_size, items_count));
}
CIMGUI_API cimgui::ImGuiMultiSelectIO* cimgui::ImGui_EndMultiSelect(void)
{
return reinterpret_cast<::cimgui::ImGuiMultiSelectIO*>(::ImGui::EndMultiSelect());
}
CIMGUI_API void cimgui::ImGui_SetNextItemSelectionUserData(ImGuiSelectionUserData selection_user_data)
{
::ImGui::SetNextItemSelectionUserData(selection_user_data);
}
CIMGUI_API bool cimgui::ImGui_IsItemToggledSelection(void)
{
return ::ImGui::IsItemToggledSelection();
}
CIMGUI_API bool cimgui::ImGui_BeginListBox(const char* label, cimgui::ImVec2 size)
{
return ::ImGui::BeginListBox(label, ConvertToCPP_ImVec2(size));
@ -2346,6 +2371,11 @@ CIMGUI_API void cimgui::ImGui_SetNextItemShortcut(ImGuiKeyChord key_chord, ImGui
::ImGui::SetNextItemShortcut(key_chord, flags);
}
CIMGUI_API void cimgui::ImGui_SetItemKeyOwner(cimgui::ImGuiKey key)
{
::ImGui::SetItemKeyOwner(static_cast<::ImGuiKey>(key));
}
CIMGUI_API bool cimgui::ImGui_IsMouseDown(ImGuiMouseButton button)
{
return ::ImGui::IsMouseDown(button);
@ -2491,6 +2521,23 @@ CIMGUI_API bool cimgui::ImGui_DebugCheckVersionAndDataLayout(const char* version
return ::ImGui::DebugCheckVersionAndDataLayout(version_str, sz_io, sz_style, sz_vec2, sz_vec4, sz_drawvert, sz_drawidx);
}
#ifndef IMGUI_DISABLE_DEBUG_TOOLS
CIMGUI_API void cimgui::ImGui_DebugLog(const char* fmt, ...)
{
va_list args;
va_start(args, fmt);
::ImGui::DebugLogV(fmt, args);
va_end(args);
}
CIMGUI_API void cimgui::ImGui_DebugLogV(const char* fmt, va_list args)
{
::ImGui::DebugLogV(fmt, args);
}
#endif // #ifndef IMGUI_DISABLE_DEBUG_TOOLS
CIMGUI_API void cimgui::ImGui_SetAllocatorFunctions(cimgui::ImGuiMemAllocFunc alloc_func, cimgui::ImGuiMemFreeFunc free_func, void* user_data)
{
::ImGui::SetAllocatorFunctions(reinterpret_cast<::ImGuiMemAllocFunc>(alloc_func), reinterpret_cast<::ImGuiMemFreeFunc>(free_func), user_data);
@ -2878,6 +2925,11 @@ CIMGUI_API void cimgui::ImGuiListClipper_IncludeItemsByIndex(cimgui::ImGuiListCl
reinterpret_cast<::ImGuiListClipper*>(self)->IncludeItemsByIndex(item_begin, item_end);
}
CIMGUI_API void cimgui::ImGuiListClipper_SeekCursorForItem(cimgui::ImGuiListClipper* self, int item_index)
{
reinterpret_cast<::ImGuiListClipper*>(self)->SeekCursorForItem(item_index);
}
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
CIMGUI_API void cimgui::ImGuiListClipper_IncludeRangeByIndices(cimgui::ImGuiListClipper* self, int item_begin, int item_end)
@ -2902,6 +2954,46 @@ CIMGUI_API cimgui::ImColor cimgui::ImColor_HSV(cimgui::ImColor* self, float h, f
return ConvertFromCPP_ImColor(reinterpret_cast<::ImColor*>(self)->ImColor::HSV(h, s, v, a));
}
CIMGUI_API void cimgui::ImGuiSelectionBasicStorage_ApplyRequests(cimgui::ImGuiSelectionBasicStorage* self, cimgui::ImGuiMultiSelectIO* ms_io)
{
reinterpret_cast<::ImGuiSelectionBasicStorage*>(self)->ApplyRequests(reinterpret_cast<::ImGuiMultiSelectIO*>(ms_io));
}
CIMGUI_API bool cimgui::ImGuiSelectionBasicStorage_Contains(const cimgui::ImGuiSelectionBasicStorage* self, ImGuiID id)
{
return reinterpret_cast<const ::ImGuiSelectionBasicStorage*>(self)->Contains(id);
}
CIMGUI_API void cimgui::ImGuiSelectionBasicStorage_Clear(cimgui::ImGuiSelectionBasicStorage* self)
{
reinterpret_cast<::ImGuiSelectionBasicStorage*>(self)->Clear();
}
CIMGUI_API void cimgui::ImGuiSelectionBasicStorage_Swap(cimgui::ImGuiSelectionBasicStorage* self, cimgui::ImGuiSelectionBasicStorage* r)
{
reinterpret_cast<::ImGuiSelectionBasicStorage*>(self)->Swap(reinterpret_cast<::ImGuiSelectionBasicStorage&>(*r));
}
CIMGUI_API void cimgui::ImGuiSelectionBasicStorage_SetItemSelected(cimgui::ImGuiSelectionBasicStorage* self, ImGuiID id, bool selected)
{
reinterpret_cast<::ImGuiSelectionBasicStorage*>(self)->SetItemSelected(id, selected);
}
CIMGUI_API bool cimgui::ImGuiSelectionBasicStorage_GetNextSelectedItem(cimgui::ImGuiSelectionBasicStorage* self, void** opaque_it, ImGuiID* out_id)
{
return reinterpret_cast<::ImGuiSelectionBasicStorage*>(self)->GetNextSelectedItem(opaque_it, out_id);
}
CIMGUI_API ImGuiID cimgui::ImGuiSelectionBasicStorage_GetStorageIdFromIndex(cimgui::ImGuiSelectionBasicStorage* self, int idx)
{
return reinterpret_cast<::ImGuiSelectionBasicStorage*>(self)->GetStorageIdFromIndex(idx);
}
CIMGUI_API void cimgui::ImGuiSelectionExternalStorage_ApplyRequests(cimgui::ImGuiSelectionExternalStorage* self, cimgui::ImGuiMultiSelectIO* ms_io)
{
reinterpret_cast<::ImGuiSelectionExternalStorage*>(self)->ApplyRequests(reinterpret_cast<::ImGuiMultiSelectIO*>(ms_io));
}
CIMGUI_API ImTextureID cimgui::ImDrawCmd_GetTexID(const cimgui::ImDrawCmd* self)
{
return reinterpret_cast<const ::ImDrawCmd*>(self)->GetTexID();
@ -3645,6 +3737,41 @@ CIMGUI_API cimgui::ImVec2 cimgui::ImGuiViewport_GetWorkCenter(const cimgui::ImGu
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
CIMGUI_API void cimgui::ImGui_PushButtonRepeat(bool repeat)
{
::ImGui::PushButtonRepeat(repeat);
}
CIMGUI_API void cimgui::ImGui_PopButtonRepeat(void)
{
::ImGui::PopButtonRepeat();
}
CIMGUI_API void cimgui::ImGui_PushTabStop(bool tab_stop)
{
::ImGui::PushTabStop(tab_stop);
}
CIMGUI_API void cimgui::ImGui_PopTabStop(void)
{
::ImGui::PopTabStop();
}
CIMGUI_API cimgui::ImVec2 cimgui::ImGui_GetContentRegionMax(void)
{
return ConvertFromCPP_ImVec2(::ImGui::GetContentRegionMax());
}
CIMGUI_API cimgui::ImVec2 cimgui::ImGui_GetWindowContentRegionMin(void)
{
return ConvertFromCPP_ImVec2(::ImGui::GetWindowContentRegionMin());
}
CIMGUI_API cimgui::ImVec2 cimgui::ImGui_GetWindowContentRegionMax(void)
{
return ConvertFromCPP_ImVec2(::ImGui::GetWindowContentRegionMax());
}
CIMGUI_API bool cimgui::ImGui_BeginChildFrame(ImGuiID id, cimgui::ImVec2 size)
{
return ::ImGui::BeginChildFrame(id, ConvertToCPP_ImVec2(size));
@ -3665,16 +3792,6 @@ CIMGUI_API void cimgui::ImGui_ShowStackToolWindow(bool* p_open)
::ImGui::ShowStackToolWindow(p_open);
}
CIMGUI_API bool cimgui::ImGui_ListBoxObsolete(const char* label, int* current_item, bool (*old_callback)(void* user_data, int idx, const char** out_text), void* user_data, int items_count)
{
return ::ImGui::ListBox(label, current_item, old_callback, user_data, items_count);
}
CIMGUI_API bool cimgui::ImGui_ListBoxObsoleteEx(const char* label, int* current_item, bool (*old_callback)(void* user_data, int idx, const char** out_text), void* user_data, int items_count, int height_in_items)
{
return ::ImGui::ListBox(label, current_item, old_callback, user_data, items_count, height_in_items);
}
CIMGUI_API bool cimgui::ImGui_ComboObsolete(const char* label, int* current_item, bool (*old_callback)(void* user_data, int idx, const char** out_text), void* user_data, int items_count)
{
return ::ImGui::Combo(label, current_item, old_callback, user_data, items_count);
@ -3685,6 +3802,16 @@ CIMGUI_API bool cimgui::ImGui_ComboObsoleteEx(const char* label, int* curren
return ::ImGui::Combo(label, current_item, old_callback, user_data, items_count, popup_max_height_in_items);
}
CIMGUI_API bool cimgui::ImGui_ListBoxObsolete(const char* label, int* current_item, bool (*old_callback)(void* user_data, int idx, const char** out_text), void* user_data, int items_count)
{
return ::ImGui::ListBox(label, current_item, old_callback, user_data, items_count);
}
CIMGUI_API bool cimgui::ImGui_ListBoxObsoleteEx(const char* label, int* current_item, bool (*old_callback)(void* user_data, int idx, const char** out_text), void* user_data, int items_count, int height_in_items)
{
return ::ImGui::ListBox(label, current_item, old_callback, user_data, items_count, height_in_items);
}
CIMGUI_API void cimgui::ImGui_SetItemAllowOverlap(void)
{
::ImGui::SetItemAllowOverlap();

View file

@ -2,7 +2,7 @@
// **DO NOT EDIT DIRECTLY**
// https://github.com/dearimgui/dear_bindings
// dear imgui, v1.90.9
// dear imgui, v1.91.0
// (headers)
// Help:
@ -31,8 +31,8 @@
// Library Version
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM >= 12345')
#define IMGUI_VERSION "1.90.9"
#define IMGUI_VERSION_NUM 19090
#define IMGUI_VERSION "1.91.0"
#define IMGUI_VERSION_NUM 19100
#define IMGUI_HAS_TABLE
#define IMGUI_HAS_VIEWPORT // Viewport WIP branch
#define IMGUI_HAS_DOCK // Docking WIP branch
@ -45,11 +45,12 @@ Index of this file:
// [SECTION] Dear ImGui end-user API functions
// [SECTION] Flags & Enumerations
// [SECTION] Tables API flags and structures (ImGuiTableFlags, ImGuiTableColumnFlags, ImGuiTableRowFlags, ImGuiTableBgTarget, ImGuiTableSortSpecs, ImGuiTableColumnSortSpecs)
// [SECTION] Helpers: Memory allocations macros, ImVector<>
// [SECTION] Helpers: Debug log, Memory allocations macros, ImVector<>
// [SECTION] ImGuiStyle
// [SECTION] ImGuiIO
// [SECTION] Misc data structures (ImGuiInputTextCallbackData, ImGuiSizeCallbackData, ImGuiWindowClass, ImGuiPayload)
// [SECTION] Helpers (ImGuiOnceUponAFrame, ImGuiTextFilter, ImGuiTextBuffer, ImGuiStorage, ImGuiListClipper, Math Operators, ImColor)
// [SECTION] Multi-Select API flags and structures (ImGuiMultiSelectFlags, ImGuiMultiSelectIO, ImGuiSelectionRequest, ImGuiSelectionBasicStorage, ImGuiSelectionExternalStorage)
// [SECTION] Drawing API (ImDrawCallback, ImDrawCmd, ImDrawIdx, ImDrawVert, ImDrawChannel, ImDrawListSplitter, ImDrawFlags, ImDrawListFlags, ImDrawList, ImDrawData)
// [SECTION] Font API (ImFontConfig, ImFontGlyph, ImFontGlyphRangesBuilder, ImFontAtlasFlags, ImFontAtlas, ImFont)
// [SECTION] Viewports (ImGuiViewportFlags, ImGuiViewport)
@ -156,6 +157,7 @@ typedef struct ImVector_ImWchar_t ImVector_ImWchar;
typedef struct ImVector_ImGuiTextFilter_ImGuiTextRange_t ImVector_ImGuiTextFilter_ImGuiTextRange;
typedef struct ImVector_char_t ImVector_char;
typedef struct ImVector_ImGuiStoragePair_t ImVector_ImGuiStoragePair;
typedef struct ImVector_ImGuiSelectionRequest_t ImVector_ImGuiSelectionRequest;
typedef struct ImVector_ImDrawCmd_t ImVector_ImDrawCmd;
typedef struct ImVector_ImDrawIdx_t ImVector_ImDrawIdx;
typedef struct ImVector_ImDrawChannel_t ImVector_ImDrawChannel;
@ -206,10 +208,14 @@ typedef struct ImGuiIO_t ImGuiIO; // Main
typedef struct ImGuiInputTextCallbackData_t ImGuiInputTextCallbackData; // Shared state of InputText() when using custom ImGuiInputTextCallback (rare/advanced use)
typedef struct ImGuiKeyData_t ImGuiKeyData; // Storage for ImGuiIO and IsKeyDown(), IsKeyPressed() etc functions.
typedef struct ImGuiListClipper_t ImGuiListClipper; // Helper to manually clip large list of items
typedef struct ImGuiMultiSelectIO_t ImGuiMultiSelectIO; // Structure to interact with a BeginMultiSelect()/EndMultiSelect() block
typedef struct ImGuiPayload_t ImGuiPayload; // User data payload for drag and drop operations
typedef struct ImGuiPlatformIO_t ImGuiPlatformIO; // Multi-viewport support: interface for Platform/Renderer backends + viewports to render
typedef struct ImGuiPlatformMonitor_t ImGuiPlatformMonitor; // Multi-viewport support: user-provided bounds for each connected monitor/display. Used when positioning popups and tooltips to avoid them straddling monitors
typedef struct ImGuiPlatformImeData_t ImGuiPlatformImeData; // Platform IME data for io.SetPlatformImeDataFn() function.
typedef struct ImGuiPlatformImeData_t ImGuiPlatformImeData; // Platform IME data for io.PlatformSetImeDataFn() function.
typedef struct ImGuiSelectionBasicStorage_t ImGuiSelectionBasicStorage; // Optional helper to store multi-selection state + apply multi-selection requests.
typedef struct ImGuiSelectionExternalStorage_t ImGuiSelectionExternalStorage; //Optional helper to apply multi-selection requests to existing randomly accessible storage.
typedef struct ImGuiSelectionRequest_t ImGuiSelectionRequest; // A selection request (stored in ImGuiMultiSelectIO)
typedef struct ImGuiSizeCallbackData_t ImGuiSizeCallbackData; // Callback data when using SetNextWindowSizeConstraints() (rare/advanced use)
typedef struct ImGuiStorage_t ImGuiStorage; // Helper for key->value storage (container sorted by key)
typedef struct ImGuiStoragePair_t ImGuiStoragePair; // Helper for key->value storage (pair)
@ -259,8 +265,10 @@ typedef int ImGuiFocusedFlags; // -> enum ImGuiFocusedFlags_ // Flags: f
typedef int ImGuiHoveredFlags; // -> enum ImGuiHoveredFlags_ // Flags: for IsItemHovered(), IsWindowHovered() etc.
typedef int ImGuiInputFlags; // -> enum ImGuiInputFlags_ // Flags: for Shortcut(), SetNextItemShortcut()
typedef int ImGuiInputTextFlags; // -> enum ImGuiInputTextFlags_ // Flags: for InputText(), InputTextMultiline()
typedef int ImGuiItemFlags; // -> enum ImGuiItemFlags_ // Flags: for PushItemFlag(), shared by all items
typedef int ImGuiKeyChord; // -> ImGuiKey | ImGuiMod_XXX // Flags: for IsKeyChordPressed(), Shortcut() etc. an ImGuiKey optionally OR-ed with one or more ImGuiMod_XXX values.
typedef int ImGuiPopupFlags; // -> enum ImGuiPopupFlags_ // Flags: for OpenPopup*(), BeginPopupContext*(), IsPopupOpen()
typedef int ImGuiMultiSelectFlags; // -> enum ImGuiMultiSelectFlags_// Flags: for BeginMultiSelect()
typedef int ImGuiSelectableFlags; // -> enum ImGuiSelectableFlags_ // Flags: for Selectable()
typedef int ImGuiSliderFlags; // -> enum ImGuiSliderFlags_ // Flags: for DragFloat(), DragInt(), SliderFloat(), SliderInt() etc.
typedef int ImGuiTabBarFlags; // -> enum ImGuiTabBarFlags_ // Flags: for BeginTabBar()
@ -293,6 +301,11 @@ typedef ImWchar32 ImWchar;
#else
typedef ImWchar16 ImWchar;
#endif// ImWchar [configurable type: override in imconfig.h with '#define IMGUI_USE_WCHAR32' to support Unicode planes 1-16]
// Multi-Selection item index or identifier when using BeginMultiSelect()
// - Used by SetNextItemSelectionUserData() + and inside ImGuiMultiSelectIO structure.
// - Most users are likely to use this store an item INDEX but this may be used to store a POINTER/ID as well. Read comments near ImGuiMultiSelectIO for details.
typedef ImS64 ImGuiSelectionUserData;
// Callback and functions types
typedef int (*ImGuiInputTextCallback)(ImGuiInputTextCallbackData* data); // Callback function for ImGui::InputText()
typedef void (*ImGuiSizeCallback)(ImGuiSizeCallbackData* data); // Callback function for ImGui::SetNextWindowSizeConstraints()
@ -400,10 +413,10 @@ CIMGUI_API bool ImGui_IsWindowFocused(ImGuiFocusedFlags flags /* = 0 *
CIMGUI_API bool ImGui_IsWindowHovered(ImGuiHoveredFlags flags /* = 0 */); // is current window hovered and hoverable (e.g. not blocked by a popup/modal)? See ImGuiHoveredFlags_ for options. IMPORTANT: If you are trying to check whether your mouse should be dispatched to Dear ImGui or to your underlying app, you should not use this function! Use the 'io.WantCaptureMouse' boolean for that! Refer to FAQ entry "How can I tell whether to dispatch mouse/keyboard to Dear ImGui or my application?" for details.
CIMGUI_API ImDrawList* ImGui_GetWindowDrawList(void); // get draw list associated to the current window, to append your own drawing primitives
CIMGUI_API float ImGui_GetWindowDpiScale(void); // get DPI scale currently associated to the current window's viewport.
CIMGUI_API ImVec2 ImGui_GetWindowPos(void); // get current window position in screen space (note: it is unlikely you need to use this. Consider using current layout pos instead, GetCursorScreenPos())
CIMGUI_API ImVec2 ImGui_GetWindowSize(void); // get current window size (note: it is unlikely you need to use this. Consider using GetCursorScreenPos() and e.g. GetContentRegionAvail() instead)
CIMGUI_API float ImGui_GetWindowWidth(void); // get current window width (shortcut for GetWindowSize().x)
CIMGUI_API float ImGui_GetWindowHeight(void); // get current window height (shortcut for GetWindowSize().y)
CIMGUI_API ImVec2 ImGui_GetWindowPos(void); // get current window position in screen space (IT IS UNLIKELY YOU EVER NEED TO USE THIS. Consider always using GetCursorScreenPos() and GetContentRegionAvail() instead)
CIMGUI_API ImVec2 ImGui_GetWindowSize(void); // get current window size (IT IS UNLIKELY YOU EVER NEED TO USE THIS. Consider always using GetCursorScreenPos() and GetContentRegionAvail() instead)
CIMGUI_API float ImGui_GetWindowWidth(void); // get current window width (IT IS UNLIKELY YOU EVER NEED TO USE THIS). Shortcut for GetWindowSize().x.
CIMGUI_API float ImGui_GetWindowHeight(void); // get current window height (IT IS UNLIKELY YOU EVER NEED TO USE THIS). Shortcut for GetWindowSize().y.
CIMGUI_API ImGuiViewport* ImGui_GetWindowViewport(void); // get viewport currently associated to the current window.
// Window manipulation
@ -428,14 +441,6 @@ CIMGUI_API void ImGui_SetWindowSizeStr(const char* name, ImVec2 size, ImGuiCond
CIMGUI_API void ImGui_SetWindowCollapsedStr(const char* name, bool collapsed, ImGuiCond cond /* = 0 */); // set named window collapsed state
CIMGUI_API void ImGui_SetWindowFocusStr(const char* name); // set named window to be focused / top-most. use NULL to remove focus.
// Content region
// - Retrieve available space from a given point. GetContentRegionAvail() is frequently useful.
// - Those functions are bound to be redesigned (they are confusing, incomplete and the Min/Max return values are in local window coordinates which increases confusion)
CIMGUI_API ImVec2 ImGui_GetContentRegionAvail(void); // == GetContentRegionMax() - GetCursorPos()
CIMGUI_API ImVec2 ImGui_GetContentRegionMax(void); // current content boundaries (typically window boundaries including scrolling, or current column boundaries), in windows coordinates
CIMGUI_API ImVec2 ImGui_GetWindowContentRegionMin(void); // content boundaries min for the full window (roughly (0,0)-Scroll), in window coordinates
CIMGUI_API ImVec2 ImGui_GetWindowContentRegionMax(void); // content boundaries max for the full window (roughly (0,0)+Size-Scroll) where Size can be overridden with SetNextWindowContentSize(), in window coordinates
// Windows Scrolling
// - Any change of Scroll will be applied at the beginning of next frame in the first call to Begin().
// - You may instead use SetNextWindowScroll() prior to calling Begin() to avoid this delay, as an alternative to using SetScrollX()/SetScrollY().
@ -461,10 +466,8 @@ CIMGUI_API void ImGui_PushStyleVar(ImGuiStyleVar idx, float val); // mod
CIMGUI_API void ImGui_PushStyleVarImVec2(ImGuiStyleVar idx, ImVec2 val); // modify a style ImVec2 variable. always use this if you modify the style after NewFrame().
CIMGUI_API void ImGui_PopStyleVar(void); // Implied count = 1
CIMGUI_API void ImGui_PopStyleVarEx(int count /* = 1 */);
CIMGUI_API void ImGui_PushTabStop(bool tab_stop); // == tab stop enable. Allow focusing using TAB/Shift-TAB, enabled by default but you can disable it for certain widgets
CIMGUI_API void ImGui_PopTabStop(void);
CIMGUI_API void ImGui_PushButtonRepeat(bool repeat); // in 'repeat' mode, Button*() functions return repeated true in a typematic manner (using io.KeyRepeatDelay/io.KeyRepeatRate setting). Note that you can call IsItemActive() after any Button() to tell if the button is held in the current frame.
CIMGUI_API void ImGui_PopButtonRepeat(void);
CIMGUI_API void ImGui_PushItemFlag(ImGuiItemFlags option, bool enabled); // modify specified shared item flag, e.g. PushItemFlag(ImGuiItemFlags_NoTabStop, true)
CIMGUI_API void ImGui_PopItemFlag(void);
// Parameters stacks (current window)
CIMGUI_API void ImGui_PushItemWidth(float item_width); // push width of items for common large "item+label" widgets. >0.0f: width in pixels, <0.0f align xx pixels to the right of window (so -FLT_MIN always align width to the right side).
@ -490,19 +493,22 @@ CIMGUI_API const ImVec4* ImGui_GetStyleColorVec4(ImGuiCol idx);
// - By "cursor" we mean the current output position.
// - The typical widget behavior is to output themselves at the current cursor position, then move the cursor one line down.
// - You can call SameLine() between widgets to undo the last carriage return and output at the right of the preceding widget.
// - YOU CAN DO 99% OF WHAT YOU NEED WITH ONLY GetCursorScreenPos() and GetContentRegionAvail().
// - Attention! We currently have inconsistencies between window-local and absolute positions we will aim to fix with future API:
// - Absolute coordinate: GetCursorScreenPos(), SetCursorScreenPos(), all ImDrawList:: functions. -> this is the preferred way forward.
// - Window-local coordinates: SameLine(), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), GetContentRegionMax(), GetWindowContentRegion*(), PushTextWrapPos()
// - GetCursorScreenPos() = GetCursorPos() + GetWindowPos(). GetWindowPos() is almost only ever useful to convert from window-local to absolute coordinates.
CIMGUI_API ImVec2 ImGui_GetCursorScreenPos(void); // cursor position in absolute coordinates (prefer using this, also more useful to work with ImDrawList API).
CIMGUI_API void ImGui_SetCursorScreenPos(ImVec2 pos); // cursor position in absolute coordinates
CIMGUI_API ImVec2 ImGui_GetCursorPos(void); // [window-local] cursor position in window coordinates (relative to window position)
// - Window-local coordinates: SameLine(offset), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), PushTextWrapPos()
// - Window-local coordinates: GetContentRegionMax(), GetWindowContentRegionMin(), GetWindowContentRegionMax() --> all obsoleted. YOU DON'T NEED THEM.
// - GetCursorScreenPos() = GetCursorPos() + GetWindowPos(). GetWindowPos() is almost only ever useful to convert from window-local to absolute coordinates. Try not to use it.
CIMGUI_API ImVec2 ImGui_GetCursorScreenPos(void); // cursor position, absolute coordinates. THIS IS YOUR BEST FRIEND (prefer using this rather than GetCursorPos(), also more useful to work with ImDrawList API).
CIMGUI_API void ImGui_SetCursorScreenPos(ImVec2 pos); // cursor position, absolute coordinates. THIS IS YOUR BEST FRIEND.
CIMGUI_API ImVec2 ImGui_GetContentRegionAvail(void); // available space from current position. THIS IS YOUR BEST FRIEND.
CIMGUI_API ImVec2 ImGui_GetCursorPos(void); // [window-local] cursor position in window-local coordinates. This is not your best friend.
CIMGUI_API float ImGui_GetCursorPosX(void); // [window-local] "
CIMGUI_API float ImGui_GetCursorPosY(void); // [window-local] "
CIMGUI_API void ImGui_SetCursorPos(ImVec2 local_pos); // [window-local] "
CIMGUI_API void ImGui_SetCursorPosX(float local_x); // [window-local] "
CIMGUI_API void ImGui_SetCursorPosY(float local_y); // [window-local] "
CIMGUI_API ImVec2 ImGui_GetCursorStartPos(void); // [window-local] initial cursor position, in window coordinates
CIMGUI_API ImVec2 ImGui_GetCursorStartPos(void); // [window-local] initial cursor position, in window-local coordinates. Call GetCursorScreenPos() after Begin() to get the absolute coordinates version.
// Other layout functions
CIMGUI_API void ImGui_Separator(void); // separator, generally horizontal. inside a menu bar or in horizontal layout mode, this becomes a vertical separator.
@ -542,6 +548,7 @@ CIMGUI_API void ImGui_PopID(void);
CIMGUI_API ImGuiID ImGui_GetID(const char* str_id); // calculate unique ID (hash of whole ID stack + given parameter). e.g. if you want to query into ImGuiStorage yourself
CIMGUI_API ImGuiID ImGui_GetIDStr(const char* str_id_begin, const char* str_id_end);
CIMGUI_API ImGuiID ImGui_GetIDPtr(const void* ptr_id);
CIMGUI_API ImGuiID ImGui_GetIDInt(int int_id);
// Widgets: Text
CIMGUI_API void ImGui_TextUnformatted(const char* text); // Implied text_end = NULL
@ -575,6 +582,9 @@ CIMGUI_API bool ImGui_RadioButton(const char* label, bool active);
CIMGUI_API bool ImGui_RadioButtonIntPtr(const char* label, int* v, int v_button); // shortcut to handle the above pattern when value is an integer
CIMGUI_API void ImGui_ProgressBar(float fraction, ImVec2 size_arg /* = ImVec2(-FLT_MIN, 0) */, const char* overlay /* = NULL */);
CIMGUI_API void ImGui_Bullet(void); // draw a small circle + keep the cursor on the same line. advance cursor x position by GetTreeNodeToLabelSpacing(), same distance that TreeNode() uses
CIMGUI_API bool ImGui_TextLink(const char* label); // hyperlink text button, return true when clicked
CIMGUI_API void ImGui_TextLinkOpenURL(const char* label); // Implied url = NULL
CIMGUI_API void ImGui_TextLinkOpenURLEx(const char* label, const char* url /* = NULL */); // hyperlink text button, automatically open file/url when clicked
// Widgets: Images
// - Read about ImTextureID here: https://github.com/ocornut/imgui/wiki/Image-Loading-and-Displaying-Examples
@ -728,6 +738,7 @@ CIMGUI_API float ImGui_GetTreeNodeToLabelSpacing(void);
CIMGUI_API bool ImGui_CollapsingHeader(const char* label, ImGuiTreeNodeFlags flags /* = 0 */); // if returning 'true' the header is open. doesn't indent nor push on ID stack. user doesn't have to call TreePop().
CIMGUI_API bool ImGui_CollapsingHeaderBoolPtr(const char* label, bool* p_visible, ImGuiTreeNodeFlags flags /* = 0 */); // when 'p_visible != NULL': if '*p_visible==true' display an additional small close button on upper right of the header which will set the bool to false when clicked, if '*p_visible==false' don't display the header.
CIMGUI_API void ImGui_SetNextItemOpen(bool is_open, ImGuiCond cond /* = 0 */); // set next TreeNode/CollapsingHeader open state.
CIMGUI_API void ImGui_SetNextItemStorageID(ImGuiID storage_id); // set id to use for open/close storage (default to same as item id).
// Widgets: Selectables
// - A selectable highlights when hovered, and can display another color when selected.
@ -737,6 +748,19 @@ CIMGUI_API bool ImGui_SelectableEx(const char* label, bool selected /* = false *
CIMGUI_API bool ImGui_SelectableBoolPtr(const char* label, bool* p_selected, ImGuiSelectableFlags flags /* = 0 */); // Implied size = ImVec2(0, 0)
CIMGUI_API bool ImGui_SelectableBoolPtrEx(const char* label, bool* p_selected, ImGuiSelectableFlags flags /* = 0 */, ImVec2 size /* = ImVec2(0, 0) */); // "bool* p_selected" point to the selection state (read-write), as a convenient helper.
// Multi-selection system for Selectable(), Checkbox(), TreeNode() functions [BETA]
// - This enables standard multi-selection/range-selection idioms (CTRL+Mouse/Keyboard, SHIFT+Mouse/Keyboard, etc.) in a way that also allow a clipper to be used.
// - ImGuiSelectionUserData is often used to store your item index within the current view (but may store something else).
// - Read comments near ImGuiMultiSelectIO for instructions/details and see 'Demo->Widgets->Selection State & Multi-Select' for demo.
// - TreeNode() is technically supported but... using this correctly is more complicated. You need some sort of linear/random access to your tree,
// which is suited to advanced trees setups already implementing filters and clipper. We will work simplifying the current demo.
// - 'selection_size' and 'items_count' parameters are optional and used by a few features. If they are costly for you to compute, you may avoid them.
CIMGUI_API ImGuiMultiSelectIO* ImGui_BeginMultiSelect(ImGuiMultiSelectFlags flags); // Implied selection_size = -1, items_count = -1
CIMGUI_API ImGuiMultiSelectIO* ImGui_BeginMultiSelectEx(ImGuiMultiSelectFlags flags, int selection_size /* = -1 */, int items_count /* = -1 */);
CIMGUI_API ImGuiMultiSelectIO* ImGui_EndMultiSelect(void);
CIMGUI_API void ImGui_SetNextItemSelectionUserData(ImGuiSelectionUserData selection_user_data);
CIMGUI_API bool ImGui_IsItemToggledSelection(void); // Was the last item selection state toggled? Useful if you need the per-item information _before_ reaching EndMultiSelect(). We only returns toggle _event_ in order to handle clipping correctly.
// Widgets: List Boxes
// - This is essentially a thin wrapper to using BeginChild/EndChild with the ImGuiChildFlags_FrameStyle flag for stylistic changes + displaying a label.
// - You can submit contents and manage your selection state however you want it, by creating e.g. Selectable() or any other items.
@ -1072,6 +1096,14 @@ CIMGUI_API void ImGui_SetNextFrameWantCaptureKeyboard(bool want_capture_k
CIMGUI_API bool ImGui_Shortcut(ImGuiKeyChord key_chord, ImGuiInputFlags flags /* = 0 */);
CIMGUI_API void ImGui_SetNextItemShortcut(ImGuiKeyChord key_chord, ImGuiInputFlags flags /* = 0 */);
// Inputs Utilities: Key/Input Ownership [BETA]
// - One common use case would be to allow your items to disable standard inputs behaviors such
// as Tab or Alt key handling, Mouse Wheel scrolling, etc.
// e.g. Button(...); SetItemKeyOwner(ImGuiKey_MouseWheelY); to make hovering/activating a button disable wheel for scrolling.
// - Reminder ImGuiKey enum include access to mouse buttons and gamepad, so key ownership can apply to them.
// - Many related features are still in imgui_internal.h. For instance, most IsKeyXXX()/IsMouseXXX() functions have an owner-id-aware version.
CIMGUI_API void ImGui_SetItemKeyOwner(ImGuiKey key); // Set key owner to last item ID if it is hovered or active. Equivalent to 'if (IsItemHovered() || IsItemActive()) { SetKeyOwner(key, GetItemID());'.
// Inputs Utilities: Mouse specific
// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right.
// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle.
@ -1116,7 +1148,10 @@ CIMGUI_API void ImGui_DebugTextEncoding(const char* text);
CIMGUI_API void ImGui_DebugFlashStyleColor(ImGuiCol idx);
CIMGUI_API void ImGui_DebugStartItemPicker(void);
CIMGUI_API bool ImGui_DebugCheckVersionAndDataLayout(const char* version_str, size_t sz_io, size_t sz_style, size_t sz_vec2, size_t sz_vec4, size_t sz_drawvert, size_t sz_drawidx); // This is called by IMGUI_CHECKVERSION() macro.
#ifndef IMGUI_DISABLE_DEBUG_TOOLS
CIMGUI_API void ImGui_DebugLog(const char* fmt, ...) IM_FMTARGS(1); // Call via IMGUI_DEBUG_LOG() for maximum stripping in caller code!
CIMGUI_API void ImGui_DebugLogV(const char* fmt, va_list args) IM_FMTLIST(1);
#endif // #ifndef IMGUI_DISABLE_DEBUG_TOOLS
// Memory Allocators
// - Those functions are not reliant on the current context.
// - DLL users: heaps and globals are not shared across DLL boundaries! You will need to call SetCurrentContext() + SetAllocatorFunctions()
@ -1180,7 +1215,7 @@ typedef enum
// Obsolete names
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
ImGuiWindowFlags_AlwaysUseWindowPadding = 1<<30, // Obsoleted in 1.90: Use ImGuiChildFlags_AlwaysUseWindowPadding in BeginChild() call.
ImGuiWindowFlags_AlwaysUseWindowPadding = 1<<30, // Obsoleted in 1.90.0: Use ImGuiChildFlags_AlwaysUseWindowPadding in BeginChild() call.
ImGuiWindowFlags_NavFlattened = 1<<31, // Obsoleted in 1.90.9: Use ImGuiChildFlags_NavFlattened in BeginChild() call.
#endif // #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
} ImGuiWindowFlags_;
@ -1205,9 +1240,21 @@ typedef enum
ImGuiChildFlags_AutoResizeY = 1<<5, // Enable auto-resizing height. Read "IMPORTANT: Size measurement" details above.
ImGuiChildFlags_AlwaysAutoResize = 1<<6, // Combined with AutoResizeX/AutoResizeY. Always measure size even when child is hidden, always return true, always disable clipping optimization! NOT RECOMMENDED.
ImGuiChildFlags_FrameStyle = 1<<7, // Style the child window like a framed item: use FrameBg, FrameRounding, FrameBorderSize, FramePadding instead of ChildBg, ChildRounding, ChildBorderSize, WindowPadding.
ImGuiChildFlags_NavFlattened = 1<<8, // Share focus scope, allow gamepad/keyboard navigation to cross over parent border to this child or between sibling child windows.
ImGuiChildFlags_NavFlattened = 1<<8, // [BETA] Share focus scope, allow gamepad/keyboard navigation to cross over parent border to this child or between sibling child windows.
} ImGuiChildFlags_;
// Flags for ImGui::PushItemFlag()
// (Those are shared by all items)
typedef enum
{
ImGuiItemFlags_None = 0, // (Default)
ImGuiItemFlags_NoTabStop = 1<<0, // false // Disable keyboard tabbing. This is a "lighter" version of ImGuiItemFlags_NoNav.
ImGuiItemFlags_NoNav = 1<<1, // false // Disable any form of focusing (keyboard/gamepad directional navigation and SetKeyboardFocusHere() calls).
ImGuiItemFlags_NoNavDefaultFocus = 1<<2, // false // Disable item being a candidate for default focus (e.g. used by title bar items).
ImGuiItemFlags_ButtonRepeat = 1<<3, // false // Any button-like behavior will have repeat mode enabled (based on io.KeyRepeatDelay and io.KeyRepeatRate values). Note that you can also call IsItemActive() after any button to tell if it is being held.
ImGuiItemFlags_AutoClosePopups = 1<<4, // true // MenuItem()/Selectable() automatically close their parent popup window.
} ImGuiItemFlags_;
// Flags for ImGui::InputText()
// (Those are per-item flags. There are shared flags in ImGuiIO: io.ConfigInputTextCursorBlink and io.ConfigInputTextEnterKeepActive)
typedef enum
@ -1305,13 +1352,15 @@ typedef enum
typedef enum
{
ImGuiSelectableFlags_None = 0,
ImGuiSelectableFlags_DontClosePopups = 1<<0, // Clicking this doesn't close parent popup window
ImGuiSelectableFlags_NoAutoClosePopups = 1<<0, // Clicking this doesn't close parent popup window (overrides ImGuiItemFlags_AutoClosePopups)
ImGuiSelectableFlags_SpanAllColumns = 1<<1, // Frame will span all columns of its container table (text will still fit in current column)
ImGuiSelectableFlags_AllowDoubleClick = 1<<2, // Generate press events on double clicks too
ImGuiSelectableFlags_Disabled = 1<<3, // Cannot be selected, display grayed out text
ImGuiSelectableFlags_AllowOverlap = 1<<4, // (WIP) Hit testing to allow subsequent widgets to overlap this one
ImGuiSelectableFlags_Highlight = 1<<5, // Make the item be displayed as if it is hovered
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
ImGuiSelectableFlags_DontClosePopups = ImGuiSelectableFlags_NoAutoClosePopups, // Renamed in 1.91.0
ImGuiSelectableFlags_AllowItemOverlap = ImGuiSelectableFlags_AllowOverlap, // Renamed in 1.89.7
#endif // #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
} ImGuiSelectableFlags_;
@ -1477,6 +1526,7 @@ typedef enum
ImGuiDataType_U64, // unsigned long long / unsigned __int64
ImGuiDataType_Float, // float
ImGuiDataType_Double, // double
ImGuiDataType_Bool, // bool (provided for user convenience, not supported by scalar widgets)
ImGuiDataType_COUNT,
} ImGuiDataType_;
@ -1861,6 +1911,7 @@ typedef enum
ImGuiCol_TableBorderLight, // Table inner borders (prefer using Alpha=1.0 here)
ImGuiCol_TableRowBg, // Table row background (even rows)
ImGuiCol_TableRowBgAlt, // Table row background (odd rows)
ImGuiCol_TextLink, // Hyperlink color
ImGuiCol_TextSelectedBg,
ImGuiCol_DragDropTarget, // Rectangle highlighting a drop target
ImGuiCol_NavHighlight, // Gamepad/keyboard: current highlighted item
@ -1912,6 +1963,7 @@ typedef enum
ImGuiStyleVar_TabRounding, // float TabRounding
ImGuiStyleVar_TabBorderSize, // float TabBorderSize
ImGuiStyleVar_TabBarBorderSize, // float TabBarBorderSize
ImGuiStyleVar_TabBarOverlineSize, // float TabBarOverlineSize
ImGuiStyleVar_TableAngledHeadersAngle, // float TableAngledHeadersAngle
ImGuiStyleVar_TableAngledHeadersTextAlign, // ImVec2 TableAngledHeadersTextAlign
ImGuiStyleVar_ButtonTextAlign, // ImVec2 ButtonTextAlign
@ -2207,7 +2259,7 @@ typedef struct ImGuiTableColumnSortSpecs_t
} ImGuiTableColumnSortSpecs;
//-----------------------------------------------------------------------------
// [SECTION] Helpers: Memory allocations macros, ImVector<>
// [SECTION] Helpers: Debug log, memory allocations macros, ImVector<>
//-----------------------------------------------------------------------------
// Extra helpers for C applications
@ -2220,6 +2272,15 @@ CIMGUI_API ImStr ImStr_FromCharStr(const char* b); // Build an ImStr from a reg
#endif // #if IMGUI_HAS_IMSTR
#endif // #if defined(IMGUI_HAS_IMSTR)
//-----------------------------------------------------------------------------
// Debug Logging into ShowDebugLogWindow(), tty and more.
//-----------------------------------------------------------------------------
#ifndef IMGUI_DISABLE_DEBUG_TOOLS
#define IMGUI_DEBUG_LOG(...) ImGui::DebugLog(__VA_ARGS__)
#else
#define IMGUI_DEBUG_LOG(...) ((void)0)
#endif // #ifndef IMGUI_DISABLE_DEBUG_TOOLS
//-----------------------------------------------------------------------------
// IM_MALLOC(), IM_FREE(), IM_NEW(), IM_PLACEMENT_NEW(), IM_DELETE()
// We call C++ constructor on own allocated memory via the placement "new(ptr) Type()" syntax.
@ -2278,6 +2339,15 @@ typedef struct ImVector_ImGuiStoragePair_t
ImGuiStoragePair* Data;
} ImVector_ImGuiStoragePair;
// Instantiation of ImVector<ImGuiSelectionRequest>
typedef struct ImVector_ImGuiSelectionRequest_t
{
int Size;
int Capacity;
ImGuiSelectionRequest* Data;
} ImVector_ImGuiSelectionRequest;
// Instantiation of ImVector<ImDrawCmd>
typedef struct ImVector_ImDrawCmd_t
@ -2463,12 +2533,13 @@ typedef struct ImGuiStyle_t
float TabBorderSize; // Thickness of border around tabs.
float TabMinWidthForCloseButton; // Minimum width for close button to appear on an unselected tab when hovered. Set to 0.0f to always show when hovering, set to FLT_MAX to never show close button unless selected.
float TabBarBorderSize; // Thickness of tab-bar separator, which takes on the tab active color to denote focus.
float TabBarOverlineSize; // Thickness of tab-bar overline, which highlights the selected tab-bar.
float TableAngledHeadersAngle; // Angle of angled headers (supported values range from -50.0f degrees to +50.0f degrees).
ImVec2 TableAngledHeadersTextAlign; // Alignment of angled headers within the cell
ImGuiDir ColorButtonPosition; // Side of the color button in the ColorEdit4 widget (left/right). Defaults to ImGuiDir_Right.
ImVec2 ButtonTextAlign; // Alignment of button text when button is larger than text. Defaults to (0.5f, 0.5f) (centered).
ImVec2 SelectableTextAlign; // Alignment of selectable text. Defaults to (0.0f, 0.0f) (top-left aligned). It's generally important to keep this left-aligned if you want to lay multiple items on a same line.
float SeparatorTextBorderSize; // Thickkness of border in SeparatorText()
float SeparatorTextBorderSize; // Thickness of border in SeparatorText()
ImVec2 SeparatorTextAlign; // Alignment of text within the separator. Defaults to (0.0f, 0.5f) (left aligned, center).
ImVec2 SeparatorTextPadding; // Horizontal offset of text from each edge of the separator + spacing on other axis. Generally small values. .y is recommended to be == FramePadding.y.
ImVec2 DisplayWindowPadding; // Apply to regular windows: amount which we enforce to keep visible when moving near edges of your screen.
@ -2548,6 +2619,7 @@ typedef struct ImGuiIO_t
// Miscellaneous options
bool MouseDrawCursor; // = false // Request ImGui to draw a mouse cursor for you (if you are on a platform without a mouse cursor). Cannot be easily renamed to 'io.ConfigXXX' because this is frequently used by backend implementations.
bool ConfigMacOSXBehaviors; // = defined(__APPLE__) // Swap Cmd<>Ctrl keys + OS X style text editing cursor movement using Alt instead of Ctrl, Shortcuts using Cmd/Super instead of Ctrl, Line/Text Start and End using Cmd+Arrows instead of Home/End, Double click selects by word instead of selecting whole text, Multi-selection in lists uses Cmd/Super instead of Ctrl.
bool ConfigNavSwapGamepadButtons; // = false // Swap Activate<>Cancel (A<>B) buttons, matching typical "Nintendo/Japanese style" gamepad layout.
bool ConfigInputTrickleEventQueue; // = true // Enable input queue trickling: some types of events submitted during the same frame (e.g. button down + up) will be spread over multiple frames, improving interactions with low framerates.
bool ConfigInputTextCursorBlink; // = true // Enable blinking cursor (optional as some users consider it to be distracting).
bool ConfigInputTextEnterKeepActive; // = false // [BETA] Pressing Enter will keep item active and select contents (single-line only).
@ -2607,9 +2679,15 @@ typedef struct ImGuiIO_t
void (*SetClipboardTextFn)(void* user_data, const char* text);
void* ClipboardUserData;
// Optional: Open link/folder/file in OS Shell
// (default to use ShellExecuteA() on Windows, system() on Linux/Mac)
bool (*PlatformOpenInShellFn)(ImGuiContext* ctx, const char* path);
void* PlatformOpenInShellUserData;
// 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)
void (*SetPlatformImeDataFn)(ImGuiViewport* viewport, ImGuiPlatformImeData* data);
void (*PlatformSetImeDataFn)(ImGuiContext* ctx, ImGuiViewport* viewport, ImGuiPlatformImeData* data);
//void (*SetPlatformImeDataFn)(ImGuiViewport* viewport, ImGuiPlatformImeData* data); // [Renamed to io.PlatformSetImeDataFn in 1.91.0]
// Optional: Platform locale
ImWchar PlatformLocaleDecimalPoint; // '.' // [Experimental] Configure decimal point e.g. '.' or ',' useful for some languages (e.g. German), generally pulled from *localeconv()->decimal_point
@ -2937,6 +3015,7 @@ typedef struct ImGuiListClipper_t
int ItemsCount; // [Internal] Number of items
float ItemsHeight; // [Internal] Height of item after a first step and item submission can calculate it
float StartPosY; // [Internal] Cursor position at the time of Begin() or after table frozen rows are all processed
double StartSeekOffsetY; // [Internal] Account for frozen rows in a table and initial loss of precision in very large windows.
void* TempData; // [Internal] Internal data
} ImGuiListClipper;
CIMGUI_API void ImGuiListClipper_Begin(ImGuiListClipper* self, int items_count, float items_height /* = -1.0f */);
@ -2946,6 +3025,10 @@ CIMGUI_API bool ImGuiListClipper_Step(ImGuiListClipper* self);
// (Due to alignment / padding of certain items it is possible that an extra item may be included on either end of the display range).
CIMGUI_API void ImGuiListClipper_IncludeItemByIndex(ImGuiListClipper* self, int item_index);
CIMGUI_API void ImGuiListClipper_IncludeItemsByIndex(ImGuiListClipper* self, int item_begin, int item_end); // item_end is exclusive e.g. use (42, 42+1) to make item 42 never clipped.
// Seek cursor toward given item. This is automatically called while stepping.
// - The only reason to call this is: you can use ImGuiListClipper::Begin(INT_MAX) if you don't know item count ahead of time.
// - In this case, after all steps are done, you'll want to call SeekCursorForItem(item_count).
CIMGUI_API void ImGuiListClipper_SeekCursorForItem(ImGuiListClipper* self, int item_index);
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
CIMGUI_API void ImGuiListClipper_IncludeRangeByIndices(ImGuiListClipper* self, int item_begin, int item_end); // [renamed in 1.89.9]
CIMGUI_API void ImGuiListClipper_ForceDisplayRangeByIndices(ImGuiListClipper* self, int item_begin, int item_end); // [renamed in 1.89.6]
@ -2994,6 +3077,148 @@ typedef struct ImColor_t
CIMGUI_API void ImColor_SetHSV(ImColor* self, float h, float s, float v, float a /* = 1.0f */);
CIMGUI_API ImColor ImColor_HSV(ImColor* self, float h, float s, float v, float a /* = 1.0f */);
//-----------------------------------------------------------------------------
// [SECTION] Multi-Select API flags and structures (ImGuiMultiSelectFlags, ImGuiSelectionRequestType, ImGuiSelectionRequest, ImGuiMultiSelectIO, ImGuiSelectionBasicStorage)
//-----------------------------------------------------------------------------
// Multi-selection system
// Documentation at: https://github.com/ocornut/imgui/wiki/Multi-Select
// - Refer to 'Demo->Widgets->Selection State & Multi-Select' for demos using this.
// - This system implements standard multi-selection idioms (CTRL+Mouse/Keyboard, SHIFT+Mouse/Keyboard, etc)
// with support for clipper (skipping non-visible items), box-select and many other details.
// - Selectable(), Checkbox() are supported but custom widgets may use it as well.
// - TreeNode() is technically supported but... using this correctly is more complicated: you need some sort of linear/random access to your tree,
// which is suited to advanced trees setups also implementing filters and clipper. We will work toward simplifying and demoing it.
// - In the spirit of Dear ImGui design, your code owns actual selection data.
// This is designed to allow all kinds of selection storage you may use in your application e.g. set/map/hash.
// About ImGuiSelectionBasicStorage:
// - This is an optional helper to store a selection state and apply selection requests.
// - It is used by our demos and provided as a convenience to quickly implement multi-selection.
// Usage:
// - Identify submitted items with SetNextItemSelectionUserData(), most likely using an index into your current data-set.
// - Store and maintain actual selection data using persistent object identifiers.
// - Usage flow:
// BEGIN - (1) Call BeginMultiSelect() and retrieve the ImGuiMultiSelectIO* result.
// - (2) Honor request list (SetAll/SetRange requests) by updating your selection data. Same code as Step 6.
// - (3) [If using clipper] You need to make sure RangeSrcItem is always submitted. Calculate its index and pass to clipper.IncludeItemByIndex(). If storing indices in ImGuiSelectionUserData, a simple clipper.IncludeItemByIndex(ms_io->RangeSrcItem) call will work.
// LOOP - (4) Submit your items with SetNextItemSelectionUserData() + Selectable()/TreeNode() calls.
// END - (5) Call EndMultiSelect() and retrieve the ImGuiMultiSelectIO* result.
// - (6) Honor request list (SetAll/SetRange requests) by updating your selection data. Same code as Step 2.
// If you submit all items (no clipper), Step 2 and 3 are optional and will be handled by each item themselves. It is fine to always honor those steps.
// About ImGuiSelectionUserData:
// - This can store an application-defined identifier (e.g. index or pointer) submitted via SetNextItemSelectionUserData().
// - In return we store them into RangeSrcItem/RangeFirstItem/RangeLastItem and other fields in ImGuiMultiSelectIO.
// - Most applications will store an object INDEX, hence the chosen name and type. Storing an index is natural, because
// SetRange requests will give you two end-points and you will need to iterate/interpolate between them to update your selection.
// - However it is perfectly possible to store a POINTER or another IDENTIFIER inside ImGuiSelectionUserData.
// Our system never assume that you identify items by indices, it never attempts to interpolate between two values.
// - If you enable ImGuiMultiSelectFlags_NoRangeSelect then it is guaranteed that you will never have to interpolate
// between two ImGuiSelectionUserData, which may be a convenient way to use part of the feature with less code work.
// - As most users will want to store an index, for convenience and to reduce confusion we use ImS64 instead of void*,
// being syntactically easier to downcast. Feel free to reinterpret_cast and store a pointer inside.
// Flags for BeginMultiSelect()
typedef enum
{
ImGuiMultiSelectFlags_None = 0,
ImGuiMultiSelectFlags_SingleSelect = 1<<0, // Disable selecting more than one item. This is available to allow single-selection code to share same code/logic if desired. It essentially disables the main purpose of BeginMultiSelect() tho!
ImGuiMultiSelectFlags_NoSelectAll = 1<<1, // Disable CTRL+A shortcut to select all.
ImGuiMultiSelectFlags_NoRangeSelect = 1<<2, // Disable Shift+selection mouse/keyboard support (useful for unordered 2D selection). With BoxSelect is also ensure contiguous SetRange requests are not combined into one. This allows not handling interpolation in SetRange requests.
ImGuiMultiSelectFlags_NoAutoSelect = 1<<3, // Disable selecting items when navigating (useful for e.g. supporting range-select in a list of checkboxes).
ImGuiMultiSelectFlags_NoAutoClear = 1<<4, // Disable clearing selection when navigating or selecting another one (generally used with ImGuiMultiSelectFlags_NoAutoSelect. useful for e.g. supporting range-select in a list of checkboxes).
ImGuiMultiSelectFlags_NoAutoClearOnReselect = 1<<5, // Disable clearing selection when clicking/selecting an already selected item.
ImGuiMultiSelectFlags_BoxSelect1d = 1<<6, // Enable box-selection with same width and same x pos items (e.g. full row Selectable()). Box-selection works better with little bit of spacing between items hit-box in order to be able to aim at empty space.
ImGuiMultiSelectFlags_BoxSelect2d = 1<<7, // Enable box-selection with varying width or varying x pos items support (e.g. different width labels, or 2D layout/grid). This is slower: alters clipping logic so that e.g. horizontal movements will update selection of normally clipped items.
ImGuiMultiSelectFlags_BoxSelectNoScroll = 1<<8, // Disable scrolling when box-selecting near edges of scope.
ImGuiMultiSelectFlags_ClearOnEscape = 1<<9, // Clear selection when pressing Escape while scope is focused.
ImGuiMultiSelectFlags_ClearOnClickVoid = 1<<10, // Clear selection when clicking on empty location within scope.
ImGuiMultiSelectFlags_ScopeWindow = 1<<11, // Scope for _BoxSelect and _ClearOnClickVoid is whole window (Default). Use if BeginMultiSelect() covers a whole window or used a single time in same window.
ImGuiMultiSelectFlags_ScopeRect = 1<<12, // Scope for _BoxSelect and _ClearOnClickVoid is rectangle encompassing BeginMultiSelect()/EndMultiSelect(). Use if BeginMultiSelect() is called multiple times in same window.
ImGuiMultiSelectFlags_SelectOnClick = 1<<13, // Apply selection on mouse down when clicking on unselected item. (Default)
ImGuiMultiSelectFlags_SelectOnClickRelease = 1<<14, // Apply selection on mouse release when clicking an unselected item. Allow dragging an unselected item without altering selection.
//ImGuiMultiSelectFlags_RangeSelect2d = 1 << 15, // Shift+Selection uses 2d geometry instead of linear sequence, so possible to use Shift+up/down to select vertically in grid. Analogous to what BoxSelect does.
ImGuiMultiSelectFlags_NavWrapX = 1<<16, // [Temporary] Enable navigation wrapping on X axis. Provided as a convenience because we don't have a design for the general Nav API for this yet. When the more general feature be public we may obsolete this flag in favor of new one.
} ImGuiMultiSelectFlags_;
// Main IO structure returned by BeginMultiSelect()/EndMultiSelect().
// This mainly contains a list of selection requests.
// - Use 'Demo->Tools->Debug Log->Selection' to see requests as they happen.
// - Some fields are only useful if your list is dynamic and allows deletion (getting post-deletion focus/state right is shown in the demo)
// - Below: who reads/writes each fields? 'r'=read, 'w'=write, 'ms'=multi-select code, 'app'=application/user code.
typedef struct ImGuiMultiSelectIO_t
{
//------------------------------------------// BeginMultiSelect / EndMultiSelect
ImVector_ImGuiSelectionRequest Requests; // ms:w, app:r / ms:w app:r // Requests to apply to your selection data.
ImGuiSelectionUserData RangeSrcItem; // ms:w app:r / // (If using clipper) Begin: Source item (often the first selected item) must never be clipped: use clipper.IncludeItemByIndex() to ensure it is submitted.
ImGuiSelectionUserData NavIdItem; // ms:w, app:r / // (If using deletion) Last known SetNextItemSelectionUserData() value for NavId (if part of submitted items).
bool NavIdSelected; // ms:w, app:r / app:r // (If using deletion) Last known selection state for NavId (if part of submitted items).
bool RangeSrcReset; // app:w / ms:r // (If using deletion) Set before EndMultiSelect() to reset ResetSrcItem (e.g. if deleted selection).
int ItemsCount; // ms:w, app:r / app:r // 'int items_count' parameter to BeginMultiSelect() is copied here for convenience, allowing simpler calls to your ApplyRequests handler. Not used internally.
} ImGuiMultiSelectIO;
// Selection request type
typedef enum
{
ImGuiSelectionRequestType_None = 0,
ImGuiSelectionRequestType_SetAll, // Request app to clear selection (if Selected==false) or select all items (if Selected==true). We cannot set RangeFirstItem/RangeLastItem as its contents is entirely up to user (not necessarily an index)
ImGuiSelectionRequestType_SetRange, // Request app to select/unselect [RangeFirstItem..RangeLastItem] items (inclusive) based on value of Selected. Only EndMultiSelect() request this, app code can read after BeginMultiSelect() and it will always be false.
} ImGuiSelectionRequestType;
// Selection request item
typedef struct ImGuiSelectionRequest_t
{
//------------------------------------------// BeginMultiSelect / EndMultiSelect
ImGuiSelectionRequestType Type; // ms:w, app:r / ms:w, app:r // Request type. You'll most often receive 1 Clear + 1 SetRange with a single-item range.
bool Selected; // ms:w, app:r / ms:w, app:r // Parameter for SetAll/SetRange requests (true = select, false = unselect)
ImS8 RangeDirection; // / ms:w app:r // Parameter for SetRange request: +1 when RangeFirstItem comes before RangeLastItem, -1 otherwise. Useful if you want to preserve selection order on a backward Shift+Click.
ImGuiSelectionUserData RangeFirstItem; // / ms:w, app:r // Parameter for SetRange request (this is generally == RangeSrcItem when shift selecting from top to bottom).
ImGuiSelectionUserData RangeLastItem; // / ms:w, app:r // Parameter for SetRange request (this is generally == RangeSrcItem when shift selecting from bottom to top). Inclusive!
} ImGuiSelectionRequest;
// Optional helper to store multi-selection state + apply multi-selection requests.
// - Used by our demos and provided as a convenience to easily implement basic multi-selection.
// - Iterate selection with 'void* it = NULL; ImGuiID id; while (selection.GetNextSelectedItem(&it, &id)) { ... }'
// Or you can check 'if (Contains(id)) { ... }' for each possible object if their number is not too high to iterate.
// - USING THIS IS NOT MANDATORY. This is only a helper and not a required API.
// To store a multi-selection, in your application you could:
// - Use this helper as a convenience. We use our simple key->value ImGuiStorage as a std::set<ImGuiID> replacement.
// - Use your own external storage: e.g. std::set<MyObjectId>, std::vector<MyObjectId>, interval trees, intrusively stored selection etc.
// In ImGuiSelectionBasicStorage we:
// - always use indices in the multi-selection API (passed to SetNextItemSelectionUserData(), retrieved in ImGuiMultiSelectIO)
// - use the AdapterIndexToStorageId() indirection layer to abstract how persistent selection data is derived from an index.
// - use decently optimized logic to allow queries and insertion of very large selection sets.
// - do not preserve selection order.
// Many combinations are possible depending on how you prefer to store your items and how you prefer to store your selection.
// Large applications are likely to eventually want to get rid of this indirection layer and do their own thing.
// See https://github.com/ocornut/imgui/wiki/Multi-Select for details and pseudo-code using this helper.
typedef struct ImGuiSelectionBasicStorage_t
{
// Members
int Size; // // Number of selected items, maintained by this helper.
bool PreserveOrder; // = false // GetNextSelectedItem() will return ordered selection (currently implemented by two additional sorts of selection. Could be improved)
void* UserData; // = NULL // User data for use by adapter function // e.g. selection.UserData = (void*)my_items;
ImGuiID (*AdapterIndexToStorageId)(ImGuiSelectionBasicStorage* self, int idx); // e.g. selection.AdapterIndexToStorageId = [](ImGuiSelectionBasicStorage* self, int idx) { return ((MyItems**)self->UserData)[idx]->ID; };
int _SelectionOrder; // [Internal] Increasing counter to store selection order
ImGuiStorage _Storage; // [Internal] Selection set. Think of this as similar to e.g. std::set<ImGuiID>. Prefer not accessing directly: iterate with GetNextSelectedItem().
} ImGuiSelectionBasicStorage;
CIMGUI_API void ImGuiSelectionBasicStorage_ApplyRequests(ImGuiSelectionBasicStorage* self, ImGuiMultiSelectIO* ms_io); // Apply selection requests coming from BeginMultiSelect() and EndMultiSelect() functions. It uses 'items_count' passed to BeginMultiSelect()
CIMGUI_API bool ImGuiSelectionBasicStorage_Contains(const ImGuiSelectionBasicStorage* self, ImGuiID id); // Query if an item id is in selection.
CIMGUI_API void ImGuiSelectionBasicStorage_Clear(ImGuiSelectionBasicStorage* self); // Clear selection
CIMGUI_API void ImGuiSelectionBasicStorage_Swap(ImGuiSelectionBasicStorage* self, ImGuiSelectionBasicStorage* r); // Swap two selections
CIMGUI_API void ImGuiSelectionBasicStorage_SetItemSelected(ImGuiSelectionBasicStorage* self, ImGuiID id, bool selected); // Add/remove an item from selection (generally done by ApplyRequests() function)
CIMGUI_API bool ImGuiSelectionBasicStorage_GetNextSelectedItem(ImGuiSelectionBasicStorage* self, void** opaque_it, ImGuiID* out_id); // Iterate selection with 'void* it = NULL; ImGuiId id; while (selection.GetNextSelectedItem(&it, &id)) { ... }'
CIMGUI_API ImGuiID ImGuiSelectionBasicStorage_GetStorageIdFromIndex(ImGuiSelectionBasicStorage* self, int idx); // Convert index to item id based on provided adapter.
// Optional helper to apply multi-selection requests to existing randomly accessible storage.
// Convenient if you want to quickly wire multi-select API on e.g. an array of bool or items storing their own selection state.
typedef struct ImGuiSelectionExternalStorage_t
{
// Members
void* UserData; // User data for use by adapter function // e.g. selection.UserData = (void*)my_items;
void (*AdapterSetItemSelected)(ImGuiSelectionExternalStorage* self, int idx, bool selected); // e.g. AdapterSetItemSelected = [](ImGuiSelectionExternalStorage* self, int idx, bool selected) { ((MyItems**)self->UserData)[idx]->Selected = selected; }
} ImGuiSelectionExternalStorage;
CIMGUI_API void ImGuiSelectionExternalStorage_ApplyRequests(ImGuiSelectionExternalStorage* self, ImGuiMultiSelectIO* ms_io); // Apply selection requests by using AdapterSetItemSelected() calls
//-----------------------------------------------------------------------------
// [SECTION] Drawing API (ImDrawCmd, ImDrawIdx, ImDrawVert, ImDrawChannel, ImDrawListSplitter, ImDrawListFlags, ImDrawList, ImDrawData)
// Hold a series of drawing commands. The user provides a renderer for ImDrawData which essentially contains an array of ImDrawList.
@ -3493,7 +3718,7 @@ typedef struct ImFont_t
float EllipsisCharStep; // 4 // out // Step between characters when EllipsisCount > 0
bool DirtyLookupTables; // 1 // out //
float Scale; // 4 // in // = 1.f // Base font scale, multiplied by the per-window font scale which you can adjust with SetWindowFontScale()
float Ascent, Descent; // 4+4 // out // // Ascent: distance from top to bottom of e.g. 'A' [0..FontSize]
float Ascent, Descent; // 4+4 // out // // Ascent: distance from top to bottom of e.g. 'A' [0..FontSize] (unscaled)
int MetricsTotalSurface; // 4 // out // // Total surface in pixels to get an idea of the font rasterization/texture cost (not exact, we approximate the cost of padding between glyphs)
ImU8 Used4kPagesMap[(IM_UNICODE_CODEPOINT_MAX +1)/4096/8]; // 2 bytes if ImWchar=ImWchar16, 34 bytes if ImWchar==ImWchar32. Store 1-bit for each block of 4K codepoints that has one active glyph. This is mainly used to facilitate iterations across all used codepoints.
} ImFont;
@ -3701,7 +3926,7 @@ typedef struct ImGuiPlatformMonitor_t
void* PlatformHandle; // Backend dependant data (e.g. HMONITOR, GLFWmonitor*, SDL Display Index, NSScreen*)
} ImGuiPlatformMonitor;
// (Optional) Support for IME (Input Method Editor) via the io.SetPlatformImeDataFn() function.
// (Optional) Support for IME (Input Method Editor) via the io.PlatformSetImeDataFn() function.
typedef struct ImGuiPlatformImeData_t
{
bool WantVisible; // A widget wants the IME to be visible
@ -3716,6 +3941,14 @@ typedef struct ImGuiPlatformImeData_t
//-----------------------------------------------------------------------------
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
// OBSOLETED in 1.91.0 (from July 2024)
CIMGUI_API void ImGui_PushButtonRepeat(bool repeat);
CIMGUI_API void ImGui_PopButtonRepeat(void);
CIMGUI_API void ImGui_PushTabStop(bool tab_stop);
CIMGUI_API void ImGui_PopTabStop(void);
CIMGUI_API ImVec2 ImGui_GetContentRegionMax(void); // Content boundaries max (e.g. window boundaries including scrolling, or current column boundaries). You should never need this. Always use GetCursorScreenPos() and GetContentRegionAvail()!
CIMGUI_API ImVec2 ImGui_GetWindowContentRegionMin(void); // Content boundaries min for the window (roughly (0,0)-Scroll), in window-local coordinates. You should never need this. Always use GetCursorScreenPos() and GetContentRegionAvail()!
CIMGUI_API ImVec2 ImGui_GetWindowContentRegionMax(void); // Content boundaries max for the window (roughly (0,0)+Size-Scroll), in window-local coordinates. You should never need this. Always use GetCursorScreenPos() and GetContentRegionAvail()!
// OBSOLETED in 1.90.0 (from September 2023)
CIMGUI_API bool ImGui_BeginChildFrame(ImGuiID id, ImVec2 size); // Implied window_flags = 0
CIMGUI_API bool ImGui_BeginChildFrameEx(ImGuiID id, ImVec2 size, ImGuiWindowFlags window_flags /* = 0 */);
@ -3723,10 +3956,10 @@ CIMGUI_API void ImGui_EndChildFrame(void);
//static inline bool BeginChild(const char* str_id, const ImVec2& size_arg, bool border, ImGuiWindowFlags window_flags){ return BeginChild(str_id, size_arg, border ? ImGuiChildFlags_Border : ImGuiChildFlags_None, window_flags); } // Unnecessary as true == ImGuiChildFlags_Border
//static inline bool BeginChild(ImGuiID id, const ImVec2& size_arg, bool border, ImGuiWindowFlags window_flags) { return BeginChild(id, size_arg, border ? ImGuiChildFlags_Border : ImGuiChildFlags_None, window_flags); } // Unnecessary as true == ImGuiChildFlags_Border
CIMGUI_API void ImGui_ShowStackToolWindow(bool* p_open /* = NULL */);
CIMGUI_API bool ImGui_ListBoxObsolete(const char* label, int* current_item, bool (*old_callback)(void* user_data, int idx, const char** out_text), void* user_data, int items_count); // Implied height_in_items = -1
CIMGUI_API bool ImGui_ListBoxObsoleteEx(const char* label, int* current_item, bool (*old_callback)(void* user_data, int idx, const char** out_text), void* user_data, int items_count, int height_in_items /* = -1 */);
CIMGUI_API bool ImGui_ComboObsolete(const char* label, int* current_item, bool (*old_callback)(void* user_data, int idx, const char** out_text), void* user_data, int items_count); // Implied popup_max_height_in_items = -1
CIMGUI_API bool ImGui_ComboObsoleteEx(const char* label, int* current_item, bool (*old_callback)(void* user_data, int idx, const char** out_text), void* user_data, int items_count, int popup_max_height_in_items /* = -1 */);
CIMGUI_API bool ImGui_ListBoxObsolete(const char* label, int* current_item, bool (*old_callback)(void* user_data, int idx, const char** out_text), void* user_data, int items_count); // Implied height_in_items = -1
CIMGUI_API bool ImGui_ListBoxObsoleteEx(const char* label, int* current_item, bool (*old_callback)(void* user_data, int idx, const char** out_text), void* user_data, int items_count, int height_in_items /* = -1 */);
// OBSOLETED in 1.89.7 (from June 2023)
CIMGUI_API void ImGui_SetItemAllowOverlap(void); // Use SetNextItemAllowOverlap() before item.
// OBSOLETED in 1.89.4 (from March 2023)
@ -3813,15 +4046,8 @@ CIMGUI_API ImGuiKey ImGui_GetKeyIndex(ImGuiKey key);
// RENAMED and MERGED both ImGuiKey_ModXXX and ImGuiModFlags_XXX into ImGuiMod_XXX (from September 2022)
// RENAMED ImGuiKeyModFlags -> ImGuiModFlags in 1.88 (from April 2022). Exceptionally commented out ahead of obscolescence schedule to reduce confusion and because they were not meant to be used in the first place.
typedef ImGuiKeyChord ImGuiModFlags; // == int. We generally use ImGuiKeyChord to mean "a ImGuiKey or-ed with any number of ImGuiMod_XXX value", but you may store only mods in there.
typedef enum
{
ImGuiModFlags_None = 0,
ImGuiModFlags_Ctrl = ImGuiMod_Ctrl,
ImGuiModFlags_Shift = ImGuiMod_Shift,
ImGuiModFlags_Alt = ImGuiMod_Alt,
ImGuiModFlags_Super = ImGuiMod_Super,
} ImGuiModFlags_;
//typedef ImGuiKeyChord ImGuiModFlags; // == int. We generally use ImGuiKeyChord to mean "a ImGuiKey or-ed with any number of ImGuiMod_XXX value", so you may store mods in there.
//enum ImGuiModFlags_ { ImGuiModFlags_None = 0, ImGuiModFlags_Ctrl = ImGuiMod_Ctrl, ImGuiModFlags_Shift = ImGuiMod_Shift, ImGuiModFlags_Alt = ImGuiMod_Alt, ImGuiModFlags_Super = ImGuiMod_Super };
//typedef ImGuiKeyChord ImGuiKeyModFlags; // == int
//enum ImGuiKeyModFlags_ { ImGuiKeyModFlags_None = 0, ImGuiKeyModFlags_Ctrl = ImGuiMod_Ctrl, ImGuiKeyModFlags_Shift = ImGuiMod_Shift, ImGuiKeyModFlags_Alt = ImGuiMod_Alt, ImGuiKeyModFlags_Super = ImGuiMod_Super };

File diff suppressed because it is too large Load diff

View file

@ -105,7 +105,7 @@ typedef struct ImGui_ImplVulkan_InitInfo_t
} ImGui_ImplVulkan_InitInfo;
typedef struct ImDrawData_t ImDrawData;
// Called by user code
// Follow "Getting Started" link and check examples/ folder to learn about using backends!
CIMGUI_IMPL_API bool cImGui_ImplVulkan_Init(ImGui_ImplVulkan_InitInfo* info);
CIMGUI_IMPL_API void cImGui_ImplVulkan_Shutdown(void);
CIMGUI_IMPL_API void cImGui_ImplVulkan_NewFrame(void);

View file

@ -984,7 +984,7 @@
"is_unformatted_helper": false,
"comments": {
"preceding": [
"// Called by user code"
"// Follow \"Getting Started\" link and check examples/ folder to learn about using backends!"
]
},
"is_internal": false,

View file

@ -114,6 +114,7 @@ const Header = struct {
@"defined(VK_USE_PLATFORM_WIN32_KHR)&&!defined(NOMINMAX)",
@"defined(VK_VERSION_1_3)|| defined(VK_KHR_dynamic_rendering)",
IMGUI_IMPL_VULKAN_HAS_DYNAMIC_RENDERING,
IMGUI_DISABLE_DEBUG_TOOLS,
},
};
@ -851,6 +852,7 @@ fn skip(conditionals: []const Header.Conditional) bool {
.@"defined(IMGUI_DISABLE_METRICS_WINDOW)&&!defined(IMGUI_DISABLE_OBSOLETE_FUNCTIONS)&&!defined(IMGUI_DISABLE_DEBUG_TOOLS)",
.@"defined(IMGUI_HAS_IMSTR)",
.IMGUI_HAS_IMSTR,
.IMGUI_DISABLE_DEBUG_TOOLS,
=> false,
};
switch (conditional.condition) {