diff --git a/cimgui/VERSION.txt b/cimgui/VERSION.txt index 14cb37c63..99fb2f790 100644 --- a/cimgui/VERSION.txt +++ b/cimgui/VERSION.txt @@ -1,8 +1,8 @@ -cimgui (https://github.com/cimgui/cimgui) HEAD is on: 4ca6b29166fae53f0f7dd5c89f1c673aa085ff89 -cimgui/imgui HEAD is on: c418685315d0951c26e5dbcefcabe18be9b7f0d1 -cimplot (https://github.com/cimgui/cimplot) HEAD is on: 82d498a5bf0d945b1db21c80ba3ce69350930022 -cimplot/implot HEAD is on: 7b9171569bfe846aa1049a70bc599ad44ef0e5c1 -cimnodes (https://github.com/cimgui/cimnodes) HEAD is on: 987e75fef847e53ffdd627c4a0dcdcdaa1d3760d -cimnodes/imnodes HEAD is on: 4f6ddd604558288bcc435398a177015dae923600 +cimgui (https://github.com/cimgui/cimgui) HEAD is on: 7ea55fbceaeb51dc24e5a9ae557b7f82c84aef72 +cimgui/imgui HEAD is on: c6aa051629753f0ef0d26bf775a8b6a92aa213b2 +cimplot (https://github.com/cimgui/cimplot) HEAD is on: 439f705b1cfae0e9fbe42c13ab5b45becc47d404 +cimplot/implot HEAD is on: f156599faefe316f7dd20fe6c783bf87c8bb6fd9 +cimnodes (https://github.com/cimgui/cimnodes) HEAD is on: fa715615d3f562585d8fb57e7445751f5b2de45e +cimnodes/imnodes HEAD is on: 020d1735a9e2acbb56613260ac1c1955333ec619 cimmarkdown (https://github.com/gucio321/cimmarkdown) HEAD is on: c418b67e4893b690816c2d7b6ad05f104beb14e8 cimmarkdown/imgui_markdown HEAD is on: 49bb387f99bd9df295e97be9aff9048de3bfc226 diff --git a/cimgui/cimgui.cpp b/cimgui/cimgui.cpp index 3984076e2..8f76359bd 100644 --- a/cimgui/cimgui.cpp +++ b/cimgui/cimgui.cpp @@ -1,5 +1,5 @@ //This file is automatically generated by generator.lua from https://github.com/cimgui/cimgui -//based on imgui.h file version "1.90 WIP" 18992 from Dear ImGui https://github.com/ocornut/imgui +//based on imgui.h file version "1.90.4" 19040 from Dear ImGui https://github.com/ocornut/imgui //with imgui_internal.h api //docking branch #ifdef IMGUI_ENABLE_FREETYPE @@ -96,9 +96,9 @@ CIMGUI_API void igShowDebugLogWindow(bool* p_open) { return ImGui::ShowDebugLogWindow(p_open); } -CIMGUI_API void igShowStackToolWindow(bool* p_open) +CIMGUI_API void igShowIDStackToolWindow(bool* p_open) { - return ImGui::ShowStackToolWindow(p_open); + return ImGui::ShowIDStackToolWindow(p_open); } CIMGUI_API void igShowAboutWindow(bool* p_open) { @@ -144,13 +144,13 @@ CIMGUI_API void igEnd() { return ImGui::End(); } -CIMGUI_API bool igBeginChild_Str(const char* str_id,const ImVec2 size,bool border,ImGuiWindowFlags flags) +CIMGUI_API bool igBeginChild_Str(const char* str_id,const ImVec2 size,ImGuiChildFlags child_flags,ImGuiWindowFlags window_flags) { - return ImGui::BeginChild(str_id,size,border,flags); + return ImGui::BeginChild(str_id,size,child_flags,window_flags); } -CIMGUI_API bool igBeginChild_ID(ImGuiID id,const ImVec2 size,bool border,ImGuiWindowFlags flags) +CIMGUI_API bool igBeginChild_ID(ImGuiID id,const ImVec2 size,ImGuiChildFlags child_flags,ImGuiWindowFlags window_flags) { - return ImGui::BeginChild(id,size,border,flags); + return ImGui::BeginChild(id,size,child_flags,window_flags); } CIMGUI_API void igEndChild() { @@ -420,49 +420,21 @@ CIMGUI_API ImU32 igGetColorU32_Vec4(const ImVec4 col) { return ImGui::GetColorU32(col); } -CIMGUI_API ImU32 igGetColorU32_U32(ImU32 col) +CIMGUI_API ImU32 igGetColorU32_U32(ImU32 col,float alpha_mul) { - return ImGui::GetColorU32(col); + return ImGui::GetColorU32(col,alpha_mul); } CIMGUI_API const ImVec4* igGetStyleColorVec4(ImGuiCol idx) { return &ImGui::GetStyleColorVec4(idx); } -CIMGUI_API void igSeparator() -{ - return ImGui::Separator(); -} -CIMGUI_API void igSameLine(float offset_from_start_x,float spacing) -{ - return ImGui::SameLine(offset_from_start_x,spacing); -} -CIMGUI_API void igNewLine() -{ - return ImGui::NewLine(); -} -CIMGUI_API void igSpacing() -{ - return ImGui::Spacing(); -} -CIMGUI_API void igDummy(const ImVec2 size) -{ - return ImGui::Dummy(size); -} -CIMGUI_API void igIndent(float indent_w) -{ - return ImGui::Indent(indent_w); -} -CIMGUI_API void igUnindent(float indent_w) -{ - return ImGui::Unindent(indent_w); -} -CIMGUI_API void igBeginGroup() +CIMGUI_API void igGetCursorScreenPos(ImVec2 *pOut) { - return ImGui::BeginGroup(); + *pOut = ImGui::GetCursorScreenPos(); } -CIMGUI_API void igEndGroup() +CIMGUI_API void igSetCursorScreenPos(const ImVec2 pos) { - return ImGui::EndGroup(); + return ImGui::SetCursorScreenPos(pos); } CIMGUI_API void igGetCursorPos(ImVec2 *pOut) { @@ -492,13 +464,41 @@ CIMGUI_API void igGetCursorStartPos(ImVec2 *pOut) { *pOut = ImGui::GetCursorStartPos(); } -CIMGUI_API void igGetCursorScreenPos(ImVec2 *pOut) +CIMGUI_API void igSeparator() { - *pOut = ImGui::GetCursorScreenPos(); + return ImGui::Separator(); } -CIMGUI_API void igSetCursorScreenPos(const ImVec2 pos) +CIMGUI_API void igSameLine(float offset_from_start_x,float spacing) { - return ImGui::SetCursorScreenPos(pos); + return ImGui::SameLine(offset_from_start_x,spacing); +} +CIMGUI_API void igNewLine() +{ + return ImGui::NewLine(); +} +CIMGUI_API void igSpacing() +{ + return ImGui::Spacing(); +} +CIMGUI_API void igDummy(const ImVec2 size) +{ + return ImGui::Dummy(size); +} +CIMGUI_API void igIndent(float indent_w) +{ + return ImGui::Indent(indent_w); +} +CIMGUI_API void igUnindent(float indent_w) +{ + return ImGui::Unindent(indent_w); +} +CIMGUI_API void igBeginGroup() +{ + return ImGui::BeginGroup(); +} +CIMGUI_API void igEndGroup() +{ + return ImGui::EndGroup(); } CIMGUI_API void igAlignTextToFramePadding() { @@ -670,13 +670,13 @@ CIMGUI_API void igBullet() { return ImGui::Bullet(); } -CIMGUI_API void igImage(ImTextureID user_texture_id,const ImVec2 size,const ImVec2 uv0,const ImVec2 uv1,const ImVec4 tint_col,const ImVec4 border_col) +CIMGUI_API void igImage(ImTextureID user_texture_id,const ImVec2 image_size,const ImVec2 uv0,const ImVec2 uv1,const ImVec4 tint_col,const ImVec4 border_col) { - return ImGui::Image(user_texture_id,size,uv0,uv1,tint_col,border_col); + return ImGui::Image(user_texture_id,image_size,uv0,uv1,tint_col,border_col); } -CIMGUI_API bool igImageButton(const char* str_id,ImTextureID user_texture_id,const ImVec2 size,const ImVec2 uv0,const ImVec2 uv1,const ImVec4 bg_col,const ImVec4 tint_col) +CIMGUI_API bool igImageButton(const char* str_id,ImTextureID user_texture_id,const ImVec2 image_size,const ImVec2 uv0,const ImVec2 uv1,const ImVec4 bg_col,const ImVec4 tint_col) { - return ImGui::ImageButton(str_id,user_texture_id,size,uv0,uv1,bg_col,tint_col); + return ImGui::ImageButton(str_id,user_texture_id,image_size,uv0,uv1,bg_col,tint_col); } CIMGUI_API bool igBeginCombo(const char* label,const char* preview_value,ImGuiComboFlags flags) { @@ -1160,13 +1160,17 @@ CIMGUI_API void igTableSetupScrollFreeze(int cols,int rows) { return ImGui::TableSetupScrollFreeze(cols,rows); } +CIMGUI_API void igTableHeader(const char* label) +{ + return ImGui::TableHeader(label); +} CIMGUI_API void igTableHeadersRow() { return ImGui::TableHeadersRow(); } -CIMGUI_API void igTableHeader(const char* label) +CIMGUI_API void igTableAngledHeadersRow() { - return ImGui::TableHeader(label); + return ImGui::TableAngledHeadersRow(); } CIMGUI_API ImGuiTableSortSpecs* igTableGetSortSpecs() { @@ -1480,14 +1484,6 @@ CIMGUI_API ImGuiStorage* igGetStateStorage() { return ImGui::GetStateStorage(); } -CIMGUI_API bool igBeginChildFrame(ImGuiID id,const ImVec2 size,ImGuiWindowFlags flags) -{ - return ImGui::BeginChildFrame(id,size,flags); -} -CIMGUI_API void igEndChildFrame() -{ - return ImGui::EndChildFrame(); -} CIMGUI_API void igCalcTextSize(ImVec2 *pOut,const char* text,const char* text_end,bool hide_text_after_double_hash,float wrap_width) { *pOut = ImGui::CalcTextSize(text,text_end,hide_text_after_double_hash,wrap_width); @@ -1520,6 +1516,10 @@ CIMGUI_API bool igIsKeyReleased_Nil(ImGuiKey key) { return ImGui::IsKeyReleased(key); } +CIMGUI_API bool igIsKeyChordPressed_Nil(ImGuiKeyChord key_chord) +{ + return ImGui::IsKeyChordPressed(key_chord); +} CIMGUI_API int igGetKeyPressedAmount(ImGuiKey key,float repeat_delay,float rate) { return ImGui::GetKeyPressedAmount(key,repeat_delay,rate); @@ -1544,7 +1544,7 @@ CIMGUI_API bool igIsMouseReleased_Nil(ImGuiMouseButton button) { return ImGui::IsMouseReleased(button); } -CIMGUI_API bool igIsMouseDoubleClicked(ImGuiMouseButton button) +CIMGUI_API bool igIsMouseDoubleClicked_Nil(ImGuiMouseButton button) { return ImGui::IsMouseDoubleClicked(button); } @@ -1624,6 +1624,14 @@ CIMGUI_API void igDebugTextEncoding(const char* text) { return ImGui::DebugTextEncoding(text); } +CIMGUI_API void igDebugFlashStyleColor(ImGuiCol idx) +{ + return ImGui::DebugFlashStyleColor(idx); +} +CIMGUI_API void igDebugStartItemPicker() +{ + return ImGui::DebugStartItemPicker(); +} CIMGUI_API bool igDebugCheckVersionAndDataLayout(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) { return ImGui::DebugCheckVersionAndDataLayout(version_str,sz_io,sz_style,sz_vec2,sz_vec4,sz_drawvert,sz_drawidx); @@ -1668,6 +1676,22 @@ CIMGUI_API ImGuiViewport* igFindViewportByPlatformHandle(void* platform_handle) { return ImGui::FindViewportByPlatformHandle(platform_handle); } +CIMGUI_API ImGuiTableSortSpecs* ImGuiTableSortSpecs_ImGuiTableSortSpecs(void) +{ + return IM_NEW(ImGuiTableSortSpecs)(); +} +CIMGUI_API void ImGuiTableSortSpecs_destroy(ImGuiTableSortSpecs* self) +{ + IM_DELETE(self); +} +CIMGUI_API ImGuiTableColumnSortSpecs* ImGuiTableColumnSortSpecs_ImGuiTableColumnSortSpecs(void) +{ + return IM_NEW(ImGuiTableColumnSortSpecs)(); +} +CIMGUI_API void ImGuiTableColumnSortSpecs_destroy(ImGuiTableColumnSortSpecs* self) +{ + IM_DELETE(self); +} CIMGUI_API ImGuiStyle* ImGuiStyle_ImGuiStyle(void) { return IM_NEW(ImGuiStyle)(); @@ -1808,22 +1832,6 @@ CIMGUI_API bool ImGuiPayload_IsDelivery(ImGuiPayload* self) { return self->IsDelivery(); } -CIMGUI_API ImGuiTableColumnSortSpecs* ImGuiTableColumnSortSpecs_ImGuiTableColumnSortSpecs(void) -{ - return IM_NEW(ImGuiTableColumnSortSpecs)(); -} -CIMGUI_API void ImGuiTableColumnSortSpecs_destroy(ImGuiTableColumnSortSpecs* self) -{ - IM_DELETE(self); -} -CIMGUI_API ImGuiTableSortSpecs* ImGuiTableSortSpecs_ImGuiTableSortSpecs(void) -{ - return IM_NEW(ImGuiTableSortSpecs)(); -} -CIMGUI_API void ImGuiTableSortSpecs_destroy(ImGuiTableSortSpecs* self) -{ - IM_DELETE(self); -} CIMGUI_API ImGuiOnceUponAFrame* ImGuiOnceUponAFrame_ImGuiOnceUponAFrame(void) { return IM_NEW(ImGuiOnceUponAFrame)(); @@ -1924,21 +1932,21 @@ CIMGUI_API void ImGuiTextBuffer_appendfv(ImGuiTextBuffer* self,const char* fmt,v { return self->appendfv(fmt,args); } -CIMGUI_API ImGuiStoragePair* ImGuiStoragePair_ImGuiStoragePair_Int(ImGuiID _key,int _val_i) +CIMGUI_API ImGuiStoragePair* ImGuiStoragePair_ImGuiStoragePair_Int(ImGuiID _key,int _val) { - return IM_NEW(ImGuiStoragePair)(_key,_val_i); + return IM_NEW(ImGuiStoragePair)(_key,_val); } CIMGUI_API void ImGuiStoragePair_destroy(ImGuiStoragePair* self) { IM_DELETE(self); } -CIMGUI_API ImGuiStoragePair* ImGuiStoragePair_ImGuiStoragePair_Float(ImGuiID _key,float _val_f) +CIMGUI_API ImGuiStoragePair* ImGuiStoragePair_ImGuiStoragePair_Float(ImGuiID _key,float _val) { - return IM_NEW(ImGuiStoragePair)(_key,_val_f); + return IM_NEW(ImGuiStoragePair)(_key,_val); } -CIMGUI_API ImGuiStoragePair* ImGuiStoragePair_ImGuiStoragePair_Ptr(ImGuiID _key,void* _val_p) +CIMGUI_API ImGuiStoragePair* ImGuiStoragePair_ImGuiStoragePair_Ptr(ImGuiID _key,void* _val) { - return IM_NEW(ImGuiStoragePair)(_key,_val_p); + return IM_NEW(ImGuiStoragePair)(_key,_val); } CIMGUI_API void ImGuiStorage_Clear(ImGuiStorage* self) { @@ -1992,14 +2000,14 @@ CIMGUI_API void** ImGuiStorage_GetVoidPtrRef(ImGuiStorage* self,ImGuiID key,void { return self->GetVoidPtrRef(key,default_val); } -CIMGUI_API void ImGuiStorage_SetAllInt(ImGuiStorage* self,int val) -{ - return self->SetAllInt(val); -} CIMGUI_API void ImGuiStorage_BuildSortByKey(ImGuiStorage* self) { return self->BuildSortByKey(); } +CIMGUI_API void ImGuiStorage_SetAllInt(ImGuiStorage* self,int val) +{ + return self->SetAllInt(val); +} CIMGUI_API ImGuiListClipper* ImGuiListClipper_ImGuiListClipper(void) { return IM_NEW(ImGuiListClipper)(); @@ -2963,21 +2971,21 @@ CIMGUI_API float igImInvLength(const ImVec2 lhs,float fail_value) { return ImInvLength(lhs,fail_value); } -CIMGUI_API float igImFloor_Float(float f) +CIMGUI_API float igImTrunc_Float(float f) { - return ImFloor(f); + return ImTrunc(f); } -CIMGUI_API float igImFloorSigned_Float(float f) +CIMGUI_API void igImTrunc_Vec2(ImVec2 *pOut,const ImVec2 v) { - return ImFloorSigned(f); + *pOut = ImTrunc(v); } -CIMGUI_API void igImFloor_Vec2(ImVec2 *pOut,const ImVec2 v) +CIMGUI_API float igImFloor_Float(float f) { - *pOut = ImFloor(v); + return ImFloor(f); } -CIMGUI_API void igImFloorSigned_Vec2(ImVec2 *pOut,const ImVec2 v) +CIMGUI_API void igImFloor_Vec2(ImVec2 *pOut,const ImVec2 v) { - *pOut = ImFloorSigned(v); + *pOut = ImFloor(v); } CIMGUI_API int igImModPositive(int a,int b) { @@ -3135,6 +3143,10 @@ CIMGUI_API bool ImRect_Contains_Rect(ImRect* self,const ImRect r) { return self->Contains(r); } +CIMGUI_API bool ImRect_ContainsWithPad(ImRect* self,const ImVec2 p,const ImVec2 pad) +{ + return self->ContainsWithPad(p,pad); +} CIMGUI_API bool ImRect_Overlaps(ImRect* self,const ImRect r) { return self->Overlaps(r); @@ -3271,10 +3283,6 @@ CIMGUI_API void ImDrawDataBuilder_destroy(ImDrawDataBuilder* self) { IM_DELETE(self); } -CIMGUI_API void* ImGuiDataVarInfo_GetVarPtr(ImGuiDataVarInfo* self,void* parent) -{ - return self->GetVarPtr(parent); -} CIMGUI_API ImGuiStyleMod* ImGuiStyleMod_ImGuiStyleMod_Int(ImGuiStyleVar idx,int v) { return IM_NEW(ImGuiStyleMod)(idx,v); @@ -3391,13 +3399,17 @@ CIMGUI_API void ImGuiInputTextState_SelectAll(ImGuiInputTextState* self) { return self->SelectAll(); } -CIMGUI_API ImGuiPopupData* ImGuiPopupData_ImGuiPopupData(void) +CIMGUI_API void ImGuiInputTextState_ReloadUserBufAndSelectAll(ImGuiInputTextState* self) { - return IM_NEW(ImGuiPopupData)(); + return self->ReloadUserBufAndSelectAll(); } -CIMGUI_API void ImGuiPopupData_destroy(ImGuiPopupData* self) +CIMGUI_API void ImGuiInputTextState_ReloadUserBufAndKeepSelection(ImGuiInputTextState* self) { - IM_DELETE(self); + return self->ReloadUserBufAndKeepSelection(); +} +CIMGUI_API void ImGuiInputTextState_ReloadUserBufAndMoveToEnd(ImGuiInputTextState* self) +{ + return self->ReloadUserBufAndMoveToEnd(); } CIMGUI_API ImGuiNextWindowData* ImGuiNextWindowData_ImGuiNextWindowData(void) { @@ -3459,6 +3471,18 @@ CIMGUI_API ImGuiPtrOrIndex* ImGuiPtrOrIndex_ImGuiPtrOrIndex_Int(int index) { return IM_NEW(ImGuiPtrOrIndex)(index); } +CIMGUI_API void* ImGuiDataVarInfo_GetVarPtr(ImGuiDataVarInfo* self,void* parent) +{ + return self->GetVarPtr(parent); +} +CIMGUI_API ImGuiPopupData* ImGuiPopupData_ImGuiPopupData(void) +{ + return IM_NEW(ImGuiPopupData)(); +} +CIMGUI_API void ImGuiPopupData_destroy(ImGuiPopupData* self) +{ + IM_DELETE(self); +} CIMGUI_API ImGuiInputEvent* ImGuiInputEvent_ImGuiInputEvent(void) { return IM_NEW(ImGuiInputEvent)(); @@ -3675,6 +3699,14 @@ CIMGUI_API void ImGuiSettingsHandler_destroy(ImGuiSettingsHandler* self) { IM_DELETE(self); } +CIMGUI_API ImGuiDebugAllocInfo* ImGuiDebugAllocInfo_ImGuiDebugAllocInfo(void) +{ + return IM_NEW(ImGuiDebugAllocInfo)(); +} +CIMGUI_API void ImGuiDebugAllocInfo_destroy(ImGuiDebugAllocInfo* self) +{ + IM_DELETE(self); +} CIMGUI_API ImGuiStackLevelInfo* ImGuiStackLevelInfo_ImGuiStackLevelInfo(void) { return IM_NEW(ImGuiStackLevelInfo)(); @@ -3683,11 +3715,11 @@ CIMGUI_API void ImGuiStackLevelInfo_destroy(ImGuiStackLevelInfo* self) { IM_DELETE(self); } -CIMGUI_API ImGuiStackTool* ImGuiStackTool_ImGuiStackTool(void) +CIMGUI_API ImGuiIDStackTool* ImGuiIDStackTool_ImGuiIDStackTool(void) { - return IM_NEW(ImGuiStackTool)(); + return IM_NEW(ImGuiIDStackTool)(); } -CIMGUI_API void ImGuiStackTool_destroy(ImGuiStackTool* self) +CIMGUI_API void ImGuiIDStackTool_destroy(ImGuiIDStackTool* self) { IM_DELETE(self); } @@ -3879,9 +3911,13 @@ CIMGUI_API void igSetWindowHitTestHole(ImGuiWindow* window,const ImVec2 pos,cons { return ImGui::SetWindowHitTestHole(window,pos,size); } -CIMGUI_API void igSetWindowHiddendAndSkipItemsForCurrentFrame(ImGuiWindow* window) +CIMGUI_API void igSetWindowHiddenAndSkipItemsForCurrentFrame(ImGuiWindow* window) +{ + return ImGui::SetWindowHiddenAndSkipItemsForCurrentFrame(window); +} +CIMGUI_API void igSetWindowParentWindowForFocusRoute(ImGuiWindow* window,ImGuiWindow* parent_window) { - return ImGui::SetWindowHiddendAndSkipItemsForCurrentFrame(window); + return ImGui::SetWindowParentWindowForFocusRoute(window,parent_window); } CIMGUI_API void igWindowRectAbsToRel(ImRect *pOut,ImGuiWindow* window,const ImRect r) { @@ -3963,9 +3999,9 @@ CIMGUI_API void igStartMouseMovingWindow(ImGuiWindow* window) { return ImGui::StartMouseMovingWindow(window); } -CIMGUI_API void igStartMouseMovingWindowOrNode(ImGuiWindow* window,ImGuiDockNode* node,bool undock_floating_node) +CIMGUI_API void igStartMouseMovingWindowOrNode(ImGuiWindow* window,ImGuiDockNode* node,bool undock) { - return ImGui::StartMouseMovingWindowOrNode(window,node,undock_floating_node); + return ImGui::StartMouseMovingWindowOrNode(window,node,undock); } CIMGUI_API void igUpdateMouseMovingWindowNewFrame() { @@ -4231,9 +4267,9 @@ CIMGUI_API void igLogSetNextTextDecoration(const char* prefix,const char* suffix { return ImGui::LogSetNextTextDecoration(prefix,suffix); } -CIMGUI_API bool igBeginChildEx(const char* name,ImGuiID id,const ImVec2 size_arg,bool border,ImGuiWindowFlags flags) +CIMGUI_API bool igBeginChildEx(const char* name,ImGuiID id,const ImVec2 size_arg,ImGuiChildFlags child_flags,ImGuiWindowFlags window_flags) { - return ImGui::BeginChildEx(name,id,size_arg,border,flags); + return ImGui::BeginChildEx(name,id,size_arg,child_flags,window_flags); } CIMGUI_API void igOpenPopupEx(ImGuiID id,ImGuiPopupFlags popup_flags) { @@ -4263,6 +4299,10 @@ CIMGUI_API bool igBeginTooltipEx(ImGuiTooltipFlags tooltip_flags,ImGuiWindowFlag { return ImGui::BeginTooltipEx(tooltip_flags,extra_window_flags); } +CIMGUI_API bool igBeginTooltipHidden() +{ + return ImGui::BeginTooltipHidden(); +} CIMGUI_API void igGetPopupAllowedExtentRect(ImRect *pOut,ImGuiWindow* window) { *pOut = ImGui::GetPopupAllowedExtentRect(window); @@ -4351,6 +4391,10 @@ CIMGUI_API void igNavMoveRequestTryWrapping(ImGuiWindow* window,ImGuiNavMoveFlag { return ImGui::NavMoveRequestTryWrapping(window,move_flags); } +CIMGUI_API void igNavHighlightActivated(ImGuiID id) +{ + return ImGui::NavHighlightActivated(id); +} CIMGUI_API void igNavClearPreferredPosForAxis(ImGuiAxis axis) { return ImGui::NavClearPreferredPosForAxis(axis); @@ -4371,6 +4415,10 @@ CIMGUI_API void igSetNavID(ImGuiID id,ImGuiNavLayer nav_layer,ImGuiID focus_scop { return ImGui::SetNavID(id,nav_layer,focus_scope_id,rect_rel); } +CIMGUI_API void igSetNavFocusScope(ImGuiID focus_scope_id) +{ + return ImGui::SetNavFocusScope(focus_scope_id); +} CIMGUI_API void igFocusItem() { return ImGui::FocusItem(); @@ -4407,9 +4455,13 @@ CIMGUI_API bool igIsAliasKey(ImGuiKey key) { return ImGui::IsAliasKey(key); } -CIMGUI_API ImGuiKeyChord igConvertShortcutMod(ImGuiKeyChord key_chord) +CIMGUI_API bool igIsModKey(ImGuiKey key) +{ + return ImGui::IsModKey(key); +} +CIMGUI_API ImGuiKeyChord igFixupKeyChord(ImGuiContext* ctx,ImGuiKeyChord key_chord) { - return ImGui::ConvertShortcutMod(key_chord); + return ImGui::FixupKeyChord(ctx,key_chord); } CIMGUI_API ImGuiKey igConvertSingleModFlagToKey(ImGuiContext* ctx,ImGuiKey key) { @@ -4423,9 +4475,9 @@ CIMGUI_API ImGuiKeyData* igGetKeyData_Key(ImGuiKey key) { return ImGui::GetKeyData(key); } -CIMGUI_API void igGetKeyChordName(ImGuiKeyChord key_chord,char* out_buf,int out_buf_size) +CIMGUI_API const char* igGetKeyChordName(ImGuiKeyChord key_chord) { - return ImGui::GetKeyChordName(key_chord,out_buf,out_buf_size); + return ImGui::GetKeyChordName(key_chord); } CIMGUI_API ImGuiKey igMouseButtonToKey(ImGuiMouseButton button) { @@ -4511,6 +4563,18 @@ CIMGUI_API bool igIsMouseReleased_ID(ImGuiMouseButton button,ImGuiID owner_id) { return ImGui::IsMouseReleased(button,owner_id); } +CIMGUI_API bool igIsMouseDoubleClicked_ID(ImGuiMouseButton button,ImGuiID owner_id) +{ + return ImGui::IsMouseDoubleClicked(button,owner_id); +} +CIMGUI_API bool igIsKeyChordPressed_ID(ImGuiKeyChord key_chord,ImGuiID owner_id,ImGuiInputFlags flags) +{ + return ImGui::IsKeyChordPressed(key_chord,owner_id,flags); +} +CIMGUI_API void igSetNextItemShortcut(ImGuiKeyChord key_chord) +{ + return ImGui::SetNextItemShortcut(key_chord); +} CIMGUI_API bool igShortcut(ImGuiKeyChord key_chord,ImGuiID owner_id,ImGuiInputFlags flags) { return ImGui::Shortcut(key_chord,owner_id,flags); @@ -4723,9 +4787,9 @@ CIMGUI_API bool igIsDragDropPayloadBeingAccepted() { return ImGui::IsDragDropPayloadBeingAccepted(); } -CIMGUI_API void igRenderDragDropTargetRect(const ImRect bb) +CIMGUI_API void igRenderDragDropTargetRect(const ImRect bb,const ImRect item_clip_rect) { - return ImGui::RenderDragDropTargetRect(bb); + return ImGui::RenderDragDropTargetRect(bb,item_clip_rect); } CIMGUI_API ImGuiTypingSelectRequest* igGetTypingSelectRequest(ImGuiTypingSelectFlags flags) { @@ -4807,6 +4871,10 @@ CIMGUI_API float igTableGetHeaderRowHeight() { return ImGui::TableGetHeaderRowHeight(); } +CIMGUI_API float igTableGetHeaderAngledMaxLabelWidth() +{ + return ImGui::TableGetHeaderAngledMaxLabelWidth(); +} CIMGUI_API void igTablePushBackgroundChannel() { return ImGui::TablePushBackgroundChannel(); @@ -4815,6 +4883,10 @@ CIMGUI_API void igTablePopBackgroundChannel() { return ImGui::TablePopBackgroundChannel(); } +CIMGUI_API void igTableAngledHeadersRowEx(float angle,float max_label_width) +{ + return ImGui::TableAngledHeadersRowEx(angle,max_label_width); +} CIMGUI_API ImGuiTable* igGetCurrentTable() { return ImGui::GetCurrentTable(); @@ -4855,9 +4927,9 @@ CIMGUI_API void igTableDrawBorders(ImGuiTable* table) { return ImGui::TableDrawBorders(table); } -CIMGUI_API void igTableDrawContextMenu(ImGuiTable* table) +CIMGUI_API void igTableDrawDefaultContextMenu(ImGuiTable* table,ImGuiTableFlags flags_for_section_to_display) { - return ImGui::TableDrawContextMenu(table); + return ImGui::TableDrawDefaultContextMenu(table,flags_for_section_to_display); } CIMGUI_API bool igTableBeginContextMenuPopup(ImGuiTable* table) { @@ -5147,9 +5219,9 @@ CIMGUI_API bool igArrowButtonEx(const char* str_id,ImGuiDir dir,ImVec2 size_arg, { return ImGui::ArrowButtonEx(str_id,dir,size_arg,flags); } -CIMGUI_API bool igImageButtonEx(ImGuiID id,ImTextureID texture_id,const ImVec2 size,const ImVec2 uv0,const ImVec2 uv1,const ImVec4 bg_col,const ImVec4 tint_col,ImGuiButtonFlags flags) +CIMGUI_API bool igImageButtonEx(ImGuiID id,ImTextureID texture_id,const ImVec2 image_size,const ImVec2 uv0,const ImVec2 uv1,const ImVec4 bg_col,const ImVec4 tint_col,ImGuiButtonFlags flags) { - return ImGui::ImageButtonEx(id,texture_id,size,uv0,uv1,bg_col,tint_col,flags); + return ImGui::ImageButtonEx(id,texture_id,image_size,uv0,uv1,bg_col,tint_col,flags); } CIMGUI_API void igSeparatorEx(ImGuiSeparatorFlags flags,float thickness) { @@ -5307,6 +5379,10 @@ CIMGUI_API void igShadeVertsLinearUV(ImDrawList* draw_list,int vert_start_idx,in { return ImGui::ShadeVertsLinearUV(draw_list,vert_start_idx,vert_end_idx,a,b,uv_a,uv_b,clamp); } +CIMGUI_API void igShadeVertsTransformPos(ImDrawList* draw_list,int vert_start_idx,int vert_end_idx,const ImVec2 pivot_in,float cos_a,float sin_a,const ImVec2 pivot_out) +{ + return ImGui::ShadeVertsTransformPos(draw_list,vert_start_idx,vert_end_idx,pivot_in,cos_a,sin_a,pivot_out); +} CIMGUI_API void igGcCompactTransientMiscBuffers() { return ImGui::GcCompactTransientMiscBuffers(); @@ -5330,6 +5406,10 @@ CIMGUI_API void igDebugLogV(const char* fmt,va_list args) { return ImGui::DebugLogV(fmt,args); } +CIMGUI_API void igDebugAllocHook(ImGuiDebugAllocInfo* info,int frame_count,void* ptr,size_t size) +{ + return ImGui::DebugAllocHook(info,frame_count,ptr,size); +} CIMGUI_API void igErrorCheckEndFrameRecover(ImGuiErrorLogCallback log_callback,void* user_data) { return ImGui::ErrorCheckEndFrameRecover(log_callback,user_data); @@ -5366,9 +5446,17 @@ CIMGUI_API void igDebugLocateItemResolveWithLastItem() { return ImGui::DebugLocateItemResolveWithLastItem(); } -CIMGUI_API void igDebugStartItemPicker() +CIMGUI_API void igDebugBreakClearData() { - return ImGui::DebugStartItemPicker(); + return ImGui::DebugBreakClearData(); +} +CIMGUI_API bool igDebugBreakButton(const char* label,const char* description_of_location) +{ + return ImGui::DebugBreakButton(label,description_of_location); +} +CIMGUI_API void igDebugBreakButtonTooltip(bool keyboard_only,const char* description_of_location) +{ + return ImGui::DebugBreakButtonTooltip(keyboard_only,description_of_location); } CIMGUI_API void igShowFontAtlas(ImFontAtlas* atlas) { @@ -5454,10 +5542,6 @@ CIMGUI_API void igDebugRenderViewportThumbnail(ImDrawList* draw_list,ImGuiViewpo { return ImGui::DebugRenderViewportThumbnail(draw_list,viewport,bb); } -CIMGUI_API bool igIsKeyPressedMap(ImGuiKey key,bool repeat) -{ - return ImGui::IsKeyPressedMap(key,repeat); -} CIMGUI_API const ImFontBuilderIO* igImFontAtlasGetBuilderForStbTruetype() { return ImFontAtlasGetBuilderForStbTruetype(); diff --git a/cimgui/cimgui.h b/cimgui/cimgui.h index 700bc4f07..db89b48dc 100644 --- a/cimgui/cimgui.h +++ b/cimgui/cimgui.h @@ -1,5 +1,5 @@ //This file is automatically generated by generator.lua from https://github.com/cimgui/cimgui -//based on imgui.h file version "1.90 WIP" 18992 from Dear ImGui https://github.com/ocornut/imgui +//based on imgui.h file version "1.90.4" 19040 from Dear ImGui https://github.com/ocornut/imgui //with imgui_internal.h api //docking branch #ifndef CIMGUI_INCLUDED @@ -164,6 +164,7 @@ typedef int ImDrawListFlags; typedef int ImFontAtlasFlags; typedef int ImGuiBackendFlags; typedef int ImGuiButtonFlags; +typedef int ImGuiChildFlags; typedef int ImGuiColorEditFlags; typedef int ImGuiConfigFlags; typedef int ImGuiComboFlags; @@ -227,12 +228,10 @@ typedef enum { ImGuiWindowFlags_NoBringToFrontOnFocus = 1 << 13, ImGuiWindowFlags_AlwaysVerticalScrollbar= 1 << 14, ImGuiWindowFlags_AlwaysHorizontalScrollbar=1<< 15, - ImGuiWindowFlags_AlwaysUseWindowPadding = 1 << 16, - ImGuiWindowFlags_NoNavInputs = 1 << 18, - ImGuiWindowFlags_NoNavFocus = 1 << 19, - ImGuiWindowFlags_UnsavedDocument = 1 << 20, - ImGuiWindowFlags_NoDocking = 1 << 21, - + ImGuiWindowFlags_NoNavInputs = 1 << 16, + ImGuiWindowFlags_NoNavFocus = 1 << 17, + ImGuiWindowFlags_UnsavedDocument = 1 << 18, + ImGuiWindowFlags_NoDocking = 1 << 19, ImGuiWindowFlags_NoNav = ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus, ImGuiWindowFlags_NoDecoration = ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoCollapse, ImGuiWindowFlags_NoInputs = ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus, @@ -243,7 +242,21 @@ typedef enum { ImGuiWindowFlags_Modal = 1 << 27, ImGuiWindowFlags_ChildMenu = 1 << 28, ImGuiWindowFlags_DockNodeHost = 1 << 29, + + + }ImGuiWindowFlags_; +typedef enum { + ImGuiChildFlags_None = 0, + ImGuiChildFlags_Border = 1 << 0, + ImGuiChildFlags_AlwaysUseWindowPadding = 1 << 1, + ImGuiChildFlags_ResizeX = 1 << 2, + ImGuiChildFlags_ResizeY = 1 << 3, + ImGuiChildFlags_AutoResizeX = 1 << 4, + ImGuiChildFlags_AutoResizeY = 1 << 5, + ImGuiChildFlags_AlwaysAutoResize = 1 << 6, + ImGuiChildFlags_FrameStyle = 1 << 7, +}ImGuiChildFlags_; typedef enum { ImGuiInputTextFlags_None = 0, ImGuiInputTextFlags_CharsDecimal = 1 << 0, @@ -283,7 +296,8 @@ typedef enum { ImGuiTreeNodeFlags_FramePadding = 1 << 10, ImGuiTreeNodeFlags_SpanAvailWidth = 1 << 11, ImGuiTreeNodeFlags_SpanFullWidth = 1 << 12, - ImGuiTreeNodeFlags_NavLeftJumpsBackHere = 1 << 13, + ImGuiTreeNodeFlags_SpanAllColumns = 1 << 13, + ImGuiTreeNodeFlags_NavLeftJumpsBackHere = 1 << 14, ImGuiTreeNodeFlags_CollapsingHeader = ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoTreePushOnOpen | ImGuiTreeNodeFlags_NoAutoOpenOnLog, @@ -297,10 +311,11 @@ typedef enum { ImGuiPopupFlags_MouseButtonMiddle = 2, ImGuiPopupFlags_MouseButtonMask_ = 0x1F, ImGuiPopupFlags_MouseButtonDefault_ = 1, - ImGuiPopupFlags_NoOpenOverExistingPopup = 1 << 5, - ImGuiPopupFlags_NoOpenOverItems = 1 << 6, - ImGuiPopupFlags_AnyPopupId = 1 << 7, - ImGuiPopupFlags_AnyPopupLevel = 1 << 8, + ImGuiPopupFlags_NoReopen = 1 << 5, + ImGuiPopupFlags_NoOpenOverExistingPopup = 1 << 7, + ImGuiPopupFlags_NoOpenOverItems = 1 << 8, + ImGuiPopupFlags_AnyPopupId = 1 << 10, + ImGuiPopupFlags_AnyPopupLevel = 1 << 11, ImGuiPopupFlags_AnyPopup = ImGuiPopupFlags_AnyPopupId | ImGuiPopupFlags_AnyPopupLevel, }ImGuiPopupFlags_; typedef enum { @@ -324,6 +339,7 @@ typedef enum { ImGuiComboFlags_HeightLargest = 1 << 4, ImGuiComboFlags_NoArrowButton = 1 << 5, ImGuiComboFlags_NoPreview = 1 << 6, + ImGuiComboFlags_WidthFitPreview = 1 << 7, ImGuiComboFlags_HeightMask_ = ImGuiComboFlags_HeightSmall | ImGuiComboFlags_HeightRegular | ImGuiComboFlags_HeightLarge | ImGuiComboFlags_HeightLargest, }ImGuiComboFlags_; typedef enum { @@ -349,84 +365,8 @@ typedef enum { ImGuiTabItemFlags_NoReorder = 1 << 5, ImGuiTabItemFlags_Leading = 1 << 6, ImGuiTabItemFlags_Trailing = 1 << 7, + ImGuiTabItemFlags_NoAssumedClosure = 1 << 8, }ImGuiTabItemFlags_; -typedef enum { - ImGuiTableFlags_None = 0, - ImGuiTableFlags_Resizable = 1 << 0, - ImGuiTableFlags_Reorderable = 1 << 1, - ImGuiTableFlags_Hideable = 1 << 2, - ImGuiTableFlags_Sortable = 1 << 3, - ImGuiTableFlags_NoSavedSettings = 1 << 4, - ImGuiTableFlags_ContextMenuInBody = 1 << 5, - ImGuiTableFlags_RowBg = 1 << 6, - ImGuiTableFlags_BordersInnerH = 1 << 7, - ImGuiTableFlags_BordersOuterH = 1 << 8, - ImGuiTableFlags_BordersInnerV = 1 << 9, - ImGuiTableFlags_BordersOuterV = 1 << 10, - ImGuiTableFlags_BordersH = ImGuiTableFlags_BordersInnerH | ImGuiTableFlags_BordersOuterH, - ImGuiTableFlags_BordersV = ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersOuterV, - ImGuiTableFlags_BordersInner = ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersInnerH, - ImGuiTableFlags_BordersOuter = ImGuiTableFlags_BordersOuterV | ImGuiTableFlags_BordersOuterH, - ImGuiTableFlags_Borders = ImGuiTableFlags_BordersInner | ImGuiTableFlags_BordersOuter, - ImGuiTableFlags_NoBordersInBody = 1 << 11, - ImGuiTableFlags_NoBordersInBodyUntilResize = 1 << 12, - ImGuiTableFlags_SizingFixedFit = 1 << 13, - ImGuiTableFlags_SizingFixedSame = 2 << 13, - ImGuiTableFlags_SizingStretchProp = 3 << 13, - ImGuiTableFlags_SizingStretchSame = 4 << 13, - ImGuiTableFlags_NoHostExtendX = 1 << 16, - ImGuiTableFlags_NoHostExtendY = 1 << 17, - ImGuiTableFlags_NoKeepColumnsVisible = 1 << 18, - ImGuiTableFlags_PreciseWidths = 1 << 19, - ImGuiTableFlags_NoClip = 1 << 20, - ImGuiTableFlags_PadOuterX = 1 << 21, - ImGuiTableFlags_NoPadOuterX = 1 << 22, - ImGuiTableFlags_NoPadInnerX = 1 << 23, - ImGuiTableFlags_ScrollX = 1 << 24, - ImGuiTableFlags_ScrollY = 1 << 25, - ImGuiTableFlags_SortMulti = 1 << 26, - ImGuiTableFlags_SortTristate = 1 << 27, - ImGuiTableFlags_SizingMask_ = ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_SizingFixedSame | ImGuiTableFlags_SizingStretchProp | ImGuiTableFlags_SizingStretchSame, -}ImGuiTableFlags_; -typedef enum { - ImGuiTableColumnFlags_None = 0, - ImGuiTableColumnFlags_Disabled = 1 << 0, - ImGuiTableColumnFlags_DefaultHide = 1 << 1, - ImGuiTableColumnFlags_DefaultSort = 1 << 2, - ImGuiTableColumnFlags_WidthStretch = 1 << 3, - ImGuiTableColumnFlags_WidthFixed = 1 << 4, - ImGuiTableColumnFlags_NoResize = 1 << 5, - ImGuiTableColumnFlags_NoReorder = 1 << 6, - ImGuiTableColumnFlags_NoHide = 1 << 7, - ImGuiTableColumnFlags_NoClip = 1 << 8, - ImGuiTableColumnFlags_NoSort = 1 << 9, - ImGuiTableColumnFlags_NoSortAscending = 1 << 10, - ImGuiTableColumnFlags_NoSortDescending = 1 << 11, - ImGuiTableColumnFlags_NoHeaderLabel = 1 << 12, - ImGuiTableColumnFlags_NoHeaderWidth = 1 << 13, - ImGuiTableColumnFlags_PreferSortAscending = 1 << 14, - ImGuiTableColumnFlags_PreferSortDescending = 1 << 15, - ImGuiTableColumnFlags_IndentEnable = 1 << 16, - ImGuiTableColumnFlags_IndentDisable = 1 << 17, - ImGuiTableColumnFlags_IsEnabled = 1 << 24, - ImGuiTableColumnFlags_IsVisible = 1 << 25, - ImGuiTableColumnFlags_IsSorted = 1 << 26, - ImGuiTableColumnFlags_IsHovered = 1 << 27, - ImGuiTableColumnFlags_WidthMask_ = ImGuiTableColumnFlags_WidthStretch | ImGuiTableColumnFlags_WidthFixed, - ImGuiTableColumnFlags_IndentMask_ = ImGuiTableColumnFlags_IndentEnable | ImGuiTableColumnFlags_IndentDisable, - ImGuiTableColumnFlags_StatusMask_ = ImGuiTableColumnFlags_IsEnabled | ImGuiTableColumnFlags_IsVisible | ImGuiTableColumnFlags_IsSorted | ImGuiTableColumnFlags_IsHovered, - ImGuiTableColumnFlags_NoDirectResize_ = 1 << 30, -}ImGuiTableColumnFlags_; -typedef enum { - ImGuiTableRowFlags_None = 0, - ImGuiTableRowFlags_Headers = 1 << 0, -}ImGuiTableRowFlags_; -typedef enum { - ImGuiTableBgTarget_None = 0, - ImGuiTableBgTarget_RowBg0 = 1, - ImGuiTableBgTarget_RowBg1 = 2, - ImGuiTableBgTarget_CellBg = 3, -}ImGuiTableBgTarget_; typedef enum { ImGuiFocusedFlags_None = 0, ImGuiFocusedFlags_ChildWindows = 1 << 0, @@ -587,75 +527,89 @@ ImGuiKey_F9=580, ImGuiKey_F10=581, ImGuiKey_F11=582, ImGuiKey_F12=583, -ImGuiKey_Apostrophe=584, -ImGuiKey_Comma=585, -ImGuiKey_Minus=586, -ImGuiKey_Period=587, -ImGuiKey_Slash=588, -ImGuiKey_Semicolon=589, -ImGuiKey_Equal=590, -ImGuiKey_LeftBracket=591, -ImGuiKey_Backslash=592, -ImGuiKey_RightBracket=593, -ImGuiKey_GraveAccent=594, -ImGuiKey_CapsLock=595, -ImGuiKey_ScrollLock=596, -ImGuiKey_NumLock=597, -ImGuiKey_PrintScreen=598, -ImGuiKey_Pause=599, -ImGuiKey_Keypad0=600, -ImGuiKey_Keypad1=601, -ImGuiKey_Keypad2=602, -ImGuiKey_Keypad3=603, -ImGuiKey_Keypad4=604, -ImGuiKey_Keypad5=605, -ImGuiKey_Keypad6=606, -ImGuiKey_Keypad7=607, -ImGuiKey_Keypad8=608, -ImGuiKey_Keypad9=609, -ImGuiKey_KeypadDecimal=610, -ImGuiKey_KeypadDivide=611, -ImGuiKey_KeypadMultiply=612, -ImGuiKey_KeypadSubtract=613, -ImGuiKey_KeypadAdd=614, -ImGuiKey_KeypadEnter=615, -ImGuiKey_KeypadEqual=616, -ImGuiKey_GamepadStart=617, -ImGuiKey_GamepadBack=618, -ImGuiKey_GamepadFaceLeft=619, -ImGuiKey_GamepadFaceRight=620, -ImGuiKey_GamepadFaceUp=621, -ImGuiKey_GamepadFaceDown=622, -ImGuiKey_GamepadDpadLeft=623, -ImGuiKey_GamepadDpadRight=624, -ImGuiKey_GamepadDpadUp=625, -ImGuiKey_GamepadDpadDown=626, -ImGuiKey_GamepadL1=627, -ImGuiKey_GamepadR1=628, -ImGuiKey_GamepadL2=629, -ImGuiKey_GamepadR2=630, -ImGuiKey_GamepadL3=631, -ImGuiKey_GamepadR3=632, -ImGuiKey_GamepadLStickLeft=633, -ImGuiKey_GamepadLStickRight=634, -ImGuiKey_GamepadLStickUp=635, -ImGuiKey_GamepadLStickDown=636, -ImGuiKey_GamepadRStickLeft=637, -ImGuiKey_GamepadRStickRight=638, -ImGuiKey_GamepadRStickUp=639, -ImGuiKey_GamepadRStickDown=640, -ImGuiKey_MouseLeft=641, -ImGuiKey_MouseRight=642, -ImGuiKey_MouseMiddle=643, -ImGuiKey_MouseX1=644, -ImGuiKey_MouseX2=645, -ImGuiKey_MouseWheelX=646, -ImGuiKey_MouseWheelY=647, -ImGuiKey_ReservedForModCtrl=648, -ImGuiKey_ReservedForModShift=649, -ImGuiKey_ReservedForModAlt=650, -ImGuiKey_ReservedForModSuper=651, -ImGuiKey_COUNT=652, +ImGuiKey_F13=584, +ImGuiKey_F14=585, +ImGuiKey_F15=586, +ImGuiKey_F16=587, +ImGuiKey_F17=588, +ImGuiKey_F18=589, +ImGuiKey_F19=590, +ImGuiKey_F20=591, +ImGuiKey_F21=592, +ImGuiKey_F22=593, +ImGuiKey_F23=594, +ImGuiKey_F24=595, +ImGuiKey_Apostrophe=596, +ImGuiKey_Comma=597, +ImGuiKey_Minus=598, +ImGuiKey_Period=599, +ImGuiKey_Slash=600, +ImGuiKey_Semicolon=601, +ImGuiKey_Equal=602, +ImGuiKey_LeftBracket=603, +ImGuiKey_Backslash=604, +ImGuiKey_RightBracket=605, +ImGuiKey_GraveAccent=606, +ImGuiKey_CapsLock=607, +ImGuiKey_ScrollLock=608, +ImGuiKey_NumLock=609, +ImGuiKey_PrintScreen=610, +ImGuiKey_Pause=611, +ImGuiKey_Keypad0=612, +ImGuiKey_Keypad1=613, +ImGuiKey_Keypad2=614, +ImGuiKey_Keypad3=615, +ImGuiKey_Keypad4=616, +ImGuiKey_Keypad5=617, +ImGuiKey_Keypad6=618, +ImGuiKey_Keypad7=619, +ImGuiKey_Keypad8=620, +ImGuiKey_Keypad9=621, +ImGuiKey_KeypadDecimal=622, +ImGuiKey_KeypadDivide=623, +ImGuiKey_KeypadMultiply=624, +ImGuiKey_KeypadSubtract=625, +ImGuiKey_KeypadAdd=626, +ImGuiKey_KeypadEnter=627, +ImGuiKey_KeypadEqual=628, +ImGuiKey_AppBack=629, +ImGuiKey_AppForward=630, +ImGuiKey_GamepadStart=631, +ImGuiKey_GamepadBack=632, +ImGuiKey_GamepadFaceLeft=633, +ImGuiKey_GamepadFaceRight=634, +ImGuiKey_GamepadFaceUp=635, +ImGuiKey_GamepadFaceDown=636, +ImGuiKey_GamepadDpadLeft=637, +ImGuiKey_GamepadDpadRight=638, +ImGuiKey_GamepadDpadUp=639, +ImGuiKey_GamepadDpadDown=640, +ImGuiKey_GamepadL1=641, +ImGuiKey_GamepadR1=642, +ImGuiKey_GamepadL2=643, +ImGuiKey_GamepadR2=644, +ImGuiKey_GamepadL3=645, +ImGuiKey_GamepadR3=646, +ImGuiKey_GamepadLStickLeft=647, +ImGuiKey_GamepadLStickRight=648, +ImGuiKey_GamepadLStickUp=649, +ImGuiKey_GamepadLStickDown=650, +ImGuiKey_GamepadRStickLeft=651, +ImGuiKey_GamepadRStickRight=652, +ImGuiKey_GamepadRStickUp=653, +ImGuiKey_GamepadRStickDown=654, +ImGuiKey_MouseLeft=655, +ImGuiKey_MouseRight=656, +ImGuiKey_MouseMiddle=657, +ImGuiKey_MouseX1=658, +ImGuiKey_MouseX2=659, +ImGuiKey_MouseWheelX=660, +ImGuiKey_MouseWheelY=661, +ImGuiKey_ReservedForModCtrl=662, +ImGuiKey_ReservedForModShift=663, +ImGuiKey_ReservedForModAlt=664, +ImGuiKey_ReservedForModSuper=665, +ImGuiKey_COUNT=666, ImGuiMod_None=0, ImGuiMod_Ctrl=1 << 12, ImGuiMod_Shift=1 << 13, @@ -666,14 +620,9 @@ ImGuiMod_Mask_=0xF800, ImGuiKey_NamedKey_BEGIN=512, ImGuiKey_NamedKey_END=ImGuiKey_COUNT, ImGuiKey_NamedKey_COUNT=ImGuiKey_NamedKey_END - ImGuiKey_NamedKey_BEGIN, -ImGuiKey_KeysData_SIZE=ImGuiKey_COUNT, -ImGuiKey_KeysData_OFFSET=0, +ImGuiKey_KeysData_SIZE=ImGuiKey_NamedKey_COUNT, +ImGuiKey_KeysData_OFFSET=ImGuiKey_NamedKey_BEGIN, }ImGuiKey; -typedef enum { - ImGuiNavInput_Activate, ImGuiNavInput_Cancel, ImGuiNavInput_Input, ImGuiNavInput_Menu, ImGuiNavInput_DpadLeft, ImGuiNavInput_DpadRight, ImGuiNavInput_DpadUp, ImGuiNavInput_DpadDown, - ImGuiNavInput_LStickLeft, ImGuiNavInput_LStickRight, ImGuiNavInput_LStickUp, ImGuiNavInput_LStickDown, ImGuiNavInput_FocusPrev, ImGuiNavInput_FocusNext, ImGuiNavInput_TweakSlow, ImGuiNavInput_TweakFast, - ImGuiNavInput_COUNT, -}ImGuiNavInput; typedef enum { ImGuiConfigFlags_None = 0, ImGuiConfigFlags_NavEnableKeyboard = 1 << 0, @@ -869,6 +818,98 @@ typedef enum { ImGuiCond_FirstUseEver = 1 << 2, ImGuiCond_Appearing = 1 << 3, }ImGuiCond_; +typedef enum { + ImGuiTableFlags_None = 0, + ImGuiTableFlags_Resizable = 1 << 0, + ImGuiTableFlags_Reorderable = 1 << 1, + ImGuiTableFlags_Hideable = 1 << 2, + ImGuiTableFlags_Sortable = 1 << 3, + ImGuiTableFlags_NoSavedSettings = 1 << 4, + ImGuiTableFlags_ContextMenuInBody = 1 << 5, + ImGuiTableFlags_RowBg = 1 << 6, + ImGuiTableFlags_BordersInnerH = 1 << 7, + ImGuiTableFlags_BordersOuterH = 1 << 8, + ImGuiTableFlags_BordersInnerV = 1 << 9, + ImGuiTableFlags_BordersOuterV = 1 << 10, + ImGuiTableFlags_BordersH = ImGuiTableFlags_BordersInnerH | ImGuiTableFlags_BordersOuterH, + ImGuiTableFlags_BordersV = ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersOuterV, + ImGuiTableFlags_BordersInner = ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersInnerH, + ImGuiTableFlags_BordersOuter = ImGuiTableFlags_BordersOuterV | ImGuiTableFlags_BordersOuterH, + ImGuiTableFlags_Borders = ImGuiTableFlags_BordersInner | ImGuiTableFlags_BordersOuter, + ImGuiTableFlags_NoBordersInBody = 1 << 11, + ImGuiTableFlags_NoBordersInBodyUntilResize = 1 << 12, + ImGuiTableFlags_SizingFixedFit = 1 << 13, + ImGuiTableFlags_SizingFixedSame = 2 << 13, + ImGuiTableFlags_SizingStretchProp = 3 << 13, + ImGuiTableFlags_SizingStretchSame = 4 << 13, + ImGuiTableFlags_NoHostExtendX = 1 << 16, + ImGuiTableFlags_NoHostExtendY = 1 << 17, + ImGuiTableFlags_NoKeepColumnsVisible = 1 << 18, + ImGuiTableFlags_PreciseWidths = 1 << 19, + ImGuiTableFlags_NoClip = 1 << 20, + ImGuiTableFlags_PadOuterX = 1 << 21, + ImGuiTableFlags_NoPadOuterX = 1 << 22, + ImGuiTableFlags_NoPadInnerX = 1 << 23, + ImGuiTableFlags_ScrollX = 1 << 24, + ImGuiTableFlags_ScrollY = 1 << 25, + ImGuiTableFlags_SortMulti = 1 << 26, + ImGuiTableFlags_SortTristate = 1 << 27, + ImGuiTableFlags_HighlightHoveredColumn = 1 << 28, + ImGuiTableFlags_SizingMask_ = ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_SizingFixedSame | ImGuiTableFlags_SizingStretchProp | ImGuiTableFlags_SizingStretchSame, +}ImGuiTableFlags_; +typedef enum { + ImGuiTableColumnFlags_None = 0, + ImGuiTableColumnFlags_Disabled = 1 << 0, + ImGuiTableColumnFlags_DefaultHide = 1 << 1, + ImGuiTableColumnFlags_DefaultSort = 1 << 2, + ImGuiTableColumnFlags_WidthStretch = 1 << 3, + ImGuiTableColumnFlags_WidthFixed = 1 << 4, + ImGuiTableColumnFlags_NoResize = 1 << 5, + ImGuiTableColumnFlags_NoReorder = 1 << 6, + ImGuiTableColumnFlags_NoHide = 1 << 7, + ImGuiTableColumnFlags_NoClip = 1 << 8, + ImGuiTableColumnFlags_NoSort = 1 << 9, + ImGuiTableColumnFlags_NoSortAscending = 1 << 10, + ImGuiTableColumnFlags_NoSortDescending = 1 << 11, + ImGuiTableColumnFlags_NoHeaderLabel = 1 << 12, + ImGuiTableColumnFlags_NoHeaderWidth = 1 << 13, + ImGuiTableColumnFlags_PreferSortAscending = 1 << 14, + ImGuiTableColumnFlags_PreferSortDescending = 1 << 15, + ImGuiTableColumnFlags_IndentEnable = 1 << 16, + ImGuiTableColumnFlags_IndentDisable = 1 << 17, + ImGuiTableColumnFlags_AngledHeader = 1 << 18, + ImGuiTableColumnFlags_IsEnabled = 1 << 24, + ImGuiTableColumnFlags_IsVisible = 1 << 25, + ImGuiTableColumnFlags_IsSorted = 1 << 26, + ImGuiTableColumnFlags_IsHovered = 1 << 27, + ImGuiTableColumnFlags_WidthMask_ = ImGuiTableColumnFlags_WidthStretch | ImGuiTableColumnFlags_WidthFixed, + ImGuiTableColumnFlags_IndentMask_ = ImGuiTableColumnFlags_IndentEnable | ImGuiTableColumnFlags_IndentDisable, + ImGuiTableColumnFlags_StatusMask_ = ImGuiTableColumnFlags_IsEnabled | ImGuiTableColumnFlags_IsVisible | ImGuiTableColumnFlags_IsSorted | ImGuiTableColumnFlags_IsHovered, + ImGuiTableColumnFlags_NoDirectResize_ = 1 << 30, +}ImGuiTableColumnFlags_; +typedef enum { + ImGuiTableRowFlags_None = 0, + ImGuiTableRowFlags_Headers = 1 << 0, +}ImGuiTableRowFlags_; +typedef enum { + ImGuiTableBgTarget_None = 0, + ImGuiTableBgTarget_RowBg0 = 1, + ImGuiTableBgTarget_RowBg1 = 2, + ImGuiTableBgTarget_CellBg = 3, +}ImGuiTableBgTarget_; +struct ImGuiTableSortSpecs +{ + const ImGuiTableColumnSortSpecs* Specs; + int SpecsCount; + bool SpecsDirty; +}; +struct ImGuiTableColumnSortSpecs +{ + ImGuiID ColumnUserID; + ImS16 ColumnIndex; + ImS16 SortOrder; + ImGuiSortDirection SortDirection : 8; +}; struct ImGuiStyle { float Alpha; @@ -901,6 +942,7 @@ struct ImGuiStyle float TabBorderSize; float TabMinWidthForCloseButton; float TabBarBorderSize; + float TableAngledHeadersAngle; ImGuiDir ColorButtonPosition; ImVec2 ButtonTextAlign; ImVec2 SelectableTextAlign; @@ -967,6 +1009,7 @@ struct ImGuiIO float MouseDragThreshold; float KeyRepeatDelay; float KeyRepeatRate; + bool ConfigDebugIsDebuggerPresent; bool ConfigDebugBeginReturnValueOnce; bool ConfigDebugBeginReturnValueLoop; bool ConfigDebugIgnoreFocusLoss; @@ -979,7 +1022,7 @@ struct ImGuiIO const char* (*GetClipboardTextFn)(void* user_data); void (*SetClipboardTextFn)(void* user_data, const char* text); void* ClipboardUserData; - void (*SetPlatformImeDataFn)(ImGuiViewport* viewport, ImGuiPlatformImeData* data); void* _UnusedPadding; + void (*SetPlatformImeDataFn)(ImGuiViewport* viewport, ImGuiPlatformImeData* data); ImWchar PlatformLocaleDecimalPoint; bool WantCaptureMouse; bool WantCaptureKeyboard; bool WantTextInput; @@ -992,10 +1035,7 @@ struct ImGuiIO int MetricsRenderIndices; int MetricsRenderWindows; int MetricsActiveWindows; - int MetricsActiveAllocations; - ImVec2 MouseDelta; int KeyMap[ImGuiKey_COUNT]; - bool KeysDown[ImGuiKey_COUNT]; - float NavInputs[ImGuiNavInput_COUNT]; ImGuiContext* Ctx; + ImVec2 MouseDelta; ImGuiContext* Ctx; ImVec2 MousePos; bool MouseDown[5]; float MouseWheel; @@ -1059,6 +1099,7 @@ struct ImGuiWindowClass { ImGuiID ClassId; ImGuiID ParentViewportId; + ImGuiID FocusRouteParentWindowId; ImGuiViewportFlags ViewportFlagsOverrideSet; ImGuiViewportFlags ViewportFlagsOverrideClear; ImGuiTabItemFlags TabItemFlagsOverrideSet; @@ -1077,19 +1118,6 @@ struct ImGuiPayload bool Preview; bool Delivery; }; -struct ImGuiTableColumnSortSpecs -{ - ImGuiID ColumnUserID; - ImS16 ColumnIndex; - ImS16 SortOrder; - ImGuiSortDirection SortDirection : 8; -}; -struct ImGuiTableSortSpecs -{ - const ImGuiTableColumnSortSpecs* Specs; - int SpecsCount; - bool SpecsDirty; -}; struct ImGuiOnceUponAFrame { int RefFrame; @@ -1265,6 +1293,7 @@ struct ImFontConfig bool MergeMode; unsigned int FontBuilderFlags; float RasterizerMultiply; + float RasterizerDensity; ImWchar EllipsisChar; char Name[40]; ImFont* DstFont; @@ -1609,8 +1638,8 @@ typedef enum { ImGuiItemStatusFlags_HasDeactivated = 1 << 5, ImGuiItemStatusFlags_Deactivated = 1 << 6, ImGuiItemStatusFlags_HoveredWindow = 1 << 7, - ImGuiItemStatusFlags_FocusedByTabbing = 1 << 8, - ImGuiItemStatusFlags_Visible = 1 << 9, + ImGuiItemStatusFlags_Visible = 1 << 8, + ImGuiItemStatusFlags_HasClipRect = 1 << 9, @@ -1710,34 +1739,6 @@ typedef enum { ImGuiPlotType_Lines, ImGuiPlotType_Histogram, }ImGuiPlotType; -typedef enum { - ImGuiPopupPositionPolicy_Default, - ImGuiPopupPositionPolicy_ComboBox, - ImGuiPopupPositionPolicy_Tooltip, -}ImGuiPopupPositionPolicy; -struct ImGuiDataVarInfo -{ - ImGuiDataType Type; - ImU32 Count; - ImU32 Offset; -}; -typedef struct ImGuiDataTypeTempStorage ImGuiDataTypeTempStorage; -struct ImGuiDataTypeTempStorage -{ - ImU8 Data[8]; -}; -struct ImGuiDataTypeInfo -{ - size_t Size; - const char* Name; - const char* PrintFmt; - const char* ScanFmt; -}; -typedef enum { - ImGuiDataType_String = ImGuiDataType_COUNT + 1, - ImGuiDataType_Pointer, - ImGuiDataType_ID, -}ImGuiDataTypePrivate_; struct ImGuiColorMod { ImGuiCol Col; @@ -1763,6 +1764,7 @@ struct ImGuiGroupData ImGuiID WindowID; ImVec2 BackupCursorPos; ImVec2 BackupCursorMaxPos; + ImVec2 BackupCursorPosPrevLine; ImVec1 BackupIndent; ImVec1 BackupGroupOffset; ImVec2 BackupCurrLineSize; @@ -1770,6 +1772,7 @@ struct ImGuiGroupData ImGuiID BackupActiveIdIsAlive; bool BackupActiveIdPreviousFrameIsAlive; bool BackupHoveredIdIsAlive; + bool BackupIsSameLine; bool EmitItem; }; struct ImGuiMenuColumns @@ -1806,17 +1809,9 @@ struct ImGuiInputTextState bool SelectedAllMouseLock; bool Edited; ImGuiInputTextFlags Flags; -}; -struct ImGuiPopupData -{ - ImGuiID PopupId; - ImGuiWindow* Window; - ImGuiWindow* BackupNavWindow; - int ParentNavLayer; - int OpenFrameCount; - ImGuiID OpenParentId; - ImVec2 OpenPopupPos; - ImVec2 OpenMousePos; + bool ReloadUserBuf; + int ReloadSelectionStart; + int ReloadSelectionEnd; }; typedef enum { ImGuiNextWindowDataFlags_None = 0, @@ -1828,9 +1823,10 @@ typedef enum { ImGuiNextWindowDataFlags_HasFocus = 1 << 5, ImGuiNextWindowDataFlags_HasBgAlpha = 1 << 6, ImGuiNextWindowDataFlags_HasScroll = 1 << 7, - ImGuiNextWindowDataFlags_HasViewport = 1 << 8, - ImGuiNextWindowDataFlags_HasDock = 1 << 9, - ImGuiNextWindowDataFlags_HasWindowClass = 1 << 10, + ImGuiNextWindowDataFlags_HasChildFlags = 1 << 8, + ImGuiNextWindowDataFlags_HasViewport = 1 << 9, + ImGuiNextWindowDataFlags_HasDock = 1 << 10, + ImGuiNextWindowDataFlags_HasWindowClass = 1 << 11, }ImGuiNextWindowDataFlags_; struct ImGuiNextWindowData { @@ -1844,6 +1840,7 @@ struct ImGuiNextWindowData ImVec2 SizeVal; ImVec2 ContentSizeVal; ImVec2 ScrollVal; + ImGuiChildFlags ChildFlags; bool PosUndock; bool CollapsedVal; ImRect SizeConstraintRect; @@ -1860,15 +1857,17 @@ typedef enum { ImGuiNextItemDataFlags_None = 0, ImGuiNextItemDataFlags_HasWidth = 1 << 0, ImGuiNextItemDataFlags_HasOpen = 1 << 1, + ImGuiNextItemDataFlags_HasShortcut = 1 << 2, }ImGuiNextItemDataFlags_; struct ImGuiNextItemData { ImGuiNextItemDataFlags Flags; ImGuiItemFlags ItemFlags; - float Width; ImGuiSelectionUserData SelectionUserData; - ImGuiCond OpenCond; + float Width; + ImGuiKeyChord Shortcut; bool OpenVal; + ImGuiCond OpenCond : 8; }; struct ImGuiLastItemData { @@ -1878,6 +1877,7 @@ struct ImGuiLastItemData ImRect Rect; ImRect NavRect; ImRect DisplayRect; + ImRect ClipRect; }; struct ImGuiNavTreeNodeData { @@ -1917,6 +1917,45 @@ struct ImGuiPtrOrIndex void* Ptr; int Index; }; +struct ImGuiDataVarInfo +{ + ImGuiDataType Type; + ImU32 Count; + ImU32 Offset; +}; +typedef struct ImGuiDataTypeTempStorage ImGuiDataTypeTempStorage; +struct ImGuiDataTypeTempStorage +{ + ImU8 Data[8]; +}; +struct ImGuiDataTypeInfo +{ + size_t Size; + const char* Name; + const char* PrintFmt; + const char* ScanFmt; +}; +typedef enum { + ImGuiDataType_String = ImGuiDataType_COUNT + 1, + ImGuiDataType_Pointer, + ImGuiDataType_ID, +}ImGuiDataTypePrivate_; +typedef enum { + ImGuiPopupPositionPolicy_Default, + ImGuiPopupPositionPolicy_ComboBox, + ImGuiPopupPositionPolicy_Tooltip, +}ImGuiPopupPositionPolicy; +struct ImGuiPopupData +{ + ImGuiID PopupId; + ImGuiWindow* Window; + ImGuiWindow* BackupNavWindow; + int ParentNavLayer; + int OpenFrameCount; + ImGuiID OpenParentId; + ImVec2 OpenPopupPos; + ImVec2 OpenMousePos; +}; typedef struct ImBitArray_ImGuiKey_NamedKey_COUNT__lessImGuiKey_NamedKey_BEGIN {ImU32 Storage[(ImGuiKey_NamedKey_COUNT+31)>>5];} ImBitArray_ImGuiKey_NamedKey_COUNT__lessImGuiKey_NamedKey_BEGIN; typedef ImBitArray_ImGuiKey_NamedKey_COUNT__lessImGuiKey_NamedKey_BEGIN ImBitArrayForNamedKeys; @@ -1990,6 +2029,7 @@ struct ImGuiKeyRoutingData { ImGuiKeyRoutingIndex NextEntryIndex; ImU16 Mods; + ImU8 RoutingCurrScore; ImU8 RoutingNextScore; ImGuiID RoutingCurr; ImGuiID RoutingNext; @@ -2017,23 +2057,29 @@ typedef enum { ImGuiInputFlags_RepeatRateDefault = 1 << 1, ImGuiInputFlags_RepeatRateNavMove = 1 << 2, ImGuiInputFlags_RepeatRateNavTweak = 1 << 3, - ImGuiInputFlags_RepeatRateMask_ = ImGuiInputFlags_RepeatRateDefault | ImGuiInputFlags_RepeatRateNavMove | ImGuiInputFlags_RepeatRateNavTweak, - ImGuiInputFlags_CondHovered = 1 << 4, - ImGuiInputFlags_CondActive = 1 << 5, + ImGuiInputFlags_RepeatUntilRelease = 1 << 4, + ImGuiInputFlags_RepeatUntilKeyModsChange = 1 << 5, + ImGuiInputFlags_RepeatUntilKeyModsChangeFromNone = 1 << 6, + ImGuiInputFlags_RepeatUntilOtherKeyPress = 1 << 7, + ImGuiInputFlags_CondHovered = 1 << 8, + ImGuiInputFlags_CondActive = 1 << 9, ImGuiInputFlags_CondDefault_ = ImGuiInputFlags_CondHovered | ImGuiInputFlags_CondActive, + ImGuiInputFlags_LockThisFrame = 1 << 10, + ImGuiInputFlags_LockUntilRelease = 1 << 11, + ImGuiInputFlags_RouteFocused = 1 << 12, + ImGuiInputFlags_RouteGlobalLow = 1 << 13, + ImGuiInputFlags_RouteGlobal = 1 << 14, + ImGuiInputFlags_RouteGlobalHigh = 1 << 15, + ImGuiInputFlags_RouteAlways = 1 << 16, + ImGuiInputFlags_RouteUnlessBgFocused= 1 << 17, + ImGuiInputFlags_RepeatRateMask_ = ImGuiInputFlags_RepeatRateDefault | ImGuiInputFlags_RepeatRateNavMove | ImGuiInputFlags_RepeatRateNavTweak, + ImGuiInputFlags_RepeatUntilMask_ = ImGuiInputFlags_RepeatUntilRelease | ImGuiInputFlags_RepeatUntilKeyModsChange | ImGuiInputFlags_RepeatUntilKeyModsChangeFromNone | ImGuiInputFlags_RepeatUntilOtherKeyPress, + ImGuiInputFlags_RepeatMask_ = ImGuiInputFlags_Repeat | ImGuiInputFlags_RepeatRateMask_ | ImGuiInputFlags_RepeatUntilMask_, ImGuiInputFlags_CondMask_ = ImGuiInputFlags_CondHovered | ImGuiInputFlags_CondActive, - ImGuiInputFlags_LockThisFrame = 1 << 6, - ImGuiInputFlags_LockUntilRelease = 1 << 7, - ImGuiInputFlags_RouteFocused = 1 << 8, - ImGuiInputFlags_RouteGlobalLow = 1 << 9, - ImGuiInputFlags_RouteGlobal = 1 << 10, - ImGuiInputFlags_RouteGlobalHigh = 1 << 11, ImGuiInputFlags_RouteMask_ = ImGuiInputFlags_RouteFocused | ImGuiInputFlags_RouteGlobal | ImGuiInputFlags_RouteGlobalLow | ImGuiInputFlags_RouteGlobalHigh, - ImGuiInputFlags_RouteAlways = 1 << 12, - ImGuiInputFlags_RouteUnlessBgFocused= 1 << 13, - ImGuiInputFlags_RouteExtraMask_ = ImGuiInputFlags_RouteAlways | ImGuiInputFlags_RouteUnlessBgFocused, - ImGuiInputFlags_SupportedByIsKeyPressed = ImGuiInputFlags_Repeat | ImGuiInputFlags_RepeatRateMask_, - ImGuiInputFlags_SupportedByShortcut = ImGuiInputFlags_Repeat | ImGuiInputFlags_RepeatRateMask_ | ImGuiInputFlags_RouteMask_ | ImGuiInputFlags_RouteExtraMask_, + ImGuiInputFlags_SupportedByIsKeyPressed = ImGuiInputFlags_RepeatMask_, + ImGuiInputFlags_SupportedByIsMouseClicked = ImGuiInputFlags_Repeat, + ImGuiInputFlags_SupportedByShortcut = ImGuiInputFlags_RepeatMask_ | ImGuiInputFlags_RouteMask_ | ImGuiInputFlags_RouteAlways | ImGuiInputFlags_RouteUnlessBgFocused, ImGuiInputFlags_SupportedBySetKeyOwner = ImGuiInputFlags_LockThisFrame | ImGuiInputFlags_LockUntilRelease, ImGuiInputFlags_SupportedBySetItemKeyOwner = ImGuiInputFlags_SupportedBySetKeyOwner | ImGuiInputFlags_CondMask_, }ImGuiInputFlags_; @@ -2062,6 +2108,8 @@ typedef enum { ImGuiActivateFlags_PreferInput = 1 << 0, ImGuiActivateFlags_PreferTweak = 1 << 1, ImGuiActivateFlags_TryToPreserveState = 1 << 2, + ImGuiActivateFlags_FromTabbing = 1 << 3, + ImGuiActivateFlags_FromShortcut = 1 << 4, }ImGuiActivateFlags_; typedef enum { ImGuiScrollFlags_None = 0, @@ -2077,8 +2125,7 @@ typedef enum { }ImGuiScrollFlags_; typedef enum { ImGuiNavHighlightFlags_None = 0, - ImGuiNavHighlightFlags_TypeDefault = 1 << 0, - ImGuiNavHighlightFlags_TypeThin = 1 << 1, + ImGuiNavHighlightFlags_Compact = 1 << 1, ImGuiNavHighlightFlags_AlwaysDraw = 1 << 2, ImGuiNavHighlightFlags_NoRounding = 1 << 3, }ImGuiNavHighlightFlags_; @@ -2118,6 +2165,12 @@ struct ImGuiNavItemData float DistCenter; float DistAxial; }; +typedef struct ImGuiFocusScopeData ImGuiFocusScopeData; +struct ImGuiFocusScopeData +{ + ImGuiID ID; + ImGuiID WindowID; +}; typedef enum { ImGuiTypingSelectFlags_None = 0, ImGuiTypingSelectFlags_AllowBackspace = 1 << 0, @@ -2185,6 +2238,7 @@ typedef enum { ImGuiDockNodeFlags_NoCloseButton = 1 << 15, ImGuiDockNodeFlags_NoResizeX = 1 << 16, ImGuiDockNodeFlags_NoResizeY = 1 << 17, + ImGuiDockNodeFlags_DockedWindowsInFocusRoute= 1 << 18, ImGuiDockNodeFlags_NoDockingSplitOther = 1 << 19, ImGuiDockNodeFlags_NoDockingOverMe = 1 << 20, ImGuiDockNodeFlags_NoDockingOverOther = 1 << 21, @@ -2314,6 +2368,7 @@ struct ImGuiWindowSettings ImGuiID ClassId; short DockOrder; bool Collapsed; + bool IsChild; bool WantApply; bool WantDelete; }; @@ -2340,7 +2395,8 @@ ImGuiLocKey_WindowingPopup=6, ImGuiLocKey_WindowingUntitled=7, ImGuiLocKey_DockingHideTabBar=8, ImGuiLocKey_DockingHoldShiftToDock=9, -ImGuiLocKey_COUNT=10, +ImGuiLocKey_DockingDragToUndockOrMoveNode=10, +ImGuiLocKey_COUNT=11, }ImGuiLocKey; struct ImGuiLocEntry { @@ -2356,25 +2412,45 @@ typedef enum { ImGuiDebugLogFlags_EventClipper = 1 << 4, ImGuiDebugLogFlags_EventSelection = 1 << 5, ImGuiDebugLogFlags_EventIO = 1 << 6, - ImGuiDebugLogFlags_EventDocking = 1 << 7, - ImGuiDebugLogFlags_EventViewport = 1 << 8, - ImGuiDebugLogFlags_EventMask_ = ImGuiDebugLogFlags_EventActiveId | ImGuiDebugLogFlags_EventFocus | ImGuiDebugLogFlags_EventPopup | ImGuiDebugLogFlags_EventNav | ImGuiDebugLogFlags_EventClipper | ImGuiDebugLogFlags_EventSelection | ImGuiDebugLogFlags_EventIO | ImGuiDebugLogFlags_EventDocking | ImGuiDebugLogFlags_EventViewport, - ImGuiDebugLogFlags_OutputToTTY = 1 << 10, - ImGuiDebugLogFlags_OutputToTestEngine = 1 << 11, + ImGuiDebugLogFlags_EventInputRouting = 1 << 7, + ImGuiDebugLogFlags_EventDocking = 1 << 8, + ImGuiDebugLogFlags_EventViewport = 1 << 9, + + ImGuiDebugLogFlags_EventMask_ = ImGuiDebugLogFlags_EventActiveId | ImGuiDebugLogFlags_EventFocus | ImGuiDebugLogFlags_EventPopup | ImGuiDebugLogFlags_EventNav | ImGuiDebugLogFlags_EventClipper | ImGuiDebugLogFlags_EventSelection | ImGuiDebugLogFlags_EventIO | ImGuiDebugLogFlags_EventInputRouting | ImGuiDebugLogFlags_EventDocking | ImGuiDebugLogFlags_EventViewport, + ImGuiDebugLogFlags_OutputToTTY = 1 << 20, + ImGuiDebugLogFlags_OutputToTestEngine = 1 << 21, }ImGuiDebugLogFlags_; +typedef struct ImGuiDebugAllocEntry ImGuiDebugAllocEntry; +struct ImGuiDebugAllocEntry +{ + int FrameCount; + ImS16 AllocCount; + ImS16 FreeCount; +}; +typedef struct ImGuiDebugAllocInfo ImGuiDebugAllocInfo; +struct ImGuiDebugAllocInfo +{ + int TotalAllocCount; + int TotalFreeCount; + ImS16 LastEntriesIdx; + ImGuiDebugAllocEntry LastEntriesBuf[6]; +}; struct ImGuiMetricsConfig { bool ShowDebugLog; - bool ShowStackTool; + bool ShowIDStackTool; bool ShowWindowsRects; bool ShowWindowsBeginOrder; bool ShowTablesRects; bool ShowDrawCmdMesh; bool ShowDrawCmdBoundingBoxes; + bool ShowTextEncodingViewer; bool ShowAtlasTintedWithTextColor; bool ShowDockingNodes; int ShowWindowsRectsType; int ShowTablesRectsType; + int HighlightMonitorIdx; + ImGuiID HighlightViewportID; }; typedef struct ImGuiStackLevelInfo ImGuiStackLevelInfo; struct ImGuiStackLevelInfo @@ -2385,10 +2461,10 @@ struct ImGuiStackLevelInfo ImGuiDataType DataType : 8; char Desc[57]; }; -typedef struct ImGuiStackTool ImGuiStackTool; +typedef struct ImGuiIDStackTool ImGuiIDStackTool; typedef struct ImVector_ImGuiStackLevelInfo {int Size;int Capacity;ImGuiStackLevelInfo* Data;} ImVector_ImGuiStackLevelInfo; -struct ImGuiStackTool +struct ImGuiIDStackTool { int LastActiveFrame; int StackLevel; @@ -2415,7 +2491,7 @@ typedef struct ImVector_ImGuiColorMod {int Size;int Capacity;ImGuiColorMod* Data typedef struct ImVector_ImGuiStyleMod {int Size;int Capacity;ImGuiStyleMod* Data;} ImVector_ImGuiStyleMod; -typedef struct ImVector_ImGuiID {int Size;int Capacity;ImGuiID* Data;} ImVector_ImGuiID; +typedef struct ImVector_ImGuiFocusScopeData {int Size;int Capacity;ImGuiFocusScopeData* Data;} ImVector_ImGuiFocusScopeData; typedef struct ImVector_ImGuiItemFlags {int Size;int Capacity;ImGuiItemFlags* Data;} ImVector_ImGuiItemFlags; @@ -2445,6 +2521,8 @@ typedef struct ImVector_ImGuiPtrOrIndex {int Size;int Capacity;ImGuiPtrOrIndex* typedef struct ImVector_ImGuiShrinkWidthItem {int Size;int Capacity;ImGuiShrinkWidthItem* Data;} ImVector_ImGuiShrinkWidthItem; +typedef struct ImVector_ImGuiID {int Size;int Capacity;ImGuiID* Data;} ImVector_ImGuiID; + typedef struct ImVector_ImGuiSettingsHandler {int Size;int Capacity;ImGuiSettingsHandler* Data;} ImVector_ImGuiSettingsHandler; typedef struct ImChunkStream_ImGuiWindowSettings {ImVector_char Buf;} ImChunkStream_ImGuiWindowSettings; @@ -2488,6 +2566,7 @@ struct ImGuiContext ImGuiStorage WindowsById; int WindowsActiveCount; ImVec2 WindowsHoverPadding; + ImGuiID DebugBreakInWindow; ImGuiWindow* CurrentWindow; ImGuiWindow* HoveredWindow; ImGuiWindow* HoveredWindowUnderMovingWindow; @@ -2495,6 +2574,7 @@ struct ImGuiContext ImGuiWindow* WheelingWindow; ImVec2 WheelingWindowRefMousePos; int WheelingWindowStartFrame; + int WheelingWindowScrolledFrame; float WheelingWindowReleaseTimer; ImVec2 WheelingWindowWheelRemainder; ImVec2 WheelingAxisAvg; @@ -2514,35 +2594,43 @@ struct ImGuiContext bool ActiveIdHasBeenPressedBefore; bool ActiveIdHasBeenEditedBefore; bool ActiveIdHasBeenEditedThisFrame; + bool ActiveIdFromShortcut; + int ActiveIdMouseButton : 8; ImVec2 ActiveIdClickOffset; ImGuiWindow* ActiveIdWindow; ImGuiInputSource ActiveIdSource; - int ActiveIdMouseButton; ImGuiID ActiveIdPreviousFrame; bool ActiveIdPreviousFrameIsAlive; bool ActiveIdPreviousFrameHasBeenEditedBefore; ImGuiWindow* ActiveIdPreviousFrameWindow; ImGuiID LastActiveId; float LastActiveIdTimer; + double LastKeyModsChangeTime; + double LastKeyModsChangeFromNoneTime; + double LastKeyboardKeyPressTime; + ImBitArrayForNamedKeys KeysMayBeCharInput; ImGuiKeyOwnerData KeysOwnerData[ImGuiKey_NamedKey_COUNT]; ImGuiKeyRoutingTable KeysRoutingTable; ImU32 ActiveIdUsingNavDirMask; - bool ActiveIdUsingAllKeyboardKeys; ImU32 ActiveIdUsingNavInputMask; + bool ActiveIdUsingAllKeyboardKeys; + ImGuiKeyChord DebugBreakInShortcutRouting; ImGuiID CurrentFocusScopeId; ImGuiItemFlags CurrentItemFlags; ImGuiID DebugLocateId; ImGuiNextItemData NextItemData; ImGuiLastItemData LastItemData; ImGuiNextWindowData NextWindowData; + bool DebugShowGroupRects; + ImGuiCol DebugFlashStyleColorIdx; ImVector_ImGuiColorMod ColorStack; ImVector_ImGuiStyleMod StyleVarStack; ImVector_ImFontPtr FontStack; - ImVector_ImGuiID FocusScopeStack; + ImVector_ImGuiFocusScopeData FocusScopeStack; ImVector_ImGuiItemFlags ItemFlagsStack; ImVector_ImGuiGroupData GroupStack; ImVector_ImGuiPopupData OpenPopupStack; ImVector_ImGuiPopupData BeginPopupStack; - ImVector_ImGuiNavTreeNodeData NavTreeNodeStack; int BeginMenuCount; + ImVector_ImGuiNavTreeNodeData NavTreeNodeStack; ImVector_ImGuiViewportPPtr Viewports; float CurrentDpiScale; ImGuiViewportP* CurrentViewport; @@ -2550,16 +2638,20 @@ struct ImGuiContext ImGuiViewportP* MouseLastHoveredViewport; ImGuiID PlatformLastFocusedViewportId; ImGuiPlatformMonitor FallbackMonitor; + ImRect PlatformMonitorsFullWorkRect; int ViewportCreatedCount; int PlatformWindowsCreatedCount; int ViewportFocusedStampCount; ImGuiWindow* NavWindow; ImGuiID NavId; ImGuiID NavFocusScopeId; + ImVector_ImGuiFocusScopeData NavFocusRoute; ImGuiID NavActivateId; ImGuiID NavActivateDownId; ImGuiID NavActivatePressedId; ImGuiActivateFlags NavActivateFlags; + ImGuiID NavHighlightActivatedId; + float NavHighlightActivatedTimer; ImGuiID NavJustMovedToId; ImGuiID NavJustMovedToFocusScopeId; ImGuiKeyChord NavJustMovedToKeyMods; @@ -2602,6 +2694,7 @@ struct ImGuiContext float NavWindowingTimer; float NavWindowingHighlightAlpha; bool NavWindowingToggleLayer; + ImGuiKey NavWindowingToggleKey; ImVec2 NavWindowingAccumDeltaPos; ImVec2 NavWindowingAccumDeltaSize; float DimBgRatio; @@ -2613,6 +2706,7 @@ struct ImGuiContext int DragDropMouseButton; ImGuiPayload DragDropPayload; ImRect DragDropTargetRect; + ImRect DragDropTargetClipRect; ImGuiID DragDropTargetId; ImGuiDragDropFlags DragDropAcceptFlags; float DragDropAcceptIdCurrRectSurface; @@ -2625,6 +2719,7 @@ struct ImGuiContext int ClipperTempDataStacked; ImVector_ImGuiListClipperData ClipperTempData; ImGuiTable* CurrentTable; + ImGuiID DebugBreakInTable; int TablesTempDataStacked; ImVector_ImGuiTableTempData TablesTempData; ImPool_ImGuiTable Tables; @@ -2647,6 +2742,8 @@ struct ImGuiContext ImGuiInputTextDeactivatedState InputTextDeactivatedState; ImFont InputTextPasswordFont; ImGuiID TempInputId; + int BeginMenuDepth; + int BeginComboDepth; ImGuiColorEditFlags ColorEditOptions; ImGuiID ColorEditCurrentID; ImGuiID ColorEditSavedID; @@ -2655,6 +2752,8 @@ struct ImGuiContext ImU32 ColorEditSavedColor; ImVec4 ColorPickerRef; ImGuiComboPreviewData ComboPreviewData; + ImRect WindowResizeBorderExpectedRect; + bool WindowResizeRelativeMode; float SliderGrabClickOffset; float SliderCurrentAccum; bool SliderCurrentAccumDirty; @@ -2697,14 +2796,20 @@ struct ImGuiContext ImGuiDebugLogFlags DebugLogFlags; ImGuiTextBuffer DebugLogBuf; ImGuiTextIndex DebugLogIndex; - ImU8 DebugLogClipperAutoDisableFrames; + ImGuiDebugLogFlags DebugLogAutoDisableFlags; + ImU8 DebugLogAutoDisableFrames; ImU8 DebugLocateFrames; + bool DebugBreakInLocateId; + ImGuiKeyChord DebugBreakKeyChord; ImS8 DebugBeginReturnValueCullDepth; bool DebugItemPickerActive; ImU8 DebugItemPickerMouseButton; ImGuiID DebugItemPickerBreakId; + float DebugFlashStyleColorTime; + ImVec4 DebugFlashStyleColorBackup; ImGuiMetricsConfig DebugMetricsConfig; - ImGuiStackTool DebugStackTool; + ImGuiIDStackTool DebugIDStackTool; + ImGuiDebugAllocInfo DebugAllocInfo; ImGuiDockNode* DebugHoveredDockNode; float FramerateSecPerFrame[60]; int FramerateSecPerFrameIdx; @@ -2714,6 +2819,7 @@ struct ImGuiContext int WantCaptureKeyboardNextFrame; int WantTextInputNextFrame; ImVector_char TempBuffer; + char TempKeychordName[64]; }; struct ImGuiWindowTempData { @@ -2749,6 +2855,7 @@ struct ImGuiWindowTempData int CurrentTableIdx; ImGuiLayoutType LayoutType; ImGuiLayoutType ParentLayoutType; + ImU32 ModalDimBgColor; float ItemWidth; float TextWrapPos; ImVector_float ItemWidthStack; @@ -2762,6 +2869,7 @@ struct ImGuiWindow char* Name; ImGuiID ID; ImGuiWindowFlags Flags, FlagsPreviousFrame; + ImGuiChildFlags ChildFlags; ImGuiWindowClass WindowClass; ImGuiViewportP* Viewport; ImGuiID ViewportId; @@ -2802,6 +2910,7 @@ struct ImGuiWindow bool IsFallbackWindow; bool IsExplicitChild; bool HasCloseButton; + signed char ResizeBorderHovered; signed char ResizeBorderHeld; short BeginCount; short BeginCountPreviousFrame; @@ -2810,7 +2919,6 @@ struct ImGuiWindow short FocusOrder; ImGuiID PopupId; ImS8 AutoFitFramesX, AutoFitFramesY; - ImS8 AutoFitChildAxises; bool AutoFitOnlyGrows; ImGuiDir AutoPosLastDirection; ImS8 HiddenFramesCanSkipItems; @@ -2848,7 +2956,8 @@ struct ImGuiWindow ImGuiWindow* RootWindowPopupTree; ImGuiWindow* RootWindowDockTree; ImGuiWindow* RootWindowForTitleBarHighlight; - ImGuiWindow* RootWindowForNav; ImGuiWindow* NavLastChildNavWindow; + ImGuiWindow* RootWindowForNav; + ImGuiWindow* ParentWindowForFocusRoute; ImGuiWindow* NavLastChildNavWindow; ImGuiID NavLastIds[ImGuiNavLayer_COUNT]; ImRect NavRectRel[ImGuiNavLayer_COUNT]; ImVec2 NavPreferredScoringPosRel[ImGuiNavLayer_COUNT]; @@ -2988,7 +3097,7 @@ struct ImGuiTableInstanceData { ImGuiID TableInstanceID; float LastOuterHeight; - float LastFirstRowHeight; + float LastTopHeadersRowHeight; float LastFrozenHeight; int HoveredRowLast; int HoveredRowNext; @@ -3050,6 +3159,8 @@ struct ImGuiTable float ResizedColumnNextWidth; float ResizeLockMinContentsX2; float RefScale; + float AngledHeadersHeight; + float AngledHeadersSlope; ImRect OuterRect; ImRect InnerRect; ImRect WorkRect; @@ -3072,8 +3183,10 @@ struct ImGuiTable ImGuiTableColumnIdx ColumnsEnabledCount; ImGuiTableColumnIdx ColumnsEnabledFixedCount; ImGuiTableColumnIdx DeclColumnsCount; + ImGuiTableColumnIdx AngledHeadersCount; ImGuiTableColumnIdx HoveredColumnBody; ImGuiTableColumnIdx HoveredColumnBorder; + ImGuiTableColumnIdx HighlightColumnHeader; ImGuiTableColumnIdx AutoFitSingleColumn; ImGuiTableColumnIdx ResizedColumn; ImGuiTableColumnIdx LastResizedColumn; @@ -3099,6 +3212,7 @@ struct ImGuiTable bool IsSortSpecsDirty; bool IsUsingHeaders; bool IsContextPopupOpen; + bool DisableDefaultContextMenu; bool IsSettingsRequestLoad; bool IsSettingsDirty; bool IsDefaultDisplayOrder; @@ -3106,6 +3220,8 @@ struct ImGuiTable bool IsResetDisplayOrderRequest; bool IsUnfrozenRows; bool IsDefaultSizingPolicy; + bool IsActiveIdAliveBeforeTable; + bool IsActiveIdInTable; bool HasScrollbarYCurr; bool HasScrollbarYPrev; bool MemoryCompacted; @@ -3114,7 +3230,8 @@ struct ImGuiTable struct ImGuiTableTempData { int TableIndex; - float LastTimeActive; ImVec2 UserOuterSize; + float LastTimeActive; + float AngledHeadersExtraWidth; ImVec2 UserOuterSize; ImDrawListSplitter DrawSplitter; ImRect HostBackupWorkRect; ImRect HostBackupParentWorkRect; ImVec2 HostBackupPrevLineSize; @@ -3184,6 +3301,7 @@ typedef ImVector ImVector_ImGuiColorMod; typedef ImVector ImVector_ImGuiContextHook; typedef ImVector ImVector_ImGuiDockNodeSettings; typedef ImVector ImVector_ImGuiDockRequest; +typedef ImVector ImVector_ImGuiFocusScopeData; typedef ImVector ImVector_ImGuiGroupData; typedef ImVector ImVector_ImGuiID; typedef ImVector ImVector_ImGuiInputEvent; @@ -3241,7 +3359,7 @@ CIMGUI_API ImDrawData* igGetDrawData(void); CIMGUI_API void igShowDemoWindow(bool* p_open); CIMGUI_API void igShowMetricsWindow(bool* p_open); CIMGUI_API void igShowDebugLogWindow(bool* p_open); -CIMGUI_API void igShowStackToolWindow(bool* p_open); +CIMGUI_API void igShowIDStackToolWindow(bool* p_open); CIMGUI_API void igShowAboutWindow(bool* p_open); CIMGUI_API void igShowStyleEditor(ImGuiStyle* ref); CIMGUI_API bool igShowStyleSelector(const char* label); @@ -3253,8 +3371,8 @@ CIMGUI_API void igStyleColorsLight(ImGuiStyle* dst); CIMGUI_API void igStyleColorsClassic(ImGuiStyle* dst); CIMGUI_API bool igBegin(const char* name,bool* p_open,ImGuiWindowFlags flags); CIMGUI_API void igEnd(void); -CIMGUI_API bool igBeginChild_Str(const char* str_id,const ImVec2 size,bool border,ImGuiWindowFlags flags); -CIMGUI_API bool igBeginChild_ID(ImGuiID id,const ImVec2 size,bool border,ImGuiWindowFlags flags); +CIMGUI_API bool igBeginChild_Str(const char* str_id,const ImVec2 size,ImGuiChildFlags child_flags,ImGuiWindowFlags window_flags); +CIMGUI_API bool igBeginChild_ID(ImGuiID id,const ImVec2 size,ImGuiChildFlags child_flags,ImGuiWindowFlags window_flags); CIMGUI_API void igEndChild(void); CIMGUI_API bool igIsWindowAppearing(void); CIMGUI_API bool igIsWindowCollapsed(void); @@ -3322,8 +3440,17 @@ CIMGUI_API float igGetFontSize(void); CIMGUI_API void igGetFontTexUvWhitePixel(ImVec2 *pOut); CIMGUI_API ImU32 igGetColorU32_Col(ImGuiCol idx,float alpha_mul); CIMGUI_API ImU32 igGetColorU32_Vec4(const ImVec4 col); -CIMGUI_API ImU32 igGetColorU32_U32(ImU32 col); +CIMGUI_API ImU32 igGetColorU32_U32(ImU32 col,float alpha_mul); CIMGUI_API const ImVec4* igGetStyleColorVec4(ImGuiCol idx); +CIMGUI_API void igGetCursorScreenPos(ImVec2 *pOut); +CIMGUI_API void igSetCursorScreenPos(const ImVec2 pos); +CIMGUI_API void igGetCursorPos(ImVec2 *pOut); +CIMGUI_API float igGetCursorPosX(void); +CIMGUI_API float igGetCursorPosY(void); +CIMGUI_API void igSetCursorPos(const ImVec2 local_pos); +CIMGUI_API void igSetCursorPosX(float local_x); +CIMGUI_API void igSetCursorPosY(float local_y); +CIMGUI_API void igGetCursorStartPos(ImVec2 *pOut); CIMGUI_API void igSeparator(void); CIMGUI_API void igSameLine(float offset_from_start_x,float spacing); CIMGUI_API void igNewLine(void); @@ -3333,15 +3460,6 @@ CIMGUI_API void igIndent(float indent_w); CIMGUI_API void igUnindent(float indent_w); CIMGUI_API void igBeginGroup(void); CIMGUI_API void igEndGroup(void); -CIMGUI_API void igGetCursorPos(ImVec2 *pOut); -CIMGUI_API float igGetCursorPosX(void); -CIMGUI_API float igGetCursorPosY(void); -CIMGUI_API void igSetCursorPos(const ImVec2 local_pos); -CIMGUI_API void igSetCursorPosX(float local_x); -CIMGUI_API void igSetCursorPosY(float local_y); -CIMGUI_API void igGetCursorStartPos(ImVec2 *pOut); -CIMGUI_API void igGetCursorScreenPos(ImVec2 *pOut); -CIMGUI_API void igSetCursorScreenPos(const ImVec2 pos); CIMGUI_API void igAlignTextToFramePadding(void); CIMGUI_API float igGetTextLineHeight(void); CIMGUI_API float igGetTextLineHeightWithSpacing(void); @@ -3380,8 +3498,8 @@ CIMGUI_API bool igRadioButton_Bool(const char* label,bool active); CIMGUI_API bool igRadioButton_IntPtr(const char* label,int* v,int v_button); CIMGUI_API void igProgressBar(float fraction,const ImVec2 size_arg,const char* overlay); CIMGUI_API void igBullet(void); -CIMGUI_API void igImage(ImTextureID user_texture_id,const ImVec2 size,const ImVec2 uv0,const ImVec2 uv1,const ImVec4 tint_col,const ImVec4 border_col); -CIMGUI_API bool igImageButton(const char* str_id,ImTextureID user_texture_id,const ImVec2 size,const ImVec2 uv0,const ImVec2 uv1,const ImVec4 bg_col,const ImVec4 tint_col); +CIMGUI_API void igImage(ImTextureID user_texture_id,const ImVec2 image_size,const ImVec2 uv0,const ImVec2 uv1,const ImVec4 tint_col,const ImVec4 border_col); +CIMGUI_API bool igImageButton(const char* str_id,ImTextureID user_texture_id,const ImVec2 image_size,const ImVec2 uv0,const ImVec2 uv1,const ImVec4 bg_col,const ImVec4 tint_col); CIMGUI_API bool igBeginCombo(const char* label,const char* preview_value,ImGuiComboFlags flags); CIMGUI_API void igEndCombo(void); CIMGUI_API bool igCombo_Str_arr(const char* label,int* current_item,const char* const items[],int items_count,int popup_max_height_in_items); @@ -3497,8 +3615,9 @@ CIMGUI_API bool igTableNextColumn(void); CIMGUI_API bool igTableSetColumnIndex(int column_n); CIMGUI_API void igTableSetupColumn(const char* label,ImGuiTableColumnFlags flags,float init_width_or_weight,ImGuiID user_id); CIMGUI_API void igTableSetupScrollFreeze(int cols,int rows); -CIMGUI_API void igTableHeadersRow(void); CIMGUI_API void igTableHeader(const char* label); +CIMGUI_API void igTableHeadersRow(void); +CIMGUI_API void igTableAngledHeadersRow(void); CIMGUI_API ImGuiTableSortSpecs* igTableGetSortSpecs(void); CIMGUI_API int igTableGetColumnCount(void); CIMGUI_API int igTableGetColumnIndex(void); @@ -3577,8 +3696,6 @@ CIMGUI_API ImDrawListSharedData* igGetDrawListSharedData(void); CIMGUI_API const char* igGetStyleColorName(ImGuiCol idx); CIMGUI_API void igSetStateStorage(ImGuiStorage* storage); CIMGUI_API ImGuiStorage* igGetStateStorage(void); -CIMGUI_API bool igBeginChildFrame(ImGuiID id,const ImVec2 size,ImGuiWindowFlags flags); -CIMGUI_API void igEndChildFrame(void); CIMGUI_API void igCalcTextSize(ImVec2 *pOut,const char* text,const char* text_end,bool hide_text_after_double_hash,float wrap_width); CIMGUI_API void igColorConvertU32ToFloat4(ImVec4 *pOut,ImU32 in); CIMGUI_API ImU32 igColorConvertFloat4ToU32(const ImVec4 in); @@ -3587,13 +3704,14 @@ CIMGUI_API void igColorConvertHSVtoRGB(float h,float s,float v,float* out_r,floa CIMGUI_API bool igIsKeyDown_Nil(ImGuiKey key); CIMGUI_API bool igIsKeyPressed_Bool(ImGuiKey key,bool repeat); CIMGUI_API bool igIsKeyReleased_Nil(ImGuiKey key); +CIMGUI_API bool igIsKeyChordPressed_Nil(ImGuiKeyChord key_chord); CIMGUI_API int igGetKeyPressedAmount(ImGuiKey key,float repeat_delay,float rate); CIMGUI_API const char* igGetKeyName(ImGuiKey key); CIMGUI_API void igSetNextFrameWantCaptureKeyboard(bool want_capture_keyboard); CIMGUI_API bool igIsMouseDown_Nil(ImGuiMouseButton button); CIMGUI_API bool igIsMouseClicked_Bool(ImGuiMouseButton button,bool repeat); CIMGUI_API bool igIsMouseReleased_Nil(ImGuiMouseButton button); -CIMGUI_API bool igIsMouseDoubleClicked(ImGuiMouseButton button); +CIMGUI_API bool igIsMouseDoubleClicked_Nil(ImGuiMouseButton button); CIMGUI_API int igGetMouseClickedCount(ImGuiMouseButton button); CIMGUI_API bool igIsMouseHoveringRect(const ImVec2 r_min,const ImVec2 r_max,bool clip); CIMGUI_API bool igIsMousePosValid(const ImVec2* mouse_pos); @@ -3613,6 +3731,8 @@ CIMGUI_API void igLoadIniSettingsFromMemory(const char* ini_data,size_t ini_size CIMGUI_API void igSaveIniSettingsToDisk(const char* ini_filename); CIMGUI_API const char* igSaveIniSettingsToMemory(size_t* out_ini_size); CIMGUI_API void igDebugTextEncoding(const char* text); +CIMGUI_API void igDebugFlashStyleColor(ImGuiCol idx); +CIMGUI_API void igDebugStartItemPicker(void); CIMGUI_API bool igDebugCheckVersionAndDataLayout(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); CIMGUI_API void igSetAllocatorFunctions(ImGuiMemAllocFunc alloc_func,ImGuiMemFreeFunc free_func,void* user_data); CIMGUI_API void igGetAllocatorFunctions(ImGuiMemAllocFunc* p_alloc_func,ImGuiMemFreeFunc* p_free_func,void** p_user_data); @@ -3624,6 +3744,10 @@ CIMGUI_API void igRenderPlatformWindowsDefault(void* platform_render_arg,void* r CIMGUI_API void igDestroyPlatformWindows(void); CIMGUI_API ImGuiViewport* igFindViewportByID(ImGuiID id); CIMGUI_API ImGuiViewport* igFindViewportByPlatformHandle(void* platform_handle); +CIMGUI_API ImGuiTableSortSpecs* ImGuiTableSortSpecs_ImGuiTableSortSpecs(void); +CIMGUI_API void ImGuiTableSortSpecs_destroy(ImGuiTableSortSpecs* self); +CIMGUI_API ImGuiTableColumnSortSpecs* ImGuiTableColumnSortSpecs_ImGuiTableColumnSortSpecs(void); +CIMGUI_API void ImGuiTableColumnSortSpecs_destroy(ImGuiTableColumnSortSpecs* self); CIMGUI_API ImGuiStyle* ImGuiStyle_ImGuiStyle(void); CIMGUI_API void ImGuiStyle_destroy(ImGuiStyle* self); CIMGUI_API void ImGuiStyle_ScaleAllSizes(ImGuiStyle* self,float scale_factor); @@ -3659,10 +3783,6 @@ CIMGUI_API void ImGuiPayload_Clear(ImGuiPayload* self); CIMGUI_API bool ImGuiPayload_IsDataType(ImGuiPayload* self,const char* type); CIMGUI_API bool ImGuiPayload_IsPreview(ImGuiPayload* self); CIMGUI_API bool ImGuiPayload_IsDelivery(ImGuiPayload* self); -CIMGUI_API ImGuiTableColumnSortSpecs* ImGuiTableColumnSortSpecs_ImGuiTableColumnSortSpecs(void); -CIMGUI_API void ImGuiTableColumnSortSpecs_destroy(ImGuiTableColumnSortSpecs* self); -CIMGUI_API ImGuiTableSortSpecs* ImGuiTableSortSpecs_ImGuiTableSortSpecs(void); -CIMGUI_API void ImGuiTableSortSpecs_destroy(ImGuiTableSortSpecs* self); CIMGUI_API ImGuiOnceUponAFrame* ImGuiOnceUponAFrame_ImGuiOnceUponAFrame(void); CIMGUI_API void ImGuiOnceUponAFrame_destroy(ImGuiOnceUponAFrame* self); CIMGUI_API ImGuiTextFilter* ImGuiTextFilter_ImGuiTextFilter(const char* default_filter); @@ -3688,10 +3808,10 @@ CIMGUI_API void ImGuiTextBuffer_reserve(ImGuiTextBuffer* self,int capacity); CIMGUI_API const char* ImGuiTextBuffer_c_str(ImGuiTextBuffer* self); CIMGUI_API void ImGuiTextBuffer_append(ImGuiTextBuffer* self,const char* str,const char* str_end); CIMGUI_API void ImGuiTextBuffer_appendfv(ImGuiTextBuffer* self,const char* fmt,va_list args); -CIMGUI_API ImGuiStoragePair* ImGuiStoragePair_ImGuiStoragePair_Int(ImGuiID _key,int _val_i); +CIMGUI_API ImGuiStoragePair* ImGuiStoragePair_ImGuiStoragePair_Int(ImGuiID _key,int _val); CIMGUI_API void ImGuiStoragePair_destroy(ImGuiStoragePair* self); -CIMGUI_API ImGuiStoragePair* ImGuiStoragePair_ImGuiStoragePair_Float(ImGuiID _key,float _val_f); -CIMGUI_API ImGuiStoragePair* ImGuiStoragePair_ImGuiStoragePair_Ptr(ImGuiID _key,void* _val_p); +CIMGUI_API ImGuiStoragePair* ImGuiStoragePair_ImGuiStoragePair_Float(ImGuiID _key,float _val); +CIMGUI_API ImGuiStoragePair* ImGuiStoragePair_ImGuiStoragePair_Ptr(ImGuiID _key,void* _val); CIMGUI_API void ImGuiStorage_Clear(ImGuiStorage* self); CIMGUI_API int ImGuiStorage_GetInt(ImGuiStorage* self,ImGuiID key,int default_val); CIMGUI_API void ImGuiStorage_SetInt(ImGuiStorage* self,ImGuiID key,int val); @@ -3705,8 +3825,8 @@ CIMGUI_API int* ImGuiStorage_GetIntRef(ImGuiStorage* self,ImGuiID key,int defaul CIMGUI_API bool* ImGuiStorage_GetBoolRef(ImGuiStorage* self,ImGuiID key,bool default_val); CIMGUI_API float* ImGuiStorage_GetFloatRef(ImGuiStorage* self,ImGuiID key,float default_val); CIMGUI_API void** ImGuiStorage_GetVoidPtrRef(ImGuiStorage* self,ImGuiID key,void* default_val); -CIMGUI_API void ImGuiStorage_SetAllInt(ImGuiStorage* self,int val); CIMGUI_API void ImGuiStorage_BuildSortByKey(ImGuiStorage* self); +CIMGUI_API void ImGuiStorage_SetAllInt(ImGuiStorage* self,int val); CIMGUI_API ImGuiListClipper* ImGuiListClipper_ImGuiListClipper(void); CIMGUI_API void ImGuiListClipper_destroy(ImGuiListClipper* self); CIMGUI_API void ImGuiListClipper_Begin(ImGuiListClipper* self,int items_count,float items_height); @@ -3946,10 +4066,10 @@ CIMGUI_API float igImSaturate(float f); CIMGUI_API float igImLengthSqr_Vec2(const ImVec2 lhs); CIMGUI_API float igImLengthSqr_Vec4(const ImVec4 lhs); CIMGUI_API float igImInvLength(const ImVec2 lhs,float fail_value); +CIMGUI_API float igImTrunc_Float(float f); +CIMGUI_API void igImTrunc_Vec2(ImVec2 *pOut,const ImVec2 v); CIMGUI_API float igImFloor_Float(float f); -CIMGUI_API float igImFloorSigned_Float(float f); CIMGUI_API void igImFloor_Vec2(ImVec2 *pOut,const ImVec2 v); -CIMGUI_API void igImFloorSigned_Vec2(ImVec2 *pOut,const ImVec2 v); CIMGUI_API int igImModPositive(int a,int b); CIMGUI_API float igImDot(const ImVec2 a,const ImVec2 b); CIMGUI_API void igImRotate(ImVec2 *pOut,const ImVec2 v,float cos_a,float sin_a); @@ -3989,6 +4109,7 @@ CIMGUI_API void ImRect_GetBL(ImVec2 *pOut,ImRect* self); CIMGUI_API void ImRect_GetBR(ImVec2 *pOut,ImRect* self); CIMGUI_API bool ImRect_Contains_Vec2(ImRect* self,const ImVec2 p); CIMGUI_API bool ImRect_Contains_Rect(ImRect* self,const ImRect r); +CIMGUI_API bool ImRect_ContainsWithPad(ImRect* self,const ImVec2 p,const ImVec2 pad); CIMGUI_API bool ImRect_Overlaps(ImRect* self,const ImRect r); CIMGUI_API void ImRect_Add_Vec2(ImRect* self,const ImVec2 p); CIMGUI_API void ImRect_Add_Rect(ImRect* self,const ImRect r); @@ -4023,7 +4144,6 @@ CIMGUI_API void ImDrawListSharedData_destroy(ImDrawListSharedData* self); CIMGUI_API void ImDrawListSharedData_SetCircleTessellationMaxError(ImDrawListSharedData* self,float max_error); CIMGUI_API ImDrawDataBuilder* ImDrawDataBuilder_ImDrawDataBuilder(void); CIMGUI_API void ImDrawDataBuilder_destroy(ImDrawDataBuilder* self); -CIMGUI_API void* ImGuiDataVarInfo_GetVarPtr(ImGuiDataVarInfo* self,void* parent); CIMGUI_API ImGuiStyleMod* ImGuiStyleMod_ImGuiStyleMod_Int(ImGuiStyleVar idx,int v); CIMGUI_API void ImGuiStyleMod_destroy(ImGuiStyleMod* self); CIMGUI_API ImGuiStyleMod* ImGuiStyleMod_ImGuiStyleMod_Float(ImGuiStyleVar idx,float v); @@ -4053,8 +4173,9 @@ CIMGUI_API int ImGuiInputTextState_GetCursorPos(ImGuiInputTextState* self); CIMGUI_API int ImGuiInputTextState_GetSelectionStart(ImGuiInputTextState* self); CIMGUI_API int ImGuiInputTextState_GetSelectionEnd(ImGuiInputTextState* self); CIMGUI_API void ImGuiInputTextState_SelectAll(ImGuiInputTextState* self); -CIMGUI_API ImGuiPopupData* ImGuiPopupData_ImGuiPopupData(void); -CIMGUI_API void ImGuiPopupData_destroy(ImGuiPopupData* self); +CIMGUI_API void ImGuiInputTextState_ReloadUserBufAndSelectAll(ImGuiInputTextState* self); +CIMGUI_API void ImGuiInputTextState_ReloadUserBufAndKeepSelection(ImGuiInputTextState* self); +CIMGUI_API void ImGuiInputTextState_ReloadUserBufAndMoveToEnd(ImGuiInputTextState* self); CIMGUI_API ImGuiNextWindowData* ImGuiNextWindowData_ImGuiNextWindowData(void); CIMGUI_API void ImGuiNextWindowData_destroy(ImGuiNextWindowData* self); CIMGUI_API void ImGuiNextWindowData_ClearFlags(ImGuiNextWindowData* self); @@ -4070,6 +4191,9 @@ CIMGUI_API void ImGuiStackSizes_CompareWithContextState(ImGuiStackSizes* self,Im CIMGUI_API ImGuiPtrOrIndex* ImGuiPtrOrIndex_ImGuiPtrOrIndex_Ptr(void* ptr); CIMGUI_API void ImGuiPtrOrIndex_destroy(ImGuiPtrOrIndex* self); CIMGUI_API ImGuiPtrOrIndex* ImGuiPtrOrIndex_ImGuiPtrOrIndex_Int(int index); +CIMGUI_API void* ImGuiDataVarInfo_GetVarPtr(ImGuiDataVarInfo* self,void* parent); +CIMGUI_API ImGuiPopupData* ImGuiPopupData_ImGuiPopupData(void); +CIMGUI_API void ImGuiPopupData_destroy(ImGuiPopupData* self); CIMGUI_API ImGuiInputEvent* ImGuiInputEvent_ImGuiInputEvent(void); CIMGUI_API void ImGuiInputEvent_destroy(ImGuiInputEvent* self); CIMGUI_API ImGuiKeyRoutingData* ImGuiKeyRoutingData_ImGuiKeyRoutingData(void); @@ -4124,10 +4248,12 @@ CIMGUI_API void ImGuiWindowSettings_destroy(ImGuiWindowSettings* self); CIMGUI_API char* ImGuiWindowSettings_GetName(ImGuiWindowSettings* self); CIMGUI_API ImGuiSettingsHandler* ImGuiSettingsHandler_ImGuiSettingsHandler(void); CIMGUI_API void ImGuiSettingsHandler_destroy(ImGuiSettingsHandler* self); +CIMGUI_API ImGuiDebugAllocInfo* ImGuiDebugAllocInfo_ImGuiDebugAllocInfo(void); +CIMGUI_API void ImGuiDebugAllocInfo_destroy(ImGuiDebugAllocInfo* self); CIMGUI_API ImGuiStackLevelInfo* ImGuiStackLevelInfo_ImGuiStackLevelInfo(void); CIMGUI_API void ImGuiStackLevelInfo_destroy(ImGuiStackLevelInfo* self); -CIMGUI_API ImGuiStackTool* ImGuiStackTool_ImGuiStackTool(void); -CIMGUI_API void ImGuiStackTool_destroy(ImGuiStackTool* self); +CIMGUI_API ImGuiIDStackTool* ImGuiIDStackTool_ImGuiIDStackTool(void); +CIMGUI_API void ImGuiIDStackTool_destroy(ImGuiIDStackTool* self); CIMGUI_API ImGuiContextHook* ImGuiContextHook_ImGuiContextHook(void); CIMGUI_API void ImGuiContextHook_destroy(ImGuiContextHook* self); CIMGUI_API ImGuiContext* ImGuiContext_ImGuiContext(ImFontAtlas* shared_font_atlas); @@ -4175,7 +4301,8 @@ CIMGUI_API void igSetWindowPos_WindowPtr(ImGuiWindow* window,const ImVec2 pos,Im CIMGUI_API void igSetWindowSize_WindowPtr(ImGuiWindow* window,const ImVec2 size,ImGuiCond cond); CIMGUI_API void igSetWindowCollapsed_WindowPtr(ImGuiWindow* window,bool collapsed,ImGuiCond cond); CIMGUI_API void igSetWindowHitTestHole(ImGuiWindow* window,const ImVec2 pos,const ImVec2 size); -CIMGUI_API void igSetWindowHiddendAndSkipItemsForCurrentFrame(ImGuiWindow* window); +CIMGUI_API void igSetWindowHiddenAndSkipItemsForCurrentFrame(ImGuiWindow* window); +CIMGUI_API void igSetWindowParentWindowForFocusRoute(ImGuiWindow* window,ImGuiWindow* parent_window); CIMGUI_API void igWindowRectAbsToRel(ImRect *pOut,ImGuiWindow* window,const ImRect r); CIMGUI_API void igWindowRectRelToAbs(ImRect *pOut,ImGuiWindow* window,const ImRect r); CIMGUI_API void igWindowPosRelToAbs(ImVec2 *pOut,ImGuiWindow* window,const ImVec2 p); @@ -4196,7 +4323,7 @@ CIMGUI_API void igShutdown(void); CIMGUI_API void igUpdateInputEvents(bool trickle_fast_inputs); CIMGUI_API void igUpdateHoveredWindowAndCaptureFlags(void); CIMGUI_API void igStartMouseMovingWindow(ImGuiWindow* window); -CIMGUI_API void igStartMouseMovingWindowOrNode(ImGuiWindow* window,ImGuiDockNode* node,bool undock_floating_node); +CIMGUI_API void igStartMouseMovingWindowOrNode(ImGuiWindow* window,ImGuiDockNode* node,bool undock); CIMGUI_API void igUpdateMouseMovingWindowNewFrame(void); CIMGUI_API void igUpdateMouseMovingWindowEndFrame(void); CIMGUI_API ImGuiID igAddContextHook(ImGuiContext* context,const ImGuiContextHook* hook); @@ -4263,7 +4390,7 @@ CIMGUI_API void igLogBegin(ImGuiLogType type,int auto_open_depth); CIMGUI_API void igLogToBuffer(int auto_open_depth); CIMGUI_API void igLogRenderedText(const ImVec2* ref_pos,const char* text,const char* text_end); CIMGUI_API void igLogSetNextTextDecoration(const char* prefix,const char* suffix); -CIMGUI_API bool igBeginChildEx(const char* name,ImGuiID id,const ImVec2 size_arg,bool border,ImGuiWindowFlags flags); +CIMGUI_API bool igBeginChildEx(const char* name,ImGuiID id,const ImVec2 size_arg,ImGuiChildFlags child_flags,ImGuiWindowFlags window_flags); CIMGUI_API void igOpenPopupEx(ImGuiID id,ImGuiPopupFlags popup_flags); CIMGUI_API void igClosePopupToLevel(int remaining,bool restore_focus_to_window_under_popup); CIMGUI_API void igClosePopupsOverWindow(ImGuiWindow* ref_window,bool restore_focus_to_window_under_popup); @@ -4271,6 +4398,7 @@ CIMGUI_API void igClosePopupsExceptModals(void); CIMGUI_API bool igIsPopupOpen_ID(ImGuiID id,ImGuiPopupFlags popup_flags); CIMGUI_API bool igBeginPopupEx(ImGuiID id,ImGuiWindowFlags extra_flags); CIMGUI_API bool igBeginTooltipEx(ImGuiTooltipFlags tooltip_flags,ImGuiWindowFlags extra_window_flags); +CIMGUI_API bool igBeginTooltipHidden(void); CIMGUI_API void igGetPopupAllowedExtentRect(ImRect *pOut,ImGuiWindow* window); CIMGUI_API ImGuiWindow* igGetTopMostPopupModal(void); CIMGUI_API ImGuiWindow* igGetTopMostAndVisiblePopupModal(void); @@ -4293,11 +4421,13 @@ CIMGUI_API void igNavMoveRequestResolveWithPastTreeNode(ImGuiNavItemData* result CIMGUI_API void igNavMoveRequestCancel(void); CIMGUI_API void igNavMoveRequestApplyResult(void); CIMGUI_API void igNavMoveRequestTryWrapping(ImGuiWindow* window,ImGuiNavMoveFlags move_flags); +CIMGUI_API void igNavHighlightActivated(ImGuiID id); CIMGUI_API void igNavClearPreferredPosForAxis(ImGuiAxis axis); CIMGUI_API void igNavRestoreHighlightAfterMove(void); CIMGUI_API void igNavUpdateCurrentWindowIsScrollPushableX(void); CIMGUI_API void igSetNavWindow(ImGuiWindow* window); CIMGUI_API void igSetNavID(ImGuiID id,ImGuiNavLayer nav_layer,ImGuiID focus_scope_id,const ImRect rect_rel); +CIMGUI_API void igSetNavFocusScope(ImGuiID focus_scope_id); CIMGUI_API void igFocusItem(void); CIMGUI_API void igActivateItemByID(ImGuiID id); CIMGUI_API bool igIsNamedKey(ImGuiKey key); @@ -4307,11 +4437,12 @@ CIMGUI_API bool igIsKeyboardKey(ImGuiKey key); CIMGUI_API bool igIsGamepadKey(ImGuiKey key); CIMGUI_API bool igIsMouseKey(ImGuiKey key); CIMGUI_API bool igIsAliasKey(ImGuiKey key); -CIMGUI_API ImGuiKeyChord igConvertShortcutMod(ImGuiKeyChord key_chord); +CIMGUI_API bool igIsModKey(ImGuiKey key); +CIMGUI_API ImGuiKeyChord igFixupKeyChord(ImGuiContext* ctx,ImGuiKeyChord key_chord); CIMGUI_API ImGuiKey igConvertSingleModFlagToKey(ImGuiContext* ctx,ImGuiKey key); CIMGUI_API ImGuiKeyData* igGetKeyData_ContextPtr(ImGuiContext* ctx,ImGuiKey key); CIMGUI_API ImGuiKeyData* igGetKeyData_Key(ImGuiKey key); -CIMGUI_API void igGetKeyChordName(ImGuiKeyChord key_chord,char* out_buf,int out_buf_size); +CIMGUI_API const char* igGetKeyChordName(ImGuiKeyChord key_chord); CIMGUI_API ImGuiKey igMouseButtonToKey(ImGuiMouseButton button); CIMGUI_API bool igIsMouseDragPastThreshold(ImGuiMouseButton button,float lock_threshold); CIMGUI_API void igGetKeyMagnitude2d(ImVec2 *pOut,ImGuiKey key_left,ImGuiKey key_right,ImGuiKey key_up,ImGuiKey key_down); @@ -4333,6 +4464,9 @@ CIMGUI_API bool igIsKeyReleased_ID(ImGuiKey key,ImGuiID owner_id); CIMGUI_API bool igIsMouseDown_ID(ImGuiMouseButton button,ImGuiID owner_id); CIMGUI_API bool igIsMouseClicked_ID(ImGuiMouseButton button,ImGuiID owner_id,ImGuiInputFlags flags); CIMGUI_API bool igIsMouseReleased_ID(ImGuiMouseButton button,ImGuiID owner_id); +CIMGUI_API bool igIsMouseDoubleClicked_ID(ImGuiMouseButton button,ImGuiID owner_id); +CIMGUI_API bool igIsKeyChordPressed_ID(ImGuiKeyChord key_chord,ImGuiID owner_id,ImGuiInputFlags flags); +CIMGUI_API void igSetNextItemShortcut(ImGuiKeyChord key_chord); CIMGUI_API bool igShortcut(ImGuiKeyChord key_chord,ImGuiID owner_id,ImGuiInputFlags flags); CIMGUI_API bool igSetShortcutRouting(ImGuiKeyChord key_chord,ImGuiID owner_id,ImGuiInputFlags flags); CIMGUI_API bool igTestShortcutRouting(ImGuiKeyChord key_chord,ImGuiID owner_id); @@ -4386,7 +4520,7 @@ CIMGUI_API bool igIsDragDropActive(void); CIMGUI_API bool igBeginDragDropTargetCustom(const ImRect bb,ImGuiID id); CIMGUI_API void igClearDragDrop(void); CIMGUI_API bool igIsDragDropPayloadBeingAccepted(void); -CIMGUI_API void igRenderDragDropTargetRect(const ImRect bb); +CIMGUI_API void igRenderDragDropTargetRect(const ImRect bb,const ImRect item_clip_rect); CIMGUI_API ImGuiTypingSelectRequest* igGetTypingSelectRequest(ImGuiTypingSelectFlags flags); CIMGUI_API int igTypingSelectFindMatch(ImGuiTypingSelectRequest* req,int items_count,const char*(*get_item_name_func)(void*,int),void* user_data,int nav_item_idx); CIMGUI_API int igTypingSelectFindNextSingleCharMatch(ImGuiTypingSelectRequest* req,int items_count,const char*(*get_item_name_func)(void*,int),void* user_data,int nav_item_idx); @@ -4407,8 +4541,10 @@ CIMGUI_API void igTableSetColumnSortDirection(int column_n,ImGuiSortDirection so CIMGUI_API int igTableGetHoveredColumn(void); CIMGUI_API int igTableGetHoveredRow(void); CIMGUI_API float igTableGetHeaderRowHeight(void); +CIMGUI_API float igTableGetHeaderAngledMaxLabelWidth(void); CIMGUI_API void igTablePushBackgroundChannel(void); CIMGUI_API void igTablePopBackgroundChannel(void); +CIMGUI_API void igTableAngledHeadersRowEx(float angle,float max_label_width); CIMGUI_API ImGuiTable* igGetCurrentTable(void); CIMGUI_API ImGuiTable* igTableFindByID(ImGuiID id); CIMGUI_API bool igBeginTableEx(const char* name,ImGuiID id,int columns_count,ImGuiTableFlags flags,const ImVec2 outer_size,float inner_width); @@ -4419,7 +4555,7 @@ CIMGUI_API void igTableUpdateLayout(ImGuiTable* table); CIMGUI_API void igTableUpdateBorders(ImGuiTable* table); CIMGUI_API void igTableUpdateColumnsWeightFromWidth(ImGuiTable* table); CIMGUI_API void igTableDrawBorders(ImGuiTable* table); -CIMGUI_API void igTableDrawContextMenu(ImGuiTable* table); +CIMGUI_API void igTableDrawDefaultContextMenu(ImGuiTable* table,ImGuiTableFlags flags_for_section_to_display); CIMGUI_API bool igTableBeginContextMenuPopup(ImGuiTable* table); CIMGUI_API void igTableMergeDrawChannels(ImGuiTable* table); CIMGUI_API ImGuiTableInstanceData* igTableGetInstanceData(ImGuiTable* table,int instance_no); @@ -4492,7 +4628,7 @@ CIMGUI_API ImDrawFlags igCalcRoundingFlagsForRectInRect(const ImRect r_in,const CIMGUI_API void igTextEx(const char* text,const char* text_end,ImGuiTextFlags flags); CIMGUI_API bool igButtonEx(const char* label,const ImVec2 size_arg,ImGuiButtonFlags flags); CIMGUI_API bool igArrowButtonEx(const char* str_id,ImGuiDir dir,ImVec2 size_arg,ImGuiButtonFlags flags); -CIMGUI_API bool igImageButtonEx(ImGuiID id,ImTextureID texture_id,const ImVec2 size,const ImVec2 uv0,const ImVec2 uv1,const ImVec4 bg_col,const ImVec4 tint_col,ImGuiButtonFlags flags); +CIMGUI_API bool igImageButtonEx(ImGuiID id,ImTextureID texture_id,const ImVec2 image_size,const ImVec2 uv0,const ImVec2 uv1,const ImVec4 bg_col,const ImVec4 tint_col,ImGuiButtonFlags flags); CIMGUI_API void igSeparatorEx(ImGuiSeparatorFlags flags,float thickness); CIMGUI_API void igSeparatorTextEx(ImGuiID id,const char* label,const char* label_end,float extra_width); CIMGUI_API bool igCheckboxFlags_S64Ptr(const char* label,ImS64* flags,ImS64 flags_value); @@ -4532,11 +4668,13 @@ CIMGUI_API void igColorPickerOptionsPopup(const float* ref_col,ImGuiColorEditFla CIMGUI_API int igPlotEx(ImGuiPlotType plot_type,const char* label,float(*values_getter)(void* data,int idx),void* data,int values_count,int values_offset,const char* overlay_text,float scale_min,float scale_max,const ImVec2 size_arg); CIMGUI_API void igShadeVertsLinearColorGradientKeepAlpha(ImDrawList* draw_list,int vert_start_idx,int vert_end_idx,ImVec2 gradient_p0,ImVec2 gradient_p1,ImU32 col0,ImU32 col1); CIMGUI_API void igShadeVertsLinearUV(ImDrawList* draw_list,int vert_start_idx,int vert_end_idx,const ImVec2 a,const ImVec2 b,const ImVec2 uv_a,const ImVec2 uv_b,bool clamp); +CIMGUI_API void igShadeVertsTransformPos(ImDrawList* draw_list,int vert_start_idx,int vert_end_idx,const ImVec2 pivot_in,float cos_a,float sin_a,const ImVec2 pivot_out); CIMGUI_API void igGcCompactTransientMiscBuffers(void); CIMGUI_API void igGcCompactTransientWindowBuffers(ImGuiWindow* window); CIMGUI_API void igGcAwakeTransientWindowBuffers(ImGuiWindow* window); CIMGUI_API void igDebugLog(const char* fmt,...); CIMGUI_API void igDebugLogV(const char* fmt,va_list args); +CIMGUI_API void igDebugAllocHook(ImGuiDebugAllocInfo* info,int frame_count,void* ptr,size_t size); CIMGUI_API void igErrorCheckEndFrameRecover(ImGuiErrorLogCallback log_callback,void* user_data); CIMGUI_API void igErrorCheckEndWindowRecover(ImGuiErrorLogCallback log_callback,void* user_data); CIMGUI_API void igErrorCheckUsingSetCursorPosToExtendParentBoundaries(void); @@ -4546,7 +4684,9 @@ CIMGUI_API void igDebugDrawItemRect(ImU32 col); CIMGUI_API void igDebugLocateItem(ImGuiID target_id); CIMGUI_API void igDebugLocateItemOnHover(ImGuiID target_id); CIMGUI_API void igDebugLocateItemResolveWithLastItem(void); -CIMGUI_API void igDebugStartItemPicker(void); +CIMGUI_API void igDebugBreakClearData(void); +CIMGUI_API bool igDebugBreakButton(const char* label,const char* description_of_location); +CIMGUI_API void igDebugBreakButtonTooltip(bool keyboard_only,const char* description_of_location); CIMGUI_API void igShowFontAtlas(ImFontAtlas* atlas); CIMGUI_API void igDebugHookIdInfo(ImGuiID id,ImGuiDataType data_type,const void* data_id,const void* data_id_end); CIMGUI_API void igDebugNodeColumns(ImGuiOldColumns* columns); @@ -4568,7 +4708,6 @@ CIMGUI_API void igDebugNodeWindowsListByBeginStackParent(ImGuiWindow** windows,i CIMGUI_API void igDebugNodeViewport(ImGuiViewportP* viewport); CIMGUI_API void igDebugRenderKeyboardPreview(ImDrawList* draw_list); CIMGUI_API void igDebugRenderViewportThumbnail(ImDrawList* draw_list,ImGuiViewportP* viewport,const ImRect bb); -CIMGUI_API bool igIsKeyPressedMap(ImGuiKey key,bool repeat); CIMGUI_API const ImFontBuilderIO* igImFontAtlasGetBuilderForStbTruetype(void); CIMGUI_API void igImFontAtlasUpdateConfigDataPointers(ImFontAtlas* atlas); CIMGUI_API void igImFontAtlasBuildInit(ImFontAtlas* atlas); diff --git a/cimgui/cimgui_impl.h b/cimgui/cimgui_impl.h index 8af49ad46..bdef2c02f 100644 --- a/cimgui/cimgui_impl.h +++ b/cimgui/cimgui_impl.h @@ -47,9 +47,12 @@ CIMGUI_API void ImGui_ImplOpenGL2_DestroyDeviceObjects(void); typedef struct SDL_Window SDL_Window; typedef struct SDL_Renderer SDL_Renderer; +typedef struct _SDL_GameController _SDL_GameController; struct SDL_Window; struct SDL_Renderer; -typedef union SDL_Event SDL_Event;CIMGUI_API bool ImGui_ImplSDL2_InitForOpenGL(SDL_Window* window,void* sdl_gl_context); +struct _SDL_GameController; +typedef union SDL_Event SDL_Event; +typedef enum { ImGui_ImplSDL2_GamepadMode_AutoFirst, ImGui_ImplSDL2_GamepadMode_AutoAll, ImGui_ImplSDL2_GamepadMode_Manual }ImGui_ImplSDL2_GamepadMode;CIMGUI_API bool ImGui_ImplSDL2_InitForOpenGL(SDL_Window* window,void* sdl_gl_context); CIMGUI_API bool ImGui_ImplSDL2_InitForVulkan(SDL_Window* window); CIMGUI_API bool ImGui_ImplSDL2_InitForD3D(SDL_Window* window); CIMGUI_API bool ImGui_ImplSDL2_InitForMetal(SDL_Window* window); @@ -58,5 +61,6 @@ CIMGUI_API bool ImGui_ImplSDL2_InitForOther(SDL_Window* window); CIMGUI_API void ImGui_ImplSDL2_Shutdown(void); CIMGUI_API void ImGui_ImplSDL2_NewFrame(void); CIMGUI_API bool ImGui_ImplSDL2_ProcessEvent(const SDL_Event* event); +CIMGUI_API void ImGui_ImplSDL2_SetGamepadMode(ImGui_ImplSDL2_GamepadMode mode,struct _SDL_GameController** manual_gamepads_array,int manual_gamepads_count); #endif diff --git a/cimgui/cimgui_templates/definitions.json b/cimgui/cimgui_templates/definitions.json index b3f557e52..eb7d36711 100644 --- a/cimgui/cimgui_templates/definitions.json +++ b/cimgui/cimgui_templates/definitions.json @@ -13,7 +13,7 @@ "cimguiname": "ImBitArray_ClearAllBits", "defaults": {}, "funcname": "ClearAllBits", - "location": "imgui_internal:600", + "location": "imgui_internal:601", "ov_cimguiname": "ImBitArray_ClearAllBits", "ret": "void", "signature": "()", @@ -39,7 +39,7 @@ "cimguiname": "ImBitArray_ClearBit", "defaults": {}, "funcname": "ClearBit", - "location": "imgui_internal:604", + "location": "imgui_internal:605", "ov_cimguiname": "ImBitArray_ClearBit", "ret": "void", "signature": "(int)", @@ -57,7 +57,7 @@ "constructor": true, "defaults": {}, "funcname": "ImBitArray", - "location": "imgui_internal:599", + "location": "imgui_internal:600", "ov_cimguiname": "ImBitArray_ImBitArray", "signature": "()", "stname": "ImBitArray", @@ -78,7 +78,7 @@ "cimguiname": "ImBitArray_SetAllBits", "defaults": {}, "funcname": "SetAllBits", - "location": "imgui_internal:601", + "location": "imgui_internal:602", "ov_cimguiname": "ImBitArray_SetAllBits", "ret": "void", "signature": "()", @@ -104,7 +104,7 @@ "cimguiname": "ImBitArray_SetBit", "defaults": {}, "funcname": "SetBit", - "location": "imgui_internal:603", + "location": "imgui_internal:604", "ov_cimguiname": "ImBitArray_SetBit", "ret": "void", "signature": "(int)", @@ -135,7 +135,7 @@ "comment": "// Works on range [n..n2)", "defaults": {}, "funcname": "SetBitRange", - "location": "imgui_internal:605", + "location": "imgui_internal:606", "ov_cimguiname": "ImBitArray_SetBitRange", "ret": "void", "signature": "(int,int)", @@ -161,7 +161,7 @@ "cimguiname": "ImBitArray_TestBit", "defaults": {}, "funcname": "TestBit", - "location": "imgui_internal:602", + "location": "imgui_internal:603", "ov_cimguiname": "ImBitArray_TestBit", "ret": "bool", "signature": "(int)const", @@ -203,7 +203,7 @@ "cimguiname": "ImBitVector_Clear", "defaults": {}, "funcname": "Clear", - "location": "imgui_internal:615", + "location": "imgui_internal:616", "ov_cimguiname": "ImBitVector_Clear", "ret": "void", "signature": "()", @@ -228,7 +228,7 @@ "cimguiname": "ImBitVector_ClearBit", "defaults": {}, "funcname": "ClearBit", - "location": "imgui_internal:618", + "location": "imgui_internal:619", "ov_cimguiname": "ImBitVector_ClearBit", "ret": "void", "signature": "(int)", @@ -253,7 +253,7 @@ "cimguiname": "ImBitVector_Create", "defaults": {}, "funcname": "Create", - "location": "imgui_internal:614", + "location": "imgui_internal:615", "ov_cimguiname": "ImBitVector_Create", "ret": "void", "signature": "(int)", @@ -278,7 +278,7 @@ "cimguiname": "ImBitVector_SetBit", "defaults": {}, "funcname": "SetBit", - "location": "imgui_internal:617", + "location": "imgui_internal:618", "ov_cimguiname": "ImBitVector_SetBit", "ret": "void", "signature": "(int)", @@ -303,7 +303,7 @@ "cimguiname": "ImBitVector_TestBit", "defaults": {}, "funcname": "TestBit", - "location": "imgui_internal:616", + "location": "imgui_internal:617", "ov_cimguiname": "ImBitVector_TestBit", "ret": "bool", "signature": "(int)const", @@ -328,7 +328,7 @@ "cimguiname": "ImChunkStream_alloc_chunk", "defaults": {}, "funcname": "alloc_chunk", - "location": "imgui_internal:722", + "location": "imgui_internal:720", "ov_cimguiname": "ImChunkStream_alloc_chunk", "ret": "T*", "signature": "(size_t)", @@ -350,7 +350,7 @@ "cimguiname": "ImChunkStream_begin", "defaults": {}, "funcname": "begin", - "location": "imgui_internal:723", + "location": "imgui_internal:721", "ov_cimguiname": "ImChunkStream_begin", "ret": "T*", "signature": "()", @@ -376,7 +376,7 @@ "cimguiname": "ImChunkStream_chunk_size", "defaults": {}, "funcname": "chunk_size", - "location": "imgui_internal:725", + "location": "imgui_internal:723", "ov_cimguiname": "ImChunkStream_chunk_size", "ret": "int", "signature": "(const T*)", @@ -398,7 +398,7 @@ "cimguiname": "ImChunkStream_clear", "defaults": {}, "funcname": "clear", - "location": "imgui_internal:719", + "location": "imgui_internal:717", "ov_cimguiname": "ImChunkStream_clear", "ret": "void", "signature": "()", @@ -420,7 +420,7 @@ "cimguiname": "ImChunkStream_empty", "defaults": {}, "funcname": "empty", - "location": "imgui_internal:720", + "location": "imgui_internal:718", "ov_cimguiname": "ImChunkStream_empty", "ret": "bool", "signature": "()const", @@ -442,7 +442,7 @@ "cimguiname": "ImChunkStream_end", "defaults": {}, "funcname": "end", - "location": "imgui_internal:726", + "location": "imgui_internal:724", "ov_cimguiname": "ImChunkStream_end", "ret": "T*", "signature": "()", @@ -468,7 +468,7 @@ "cimguiname": "ImChunkStream_next_chunk", "defaults": {}, "funcname": "next_chunk", - "location": "imgui_internal:724", + "location": "imgui_internal:722", "ov_cimguiname": "ImChunkStream_next_chunk", "ret": "T*", "signature": "(T*)", @@ -494,7 +494,7 @@ "cimguiname": "ImChunkStream_offset_from_ptr", "defaults": {}, "funcname": "offset_from_ptr", - "location": "imgui_internal:727", + "location": "imgui_internal:725", "ov_cimguiname": "ImChunkStream_offset_from_ptr", "ret": "int", "signature": "(const T*)", @@ -520,7 +520,7 @@ "cimguiname": "ImChunkStream_ptr_from_offset", "defaults": {}, "funcname": "ptr_from_offset", - "location": "imgui_internal:728", + "location": "imgui_internal:726", "ov_cimguiname": "ImChunkStream_ptr_from_offset", "ret": "T*", "signature": "(int)", @@ -542,7 +542,7 @@ "cimguiname": "ImChunkStream_size", "defaults": {}, "funcname": "size", - "location": "imgui_internal:721", + "location": "imgui_internal:719", "ov_cimguiname": "ImChunkStream_size", "ret": "int", "signature": "()const", @@ -569,7 +569,7 @@ "cimguiname": "ImChunkStream_swap", "defaults": {}, "funcname": "swap", - "location": "imgui_internal:729", + "location": "imgui_internal:727", "ov_cimguiname": "ImChunkStream_swap", "ret": "void", "signature": "(ImChunkStream_T *)", @@ -610,7 +610,7 @@ }, "funcname": "HSV", "is_static_function": true, - "location": "imgui:2606", + "location": "imgui:2678", "nonUDT": 1, "ov_cimguiname": "ImColor_HSV", "ret": "void", @@ -628,7 +628,7 @@ "constructor": true, "defaults": {}, "funcname": "ImColor", - "location": "imgui:2596", + "location": "imgui:2668", "ov_cimguiname": "ImColor_ImColor_Nil", "signature": "()", "stname": "ImColor" @@ -661,7 +661,7 @@ "a": "1.0f" }, "funcname": "ImColor", - "location": "imgui:2597", + "location": "imgui:2669", "ov_cimguiname": "ImColor_ImColor_Float", "signature": "(float,float,float,float)", "stname": "ImColor" @@ -680,7 +680,7 @@ "constructor": true, "defaults": {}, "funcname": "ImColor", - "location": "imgui:2598", + "location": "imgui:2670", "ov_cimguiname": "ImColor_ImColor_Vec4", "signature": "(const ImVec4)", "stname": "ImColor" @@ -713,7 +713,7 @@ "a": "255" }, "funcname": "ImColor", - "location": "imgui:2599", + "location": "imgui:2671", "ov_cimguiname": "ImColor_ImColor_Int", "signature": "(int,int,int,int)", "stname": "ImColor" @@ -732,7 +732,7 @@ "constructor": true, "defaults": {}, "funcname": "ImColor", - "location": "imgui:2600", + "location": "imgui:2672", "ov_cimguiname": "ImColor_ImColor_U32", "signature": "(ImU32)", "stname": "ImColor" @@ -770,7 +770,7 @@ "a": "1.0f" }, "funcname": "SetHSV", - "location": "imgui:2605", + "location": "imgui:2677", "ov_cimguiname": "ImColor_SetHSV", "ret": "void", "signature": "(float,float,float,float)", @@ -810,7 +810,7 @@ "cimguiname": "ImDrawCmd_GetTexID", "defaults": {}, "funcname": "GetTexID", - "location": "imgui:2654", + "location": "imgui:2726", "ov_cimguiname": "ImDrawCmd_GetTexID", "ret": "ImTextureID", "signature": "()const", @@ -828,7 +828,7 @@ "constructor": true, "defaults": {}, "funcname": "ImDrawCmd", - "location": "imgui:2651", + "location": "imgui:2723", "ov_cimguiname": "ImDrawCmd_ImDrawCmd", "signature": "()", "stname": "ImDrawCmd" @@ -863,7 +863,7 @@ "constructor": true, "defaults": {}, "funcname": "ImDrawDataBuilder", - "location": "imgui_internal:806", + "location": "imgui_internal:803", "ov_cimguiname": "ImDrawDataBuilder_ImDrawDataBuilder", "signature": "()", "stname": "ImDrawDataBuilder" @@ -907,7 +907,7 @@ "comment": "// Helper to add an external draw list into an existing ImDrawData.", "defaults": {}, "funcname": "AddDrawList", - "location": "imgui:2891", + "location": "imgui:2964", "ov_cimguiname": "ImDrawData_AddDrawList", "ret": "void", "signature": "(ImDrawList*)", @@ -928,7 +928,7 @@ "cimguiname": "ImDrawData_Clear", "defaults": {}, "funcname": "Clear", - "location": "imgui:2890", + "location": "imgui:2963", "ov_cimguiname": "ImDrawData_Clear", "ret": "void", "signature": "()", @@ -950,7 +950,7 @@ "comment": "// Helper to convert all buffers from indexed to non-indexed, in case you cannot render indexed. Note: this is slow and most likely a waste of resources. Always prefer indexed rendering!", "defaults": {}, "funcname": "DeIndexAllBuffers", - "location": "imgui:2892", + "location": "imgui:2965", "ov_cimguiname": "ImDrawData_DeIndexAllBuffers", "ret": "void", "signature": "()", @@ -967,7 +967,7 @@ "constructor": true, "defaults": {}, "funcname": "ImDrawData", - "location": "imgui:2889", + "location": "imgui:2962", "ov_cimguiname": "ImDrawData_ImDrawData", "signature": "()", "stname": "ImDrawData" @@ -992,7 +992,7 @@ "comment": "// Helper to scale the ClipRect field of each ImDrawCmd. Use if your final output buffer is at a different scale than Dear ImGui expects, or if there is a difference between your window resolution and framebuffer resolution.", "defaults": {}, "funcname": "ScaleClipRects", - "location": "imgui:2893", + "location": "imgui:2966", "ov_cimguiname": "ImDrawData_ScaleClipRects", "ret": "void", "signature": "(const ImVec2)", @@ -1028,7 +1028,7 @@ "constructor": true, "defaults": {}, "funcname": "ImDrawListSharedData", - "location": "imgui_internal:797", + "location": "imgui_internal:794", "ov_cimguiname": "ImDrawListSharedData_ImDrawListSharedData", "signature": "()", "stname": "ImDrawListSharedData" @@ -1052,7 +1052,7 @@ "cimguiname": "ImDrawListSharedData_SetCircleTessellationMaxError", "defaults": {}, "funcname": "SetCircleTessellationMaxError", - "location": "imgui_internal:798", + "location": "imgui_internal:795", "ov_cimguiname": "ImDrawListSharedData_SetCircleTessellationMaxError", "ret": "void", "signature": "(float)", @@ -1093,7 +1093,7 @@ "comment": "// Do not clear Channels[] so our allocations are reused next frame", "defaults": {}, "funcname": "Clear", - "location": "imgui:2699", + "location": "imgui:2771", "ov_cimguiname": "ImDrawListSplitter_Clear", "ret": "void", "signature": "()", @@ -1114,7 +1114,7 @@ "cimguiname": "ImDrawListSplitter_ClearFreeMemory", "defaults": {}, "funcname": "ClearFreeMemory", - "location": "imgui:2700", + "location": "imgui:2772", "ov_cimguiname": "ImDrawListSplitter_ClearFreeMemory", "ret": "void", "signature": "()", @@ -1131,7 +1131,7 @@ "constructor": true, "defaults": {}, "funcname": "ImDrawListSplitter", - "location": "imgui:2697", + "location": "imgui:2769", "ov_cimguiname": "ImDrawListSplitter_ImDrawListSplitter", "signature": "()", "stname": "ImDrawListSplitter" @@ -1155,7 +1155,7 @@ "cimguiname": "ImDrawListSplitter_Merge", "defaults": {}, "funcname": "Merge", - "location": "imgui:2702", + "location": "imgui:2774", "ov_cimguiname": "ImDrawListSplitter_Merge", "ret": "void", "signature": "(ImDrawList*)", @@ -1184,7 +1184,7 @@ "cimguiname": "ImDrawListSplitter_SetCurrentChannel", "defaults": {}, "funcname": "SetCurrentChannel", - "location": "imgui:2703", + "location": "imgui:2775", "ov_cimguiname": "ImDrawListSplitter_SetCurrentChannel", "ret": "void", "signature": "(ImDrawList*,int)", @@ -1213,7 +1213,7 @@ "cimguiname": "ImDrawListSplitter_Split", "defaults": {}, "funcname": "Split", - "location": "imgui:2701", + "location": "imgui:2773", "ov_cimguiname": "ImDrawListSplitter_Split", "ret": "void", "signature": "(ImDrawList*,int)", @@ -1233,7 +1233,7 @@ "cimguiname": "ImDrawListSplitter_destroy", "defaults": {}, "destructor": true, - "location": "imgui:2698", + "location": "imgui:2770", "ov_cimguiname": "ImDrawListSplitter_destroy", "realdestructor": true, "ret": "void", @@ -1286,7 +1286,7 @@ "num_segments": "0" }, "funcname": "AddBezierCubic", - "location": "imgui:2804", + "location": "imgui:2876", "ov_cimguiname": "ImDrawList_AddBezierCubic", "ret": "void", "signature": "(const ImVec2,const ImVec2,const ImVec2,const ImVec2,ImU32,float,int)", @@ -1334,7 +1334,7 @@ "num_segments": "0" }, "funcname": "AddBezierQuadratic", - "location": "imgui:2805", + "location": "imgui:2877", "ov_cimguiname": "ImDrawList_AddBezierQuadratic", "ret": "void", "signature": "(const ImVec2,const ImVec2,const ImVec2,ImU32,float,int)", @@ -1364,7 +1364,7 @@ "comment": "// Your rendering function must check for 'UserCallback' in ImDrawCmd and call the function instead of rendering triangles.", "defaults": {}, "funcname": "AddCallback", - "location": "imgui:2830", + "location": "imgui:2903", "ov_cimguiname": "ImDrawList_AddCallback", "ret": "void", "signature": "(ImDrawCallback,void*)", @@ -1408,7 +1408,7 @@ "thickness": "1.0f" }, "funcname": "AddCircle", - "location": "imgui:2794", + "location": "imgui:2866", "ov_cimguiname": "ImDrawList_AddCircle", "ret": "void", "signature": "(const ImVec2,float,ImU32,int,float)", @@ -1447,7 +1447,7 @@ "num_segments": "0" }, "funcname": "AddCircleFilled", - "location": "imgui:2795", + "location": "imgui:2867", "ov_cimguiname": "ImDrawList_AddCircleFilled", "ret": "void", "signature": "(const ImVec2,float,ImU32,int)", @@ -1480,7 +1480,7 @@ "cimguiname": "ImDrawList_AddConvexPolyFilled", "defaults": {}, "funcname": "AddConvexPolyFilled", - "location": "imgui:2803", + "location": "imgui:2875", "ov_cimguiname": "ImDrawList_AddConvexPolyFilled", "ret": "void", "signature": "(const ImVec2*,int,ImU32)", @@ -1502,7 +1502,7 @@ "comment": "// This is useful if you need to forcefully create a new draw call (to allow for dependent rendering / blending). Otherwise primitives are merged into the same draw-call as much as possible", "defaults": {}, "funcname": "AddDrawCmd", - "location": "imgui:2831", + "location": "imgui:2904", "ov_cimguiname": "ImDrawList_AddDrawCmd", "ret": "void", "signature": "()", @@ -1555,7 +1555,7 @@ "thickness": "1.0f" }, "funcname": "AddEllipse", - "location": "imgui:2798", + "location": "imgui:2870", "ov_cimguiname": "ImDrawList_AddEllipse", "ret": "void", "signature": "(const ImVec2,float,float,ImU32,float,int,float)", @@ -1603,7 +1603,7 @@ "rot": "0.0f" }, "funcname": "AddEllipseFilled", - "location": "imgui:2799", + "location": "imgui:2871", "ov_cimguiname": "ImDrawList_AddEllipseFilled", "ret": "void", "signature": "(const ImVec2,float,float,ImU32,float,int)", @@ -1652,7 +1652,7 @@ "uv_min": "ImVec2(0,0)" }, "funcname": "AddImage", - "location": "imgui:2811", + "location": "imgui:2883", "ov_cimguiname": "ImDrawList_AddImage", "ret": "void", "signature": "(ImTextureID,const ImVec2,const ImVec2,const ImVec2,const ImVec2,ImU32)", @@ -1719,7 +1719,7 @@ "uv4": "ImVec2(0,1)" }, "funcname": "AddImageQuad", - "location": "imgui:2812", + "location": "imgui:2884", "ov_cimguiname": "ImDrawList_AddImageQuad", "ret": "void", "signature": "(ImTextureID,const ImVec2,const ImVec2,const ImVec2,const ImVec2,const ImVec2,const ImVec2,const ImVec2,const ImVec2,ImU32)", @@ -1774,7 +1774,7 @@ "flags": "0" }, "funcname": "AddImageRounded", - "location": "imgui:2813", + "location": "imgui:2885", "ov_cimguiname": "ImDrawList_AddImageRounded", "ret": "void", "signature": "(ImTextureID,const ImVec2,const ImVec2,const ImVec2,const ImVec2,ImU32,float,ImDrawFlags)", @@ -1813,7 +1813,7 @@ "thickness": "1.0f" }, "funcname": "AddLine", - "location": "imgui:2786", + "location": "imgui:2858", "ov_cimguiname": "ImDrawList_AddLine", "ret": "void", "signature": "(const ImVec2,const ImVec2,ImU32,float)", @@ -1856,7 +1856,7 @@ "thickness": "1.0f" }, "funcname": "AddNgon", - "location": "imgui:2796", + "location": "imgui:2868", "ov_cimguiname": "ImDrawList_AddNgon", "ret": "void", "signature": "(const ImVec2,float,ImU32,int,float)", @@ -1893,7 +1893,7 @@ "cimguiname": "ImDrawList_AddNgonFilled", "defaults": {}, "funcname": "AddNgonFilled", - "location": "imgui:2797", + "location": "imgui:2869", "ov_cimguiname": "ImDrawList_AddNgonFilled", "ret": "void", "signature": "(const ImVec2,float,ImU32,int)", @@ -1934,7 +1934,7 @@ "cimguiname": "ImDrawList_AddPolyline", "defaults": {}, "funcname": "AddPolyline", - "location": "imgui:2802", + "location": "imgui:2874", "ov_cimguiname": "ImDrawList_AddPolyline", "ret": "void", "signature": "(const ImVec2*,int,ImU32,ImDrawFlags,float)", @@ -1981,7 +1981,7 @@ "thickness": "1.0f" }, "funcname": "AddQuad", - "location": "imgui:2790", + "location": "imgui:2862", "ov_cimguiname": "ImDrawList_AddQuad", "ret": "void", "signature": "(const ImVec2,const ImVec2,const ImVec2,const ImVec2,ImU32,float)", @@ -2022,7 +2022,7 @@ "cimguiname": "ImDrawList_AddQuadFilled", "defaults": {}, "funcname": "AddQuadFilled", - "location": "imgui:2791", + "location": "imgui:2863", "ov_cimguiname": "ImDrawList_AddQuadFilled", "ret": "void", "signature": "(const ImVec2,const ImVec2,const ImVec2,const ImVec2,ImU32)", @@ -2072,7 +2072,7 @@ "thickness": "1.0f" }, "funcname": "AddRect", - "location": "imgui:2787", + "location": "imgui:2859", "ov_cimguiname": "ImDrawList_AddRect", "ret": "void", "signature": "(const ImVec2,const ImVec2,ImU32,float,ImDrawFlags,float)", @@ -2117,7 +2117,7 @@ "rounding": "0.0f" }, "funcname": "AddRectFilled", - "location": "imgui:2788", + "location": "imgui:2860", "ov_cimguiname": "ImDrawList_AddRectFilled", "ret": "void", "signature": "(const ImVec2,const ImVec2,ImU32,float,ImDrawFlags)", @@ -2162,7 +2162,7 @@ "cimguiname": "ImDrawList_AddRectFilledMultiColor", "defaults": {}, "funcname": "AddRectFilledMultiColor", - "location": "imgui:2789", + "location": "imgui:2861", "ov_cimguiname": "ImDrawList_AddRectFilledMultiColor", "ret": "void", "signature": "(const ImVec2,const ImVec2,ImU32,ImU32,ImU32,ImU32)", @@ -2201,7 +2201,7 @@ "text_end": "NULL" }, "funcname": "AddText", - "location": "imgui:2800", + "location": "imgui:2872", "ov_cimguiname": "ImDrawList_AddText_Vec2", "ret": "void", "signature": "(const ImVec2,ImU32,const char*,const char*)", @@ -2256,7 +2256,7 @@ "wrap_width": "0.0f" }, "funcname": "AddText", - "location": "imgui:2801", + "location": "imgui:2873", "ov_cimguiname": "ImDrawList_AddText_FontPtr", "ret": "void", "signature": "(const ImFont*,float,const ImVec2,ImU32,const char*,const char*,float,const ImVec4*)", @@ -2299,7 +2299,7 @@ "thickness": "1.0f" }, "funcname": "AddTriangle", - "location": "imgui:2792", + "location": "imgui:2864", "ov_cimguiname": "ImDrawList_AddTriangle", "ret": "void", "signature": "(const ImVec2,const ImVec2,const ImVec2,ImU32,float)", @@ -2336,7 +2336,7 @@ "cimguiname": "ImDrawList_AddTriangleFilled", "defaults": {}, "funcname": "AddTriangleFilled", - "location": "imgui:2793", + "location": "imgui:2865", "ov_cimguiname": "ImDrawList_AddTriangleFilled", "ret": "void", "signature": "(const ImVec2,const ImVec2,const ImVec2,ImU32)", @@ -2357,7 +2357,7 @@ "cimguiname": "ImDrawList_ChannelsMerge", "defaults": {}, "funcname": "ChannelsMerge", - "location": "imgui:2841", + "location": "imgui:2914", "ov_cimguiname": "ImDrawList_ChannelsMerge", "ret": "void", "signature": "()", @@ -2382,7 +2382,7 @@ "cimguiname": "ImDrawList_ChannelsSetCurrent", "defaults": {}, "funcname": "ChannelsSetCurrent", - "location": "imgui:2842", + "location": "imgui:2915", "ov_cimguiname": "ImDrawList_ChannelsSetCurrent", "ret": "void", "signature": "(int)", @@ -2407,7 +2407,7 @@ "cimguiname": "ImDrawList_ChannelsSplit", "defaults": {}, "funcname": "ChannelsSplit", - "location": "imgui:2840", + "location": "imgui:2913", "ov_cimguiname": "ImDrawList_ChannelsSplit", "ret": "void", "signature": "(int)", @@ -2429,7 +2429,7 @@ "comment": "// Create a clone of the CmdBuffer/IdxBuffer/VtxBuffer.", "defaults": {}, "funcname": "CloneOutput", - "location": "imgui:2832", + "location": "imgui:2905", "ov_cimguiname": "ImDrawList_CloneOutput", "ret": "ImDrawList*", "signature": "()const", @@ -2454,7 +2454,7 @@ "cimguiname": "ImDrawList_GetClipRectMax", "defaults": {}, "funcname": "GetClipRectMax", - "location": "imgui:2777", + "location": "imgui:2849", "nonUDT": 1, "ov_cimguiname": "ImDrawList_GetClipRectMax", "ret": "void", @@ -2480,7 +2480,7 @@ "cimguiname": "ImDrawList_GetClipRectMin", "defaults": {}, "funcname": "GetClipRectMin", - "location": "imgui:2776", + "location": "imgui:2848", "nonUDT": 1, "ov_cimguiname": "ImDrawList_GetClipRectMin", "ret": "void", @@ -2503,7 +2503,7 @@ "constructor": true, "defaults": {}, "funcname": "ImDrawList", - "location": "imgui:2768", + "location": "imgui:2840", "ov_cimguiname": "ImDrawList_ImDrawList", "signature": "(ImDrawListSharedData*)", "stname": "ImDrawList" @@ -2545,7 +2545,7 @@ "num_segments": "0" }, "funcname": "PathArcTo", - "location": "imgui:2822", + "location": "imgui:2895", "ov_cimguiname": "ImDrawList_PathArcTo", "ret": "void", "signature": "(const ImVec2,float,float,float,int)", @@ -2583,7 +2583,7 @@ "comment": "// Use precomputed angles for a 12 steps circle", "defaults": {}, "funcname": "PathArcToFast", - "location": "imgui:2823", + "location": "imgui:2896", "ov_cimguiname": "ImDrawList_PathArcToFast", "ret": "void", "signature": "(const ImVec2,float,int,int)", @@ -2623,7 +2623,7 @@ "num_segments": "0" }, "funcname": "PathBezierCubicCurveTo", - "location": "imgui:2825", + "location": "imgui:2898", "ov_cimguiname": "ImDrawList_PathBezierCubicCurveTo", "ret": "void", "signature": "(const ImVec2,const ImVec2,const ImVec2,int)", @@ -2659,7 +2659,7 @@ "num_segments": "0" }, "funcname": "PathBezierQuadraticCurveTo", - "location": "imgui:2826", + "location": "imgui:2899", "ov_cimguiname": "ImDrawList_PathBezierQuadraticCurveTo", "ret": "void", "signature": "(const ImVec2,const ImVec2,int)", @@ -2680,7 +2680,7 @@ "cimguiname": "ImDrawList_PathClear", "defaults": {}, "funcname": "PathClear", - "location": "imgui:2817", + "location": "imgui:2890", "ov_cimguiname": "ImDrawList_PathClear", "ret": "void", "signature": "()", @@ -2732,7 +2732,7 @@ "num_segments": "0" }, "funcname": "PathEllipticalArcTo", - "location": "imgui:2824", + "location": "imgui:2897", "ov_cimguiname": "ImDrawList_PathEllipticalArcTo", "ret": "void", "signature": "(const ImVec2,float,float,float,float,float,int)", @@ -2757,7 +2757,7 @@ "cimguiname": "ImDrawList_PathFillConvex", "defaults": {}, "funcname": "PathFillConvex", - "location": "imgui:2820", + "location": "imgui:2893", "ov_cimguiname": "ImDrawList_PathFillConvex", "ret": "void", "signature": "(ImU32)", @@ -2782,7 +2782,7 @@ "cimguiname": "ImDrawList_PathLineTo", "defaults": {}, "funcname": "PathLineTo", - "location": "imgui:2818", + "location": "imgui:2891", "ov_cimguiname": "ImDrawList_PathLineTo", "ret": "void", "signature": "(const ImVec2)", @@ -2807,7 +2807,7 @@ "cimguiname": "ImDrawList_PathLineToMergeDuplicate", "defaults": {}, "funcname": "PathLineToMergeDuplicate", - "location": "imgui:2819", + "location": "imgui:2892", "ov_cimguiname": "ImDrawList_PathLineToMergeDuplicate", "ret": "void", "signature": "(const ImVec2)", @@ -2847,7 +2847,7 @@ "rounding": "0.0f" }, "funcname": "PathRect", - "location": "imgui:2827", + "location": "imgui:2900", "ov_cimguiname": "ImDrawList_PathRect", "ret": "void", "signature": "(const ImVec2,const ImVec2,float,ImDrawFlags)", @@ -2883,7 +2883,7 @@ "thickness": "1.0f" }, "funcname": "PathStroke", - "location": "imgui:2821", + "location": "imgui:2894", "ov_cimguiname": "ImDrawList_PathStroke", "ret": "void", "signature": "(ImU32,ImDrawFlags,float)", @@ -2904,7 +2904,7 @@ "cimguiname": "ImDrawList_PopClipRect", "defaults": {}, "funcname": "PopClipRect", - "location": "imgui:2773", + "location": "imgui:2845", "ov_cimguiname": "ImDrawList_PopClipRect", "ret": "void", "signature": "()", @@ -2925,7 +2925,7 @@ "cimguiname": "ImDrawList_PopTextureID", "defaults": {}, "funcname": "PopTextureID", - "location": "imgui:2775", + "location": "imgui:2847", "ov_cimguiname": "ImDrawList_PopTextureID", "ret": "void", "signature": "()", @@ -2982,7 +2982,7 @@ "cimguiname": "ImDrawList_PrimQuadUV", "defaults": {}, "funcname": "PrimQuadUV", - "location": "imgui:2851", + "location": "imgui:2924", "ov_cimguiname": "ImDrawList_PrimQuadUV", "ret": "void", "signature": "(const ImVec2,const ImVec2,const ImVec2,const ImVec2,const ImVec2,const ImVec2,const ImVec2,const ImVec2,ImU32)", @@ -3016,7 +3016,7 @@ "comment": "// Axis aligned rectangle (composed of two triangles)", "defaults": {}, "funcname": "PrimRect", - "location": "imgui:2849", + "location": "imgui:2922", "ov_cimguiname": "ImDrawList_PrimRect", "ret": "void", "signature": "(const ImVec2,const ImVec2,ImU32)", @@ -3057,7 +3057,7 @@ "cimguiname": "ImDrawList_PrimRectUV", "defaults": {}, "funcname": "PrimRectUV", - "location": "imgui:2850", + "location": "imgui:2923", "ov_cimguiname": "ImDrawList_PrimRectUV", "ret": "void", "signature": "(const ImVec2,const ImVec2,const ImVec2,const ImVec2,ImU32)", @@ -3086,7 +3086,7 @@ "cimguiname": "ImDrawList_PrimReserve", "defaults": {}, "funcname": "PrimReserve", - "location": "imgui:2847", + "location": "imgui:2920", "ov_cimguiname": "ImDrawList_PrimReserve", "ret": "void", "signature": "(int,int)", @@ -3115,7 +3115,7 @@ "cimguiname": "ImDrawList_PrimUnreserve", "defaults": {}, "funcname": "PrimUnreserve", - "location": "imgui:2848", + "location": "imgui:2921", "ov_cimguiname": "ImDrawList_PrimUnreserve", "ret": "void", "signature": "(int,int)", @@ -3149,7 +3149,7 @@ "comment": "// Write vertex with unique index", "defaults": {}, "funcname": "PrimVtx", - "location": "imgui:2854", + "location": "imgui:2927", "ov_cimguiname": "ImDrawList_PrimVtx", "ret": "void", "signature": "(const ImVec2,const ImVec2,ImU32)", @@ -3174,7 +3174,7 @@ "cimguiname": "ImDrawList_PrimWriteIdx", "defaults": {}, "funcname": "PrimWriteIdx", - "location": "imgui:2853", + "location": "imgui:2926", "ov_cimguiname": "ImDrawList_PrimWriteIdx", "ret": "void", "signature": "(ImDrawIdx)", @@ -3207,7 +3207,7 @@ "cimguiname": "ImDrawList_PrimWriteVtx", "defaults": {}, "funcname": "PrimWriteVtx", - "location": "imgui:2852", + "location": "imgui:2925", "ov_cimguiname": "ImDrawList_PrimWriteVtx", "ret": "void", "signature": "(const ImVec2,const ImVec2,ImU32)", @@ -3243,7 +3243,7 @@ "intersect_with_current_clip_rect": "false" }, "funcname": "PushClipRect", - "location": "imgui:2771", + "location": "imgui:2843", "ov_cimguiname": "ImDrawList_PushClipRect", "ret": "void", "signature": "(const ImVec2,const ImVec2,bool)", @@ -3264,7 +3264,7 @@ "cimguiname": "ImDrawList_PushClipRectFullScreen", "defaults": {}, "funcname": "PushClipRectFullScreen", - "location": "imgui:2772", + "location": "imgui:2844", "ov_cimguiname": "ImDrawList_PushClipRectFullScreen", "ret": "void", "signature": "()", @@ -3289,7 +3289,7 @@ "cimguiname": "ImDrawList_PushTextureID", "defaults": {}, "funcname": "PushTextureID", - "location": "imgui:2774", + "location": "imgui:2846", "ov_cimguiname": "ImDrawList_PushTextureID", "ret": "void", "signature": "(ImTextureID)", @@ -3314,7 +3314,7 @@ "cimguiname": "ImDrawList__CalcCircleAutoSegmentCount", "defaults": {}, "funcname": "_CalcCircleAutoSegmentCount", - "location": "imgui:2868", + "location": "imgui:2941", "ov_cimguiname": "ImDrawList__CalcCircleAutoSegmentCount", "ret": "int", "signature": "(float)const", @@ -3335,7 +3335,7 @@ "cimguiname": "ImDrawList__ClearFreeMemory", "defaults": {}, "funcname": "_ClearFreeMemory", - "location": "imgui:2862", + "location": "imgui:2935", "ov_cimguiname": "ImDrawList__ClearFreeMemory", "ret": "void", "signature": "()", @@ -3356,7 +3356,7 @@ "cimguiname": "ImDrawList__OnChangedClipRect", "defaults": {}, "funcname": "_OnChangedClipRect", - "location": "imgui:2865", + "location": "imgui:2938", "ov_cimguiname": "ImDrawList__OnChangedClipRect", "ret": "void", "signature": "()", @@ -3377,7 +3377,7 @@ "cimguiname": "ImDrawList__OnChangedTextureID", "defaults": {}, "funcname": "_OnChangedTextureID", - "location": "imgui:2866", + "location": "imgui:2939", "ov_cimguiname": "ImDrawList__OnChangedTextureID", "ret": "void", "signature": "()", @@ -3398,7 +3398,7 @@ "cimguiname": "ImDrawList__OnChangedVtxOffset", "defaults": {}, "funcname": "_OnChangedVtxOffset", - "location": "imgui:2867", + "location": "imgui:2940", "ov_cimguiname": "ImDrawList__OnChangedVtxOffset", "ret": "void", "signature": "()", @@ -3439,7 +3439,7 @@ "cimguiname": "ImDrawList__PathArcToFastEx", "defaults": {}, "funcname": "_PathArcToFastEx", - "location": "imgui:2869", + "location": "imgui:2942", "ov_cimguiname": "ImDrawList__PathArcToFastEx", "ret": "void", "signature": "(const ImVec2,float,int,int,int)", @@ -3480,7 +3480,7 @@ "cimguiname": "ImDrawList__PathArcToN", "defaults": {}, "funcname": "_PathArcToN", - "location": "imgui:2870", + "location": "imgui:2943", "ov_cimguiname": "ImDrawList__PathArcToN", "ret": "void", "signature": "(const ImVec2,float,float,float,int)", @@ -3501,7 +3501,7 @@ "cimguiname": "ImDrawList__PopUnusedDrawCmd", "defaults": {}, "funcname": "_PopUnusedDrawCmd", - "location": "imgui:2863", + "location": "imgui:2936", "ov_cimguiname": "ImDrawList__PopUnusedDrawCmd", "ret": "void", "signature": "()", @@ -3522,7 +3522,7 @@ "cimguiname": "ImDrawList__ResetForNewFrame", "defaults": {}, "funcname": "_ResetForNewFrame", - "location": "imgui:2861", + "location": "imgui:2934", "ov_cimguiname": "ImDrawList__ResetForNewFrame", "ret": "void", "signature": "()", @@ -3543,7 +3543,7 @@ "cimguiname": "ImDrawList__TryMergeDrawCmds", "defaults": {}, "funcname": "_TryMergeDrawCmds", - "location": "imgui:2864", + "location": "imgui:2937", "ov_cimguiname": "ImDrawList__TryMergeDrawCmds", "ret": "void", "signature": "()", @@ -3563,7 +3563,7 @@ "cimguiname": "ImDrawList_destroy", "defaults": {}, "destructor": true, - "location": "imgui:2770", + "location": "imgui:2842", "ov_cimguiname": "ImDrawList_destroy", "realdestructor": true, "ret": "void", @@ -3581,7 +3581,7 @@ "constructor": true, "defaults": {}, "funcname": "ImFontAtlasCustomRect", - "location": "imgui:2964", + "location": "imgui:3038", "ov_cimguiname": "ImFontAtlasCustomRect_ImFontAtlasCustomRect", "signature": "()", "stname": "ImFontAtlasCustomRect" @@ -3601,7 +3601,7 @@ "cimguiname": "ImFontAtlasCustomRect_IsPacked", "defaults": {}, "funcname": "IsPacked", - "location": "imgui:2965", + "location": "imgui:3039", "ov_cimguiname": "ImFontAtlasCustomRect_IsPacked", "ret": "bool", "signature": "()const", @@ -3667,7 +3667,7 @@ "offset": "ImVec2(0,0)" }, "funcname": "AddCustomRectFontGlyph", - "location": "imgui:3050", + "location": "imgui:3124", "ov_cimguiname": "ImFontAtlas_AddCustomRectFontGlyph", "ret": "int", "signature": "(ImFont*,ImWchar,int,int,float,const ImVec2)", @@ -3696,7 +3696,7 @@ "cimguiname": "ImFontAtlas_AddCustomRectRegular", "defaults": {}, "funcname": "AddCustomRectRegular", - "location": "imgui:3049", + "location": "imgui:3123", "ov_cimguiname": "ImFontAtlas_AddCustomRectRegular", "ret": "int", "signature": "(int,int)", @@ -3721,7 +3721,7 @@ "cimguiname": "ImFontAtlas_AddFont", "defaults": {}, "funcname": "AddFont", - "location": "imgui:2998", + "location": "imgui:3072", "ov_cimguiname": "ImFontAtlas_AddFont", "ret": "ImFont*", "signature": "(const ImFontConfig*)", @@ -3748,7 +3748,7 @@ "font_cfg": "NULL" }, "funcname": "AddFontDefault", - "location": "imgui:2999", + "location": "imgui:3073", "ov_cimguiname": "ImFontAtlas_AddFontDefault", "ret": "ImFont*", "signature": "(const ImFontConfig*)", @@ -3788,7 +3788,7 @@ "glyph_ranges": "NULL" }, "funcname": "AddFontFromFileTTF", - "location": "imgui:3000", + "location": "imgui:3074", "ov_cimguiname": "ImFontAtlas_AddFontFromFileTTF", "ret": "ImFont*", "signature": "(const char*,float,const ImFontConfig*,const ImWchar*)", @@ -3829,7 +3829,7 @@ "glyph_ranges": "NULL" }, "funcname": "AddFontFromMemoryCompressedBase85TTF", - "location": "imgui:3003", + "location": "imgui:3077", "ov_cimguiname": "ImFontAtlas_AddFontFromMemoryCompressedBase85TTF", "ret": "ImFont*", "signature": "(const char*,float,const ImFontConfig*,const ImWchar*)", @@ -3874,7 +3874,7 @@ "glyph_ranges": "NULL" }, "funcname": "AddFontFromMemoryCompressedTTF", - "location": "imgui:3002", + "location": "imgui:3076", "ov_cimguiname": "ImFontAtlas_AddFontFromMemoryCompressedTTF", "ret": "ImFont*", "signature": "(const void*,int,float,const ImFontConfig*,const ImWchar*)", @@ -3919,7 +3919,7 @@ "glyph_ranges": "NULL" }, "funcname": "AddFontFromMemoryTTF", - "location": "imgui:3001", + "location": "imgui:3075", "ov_cimguiname": "ImFontAtlas_AddFontFromMemoryTTF", "ret": "ImFont*", "signature": "(void*,int,float,const ImFontConfig*,const ImWchar*)", @@ -3941,7 +3941,7 @@ "comment": "// Build pixels data. This is called automatically for you by the GetTexData*** functions.", "defaults": {}, "funcname": "Build", - "location": "imgui:3014", + "location": "imgui:3088", "ov_cimguiname": "ImFontAtlas_Build", "ret": "bool", "signature": "()", @@ -3974,7 +3974,7 @@ "cimguiname": "ImFontAtlas_CalcCustomRectUV", "defaults": {}, "funcname": "CalcCustomRectUV", - "location": "imgui:3054", + "location": "imgui:3128", "ov_cimguiname": "ImFontAtlas_CalcCustomRectUV", "ret": "void", "signature": "(const ImFontAtlasCustomRect*,ImVec2*,ImVec2*)const", @@ -3996,7 +3996,7 @@ "comment": "// Clear all input and output.", "defaults": {}, "funcname": "Clear", - "location": "imgui:3007", + "location": "imgui:3081", "ov_cimguiname": "ImFontAtlas_Clear", "ret": "void", "signature": "()", @@ -4018,7 +4018,7 @@ "comment": "// Clear output font data (glyphs storage, UV coordinates).", "defaults": {}, "funcname": "ClearFonts", - "location": "imgui:3006", + "location": "imgui:3080", "ov_cimguiname": "ImFontAtlas_ClearFonts", "ret": "void", "signature": "()", @@ -4040,7 +4040,7 @@ "comment": "// Clear input data (all ImFontConfig structures including sizes, TTF data, glyph ranges, etc.) = all the data used to build the texture and fonts.", "defaults": {}, "funcname": "ClearInputData", - "location": "imgui:3004", + "location": "imgui:3078", "ov_cimguiname": "ImFontAtlas_ClearInputData", "ret": "void", "signature": "()", @@ -4062,7 +4062,7 @@ "comment": "// Clear output texture data (CPU side). Saves RAM once the texture has been copied to graphics memory.", "defaults": {}, "funcname": "ClearTexData", - "location": "imgui:3005", + "location": "imgui:3079", "ov_cimguiname": "ImFontAtlas_ClearTexData", "ret": "void", "signature": "()", @@ -4087,7 +4087,7 @@ "cimguiname": "ImFontAtlas_GetCustomRectByIndex", "defaults": {}, "funcname": "GetCustomRectByIndex", - "location": "imgui:3051", + "location": "imgui:3125", "ov_cimguiname": "ImFontAtlas_GetCustomRectByIndex", "ret": "ImFontAtlasCustomRect*", "signature": "(int)", @@ -4109,7 +4109,7 @@ "comment": "// Default + Half-Width + Japanese Hiragana/Katakana + full set of about 21000 CJK Unified Ideographs", "defaults": {}, "funcname": "GetGlyphRangesChineseFull", - "location": "imgui:3032", + "location": "imgui:3106", "ov_cimguiname": "ImFontAtlas_GetGlyphRangesChineseFull", "ret": "const ImWchar*", "signature": "()", @@ -4131,7 +4131,7 @@ "comment": "// Default + Half-Width + Japanese Hiragana/Katakana + set of 2500 CJK Unified Ideographs for common simplified Chinese", "defaults": {}, "funcname": "GetGlyphRangesChineseSimplifiedCommon", - "location": "imgui:3033", + "location": "imgui:3107", "ov_cimguiname": "ImFontAtlas_GetGlyphRangesChineseSimplifiedCommon", "ret": "const ImWchar*", "signature": "()", @@ -4153,7 +4153,7 @@ "comment": "// Default + about 400 Cyrillic characters", "defaults": {}, "funcname": "GetGlyphRangesCyrillic", - "location": "imgui:3034", + "location": "imgui:3108", "ov_cimguiname": "ImFontAtlas_GetGlyphRangesCyrillic", "ret": "const ImWchar*", "signature": "()", @@ -4175,7 +4175,7 @@ "comment": "// Basic Latin, Extended Latin", "defaults": {}, "funcname": "GetGlyphRangesDefault", - "location": "imgui:3028", + "location": "imgui:3102", "ov_cimguiname": "ImFontAtlas_GetGlyphRangesDefault", "ret": "const ImWchar*", "signature": "()", @@ -4197,7 +4197,7 @@ "comment": "// Default + Greek and Coptic", "defaults": {}, "funcname": "GetGlyphRangesGreek", - "location": "imgui:3029", + "location": "imgui:3103", "ov_cimguiname": "ImFontAtlas_GetGlyphRangesGreek", "ret": "const ImWchar*", "signature": "()", @@ -4219,7 +4219,7 @@ "comment": "// Default + Hiragana, Katakana, Half-Width, Selection of 2999 Ideographs", "defaults": {}, "funcname": "GetGlyphRangesJapanese", - "location": "imgui:3031", + "location": "imgui:3105", "ov_cimguiname": "ImFontAtlas_GetGlyphRangesJapanese", "ret": "const ImWchar*", "signature": "()", @@ -4241,7 +4241,7 @@ "comment": "// Default + Korean characters", "defaults": {}, "funcname": "GetGlyphRangesKorean", - "location": "imgui:3030", + "location": "imgui:3104", "ov_cimguiname": "ImFontAtlas_GetGlyphRangesKorean", "ret": "const ImWchar*", "signature": "()", @@ -4263,7 +4263,7 @@ "comment": "// Default + Thai characters", "defaults": {}, "funcname": "GetGlyphRangesThai", - "location": "imgui:3035", + "location": "imgui:3109", "ov_cimguiname": "ImFontAtlas_GetGlyphRangesThai", "ret": "const ImWchar*", "signature": "()", @@ -4285,7 +4285,7 @@ "comment": "// Default + Vietnamese characters", "defaults": {}, "funcname": "GetGlyphRangesVietnamese", - "location": "imgui:3036", + "location": "imgui:3110", "ov_cimguiname": "ImFontAtlas_GetGlyphRangesVietnamese", "ret": "const ImWchar*", "signature": "()", @@ -4326,7 +4326,7 @@ "cimguiname": "ImFontAtlas_GetMouseCursorTexData", "defaults": {}, "funcname": "GetMouseCursorTexData", - "location": "imgui:3055", + "location": "imgui:3129", "ov_cimguiname": "ImFontAtlas_GetMouseCursorTexData", "ret": "bool", "signature": "(ImGuiMouseCursor,ImVec2*,ImVec2*,ImVec2[2],ImVec2[2])", @@ -4366,7 +4366,7 @@ "out_bytes_per_pixel": "NULL" }, "funcname": "GetTexDataAsAlpha8", - "location": "imgui:3015", + "location": "imgui:3089", "ov_cimguiname": "ImFontAtlas_GetTexDataAsAlpha8", "ret": "void", "signature": "(unsigned char**,int*,int*,int*)", @@ -4406,7 +4406,7 @@ "out_bytes_per_pixel": "NULL" }, "funcname": "GetTexDataAsRGBA32", - "location": "imgui:3016", + "location": "imgui:3090", "ov_cimguiname": "ImFontAtlas_GetTexDataAsRGBA32", "ret": "void", "signature": "(unsigned char**,int*,int*,int*)", @@ -4423,7 +4423,7 @@ "constructor": true, "defaults": {}, "funcname": "ImFontAtlas", - "location": "imgui:2996", + "location": "imgui:3070", "ov_cimguiname": "ImFontAtlas_ImFontAtlas", "signature": "()", "stname": "ImFontAtlas" @@ -4444,7 +4444,7 @@ "comment": "// Bit ambiguous: used to detect when user didn't build texture but effectively we should check TexID != 0 except that would be backend dependent...", "defaults": {}, "funcname": "IsBuilt", - "location": "imgui:3017", + "location": "imgui:3091", "ov_cimguiname": "ImFontAtlas_IsBuilt", "ret": "bool", "signature": "()const", @@ -4469,7 +4469,7 @@ "cimguiname": "ImFontAtlas_SetTexID", "defaults": {}, "funcname": "SetTexID", - "location": "imgui:3018", + "location": "imgui:3092", "ov_cimguiname": "ImFontAtlas_SetTexID", "ret": "void", "signature": "(ImTextureID)", @@ -4489,7 +4489,7 @@ "cimguiname": "ImFontAtlas_destroy", "defaults": {}, "destructor": true, - "location": "imgui:2997", + "location": "imgui:3071", "ov_cimguiname": "ImFontAtlas_destroy", "realdestructor": true, "ret": "void", @@ -4507,7 +4507,7 @@ "constructor": true, "defaults": {}, "funcname": "ImFontConfig", - "location": "imgui:2924", + "location": "imgui:2998", "ov_cimguiname": "ImFontConfig_ImFontConfig", "signature": "()", "stname": "ImFontConfig" @@ -4551,7 +4551,7 @@ "comment": "// Add character", "defaults": {}, "funcname": "AddChar", - "location": "imgui:2949", + "location": "imgui:3023", "ov_cimguiname": "ImFontGlyphRangesBuilder_AddChar", "ret": "void", "signature": "(ImWchar)", @@ -4577,7 +4577,7 @@ "comment": "// Add ranges, e.g. builder.AddRanges(ImFontAtlas::GetGlyphRangesDefault()) to force add all of ASCII/Latin+Ext", "defaults": {}, "funcname": "AddRanges", - "location": "imgui:2951", + "location": "imgui:3025", "ov_cimguiname": "ImFontGlyphRangesBuilder_AddRanges", "ret": "void", "signature": "(const ImWchar*)", @@ -4609,7 +4609,7 @@ "text_end": "NULL" }, "funcname": "AddText", - "location": "imgui:2950", + "location": "imgui:3024", "ov_cimguiname": "ImFontGlyphRangesBuilder_AddText", "ret": "void", "signature": "(const char*,const char*)", @@ -4635,7 +4635,7 @@ "comment": "// Output new ranges", "defaults": {}, "funcname": "BuildRanges", - "location": "imgui:2952", + "location": "imgui:3026", "ov_cimguiname": "ImFontGlyphRangesBuilder_BuildRanges", "ret": "void", "signature": "(ImVector_ImWchar*)", @@ -4656,7 +4656,7 @@ "cimguiname": "ImFontGlyphRangesBuilder_Clear", "defaults": {}, "funcname": "Clear", - "location": "imgui:2946", + "location": "imgui:3020", "ov_cimguiname": "ImFontGlyphRangesBuilder_Clear", "ret": "void", "signature": "()", @@ -4682,7 +4682,7 @@ "comment": "// Get bit n in the array", "defaults": {}, "funcname": "GetBit", - "location": "imgui:2947", + "location": "imgui:3021", "ov_cimguiname": "ImFontGlyphRangesBuilder_GetBit", "ret": "bool", "signature": "(size_t)const", @@ -4699,7 +4699,7 @@ "constructor": true, "defaults": {}, "funcname": "ImFontGlyphRangesBuilder", - "location": "imgui:2945", + "location": "imgui:3019", "ov_cimguiname": "ImFontGlyphRangesBuilder_ImFontGlyphRangesBuilder", "signature": "()", "stname": "ImFontGlyphRangesBuilder" @@ -4724,7 +4724,7 @@ "comment": "// Set bit n in the array", "defaults": {}, "funcname": "SetBit", - "location": "imgui:2948", + "location": "imgui:3022", "ov_cimguiname": "ImFontGlyphRangesBuilder_SetBit", "ret": "void", "signature": "(size_t)", @@ -4808,7 +4808,7 @@ "cimguiname": "ImFont_AddGlyph", "defaults": {}, "funcname": "AddGlyph", - "location": "imgui:3145", + "location": "imgui:3219", "ov_cimguiname": "ImFont_AddGlyph", "ret": "void", "signature": "(const ImFontConfig*,ImWchar,float,float,float,float,float,float,float,float,float)", @@ -4844,7 +4844,7 @@ "overwrite_dst": "true" }, "funcname": "AddRemapChar", - "location": "imgui:3146", + "location": "imgui:3220", "ov_cimguiname": "ImFont_AddRemapChar", "ret": "void", "signature": "(ImWchar,ImWchar,bool)", @@ -4865,7 +4865,7 @@ "cimguiname": "ImFont_BuildLookupTable", "defaults": {}, "funcname": "BuildLookupTable", - "location": "imgui:3142", + "location": "imgui:3216", "ov_cimguiname": "ImFont_BuildLookupTable", "ret": "void", "signature": "()", @@ -4918,7 +4918,7 @@ "text_end": "NULL" }, "funcname": "CalcTextSizeA", - "location": "imgui:3136", + "location": "imgui:3210", "nonUDT": 1, "ov_cimguiname": "ImFont_CalcTextSizeA", "ret": "void", @@ -4956,7 +4956,7 @@ "cimguiname": "ImFont_CalcWordWrapPositionA", "defaults": {}, "funcname": "CalcWordWrapPositionA", - "location": "imgui:3137", + "location": "imgui:3211", "ov_cimguiname": "ImFont_CalcWordWrapPositionA", "ret": "const char*", "signature": "(float,const char*,const char*,float)const", @@ -4977,7 +4977,7 @@ "cimguiname": "ImFont_ClearOutputData", "defaults": {}, "funcname": "ClearOutputData", - "location": "imgui:3143", + "location": "imgui:3217", "ov_cimguiname": "ImFont_ClearOutputData", "ret": "void", "signature": "()", @@ -5002,7 +5002,7 @@ "cimguiname": "ImFont_FindGlyph", "defaults": {}, "funcname": "FindGlyph", - "location": "imgui:3128", + "location": "imgui:3202", "ov_cimguiname": "ImFont_FindGlyph", "ret": "const ImFontGlyph*", "signature": "(ImWchar)const", @@ -5027,7 +5027,7 @@ "cimguiname": "ImFont_FindGlyphNoFallback", "defaults": {}, "funcname": "FindGlyphNoFallback", - "location": "imgui:3129", + "location": "imgui:3203", "ov_cimguiname": "ImFont_FindGlyphNoFallback", "ret": "const ImFontGlyph*", "signature": "(ImWchar)const", @@ -5052,7 +5052,7 @@ "cimguiname": "ImFont_GetCharAdvance", "defaults": {}, "funcname": "GetCharAdvance", - "location": "imgui:3130", + "location": "imgui:3204", "ov_cimguiname": "ImFont_GetCharAdvance", "ret": "float", "signature": "(ImWchar)const", @@ -5073,7 +5073,7 @@ "cimguiname": "ImFont_GetDebugName", "defaults": {}, "funcname": "GetDebugName", - "location": "imgui:3132", + "location": "imgui:3206", "ov_cimguiname": "ImFont_GetDebugName", "ret": "const char*", "signature": "()const", @@ -5098,7 +5098,7 @@ "cimguiname": "ImFont_GrowIndex", "defaults": {}, "funcname": "GrowIndex", - "location": "imgui:3144", + "location": "imgui:3218", "ov_cimguiname": "ImFont_GrowIndex", "ret": "void", "signature": "(int)", @@ -5115,7 +5115,7 @@ "constructor": true, "defaults": {}, "funcname": "ImFont", - "location": "imgui:3126", + "location": "imgui:3200", "ov_cimguiname": "ImFont_ImFont", "signature": "()", "stname": "ImFont" @@ -5143,7 +5143,7 @@ "cimguiname": "ImFont_IsGlyphRangeUnused", "defaults": {}, "funcname": "IsGlyphRangeUnused", - "location": "imgui:3148", + "location": "imgui:3222", "ov_cimguiname": "ImFont_IsGlyphRangeUnused", "ret": "bool", "signature": "(unsigned int,unsigned int)", @@ -5164,7 +5164,7 @@ "cimguiname": "ImFont_IsLoaded", "defaults": {}, "funcname": "IsLoaded", - "location": "imgui:3131", + "location": "imgui:3205", "ov_cimguiname": "ImFont_IsLoaded", "ret": "bool", "signature": "()const", @@ -5205,7 +5205,7 @@ "cimguiname": "ImFont_RenderChar", "defaults": {}, "funcname": "RenderChar", - "location": "imgui:3138", + "location": "imgui:3212", "ov_cimguiname": "ImFont_RenderChar", "ret": "void", "signature": "(ImDrawList*,float,const ImVec2,ImU32,ImWchar)const", @@ -5265,7 +5265,7 @@ "wrap_width": "0.0f" }, "funcname": "RenderText", - "location": "imgui:3139", + "location": "imgui:3213", "ov_cimguiname": "ImFont_RenderText", "ret": "void", "signature": "(ImDrawList*,float,const ImVec2,ImU32,const ImVec4,const char*,const char*,float,bool)const", @@ -5294,7 +5294,7 @@ "cimguiname": "ImFont_SetGlyphVisible", "defaults": {}, "funcname": "SetGlyphVisible", - "location": "imgui:3147", + "location": "imgui:3221", "ov_cimguiname": "ImFont_SetGlyphVisible", "ret": "void", "signature": "(ImWchar,bool)", @@ -5314,7 +5314,7 @@ "cimguiname": "ImFont_destroy", "defaults": {}, "destructor": true, - "location": "imgui:3127", + "location": "imgui:3201", "ov_cimguiname": "ImFont_destroy", "realdestructor": true, "ret": "void", @@ -5332,7 +5332,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiComboPreviewData", - "location": "imgui_internal:1065", + "location": "imgui_internal:1025", "ov_cimguiname": "ImGuiComboPreviewData_ImGuiComboPreviewData", "signature": "()", "stname": "ImGuiComboPreviewData" @@ -5367,7 +5367,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiContextHook", - "location": "imgui_internal:2019", + "location": "imgui_internal:2098", "ov_cimguiname": "ImGuiContextHook_ImGuiContextHook", "signature": "()", "stname": "ImGuiContextHook" @@ -5404,11 +5404,11 @@ "argsoriginal": "(ImFontAtlas* shared_font_atlas)", "call_args": "(shared_font_atlas)", "cimguiname": "ImGuiContext_ImGuiContext", - "comment": " // Different to ensure initial submission\n PlatformImeViewport = 0;\n\n DockNodeWindowMenuHandler = ((void *)0) ;\n\n SettingsLoaded = false;\n SettingsDirtyTimer = 0.0f;\n HookIdNext = 0;\n\n memset(LocalizationTable, 0, sizeof(LocalizationTable));\n\n LogEnabled = false;\n LogType = ImGuiLogType_None;\n LogNextPrefix = LogNextSuffix = ((void *)0) ;\n LogFile = ((void *)0) ;\n LogLinePosY = 3.40282346638528859811704183484516925e+38F ;\n LogLineFirstItem = false;\n LogDepthRef = 0;\n LogDepthToExpand = LogDepthToExpandDefault = 2;\n\n DebugLogFlags = ImGuiDebugLogFlags_OutputToTTY;\n DebugLocateId = 0;\n DebugLogClipperAutoDisableFrames = 0;\n DebugLocateFrames = 0;\n DebugBeginReturnValueCullDepth = -1;\n DebugItemPickerActive = false;\n DebugItemPickerMouseButton = ImGuiMouseButton_Left;\n DebugItemPickerBreakId = 0;\n DebugHoveredDockNode = ((void *)0) ;\n\n memset(FramerateSecPerFrame, 0, sizeof(FramerateSecPerFrame));\n FramerateSecPerFrameIdx = FramerateSecPerFrameCount = 0;\n FramerateSecPerFrameAccum = 0.0f;\n WantCaptureMouseNextFrame = WantCaptureKeyboardNextFrame = WantTextInputNextFrame = -1;\n }", + "comment": " // Different to ensure initial submission\n PlatformImeViewport = 0;\n\n DockNodeWindowMenuHandler = ((void *)0) ;\n\n SettingsLoaded = false;\n SettingsDirtyTimer = 0.0f;\n HookIdNext = 0;\n\n memset(LocalizationTable, 0, sizeof(LocalizationTable));\n\n LogEnabled = false;\n LogType = ImGuiLogType_None;\n LogNextPrefix = LogNextSuffix = ((void *)0) ;\n LogFile = ((void *)0) ;\n LogLinePosY = 3.40282346638528859811704183484516925e+38F ;\n LogLineFirstItem = false;\n LogDepthRef = 0;\n LogDepthToExpand = LogDepthToExpandDefault = 2;\n\n DebugLogFlags = ImGuiDebugLogFlags_OutputToTTY;\n DebugLocateId = 0;\n DebugLogAutoDisableFlags = ImGuiDebugLogFlags_None;\n DebugLogAutoDisableFrames = 0;\n DebugLocateFrames = 0;\n DebugBeginReturnValueCullDepth = -1;\n DebugItemPickerActive = false;\n DebugItemPickerMouseButton = ImGuiMouseButton_Left;\n DebugItemPickerBreakId = 0;\n DebugFlashStyleColorTime = 0.0f;\n DebugFlashStyleColorIdx = ImGuiCol_COUNT;\n DebugHoveredDockNode = ((void *)0) ;\n\n // Same as DebugBreakClearData(). Those fields are scattered in their respective subsystem to stay in hot-data locations\n DebugBreakInWindow = 0;\n DebugBreakInTable = 0;\n DebugBreakInLocateId = false;\n DebugBreakKeyChord = ImGuiKey_Pause;\n DebugBreakInShortcutRouting = ImGuiKey_None;\n\n memset(FramerateSecPerFrame, 0, sizeof(FramerateSecPerFrame));\n FramerateSecPerFrameIdx = FramerateSecPerFrameCount = 0;\n FramerateSecPerFrameAccum = 0.0f;\n WantCaptureMouseNextFrame = WantCaptureKeyboardNextFrame = WantTextInputNextFrame = -1;\n memset(TempKeychordName, 0, sizeof(TempKeychordName));\n }", "constructor": true, "defaults": {}, "funcname": "ImGuiContext", - "location": "imgui_internal:2347", + "location": "imgui_internal:2453", "ov_cimguiname": "ImGuiContext_ImGuiContext", "signature": "(ImFontAtlas*)", "stname": "ImGuiContext" @@ -5451,13 +5451,48 @@ "cimguiname": "ImGuiDataVarInfo_GetVarPtr", "defaults": {}, "funcname": "GetVarPtr", - "location": "imgui_internal:1013", + "location": "imgui_internal:1272", "ov_cimguiname": "ImGuiDataVarInfo_GetVarPtr", "ret": "void*", "signature": "(void*)const", "stname": "ImGuiDataVarInfo" } ], + "ImGuiDebugAllocInfo_ImGuiDebugAllocInfo": [ + { + "args": "()", + "argsT": [], + "argsoriginal": "()", + "call_args": "()", + "cimguiname": "ImGuiDebugAllocInfo_ImGuiDebugAllocInfo", + "constructor": true, + "defaults": {}, + "funcname": "ImGuiDebugAllocInfo", + "location": "imgui_internal:2038", + "ov_cimguiname": "ImGuiDebugAllocInfo_ImGuiDebugAllocInfo", + "signature": "()", + "stname": "ImGuiDebugAllocInfo" + } + ], + "ImGuiDebugAllocInfo_destroy": [ + { + "args": "(ImGuiDebugAllocInfo* self)", + "argsT": [ + { + "name": "self", + "type": "ImGuiDebugAllocInfo*" + } + ], + "call_args": "(self)", + "cimguiname": "ImGuiDebugAllocInfo_destroy", + "defaults": {}, + "destructor": true, + "ov_cimguiname": "ImGuiDebugAllocInfo_destroy", + "ret": "void", + "signature": "(ImGuiDebugAllocInfo*)", + "stname": "ImGuiDebugAllocInfo" + } + ], "ImGuiDockContext_ImGuiDockContext": [ { "args": "()", @@ -5468,7 +5503,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiDockContext", - "location": "imgui_internal:1826", + "location": "imgui_internal:1881", "ov_cimguiname": "ImGuiDockContext_ImGuiDockContext", "signature": "()", "stname": "ImGuiDockContext" @@ -5508,7 +5543,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiDockNode", - "location": "imgui_internal:1783", + "location": "imgui_internal:1838", "ov_cimguiname": "ImGuiDockNode_ImGuiDockNode", "signature": "(ImGuiID)", "stname": "ImGuiDockNode" @@ -5528,7 +5563,7 @@ "cimguiname": "ImGuiDockNode_IsCentralNode", "defaults": {}, "funcname": "IsCentralNode", - "location": "imgui_internal:1788", + "location": "imgui_internal:1843", "ov_cimguiname": "ImGuiDockNode_IsCentralNode", "ret": "bool", "signature": "()const", @@ -5549,7 +5584,7 @@ "cimguiname": "ImGuiDockNode_IsDockSpace", "defaults": {}, "funcname": "IsDockSpace", - "location": "imgui_internal:1786", + "location": "imgui_internal:1841", "ov_cimguiname": "ImGuiDockNode_IsDockSpace", "ret": "bool", "signature": "()const", @@ -5570,7 +5605,7 @@ "cimguiname": "ImGuiDockNode_IsEmpty", "defaults": {}, "funcname": "IsEmpty", - "location": "imgui_internal:1793", + "location": "imgui_internal:1848", "ov_cimguiname": "ImGuiDockNode_IsEmpty", "ret": "bool", "signature": "()const", @@ -5591,7 +5626,7 @@ "cimguiname": "ImGuiDockNode_IsFloatingNode", "defaults": {}, "funcname": "IsFloatingNode", - "location": "imgui_internal:1787", + "location": "imgui_internal:1842", "ov_cimguiname": "ImGuiDockNode_IsFloatingNode", "ret": "bool", "signature": "()const", @@ -5613,7 +5648,7 @@ "comment": "// Hidden tab bar can be shown back by clicking the small triangle", "defaults": {}, "funcname": "IsHiddenTabBar", - "location": "imgui_internal:1789", + "location": "imgui_internal:1844", "ov_cimguiname": "ImGuiDockNode_IsHiddenTabBar", "ret": "bool", "signature": "()const", @@ -5634,7 +5669,7 @@ "cimguiname": "ImGuiDockNode_IsLeafNode", "defaults": {}, "funcname": "IsLeafNode", - "location": "imgui_internal:1792", + "location": "imgui_internal:1847", "ov_cimguiname": "ImGuiDockNode_IsLeafNode", "ret": "bool", "signature": "()const", @@ -5656,7 +5691,7 @@ "comment": "// Never show a tab bar", "defaults": {}, "funcname": "IsNoTabBar", - "location": "imgui_internal:1790", + "location": "imgui_internal:1845", "ov_cimguiname": "ImGuiDockNode_IsNoTabBar", "ret": "bool", "signature": "()const", @@ -5677,7 +5712,7 @@ "cimguiname": "ImGuiDockNode_IsRootNode", "defaults": {}, "funcname": "IsRootNode", - "location": "imgui_internal:1785", + "location": "imgui_internal:1840", "ov_cimguiname": "ImGuiDockNode_IsRootNode", "ret": "bool", "signature": "()const", @@ -5698,7 +5733,7 @@ "cimguiname": "ImGuiDockNode_IsSplitNode", "defaults": {}, "funcname": "IsSplitNode", - "location": "imgui_internal:1791", + "location": "imgui_internal:1846", "ov_cimguiname": "ImGuiDockNode_IsSplitNode", "ret": "bool", "signature": "()const", @@ -5723,7 +5758,7 @@ "cimguiname": "ImGuiDockNode_Rect", "defaults": {}, "funcname": "Rect", - "location": "imgui_internal:1794", + "location": "imgui_internal:1849", "nonUDT": 1, "ov_cimguiname": "ImGuiDockNode_Rect", "ret": "void", @@ -5749,7 +5784,7 @@ "cimguiname": "ImGuiDockNode_SetLocalFlags", "defaults": {}, "funcname": "SetLocalFlags", - "location": "imgui_internal:1796", + "location": "imgui_internal:1851", "ov_cimguiname": "ImGuiDockNode_SetLocalFlags", "ret": "void", "signature": "(ImGuiDockNodeFlags)", @@ -5770,7 +5805,7 @@ "cimguiname": "ImGuiDockNode_UpdateMergedFlags", "defaults": {}, "funcname": "UpdateMergedFlags", - "location": "imgui_internal:1797", + "location": "imgui_internal:1852", "ov_cimguiname": "ImGuiDockNode_UpdateMergedFlags", "ret": "void", "signature": "()", @@ -5790,7 +5825,7 @@ "cimguiname": "ImGuiDockNode_destroy", "defaults": {}, "destructor": true, - "location": "imgui_internal:1784", + "location": "imgui_internal:1839", "ov_cimguiname": "ImGuiDockNode_destroy", "realdestructor": true, "ret": "void", @@ -5798,6 +5833,41 @@ "stname": "ImGuiDockNode" } ], + "ImGuiIDStackTool_ImGuiIDStackTool": [ + { + "args": "()", + "argsT": [], + "argsoriginal": "()", + "call_args": "()", + "cimguiname": "ImGuiIDStackTool_ImGuiIDStackTool", + "constructor": true, + "defaults": {}, + "funcname": "ImGuiIDStackTool", + "location": "imgui_internal:2080", + "ov_cimguiname": "ImGuiIDStackTool_ImGuiIDStackTool", + "signature": "()", + "stname": "ImGuiIDStackTool" + } + ], + "ImGuiIDStackTool_destroy": [ + { + "args": "(ImGuiIDStackTool* self)", + "argsT": [ + { + "name": "self", + "type": "ImGuiIDStackTool*" + } + ], + "call_args": "(self)", + "cimguiname": "ImGuiIDStackTool_destroy", + "defaults": {}, + "destructor": true, + "ov_cimguiname": "ImGuiIDStackTool_destroy", + "ret": "void", + "signature": "(ImGuiIDStackTool*)", + "stname": "ImGuiIDStackTool" + } + ], "ImGuiIO_AddFocusEvent": [ { "args": "(ImGuiIO* self,bool focused)", @@ -5817,7 +5887,7 @@ "comment": "// Queue a gain/loss of focus for the application (generally based on OS/platform focus of your window)", "defaults": {}, "funcname": "AddFocusEvent", - "location": "imgui:2158", + "location": "imgui:2250", "ov_cimguiname": "ImGuiIO_AddFocusEvent", "ret": "void", "signature": "(bool)", @@ -5843,7 +5913,7 @@ "comment": "// Queue a new character input", "defaults": {}, "funcname": "AddInputCharacter", - "location": "imgui:2159", + "location": "imgui:2251", "ov_cimguiname": "ImGuiIO_AddInputCharacter", "ret": "void", "signature": "(unsigned int)", @@ -5869,7 +5939,7 @@ "comment": "// Queue a new character input from a UTF-16 character, it can be a surrogate", "defaults": {}, "funcname": "AddInputCharacterUTF16", - "location": "imgui:2160", + "location": "imgui:2252", "ov_cimguiname": "ImGuiIO_AddInputCharacterUTF16", "ret": "void", "signature": "(ImWchar16)", @@ -5895,7 +5965,7 @@ "comment": "// Queue a new characters input from a UTF-8 string", "defaults": {}, "funcname": "AddInputCharactersUTF8", - "location": "imgui:2161", + "location": "imgui:2253", "ov_cimguiname": "ImGuiIO_AddInputCharactersUTF8", "ret": "void", "signature": "(const char*)", @@ -5929,7 +5999,7 @@ "comment": "// Queue a new key down/up event for analog values (e.g. ImGuiKey_Gamepad_ values). Dead-zones should be handled by the backend.", "defaults": {}, "funcname": "AddKeyAnalogEvent", - "location": "imgui:2152", + "location": "imgui:2244", "ov_cimguiname": "ImGuiIO_AddKeyAnalogEvent", "ret": "void", "signature": "(ImGuiKey,bool,float)", @@ -5959,7 +6029,7 @@ "comment": "// Queue a new key down/up event. Key should be \"translated\" (as in, generally ImGuiKey_A matches the key end-user would use to emit an 'A' character)", "defaults": {}, "funcname": "AddKeyEvent", - "location": "imgui:2151", + "location": "imgui:2243", "ov_cimguiname": "ImGuiIO_AddKeyEvent", "ret": "void", "signature": "(ImGuiKey,bool)", @@ -5989,7 +6059,7 @@ "comment": "// Queue a mouse button change", "defaults": {}, "funcname": "AddMouseButtonEvent", - "location": "imgui:2154", + "location": "imgui:2246", "ov_cimguiname": "ImGuiIO_AddMouseButtonEvent", "ret": "void", "signature": "(int,bool)", @@ -6019,7 +6089,7 @@ "comment": "// Queue a mouse position update. Use -FLT_MAX,-FLT_MAX to signify no mouse (e.g. app not focused and not hovered)", "defaults": {}, "funcname": "AddMousePosEvent", - "location": "imgui:2153", + "location": "imgui:2245", "ov_cimguiname": "ImGuiIO_AddMousePosEvent", "ret": "void", "signature": "(float,float)", @@ -6045,7 +6115,7 @@ "comment": "// Queue a mouse source change (Mouse/TouchScreen/Pen)", "defaults": {}, "funcname": "AddMouseSourceEvent", - "location": "imgui:2156", + "location": "imgui:2248", "ov_cimguiname": "ImGuiIO_AddMouseSourceEvent", "ret": "void", "signature": "(ImGuiMouseSource)", @@ -6071,7 +6141,7 @@ "comment": "// Queue a mouse hovered viewport. Requires backend to set ImGuiBackendFlags_HasMouseHoveredViewport to call this (for multi-viewport support).", "defaults": {}, "funcname": "AddMouseViewportEvent", - "location": "imgui:2157", + "location": "imgui:2249", "ov_cimguiname": "ImGuiIO_AddMouseViewportEvent", "ret": "void", "signature": "(ImGuiID)", @@ -6101,7 +6171,7 @@ "comment": "// Queue a mouse wheel update. wheel_y<0: scroll down, wheel_y>0: scroll up, wheel_x<0: scroll right, wheel_x>0: scroll left.", "defaults": {}, "funcname": "AddMouseWheelEvent", - "location": "imgui:2155", + "location": "imgui:2247", "ov_cimguiname": "ImGuiIO_AddMouseWheelEvent", "ret": "void", "signature": "(float,float)", @@ -6123,7 +6193,7 @@ "comment": "// Clear all incoming events.", "defaults": {}, "funcname": "ClearEventsQueue", - "location": "imgui:2165", + "location": "imgui:2257", "ov_cimguiname": "ImGuiIO_ClearEventsQueue", "ret": "void", "signature": "()", @@ -6145,7 +6215,7 @@ "comment": "// Clear current keyboard/mouse/gamepad state + current frame text input buffer. Equivalent to releasing all keys/buttons.", "defaults": {}, "funcname": "ClearInputKeys", - "location": "imgui:2166", + "location": "imgui:2258", "ov_cimguiname": "ImGuiIO_ClearInputKeys", "ret": "void", "signature": "()", @@ -6162,7 +6232,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiIO", - "location": "imgui:2248", + "location": "imgui:2340", "ov_cimguiname": "ImGuiIO_ImGuiIO", "signature": "()", "stname": "ImGuiIO" @@ -6187,7 +6257,7 @@ "comment": "// Set master flag for accepting key/mouse/text events (default to true). Useful if you have native dialog boxes that are interrupting your application loop/refresh, and you want to disable events being queued while your app is frozen.", "defaults": {}, "funcname": "SetAppAcceptingEvents", - "location": "imgui:2164", + "location": "imgui:2256", "ov_cimguiname": "ImGuiIO_SetAppAcceptingEvents", "ret": "void", "signature": "(bool)", @@ -6227,7 +6297,7 @@ "native_legacy_index": "-1" }, "funcname": "SetKeyEventNativeData", - "location": "imgui:2163", + "location": "imgui:2255", "ov_cimguiname": "ImGuiIO_SetKeyEventNativeData", "ret": "void", "signature": "(ImGuiKey,int,int,int)", @@ -6263,7 +6333,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiInputEvent", - "location": "imgui_internal:1376", + "location": "imgui_internal:1402", "ov_cimguiname": "ImGuiInputEvent_ImGuiInputEvent", "signature": "()", "stname": "ImGuiInputEvent" @@ -6302,7 +6372,7 @@ "cimguiname": "ImGuiInputTextCallbackData_ClearSelection", "defaults": {}, "funcname": "ClearSelection", - "location": "imgui:2290", + "location": "imgui:2382", "ov_cimguiname": "ImGuiInputTextCallbackData_ClearSelection", "ret": "void", "signature": "()", @@ -6331,7 +6401,7 @@ "cimguiname": "ImGuiInputTextCallbackData_DeleteChars", "defaults": {}, "funcname": "DeleteChars", - "location": "imgui:2287", + "location": "imgui:2379", "ov_cimguiname": "ImGuiInputTextCallbackData_DeleteChars", "ret": "void", "signature": "(int,int)", @@ -6352,7 +6422,7 @@ "cimguiname": "ImGuiInputTextCallbackData_HasSelection", "defaults": {}, "funcname": "HasSelection", - "location": "imgui:2291", + "location": "imgui:2383", "ov_cimguiname": "ImGuiInputTextCallbackData_HasSelection", "ret": "bool", "signature": "()const", @@ -6369,7 +6439,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiInputTextCallbackData", - "location": "imgui:2286", + "location": "imgui:2378", "ov_cimguiname": "ImGuiInputTextCallbackData_ImGuiInputTextCallbackData", "signature": "()", "stname": "ImGuiInputTextCallbackData" @@ -6403,7 +6473,7 @@ "text_end": "NULL" }, "funcname": "InsertChars", - "location": "imgui:2288", + "location": "imgui:2380", "ov_cimguiname": "ImGuiInputTextCallbackData_InsertChars", "ret": "void", "signature": "(int,const char*,const char*)", @@ -6424,7 +6494,7 @@ "cimguiname": "ImGuiInputTextCallbackData_SelectAll", "defaults": {}, "funcname": "SelectAll", - "location": "imgui:2289", + "location": "imgui:2381", "ov_cimguiname": "ImGuiInputTextCallbackData_SelectAll", "ret": "void", "signature": "()", @@ -6464,7 +6534,7 @@ "cimguiname": "ImGuiInputTextDeactivatedState_ClearFreeMemory", "defaults": {}, "funcname": "ClearFreeMemory", - "location": "imgui_internal:1109", + "location": "imgui_internal:1071", "ov_cimguiname": "ImGuiInputTextDeactivatedState_ClearFreeMemory", "ret": "void", "signature": "()", @@ -6481,7 +6551,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiInputTextDeactivatedState", - "location": "imgui_internal:1108", + "location": "imgui_internal:1070", "ov_cimguiname": "ImGuiInputTextDeactivatedState_ImGuiInputTextDeactivatedState", "signature": "()", "stname": "ImGuiInputTextDeactivatedState" @@ -6520,7 +6590,7 @@ "cimguiname": "ImGuiInputTextState_ClearFreeMemory", "defaults": {}, "funcname": "ClearFreeMemory", - "location": "imgui_internal:1133", + "location": "imgui_internal:1098", "ov_cimguiname": "ImGuiInputTextState_ClearFreeMemory", "ret": "void", "signature": "()", @@ -6541,7 +6611,7 @@ "cimguiname": "ImGuiInputTextState_ClearSelection", "defaults": {}, "funcname": "ClearSelection", - "location": "imgui_internal:1142", + "location": "imgui_internal:1107", "ov_cimguiname": "ImGuiInputTextState_ClearSelection", "ret": "void", "signature": "()", @@ -6562,7 +6632,7 @@ "cimguiname": "ImGuiInputTextState_ClearText", "defaults": {}, "funcname": "ClearText", - "location": "imgui_internal:1132", + "location": "imgui_internal:1097", "ov_cimguiname": "ImGuiInputTextState_ClearText", "ret": "void", "signature": "()", @@ -6584,7 +6654,7 @@ "comment": "// After a user-input the cursor stays on for a while without blinking", "defaults": {}, "funcname": "CursorAnimReset", - "location": "imgui_internal:1139", + "location": "imgui_internal:1104", "ov_cimguiname": "ImGuiInputTextState_CursorAnimReset", "ret": "void", "signature": "()", @@ -6605,7 +6675,7 @@ "cimguiname": "ImGuiInputTextState_CursorClamp", "defaults": {}, "funcname": "CursorClamp", - "location": "imgui_internal:1140", + "location": "imgui_internal:1105", "ov_cimguiname": "ImGuiInputTextState_CursorClamp", "ret": "void", "signature": "()", @@ -6626,7 +6696,7 @@ "cimguiname": "ImGuiInputTextState_GetCursorPos", "defaults": {}, "funcname": "GetCursorPos", - "location": "imgui_internal:1143", + "location": "imgui_internal:1108", "ov_cimguiname": "ImGuiInputTextState_GetCursorPos", "ret": "int", "signature": "()const", @@ -6647,7 +6717,7 @@ "cimguiname": "ImGuiInputTextState_GetRedoAvailCount", "defaults": {}, "funcname": "GetRedoAvailCount", - "location": "imgui_internal:1135", + "location": "imgui_internal:1100", "ov_cimguiname": "ImGuiInputTextState_GetRedoAvailCount", "ret": "int", "signature": "()const", @@ -6668,7 +6738,7 @@ "cimguiname": "ImGuiInputTextState_GetSelectionEnd", "defaults": {}, "funcname": "GetSelectionEnd", - "location": "imgui_internal:1145", + "location": "imgui_internal:1110", "ov_cimguiname": "ImGuiInputTextState_GetSelectionEnd", "ret": "int", "signature": "()const", @@ -6689,7 +6759,7 @@ "cimguiname": "ImGuiInputTextState_GetSelectionStart", "defaults": {}, "funcname": "GetSelectionStart", - "location": "imgui_internal:1144", + "location": "imgui_internal:1109", "ov_cimguiname": "ImGuiInputTextState_GetSelectionStart", "ret": "int", "signature": "()const", @@ -6710,7 +6780,7 @@ "cimguiname": "ImGuiInputTextState_GetUndoAvailCount", "defaults": {}, "funcname": "GetUndoAvailCount", - "location": "imgui_internal:1134", + "location": "imgui_internal:1099", "ov_cimguiname": "ImGuiInputTextState_GetUndoAvailCount", "ret": "int", "signature": "()const", @@ -6731,7 +6801,7 @@ "cimguiname": "ImGuiInputTextState_HasSelection", "defaults": {}, "funcname": "HasSelection", - "location": "imgui_internal:1141", + "location": "imgui_internal:1106", "ov_cimguiname": "ImGuiInputTextState_HasSelection", "ret": "bool", "signature": "()const", @@ -6748,7 +6818,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiInputTextState", - "location": "imgui_internal:1131", + "location": "imgui_internal:1096", "ov_cimguiname": "ImGuiInputTextState_ImGuiInputTextState", "signature": "()", "stname": "ImGuiInputTextState" @@ -6773,13 +6843,76 @@ "comment": "// Cannot be inline because we call in code in stb_textedit.h implementation", "defaults": {}, "funcname": "OnKeyPressed", - "location": "imgui_internal:1136", + "location": "imgui_internal:1101", "ov_cimguiname": "ImGuiInputTextState_OnKeyPressed", "ret": "void", "signature": "(int)", "stname": "ImGuiInputTextState" } ], + "ImGuiInputTextState_ReloadUserBufAndKeepSelection": [ + { + "args": "(ImGuiInputTextState* self)", + "argsT": [ + { + "name": "self", + "type": "ImGuiInputTextState*" + } + ], + "argsoriginal": "()", + "call_args": "()", + "cimguiname": "ImGuiInputTextState_ReloadUserBufAndKeepSelection", + "defaults": {}, + "funcname": "ReloadUserBufAndKeepSelection", + "location": "imgui_internal:1119", + "ov_cimguiname": "ImGuiInputTextState_ReloadUserBufAndKeepSelection", + "ret": "void", + "signature": "()", + "stname": "ImGuiInputTextState" + } + ], + "ImGuiInputTextState_ReloadUserBufAndMoveToEnd": [ + { + "args": "(ImGuiInputTextState* self)", + "argsT": [ + { + "name": "self", + "type": "ImGuiInputTextState*" + } + ], + "argsoriginal": "()", + "call_args": "()", + "cimguiname": "ImGuiInputTextState_ReloadUserBufAndMoveToEnd", + "defaults": {}, + "funcname": "ReloadUserBufAndMoveToEnd", + "location": "imgui_internal:1120", + "ov_cimguiname": "ImGuiInputTextState_ReloadUserBufAndMoveToEnd", + "ret": "void", + "signature": "()", + "stname": "ImGuiInputTextState" + } + ], + "ImGuiInputTextState_ReloadUserBufAndSelectAll": [ + { + "args": "(ImGuiInputTextState* self)", + "argsT": [ + { + "name": "self", + "type": "ImGuiInputTextState*" + } + ], + "argsoriginal": "()", + "call_args": "()", + "cimguiname": "ImGuiInputTextState_ReloadUserBufAndSelectAll", + "defaults": {}, + "funcname": "ReloadUserBufAndSelectAll", + "location": "imgui_internal:1118", + "ov_cimguiname": "ImGuiInputTextState_ReloadUserBufAndSelectAll", + "ret": "void", + "signature": "()", + "stname": "ImGuiInputTextState" + } + ], "ImGuiInputTextState_SelectAll": [ { "args": "(ImGuiInputTextState* self)", @@ -6794,7 +6927,7 @@ "cimguiname": "ImGuiInputTextState_SelectAll", "defaults": {}, "funcname": "SelectAll", - "location": "imgui_internal:1146", + "location": "imgui_internal:1111", "ov_cimguiname": "ImGuiInputTextState_SelectAll", "ret": "void", "signature": "()", @@ -6830,7 +6963,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiKeyOwnerData", - "location": "imgui_internal:1418", + "location": "imgui_internal:1445", "ov_cimguiname": "ImGuiKeyOwnerData_ImGuiKeyOwnerData", "signature": "()", "stname": "ImGuiKeyOwnerData" @@ -6865,7 +6998,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiKeyRoutingData", - "location": "imgui_internal:1394", + "location": "imgui_internal:1421", "ov_cimguiname": "ImGuiKeyRoutingData_ImGuiKeyRoutingData", "signature": "()", "stname": "ImGuiKeyRoutingData" @@ -6904,7 +7037,7 @@ "cimguiname": "ImGuiKeyRoutingTable_Clear", "defaults": {}, "funcname": "Clear", - "location": "imgui_internal:1406", + "location": "imgui_internal:1433", "ov_cimguiname": "ImGuiKeyRoutingTable_Clear", "ret": "void", "signature": "()", @@ -6921,7 +7054,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiKeyRoutingTable", - "location": "imgui_internal:1405", + "location": "imgui_internal:1432", "ov_cimguiname": "ImGuiKeyRoutingTable_ImGuiKeyRoutingTable", "signature": "()", "stname": "ImGuiKeyRoutingTable" @@ -6956,7 +7089,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiLastItemData", - "location": "imgui_internal:1243", + "location": "imgui_internal:1209", "ov_cimguiname": "ImGuiLastItemData_ImGuiLastItemData", "signature": "()", "stname": "ImGuiLastItemData" @@ -6991,7 +7124,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiListClipperData", - "location": "imgui_internal:1495", + "location": "imgui_internal:1542", "ov_cimguiname": "ImGuiListClipperData_ImGuiListClipperData", "signature": "()", "stname": "ImGuiListClipperData" @@ -7015,7 +7148,7 @@ "cimguiname": "ImGuiListClipperData_Reset", "defaults": {}, "funcname": "Reset", - "location": "imgui_internal:1496", + "location": "imgui_internal:1543", "ov_cimguiname": "ImGuiListClipperData_Reset", "ret": "void", "signature": "(ImGuiListClipper*)", @@ -7060,7 +7193,7 @@ "defaults": {}, "funcname": "FromIndices", "is_static_function": true, - "location": "imgui_internal:1482", + "location": "imgui_internal:1529", "ov_cimguiname": "ImGuiListClipperRange_FromIndices", "ret": "ImGuiListClipperRange", "signature": "(int,int)", @@ -7094,7 +7227,7 @@ "defaults": {}, "funcname": "FromPositions", "is_static_function": true, - "location": "imgui_internal:1483", + "location": "imgui_internal:1530", "ov_cimguiname": "ImGuiListClipperRange_FromPositions", "ret": "ImGuiListClipperRange", "signature": "(float,float,int,int)", @@ -7125,7 +7258,7 @@ "items_height": "-1.0f" }, "funcname": "Begin", - "location": "imgui:2524", + "location": "imgui:2592", "ov_cimguiname": "ImGuiListClipper_Begin", "ret": "void", "signature": "(int,float)", @@ -7147,7 +7280,7 @@ "comment": "// Automatically called on the last call of Step() that returns false.", "defaults": {}, "funcname": "End", - "location": "imgui:2525", + "location": "imgui:2593", "ov_cimguiname": "ImGuiListClipper_End", "ret": "void", "signature": "()", @@ -7164,7 +7297,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiListClipper", - "location": "imgui:2522", + "location": "imgui:2590", "ov_cimguiname": "ImGuiListClipper_ImGuiListClipper", "signature": "()", "stname": "ImGuiListClipper" @@ -7188,7 +7321,7 @@ "cimguiname": "ImGuiListClipper_IncludeItemByIndex", "defaults": {}, "funcname": "IncludeItemByIndex", - "location": "imgui:2530", + "location": "imgui:2598", "ov_cimguiname": "ImGuiListClipper_IncludeItemByIndex", "ret": "void", "signature": "(int)", @@ -7218,7 +7351,7 @@ "comment": "// item_end is exclusive e.g. use (42, 42+1) to make item 42 never clipped.", "defaults": {}, "funcname": "IncludeItemsByIndex", - "location": "imgui:2531", + "location": "imgui:2599", "ov_cimguiname": "ImGuiListClipper_IncludeItemsByIndex", "ret": "void", "signature": "(int,int)", @@ -7240,7 +7373,7 @@ "comment": "// Call until it returns false. The DisplayStart/DisplayEnd fields will be set and you can process/draw those items.", "defaults": {}, "funcname": "Step", - "location": "imgui:2526", + "location": "imgui:2594", "ov_cimguiname": "ImGuiListClipper_Step", "ret": "bool", "signature": "()", @@ -7260,7 +7393,7 @@ "cimguiname": "ImGuiListClipper_destroy", "defaults": {}, "destructor": true, - "location": "imgui:2523", + "location": "imgui:2591", "ov_cimguiname": "ImGuiListClipper_destroy", "realdestructor": true, "ret": "void", @@ -7286,7 +7419,7 @@ "cimguiname": "ImGuiMenuColumns_CalcNextTotalWidth", "defaults": {}, "funcname": "CalcNextTotalWidth", - "location": "imgui_internal:1099", + "location": "imgui_internal:1061", "ov_cimguiname": "ImGuiMenuColumns_CalcNextTotalWidth", "ret": "void", "signature": "(bool)", @@ -7323,7 +7456,7 @@ "cimguiname": "ImGuiMenuColumns_DeclColumns", "defaults": {}, "funcname": "DeclColumns", - "location": "imgui_internal:1098", + "location": "imgui_internal:1060", "ov_cimguiname": "ImGuiMenuColumns_DeclColumns", "ret": "float", "signature": "(float,float,float,float)", @@ -7340,7 +7473,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiMenuColumns", - "location": "imgui_internal:1096", + "location": "imgui_internal:1058", "ov_cimguiname": "ImGuiMenuColumns_ImGuiMenuColumns", "signature": "()", "stname": "ImGuiMenuColumns" @@ -7368,7 +7501,7 @@ "cimguiname": "ImGuiMenuColumns_Update", "defaults": {}, "funcname": "Update", - "location": "imgui_internal:1097", + "location": "imgui_internal:1059", "ov_cimguiname": "ImGuiMenuColumns_Update", "ret": "void", "signature": "(float,bool)", @@ -7408,7 +7541,7 @@ "cimguiname": "ImGuiNavItemData_Clear", "defaults": {}, "funcname": "Clear", - "location": "imgui_internal:1576", + "location": "imgui_internal:1624", "ov_cimguiname": "ImGuiNavItemData_Clear", "ret": "void", "signature": "()", @@ -7425,7 +7558,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiNavItemData", - "location": "imgui_internal:1575", + "location": "imgui_internal:1623", "ov_cimguiname": "ImGuiNavItemData_ImGuiNavItemData", "signature": "()", "stname": "ImGuiNavItemData" @@ -7465,7 +7598,7 @@ "comment": "// Also cleared manually by ItemAdd()!", "defaults": {}, "funcname": "ClearFlags", - "location": "imgui_internal:1230", + "location": "imgui_internal:1194", "ov_cimguiname": "ImGuiNextItemData_ClearFlags", "ret": "void", "signature": "()", @@ -7482,7 +7615,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiNextItemData", - "location": "imgui_internal:1229", + "location": "imgui_internal:1193", "ov_cimguiname": "ImGuiNextItemData_ImGuiNextItemData", "signature": "()", "stname": "ImGuiNextItemData" @@ -7521,7 +7654,7 @@ "cimguiname": "ImGuiNextWindowData_ClearFlags", "defaults": {}, "funcname": "ClearFlags", - "location": "imgui_internal:1205", + "location": "imgui_internal:1167", "ov_cimguiname": "ImGuiNextWindowData_ClearFlags", "ret": "void", "signature": "()", @@ -7538,7 +7671,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiNextWindowData", - "location": "imgui_internal:1204", + "location": "imgui_internal:1166", "ov_cimguiname": "ImGuiNextWindowData_ImGuiNextWindowData", "signature": "()", "stname": "ImGuiNextWindowData" @@ -7573,7 +7706,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiOldColumnData", - "location": "imgui_internal:1648", + "location": "imgui_internal:1702", "ov_cimguiname": "ImGuiOldColumnData_ImGuiOldColumnData", "signature": "()", "stname": "ImGuiOldColumnData" @@ -7608,7 +7741,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiOldColumns", - "location": "imgui_internal:1669", + "location": "imgui_internal:1723", "ov_cimguiname": "ImGuiOldColumns_ImGuiOldColumns", "signature": "()", "stname": "ImGuiOldColumns" @@ -7643,7 +7776,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiOnceUponAFrame", - "location": "imgui:2387", + "location": "imgui:2456", "ov_cimguiname": "ImGuiOnceUponAFrame_ImGuiOnceUponAFrame", "signature": "()", "stname": "ImGuiOnceUponAFrame" @@ -7682,7 +7815,7 @@ "cimguiname": "ImGuiPayload_Clear", "defaults": {}, "funcname": "Clear", - "location": "imgui:2341", + "location": "imgui:2434", "ov_cimguiname": "ImGuiPayload_Clear", "ret": "void", "signature": "()", @@ -7699,7 +7832,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiPayload", - "location": "imgui:2340", + "location": "imgui:2433", "ov_cimguiname": "ImGuiPayload_ImGuiPayload", "signature": "()", "stname": "ImGuiPayload" @@ -7723,7 +7856,7 @@ "cimguiname": "ImGuiPayload_IsDataType", "defaults": {}, "funcname": "IsDataType", - "location": "imgui:2342", + "location": "imgui:2435", "ov_cimguiname": "ImGuiPayload_IsDataType", "ret": "bool", "signature": "(const char*)const", @@ -7744,7 +7877,7 @@ "cimguiname": "ImGuiPayload_IsDelivery", "defaults": {}, "funcname": "IsDelivery", - "location": "imgui:2344", + "location": "imgui:2437", "ov_cimguiname": "ImGuiPayload_IsDelivery", "ret": "bool", "signature": "()const", @@ -7765,7 +7898,7 @@ "cimguiname": "ImGuiPayload_IsPreview", "defaults": {}, "funcname": "IsPreview", - "location": "imgui:2343", + "location": "imgui:2436", "ov_cimguiname": "ImGuiPayload_IsPreview", "ret": "bool", "signature": "()const", @@ -7802,7 +7935,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiPlatformIO", - "location": "imgui:3326", + "location": "imgui:3400", "ov_cimguiname": "ImGuiPlatformIO_ImGuiPlatformIO", "signature": "()", "stname": "ImGuiPlatformIO" @@ -7837,7 +7970,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiPlatformImeData", - "location": "imgui:3347", + "location": "imgui:3421", "ov_cimguiname": "ImGuiPlatformImeData_ImGuiPlatformImeData", "signature": "()", "stname": "ImGuiPlatformImeData" @@ -7872,7 +8005,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiPlatformMonitor", - "location": "imgui:3337", + "location": "imgui:3411", "ov_cimguiname": "ImGuiPlatformMonitor_ImGuiPlatformMonitor", "signature": "()", "stname": "ImGuiPlatformMonitor" @@ -7907,7 +8040,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiPopupData", - "location": "imgui_internal:1161", + "location": "imgui_internal:1320", "ov_cimguiname": "ImGuiPopupData_ImGuiPopupData", "signature": "()", "stname": "ImGuiPopupData" @@ -7947,7 +8080,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiPtrOrIndex", - "location": "imgui_internal:1293", + "location": "imgui_internal:1259", "ov_cimguiname": "ImGuiPtrOrIndex_ImGuiPtrOrIndex_Ptr", "signature": "(void*)", "stname": "ImGuiPtrOrIndex" @@ -7966,7 +8099,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiPtrOrIndex", - "location": "imgui_internal:1294", + "location": "imgui_internal:1260", "ov_cimguiname": "ImGuiPtrOrIndex_ImGuiPtrOrIndex_Int", "signature": "(int)", "stname": "ImGuiPtrOrIndex" @@ -8001,7 +8134,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiSettingsHandler", - "location": "imgui_internal:1913", + "location": "imgui_internal:1969", "ov_cimguiname": "ImGuiSettingsHandler_ImGuiSettingsHandler", "signature": "()", "stname": "ImGuiSettingsHandler" @@ -8036,7 +8169,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiStackLevelInfo", - "location": "imgui_internal:1988", + "location": "imgui_internal:2067", "ov_cimguiname": "ImGuiStackLevelInfo_ImGuiStackLevelInfo", "signature": "()", "stname": "ImGuiStackLevelInfo" @@ -8079,7 +8212,7 @@ "cimguiname": "ImGuiStackSizes_CompareWithContextState", "defaults": {}, "funcname": "CompareWithContextState", - "location": "imgui_internal:1270", + "location": "imgui_internal:1236", "ov_cimguiname": "ImGuiStackSizes_CompareWithContextState", "ret": "void", "signature": "(ImGuiContext*)", @@ -8096,7 +8229,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiStackSizes", - "location": "imgui_internal:1268", + "location": "imgui_internal:1234", "ov_cimguiname": "ImGuiStackSizes_ImGuiStackSizes", "signature": "()", "stname": "ImGuiStackSizes" @@ -8120,7 +8253,7 @@ "cimguiname": "ImGuiStackSizes_SetToContextState", "defaults": {}, "funcname": "SetToContextState", - "location": "imgui_internal:1269", + "location": "imgui_internal:1235", "ov_cimguiname": "ImGuiStackSizes_SetToContextState", "ret": "void", "signature": "(ImGuiContext*)", @@ -8146,107 +8279,72 @@ "stname": "ImGuiStackSizes" } ], - "ImGuiStackTool_ImGuiStackTool": [ - { - "args": "()", - "argsT": [], - "argsoriginal": "()", - "call_args": "()", - "cimguiname": "ImGuiStackTool_ImGuiStackTool", - "constructor": true, - "defaults": {}, - "funcname": "ImGuiStackTool", - "location": "imgui_internal:2001", - "ov_cimguiname": "ImGuiStackTool_ImGuiStackTool", - "signature": "()", - "stname": "ImGuiStackTool" - } - ], - "ImGuiStackTool_destroy": [ - { - "args": "(ImGuiStackTool* self)", - "argsT": [ - { - "name": "self", - "type": "ImGuiStackTool*" - } - ], - "call_args": "(self)", - "cimguiname": "ImGuiStackTool_destroy", - "defaults": {}, - "destructor": true, - "ov_cimguiname": "ImGuiStackTool_destroy", - "ret": "void", - "signature": "(ImGuiStackTool*)", - "stname": "ImGuiStackTool" - } - ], "ImGuiStoragePair_ImGuiStoragePair": [ { - "args": "(ImGuiID _key,int _val_i)", + "args": "(ImGuiID _key,int _val)", "argsT": [ { "name": "_key", "type": "ImGuiID" }, { - "name": "_val_i", + "name": "_val", "type": "int" } ], - "argsoriginal": "(ImGuiID _key,int _val_i)", - "call_args": "(_key,_val_i)", + "argsoriginal": "(ImGuiID _key,int _val)", + "call_args": "(_key,_val)", "cimguiname": "ImGuiStoragePair_ImGuiStoragePair", "constructor": true, "defaults": {}, "funcname": "ImGuiStoragePair", - "location": "imgui:2454", + "location": "imgui:2523", "ov_cimguiname": "ImGuiStoragePair_ImGuiStoragePair_Int", "signature": "(ImGuiID,int)", "stname": "ImGuiStoragePair" }, { - "args": "(ImGuiID _key,float _val_f)", + "args": "(ImGuiID _key,float _val)", "argsT": [ { "name": "_key", "type": "ImGuiID" }, { - "name": "_val_f", + "name": "_val", "type": "float" } ], - "argsoriginal": "(ImGuiID _key,float _val_f)", - "call_args": "(_key,_val_f)", + "argsoriginal": "(ImGuiID _key,float _val)", + "call_args": "(_key,_val)", "cimguiname": "ImGuiStoragePair_ImGuiStoragePair", "constructor": true, "defaults": {}, "funcname": "ImGuiStoragePair", - "location": "imgui:2455", + "location": "imgui:2524", "ov_cimguiname": "ImGuiStoragePair_ImGuiStoragePair_Float", "signature": "(ImGuiID,float)", "stname": "ImGuiStoragePair" }, { - "args": "(ImGuiID _key,void* _val_p)", + "args": "(ImGuiID _key,void* _val)", "argsT": [ { "name": "_key", "type": "ImGuiID" }, { - "name": "_val_p", + "name": "_val", "type": "void*" } ], - "argsoriginal": "(ImGuiID _key,void* _val_p)", - "call_args": "(_key,_val_p)", + "argsoriginal": "(ImGuiID _key,void* _val)", + "call_args": "(_key,_val)", "cimguiname": "ImGuiStoragePair_ImGuiStoragePair", "constructor": true, "defaults": {}, "funcname": "ImGuiStoragePair", - "location": "imgui:2456", + "location": "imgui:2525", "ov_cimguiname": "ImGuiStoragePair_ImGuiStoragePair_Ptr", "signature": "(ImGuiID,void*)", "stname": "ImGuiStoragePair" @@ -8285,7 +8383,7 @@ "cimguiname": "ImGuiStorage_BuildSortByKey", "defaults": {}, "funcname": "BuildSortByKey", - "location": "imgui:2487", + "location": "imgui:2553", "ov_cimguiname": "ImGuiStorage_BuildSortByKey", "ret": "void", "signature": "()", @@ -8306,7 +8404,7 @@ "cimguiname": "ImGuiStorage_Clear", "defaults": {}, "funcname": "Clear", - "location": "imgui:2464", + "location": "imgui:2533", "ov_cimguiname": "ImGuiStorage_Clear", "ret": "void", "signature": "()", @@ -8337,7 +8435,7 @@ "default_val": "false" }, "funcname": "GetBool", - "location": "imgui:2467", + "location": "imgui:2536", "ov_cimguiname": "ImGuiStorage_GetBool", "ret": "bool", "signature": "(ImGuiID,bool)const", @@ -8368,7 +8466,7 @@ "default_val": "false" }, "funcname": "GetBoolRef", - "location": "imgui:2479", + "location": "imgui:2548", "ov_cimguiname": "ImGuiStorage_GetBoolRef", "ret": "bool*", "signature": "(ImGuiID,bool)", @@ -8399,7 +8497,7 @@ "default_val": "0.0f" }, "funcname": "GetFloat", - "location": "imgui:2469", + "location": "imgui:2538", "ov_cimguiname": "ImGuiStorage_GetFloat", "ret": "float", "signature": "(ImGuiID,float)const", @@ -8430,7 +8528,7 @@ "default_val": "0.0f" }, "funcname": "GetFloatRef", - "location": "imgui:2480", + "location": "imgui:2549", "ov_cimguiname": "ImGuiStorage_GetFloatRef", "ret": "float*", "signature": "(ImGuiID,float)", @@ -8461,7 +8559,7 @@ "default_val": "0" }, "funcname": "GetInt", - "location": "imgui:2465", + "location": "imgui:2534", "ov_cimguiname": "ImGuiStorage_GetInt", "ret": "int", "signature": "(ImGuiID,int)const", @@ -8492,7 +8590,7 @@ "default_val": "0" }, "funcname": "GetIntRef", - "location": "imgui:2478", + "location": "imgui:2547", "ov_cimguiname": "ImGuiStorage_GetIntRef", "ret": "int*", "signature": "(ImGuiID,int)", @@ -8518,7 +8616,7 @@ "comment": "// default_val is NULL", "defaults": {}, "funcname": "GetVoidPtr", - "location": "imgui:2471", + "location": "imgui:2540", "ov_cimguiname": "ImGuiStorage_GetVoidPtr", "ret": "void*", "signature": "(ImGuiID)const", @@ -8549,7 +8647,7 @@ "default_val": "NULL" }, "funcname": "GetVoidPtrRef", - "location": "imgui:2481", + "location": "imgui:2550", "ov_cimguiname": "ImGuiStorage_GetVoidPtrRef", "ret": "void**", "signature": "(ImGuiID,void*)", @@ -8574,7 +8672,7 @@ "cimguiname": "ImGuiStorage_SetAllInt", "defaults": {}, "funcname": "SetAllInt", - "location": "imgui:2484", + "location": "imgui:2555", "ov_cimguiname": "ImGuiStorage_SetAllInt", "ret": "void", "signature": "(int)", @@ -8603,7 +8701,7 @@ "cimguiname": "ImGuiStorage_SetBool", "defaults": {}, "funcname": "SetBool", - "location": "imgui:2468", + "location": "imgui:2537", "ov_cimguiname": "ImGuiStorage_SetBool", "ret": "void", "signature": "(ImGuiID,bool)", @@ -8632,7 +8730,7 @@ "cimguiname": "ImGuiStorage_SetFloat", "defaults": {}, "funcname": "SetFloat", - "location": "imgui:2470", + "location": "imgui:2539", "ov_cimguiname": "ImGuiStorage_SetFloat", "ret": "void", "signature": "(ImGuiID,float)", @@ -8661,7 +8759,7 @@ "cimguiname": "ImGuiStorage_SetInt", "defaults": {}, "funcname": "SetInt", - "location": "imgui:2466", + "location": "imgui:2535", "ov_cimguiname": "ImGuiStorage_SetInt", "ret": "void", "signature": "(ImGuiID,int)", @@ -8690,7 +8788,7 @@ "cimguiname": "ImGuiStorage_SetVoidPtr", "defaults": {}, "funcname": "SetVoidPtr", - "location": "imgui:2472", + "location": "imgui:2541", "ov_cimguiname": "ImGuiStorage_SetVoidPtr", "ret": "void", "signature": "(ImGuiID,void*)", @@ -8716,7 +8814,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiStyleMod", - "location": "imgui_internal:1050", + "location": "imgui_internal:1010", "ov_cimguiname": "ImGuiStyleMod_ImGuiStyleMod_Int", "signature": "(ImGuiStyleVar,int)", "stname": "ImGuiStyleMod" @@ -8739,7 +8837,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiStyleMod", - "location": "imgui_internal:1051", + "location": "imgui_internal:1011", "ov_cimguiname": "ImGuiStyleMod_ImGuiStyleMod_Float", "signature": "(ImGuiStyleVar,float)", "stname": "ImGuiStyleMod" @@ -8762,7 +8860,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiStyleMod", - "location": "imgui_internal:1052", + "location": "imgui_internal:1012", "ov_cimguiname": "ImGuiStyleMod_ImGuiStyleMod_Vec2", "signature": "(ImGuiStyleVar,ImVec2)", "stname": "ImGuiStyleMod" @@ -8797,7 +8895,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiStyle", - "location": "imgui:2024", + "location": "imgui:2115", "ov_cimguiname": "ImGuiStyle_ImGuiStyle", "signature": "()", "stname": "ImGuiStyle" @@ -8821,7 +8919,7 @@ "cimguiname": "ImGuiStyle_ScaleAllSizes", "defaults": {}, "funcname": "ScaleAllSizes", - "location": "imgui:2025", + "location": "imgui:2116", "ov_cimguiname": "ImGuiStyle_ScaleAllSizes", "ret": "void", "signature": "(float)", @@ -8857,7 +8955,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiTabBar", - "location": "imgui_internal:2811", + "location": "imgui_internal:2939", "ov_cimguiname": "ImGuiTabBar_ImGuiTabBar", "signature": "()", "stname": "ImGuiTabBar" @@ -8892,7 +8990,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiTabItem", - "location": "imgui_internal:2771", + "location": "imgui_internal:2899", "ov_cimguiname": "ImGuiTabItem_ImGuiTabItem", "signature": "()", "stname": "ImGuiTabItem" @@ -8927,7 +9025,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiTableColumnSettings", - "location": "imgui_internal:3057", + "location": "imgui_internal:3194", "ov_cimguiname": "ImGuiTableColumnSettings_ImGuiTableColumnSettings", "signature": "()", "stname": "ImGuiTableColumnSettings" @@ -8962,7 +9060,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiTableColumnSortSpecs", - "location": "imgui:2355", + "location": "imgui:1950", "ov_cimguiname": "ImGuiTableColumnSortSpecs_ImGuiTableColumnSortSpecs", "signature": "()", "stname": "ImGuiTableColumnSortSpecs" @@ -8997,7 +9095,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiTableColumn", - "location": "imgui_internal:2873", + "location": "imgui_internal:3001", "ov_cimguiname": "ImGuiTableColumn_ImGuiTableColumn", "signature": "()", "stname": "ImGuiTableColumn" @@ -9032,7 +9130,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiTableInstanceData", - "location": "imgui_internal:2904", + "location": "imgui_internal:3033", "ov_cimguiname": "ImGuiTableInstanceData_ImGuiTableInstanceData", "signature": "()", "stname": "ImGuiTableInstanceData" @@ -9071,7 +9169,7 @@ "cimguiname": "ImGuiTableSettings_GetColumnSettings", "defaults": {}, "funcname": "GetColumnSettings", - "location": "imgui_internal:3080", + "location": "imgui_internal:3217", "ov_cimguiname": "ImGuiTableSettings_GetColumnSettings", "ret": "ImGuiTableColumnSettings*", "signature": "()", @@ -9088,7 +9186,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiTableSettings", - "location": "imgui_internal:3079", + "location": "imgui_internal:3216", "ov_cimguiname": "ImGuiTableSettings_ImGuiTableSettings", "signature": "()", "stname": "ImGuiTableSettings" @@ -9123,7 +9221,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiTableSortSpecs", - "location": "imgui:2368", + "location": "imgui:1939", "ov_cimguiname": "ImGuiTableSortSpecs_ImGuiTableSortSpecs", "signature": "()", "stname": "ImGuiTableSortSpecs" @@ -9158,7 +9256,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiTableTempData", - "location": "imgui_internal:3042", + "location": "imgui_internal:3179", "ov_cimguiname": "ImGuiTableTempData_ImGuiTableTempData", "signature": "()", "stname": "ImGuiTableTempData" @@ -9193,7 +9291,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiTable", - "location": "imgui_internal:3017", + "location": "imgui_internal:3153", "ov_cimguiname": "ImGuiTable_ImGuiTable", "signature": "()", "stname": "ImGuiTable" @@ -9212,7 +9310,7 @@ "cimguiname": "ImGuiTable_destroy", "defaults": {}, "destructor": true, - "location": "imgui_internal:3018", + "location": "imgui_internal:3154", "ov_cimguiname": "ImGuiTable_destroy", "realdestructor": true, "ret": "void", @@ -9230,7 +9328,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiTextBuffer", - "location": "imgui:2425", + "location": "imgui:2494", "ov_cimguiname": "ImGuiTextBuffer_ImGuiTextBuffer", "signature": "()", "stname": "ImGuiTextBuffer" @@ -9260,7 +9358,7 @@ "str_end": "NULL" }, "funcname": "append", - "location": "imgui:2434", + "location": "imgui:2503", "ov_cimguiname": "ImGuiTextBuffer_append", "ret": "void", "signature": "(const char*,const char*)", @@ -9290,7 +9388,7 @@ "defaults": {}, "funcname": "appendf", "isvararg": "...)", - "location": "imgui:2435", + "location": "imgui:2504", "manual": true, "ov_cimguiname": "ImGuiTextBuffer_appendf", "ret": "void", @@ -9320,7 +9418,7 @@ "cimguiname": "ImGuiTextBuffer_appendfv", "defaults": {}, "funcname": "appendfv", - "location": "imgui:2436", + "location": "imgui:2505", "ov_cimguiname": "ImGuiTextBuffer_appendfv", "ret": "void", "signature": "(const char*,va_list)", @@ -9341,7 +9439,7 @@ "cimguiname": "ImGuiTextBuffer_begin", "defaults": {}, "funcname": "begin", - "location": "imgui:2427", + "location": "imgui:2496", "ov_cimguiname": "ImGuiTextBuffer_begin", "ret": "const char*", "signature": "()const", @@ -9362,7 +9460,7 @@ "cimguiname": "ImGuiTextBuffer_c_str", "defaults": {}, "funcname": "c_str", - "location": "imgui:2433", + "location": "imgui:2502", "ov_cimguiname": "ImGuiTextBuffer_c_str", "ret": "const char*", "signature": "()const", @@ -9383,7 +9481,7 @@ "cimguiname": "ImGuiTextBuffer_clear", "defaults": {}, "funcname": "clear", - "location": "imgui:2431", + "location": "imgui:2500", "ov_cimguiname": "ImGuiTextBuffer_clear", "ret": "void", "signature": "()", @@ -9423,7 +9521,7 @@ "cimguiname": "ImGuiTextBuffer_empty", "defaults": {}, "funcname": "empty", - "location": "imgui:2430", + "location": "imgui:2499", "ov_cimguiname": "ImGuiTextBuffer_empty", "ret": "bool", "signature": "()const", @@ -9445,7 +9543,7 @@ "comment": "// Buf is zero-terminated, so end() will point on the zero-terminator", "defaults": {}, "funcname": "end", - "location": "imgui:2428", + "location": "imgui:2497", "ov_cimguiname": "ImGuiTextBuffer_end", "ret": "const char*", "signature": "()const", @@ -9470,7 +9568,7 @@ "cimguiname": "ImGuiTextBuffer_reserve", "defaults": {}, "funcname": "reserve", - "location": "imgui:2432", + "location": "imgui:2501", "ov_cimguiname": "ImGuiTextBuffer_reserve", "ret": "void", "signature": "(int)", @@ -9491,7 +9589,7 @@ "cimguiname": "ImGuiTextBuffer_size", "defaults": {}, "funcname": "size", - "location": "imgui:2429", + "location": "imgui:2498", "ov_cimguiname": "ImGuiTextBuffer_size", "ret": "int", "signature": "()const", @@ -9512,7 +9610,7 @@ "cimguiname": "ImGuiTextFilter_Build", "defaults": {}, "funcname": "Build", - "location": "imgui:2398", + "location": "imgui:2467", "ov_cimguiname": "ImGuiTextFilter_Build", "ret": "void", "signature": "()", @@ -9533,7 +9631,7 @@ "cimguiname": "ImGuiTextFilter_Clear", "defaults": {}, "funcname": "Clear", - "location": "imgui:2399", + "location": "imgui:2468", "ov_cimguiname": "ImGuiTextFilter_Clear", "ret": "void", "signature": "()", @@ -9566,7 +9664,7 @@ "width": "0.0f" }, "funcname": "Draw", - "location": "imgui:2396", + "location": "imgui:2465", "ov_cimguiname": "ImGuiTextFilter_Draw", "ret": "bool", "signature": "(const char*,float)", @@ -9590,7 +9688,7 @@ "default_filter": "\"\"" }, "funcname": "ImGuiTextFilter", - "location": "imgui:2395", + "location": "imgui:2464", "ov_cimguiname": "ImGuiTextFilter_ImGuiTextFilter", "signature": "(const char*)", "stname": "ImGuiTextFilter" @@ -9610,7 +9708,7 @@ "cimguiname": "ImGuiTextFilter_IsActive", "defaults": {}, "funcname": "IsActive", - "location": "imgui:2400", + "location": "imgui:2469", "ov_cimguiname": "ImGuiTextFilter_IsActive", "ret": "bool", "signature": "()const", @@ -9641,7 +9739,7 @@ "text_end": "NULL" }, "funcname": "PassFilter", - "location": "imgui:2397", + "location": "imgui:2466", "ov_cimguiname": "ImGuiTextFilter_PassFilter", "ret": "bool", "signature": "(const char*,const char*)const", @@ -9693,7 +9791,7 @@ "cimguiname": "ImGuiTextIndex_append", "defaults": {}, "funcname": "append", - "location": "imgui_internal:744", + "location": "imgui_internal:741", "ov_cimguiname": "ImGuiTextIndex_append", "ret": "void", "signature": "(const char*,int,int)", @@ -9714,7 +9812,7 @@ "cimguiname": "ImGuiTextIndex_clear", "defaults": {}, "funcname": "clear", - "location": "imgui_internal:740", + "location": "imgui_internal:737", "ov_cimguiname": "ImGuiTextIndex_clear", "ret": "void", "signature": "()", @@ -9743,7 +9841,7 @@ "cimguiname": "ImGuiTextIndex_get_line_begin", "defaults": {}, "funcname": "get_line_begin", - "location": "imgui_internal:742", + "location": "imgui_internal:739", "ov_cimguiname": "ImGuiTextIndex_get_line_begin", "ret": "const char*", "signature": "(const char*,int)", @@ -9772,7 +9870,7 @@ "cimguiname": "ImGuiTextIndex_get_line_end", "defaults": {}, "funcname": "get_line_end", - "location": "imgui_internal:743", + "location": "imgui_internal:740", "ov_cimguiname": "ImGuiTextIndex_get_line_end", "ret": "const char*", "signature": "(const char*,int)", @@ -9793,7 +9891,7 @@ "cimguiname": "ImGuiTextIndex_size", "defaults": {}, "funcname": "size", - "location": "imgui_internal:741", + "location": "imgui_internal:738", "ov_cimguiname": "ImGuiTextIndex_size", "ret": "int", "signature": "()", @@ -9810,7 +9908,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiTextRange", - "location": "imgui:2408", + "location": "imgui:2477", "ov_cimguiname": "ImGuiTextRange_ImGuiTextRange_Nil", "signature": "()", "stname": "ImGuiTextRange" @@ -9833,7 +9931,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiTextRange", - "location": "imgui:2409", + "location": "imgui:2478", "ov_cimguiname": "ImGuiTextRange_ImGuiTextRange_Str", "signature": "(const char*,const char*)", "stname": "ImGuiTextRange" @@ -9872,7 +9970,7 @@ "cimguiname": "ImGuiTextRange_empty", "defaults": {}, "funcname": "empty", - "location": "imgui:2410", + "location": "imgui:2479", "ov_cimguiname": "ImGuiTextRange_empty", "ret": "bool", "signature": "()const", @@ -9901,7 +9999,7 @@ "cimguiname": "ImGuiTextRange_split", "defaults": {}, "funcname": "split", - "location": "imgui:2411", + "location": "imgui:2480", "ov_cimguiname": "ImGuiTextRange_split", "ret": "void", "signature": "(char,ImVector_ImGuiTextRange*)const", @@ -9923,7 +10021,7 @@ "comment": "// We preserve remaining data for easier debugging", "defaults": {}, "funcname": "Clear", - "location": "imgui_internal:1613", + "location": "imgui_internal:1667", "ov_cimguiname": "ImGuiTypingSelectState_Clear", "ret": "void", "signature": "()", @@ -9940,7 +10038,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiTypingSelectState", - "location": "imgui_internal:1612", + "location": "imgui_internal:1666", "ov_cimguiname": "ImGuiTypingSelectState_ImGuiTypingSelectState", "signature": "()", "stname": "ImGuiTypingSelectState" @@ -9987,7 +10085,7 @@ "cimguiname": "ImGuiViewportP_CalcWorkRectPos", "defaults": {}, "funcname": "CalcWorkRectPos", - "location": "imgui_internal:1866", + "location": "imgui_internal:1921", "nonUDT": 1, "ov_cimguiname": "ImGuiViewportP_CalcWorkRectPos", "ret": "void", @@ -10021,7 +10119,7 @@ "cimguiname": "ImGuiViewportP_CalcWorkRectSize", "defaults": {}, "funcname": "CalcWorkRectSize", - "location": "imgui_internal:1867", + "location": "imgui_internal:1922", "nonUDT": 1, "ov_cimguiname": "ImGuiViewportP_CalcWorkRectSize", "ret": "void", @@ -10043,7 +10141,7 @@ "cimguiname": "ImGuiViewportP_ClearRequestFlags", "defaults": {}, "funcname": "ClearRequestFlags", - "location": "imgui_internal:1863", + "location": "imgui_internal:1918", "ov_cimguiname": "ImGuiViewportP_ClearRequestFlags", "ret": "void", "signature": "()", @@ -10068,7 +10166,7 @@ "cimguiname": "ImGuiViewportP_GetBuildWorkRect", "defaults": {}, "funcname": "GetBuildWorkRect", - "location": "imgui_internal:1873", + "location": "imgui_internal:1928", "nonUDT": 1, "ov_cimguiname": "ImGuiViewportP_GetBuildWorkRect", "ret": "void", @@ -10094,7 +10192,7 @@ "cimguiname": "ImGuiViewportP_GetMainRect", "defaults": {}, "funcname": "GetMainRect", - "location": "imgui_internal:1871", + "location": "imgui_internal:1926", "nonUDT": 1, "ov_cimguiname": "ImGuiViewportP_GetMainRect", "ret": "void", @@ -10120,7 +10218,7 @@ "cimguiname": "ImGuiViewportP_GetWorkRect", "defaults": {}, "funcname": "GetWorkRect", - "location": "imgui_internal:1872", + "location": "imgui_internal:1927", "nonUDT": 1, "ov_cimguiname": "ImGuiViewportP_GetWorkRect", "ret": "void", @@ -10138,7 +10236,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiViewportP", - "location": "imgui_internal:1861", + "location": "imgui_internal:1916", "ov_cimguiname": "ImGuiViewportP_ImGuiViewportP", "signature": "()", "stname": "ImGuiViewportP" @@ -10159,7 +10257,7 @@ "comment": "// Update public fields", "defaults": {}, "funcname": "UpdateWorkRect", - "location": "imgui_internal:1868", + "location": "imgui_internal:1923", "ov_cimguiname": "ImGuiViewportP_UpdateWorkRect", "ret": "void", "signature": "()", @@ -10179,7 +10277,7 @@ "cimguiname": "ImGuiViewportP_destroy", "defaults": {}, "destructor": true, - "location": "imgui_internal:1862", + "location": "imgui_internal:1917", "ov_cimguiname": "ImGuiViewportP_destroy", "realdestructor": true, "ret": "void", @@ -10205,7 +10303,7 @@ "cimguiname": "ImGuiViewport_GetCenter", "defaults": {}, "funcname": "GetCenter", - "location": "imgui:3214", + "location": "imgui:3288", "nonUDT": 1, "ov_cimguiname": "ImGuiViewport_GetCenter", "ret": "void", @@ -10231,7 +10329,7 @@ "cimguiname": "ImGuiViewport_GetWorkCenter", "defaults": {}, "funcname": "GetWorkCenter", - "location": "imgui:3215", + "location": "imgui:3289", "nonUDT": 1, "ov_cimguiname": "ImGuiViewport_GetWorkCenter", "ret": "void", @@ -10249,7 +10347,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiViewport", - "location": "imgui:3210", + "location": "imgui:3284", "ov_cimguiname": "ImGuiViewport_ImGuiViewport", "signature": "()", "stname": "ImGuiViewport" @@ -10268,7 +10366,7 @@ "cimguiname": "ImGuiViewport_destroy", "defaults": {}, "destructor": true, - "location": "imgui:3211", + "location": "imgui:3285", "ov_cimguiname": "ImGuiViewport_destroy", "realdestructor": true, "ret": "void", @@ -10286,7 +10384,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiWindowClass", - "location": "imgui:2322", + "location": "imgui:2415", "ov_cimguiname": "ImGuiWindowClass_ImGuiWindowClass", "signature": "()", "stname": "ImGuiWindowClass" @@ -10325,7 +10423,7 @@ "cimguiname": "ImGuiWindowSettings_GetName", "defaults": {}, "funcname": "GetName", - "location": "imgui_internal:1898", + "location": "imgui_internal:1954", "ov_cimguiname": "ImGuiWindowSettings_GetName", "ret": "char*", "signature": "()", @@ -10342,7 +10440,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiWindowSettings", - "location": "imgui_internal:1897", + "location": "imgui_internal:1953", "ov_cimguiname": "ImGuiWindowSettings_ImGuiWindowSettings", "signature": "()", "stname": "ImGuiWindowSettings" @@ -10381,7 +10479,7 @@ "cimguiname": "ImGuiWindow_CalcFontSize", "defaults": {}, "funcname": "CalcFontSize", - "location": "imgui_internal:2726", + "location": "imgui_internal:2854", "ov_cimguiname": "ImGuiWindow_CalcFontSize", "ret": "float", "signature": "()const", @@ -10412,7 +10510,7 @@ "str_end": "NULL" }, "funcname": "GetID", - "location": "imgui_internal:2719", + "location": "imgui_internal:2847", "ov_cimguiname": "ImGuiWindow_GetID_Str", "ret": "ImGuiID", "signature": "(const char*,const char*)", @@ -10435,7 +10533,7 @@ "cimguiname": "ImGuiWindow_GetID", "defaults": {}, "funcname": "GetID", - "location": "imgui_internal:2720", + "location": "imgui_internal:2848", "ov_cimguiname": "ImGuiWindow_GetID_Ptr", "ret": "ImGuiID", "signature": "(const void*)", @@ -10458,7 +10556,7 @@ "cimguiname": "ImGuiWindow_GetID", "defaults": {}, "funcname": "GetID", - "location": "imgui_internal:2721", + "location": "imgui_internal:2849", "ov_cimguiname": "ImGuiWindow_GetID_Int", "ret": "ImGuiID", "signature": "(int)", @@ -10483,7 +10581,7 @@ "cimguiname": "ImGuiWindow_GetIDFromRectangle", "defaults": {}, "funcname": "GetIDFromRectangle", - "location": "imgui_internal:2722", + "location": "imgui_internal:2850", "ov_cimguiname": "ImGuiWindow_GetIDFromRectangle", "ret": "ImGuiID", "signature": "(const ImRect)", @@ -10509,7 +10607,7 @@ "constructor": true, "defaults": {}, "funcname": "ImGuiWindow", - "location": "imgui_internal:2715", + "location": "imgui_internal:2843", "ov_cimguiname": "ImGuiWindow_ImGuiWindow", "signature": "(ImGuiContext*,const char*)", "stname": "ImGuiWindow" @@ -10529,7 +10627,7 @@ "cimguiname": "ImGuiWindow_MenuBarHeight", "defaults": {}, "funcname": "MenuBarHeight", - "location": "imgui_internal:2729", + "location": "imgui_internal:2857", "ov_cimguiname": "ImGuiWindow_MenuBarHeight", "ret": "float", "signature": "()const", @@ -10554,7 +10652,7 @@ "cimguiname": "ImGuiWindow_MenuBarRect", "defaults": {}, "funcname": "MenuBarRect", - "location": "imgui_internal:2730", + "location": "imgui_internal:2858", "nonUDT": 1, "ov_cimguiname": "ImGuiWindow_MenuBarRect", "ret": "void", @@ -10580,7 +10678,7 @@ "cimguiname": "ImGuiWindow_Rect", "defaults": {}, "funcname": "Rect", - "location": "imgui_internal:2725", + "location": "imgui_internal:2853", "nonUDT": 1, "ov_cimguiname": "ImGuiWindow_Rect", "ret": "void", @@ -10602,7 +10700,7 @@ "cimguiname": "ImGuiWindow_TitleBarHeight", "defaults": {}, "funcname": "TitleBarHeight", - "location": "imgui_internal:2727", + "location": "imgui_internal:2855", "ov_cimguiname": "ImGuiWindow_TitleBarHeight", "ret": "float", "signature": "()const", @@ -10627,7 +10725,7 @@ "cimguiname": "ImGuiWindow_TitleBarRect", "defaults": {}, "funcname": "TitleBarRect", - "location": "imgui_internal:2728", + "location": "imgui_internal:2856", "nonUDT": 1, "ov_cimguiname": "ImGuiWindow_TitleBarRect", "ret": "void", @@ -10648,7 +10746,7 @@ "cimguiname": "ImGuiWindow_destroy", "defaults": {}, "destructor": true, - "location": "imgui_internal:2717", + "location": "imgui_internal:2845", "ov_cimguiname": "ImGuiWindow_destroy", "realdestructor": true, "ret": "void", @@ -10670,7 +10768,7 @@ "cimguiname": "ImPool_Add", "defaults": {}, "funcname": "Add", - "location": "imgui_internal:693", + "location": "imgui_internal:694", "ov_cimguiname": "ImPool_Add", "ret": "T*", "signature": "()", @@ -10692,7 +10790,7 @@ "cimguiname": "ImPool_Clear", "defaults": {}, "funcname": "Clear", - "location": "imgui_internal:692", + "location": "imgui_internal:693", "ov_cimguiname": "ImPool_Clear", "ret": "void", "signature": "()", @@ -10718,7 +10816,7 @@ "cimguiname": "ImPool_Contains", "defaults": {}, "funcname": "Contains", - "location": "imgui_internal:691", + "location": "imgui_internal:692", "ov_cimguiname": "ImPool_Contains", "ret": "bool", "signature": "(const T*)const", @@ -10741,7 +10839,7 @@ "comment": "// Number of active/alive items in the pool (for display purpose)", "defaults": {}, "funcname": "GetAliveCount", - "location": "imgui_internal:700", + "location": "imgui_internal:701", "ov_cimguiname": "ImPool_GetAliveCount", "ret": "int", "signature": "()const", @@ -10763,7 +10861,7 @@ "cimguiname": "ImPool_GetBufSize", "defaults": {}, "funcname": "GetBufSize", - "location": "imgui_internal:701", + "location": "imgui_internal:702", "ov_cimguiname": "ImPool_GetBufSize", "ret": "int", "signature": "()const", @@ -10789,7 +10887,7 @@ "cimguiname": "ImPool_GetByIndex", "defaults": {}, "funcname": "GetByIndex", - "location": "imgui_internal:688", + "location": "imgui_internal:689", "ov_cimguiname": "ImPool_GetByIndex", "ret": "T*", "signature": "(ImPoolIdx)", @@ -10815,7 +10913,7 @@ "cimguiname": "ImPool_GetByKey", "defaults": {}, "funcname": "GetByKey", - "location": "imgui_internal:687", + "location": "imgui_internal:688", "ov_cimguiname": "ImPool_GetByKey", "ret": "T*", "signature": "(ImGuiID)", @@ -10841,7 +10939,7 @@ "cimguiname": "ImPool_GetIndex", "defaults": {}, "funcname": "GetIndex", - "location": "imgui_internal:689", + "location": "imgui_internal:690", "ov_cimguiname": "ImPool_GetIndex", "ret": "ImPoolIdx", "signature": "(const T*)const", @@ -10864,7 +10962,7 @@ "comment": "// It is the map we need iterate to find valid items, since we don't have \"alive\" storage anywhere", "defaults": {}, "funcname": "GetMapSize", - "location": "imgui_internal:702", + "location": "imgui_internal:703", "ov_cimguiname": "ImPool_GetMapSize", "ret": "int", "signature": "()const", @@ -10890,7 +10988,7 @@ "cimguiname": "ImPool_GetOrAddByKey", "defaults": {}, "funcname": "GetOrAddByKey", - "location": "imgui_internal:690", + "location": "imgui_internal:691", "ov_cimguiname": "ImPool_GetOrAddByKey", "ret": "T*", "signature": "(ImGuiID)", @@ -10908,7 +11006,7 @@ "constructor": true, "defaults": {}, "funcname": "ImPool", - "location": "imgui_internal:685", + "location": "imgui_internal:686", "ov_cimguiname": "ImPool_ImPool", "signature": "()", "stname": "ImPool", @@ -10937,7 +11035,7 @@ "cimguiname": "ImPool_Remove", "defaults": {}, "funcname": "Remove", - "location": "imgui_internal:694", + "location": "imgui_internal:695", "ov_cimguiname": "ImPool_Remove_TPtr", "ret": "void", "signature": "(ImGuiID,const T*)", @@ -10965,7 +11063,7 @@ "cimguiname": "ImPool_Remove", "defaults": {}, "funcname": "Remove", - "location": "imgui_internal:695", + "location": "imgui_internal:696", "ov_cimguiname": "ImPool_Remove_PoolIdx", "ret": "void", "signature": "(ImGuiID,ImPoolIdx)", @@ -10991,7 +11089,7 @@ "cimguiname": "ImPool_Reserve", "defaults": {}, "funcname": "Reserve", - "location": "imgui_internal:696", + "location": "imgui_internal:697", "ov_cimguiname": "ImPool_Reserve", "ret": "void", "signature": "(int)", @@ -11017,7 +11115,7 @@ "cimguiname": "ImPool_TryGetMapData", "defaults": {}, "funcname": "TryGetMapData", - "location": "imgui_internal:703", + "location": "imgui_internal:704", "ov_cimguiname": "ImPool_TryGetMapData", "ret": "T*", "signature": "(ImPoolIdx)", @@ -11038,7 +11136,7 @@ "cimguiname": "ImPool_destroy", "defaults": {}, "destructor": true, - "location": "imgui_internal:686", + "location": "imgui_internal:687", "ov_cimguiname": "ImPool_destroy", "realdestructor": true, "ret": "void", @@ -11065,7 +11163,7 @@ "cimguiname": "ImRect_Add", "defaults": {}, "funcname": "Add", - "location": "imgui_internal:556", + "location": "imgui_internal:557", "ov_cimguiname": "ImRect_Add_Vec2", "ret": "void", "signature": "(const ImVec2)", @@ -11088,7 +11186,7 @@ "cimguiname": "ImRect_Add", "defaults": {}, "funcname": "Add", - "location": "imgui_internal:557", + "location": "imgui_internal:558", "ov_cimguiname": "ImRect_Add_Rect", "ret": "void", "signature": "(const ImRect)", @@ -11114,7 +11212,7 @@ "comment": "// Simple version, may lead to an inverted rectangle, which is fine for Contains/Overlaps test but not for display.", "defaults": {}, "funcname": "ClipWith", - "location": "imgui_internal:563", + "location": "imgui_internal:564", "ov_cimguiname": "ImRect_ClipWith", "ret": "void", "signature": "(const ImRect)", @@ -11140,7 +11238,7 @@ "comment": "// Full version, ensure both points are fully clipped.", "defaults": {}, "funcname": "ClipWithFull", - "location": "imgui_internal:564", + "location": "imgui_internal:565", "ov_cimguiname": "ImRect_ClipWithFull", "ret": "void", "signature": "(const ImRect)", @@ -11195,6 +11293,35 @@ "stname": "ImRect" } ], + "ImRect_ContainsWithPad": [ + { + "args": "(ImRect* self,const ImVec2 p,const ImVec2 pad)", + "argsT": [ + { + "name": "self", + "type": "ImRect*" + }, + { + "name": "p", + "type": "const ImVec2" + }, + { + "name": "pad", + "type": "const ImVec2" + } + ], + "argsoriginal": "(const ImVec2& p,const ImVec2& pad)", + "call_args": "(p,pad)", + "cimguiname": "ImRect_ContainsWithPad", + "defaults": {}, + "funcname": "ContainsWithPad", + "location": "imgui_internal:555", + "ov_cimguiname": "ImRect_ContainsWithPad", + "ret": "bool", + "signature": "(const ImVec2,const ImVec2)const", + "stname": "ImRect" + } + ], "ImRect_Expand": [ { "args": "(ImRect* self,const float amount)", @@ -11213,7 +11340,7 @@ "cimguiname": "ImRect_Expand", "defaults": {}, "funcname": "Expand", - "location": "imgui_internal:558", + "location": "imgui_internal:559", "ov_cimguiname": "ImRect_Expand_Float", "ret": "void", "signature": "(const float)", @@ -11236,7 +11363,7 @@ "cimguiname": "ImRect_Expand", "defaults": {}, "funcname": "Expand", - "location": "imgui_internal:559", + "location": "imgui_internal:560", "ov_cimguiname": "ImRect_Expand_Vec2", "ret": "void", "signature": "(const ImVec2)", @@ -11257,7 +11384,7 @@ "cimguiname": "ImRect_Floor", "defaults": {}, "funcname": "Floor", - "location": "imgui_internal:565", + "location": "imgui_internal:566", "ov_cimguiname": "ImRect_Floor", "ret": "void", "signature": "()", @@ -11590,7 +11717,7 @@ "cimguiname": "ImRect_IsInverted", "defaults": {}, "funcname": "IsInverted", - "location": "imgui_internal:566", + "location": "imgui_internal:567", "ov_cimguiname": "ImRect_IsInverted", "ret": "bool", "signature": "()const", @@ -11615,7 +11742,7 @@ "cimguiname": "ImRect_Overlaps", "defaults": {}, "funcname": "Overlaps", - "location": "imgui_internal:555", + "location": "imgui_internal:556", "ov_cimguiname": "ImRect_Overlaps", "ret": "bool", "signature": "(const ImRect)const", @@ -11640,7 +11767,7 @@ "cimguiname": "ImRect_ToVec4", "defaults": {}, "funcname": "ToVec4", - "location": "imgui_internal:567", + "location": "imgui_internal:568", "nonUDT": 1, "ov_cimguiname": "ImRect_ToVec4", "ret": "void", @@ -11666,7 +11793,7 @@ "cimguiname": "ImRect_Translate", "defaults": {}, "funcname": "Translate", - "location": "imgui_internal:560", + "location": "imgui_internal:561", "ov_cimguiname": "ImRect_Translate", "ret": "void", "signature": "(const ImVec2)", @@ -11691,7 +11818,7 @@ "cimguiname": "ImRect_TranslateX", "defaults": {}, "funcname": "TranslateX", - "location": "imgui_internal:561", + "location": "imgui_internal:562", "ov_cimguiname": "ImRect_TranslateX", "ret": "void", "signature": "(float)", @@ -11716,7 +11843,7 @@ "cimguiname": "ImRect_TranslateY", "defaults": {}, "funcname": "TranslateY", - "location": "imgui_internal:562", + "location": "imgui_internal:563", "ov_cimguiname": "ImRect_TranslateY", "ret": "void", "signature": "(float)", @@ -11756,7 +11883,7 @@ "cimguiname": "ImSpanAllocator_GetArenaSizeInBytes", "defaults": {}, "funcname": "GetArenaSizeInBytes", - "location": "imgui_internal:665", + "location": "imgui_internal:666", "ov_cimguiname": "ImSpanAllocator_GetArenaSizeInBytes", "ret": "int", "signature": "()", @@ -11782,7 +11909,7 @@ "cimguiname": "ImSpanAllocator_GetSpanPtrBegin", "defaults": {}, "funcname": "GetSpanPtrBegin", - "location": "imgui_internal:667", + "location": "imgui_internal:668", "ov_cimguiname": "ImSpanAllocator_GetSpanPtrBegin", "ret": "void*", "signature": "(int)", @@ -11808,7 +11935,7 @@ "cimguiname": "ImSpanAllocator_GetSpanPtrEnd", "defaults": {}, "funcname": "GetSpanPtrEnd", - "location": "imgui_internal:668", + "location": "imgui_internal:669", "ov_cimguiname": "ImSpanAllocator_GetSpanPtrEnd", "ret": "void*", "signature": "(int)", @@ -11826,7 +11953,7 @@ "constructor": true, "defaults": {}, "funcname": "ImSpanAllocator", - "location": "imgui_internal:663", + "location": "imgui_internal:664", "ov_cimguiname": "ImSpanAllocator_ImSpanAllocator", "signature": "()", "stname": "ImSpanAllocator", @@ -11861,7 +11988,7 @@ "a": "4" }, "funcname": "Reserve", - "location": "imgui_internal:664", + "location": "imgui_internal:665", "ov_cimguiname": "ImSpanAllocator_Reserve", "ret": "void", "signature": "(int,size_t,int)", @@ -11887,7 +12014,7 @@ "cimguiname": "ImSpanAllocator_SetArenaBasePtr", "defaults": {}, "funcname": "SetArenaBasePtr", - "location": "imgui_internal:666", + "location": "imgui_internal:667", "ov_cimguiname": "ImSpanAllocator_SetArenaBasePtr", "ret": "void", "signature": "(void*)", @@ -11925,7 +12052,7 @@ "constructor": true, "defaults": {}, "funcname": "ImSpan", - "location": "imgui_internal:631", + "location": "imgui_internal:632", "ov_cimguiname": "ImSpan_ImSpan_Nil", "signature": "()", "stname": "ImSpan", @@ -11949,7 +12076,7 @@ "constructor": true, "defaults": {}, "funcname": "ImSpan", - "location": "imgui_internal:632", + "location": "imgui_internal:633", "ov_cimguiname": "ImSpan_ImSpan_TPtrInt", "signature": "(T*,int)", "stname": "ImSpan", @@ -11973,7 +12100,7 @@ "constructor": true, "defaults": {}, "funcname": "ImSpan", - "location": "imgui_internal:633", + "location": "imgui_internal:634", "ov_cimguiname": "ImSpan_ImSpan_TPtrTPtr", "signature": "(T*,T*)", "stname": "ImSpan", @@ -11994,7 +12121,7 @@ "cimguiname": "ImSpan_begin", "defaults": {}, "funcname": "begin", - "location": "imgui_internal:642", + "location": "imgui_internal:643", "ov_cimguiname": "ImSpan_begin_Nil", "ret": "T*", "signature": "()", @@ -12014,7 +12141,7 @@ "cimguiname": "ImSpan_begin", "defaults": {}, "funcname": "begin", - "location": "imgui_internal:643", + "location": "imgui_internal:644", "ov_cimguiname": "ImSpan_begin__const", "ret": "const T*", "signature": "()const", @@ -12056,7 +12183,7 @@ "cimguiname": "ImSpan_end", "defaults": {}, "funcname": "end", - "location": "imgui_internal:644", + "location": "imgui_internal:645", "ov_cimguiname": "ImSpan_end_Nil", "ret": "T*", "signature": "()", @@ -12076,7 +12203,7 @@ "cimguiname": "ImSpan_end", "defaults": {}, "funcname": "end", - "location": "imgui_internal:645", + "location": "imgui_internal:646", "ov_cimguiname": "ImSpan_end__const", "ret": "const T*", "signature": "()const", @@ -12102,7 +12229,7 @@ "cimguiname": "ImSpan_index_from_ptr", "defaults": {}, "funcname": "index_from_ptr", - "location": "imgui_internal:648", + "location": "imgui_internal:649", "ov_cimguiname": "ImSpan_index_from_ptr", "ret": "int", "signature": "(const T*)const", @@ -12132,7 +12259,7 @@ "cimguiname": "ImSpan_set", "defaults": {}, "funcname": "set", - "location": "imgui_internal:635", + "location": "imgui_internal:636", "ov_cimguiname": "ImSpan_set_Int", "ret": "void", "signature": "(T*,int)", @@ -12160,7 +12287,7 @@ "cimguiname": "ImSpan_set", "defaults": {}, "funcname": "set", - "location": "imgui_internal:636", + "location": "imgui_internal:637", "ov_cimguiname": "ImSpan_set_TPtr", "ret": "void", "signature": "(T*,T*)", @@ -12182,7 +12309,7 @@ "cimguiname": "ImSpan_size", "defaults": {}, "funcname": "size", - "location": "imgui_internal:637", + "location": "imgui_internal:638", "ov_cimguiname": "ImSpan_size", "ret": "int", "signature": "()const", @@ -12204,7 +12331,7 @@ "cimguiname": "ImSpan_size_in_bytes", "defaults": {}, "funcname": "size_in_bytes", - "location": "imgui_internal:638", + "location": "imgui_internal:639", "ov_cimguiname": "ImSpan_size_in_bytes", "ret": "int", "signature": "()const", @@ -12276,7 +12403,7 @@ "constructor": true, "defaults": {}, "funcname": "ImVec2", - "location": "imgui:267", + "location": "imgui:272", "ov_cimguiname": "ImVec2_ImVec2_Nil", "signature": "()", "stname": "ImVec2" @@ -12299,7 +12426,7 @@ "constructor": true, "defaults": {}, "funcname": "ImVec2", - "location": "imgui:268", + "location": "imgui:273", "ov_cimguiname": "ImVec2_ImVec2_Float", "signature": "(float,float)", "stname": "ImVec2" @@ -12411,7 +12538,7 @@ "constructor": true, "defaults": {}, "funcname": "ImVec4", - "location": "imgui:280", + "location": "imgui:285", "ov_cimguiname": "ImVec4_ImVec4_Nil", "signature": "()", "stname": "ImVec4" @@ -12442,7 +12569,7 @@ "constructor": true, "defaults": {}, "funcname": "ImVec4", - "location": "imgui:281", + "location": "imgui:286", "ov_cimguiname": "ImVec4_ImVec4_Float", "signature": "(float,float,float,float)", "stname": "ImVec4" @@ -12477,7 +12604,7 @@ "constructor": true, "defaults": {}, "funcname": "ImVector", - "location": "imgui:1907", + "location": "imgui:1997", "ov_cimguiname": "ImVector_ImVector_Nil", "signature": "()", "stname": "ImVector", @@ -12497,7 +12624,7 @@ "constructor": true, "defaults": {}, "funcname": "ImVector", - "location": "imgui:1908", + "location": "imgui:1998", "ov_cimguiname": "ImVector_ImVector_Vector_T_", "signature": "(const ImVector_T )", "stname": "ImVector", @@ -12522,7 +12649,7 @@ "cimguiname": "ImVector__grow_capacity", "defaults": {}, "funcname": "_grow_capacity", - "location": "imgui:1934", + "location": "imgui:2024", "ov_cimguiname": "ImVector__grow_capacity", "ret": "int", "signature": "(int)const", @@ -12544,7 +12671,7 @@ "cimguiname": "ImVector_back", "defaults": {}, "funcname": "back", - "location": "imgui:1930", + "location": "imgui:2020", "ov_cimguiname": "ImVector_back_Nil", "ret": "T*", "retref": "&", @@ -12565,7 +12692,7 @@ "cimguiname": "ImVector_back", "defaults": {}, "funcname": "back", - "location": "imgui:1931", + "location": "imgui:2021", "ov_cimguiname": "ImVector_back__const", "ret": "const T*", "retref": "&", @@ -12588,7 +12715,7 @@ "cimguiname": "ImVector_begin", "defaults": {}, "funcname": "begin", - "location": "imgui:1924", + "location": "imgui:2014", "ov_cimguiname": "ImVector_begin_Nil", "ret": "T*", "signature": "()", @@ -12608,7 +12735,7 @@ "cimguiname": "ImVector_begin", "defaults": {}, "funcname": "begin", - "location": "imgui:1925", + "location": "imgui:2015", "ov_cimguiname": "ImVector_begin__const", "ret": "const T*", "signature": "()const", @@ -12630,7 +12757,7 @@ "cimguiname": "ImVector_capacity", "defaults": {}, "funcname": "capacity", - "location": "imgui:1920", + "location": "imgui:2010", "ov_cimguiname": "ImVector_capacity", "ret": "int", "signature": "()const", @@ -12653,7 +12780,7 @@ "comment": "// Important: does not destruct anything", "defaults": {}, "funcname": "clear", - "location": "imgui:1912", + "location": "imgui:2002", "ov_cimguiname": "ImVector_clear", "ret": "void", "signature": "()", @@ -12676,7 +12803,7 @@ "comment": "// Important: never called automatically! always explicit.", "defaults": {}, "funcname": "clear_delete", - "location": "imgui:1913", + "location": "imgui:2003", "ov_cimguiname": "ImVector_clear_delete", "ret": "void", "signature": "()", @@ -12699,7 +12826,7 @@ "comment": "// Important: never called automatically! always explicit.", "defaults": {}, "funcname": "clear_destruct", - "location": "imgui:1914", + "location": "imgui:2004", "ov_cimguiname": "ImVector_clear_destruct", "ret": "void", "signature": "()", @@ -12725,7 +12852,7 @@ "cimguiname": "ImVector_contains", "defaults": {}, "funcname": "contains", - "location": "imgui:1949", + "location": "imgui:2039", "ov_cimguiname": "ImVector_contains", "ret": "bool", "signature": "(const T)const", @@ -12746,7 +12873,7 @@ "cimguiname": "ImVector_destroy", "defaults": {}, "destructor": true, - "location": "imgui:1910", + "location": "imgui:2000", "ov_cimguiname": "ImVector_destroy", "realdestructor": true, "ret": "void", @@ -12769,7 +12896,7 @@ "cimguiname": "ImVector_empty", "defaults": {}, "funcname": "empty", - "location": "imgui:1916", + "location": "imgui:2006", "ov_cimguiname": "ImVector_empty", "ret": "bool", "signature": "()const", @@ -12791,7 +12918,7 @@ "cimguiname": "ImVector_end", "defaults": {}, "funcname": "end", - "location": "imgui:1926", + "location": "imgui:2016", "ov_cimguiname": "ImVector_end_Nil", "ret": "T*", "signature": "()", @@ -12811,7 +12938,7 @@ "cimguiname": "ImVector_end", "defaults": {}, "funcname": "end", - "location": "imgui:1927", + "location": "imgui:2017", "ov_cimguiname": "ImVector_end__const", "ret": "const T*", "signature": "()const", @@ -12837,7 +12964,7 @@ "cimguiname": "ImVector_erase", "defaults": {}, "funcname": "erase", - "location": "imgui:1945", + "location": "imgui:2035", "ov_cimguiname": "ImVector_erase_Nil", "ret": "T*", "signature": "(const T*)", @@ -12865,7 +12992,7 @@ "cimguiname": "ImVector_erase", "defaults": {}, "funcname": "erase", - "location": "imgui:1946", + "location": "imgui:2036", "ov_cimguiname": "ImVector_erase_TPtr", "ret": "T*", "signature": "(const T*,const T*)", @@ -12891,7 +13018,7 @@ "cimguiname": "ImVector_erase_unsorted", "defaults": {}, "funcname": "erase_unsorted", - "location": "imgui:1947", + "location": "imgui:2037", "ov_cimguiname": "ImVector_erase_unsorted", "ret": "T*", "signature": "(const T*)", @@ -12917,7 +13044,7 @@ "cimguiname": "ImVector_find", "defaults": {}, "funcname": "find", - "location": "imgui:1950", + "location": "imgui:2040", "ov_cimguiname": "ImVector_find_Nil", "ret": "T*", "signature": "(const T)", @@ -12941,7 +13068,7 @@ "cimguiname": "ImVector_find", "defaults": {}, "funcname": "find", - "location": "imgui:1951", + "location": "imgui:2041", "ov_cimguiname": "ImVector_find__const", "ret": "const T*", "signature": "(const T)const", @@ -12967,7 +13094,7 @@ "cimguiname": "ImVector_find_erase", "defaults": {}, "funcname": "find_erase", - "location": "imgui:1953", + "location": "imgui:2043", "ov_cimguiname": "ImVector_find_erase", "ret": "bool", "signature": "(const T)", @@ -12993,7 +13120,7 @@ "cimguiname": "ImVector_find_erase_unsorted", "defaults": {}, "funcname": "find_erase_unsorted", - "location": "imgui:1954", + "location": "imgui:2044", "ov_cimguiname": "ImVector_find_erase_unsorted", "ret": "bool", "signature": "(const T)", @@ -13019,7 +13146,7 @@ "cimguiname": "ImVector_find_index", "defaults": {}, "funcname": "find_index", - "location": "imgui:1952", + "location": "imgui:2042", "ov_cimguiname": "ImVector_find_index", "ret": "int", "signature": "(const T)const", @@ -13041,7 +13168,7 @@ "cimguiname": "ImVector_front", "defaults": {}, "funcname": "front", - "location": "imgui:1928", + "location": "imgui:2018", "ov_cimguiname": "ImVector_front_Nil", "ret": "T*", "retref": "&", @@ -13062,7 +13189,7 @@ "cimguiname": "ImVector_front", "defaults": {}, "funcname": "front", - "location": "imgui:1929", + "location": "imgui:2019", "ov_cimguiname": "ImVector_front__const", "ret": "const T*", "retref": "&", @@ -13089,7 +13216,7 @@ "cimguiname": "ImVector_index_from_ptr", "defaults": {}, "funcname": "index_from_ptr", - "location": "imgui:1955", + "location": "imgui:2045", "ov_cimguiname": "ImVector_index_from_ptr", "ret": "int", "signature": "(const T*)const", @@ -13119,7 +13246,7 @@ "cimguiname": "ImVector_insert", "defaults": {}, "funcname": "insert", - "location": "imgui:1948", + "location": "imgui:2038", "ov_cimguiname": "ImVector_insert", "ret": "T*", "signature": "(const T*,const T)", @@ -13141,7 +13268,7 @@ "cimguiname": "ImVector_max_size", "defaults": {}, "funcname": "max_size", - "location": "imgui:1919", + "location": "imgui:2009", "ov_cimguiname": "ImVector_max_size", "ret": "int", "signature": "()const", @@ -13163,7 +13290,7 @@ "cimguiname": "ImVector_pop_back", "defaults": {}, "funcname": "pop_back", - "location": "imgui:1943", + "location": "imgui:2033", "ov_cimguiname": "ImVector_pop_back", "ret": "void", "signature": "()", @@ -13189,7 +13316,7 @@ "cimguiname": "ImVector_push_back", "defaults": {}, "funcname": "push_back", - "location": "imgui:1942", + "location": "imgui:2032", "ov_cimguiname": "ImVector_push_back", "ret": "void", "signature": "(const T)", @@ -13215,7 +13342,7 @@ "cimguiname": "ImVector_push_front", "defaults": {}, "funcname": "push_front", - "location": "imgui:1944", + "location": "imgui:2034", "ov_cimguiname": "ImVector_push_front", "ret": "void", "signature": "(const T)", @@ -13241,7 +13368,7 @@ "cimguiname": "ImVector_reserve", "defaults": {}, "funcname": "reserve", - "location": "imgui:1938", + "location": "imgui:2028", "ov_cimguiname": "ImVector_reserve", "ret": "void", "signature": "(int)", @@ -13267,7 +13394,7 @@ "cimguiname": "ImVector_reserve_discard", "defaults": {}, "funcname": "reserve_discard", - "location": "imgui:1939", + "location": "imgui:2029", "ov_cimguiname": "ImVector_reserve_discard", "ret": "void", "signature": "(int)", @@ -13293,7 +13420,7 @@ "cimguiname": "ImVector_resize", "defaults": {}, "funcname": "resize", - "location": "imgui:1935", + "location": "imgui:2025", "ov_cimguiname": "ImVector_resize_Nil", "ret": "void", "signature": "(int)", @@ -13321,7 +13448,7 @@ "cimguiname": "ImVector_resize", "defaults": {}, "funcname": "resize", - "location": "imgui:1936", + "location": "imgui:2026", "ov_cimguiname": "ImVector_resize_T", "ret": "void", "signature": "(int,const T)", @@ -13348,7 +13475,7 @@ "comment": "// Resize a vector to a smaller size, guaranteed not to cause a reallocation", "defaults": {}, "funcname": "shrink", - "location": "imgui:1937", + "location": "imgui:2027", "ov_cimguiname": "ImVector_shrink", "ret": "void", "signature": "(int)", @@ -13370,7 +13497,7 @@ "cimguiname": "ImVector_size", "defaults": {}, "funcname": "size", - "location": "imgui:1917", + "location": "imgui:2007", "ov_cimguiname": "ImVector_size", "ret": "int", "signature": "()const", @@ -13392,7 +13519,7 @@ "cimguiname": "ImVector_size_in_bytes", "defaults": {}, "funcname": "size_in_bytes", - "location": "imgui:1918", + "location": "imgui:2008", "ov_cimguiname": "ImVector_size_in_bytes", "ret": "int", "signature": "()const", @@ -13419,7 +13546,7 @@ "cimguiname": "ImVector_swap", "defaults": {}, "funcname": "swap", - "location": "imgui:1932", + "location": "imgui:2022", "ov_cimguiname": "ImVector_swap", "ret": "void", "signature": "(ImVector_T *)", @@ -13448,7 +13575,7 @@ "flags": "0" }, "funcname": "AcceptDragDropPayload", - "location": "imgui:856", + "location": "imgui:873", "namespace": "ImGui", "ov_cimguiname": "igAcceptDragDropPayload", "ret": "const ImGuiPayload*", @@ -13471,7 +13598,7 @@ "comment": "// Activate an item by ID (button, checkbox, tree node etc.). Activation is queued and processed on the next frame when the item is encountered again.", "defaults": {}, "funcname": "ActivateItemByID", - "location": "imgui_internal:3277", + "location": "imgui_internal:3418", "namespace": "ImGui", "ov_cimguiname": "igActivateItemByID", "ret": "void", @@ -13497,7 +13624,7 @@ "cimguiname": "igAddContextHook", "defaults": {}, "funcname": "AddContextHook", - "location": "imgui_internal:3143", + "location": "imgui_internal:3281", "namespace": "ImGui", "ov_cimguiname": "igAddContextHook", "ret": "ImGuiID", @@ -13527,7 +13654,7 @@ "cimguiname": "igAddDrawListToDrawDataEx", "defaults": {}, "funcname": "AddDrawListToDrawDataEx", - "location": "imgui_internal:3128", + "location": "imgui_internal:3266", "namespace": "ImGui", "ov_cimguiname": "igAddDrawListToDrawDataEx", "ret": "void", @@ -13549,7 +13676,7 @@ "cimguiname": "igAddSettingsHandler", "defaults": {}, "funcname": "AddSettingsHandler", - "location": "imgui_internal:3160", + "location": "imgui_internal:3298", "namespace": "ImGui", "ov_cimguiname": "igAddSettingsHandler", "ret": "void", @@ -13567,7 +13694,7 @@ "comment": "// vertically align upcoming text baseline to FramePadding.y so that it will align properly to regularly framed items (call if you have text on a line before a framed item)", "defaults": {}, "funcname": "AlignTextToFramePadding", - "location": "imgui:470", + "location": "imgui:488", "namespace": "ImGui", "ov_cimguiname": "igAlignTextToFramePadding", "ret": "void", @@ -13594,7 +13721,7 @@ "comment": "// square button with an arrow shape", "defaults": {}, "funcname": "ArrowButton", - "location": "imgui:518", + "location": "imgui:536", "namespace": "ImGui", "ov_cimguiname": "igArrowButton", "ret": "bool", @@ -13630,7 +13757,7 @@ "flags": "0" }, "funcname": "ArrowButtonEx", - "location": "imgui_internal:3556", + "location": "imgui_internal:3706", "namespace": "ImGui", "ov_cimguiname": "igArrowButtonEx", "ret": "bool", @@ -13663,7 +13790,7 @@ "p_open": "NULL" }, "funcname": "Begin", - "location": "imgui:341", + "location": "imgui:346", "namespace": "ImGui", "ov_cimguiname": "igBegin", "ret": "bool", @@ -13673,7 +13800,7 @@ ], "igBeginChild": [ { - "args": "(const char* str_id,const ImVec2 size,bool border,ImGuiWindowFlags flags)", + "args": "(const char* str_id,const ImVec2 size,ImGuiChildFlags child_flags,ImGuiWindowFlags window_flags)", "argsT": [ { "name": "str_id", @@ -13684,32 +13811,32 @@ "type": "const ImVec2" }, { - "name": "border", - "type": "bool" + "name": "child_flags", + "type": "ImGuiChildFlags" }, { - "name": "flags", + "name": "window_flags", "type": "ImGuiWindowFlags" } ], - "argsoriginal": "(const char* str_id,const ImVec2& size=ImVec2(0,0),bool border=false,ImGuiWindowFlags flags=0)", - "call_args": "(str_id,size,border,flags)", + "argsoriginal": "(const char* str_id,const ImVec2& size=ImVec2(0,0),ImGuiChildFlags child_flags=0,ImGuiWindowFlags window_flags=0)", + "call_args": "(str_id,size,child_flags,window_flags)", "cimguiname": "igBeginChild", "defaults": { - "border": "false", - "flags": "0", - "size": "ImVec2(0,0)" + "child_flags": "0", + "size": "ImVec2(0,0)", + "window_flags": "0" }, "funcname": "BeginChild", - "location": "imgui:352", + "location": "imgui:367", "namespace": "ImGui", "ov_cimguiname": "igBeginChild_Str", "ret": "bool", - "signature": "(const char*,const ImVec2,bool,ImGuiWindowFlags)", + "signature": "(const char*,const ImVec2,ImGuiChildFlags,ImGuiWindowFlags)", "stname": "" }, { - "args": "(ImGuiID id,const ImVec2 size,bool border,ImGuiWindowFlags flags)", + "args": "(ImGuiID id,const ImVec2 size,ImGuiChildFlags child_flags,ImGuiWindowFlags window_flags)", "argsT": [ { "name": "id", @@ -13720,34 +13847,34 @@ "type": "const ImVec2" }, { - "name": "border", - "type": "bool" + "name": "child_flags", + "type": "ImGuiChildFlags" }, { - "name": "flags", + "name": "window_flags", "type": "ImGuiWindowFlags" } ], - "argsoriginal": "(ImGuiID id,const ImVec2& size=ImVec2(0,0),bool border=false,ImGuiWindowFlags flags=0)", - "call_args": "(id,size,border,flags)", + "argsoriginal": "(ImGuiID id,const ImVec2& size=ImVec2(0,0),ImGuiChildFlags child_flags=0,ImGuiWindowFlags window_flags=0)", + "call_args": "(id,size,child_flags,window_flags)", "cimguiname": "igBeginChild", "defaults": { - "border": "false", - "flags": "0", - "size": "ImVec2(0,0)" + "child_flags": "0", + "size": "ImVec2(0,0)", + "window_flags": "0" }, "funcname": "BeginChild", - "location": "imgui:353", + "location": "imgui:368", "namespace": "ImGui", "ov_cimguiname": "igBeginChild_ID", "ret": "bool", - "signature": "(ImGuiID,const ImVec2,bool,ImGuiWindowFlags)", + "signature": "(ImGuiID,const ImVec2,ImGuiChildFlags,ImGuiWindowFlags)", "stname": "" } ], "igBeginChildEx": [ { - "args": "(const char* name,ImGuiID id,const ImVec2 size_arg,bool border,ImGuiWindowFlags flags)", + "args": "(const char* name,ImGuiID id,const ImVec2 size_arg,ImGuiChildFlags child_flags,ImGuiWindowFlags window_flags)", "argsT": [ { "name": "name", @@ -13762,57 +13889,24 @@ "type": "const ImVec2" }, { - "name": "border", - "type": "bool" + "name": "child_flags", + "type": "ImGuiChildFlags" }, { - "name": "flags", + "name": "window_flags", "type": "ImGuiWindowFlags" } ], - "argsoriginal": "(const char* name,ImGuiID id,const ImVec2& size_arg,bool border,ImGuiWindowFlags flags)", - "call_args": "(name,id,size_arg,border,flags)", + "argsoriginal": "(const char* name,ImGuiID id,const ImVec2& size_arg,ImGuiChildFlags child_flags,ImGuiWindowFlags window_flags)", + "call_args": "(name,id,size_arg,child_flags,window_flags)", "cimguiname": "igBeginChildEx", "defaults": {}, "funcname": "BeginChildEx", - "location": "imgui_internal:3231", + "location": "imgui_internal:3369", "namespace": "ImGui", "ov_cimguiname": "igBeginChildEx", "ret": "bool", - "signature": "(const char*,ImGuiID,const ImVec2,bool,ImGuiWindowFlags)", - "stname": "" - } - ], - "igBeginChildFrame": [ - { - "args": "(ImGuiID id,const ImVec2 size,ImGuiWindowFlags flags)", - "argsT": [ - { - "name": "id", - "type": "ImGuiID" - }, - { - "name": "size", - "type": "const ImVec2" - }, - { - "name": "flags", - "type": "ImGuiWindowFlags" - } - ], - "argsoriginal": "(ImGuiID id,const ImVec2& size,ImGuiWindowFlags flags=0)", - "call_args": "(id,size,flags)", - "cimguiname": "igBeginChildFrame", - "comment": "// helper to create a child window / scrolling region that looks like a normal widget frame", - "defaults": { - "flags": "0" - }, - "funcname": "BeginChildFrame", - "location": "imgui:922", - "namespace": "ImGui", - "ov_cimguiname": "igBeginChildFrame", - "ret": "bool", - "signature": "(ImGuiID,const ImVec2,ImGuiWindowFlags)", + "signature": "(const char*,ImGuiID,const ImVec2,ImGuiChildFlags,ImGuiWindowFlags)", "stname": "" } ], @@ -13841,7 +13935,7 @@ "flags": "0" }, "funcname": "BeginColumns", - "location": "imgui_internal:3441", + "location": "imgui_internal:3589", "namespace": "ImGui", "ov_cimguiname": "igBeginColumns", "ret": "void", @@ -13873,7 +13967,7 @@ "flags": "0" }, "funcname": "BeginCombo", - "location": "imgui:535", + "location": "imgui:555", "namespace": "ImGui", "ov_cimguiname": "igBeginCombo", "ret": "bool", @@ -13903,7 +13997,7 @@ "cimguiname": "igBeginComboPopup", "defaults": {}, "funcname": "BeginComboPopup", - "location": "imgui_internal:3252", + "location": "imgui_internal:3391", "namespace": "ImGui", "ov_cimguiname": "igBeginComboPopup", "ret": "bool", @@ -13920,7 +14014,7 @@ "cimguiname": "igBeginComboPreview", "defaults": {}, "funcname": "BeginComboPreview", - "location": "imgui_internal:3253", + "location": "imgui_internal:3392", "namespace": "ImGui", "ov_cimguiname": "igBeginComboPreview", "ret": "bool", @@ -13944,7 +14038,7 @@ "disabled": "true" }, "funcname": "BeginDisabled", - "location": "imgui:864", + "location": "imgui:881", "namespace": "ImGui", "ov_cimguiname": "igBeginDisabled", "ret": "void", @@ -13966,7 +14060,7 @@ "cimguiname": "igBeginDockableDragDropSource", "defaults": {}, "funcname": "BeginDockableDragDropSource", - "location": "imgui_internal:3386", + "location": "imgui_internal:3534", "namespace": "ImGui", "ov_cimguiname": "igBeginDockableDragDropSource", "ret": "void", @@ -13988,7 +14082,7 @@ "cimguiname": "igBeginDockableDragDropTarget", "defaults": {}, "funcname": "BeginDockableDragDropTarget", - "location": "imgui_internal:3387", + "location": "imgui_internal:3535", "namespace": "ImGui", "ov_cimguiname": "igBeginDockableDragDropTarget", "ret": "void", @@ -14014,7 +14108,7 @@ "cimguiname": "igBeginDocked", "defaults": {}, "funcname": "BeginDocked", - "location": "imgui_internal:3385", + "location": "imgui_internal:3533", "namespace": "ImGui", "ov_cimguiname": "igBeginDocked", "ret": "void", @@ -14039,7 +14133,7 @@ "flags": "0" }, "funcname": "BeginDragDropSource", - "location": "imgui:852", + "location": "imgui:869", "namespace": "ImGui", "ov_cimguiname": "igBeginDragDropSource", "ret": "bool", @@ -14057,7 +14151,7 @@ "comment": "// call after submitting an item that may receive a payload. If this returns true, you can call AcceptDragDropPayload() + EndDragDropTarget()", "defaults": {}, "funcname": "BeginDragDropTarget", - "location": "imgui:855", + "location": "imgui:872", "namespace": "ImGui", "ov_cimguiname": "igBeginDragDropTarget", "ret": "bool", @@ -14083,7 +14177,7 @@ "cimguiname": "igBeginDragDropTargetCustom", "defaults": {}, "funcname": "BeginDragDropTargetCustom", - "location": "imgui_internal:3428", + "location": "imgui_internal:3576", "namespace": "ImGui", "ov_cimguiname": "igBeginDragDropTargetCustom", "ret": "bool", @@ -14101,7 +14195,7 @@ "comment": "// lock horizontal starting position", "defaults": {}, "funcname": "BeginGroup", - "location": "imgui:459", + "location": "imgui:486", "namespace": "ImGui", "ov_cimguiname": "igBeginGroup", "ret": "void", @@ -14119,7 +14213,7 @@ "comment": "// begin/append a tooltip window if preceding item was hovered.", "defaults": {}, "funcname": "BeginItemTooltip", - "location": "imgui:692", + "location": "imgui:712", "namespace": "ImGui", "ov_cimguiname": "igBeginItemTooltip", "ret": "bool", @@ -14148,7 +14242,7 @@ "size": "ImVec2(0,0)" }, "funcname": "BeginListBox", - "location": "imgui:647", + "location": "imgui:667", "namespace": "ImGui", "ov_cimguiname": "igBeginListBox", "ret": "bool", @@ -14166,7 +14260,7 @@ "comment": "// create and append to a full screen menu-bar.", "defaults": {}, "funcname": "BeginMainMenuBar", - "location": "imgui:673", + "location": "imgui:693", "namespace": "ImGui", "ov_cimguiname": "igBeginMainMenuBar", "ret": "bool", @@ -14195,7 +14289,7 @@ "enabled": "true" }, "funcname": "BeginMenu", - "location": "imgui:675", + "location": "imgui:695", "namespace": "ImGui", "ov_cimguiname": "igBeginMenu", "ret": "bool", @@ -14213,7 +14307,7 @@ "comment": "// append to menu-bar of current window (requires ImGuiWindowFlags_MenuBar flag set on parent window).", "defaults": {}, "funcname": "BeginMenuBar", - "location": "imgui:671", + "location": "imgui:691", "namespace": "ImGui", "ov_cimguiname": "igBeginMenuBar", "ret": "bool", @@ -14245,7 +14339,7 @@ "enabled": "true" }, "funcname": "BeginMenuEx", - "location": "imgui_internal:3248", + "location": "imgui_internal:3387", "namespace": "ImGui", "ov_cimguiname": "igBeginMenuEx", "ret": "bool", @@ -14274,7 +14368,7 @@ "flags": "0" }, "funcname": "BeginPopup", - "location": "imgui:708", + "location": "imgui:726", "namespace": "ImGui", "ov_cimguiname": "igBeginPopup", "ret": "bool", @@ -14304,7 +14398,7 @@ "str_id": "NULL" }, "funcname": "BeginPopupContextItem", - "location": "imgui:730", + "location": "imgui:748", "namespace": "ImGui", "ov_cimguiname": "igBeginPopupContextItem", "ret": "bool", @@ -14334,7 +14428,7 @@ "str_id": "NULL" }, "funcname": "BeginPopupContextVoid", - "location": "imgui:732", + "location": "imgui:750", "namespace": "ImGui", "ov_cimguiname": "igBeginPopupContextVoid", "ret": "bool", @@ -14364,7 +14458,7 @@ "str_id": "NULL" }, "funcname": "BeginPopupContextWindow", - "location": "imgui:731", + "location": "imgui:749", "namespace": "ImGui", "ov_cimguiname": "igBeginPopupContextWindow", "ret": "bool", @@ -14390,7 +14484,7 @@ "cimguiname": "igBeginPopupEx", "defaults": {}, "funcname": "BeginPopupEx", - "location": "imgui_internal:3237", + "location": "imgui_internal:3375", "namespace": "ImGui", "ov_cimguiname": "igBeginPopupEx", "ret": "bool", @@ -14424,7 +14518,7 @@ "p_open": "NULL" }, "funcname": "BeginPopupModal", - "location": "imgui:709", + "location": "imgui:727", "namespace": "ImGui", "ov_cimguiname": "igBeginPopupModal", "ret": "bool", @@ -14453,7 +14547,7 @@ "flags": "0" }, "funcname": "BeginTabBar", - "location": "imgui:810", + "location": "imgui:827", "namespace": "ImGui", "ov_cimguiname": "igBeginTabBar", "ret": "bool", @@ -14483,7 +14577,7 @@ "cimguiname": "igBeginTabBarEx", "defaults": {}, "funcname": "BeginTabBarEx", - "location": "imgui_internal:3508", + "location": "imgui_internal:3658", "namespace": "ImGui", "ov_cimguiname": "igBeginTabBarEx", "ret": "bool", @@ -14517,7 +14611,7 @@ "p_open": "NULL" }, "funcname": "BeginTabItem", - "location": "imgui:812", + "location": "imgui:829", "namespace": "ImGui", "ov_cimguiname": "igBeginTabItem", "ret": "bool", @@ -14559,7 +14653,7 @@ "outer_size": "ImVec2(0.0f,0.0f)" }, "funcname": "BeginTable", - "location": "imgui:763", + "location": "imgui:779", "namespace": "ImGui", "ov_cimguiname": "igBeginTable", "ret": "bool", @@ -14605,7 +14699,7 @@ "outer_size": "ImVec2(0,0)" }, "funcname": "BeginTableEx", - "location": "imgui_internal:3464", + "location": "imgui_internal:3614", "namespace": "ImGui", "ov_cimguiname": "igBeginTableEx", "ret": "bool", @@ -14623,7 +14717,7 @@ "comment": "// begin/append a tooltip window.", "defaults": {}, "funcname": "BeginTooltip", - "location": "imgui:683", + "location": "imgui:703", "namespace": "ImGui", "ov_cimguiname": "igBeginTooltip", "ret": "bool", @@ -14649,7 +14743,7 @@ "cimguiname": "igBeginTooltipEx", "defaults": {}, "funcname": "BeginTooltipEx", - "location": "imgui_internal:3238", + "location": "imgui_internal:3376", "namespace": "ImGui", "ov_cimguiname": "igBeginTooltipEx", "ret": "bool", @@ -14657,6 +14751,23 @@ "stname": "" } ], + "igBeginTooltipHidden": [ + { + "args": "()", + "argsT": [], + "argsoriginal": "()", + "call_args": "()", + "cimguiname": "igBeginTooltipHidden", + "defaults": {}, + "funcname": "BeginTooltipHidden", + "location": "imgui_internal:3377", + "namespace": "ImGui", + "ov_cimguiname": "igBeginTooltipHidden", + "ret": "bool", + "signature": "()", + "stname": "" + } + ], "igBeginViewportSideBar": [ { "args": "(const char* name,ImGuiViewport* viewport,ImGuiDir dir,float size,ImGuiWindowFlags window_flags)", @@ -14687,7 +14798,7 @@ "cimguiname": "igBeginViewportSideBar", "defaults": {}, "funcname": "BeginViewportSideBar", - "location": "imgui_internal:3247", + "location": "imgui_internal:3386", "namespace": "ImGui", "ov_cimguiname": "igBeginViewportSideBar", "ret": "bool", @@ -14709,7 +14820,7 @@ "cimguiname": "igBringWindowToDisplayBack", "defaults": {}, "funcname": "BringWindowToDisplayBack", - "location": "imgui_internal:3119", + "location": "imgui_internal:3257", "namespace": "ImGui", "ov_cimguiname": "igBringWindowToDisplayBack", "ret": "void", @@ -14735,7 +14846,7 @@ "cimguiname": "igBringWindowToDisplayBehind", "defaults": {}, "funcname": "BringWindowToDisplayBehind", - "location": "imgui_internal:3120", + "location": "imgui_internal:3258", "namespace": "ImGui", "ov_cimguiname": "igBringWindowToDisplayBehind", "ret": "void", @@ -14757,7 +14868,7 @@ "cimguiname": "igBringWindowToDisplayFront", "defaults": {}, "funcname": "BringWindowToDisplayFront", - "location": "imgui_internal:3118", + "location": "imgui_internal:3256", "namespace": "ImGui", "ov_cimguiname": "igBringWindowToDisplayFront", "ret": "void", @@ -14779,7 +14890,7 @@ "cimguiname": "igBringWindowToFocusFront", "defaults": {}, "funcname": "BringWindowToFocusFront", - "location": "imgui_internal:3117", + "location": "imgui_internal:3255", "namespace": "ImGui", "ov_cimguiname": "igBringWindowToFocusFront", "ret": "void", @@ -14797,7 +14908,7 @@ "comment": "// draw a small circle + keep the cursor on the same line. advance cursor x position by GetTreeNodeToLabelSpacing(), same distance that TreeNode() uses", "defaults": {}, "funcname": "Bullet", - "location": "imgui:525", + "location": "imgui:543", "namespace": "ImGui", "ov_cimguiname": "igBullet", "ret": "void", @@ -14825,7 +14936,7 @@ "defaults": {}, "funcname": "BulletText", "isvararg": "...)", - "location": "imgui:508", + "location": "imgui:526", "namespace": "ImGui", "ov_cimguiname": "igBulletText", "ret": "void", @@ -14851,7 +14962,7 @@ "cimguiname": "igBulletTextV", "defaults": {}, "funcname": "BulletTextV", - "location": "imgui:509", + "location": "imgui:527", "namespace": "ImGui", "ov_cimguiname": "igBulletTextV", "ret": "void", @@ -14880,7 +14991,7 @@ "size": "ImVec2(0,0)" }, "funcname": "Button", - "location": "imgui:515", + "location": "imgui:533", "namespace": "ImGui", "ov_cimguiname": "igButton", "ret": "bool", @@ -14920,7 +15031,7 @@ "flags": "0" }, "funcname": "ButtonBehavior", - "location": "imgui_internal:3574", + "location": "imgui_internal:3724", "namespace": "ImGui", "ov_cimguiname": "igButtonBehavior", "ret": "bool", @@ -14953,7 +15064,7 @@ "size_arg": "ImVec2(0,0)" }, "funcname": "ButtonEx", - "location": "imgui_internal:3555", + "location": "imgui_internal:3705", "namespace": "ImGui", "ov_cimguiname": "igButtonEx", "ret": "bool", @@ -14987,7 +15098,7 @@ "cimguiname": "igCalcItemSize", "defaults": {}, "funcname": "CalcItemSize", - "location": "imgui_internal:3212", + "location": "imgui_internal:3350", "namespace": "ImGui", "nonUDT": 1, "ov_cimguiname": "igCalcItemSize", @@ -15006,7 +15117,7 @@ "comment": "// width of item given pushed settings and current cursor position. NOT necessarily the width of last item unlike most 'Item' functions.", "defaults": {}, "funcname": "CalcItemWidth", - "location": "imgui:431", + "location": "imgui:446", "namespace": "ImGui", "ov_cimguiname": "igCalcItemWidth", "ret": "float", @@ -15036,7 +15147,7 @@ "cimguiname": "igCalcRoundingFlagsForRectInRect", "defaults": {}, "funcname": "CalcRoundingFlagsForRectInRect", - "location": "imgui_internal:3551", + "location": "imgui_internal:3701", "namespace": "ImGui", "ov_cimguiname": "igCalcRoundingFlagsForRectInRect", "ret": "ImDrawFlags", @@ -15078,7 +15189,7 @@ "wrap_width": "-1.0f" }, "funcname": "CalcTextSize", - "location": "imgui:926", + "location": "imgui:941", "namespace": "ImGui", "nonUDT": 1, "ov_cimguiname": "igCalcTextSize", @@ -15113,7 +15224,7 @@ "cimguiname": "igCalcTypematicRepeatAmount", "defaults": {}, "funcname": "CalcTypematicRepeatAmount", - "location": "imgui_internal:3307", + "location": "imgui_internal:3449", "namespace": "ImGui", "ov_cimguiname": "igCalcTypematicRepeatAmount", "ret": "int", @@ -15139,7 +15250,7 @@ "cimguiname": "igCalcWindowNextAutoFitSize", "defaults": {}, "funcname": "CalcWindowNextAutoFitSize", - "location": "imgui_internal:3100", + "location": "imgui_internal:3237", "namespace": "ImGui", "nonUDT": 1, "ov_cimguiname": "igCalcWindowNextAutoFitSize", @@ -15166,7 +15277,7 @@ "cimguiname": "igCalcWrapWidthForPos", "defaults": {}, "funcname": "CalcWrapWidthForPos", - "location": "imgui_internal:3213", + "location": "imgui_internal:3351", "namespace": "ImGui", "ov_cimguiname": "igCalcWrapWidthForPos", "ret": "float", @@ -15192,7 +15303,7 @@ "cimguiname": "igCallContextHooks", "defaults": {}, "funcname": "CallContextHooks", - "location": "imgui_internal:3145", + "location": "imgui_internal:3283", "namespace": "ImGui", "ov_cimguiname": "igCallContextHooks", "ret": "void", @@ -15218,7 +15329,7 @@ "cimguiname": "igCheckbox", "defaults": {}, "funcname": "Checkbox", - "location": "imgui:519", + "location": "imgui:537", "namespace": "ImGui", "ov_cimguiname": "igCheckbox", "ret": "bool", @@ -15248,7 +15359,7 @@ "cimguiname": "igCheckboxFlags", "defaults": {}, "funcname": "CheckboxFlags", - "location": "imgui:520", + "location": "imgui:538", "namespace": "ImGui", "ov_cimguiname": "igCheckboxFlags_IntPtr", "ret": "bool", @@ -15276,7 +15387,7 @@ "cimguiname": "igCheckboxFlags", "defaults": {}, "funcname": "CheckboxFlags", - "location": "imgui:521", + "location": "imgui:539", "namespace": "ImGui", "ov_cimguiname": "igCheckboxFlags_UintPtr", "ret": "bool", @@ -15304,7 +15415,7 @@ "cimguiname": "igCheckboxFlags", "defaults": {}, "funcname": "CheckboxFlags", - "location": "imgui_internal:3560", + "location": "imgui_internal:3710", "namespace": "ImGui", "ov_cimguiname": "igCheckboxFlags_S64Ptr", "ret": "bool", @@ -15332,7 +15443,7 @@ "cimguiname": "igCheckboxFlags", "defaults": {}, "funcname": "CheckboxFlags", - "location": "imgui_internal:3561", + "location": "imgui_internal:3711", "namespace": "ImGui", "ov_cimguiname": "igCheckboxFlags_U64Ptr", "ret": "bool", @@ -15349,7 +15460,7 @@ "cimguiname": "igClearActiveID", "defaults": {}, "funcname": "ClearActiveID", - "location": "imgui_internal:3195", + "location": "imgui_internal:3333", "namespace": "ImGui", "ov_cimguiname": "igClearActiveID", "ret": "void", @@ -15366,7 +15477,7 @@ "cimguiname": "igClearDragDrop", "defaults": {}, "funcname": "ClearDragDrop", - "location": "imgui_internal:3429", + "location": "imgui_internal:3577", "namespace": "ImGui", "ov_cimguiname": "igClearDragDrop", "ret": "void", @@ -15383,7 +15494,7 @@ "cimguiname": "igClearIniSettings", "defaults": {}, "funcname": "ClearIniSettings", - "location": "imgui_internal:3159", + "location": "imgui_internal:3297", "namespace": "ImGui", "ov_cimguiname": "igClearIniSettings", "ret": "void", @@ -15405,7 +15516,7 @@ "cimguiname": "igClearWindowSettings", "defaults": {}, "funcname": "ClearWindowSettings", - "location": "imgui_internal:3168", + "location": "imgui_internal:3306", "namespace": "ImGui", "ov_cimguiname": "igClearWindowSettings", "ret": "void", @@ -15431,7 +15542,7 @@ "cimguiname": "igCloseButton", "defaults": {}, "funcname": "CloseButton", - "location": "imgui_internal:3564", + "location": "imgui_internal:3714", "namespace": "ImGui", "ov_cimguiname": "igCloseButton", "ret": "bool", @@ -15449,7 +15560,7 @@ "comment": "// manually close the popup we have begin-ed into.", "defaults": {}, "funcname": "CloseCurrentPopup", - "location": "imgui:723", + "location": "imgui:741", "namespace": "ImGui", "ov_cimguiname": "igCloseCurrentPopup", "ret": "void", @@ -15475,7 +15586,7 @@ "cimguiname": "igClosePopupToLevel", "defaults": {}, "funcname": "ClosePopupToLevel", - "location": "imgui_internal:3233", + "location": "imgui_internal:3371", "namespace": "ImGui", "ov_cimguiname": "igClosePopupToLevel", "ret": "void", @@ -15492,7 +15603,7 @@ "cimguiname": "igClosePopupsExceptModals", "defaults": {}, "funcname": "ClosePopupsExceptModals", - "location": "imgui_internal:3235", + "location": "imgui_internal:3373", "namespace": "ImGui", "ov_cimguiname": "igClosePopupsExceptModals", "ret": "void", @@ -15518,7 +15629,7 @@ "cimguiname": "igClosePopupsOverWindow", "defaults": {}, "funcname": "ClosePopupsOverWindow", - "location": "imgui_internal:3234", + "location": "imgui_internal:3372", "namespace": "ImGui", "ov_cimguiname": "igClosePopupsOverWindow", "ret": "void", @@ -15548,7 +15659,7 @@ "cimguiname": "igCollapseButton", "defaults": {}, "funcname": "CollapseButton", - "location": "imgui_internal:3565", + "location": "imgui_internal:3715", "namespace": "ImGui", "ov_cimguiname": "igCollapseButton", "ret": "bool", @@ -15577,7 +15688,7 @@ "flags": "0" }, "funcname": "CollapsingHeader", - "location": "imgui:631", + "location": "imgui:651", "namespace": "ImGui", "ov_cimguiname": "igCollapsingHeader_TreeNodeFlags", "ret": "bool", @@ -15608,7 +15719,7 @@ "flags": "0" }, "funcname": "CollapsingHeader", - "location": "imgui:632", + "location": "imgui:652", "namespace": "ImGui", "ov_cimguiname": "igCollapsingHeader_BoolPtr", "ret": "bool", @@ -15646,7 +15757,7 @@ "size": "ImVec2(0,0)" }, "funcname": "ColorButton", - "location": "imgui:612", + "location": "imgui:632", "namespace": "ImGui", "ov_cimguiname": "igColorButton", "ret": "bool", @@ -15668,7 +15779,7 @@ "cimguiname": "igColorConvertFloat4ToU32", "defaults": {}, "funcname": "ColorConvertFloat4ToU32", - "location": "imgui:930", + "location": "imgui:945", "namespace": "ImGui", "ov_cimguiname": "igColorConvertFloat4ToU32", "ret": "ImU32", @@ -15713,7 +15824,7 @@ "cimguiname": "igColorConvertHSVtoRGB", "defaults": {}, "funcname": "ColorConvertHSVtoRGB", - "location": "imgui:932", + "location": "imgui:947", "namespace": "ImGui", "ov_cimguiname": "igColorConvertHSVtoRGB", "ret": "void", @@ -15758,7 +15869,7 @@ "cimguiname": "igColorConvertRGBtoHSV", "defaults": {}, "funcname": "ColorConvertRGBtoHSV", - "location": "imgui:931", + "location": "imgui:946", "namespace": "ImGui", "ov_cimguiname": "igColorConvertRGBtoHSV", "ret": "void", @@ -15784,7 +15895,7 @@ "cimguiname": "igColorConvertU32ToFloat4", "defaults": {}, "funcname": "ColorConvertU32ToFloat4", - "location": "imgui:929", + "location": "imgui:944", "namespace": "ImGui", "nonUDT": 1, "ov_cimguiname": "igColorConvertU32ToFloat4", @@ -15817,7 +15928,7 @@ "flags": "0" }, "funcname": "ColorEdit3", - "location": "imgui:608", + "location": "imgui:628", "namespace": "ImGui", "ov_cimguiname": "igColorEdit3", "ret": "bool", @@ -15849,7 +15960,7 @@ "flags": "0" }, "funcname": "ColorEdit4", - "location": "imgui:609", + "location": "imgui:629", "namespace": "ImGui", "ov_cimguiname": "igColorEdit4", "ret": "bool", @@ -15875,7 +15986,7 @@ "cimguiname": "igColorEditOptionsPopup", "defaults": {}, "funcname": "ColorEditOptionsPopup", - "location": "imgui_internal:3612", + "location": "imgui_internal:3762", "namespace": "ImGui", "ov_cimguiname": "igColorEditOptionsPopup", "ret": "void", @@ -15907,7 +16018,7 @@ "flags": "0" }, "funcname": "ColorPicker3", - "location": "imgui:610", + "location": "imgui:630", "namespace": "ImGui", "ov_cimguiname": "igColorPicker3", "ret": "bool", @@ -15944,7 +16055,7 @@ "ref_col": "NULL" }, "funcname": "ColorPicker4", - "location": "imgui:611", + "location": "imgui:631", "namespace": "ImGui", "ov_cimguiname": "igColorPicker4", "ret": "bool", @@ -15970,7 +16081,7 @@ "cimguiname": "igColorPickerOptionsPopup", "defaults": {}, "funcname": "ColorPickerOptionsPopup", - "location": "imgui_internal:3613", + "location": "imgui_internal:3763", "namespace": "ImGui", "ov_cimguiname": "igColorPickerOptionsPopup", "ret": "void", @@ -16000,7 +16111,7 @@ "cimguiname": "igColorTooltip", "defaults": {}, "funcname": "ColorTooltip", - "location": "imgui_internal:3611", + "location": "imgui_internal:3761", "namespace": "ImGui", "ov_cimguiname": "igColorTooltip", "ret": "void", @@ -16034,7 +16145,7 @@ "id": "NULL" }, "funcname": "Columns", - "location": "imgui:799", + "location": "imgui:816", "namespace": "ImGui", "ov_cimguiname": "igColumns", "ret": "void", @@ -16074,7 +16185,7 @@ "popup_max_height_in_items": "-1" }, "funcname": "Combo", - "location": "imgui:537", + "location": "imgui:557", "namespace": "ImGui", "ov_cimguiname": "igCombo_Str_arr", "ret": "bool", @@ -16109,7 +16220,7 @@ "popup_max_height_in_items": "-1" }, "funcname": "Combo", - "location": "imgui:538", + "location": "imgui:558", "namespace": "ImGui", "ov_cimguiname": "igCombo_Str", "ret": "bool", @@ -16153,7 +16264,7 @@ "popup_max_height_in_items": "-1" }, "funcname": "Combo", - "location": "imgui:539", + "location": "imgui:559", "namespace": "ImGui", "ov_cimguiname": "igCombo_FnStrPtr", "ret": "bool", @@ -16161,28 +16272,6 @@ "stname": "" } ], - "igConvertShortcutMod": [ - { - "args": "(ImGuiKeyChord key_chord)", - "argsT": [ - { - "name": "key_chord", - "type": "ImGuiKeyChord" - } - ], - "argsoriginal": "(ImGuiKeyChord key_chord)", - "call_args": "(key_chord)", - "cimguiname": "igConvertShortcutMod", - "defaults": {}, - "funcname": "ConvertShortcutMod", - "location": "imgui_internal:3288", - "namespace": "ImGui", - "ov_cimguiname": "igConvertShortcutMod", - "ret": "ImGuiKeyChord", - "signature": "(ImGuiKeyChord)", - "stname": "" - } - ], "igConvertSingleModFlagToKey": [ { "args": "(ImGuiContext* ctx,ImGuiKey key)", @@ -16201,7 +16290,7 @@ "cimguiname": "igConvertSingleModFlagToKey", "defaults": {}, "funcname": "ConvertSingleModFlagToKey", - "location": "imgui_internal:3289", + "location": "imgui_internal:3431", "namespace": "ImGui", "ov_cimguiname": "igConvertSingleModFlagToKey", "ret": "ImGuiKey", @@ -16225,7 +16314,7 @@ "shared_font_atlas": "NULL" }, "funcname": "CreateContext", - "location": "imgui:299", + "location": "imgui:304", "namespace": "ImGui", "ov_cimguiname": "igCreateContext", "ret": "ImGuiContext*", @@ -16247,7 +16336,7 @@ "cimguiname": "igCreateNewWindowSettings", "defaults": {}, "funcname": "CreateNewWindowSettings", - "location": "imgui_internal:3165", + "location": "imgui_internal:3303", "namespace": "ImGui", "ov_cimguiname": "igCreateNewWindowSettings", "ret": "ImGuiWindowSettings*", @@ -16281,7 +16370,7 @@ "cimguiname": "igDataTypeApplyFromText", "defaults": {}, "funcname": "DataTypeApplyFromText", - "location": "imgui_internal:3598", + "location": "imgui_internal:3748", "namespace": "ImGui", "ov_cimguiname": "igDataTypeApplyFromText", "ret": "bool", @@ -16319,7 +16408,7 @@ "cimguiname": "igDataTypeApplyOp", "defaults": {}, "funcname": "DataTypeApplyOp", - "location": "imgui_internal:3597", + "location": "imgui_internal:3747", "namespace": "ImGui", "ov_cimguiname": "igDataTypeApplyOp", "ret": "void", @@ -16353,7 +16442,7 @@ "cimguiname": "igDataTypeClamp", "defaults": {}, "funcname": "DataTypeClamp", - "location": "imgui_internal:3600", + "location": "imgui_internal:3750", "namespace": "ImGui", "ov_cimguiname": "igDataTypeClamp", "ret": "bool", @@ -16383,7 +16472,7 @@ "cimguiname": "igDataTypeCompare", "defaults": {}, "funcname": "DataTypeCompare", - "location": "imgui_internal:3599", + "location": "imgui_internal:3749", "namespace": "ImGui", "ov_cimguiname": "igDataTypeCompare", "ret": "int", @@ -16421,7 +16510,7 @@ "cimguiname": "igDataTypeFormatString", "defaults": {}, "funcname": "DataTypeFormatString", - "location": "imgui_internal:3596", + "location": "imgui_internal:3746", "namespace": "ImGui", "ov_cimguiname": "igDataTypeFormatString", "ret": "int", @@ -16443,7 +16532,7 @@ "cimguiname": "igDataTypeGetInfo", "defaults": {}, "funcname": "DataTypeGetInfo", - "location": "imgui_internal:3595", + "location": "imgui_internal:3745", "namespace": "ImGui", "ov_cimguiname": "igDataTypeGetInfo", "ret": "const ImGuiDataTypeInfo*", @@ -16451,6 +16540,110 @@ "stname": "" } ], + "igDebugAllocHook": [ + { + "args": "(ImGuiDebugAllocInfo* info,int frame_count,void* ptr,size_t size)", + "argsT": [ + { + "name": "info", + "type": "ImGuiDebugAllocInfo*" + }, + { + "name": "frame_count", + "type": "int" + }, + { + "name": "ptr", + "type": "void*" + }, + { + "name": "size", + "type": "size_t" + } + ], + "argsoriginal": "(ImGuiDebugAllocInfo* info,int frame_count,void* ptr,size_t size)", + "call_args": "(info,frame_count,ptr,size)", + "cimguiname": "igDebugAllocHook", + "comment": "// size >= 0 : alloc, size = -1 : free", + "defaults": {}, + "funcname": "DebugAllocHook", + "location": "imgui_internal:3781", + "namespace": "ImGui", + "ov_cimguiname": "igDebugAllocHook", + "ret": "void", + "signature": "(ImGuiDebugAllocInfo*,int,void*,size_t)", + "stname": "" + } + ], + "igDebugBreakButton": [ + { + "args": "(const char* label,const char* description_of_location)", + "argsT": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "description_of_location", + "type": "const char*" + } + ], + "argsoriginal": "(const char* label,const char* description_of_location)", + "call_args": "(label,description_of_location)", + "cimguiname": "igDebugBreakButton", + "defaults": {}, + "funcname": "DebugBreakButton", + "location": "imgui_internal:3794", + "namespace": "ImGui", + "ov_cimguiname": "igDebugBreakButton", + "ret": "bool", + "signature": "(const char*,const char*)", + "stname": "" + } + ], + "igDebugBreakButtonTooltip": [ + { + "args": "(bool keyboard_only,const char* description_of_location)", + "argsT": [ + { + "name": "keyboard_only", + "type": "bool" + }, + { + "name": "description_of_location", + "type": "const char*" + } + ], + "argsoriginal": "(bool keyboard_only,const char* description_of_location)", + "call_args": "(keyboard_only,description_of_location)", + "cimguiname": "igDebugBreakButtonTooltip", + "defaults": {}, + "funcname": "DebugBreakButtonTooltip", + "location": "imgui_internal:3795", + "namespace": "ImGui", + "ov_cimguiname": "igDebugBreakButtonTooltip", + "ret": "void", + "signature": "(bool,const char*)", + "stname": "" + } + ], + "igDebugBreakClearData": [ + { + "args": "()", + "argsT": [], + "argsoriginal": "()", + "call_args": "()", + "cimguiname": "igDebugBreakClearData", + "defaults": {}, + "funcname": "DebugBreakClearData", + "location": "imgui_internal:3793", + "namespace": "ImGui", + "ov_cimguiname": "igDebugBreakClearData", + "ret": "void", + "signature": "()", + "stname": "" + } + ], "igDebugCheckVersionAndDataLayout": [ { "args": "(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)", @@ -16490,7 +16683,7 @@ "comment": "// This is called by IMGUI_CHECKVERSION() macro.", "defaults": {}, "funcname": "DebugCheckVersionAndDataLayout", - "location": "imgui:983", + "location": "imgui:1002", "namespace": "ImGui", "ov_cimguiname": "igDebugCheckVersionAndDataLayout", "ret": "bool", @@ -16514,7 +16707,7 @@ "col": "4278190335" }, "funcname": "DebugDrawCursorPos", - "location": "imgui_internal:3635", + "location": "imgui_internal:3787", "namespace": "ImGui", "ov_cimguiname": "igDebugDrawCursorPos", "ret": "void", @@ -16538,7 +16731,7 @@ "col": "4278190335" }, "funcname": "DebugDrawItemRect", - "location": "imgui_internal:3637", + "location": "imgui_internal:3789", "namespace": "ImGui", "ov_cimguiname": "igDebugDrawItemRect", "ret": "void", @@ -16562,7 +16755,7 @@ "col": "4278190335" }, "funcname": "DebugDrawLineExtents", - "location": "imgui_internal:3636", + "location": "imgui_internal:3788", "namespace": "ImGui", "ov_cimguiname": "igDebugDrawLineExtents", "ret": "void", @@ -16570,6 +16763,28 @@ "stname": "" } ], + "igDebugFlashStyleColor": [ + { + "args": "(ImGuiCol idx)", + "argsT": [ + { + "name": "idx", + "type": "ImGuiCol" + } + ], + "argsoriginal": "(ImGuiCol idx)", + "call_args": "(idx)", + "cimguiname": "igDebugFlashStyleColor", + "defaults": {}, + "funcname": "DebugFlashStyleColor", + "location": "imgui:1000", + "namespace": "ImGui", + "ov_cimguiname": "igDebugFlashStyleColor", + "ret": "void", + "signature": "(ImGuiCol)", + "stname": "" + } + ], "igDebugHookIdInfo": [ { "args": "(ImGuiID id,ImGuiDataType data_type,const void* data_id,const void* data_id_end)", @@ -16596,7 +16811,7 @@ "cimguiname": "igDebugHookIdInfo", "defaults": {}, "funcname": "DebugHookIdInfo", - "location": "imgui_internal:3643", + "location": "imgui_internal:3797", "namespace": "ImGui", "ov_cimguiname": "igDebugHookIdInfo", "ret": "void", @@ -16619,7 +16834,7 @@ "comment": "// Call sparingly: only 1 at the same time!", "defaults": {}, "funcname": "DebugLocateItem", - "location": "imgui_internal:3638", + "location": "imgui_internal:3790", "namespace": "ImGui", "ov_cimguiname": "igDebugLocateItem", "ret": "void", @@ -16642,7 +16857,7 @@ "comment": "// Only call on reaction to a mouse Hover: because only 1 at the same time!", "defaults": {}, "funcname": "DebugLocateItemOnHover", - "location": "imgui_internal:3639", + "location": "imgui_internal:3791", "namespace": "ImGui", "ov_cimguiname": "igDebugLocateItemOnHover", "ret": "void", @@ -16659,7 +16874,7 @@ "cimguiname": "igDebugLocateItemResolveWithLastItem", "defaults": {}, "funcname": "DebugLocateItemResolveWithLastItem", - "location": "imgui_internal:3640", + "location": "imgui_internal:3792", "namespace": "ImGui", "ov_cimguiname": "igDebugLocateItemResolveWithLastItem", "ret": "void", @@ -16686,7 +16901,7 @@ "defaults": {}, "funcname": "DebugLog", "isvararg": "...)", - "location": "imgui_internal:3628", + "location": "imgui_internal:3779", "namespace": "ImGui", "ov_cimguiname": "igDebugLog", "ret": "void", @@ -16712,7 +16927,7 @@ "cimguiname": "igDebugLogV", "defaults": {}, "funcname": "DebugLogV", - "location": "imgui_internal:3629", + "location": "imgui_internal:3780", "namespace": "ImGui", "ov_cimguiname": "igDebugLogV", "ret": "void", @@ -16734,7 +16949,7 @@ "cimguiname": "igDebugNodeColumns", "defaults": {}, "funcname": "DebugNodeColumns", - "location": "imgui_internal:3644", + "location": "imgui_internal:3798", "namespace": "ImGui", "ov_cimguiname": "igDebugNodeColumns", "ret": "void", @@ -16760,7 +16975,7 @@ "cimguiname": "igDebugNodeDockNode", "defaults": {}, "funcname": "DebugNodeDockNode", - "location": "imgui_internal:3645", + "location": "imgui_internal:3799", "namespace": "ImGui", "ov_cimguiname": "igDebugNodeDockNode", "ret": "void", @@ -16798,7 +17013,7 @@ "cimguiname": "igDebugNodeDrawCmdShowMeshAndBoundingBox", "defaults": {}, "funcname": "DebugNodeDrawCmdShowMeshAndBoundingBox", - "location": "imgui_internal:3647", + "location": "imgui_internal:3801", "namespace": "ImGui", "ov_cimguiname": "igDebugNodeDrawCmdShowMeshAndBoundingBox", "ret": "void", @@ -16832,7 +17047,7 @@ "cimguiname": "igDebugNodeDrawList", "defaults": {}, "funcname": "DebugNodeDrawList", - "location": "imgui_internal:3646", + "location": "imgui_internal:3800", "namespace": "ImGui", "ov_cimguiname": "igDebugNodeDrawList", "ret": "void", @@ -16854,7 +17069,7 @@ "cimguiname": "igDebugNodeFont", "defaults": {}, "funcname": "DebugNodeFont", - "location": "imgui_internal:3648", + "location": "imgui_internal:3802", "namespace": "ImGui", "ov_cimguiname": "igDebugNodeFont", "ret": "void", @@ -16880,7 +17095,7 @@ "cimguiname": "igDebugNodeFontGlyph", "defaults": {}, "funcname": "DebugNodeFontGlyph", - "location": "imgui_internal:3649", + "location": "imgui_internal:3803", "namespace": "ImGui", "ov_cimguiname": "igDebugNodeFontGlyph", "ret": "void", @@ -16902,7 +17117,7 @@ "cimguiname": "igDebugNodeInputTextState", "defaults": {}, "funcname": "DebugNodeInputTextState", - "location": "imgui_internal:3654", + "location": "imgui_internal:3808", "namespace": "ImGui", "ov_cimguiname": "igDebugNodeInputTextState", "ret": "void", @@ -16928,7 +17143,7 @@ "cimguiname": "igDebugNodeStorage", "defaults": {}, "funcname": "DebugNodeStorage", - "location": "imgui_internal:3650", + "location": "imgui_internal:3804", "namespace": "ImGui", "ov_cimguiname": "igDebugNodeStorage", "ret": "void", @@ -16954,7 +17169,7 @@ "cimguiname": "igDebugNodeTabBar", "defaults": {}, "funcname": "DebugNodeTabBar", - "location": "imgui_internal:3651", + "location": "imgui_internal:3805", "namespace": "ImGui", "ov_cimguiname": "igDebugNodeTabBar", "ret": "void", @@ -16976,7 +17191,7 @@ "cimguiname": "igDebugNodeTable", "defaults": {}, "funcname": "DebugNodeTable", - "location": "imgui_internal:3652", + "location": "imgui_internal:3806", "namespace": "ImGui", "ov_cimguiname": "igDebugNodeTable", "ret": "void", @@ -16998,7 +17213,7 @@ "cimguiname": "igDebugNodeTableSettings", "defaults": {}, "funcname": "DebugNodeTableSettings", - "location": "imgui_internal:3653", + "location": "imgui_internal:3807", "namespace": "ImGui", "ov_cimguiname": "igDebugNodeTableSettings", "ret": "void", @@ -17020,7 +17235,7 @@ "cimguiname": "igDebugNodeTypingSelectState", "defaults": {}, "funcname": "DebugNodeTypingSelectState", - "location": "imgui_internal:3655", + "location": "imgui_internal:3809", "namespace": "ImGui", "ov_cimguiname": "igDebugNodeTypingSelectState", "ret": "void", @@ -17042,7 +17257,7 @@ "cimguiname": "igDebugNodeViewport", "defaults": {}, "funcname": "DebugNodeViewport", - "location": "imgui_internal:3660", + "location": "imgui_internal:3814", "namespace": "ImGui", "ov_cimguiname": "igDebugNodeViewport", "ret": "void", @@ -17068,7 +17283,7 @@ "cimguiname": "igDebugNodeWindow", "defaults": {}, "funcname": "DebugNodeWindow", - "location": "imgui_internal:3656", + "location": "imgui_internal:3810", "namespace": "ImGui", "ov_cimguiname": "igDebugNodeWindow", "ret": "void", @@ -17090,7 +17305,7 @@ "cimguiname": "igDebugNodeWindowSettings", "defaults": {}, "funcname": "DebugNodeWindowSettings", - "location": "imgui_internal:3657", + "location": "imgui_internal:3811", "namespace": "ImGui", "ov_cimguiname": "igDebugNodeWindowSettings", "ret": "void", @@ -17116,7 +17331,7 @@ "cimguiname": "igDebugNodeWindowsList", "defaults": {}, "funcname": "DebugNodeWindowsList", - "location": "imgui_internal:3658", + "location": "imgui_internal:3812", "namespace": "ImGui", "ov_cimguiname": "igDebugNodeWindowsList", "ret": "void", @@ -17146,7 +17361,7 @@ "cimguiname": "igDebugNodeWindowsListByBeginStackParent", "defaults": {}, "funcname": "DebugNodeWindowsListByBeginStackParent", - "location": "imgui_internal:3659", + "location": "imgui_internal:3813", "namespace": "ImGui", "ov_cimguiname": "igDebugNodeWindowsListByBeginStackParent", "ret": "void", @@ -17168,7 +17383,7 @@ "cimguiname": "igDebugRenderKeyboardPreview", "defaults": {}, "funcname": "DebugRenderKeyboardPreview", - "location": "imgui_internal:3661", + "location": "imgui_internal:3815", "namespace": "ImGui", "ov_cimguiname": "igDebugRenderKeyboardPreview", "ret": "void", @@ -17198,7 +17413,7 @@ "cimguiname": "igDebugRenderViewportThumbnail", "defaults": {}, "funcname": "DebugRenderViewportThumbnail", - "location": "imgui_internal:3662", + "location": "imgui_internal:3816", "namespace": "ImGui", "ov_cimguiname": "igDebugRenderViewportThumbnail", "ret": "void", @@ -17215,7 +17430,7 @@ "cimguiname": "igDebugStartItemPicker", "defaults": {}, "funcname": "DebugStartItemPicker", - "location": "imgui_internal:3641", + "location": "imgui:1001", "namespace": "ImGui", "ov_cimguiname": "igDebugStartItemPicker", "ret": "void", @@ -17237,7 +17452,7 @@ "cimguiname": "igDebugTextEncoding", "defaults": {}, "funcname": "DebugTextEncoding", - "location": "imgui:982", + "location": "imgui:999", "namespace": "ImGui", "ov_cimguiname": "igDebugTextEncoding", "ret": "void", @@ -17262,7 +17477,7 @@ "ctx": "NULL" }, "funcname": "DestroyContext", - "location": "imgui:300", + "location": "imgui:305", "namespace": "ImGui", "ov_cimguiname": "igDestroyContext", "ret": "void", @@ -17284,7 +17499,7 @@ "cimguiname": "igDestroyPlatformWindow", "defaults": {}, "funcname": "DestroyPlatformWindow", - "location": "imgui_internal:3150", + "location": "imgui_internal:3288", "namespace": "ImGui", "ov_cimguiname": "igDestroyPlatformWindow", "ret": "void", @@ -17302,7 +17517,7 @@ "comment": "// call DestroyWindow platform functions for all viewports. call from backend Shutdown() if you need to close platform windows before imgui shutdown. otherwise will be called by DestroyContext().", "defaults": {}, "funcname": "DestroyPlatformWindows", - "location": "imgui:1000", + "location": "imgui:1019", "namespace": "ImGui", "ov_cimguiname": "igDestroyPlatformWindows", "ret": "void", @@ -17331,7 +17546,7 @@ "node_id": "0" }, "funcname": "DockBuilderAddNode", - "location": "imgui_internal:3402", + "location": "imgui_internal:3550", "namespace": "ImGui", "ov_cimguiname": "igDockBuilderAddNode", "ret": "ImGuiID", @@ -17361,7 +17576,7 @@ "cimguiname": "igDockBuilderCopyDockSpace", "defaults": {}, "funcname": "DockBuilderCopyDockSpace", - "location": "imgui_internal:3409", + "location": "imgui_internal:3557", "namespace": "ImGui", "ov_cimguiname": "igDockBuilderCopyDockSpace", "ret": "void", @@ -17391,7 +17606,7 @@ "cimguiname": "igDockBuilderCopyNode", "defaults": {}, "funcname": "DockBuilderCopyNode", - "location": "imgui_internal:3410", + "location": "imgui_internal:3558", "namespace": "ImGui", "ov_cimguiname": "igDockBuilderCopyNode", "ret": "void", @@ -17417,7 +17632,7 @@ "cimguiname": "igDockBuilderCopyWindowSettings", "defaults": {}, "funcname": "DockBuilderCopyWindowSettings", - "location": "imgui_internal:3411", + "location": "imgui_internal:3559", "namespace": "ImGui", "ov_cimguiname": "igDockBuilderCopyWindowSettings", "ret": "void", @@ -17443,7 +17658,7 @@ "cimguiname": "igDockBuilderDockWindow", "defaults": {}, "funcname": "DockBuilderDockWindow", - "location": "imgui_internal:3399", + "location": "imgui_internal:3547", "namespace": "ImGui", "ov_cimguiname": "igDockBuilderDockWindow", "ret": "void", @@ -17465,7 +17680,7 @@ "cimguiname": "igDockBuilderFinish", "defaults": {}, "funcname": "DockBuilderFinish", - "location": "imgui_internal:3412", + "location": "imgui_internal:3560", "namespace": "ImGui", "ov_cimguiname": "igDockBuilderFinish", "ret": "void", @@ -17487,7 +17702,7 @@ "cimguiname": "igDockBuilderGetCentralNode", "defaults": {}, "funcname": "DockBuilderGetCentralNode", - "location": "imgui_internal:3401", + "location": "imgui_internal:3549", "namespace": "ImGui", "ov_cimguiname": "igDockBuilderGetCentralNode", "ret": "ImGuiDockNode*", @@ -17509,7 +17724,7 @@ "cimguiname": "igDockBuilderGetNode", "defaults": {}, "funcname": "DockBuilderGetNode", - "location": "imgui_internal:3400", + "location": "imgui_internal:3548", "namespace": "ImGui", "ov_cimguiname": "igDockBuilderGetNode", "ret": "ImGuiDockNode*", @@ -17532,7 +17747,7 @@ "comment": "// Remove node and all its child, undock all windows", "defaults": {}, "funcname": "DockBuilderRemoveNode", - "location": "imgui_internal:3403", + "location": "imgui_internal:3551", "namespace": "ImGui", "ov_cimguiname": "igDockBuilderRemoveNode", "ret": "void", @@ -17555,7 +17770,7 @@ "comment": "// Remove all split/hierarchy. All remaining docked windows will be re-docked to the remaining root node (node_id).", "defaults": {}, "funcname": "DockBuilderRemoveNodeChildNodes", - "location": "imgui_internal:3405", + "location": "imgui_internal:3553", "namespace": "ImGui", "ov_cimguiname": "igDockBuilderRemoveNodeChildNodes", "ret": "void", @@ -17583,7 +17798,7 @@ "clear_settings_refs": "true" }, "funcname": "DockBuilderRemoveNodeDockedWindows", - "location": "imgui_internal:3404", + "location": "imgui_internal:3552", "namespace": "ImGui", "ov_cimguiname": "igDockBuilderRemoveNodeDockedWindows", "ret": "void", @@ -17609,7 +17824,7 @@ "cimguiname": "igDockBuilderSetNodePos", "defaults": {}, "funcname": "DockBuilderSetNodePos", - "location": "imgui_internal:3406", + "location": "imgui_internal:3554", "namespace": "ImGui", "ov_cimguiname": "igDockBuilderSetNodePos", "ret": "void", @@ -17635,7 +17850,7 @@ "cimguiname": "igDockBuilderSetNodeSize", "defaults": {}, "funcname": "DockBuilderSetNodeSize", - "location": "imgui_internal:3407", + "location": "imgui_internal:3555", "namespace": "ImGui", "ov_cimguiname": "igDockBuilderSetNodeSize", "ret": "void", @@ -17674,7 +17889,7 @@ "comment": "// Create 2 child nodes in this parent node.", "defaults": {}, "funcname": "DockBuilderSplitNode", - "location": "imgui_internal:3408", + "location": "imgui_internal:3556", "namespace": "ImGui", "ov_cimguiname": "igDockBuilderSplitNode", "ret": "ImGuiID", @@ -17720,7 +17935,7 @@ "cimguiname": "igDockContextCalcDropPosForDocking", "defaults": {}, "funcname": "DockContextCalcDropPosForDocking", - "location": "imgui_internal:3374", + "location": "imgui_internal:3522", "namespace": "ImGui", "ov_cimguiname": "igDockContextCalcDropPosForDocking", "ret": "bool", @@ -17751,7 +17966,7 @@ "comment": "// Use root_id==0 to clear all", "defaults": {}, "funcname": "DockContextClearNodes", - "location": "imgui_internal:3363", + "location": "imgui_internal:3511", "namespace": "ImGui", "ov_cimguiname": "igDockContextClearNodes", "ret": "void", @@ -17773,7 +17988,7 @@ "cimguiname": "igDockContextEndFrame", "defaults": {}, "funcname": "DockContextEndFrame", - "location": "imgui_internal:3367", + "location": "imgui_internal:3515", "namespace": "ImGui", "ov_cimguiname": "igDockContextEndFrame", "ret": "void", @@ -17799,7 +18014,7 @@ "cimguiname": "igDockContextFindNodeByID", "defaults": {}, "funcname": "DockContextFindNodeByID", - "location": "imgui_internal:3375", + "location": "imgui_internal:3523", "namespace": "ImGui", "ov_cimguiname": "igDockContextFindNodeByID", "ret": "ImGuiDockNode*", @@ -17821,7 +18036,7 @@ "cimguiname": "igDockContextGenNodeID", "defaults": {}, "funcname": "DockContextGenNodeID", - "location": "imgui_internal:3368", + "location": "imgui_internal:3516", "namespace": "ImGui", "ov_cimguiname": "igDockContextGenNodeID", "ret": "ImGuiID", @@ -17843,7 +18058,7 @@ "cimguiname": "igDockContextInitialize", "defaults": {}, "funcname": "DockContextInitialize", - "location": "imgui_internal:3361", + "location": "imgui_internal:3509", "namespace": "ImGui", "ov_cimguiname": "igDockContextInitialize", "ret": "void", @@ -17865,7 +18080,7 @@ "cimguiname": "igDockContextNewFrameUpdateDocking", "defaults": {}, "funcname": "DockContextNewFrameUpdateDocking", - "location": "imgui_internal:3366", + "location": "imgui_internal:3514", "namespace": "ImGui", "ov_cimguiname": "igDockContextNewFrameUpdateDocking", "ret": "void", @@ -17887,7 +18102,7 @@ "cimguiname": "igDockContextNewFrameUpdateUndocking", "defaults": {}, "funcname": "DockContextNewFrameUpdateUndocking", - "location": "imgui_internal:3365", + "location": "imgui_internal:3513", "namespace": "ImGui", "ov_cimguiname": "igDockContextNewFrameUpdateUndocking", "ret": "void", @@ -17913,7 +18128,7 @@ "cimguiname": "igDockContextProcessUndockNode", "defaults": {}, "funcname": "DockContextProcessUndockNode", - "location": "imgui_internal:3373", + "location": "imgui_internal:3521", "namespace": "ImGui", "ov_cimguiname": "igDockContextProcessUndockNode", "ret": "void", @@ -17945,7 +18160,7 @@ "clear_persistent_docking_ref": "true" }, "funcname": "DockContextProcessUndockWindow", - "location": "imgui_internal:3372", + "location": "imgui_internal:3520", "namespace": "ImGui", "ov_cimguiname": "igDockContextProcessUndockWindow", "ret": "void", @@ -17991,7 +18206,7 @@ "cimguiname": "igDockContextQueueDock", "defaults": {}, "funcname": "DockContextQueueDock", - "location": "imgui_internal:3369", + "location": "imgui_internal:3517", "namespace": "ImGui", "ov_cimguiname": "igDockContextQueueDock", "ret": "void", @@ -18017,7 +18232,7 @@ "cimguiname": "igDockContextQueueUndockNode", "defaults": {}, "funcname": "DockContextQueueUndockNode", - "location": "imgui_internal:3371", + "location": "imgui_internal:3519", "namespace": "ImGui", "ov_cimguiname": "igDockContextQueueUndockNode", "ret": "void", @@ -18043,7 +18258,7 @@ "cimguiname": "igDockContextQueueUndockWindow", "defaults": {}, "funcname": "DockContextQueueUndockWindow", - "location": "imgui_internal:3370", + "location": "imgui_internal:3518", "namespace": "ImGui", "ov_cimguiname": "igDockContextQueueUndockWindow", "ret": "void", @@ -18065,7 +18280,7 @@ "cimguiname": "igDockContextRebuildNodes", "defaults": {}, "funcname": "DockContextRebuildNodes", - "location": "imgui_internal:3364", + "location": "imgui_internal:3512", "namespace": "ImGui", "ov_cimguiname": "igDockContextRebuildNodes", "ret": "void", @@ -18087,7 +18302,7 @@ "cimguiname": "igDockContextShutdown", "defaults": {}, "funcname": "DockContextShutdown", - "location": "imgui_internal:3362", + "location": "imgui_internal:3510", "namespace": "ImGui", "ov_cimguiname": "igDockContextShutdown", "ret": "void", @@ -18109,7 +18324,7 @@ "cimguiname": "igDockNodeBeginAmendTabBar", "defaults": {}, "funcname": "DockNodeBeginAmendTabBar", - "location": "imgui_internal:3377", + "location": "imgui_internal:3525", "namespace": "ImGui", "ov_cimguiname": "igDockNodeBeginAmendTabBar", "ret": "bool", @@ -18126,7 +18341,7 @@ "cimguiname": "igDockNodeEndAmendTabBar", "defaults": {}, "funcname": "DockNodeEndAmendTabBar", - "location": "imgui_internal:3378", + "location": "imgui_internal:3526", "namespace": "ImGui", "ov_cimguiname": "igDockNodeEndAmendTabBar", "ret": "void", @@ -18148,7 +18363,7 @@ "cimguiname": "igDockNodeGetDepth", "defaults": {}, "funcname": "DockNodeGetDepth", - "location": "imgui_internal:3381", + "location": "imgui_internal:3529", "namespace": "ImGui", "ov_cimguiname": "igDockNodeGetDepth", "ret": "int", @@ -18170,7 +18385,7 @@ "cimguiname": "igDockNodeGetRootNode", "defaults": {}, "funcname": "DockNodeGetRootNode", - "location": "imgui_internal:3379", + "location": "imgui_internal:3527", "namespace": "ImGui", "ov_cimguiname": "igDockNodeGetRootNode", "ret": "ImGuiDockNode*", @@ -18192,7 +18407,7 @@ "cimguiname": "igDockNodeGetWindowMenuButtonId", "defaults": {}, "funcname": "DockNodeGetWindowMenuButtonId", - "location": "imgui_internal:3382", + "location": "imgui_internal:3530", "namespace": "ImGui", "ov_cimguiname": "igDockNodeGetWindowMenuButtonId", "ret": "ImGuiID", @@ -18218,7 +18433,7 @@ "cimguiname": "igDockNodeIsInHierarchyOf", "defaults": {}, "funcname": "DockNodeIsInHierarchyOf", - "location": "imgui_internal:3380", + "location": "imgui_internal:3528", "namespace": "ImGui", "ov_cimguiname": "igDockNodeIsInHierarchyOf", "ret": "bool", @@ -18248,7 +18463,7 @@ "cimguiname": "igDockNodeWindowMenuHandler_Default", "defaults": {}, "funcname": "DockNodeWindowMenuHandler_Default", - "location": "imgui_internal:3376", + "location": "imgui_internal:3524", "namespace": "ImGui", "ov_cimguiname": "igDockNodeWindowMenuHandler_Default", "ret": "void", @@ -18286,7 +18501,7 @@ "window_class": "NULL" }, "funcname": "DockSpace", - "location": "imgui:830", + "location": "imgui:847", "namespace": "ImGui", "ov_cimguiname": "igDockSpace", "ret": "ImGuiID", @@ -18320,7 +18535,7 @@ "window_class": "NULL" }, "funcname": "DockSpaceOverViewport", - "location": "imgui:831", + "location": "imgui:848", "namespace": "ImGui", "ov_cimguiname": "igDockSpaceOverViewport", "ret": "ImGuiID", @@ -18370,7 +18585,7 @@ "cimguiname": "igDragBehavior", "defaults": {}, "funcname": "DragBehavior", - "location": "imgui_internal:3575", + "location": "imgui_internal:3725", "namespace": "ImGui", "ov_cimguiname": "igDragBehavior", "ret": "bool", @@ -18423,7 +18638,7 @@ "v_speed": "1.0f" }, "funcname": "DragFloat", - "location": "imgui:553", + "location": "imgui:573", "namespace": "ImGui", "ov_cimguiname": "igDragFloat", "ret": "bool", @@ -18475,7 +18690,7 @@ "v_speed": "1.0f" }, "funcname": "DragFloat2", - "location": "imgui:554", + "location": "imgui:574", "namespace": "ImGui", "ov_cimguiname": "igDragFloat2", "ret": "bool", @@ -18527,7 +18742,7 @@ "v_speed": "1.0f" }, "funcname": "DragFloat3", - "location": "imgui:555", + "location": "imgui:575", "namespace": "ImGui", "ov_cimguiname": "igDragFloat3", "ret": "bool", @@ -18579,7 +18794,7 @@ "v_speed": "1.0f" }, "funcname": "DragFloat4", - "location": "imgui:556", + "location": "imgui:576", "namespace": "ImGui", "ov_cimguiname": "igDragFloat4", "ret": "bool", @@ -18640,7 +18855,7 @@ "v_speed": "1.0f" }, "funcname": "DragFloatRange2", - "location": "imgui:557", + "location": "imgui:577", "namespace": "ImGui", "ov_cimguiname": "igDragFloatRange2", "ret": "bool", @@ -18693,7 +18908,7 @@ "v_speed": "1.0f" }, "funcname": "DragInt", - "location": "imgui:558", + "location": "imgui:578", "namespace": "ImGui", "ov_cimguiname": "igDragInt", "ret": "bool", @@ -18745,7 +18960,7 @@ "v_speed": "1.0f" }, "funcname": "DragInt2", - "location": "imgui:559", + "location": "imgui:579", "namespace": "ImGui", "ov_cimguiname": "igDragInt2", "ret": "bool", @@ -18797,7 +19012,7 @@ "v_speed": "1.0f" }, "funcname": "DragInt3", - "location": "imgui:560", + "location": "imgui:580", "namespace": "ImGui", "ov_cimguiname": "igDragInt3", "ret": "bool", @@ -18849,7 +19064,7 @@ "v_speed": "1.0f" }, "funcname": "DragInt4", - "location": "imgui:561", + "location": "imgui:581", "namespace": "ImGui", "ov_cimguiname": "igDragInt4", "ret": "bool", @@ -18910,7 +19125,7 @@ "v_speed": "1.0f" }, "funcname": "DragIntRange2", - "location": "imgui:562", + "location": "imgui:582", "namespace": "ImGui", "ov_cimguiname": "igDragIntRange2", "ret": "bool", @@ -18966,7 +19181,7 @@ "v_speed": "1.0f" }, "funcname": "DragScalar", - "location": "imgui:563", + "location": "imgui:583", "namespace": "ImGui", "ov_cimguiname": "igDragScalar", "ret": "bool", @@ -19026,7 +19241,7 @@ "v_speed": "1.0f" }, "funcname": "DragScalarN", - "location": "imgui:564", + "location": "imgui:584", "namespace": "ImGui", "ov_cimguiname": "igDragScalarN", "ret": "bool", @@ -19049,7 +19264,7 @@ "comment": "// add a dummy item of given size. unlike InvisibleButton(), Dummy() won't take the mouse click or be navigable into.", "defaults": {}, "funcname": "Dummy", - "location": "imgui:456", + "location": "imgui:483", "namespace": "ImGui", "ov_cimguiname": "igDummy", "ret": "void", @@ -19066,7 +19281,7 @@ "cimguiname": "igEnd", "defaults": {}, "funcname": "End", - "location": "imgui:342", + "location": "imgui:347", "namespace": "ImGui", "ov_cimguiname": "igEnd", "ret": "void", @@ -19083,7 +19298,7 @@ "cimguiname": "igEndChild", "defaults": {}, "funcname": "EndChild", - "location": "imgui:354", + "location": "imgui:369", "namespace": "ImGui", "ov_cimguiname": "igEndChild", "ret": "void", @@ -19091,24 +19306,6 @@ "stname": "" } ], - "igEndChildFrame": [ - { - "args": "()", - "argsT": [], - "argsoriginal": "()", - "call_args": "()", - "cimguiname": "igEndChildFrame", - "comment": "// always call EndChildFrame() regardless of BeginChildFrame() return values (which indicates a collapsed/clipped window)", - "defaults": {}, - "funcname": "EndChildFrame", - "location": "imgui:923", - "namespace": "ImGui", - "ov_cimguiname": "igEndChildFrame", - "ret": "void", - "signature": "()", - "stname": "" - } - ], "igEndColumns": [ { "args": "()", @@ -19119,7 +19316,7 @@ "comment": "// close columns", "defaults": {}, "funcname": "EndColumns", - "location": "imgui_internal:3442", + "location": "imgui_internal:3590", "namespace": "ImGui", "ov_cimguiname": "igEndColumns", "ret": "void", @@ -19137,7 +19334,7 @@ "comment": "// only call EndCombo() if BeginCombo() returns true!", "defaults": {}, "funcname": "EndCombo", - "location": "imgui:536", + "location": "imgui:556", "namespace": "ImGui", "ov_cimguiname": "igEndCombo", "ret": "void", @@ -19154,7 +19351,7 @@ "cimguiname": "igEndComboPreview", "defaults": {}, "funcname": "EndComboPreview", - "location": "imgui_internal:3254", + "location": "imgui_internal:3393", "namespace": "ImGui", "ov_cimguiname": "igEndComboPreview", "ret": "void", @@ -19171,7 +19368,7 @@ "cimguiname": "igEndDisabled", "defaults": {}, "funcname": "EndDisabled", - "location": "imgui:865", + "location": "imgui:882", "namespace": "ImGui", "ov_cimguiname": "igEndDisabled", "ret": "void", @@ -19189,7 +19386,7 @@ "comment": "// only call EndDragDropSource() if BeginDragDropSource() returns true!", "defaults": {}, "funcname": "EndDragDropSource", - "location": "imgui:854", + "location": "imgui:871", "namespace": "ImGui", "ov_cimguiname": "igEndDragDropSource", "ret": "void", @@ -19207,7 +19404,7 @@ "comment": "// only call EndDragDropTarget() if BeginDragDropTarget() returns true!", "defaults": {}, "funcname": "EndDragDropTarget", - "location": "imgui:857", + "location": "imgui:874", "namespace": "ImGui", "ov_cimguiname": "igEndDragDropTarget", "ret": "void", @@ -19225,7 +19422,7 @@ "comment": "// ends the Dear ImGui frame. automatically called by Render(). If you don't need to render data (skipping rendering) you may call EndFrame() without Render()... but you'll have wasted CPU already! If you don't need to render, better to not create any windows and not call NewFrame() at all!", "defaults": {}, "funcname": "EndFrame", - "location": "imgui:308", + "location": "imgui:313", "namespace": "ImGui", "ov_cimguiname": "igEndFrame", "ret": "void", @@ -19243,7 +19440,7 @@ "comment": "// unlock horizontal starting position + capture the whole group bounding box into one \"item\" (so you can use IsItemHovered() or layout primitives such as SameLine() on whole group, etc.)", "defaults": {}, "funcname": "EndGroup", - "location": "imgui:460", + "location": "imgui:487", "namespace": "ImGui", "ov_cimguiname": "igEndGroup", "ret": "void", @@ -19261,7 +19458,7 @@ "comment": "// only call EndListBox() if BeginListBox() returned true!", "defaults": {}, "funcname": "EndListBox", - "location": "imgui:648", + "location": "imgui:668", "namespace": "ImGui", "ov_cimguiname": "igEndListBox", "ret": "void", @@ -19279,7 +19476,7 @@ "comment": "// only call EndMainMenuBar() if BeginMainMenuBar() returns true!", "defaults": {}, "funcname": "EndMainMenuBar", - "location": "imgui:674", + "location": "imgui:694", "namespace": "ImGui", "ov_cimguiname": "igEndMainMenuBar", "ret": "void", @@ -19297,7 +19494,7 @@ "comment": "// only call EndMenu() if BeginMenu() returns true!", "defaults": {}, "funcname": "EndMenu", - "location": "imgui:676", + "location": "imgui:696", "namespace": "ImGui", "ov_cimguiname": "igEndMenu", "ret": "void", @@ -19315,7 +19512,7 @@ "comment": "// only call EndMenuBar() if BeginMenuBar() returns true!", "defaults": {}, "funcname": "EndMenuBar", - "location": "imgui:672", + "location": "imgui:692", "namespace": "ImGui", "ov_cimguiname": "igEndMenuBar", "ret": "void", @@ -19333,7 +19530,7 @@ "comment": "// only call EndPopup() if BeginPopupXXX() returns true!", "defaults": {}, "funcname": "EndPopup", - "location": "imgui:710", + "location": "imgui:728", "namespace": "ImGui", "ov_cimguiname": "igEndPopup", "ret": "void", @@ -19351,7 +19548,7 @@ "comment": "// only call EndTabBar() if BeginTabBar() returns true!", "defaults": {}, "funcname": "EndTabBar", - "location": "imgui:811", + "location": "imgui:828", "namespace": "ImGui", "ov_cimguiname": "igEndTabBar", "ret": "void", @@ -19369,7 +19566,7 @@ "comment": "// only call EndTabItem() if BeginTabItem() returns true!", "defaults": {}, "funcname": "EndTabItem", - "location": "imgui:813", + "location": "imgui:830", "namespace": "ImGui", "ov_cimguiname": "igEndTabItem", "ret": "void", @@ -19387,7 +19584,7 @@ "comment": "// only call EndTable() if BeginTable() returns true!", "defaults": {}, "funcname": "EndTable", - "location": "imgui:764", + "location": "imgui:780", "namespace": "ImGui", "ov_cimguiname": "igEndTable", "ret": "void", @@ -19405,7 +19602,7 @@ "comment": "// only call EndTooltip() if BeginTooltip()/BeginItemTooltip() returns true!", "defaults": {}, "funcname": "EndTooltip", - "location": "imgui:684", + "location": "imgui:704", "namespace": "ImGui", "ov_cimguiname": "igEndTooltip", "ret": "void", @@ -19433,7 +19630,7 @@ "user_data": "NULL" }, "funcname": "ErrorCheckEndFrameRecover", - "location": "imgui_internal:3632", + "location": "imgui_internal:3784", "namespace": "ImGui", "ov_cimguiname": "igErrorCheckEndFrameRecover", "ret": "void", @@ -19461,7 +19658,7 @@ "user_data": "NULL" }, "funcname": "ErrorCheckEndWindowRecover", - "location": "imgui_internal:3633", + "location": "imgui_internal:3785", "namespace": "ImGui", "ov_cimguiname": "igErrorCheckEndWindowRecover", "ret": "void", @@ -19478,7 +19675,7 @@ "cimguiname": "igErrorCheckUsingSetCursorPosToExtendParentBoundaries", "defaults": {}, "funcname": "ErrorCheckUsingSetCursorPosToExtendParentBoundaries", - "location": "imgui_internal:3634", + "location": "imgui_internal:3786", "namespace": "ImGui", "ov_cimguiname": "igErrorCheckUsingSetCursorPosToExtendParentBoundaries", "ret": "void", @@ -19504,7 +19701,7 @@ "cimguiname": "igFindBestWindowPosForPopup", "defaults": {}, "funcname": "FindBestWindowPosForPopup", - "location": "imgui_internal:3243", + "location": "imgui_internal:3382", "namespace": "ImGui", "nonUDT": 1, "ov_cimguiname": "igFindBestWindowPosForPopup", @@ -19551,7 +19748,7 @@ "cimguiname": "igFindBestWindowPosForPopupEx", "defaults": {}, "funcname": "FindBestWindowPosForPopupEx", - "location": "imgui_internal:3244", + "location": "imgui_internal:3383", "namespace": "ImGui", "nonUDT": 1, "ov_cimguiname": "igFindBestWindowPosForPopupEx", @@ -19574,7 +19771,7 @@ "cimguiname": "igFindBlockingModal", "defaults": {}, "funcname": "FindBlockingModal", - "location": "imgui_internal:3242", + "location": "imgui_internal:3381", "namespace": "ImGui", "ov_cimguiname": "igFindBlockingModal", "ret": "ImGuiWindow*", @@ -19596,7 +19793,7 @@ "cimguiname": "igFindBottomMostVisibleWindowWithinBeginStack", "defaults": {}, "funcname": "FindBottomMostVisibleWindowWithinBeginStack", - "location": "imgui_internal:3122", + "location": "imgui_internal:3260", "namespace": "ImGui", "ov_cimguiname": "igFindBottomMostVisibleWindowWithinBeginStack", "ret": "ImGuiWindow*", @@ -19618,7 +19815,7 @@ "cimguiname": "igFindHoveredViewportFromPlatformWindowStack", "defaults": {}, "funcname": "FindHoveredViewportFromPlatformWindowStack", - "location": "imgui_internal:3154", + "location": "imgui_internal:3292", "namespace": "ImGui", "ov_cimguiname": "igFindHoveredViewportFromPlatformWindowStack", "ret": "ImGuiViewportP*", @@ -19644,7 +19841,7 @@ "cimguiname": "igFindOrCreateColumns", "defaults": {}, "funcname": "FindOrCreateColumns", - "location": "imgui_internal:3447", + "location": "imgui_internal:3595", "namespace": "ImGui", "ov_cimguiname": "igFindOrCreateColumns", "ret": "ImGuiOldColumns*", @@ -19673,7 +19870,7 @@ "text_end": "NULL" }, "funcname": "FindRenderedTextEnd", - "location": "imgui_internal:3540", + "location": "imgui_internal:3690", "namespace": "ImGui", "ov_cimguiname": "igFindRenderedTextEnd", "ret": "const char*", @@ -19695,7 +19892,7 @@ "cimguiname": "igFindSettingsHandler", "defaults": {}, "funcname": "FindSettingsHandler", - "location": "imgui_internal:3162", + "location": "imgui_internal:3300", "namespace": "ImGui", "ov_cimguiname": "igFindSettingsHandler", "ret": "ImGuiSettingsHandler*", @@ -19718,7 +19915,7 @@ "comment": "// this is a helper for backends.", "defaults": {}, "funcname": "FindViewportByID", - "location": "imgui:1001", + "location": "imgui:1020", "namespace": "ImGui", "ov_cimguiname": "igFindViewportByID", "ret": "ImGuiViewport*", @@ -19741,7 +19938,7 @@ "comment": "// this is a helper for backends. the type platform_handle is decided by the backend (e.g. HWND, MyWindow*, GLFWwindow* etc.)", "defaults": {}, "funcname": "FindViewportByPlatformHandle", - "location": "imgui:1002", + "location": "imgui:1021", "namespace": "ImGui", "ov_cimguiname": "igFindViewportByPlatformHandle", "ret": "ImGuiViewport*", @@ -19763,7 +19960,7 @@ "cimguiname": "igFindWindowByID", "defaults": {}, "funcname": "FindWindowByID", - "location": "imgui_internal:3097", + "location": "imgui_internal:3234", "namespace": "ImGui", "ov_cimguiname": "igFindWindowByID", "ret": "ImGuiWindow*", @@ -19785,7 +19982,7 @@ "cimguiname": "igFindWindowByName", "defaults": {}, "funcname": "FindWindowByName", - "location": "imgui_internal:3098", + "location": "imgui_internal:3235", "namespace": "ImGui", "ov_cimguiname": "igFindWindowByName", "ret": "ImGuiWindow*", @@ -19807,7 +20004,7 @@ "cimguiname": "igFindWindowDisplayIndex", "defaults": {}, "funcname": "FindWindowDisplayIndex", - "location": "imgui_internal:3121", + "location": "imgui_internal:3259", "namespace": "ImGui", "ov_cimguiname": "igFindWindowDisplayIndex", "ret": "int", @@ -19829,7 +20026,7 @@ "cimguiname": "igFindWindowSettingsByID", "defaults": {}, "funcname": "FindWindowSettingsByID", - "location": "imgui_internal:3166", + "location": "imgui_internal:3304", "namespace": "ImGui", "ov_cimguiname": "igFindWindowSettingsByID", "ret": "ImGuiWindowSettings*", @@ -19851,7 +20048,7 @@ "cimguiname": "igFindWindowSettingsByWindow", "defaults": {}, "funcname": "FindWindowSettingsByWindow", - "location": "imgui_internal:3167", + "location": "imgui_internal:3305", "namespace": "ImGui", "ov_cimguiname": "igFindWindowSettingsByWindow", "ret": "ImGuiWindowSettings*", @@ -19859,6 +20056,32 @@ "stname": "" } ], + "igFixupKeyChord": [ + { + "args": "(ImGuiContext* ctx,ImGuiKeyChord key_chord)", + "argsT": [ + { + "name": "ctx", + "type": "ImGuiContext*" + }, + { + "name": "key_chord", + "type": "ImGuiKeyChord" + } + ], + "argsoriginal": "(ImGuiContext* ctx,ImGuiKeyChord key_chord)", + "call_args": "(ctx,key_chord)", + "cimguiname": "igFixupKeyChord", + "defaults": {}, + "funcname": "FixupKeyChord", + "location": "imgui_internal:3430", + "namespace": "ImGui", + "ov_cimguiname": "igFixupKeyChord", + "ret": "ImGuiKeyChord", + "signature": "(ImGuiContext*,ImGuiKeyChord)", + "stname": "" + } + ], "igFocusItem": [ { "args": "()", @@ -19869,7 +20092,7 @@ "comment": "// Focus last item (no selection/activation).", "defaults": {}, "funcname": "FocusItem", - "location": "imgui_internal:3276", + "location": "imgui_internal:3417", "namespace": "ImGui", "ov_cimguiname": "igFocusItem", "ret": "void", @@ -19903,7 +20126,7 @@ "cimguiname": "igFocusTopMostWindowUnderOne", "defaults": {}, "funcname": "FocusTopMostWindowUnderOne", - "location": "imgui_internal:3116", + "location": "imgui_internal:3254", "namespace": "ImGui", "ov_cimguiname": "igFocusTopMostWindowUnderOne", "ret": "void", @@ -19931,7 +20154,7 @@ "flags": "0" }, "funcname": "FocusWindow", - "location": "imgui_internal:3115", + "location": "imgui_internal:3253", "namespace": "ImGui", "ov_cimguiname": "igFocusWindow", "ret": "void", @@ -19953,7 +20176,7 @@ "cimguiname": "igGcAwakeTransientWindowBuffers", "defaults": {}, "funcname": "GcAwakeTransientWindowBuffers", - "location": "imgui_internal:3625", + "location": "imgui_internal:3776", "namespace": "ImGui", "ov_cimguiname": "igGcAwakeTransientWindowBuffers", "ret": "void", @@ -19970,7 +20193,7 @@ "cimguiname": "igGcCompactTransientMiscBuffers", "defaults": {}, "funcname": "GcCompactTransientMiscBuffers", - "location": "imgui_internal:3623", + "location": "imgui_internal:3774", "namespace": "ImGui", "ov_cimguiname": "igGcCompactTransientMiscBuffers", "ret": "void", @@ -19992,7 +20215,7 @@ "cimguiname": "igGcCompactTransientWindowBuffers", "defaults": {}, "funcname": "GcCompactTransientWindowBuffers", - "location": "imgui_internal:3624", + "location": "imgui_internal:3775", "namespace": "ImGui", "ov_cimguiname": "igGcCompactTransientWindowBuffers", "ret": "void", @@ -20009,7 +20232,7 @@ "cimguiname": "igGetActiveID", "defaults": {}, "funcname": "GetActiveID", - "location": "imgui_internal:3191", + "location": "imgui_internal:3329", "namespace": "ImGui", "ov_cimguiname": "igGetActiveID", "ret": "ImGuiID", @@ -20039,7 +20262,7 @@ "cimguiname": "igGetAllocatorFunctions", "defaults": {}, "funcname": "GetAllocatorFunctions", - "location": "imgui:990", + "location": "imgui:1009", "namespace": "ImGui", "ov_cimguiname": "igGetAllocatorFunctions", "ret": "void", @@ -20057,7 +20280,7 @@ "comment": "// get background draw list for the viewport associated to the current window. this draw list will be the first rendering one. Useful to quickly draw shapes/text behind dear imgui contents.", "defaults": {}, "funcname": "GetBackgroundDrawList", - "location": "imgui:908", + "location": "imgui:925", "namespace": "ImGui", "ov_cimguiname": "igGetBackgroundDrawList_Nil", "ret": "ImDrawList*", @@ -20078,7 +20301,7 @@ "comment": "// get background draw list for the given viewport. this draw list will be the first rendering one. Useful to quickly draw shapes/text behind dear imgui contents.", "defaults": {}, "funcname": "GetBackgroundDrawList", - "location": "imgui:910", + "location": "imgui:927", "namespace": "ImGui", "ov_cimguiname": "igGetBackgroundDrawList_ViewportPtr", "ret": "ImDrawList*", @@ -20095,7 +20318,7 @@ "cimguiname": "igGetClipboardText", "defaults": {}, "funcname": "GetClipboardText", - "location": "imgui:969", + "location": "imgui:985", "namespace": "ImGui", "ov_cimguiname": "igGetClipboardText", "ret": "const char*", @@ -20124,7 +20347,7 @@ "alpha_mul": "1.0f" }, "funcname": "GetColorU32", - "location": "imgui:440", + "location": "imgui:455", "namespace": "ImGui", "ov_cimguiname": "igGetColorU32_Col", "ret": "ImU32", @@ -20145,7 +20368,7 @@ "comment": "// retrieve given color with style alpha applied, packed as a 32-bit value suitable for ImDrawList", "defaults": {}, "funcname": "GetColorU32", - "location": "imgui:441", + "location": "imgui:456", "namespace": "ImGui", "ov_cimguiname": "igGetColorU32_Vec4", "ret": "ImU32", @@ -20153,24 +20376,30 @@ "stname": "" }, { - "args": "(ImU32 col)", + "args": "(ImU32 col,float alpha_mul)", "argsT": [ { "name": "col", "type": "ImU32" + }, + { + "name": "alpha_mul", + "type": "float" } ], - "argsoriginal": "(ImU32 col)", - "call_args": "(col)", + "argsoriginal": "(ImU32 col,float alpha_mul=1.0f)", + "call_args": "(col,alpha_mul)", "cimguiname": "igGetColorU32", "comment": "// retrieve given color with style alpha applied, packed as a 32-bit value suitable for ImDrawList", - "defaults": {}, + "defaults": { + "alpha_mul": "1.0f" + }, "funcname": "GetColorU32", - "location": "imgui:442", + "location": "imgui:457", "namespace": "ImGui", "ov_cimguiname": "igGetColorU32_U32", "ret": "ImU32", - "signature": "(ImU32)", + "signature": "(ImU32,float)", "stname": "" } ], @@ -20184,7 +20413,7 @@ "comment": "// get current column index", "defaults": {}, "funcname": "GetColumnIndex", - "location": "imgui:801", + "location": "imgui:818", "namespace": "ImGui", "ov_cimguiname": "igGetColumnIndex", "ret": "int", @@ -20210,7 +20439,7 @@ "cimguiname": "igGetColumnNormFromOffset", "defaults": {}, "funcname": "GetColumnNormFromOffset", - "location": "imgui_internal:3449", + "location": "imgui_internal:3597", "namespace": "ImGui", "ov_cimguiname": "igGetColumnNormFromOffset", "ret": "float", @@ -20235,7 +20464,7 @@ "column_index": "-1" }, "funcname": "GetColumnOffset", - "location": "imgui:804", + "location": "imgui:821", "namespace": "ImGui", "ov_cimguiname": "igGetColumnOffset", "ret": "float", @@ -20261,7 +20490,7 @@ "cimguiname": "igGetColumnOffsetFromNorm", "defaults": {}, "funcname": "GetColumnOffsetFromNorm", - "location": "imgui_internal:3448", + "location": "imgui_internal:3596", "namespace": "ImGui", "ov_cimguiname": "igGetColumnOffsetFromNorm", "ret": "float", @@ -20286,7 +20515,7 @@ "column_index": "-1" }, "funcname": "GetColumnWidth", - "location": "imgui:802", + "location": "imgui:819", "namespace": "ImGui", "ov_cimguiname": "igGetColumnWidth", "ret": "float", @@ -20303,7 +20532,7 @@ "cimguiname": "igGetColumnsCount", "defaults": {}, "funcname": "GetColumnsCount", - "location": "imgui:806", + "location": "imgui:823", "namespace": "ImGui", "ov_cimguiname": "igGetColumnsCount", "ret": "int", @@ -20329,7 +20558,7 @@ "cimguiname": "igGetColumnsID", "defaults": {}, "funcname": "GetColumnsID", - "location": "imgui_internal:3446", + "location": "imgui_internal:3594", "namespace": "ImGui", "ov_cimguiname": "igGetColumnsID", "ret": "ImGuiID", @@ -20352,7 +20581,7 @@ "comment": "// == GetContentRegionMax() - GetCursorPos()", "defaults": {}, "funcname": "GetContentRegionAvail", - "location": "imgui:394", + "location": "imgui:409", "namespace": "ImGui", "nonUDT": 1, "ov_cimguiname": "igGetContentRegionAvail", @@ -20376,7 +20605,7 @@ "comment": "// current content boundaries (typically window boundaries including scrolling, or current column boundaries), in windows coordinates", "defaults": {}, "funcname": "GetContentRegionMax", - "location": "imgui:395", + "location": "imgui:410", "namespace": "ImGui", "nonUDT": 1, "ov_cimguiname": "igGetContentRegionMax", @@ -20399,7 +20628,7 @@ "cimguiname": "igGetContentRegionMaxAbs", "defaults": {}, "funcname": "GetContentRegionMaxAbs", - "location": "imgui_internal:3216", + "location": "imgui_internal:3354", "namespace": "ImGui", "nonUDT": 1, "ov_cimguiname": "igGetContentRegionMaxAbs", @@ -20417,7 +20646,7 @@ "cimguiname": "igGetCurrentContext", "defaults": {}, "funcname": "GetCurrentContext", - "location": "imgui:301", + "location": "imgui:306", "namespace": "ImGui", "ov_cimguiname": "igGetCurrentContext", "ret": "ImGuiContext*", @@ -20435,7 +20664,7 @@ "comment": "// Focus scope we are outputting into, set by PushFocusScope()", "defaults": {}, "funcname": "GetCurrentFocusScope", - "location": "imgui_internal:3424", + "location": "imgui_internal:3572", "namespace": "ImGui", "ov_cimguiname": "igGetCurrentFocusScope", "ret": "ImGuiID", @@ -20452,7 +20681,7 @@ "cimguiname": "igGetCurrentTabBar", "defaults": {}, "funcname": "GetCurrentTabBar", - "location": "imgui_internal:3507", + "location": "imgui_internal:3657", "namespace": "ImGui", "ov_cimguiname": "igGetCurrentTabBar", "ret": "ImGuiTabBar*", @@ -20469,7 +20698,7 @@ "cimguiname": "igGetCurrentTable", "defaults": {}, "funcname": "GetCurrentTable", - "location": "imgui_internal:3462", + "location": "imgui_internal:3612", "namespace": "ImGui", "ov_cimguiname": "igGetCurrentTable", "ret": "ImGuiTable*", @@ -20486,7 +20715,7 @@ "cimguiname": "igGetCurrentWindow", "defaults": {}, "funcname": "GetCurrentWindow", - "location": "imgui_internal:3096", + "location": "imgui_internal:3233", "namespace": "ImGui", "ov_cimguiname": "igGetCurrentWindow", "ret": "ImGuiWindow*", @@ -20503,7 +20732,7 @@ "cimguiname": "igGetCurrentWindowRead", "defaults": {}, "funcname": "GetCurrentWindowRead", - "location": "imgui_internal:3095", + "location": "imgui_internal:3232", "namespace": "ImGui", "ov_cimguiname": "igGetCurrentWindowRead", "ret": "ImGuiWindow*", @@ -20523,10 +20752,10 @@ "argsoriginal": "()", "call_args": "()", "cimguiname": "igGetCursorPos", - "comment": "// cursor position in window coordinates (relative to window position)", + "comment": "// [window-local] cursor position in window coordinates (relative to window position)", "defaults": {}, "funcname": "GetCursorPos", - "location": "imgui:461", + "location": "imgui:470", "namespace": "ImGui", "nonUDT": 1, "ov_cimguiname": "igGetCursorPos", @@ -20542,10 +20771,10 @@ "argsoriginal": "()", "call_args": "()", "cimguiname": "igGetCursorPosX", - "comment": "// (some functions are using window-relative coordinates, such as: GetCursorPos, GetCursorStartPos, GetContentRegionMax, GetWindowContentRegion* etc.", + "comment": "// [window-local] \"", "defaults": {}, "funcname": "GetCursorPosX", - "location": "imgui:462", + "location": "imgui:471", "namespace": "ImGui", "ov_cimguiname": "igGetCursorPosX", "ret": "float", @@ -20560,10 +20789,10 @@ "argsoriginal": "()", "call_args": "()", "cimguiname": "igGetCursorPosY", - "comment": "// other functions such as GetCursorScreenPos or everything in ImDrawList::", + "comment": "// [window-local] \"", "defaults": {}, "funcname": "GetCursorPosY", - "location": "imgui:463", + "location": "imgui:472", "namespace": "ImGui", "ov_cimguiname": "igGetCursorPosY", "ret": "float", @@ -20583,7 +20812,7 @@ "argsoriginal": "()", "call_args": "()", "cimguiname": "igGetCursorScreenPos", - "comment": "// cursor position in absolute coordinates (useful to work with ImDrawList API). generally top-left == GetMainViewport()->Pos == (0,0) in single viewport mode, and bottom-right == GetMainViewport()->Pos+Size == io.DisplaySize in single-viewport mode.", + "comment": "// cursor position in absolute coordinates (prefer using this, also more useful to work with ImDrawList API).", "defaults": {}, "funcname": "GetCursorScreenPos", "location": "imgui:468", @@ -20607,10 +20836,10 @@ "argsoriginal": "()", "call_args": "()", "cimguiname": "igGetCursorStartPos", - "comment": "// initial cursor position in window coordinates", + "comment": "// [window-local] initial cursor position, in window coordinates", "defaults": {}, "funcname": "GetCursorStartPos", - "location": "imgui:467", + "location": "imgui:476", "namespace": "ImGui", "nonUDT": 1, "ov_cimguiname": "igGetCursorStartPos", @@ -20628,7 +20857,7 @@ "cimguiname": "igGetDefaultFont", "defaults": {}, "funcname": "GetDefaultFont", - "location": "imgui_internal:3126", + "location": "imgui_internal:3264", "namespace": "ImGui", "ov_cimguiname": "igGetDefaultFont", "ret": "ImFont*", @@ -20643,10 +20872,10 @@ "argsoriginal": "()", "call_args": "()", "cimguiname": "igGetDragDropPayload", - "comment": "// peek directly into the current payload from anywhere. may return NULL. use ImGuiPayload::IsDataType() to test for the payload type.", + "comment": "// peek directly into the current payload from anywhere. returns NULL when drag and drop is finished or inactive. use ImGuiPayload::IsDataType() to test for the payload type.", "defaults": {}, "funcname": "GetDragDropPayload", - "location": "imgui:858", + "location": "imgui:875", "namespace": "ImGui", "ov_cimguiname": "igGetDragDropPayload", "ret": "const ImGuiPayload*", @@ -20664,7 +20893,7 @@ "comment": "// valid after Render() and until the next call to NewFrame(). this is what you have to render.", "defaults": {}, "funcname": "GetDrawData", - "location": "imgui:310", + "location": "imgui:315", "namespace": "ImGui", "ov_cimguiname": "igGetDrawData", "ret": "ImDrawData*", @@ -20682,7 +20911,7 @@ "comment": "// you may use this when creating your own ImDrawList instances.", "defaults": {}, "funcname": "GetDrawListSharedData", - "location": "imgui:918", + "location": "imgui:935", "namespace": "ImGui", "ov_cimguiname": "igGetDrawListSharedData", "ret": "ImDrawListSharedData*", @@ -20699,7 +20928,7 @@ "cimguiname": "igGetFocusID", "defaults": {}, "funcname": "GetFocusID", - "location": "imgui_internal:3192", + "location": "imgui_internal:3330", "namespace": "ImGui", "ov_cimguiname": "igGetFocusID", "ret": "ImGuiID", @@ -20717,7 +20946,7 @@ "comment": "// get current font", "defaults": {}, "funcname": "GetFont", - "location": "imgui:437", + "location": "imgui:452", "namespace": "ImGui", "ov_cimguiname": "igGetFont", "ret": "ImFont*", @@ -20735,7 +20964,7 @@ "comment": "// get current font size (= height in pixels) of current font with current scale applied", "defaults": {}, "funcname": "GetFontSize", - "location": "imgui:438", + "location": "imgui:453", "namespace": "ImGui", "ov_cimguiname": "igGetFontSize", "ret": "float", @@ -20758,7 +20987,7 @@ "comment": "// get UV coordinate for a while pixel, useful to draw custom shapes via the ImDrawList API", "defaults": {}, "funcname": "GetFontTexUvWhitePixel", - "location": "imgui:439", + "location": "imgui:454", "namespace": "ImGui", "nonUDT": 1, "ov_cimguiname": "igGetFontTexUvWhitePixel", @@ -20777,7 +21006,7 @@ "comment": "// get foreground draw list for the viewport associated to the current window. this draw list will be the last rendered one. Useful to quickly draw shapes/text over dear imgui contents.", "defaults": {}, "funcname": "GetForegroundDrawList", - "location": "imgui:909", + "location": "imgui:926", "namespace": "ImGui", "ov_cimguiname": "igGetForegroundDrawList_Nil", "ret": "ImDrawList*", @@ -20798,7 +21027,7 @@ "comment": "// get foreground draw list for the given viewport. this draw list will be the last rendered one. Useful to quickly draw shapes/text over dear imgui contents.", "defaults": {}, "funcname": "GetForegroundDrawList", - "location": "imgui:911", + "location": "imgui:928", "namespace": "ImGui", "ov_cimguiname": "igGetForegroundDrawList_ViewportPtr", "ret": "ImDrawList*", @@ -20818,7 +21047,7 @@ "cimguiname": "igGetForegroundDrawList", "defaults": {}, "funcname": "GetForegroundDrawList", - "location": "imgui_internal:3127", + "location": "imgui_internal:3265", "namespace": "ImGui", "ov_cimguiname": "igGetForegroundDrawList_WindowPtr", "ret": "ImDrawList*", @@ -20836,7 +21065,7 @@ "comment": "// get global imgui frame count. incremented by 1 every frame.", "defaults": {}, "funcname": "GetFrameCount", - "location": "imgui:917", + "location": "imgui:934", "namespace": "ImGui", "ov_cimguiname": "igGetFrameCount", "ret": "int", @@ -20854,7 +21083,7 @@ "comment": "// ~ FontSize + style.FramePadding.y * 2", "defaults": {}, "funcname": "GetFrameHeight", - "location": "imgui:473", + "location": "imgui:491", "namespace": "ImGui", "ov_cimguiname": "igGetFrameHeight", "ret": "float", @@ -20872,7 +21101,7 @@ "comment": "// ~ FontSize + style.FramePadding.y * 2 + style.ItemSpacing.y (distance in pixels between 2 consecutive lines of framed widgets)", "defaults": {}, "funcname": "GetFrameHeightWithSpacing", - "location": "imgui:474", + "location": "imgui:492", "namespace": "ImGui", "ov_cimguiname": "igGetFrameHeightWithSpacing", "ret": "float", @@ -20889,7 +21118,7 @@ "cimguiname": "igGetHoveredID", "defaults": {}, "funcname": "GetHoveredID", - "location": "imgui_internal:3196", + "location": "imgui_internal:3334", "namespace": "ImGui", "ov_cimguiname": "igGetHoveredID", "ret": "ImGuiID", @@ -20912,7 +21141,7 @@ "comment": "// calculate unique ID (hash of whole ID stack + given parameter). e.g. if you want to query into ImGuiStorage yourself", "defaults": {}, "funcname": "GetID", - "location": "imgui:492", + "location": "imgui:510", "namespace": "ImGui", "ov_cimguiname": "igGetID_Str", "ret": "ImGuiID", @@ -20936,7 +21165,7 @@ "cimguiname": "igGetID", "defaults": {}, "funcname": "GetID", - "location": "imgui:493", + "location": "imgui:511", "namespace": "ImGui", "ov_cimguiname": "igGetID_StrStr", "ret": "ImGuiID", @@ -20956,7 +21185,7 @@ "cimguiname": "igGetID", "defaults": {}, "funcname": "GetID", - "location": "imgui:494", + "location": "imgui:512", "namespace": "ImGui", "ov_cimguiname": "igGetID_Ptr", "ret": "ImGuiID", @@ -20986,7 +21215,7 @@ "cimguiname": "igGetIDWithSeed", "defaults": {}, "funcname": "GetIDWithSeed", - "location": "imgui_internal:3201", + "location": "imgui_internal:3339", "namespace": "ImGui", "ov_cimguiname": "igGetIDWithSeed_Str", "ret": "ImGuiID", @@ -21010,7 +21239,7 @@ "cimguiname": "igGetIDWithSeed", "defaults": {}, "funcname": "GetIDWithSeed", - "location": "imgui_internal:3202", + "location": "imgui_internal:3340", "namespace": "ImGui", "ov_cimguiname": "igGetIDWithSeed_Int", "ret": "ImGuiID", @@ -21028,7 +21257,7 @@ "comment": "// access the IO structure (mouse/keyboard/gamepad inputs, time, various configuration options/flags)", "defaults": {}, "funcname": "GetIO", - "location": "imgui:305", + "location": "imgui:310", "namespace": "ImGui", "ov_cimguiname": "igGetIO", "ret": "ImGuiIO*", @@ -21052,7 +21281,7 @@ "comment": "// Get input text state if active", "defaults": {}, "funcname": "GetInputTextState", - "location": "imgui_internal:3608", + "location": "imgui_internal:3758", "namespace": "ImGui", "ov_cimguiname": "igGetInputTextState", "ret": "ImGuiInputTextState*", @@ -21069,7 +21298,7 @@ "cimguiname": "igGetItemFlags", "defaults": {}, "funcname": "GetItemFlags", - "location": "imgui_internal:3190", + "location": "imgui_internal:3328", "namespace": "ImGui", "ov_cimguiname": "igGetItemFlags", "ret": "ImGuiItemFlags", @@ -21087,7 +21316,7 @@ "comment": "// get ID of last item (~~ often same ImGui::GetID(label) beforehand)", "defaults": {}, "funcname": "GetItemID", - "location": "imgui:896", + "location": "imgui:913", "namespace": "ImGui", "ov_cimguiname": "igGetItemID", "ret": "ImGuiID", @@ -21110,7 +21339,7 @@ "comment": "// get lower-right bounding rectangle of the last item (screen space)", "defaults": {}, "funcname": "GetItemRectMax", - "location": "imgui:898", + "location": "imgui:915", "namespace": "ImGui", "nonUDT": 1, "ov_cimguiname": "igGetItemRectMax", @@ -21134,7 +21363,7 @@ "comment": "// get upper-left bounding rectangle of the last item (screen space)", "defaults": {}, "funcname": "GetItemRectMin", - "location": "imgui:897", + "location": "imgui:914", "namespace": "ImGui", "nonUDT": 1, "ov_cimguiname": "igGetItemRectMin", @@ -21158,7 +21387,7 @@ "comment": "// get size of last item", "defaults": {}, "funcname": "GetItemRectSize", - "location": "imgui:899", + "location": "imgui:916", "namespace": "ImGui", "nonUDT": 1, "ov_cimguiname": "igGetItemRectSize", @@ -21176,7 +21405,7 @@ "cimguiname": "igGetItemStatusFlags", "defaults": {}, "funcname": "GetItemStatusFlags", - "location": "imgui_internal:3189", + "location": "imgui_internal:3327", "namespace": "ImGui", "ov_cimguiname": "igGetItemStatusFlags", "ret": "ImGuiItemStatusFlags", @@ -21186,31 +21415,23 @@ ], "igGetKeyChordName": [ { - "args": "(ImGuiKeyChord key_chord,char* out_buf,int out_buf_size)", + "args": "(ImGuiKeyChord key_chord)", "argsT": [ { "name": "key_chord", "type": "ImGuiKeyChord" - }, - { - "name": "out_buf", - "type": "char*" - }, - { - "name": "out_buf_size", - "type": "int" } ], - "argsoriginal": "(ImGuiKeyChord key_chord,char* out_buf,int out_buf_size)", - "call_args": "(key_chord,out_buf,out_buf_size)", + "argsoriginal": "(ImGuiKeyChord key_chord)", + "call_args": "(key_chord)", "cimguiname": "igGetKeyChordName", "defaults": {}, "funcname": "GetKeyChordName", - "location": "imgui_internal:3302", + "location": "imgui_internal:3444", "namespace": "ImGui", "ov_cimguiname": "igGetKeyChordName", - "ret": "void", - "signature": "(ImGuiKeyChord,char*,int)", + "ret": "const char*", + "signature": "(ImGuiKeyChord)", "stname": "" } ], @@ -21232,7 +21453,7 @@ "cimguiname": "igGetKeyData", "defaults": {}, "funcname": "GetKeyData", - "location": "imgui_internal:3300", + "location": "imgui_internal:3442", "namespace": "ImGui", "ov_cimguiname": "igGetKeyData_ContextPtr", "ret": "ImGuiKeyData*", @@ -21252,7 +21473,7 @@ "cimguiname": "igGetKeyData", "defaults": {}, "funcname": "GetKeyData", - "location": "imgui_internal:3301", + "location": "imgui_internal:3443", "namespace": "ImGui", "ov_cimguiname": "igGetKeyData_Key", "ret": "ImGuiKeyData*", @@ -21272,10 +21493,9 @@ "argsoriginal": "(ImGuiKey key)", "call_args": "(key)", "cimguiname": "igGetKeyIndex", - "comment": "// map ImGuiKey_* values into legacy native key index. == io.KeyMap[key]", "defaults": {}, "funcname": "GetKeyIndex", - "location": "imgui:3359", + "location": "imgui:3435", "namespace": "ImGui", "ov_cimguiname": "igGetKeyIndex", "ret": "ImGuiKey", @@ -21313,7 +21533,7 @@ "cimguiname": "igGetKeyMagnitude2d", "defaults": {}, "funcname": "GetKeyMagnitude2d", - "location": "imgui_internal:3305", + "location": "imgui_internal:3447", "namespace": "ImGui", "nonUDT": 1, "ov_cimguiname": "igGetKeyMagnitude2d", @@ -21337,7 +21557,7 @@ "comment": "// [DEBUG] returns English name of the key. Those names a provided for debugging purpose and are not meant to be saved persistently not compared.", "defaults": {}, "funcname": "GetKeyName", - "location": "imgui:943", + "location": "imgui:959", "namespace": "ImGui", "ov_cimguiname": "igGetKeyName", "ret": "const char*", @@ -21359,7 +21579,7 @@ "cimguiname": "igGetKeyOwner", "defaults": {}, "funcname": "GetKeyOwner", - "location": "imgui_internal:3324", + "location": "imgui_internal:3466", "namespace": "ImGui", "ov_cimguiname": "igGetKeyOwner", "ret": "ImGuiID", @@ -21385,7 +21605,7 @@ "cimguiname": "igGetKeyOwnerData", "defaults": {}, "funcname": "GetKeyOwnerData", - "location": "imgui_internal:3329", + "location": "imgui_internal:3471", "namespace": "ImGui", "ov_cimguiname": "igGetKeyOwnerData", "ret": "ImGuiKeyOwnerData*", @@ -21416,7 +21636,7 @@ "comment": "// uses provided repeat rate/delay. return a count, most often 0 or 1 but might be >1 if RepeatRate is small enough that DeltaTime > RepeatRate", "defaults": {}, "funcname": "GetKeyPressedAmount", - "location": "imgui:942", + "location": "imgui:958", "namespace": "ImGui", "ov_cimguiname": "igGetKeyPressedAmount", "ret": "int", @@ -21434,7 +21654,7 @@ "comment": "// return primary/default viewport. This can never be NULL.", "defaults": {}, "funcname": "GetMainViewport", - "location": "imgui:905", + "location": "imgui:922", "namespace": "ImGui", "ov_cimguiname": "igGetMainViewport", "ret": "ImGuiViewport*", @@ -21457,7 +21677,7 @@ "comment": "// return the number of successive mouse-clicks at the time where a click happen (otherwise 0).", "defaults": {}, "funcname": "GetMouseClickedCount", - "location": "imgui:954", + "location": "imgui:970", "namespace": "ImGui", "ov_cimguiname": "igGetMouseClickedCount", "ret": "int", @@ -21475,7 +21695,7 @@ "comment": "// get desired mouse cursor shape. Important: reset in ImGui::NewFrame(), this is updated during the frame. valid before Render(). If you use software rendering by setting io.MouseDrawCursor ImGui will render those for you", "defaults": {}, "funcname": "GetMouseCursor", - "location": "imgui:963", + "location": "imgui:979", "namespace": "ImGui", "ov_cimguiname": "igGetMouseCursor", "ret": "ImGuiMouseCursor", @@ -21509,7 +21729,7 @@ "lock_threshold": "-1.0f" }, "funcname": "GetMouseDragDelta", - "location": "imgui:961", + "location": "imgui:977", "namespace": "ImGui", "nonUDT": 1, "ov_cimguiname": "igGetMouseDragDelta", @@ -21533,7 +21753,7 @@ "comment": "// shortcut to ImGui::GetIO().MousePos provided by user, to be consistent with other calls", "defaults": {}, "funcname": "GetMousePos", - "location": "imgui:958", + "location": "imgui:974", "namespace": "ImGui", "nonUDT": 1, "ov_cimguiname": "igGetMousePos", @@ -21557,7 +21777,7 @@ "comment": "// retrieve mouse position at the time of opening popup we have BeginPopup() into (helper to avoid user backing that value themselves)", "defaults": {}, "funcname": "GetMousePosOnOpeningCurrentPopup", - "location": "imgui:959", + "location": "imgui:975", "namespace": "ImGui", "nonUDT": 1, "ov_cimguiname": "igGetMousePosOnOpeningCurrentPopup", @@ -21580,7 +21800,7 @@ "cimguiname": "igGetNavTweakPressedAmount", "defaults": {}, "funcname": "GetNavTweakPressedAmount", - "location": "imgui_internal:3306", + "location": "imgui_internal:3448", "namespace": "ImGui", "ov_cimguiname": "igGetNavTweakPressedAmount", "ret": "float", @@ -21598,7 +21818,7 @@ "comment": "// platform/renderer functions, for backend to setup + viewports list.", "defaults": {}, "funcname": "GetPlatformIO", - "location": "imgui:997", + "location": "imgui:1016", "namespace": "ImGui", "ov_cimguiname": "igGetPlatformIO", "ret": "ImGuiPlatformIO*", @@ -21625,7 +21845,7 @@ "cimguiname": "igGetPopupAllowedExtentRect", "defaults": {}, "funcname": "GetPopupAllowedExtentRect", - "location": "imgui_internal:3239", + "location": "imgui_internal:3378", "namespace": "ImGui", "nonUDT": 1, "ov_cimguiname": "igGetPopupAllowedExtentRect", @@ -21644,7 +21864,7 @@ "comment": "// get maximum scrolling amount ~~ ContentSize.x - WindowSize.x - DecorationsSize.x", "defaults": {}, "funcname": "GetScrollMaxX", - "location": "imgui:406", + "location": "imgui:421", "namespace": "ImGui", "ov_cimguiname": "igGetScrollMaxX", "ret": "float", @@ -21662,7 +21882,7 @@ "comment": "// get maximum scrolling amount ~~ ContentSize.y - WindowSize.y - DecorationsSize.y", "defaults": {}, "funcname": "GetScrollMaxY", - "location": "imgui:407", + "location": "imgui:422", "namespace": "ImGui", "ov_cimguiname": "igGetScrollMaxY", "ret": "float", @@ -21680,7 +21900,7 @@ "comment": "// get scrolling amount [0 .. GetScrollMaxX()]", "defaults": {}, "funcname": "GetScrollX", - "location": "imgui:402", + "location": "imgui:417", "namespace": "ImGui", "ov_cimguiname": "igGetScrollX", "ret": "float", @@ -21698,7 +21918,7 @@ "comment": "// get scrolling amount [0 .. GetScrollMaxY()]", "defaults": {}, "funcname": "GetScrollY", - "location": "imgui:403", + "location": "imgui:418", "namespace": "ImGui", "ov_cimguiname": "igGetScrollY", "ret": "float", @@ -21720,7 +21940,7 @@ "cimguiname": "igGetShortcutRoutingData", "defaults": {}, "funcname": "GetShortcutRoutingData", - "location": "imgui_internal:3357", + "location": "imgui_internal:3505", "namespace": "ImGui", "ov_cimguiname": "igGetShortcutRoutingData", "ret": "ImGuiKeyRoutingData*", @@ -21737,7 +21957,7 @@ "cimguiname": "igGetStateStorage", "defaults": {}, "funcname": "GetStateStorage", - "location": "imgui:921", + "location": "imgui:938", "namespace": "ImGui", "ov_cimguiname": "igGetStateStorage", "ret": "ImGuiStorage*", @@ -21752,10 +21972,10 @@ "argsoriginal": "()", "call_args": "()", "cimguiname": "igGetStyle", - "comment": "// access the Style structure (colors, sizes). Always use PushStyleCol(), PushStyleVar() to modify style mid-frame!", + "comment": "// access the Style structure (colors, sizes). Always use PushStyleColor(), PushStyleVar() to modify style mid-frame!", "defaults": {}, "funcname": "GetStyle", - "location": "imgui:306", + "location": "imgui:311", "namespace": "ImGui", "ov_cimguiname": "igGetStyle", "ret": "ImGuiStyle*", @@ -21779,7 +21999,7 @@ "comment": "// get a string corresponding to the enum value (for display, saving, etc.).", "defaults": {}, "funcname": "GetStyleColorName", - "location": "imgui:919", + "location": "imgui:936", "namespace": "ImGui", "ov_cimguiname": "igGetStyleColorName", "ret": "const char*", @@ -21802,7 +22022,7 @@ "comment": "// retrieve style color as stored in ImGuiStyle structure. use to feed back into PushStyleColor(), otherwise use GetColorU32() to get style color with style alpha baked in.", "defaults": {}, "funcname": "GetStyleColorVec4", - "location": "imgui:443", + "location": "imgui:458", "namespace": "ImGui", "ov_cimguiname": "igGetStyleColorVec4", "ret": "const ImVec4*", @@ -21825,7 +22045,7 @@ "cimguiname": "igGetStyleVarInfo", "defaults": {}, "funcname": "GetStyleVarInfo", - "location": "imgui_internal:3222", + "location": "imgui_internal:3360", "namespace": "ImGui", "ov_cimguiname": "igGetStyleVarInfo", "ret": "const ImGuiDataVarInfo*", @@ -21843,7 +22063,7 @@ "comment": "// ~ FontSize", "defaults": {}, "funcname": "GetTextLineHeight", - "location": "imgui:471", + "location": "imgui:489", "namespace": "ImGui", "ov_cimguiname": "igGetTextLineHeight", "ret": "float", @@ -21861,7 +22081,7 @@ "comment": "// ~ FontSize + style.ItemSpacing.y (distance in pixels between 2 consecutive lines of text)", "defaults": {}, "funcname": "GetTextLineHeightWithSpacing", - "location": "imgui:472", + "location": "imgui:490", "namespace": "ImGui", "ov_cimguiname": "igGetTextLineHeightWithSpacing", "ret": "float", @@ -21879,7 +22099,7 @@ "comment": "// get global imgui time. incremented by io.DeltaTime every frame.", "defaults": {}, "funcname": "GetTime", - "location": "imgui:916", + "location": "imgui:933", "namespace": "ImGui", "ov_cimguiname": "igGetTime", "ret": "double", @@ -21896,7 +22116,7 @@ "cimguiname": "igGetTopMostAndVisiblePopupModal", "defaults": {}, "funcname": "GetTopMostAndVisiblePopupModal", - "location": "imgui_internal:3241", + "location": "imgui_internal:3380", "namespace": "ImGui", "ov_cimguiname": "igGetTopMostAndVisiblePopupModal", "ret": "ImGuiWindow*", @@ -21913,7 +22133,7 @@ "cimguiname": "igGetTopMostPopupModal", "defaults": {}, "funcname": "GetTopMostPopupModal", - "location": "imgui_internal:3240", + "location": "imgui_internal:3379", "namespace": "ImGui", "ov_cimguiname": "igGetTopMostPopupModal", "ret": "ImGuiWindow*", @@ -21931,7 +22151,7 @@ "comment": "// horizontal distance preceding label when using TreeNode*() or Bullet() == (g.FontSize + style.FramePadding.x*2) for a regular unframed TreeNode", "defaults": {}, "funcname": "GetTreeNodeToLabelSpacing", - "location": "imgui:630", + "location": "imgui:650", "namespace": "ImGui", "ov_cimguiname": "igGetTreeNodeToLabelSpacing", "ret": "float", @@ -21961,7 +22181,7 @@ "cimguiname": "igGetTypematicRepeatRate", "defaults": {}, "funcname": "GetTypematicRepeatRate", - "location": "imgui_internal:3308", + "location": "imgui_internal:3450", "namespace": "ImGui", "ov_cimguiname": "igGetTypematicRepeatRate", "ret": "void", @@ -21985,7 +22205,7 @@ "flags": "ImGuiTypingSelectFlags_None" }, "funcname": "GetTypingSelectRequest", - "location": "imgui_internal:3434", + "location": "imgui_internal:3582", "namespace": "ImGui", "ov_cimguiname": "igGetTypingSelectRequest", "ret": "ImGuiTypingSelectRequest*", @@ -22003,7 +22223,7 @@ "comment": "// get the compiled version string e.g. \"1.80 WIP\" (essentially the value for IMGUI_VERSION from the compiled version of imgui.cpp)", "defaults": {}, "funcname": "GetVersion", - "location": "imgui:322", + "location": "imgui:327", "namespace": "ImGui", "ov_cimguiname": "igGetVersion", "ret": "const char*", @@ -22025,7 +22245,7 @@ "cimguiname": "igGetViewportPlatformMonitor", "defaults": {}, "funcname": "GetViewportPlatformMonitor", - "location": "imgui_internal:3153", + "location": "imgui_internal:3291", "namespace": "ImGui", "ov_cimguiname": "igGetViewportPlatformMonitor", "ret": "const ImGuiPlatformMonitor*", @@ -22047,7 +22267,7 @@ "cimguiname": "igGetWindowAlwaysWantOwnTabBar", "defaults": {}, "funcname": "GetWindowAlwaysWantOwnTabBar", - "location": "imgui_internal:3384", + "location": "imgui_internal:3532", "namespace": "ImGui", "ov_cimguiname": "igGetWindowAlwaysWantOwnTabBar", "ret": "bool", @@ -22070,7 +22290,7 @@ "comment": "// content boundaries max for the full window (roughly (0,0)+Size-Scroll) where Size can be overridden with SetNextWindowContentSize(), in window coordinates", "defaults": {}, "funcname": "GetWindowContentRegionMax", - "location": "imgui:397", + "location": "imgui:412", "namespace": "ImGui", "nonUDT": 1, "ov_cimguiname": "igGetWindowContentRegionMax", @@ -22094,7 +22314,7 @@ "comment": "// content boundaries min for the full window (roughly (0,0)-Scroll), in window coordinates", "defaults": {}, "funcname": "GetWindowContentRegionMin", - "location": "imgui:396", + "location": "imgui:411", "namespace": "ImGui", "nonUDT": 1, "ov_cimguiname": "igGetWindowContentRegionMin", @@ -22112,7 +22332,7 @@ "cimguiname": "igGetWindowDockID", "defaults": {}, "funcname": "GetWindowDockID", - "location": "imgui:834", + "location": "imgui:851", "namespace": "ImGui", "ov_cimguiname": "igGetWindowDockID", "ret": "ImGuiID", @@ -22129,7 +22349,7 @@ "cimguiname": "igGetWindowDockNode", "defaults": {}, "funcname": "GetWindowDockNode", - "location": "imgui_internal:3383", + "location": "imgui_internal:3531", "namespace": "ImGui", "ov_cimguiname": "igGetWindowDockNode", "ret": "ImGuiDockNode*", @@ -22147,7 +22367,7 @@ "comment": "// get DPI scale currently associated to the current window's viewport.", "defaults": {}, "funcname": "GetWindowDpiScale", - "location": "imgui:363", + "location": "imgui:378", "namespace": "ImGui", "ov_cimguiname": "igGetWindowDpiScale", "ret": "float", @@ -22165,7 +22385,7 @@ "comment": "// get draw list associated to the current window, to append your own drawing primitives", "defaults": {}, "funcname": "GetWindowDrawList", - "location": "imgui:362", + "location": "imgui:377", "namespace": "ImGui", "ov_cimguiname": "igGetWindowDrawList", "ret": "ImDrawList*", @@ -22183,7 +22403,7 @@ "comment": "// get current window height (shortcut for GetWindowSize().y)", "defaults": {}, "funcname": "GetWindowHeight", - "location": "imgui:367", + "location": "imgui:382", "namespace": "ImGui", "ov_cimguiname": "igGetWindowHeight", "ret": "float", @@ -22203,10 +22423,10 @@ "argsoriginal": "()", "call_args": "()", "cimguiname": "igGetWindowPos", - "comment": "// get current window position in screen space (note: it is unlikely you need to use this. Consider using current layout pos instead, GetScreenCursorPos())", + "comment": "// get current window position in screen space (note: it is unlikely you need to use this. Consider using current layout pos instead, GetCursorScreenPos())", "defaults": {}, "funcname": "GetWindowPos", - "location": "imgui:364", + "location": "imgui:379", "namespace": "ImGui", "nonUDT": 1, "ov_cimguiname": "igGetWindowPos", @@ -22233,7 +22453,7 @@ "cimguiname": "igGetWindowResizeBorderID", "defaults": {}, "funcname": "GetWindowResizeBorderID", - "location": "imgui_internal:3571", + "location": "imgui_internal:3721", "namespace": "ImGui", "ov_cimguiname": "igGetWindowResizeBorderID", "ret": "ImGuiID", @@ -22260,7 +22480,7 @@ "comment": "// 0..3: corners", "defaults": {}, "funcname": "GetWindowResizeCornerID", - "location": "imgui_internal:3570", + "location": "imgui_internal:3720", "namespace": "ImGui", "ov_cimguiname": "igGetWindowResizeCornerID", "ret": "ImGuiID", @@ -22286,7 +22506,7 @@ "cimguiname": "igGetWindowScrollbarID", "defaults": {}, "funcname": "GetWindowScrollbarID", - "location": "imgui_internal:3569", + "location": "imgui_internal:3719", "namespace": "ImGui", "ov_cimguiname": "igGetWindowScrollbarID", "ret": "ImGuiID", @@ -22316,7 +22536,7 @@ "cimguiname": "igGetWindowScrollbarRect", "defaults": {}, "funcname": "GetWindowScrollbarRect", - "location": "imgui_internal:3568", + "location": "imgui_internal:3718", "namespace": "ImGui", "nonUDT": 1, "ov_cimguiname": "igGetWindowScrollbarRect", @@ -22337,10 +22557,10 @@ "argsoriginal": "()", "call_args": "()", "cimguiname": "igGetWindowSize", - "comment": "// get current window size (note: it is unlikely you need to use this. Consider using GetScreenCursorPos() and e.g. GetContentRegionAvail() instead)", + "comment": "// get current window size (note: it is unlikely you need to use this. Consider using GetCursorScreenPos() and e.g. GetContentRegionAvail() instead)", "defaults": {}, "funcname": "GetWindowSize", - "location": "imgui:365", + "location": "imgui:380", "namespace": "ImGui", "nonUDT": 1, "ov_cimguiname": "igGetWindowSize", @@ -22359,7 +22579,7 @@ "comment": "// get viewport currently associated to the current window.", "defaults": {}, "funcname": "GetWindowViewport", - "location": "imgui:368", + "location": "imgui:383", "namespace": "ImGui", "ov_cimguiname": "igGetWindowViewport", "ret": "ImGuiViewport*", @@ -22377,7 +22597,7 @@ "comment": "// get current window width (shortcut for GetWindowSize().x)", "defaults": {}, "funcname": "GetWindowWidth", - "location": "imgui:366", + "location": "imgui:381", "namespace": "ImGui", "ov_cimguiname": "igGetWindowWidth", "ret": "float", @@ -22462,7 +22682,7 @@ "cimguiname": "igImAlphaBlendColors", "defaults": {}, "funcname": "ImAlphaBlendColors", - "location": "imgui_internal:369", + "location": "imgui_internal:370", "ov_cimguiname": "igImAlphaBlendColors", "ret": "ImU32", "signature": "(ImU32,ImU32)", @@ -22661,7 +22881,7 @@ "cimguiname": "igImBitArrayClearAllBits", "defaults": {}, "funcname": "ImBitArrayClearAllBits", - "location": "imgui_internal:574", + "location": "imgui_internal:575", "ov_cimguiname": "igImBitArrayClearAllBits", "ret": "void", "signature": "(ImU32*,int)", @@ -22686,7 +22906,7 @@ "cimguiname": "igImBitArrayClearBit", "defaults": {}, "funcname": "ImBitArrayClearBit", - "location": "imgui_internal:576", + "location": "imgui_internal:577", "ov_cimguiname": "igImBitArrayClearBit", "ret": "void", "signature": "(ImU32*,int)", @@ -22707,7 +22927,7 @@ "cimguiname": "igImBitArrayGetStorageSizeInBytes", "defaults": {}, "funcname": "ImBitArrayGetStorageSizeInBytes", - "location": "imgui_internal:573", + "location": "imgui_internal:574", "ov_cimguiname": "igImBitArrayGetStorageSizeInBytes", "ret": "size_t", "signature": "(int)", @@ -22732,7 +22952,7 @@ "cimguiname": "igImBitArraySetBit", "defaults": {}, "funcname": "ImBitArraySetBit", - "location": "imgui_internal:577", + "location": "imgui_internal:578", "ov_cimguiname": "igImBitArraySetBit", "ret": "void", "signature": "(ImU32*,int)", @@ -22761,7 +22981,7 @@ "cimguiname": "igImBitArraySetBitRange", "defaults": {}, "funcname": "ImBitArraySetBitRange", - "location": "imgui_internal:578", + "location": "imgui_internal:579", "ov_cimguiname": "igImBitArraySetBitRange", "ret": "void", "signature": "(ImU32*,int,int)", @@ -22786,7 +23006,7 @@ "cimguiname": "igImBitArrayTestBit", "defaults": {}, "funcname": "ImBitArrayTestBit", - "location": "imgui_internal:575", + "location": "imgui_internal:576", "ov_cimguiname": "igImBitArrayTestBit", "ret": "bool", "signature": "(const ImU32*,int)", @@ -22807,7 +23027,7 @@ "cimguiname": "igImCharIsBlankA", "defaults": {}, "funcname": "ImCharIsBlankA", - "location": "imgui_internal:391", + "location": "imgui_internal:392", "ov_cimguiname": "igImCharIsBlankA", "ret": "bool", "signature": "(char)", @@ -22828,7 +23048,7 @@ "cimguiname": "igImCharIsBlankW", "defaults": {}, "funcname": "ImCharIsBlankW", - "location": "imgui_internal:392", + "location": "imgui_internal:393", "ov_cimguiname": "igImCharIsBlankW", "ret": "bool", "signature": "(unsigned int)", @@ -22937,7 +23157,7 @@ "cimguiname": "igImFileClose", "defaults": {}, "funcname": "ImFileClose", - "location": "imgui_internal:430", + "location": "imgui_internal:431", "ov_cimguiname": "igImFileClose", "ret": "bool", "signature": "(ImFileHandle)", @@ -22958,7 +23178,7 @@ "cimguiname": "igImFileGetSize", "defaults": {}, "funcname": "ImFileGetSize", - "location": "imgui_internal:431", + "location": "imgui_internal:432", "ov_cimguiname": "igImFileGetSize", "ret": "ImU64", "signature": "(ImFileHandle)", @@ -22994,7 +23214,7 @@ "padding_bytes": "0" }, "funcname": "ImFileLoadToMemory", - "location": "imgui_internal:437", + "location": "imgui_internal:438", "ov_cimguiname": "igImFileLoadToMemory", "ret": "void*", "signature": "(const char*,const char*,size_t*,int)", @@ -23019,7 +23239,7 @@ "cimguiname": "igImFileOpen", "defaults": {}, "funcname": "ImFileOpen", - "location": "imgui_internal:429", + "location": "imgui_internal:430", "ov_cimguiname": "igImFileOpen", "ret": "ImFileHandle", "signature": "(const char*,const char*)", @@ -23052,7 +23272,7 @@ "cimguiname": "igImFileRead", "defaults": {}, "funcname": "ImFileRead", - "location": "imgui_internal:432", + "location": "imgui_internal:433", "ov_cimguiname": "igImFileRead", "ret": "ImU64", "signature": "(void*,ImU64,ImU64,ImFileHandle)", @@ -23085,7 +23305,7 @@ "cimguiname": "igImFileWrite", "defaults": {}, "funcname": "ImFileWrite", - "location": "imgui_internal:433", + "location": "imgui_internal:434", "ov_cimguiname": "igImFileWrite", "ret": "ImU64", "signature": "(const void*,ImU64,ImU64,ImFileHandle)", @@ -23104,9 +23324,10 @@ "argsoriginal": "(float f)", "call_args": "(f)", "cimguiname": "igImFloor", + "comment": "// Decent replacement for floorf()", "defaults": {}, "funcname": "ImFloor", - "location": "imgui_internal:489", + "location": "imgui_internal:491", "ov_cimguiname": "igImFloor_Float", "ret": "float", "signature": "(float)", @@ -23129,55 +23350,9 @@ "cimguiname": "igImFloor", "defaults": {}, "funcname": "ImFloor", - "location": "imgui_internal:491", - "nonUDT": 1, - "ov_cimguiname": "igImFloor_Vec2", - "ret": "void", - "signature": "(const ImVec2)", - "stname": "" - } - ], - "igImFloorSigned": [ - { - "args": "(float f)", - "argsT": [ - { - "name": "f", - "type": "float" - } - ], - "argsoriginal": "(float f)", - "call_args": "(f)", - "cimguiname": "igImFloorSigned", - "comment": "// Decent replacement for floorf()", - "defaults": {}, - "funcname": "ImFloorSigned", - "location": "imgui_internal:490", - "ov_cimguiname": "igImFloorSigned_Float", - "ret": "float", - "signature": "(float)", - "stname": "" - }, - { - "args": "(ImVec2 *pOut,const ImVec2 v)", - "argsT": [ - { - "name": "pOut", - "type": "ImVec2*" - }, - { - "name": "v", - "type": "const ImVec2" - } - ], - "argsoriginal": "(const ImVec2& v)", - "call_args": "(v)", - "cimguiname": "igImFloorSigned", - "defaults": {}, - "funcname": "ImFloorSigned", "location": "imgui_internal:492", "nonUDT": 1, - "ov_cimguiname": "igImFloorSigned_Vec2", + "ov_cimguiname": "igImFloor_Vec2", "ret": "void", "signature": "(const ImVec2)", "stname": "" @@ -23197,7 +23372,7 @@ "cimguiname": "igImFontAtlasBuildFinish", "defaults": {}, "funcname": "ImFontAtlasBuildFinish", - "location": "imgui_internal:3702", + "location": "imgui_internal:3855", "ov_cimguiname": "igImFontAtlasBuildFinish", "ret": "void", "signature": "(ImFontAtlas*)", @@ -23218,7 +23393,7 @@ "cimguiname": "igImFontAtlasBuildInit", "defaults": {}, "funcname": "ImFontAtlasBuildInit", - "location": "imgui_internal:3699", + "location": "imgui_internal:3852", "ov_cimguiname": "igImFontAtlasBuildInit", "ret": "void", "signature": "(ImFontAtlas*)", @@ -23243,7 +23418,7 @@ "cimguiname": "igImFontAtlasBuildMultiplyCalcLookupTable", "defaults": {}, "funcname": "ImFontAtlasBuildMultiplyCalcLookupTable", - "location": "imgui_internal:3705", + "location": "imgui_internal:3858", "ov_cimguiname": "igImFontAtlasBuildMultiplyCalcLookupTable", "ret": "void", "signature": "(unsigned char[256],float)", @@ -23288,7 +23463,7 @@ "cimguiname": "igImFontAtlasBuildMultiplyRectAlpha8", "defaults": {}, "funcname": "ImFontAtlasBuildMultiplyRectAlpha8", - "location": "imgui_internal:3706", + "location": "imgui_internal:3859", "ov_cimguiname": "igImFontAtlasBuildMultiplyRectAlpha8", "ret": "void", "signature": "(const unsigned char[256],unsigned char*,int,int,int,int,int)", @@ -23313,7 +23488,7 @@ "cimguiname": "igImFontAtlasBuildPackCustomRects", "defaults": {}, "funcname": "ImFontAtlasBuildPackCustomRects", - "location": "imgui_internal:3701", + "location": "imgui_internal:3854", "ov_cimguiname": "igImFontAtlasBuildPackCustomRects", "ret": "void", "signature": "(ImFontAtlas*,void*)", @@ -23362,7 +23537,7 @@ "cimguiname": "igImFontAtlasBuildRender32bppRectFromString", "defaults": {}, "funcname": "ImFontAtlasBuildRender32bppRectFromString", - "location": "imgui_internal:3704", + "location": "imgui_internal:3857", "ov_cimguiname": "igImFontAtlasBuildRender32bppRectFromString", "ret": "void", "signature": "(ImFontAtlas*,int,int,int,int,const char*,char,unsigned int)", @@ -23411,7 +23586,7 @@ "cimguiname": "igImFontAtlasBuildRender8bppRectFromString", "defaults": {}, "funcname": "ImFontAtlasBuildRender8bppRectFromString", - "location": "imgui_internal:3703", + "location": "imgui_internal:3856", "ov_cimguiname": "igImFontAtlasBuildRender8bppRectFromString", "ret": "void", "signature": "(ImFontAtlas*,int,int,int,int,const char*,char,unsigned char)", @@ -23448,7 +23623,7 @@ "cimguiname": "igImFontAtlasBuildSetupFont", "defaults": {}, "funcname": "ImFontAtlasBuildSetupFont", - "location": "imgui_internal:3700", + "location": "imgui_internal:3853", "ov_cimguiname": "igImFontAtlasBuildSetupFont", "ret": "void", "signature": "(ImFontAtlas*,ImFont*,ImFontConfig*,float,float)", @@ -23464,7 +23639,7 @@ "cimguiname": "igImFontAtlasGetBuilderForStbTruetype", "defaults": {}, "funcname": "ImFontAtlasGetBuilderForStbTruetype", - "location": "imgui_internal:3696", + "location": "imgui_internal:3849", "ov_cimguiname": "igImFontAtlasGetBuilderForStbTruetype", "ret": "const ImFontBuilderIO*", "signature": "()", @@ -23485,7 +23660,7 @@ "cimguiname": "igImFontAtlasUpdateConfigDataPointers", "defaults": {}, "funcname": "ImFontAtlasUpdateConfigDataPointers", - "location": "imgui_internal:3698", + "location": "imgui_internal:3851", "ov_cimguiname": "igImFontAtlasUpdateConfigDataPointers", "ret": "void", "signature": "(ImFontAtlas*)", @@ -23519,7 +23694,7 @@ "defaults": {}, "funcname": "ImFormatString", "isvararg": "...)", - "location": "imgui_internal:396", + "location": "imgui_internal:397", "ov_cimguiname": "igImFormatString", "ret": "int", "signature": "(char*,size_t,const char*,...)", @@ -23553,7 +23728,7 @@ "defaults": {}, "funcname": "ImFormatStringToTempBuffer", "isvararg": "...)", - "location": "imgui_internal:398", + "location": "imgui_internal:399", "ov_cimguiname": "igImFormatStringToTempBuffer", "ret": "void", "signature": "(const char**,const char**,const char*,...)", @@ -23586,7 +23761,7 @@ "cimguiname": "igImFormatStringToTempBufferV", "defaults": {}, "funcname": "ImFormatStringToTempBufferV", - "location": "imgui_internal:399", + "location": "imgui_internal:400", "ov_cimguiname": "igImFormatStringToTempBufferV", "ret": "void", "signature": "(const char**,const char**,const char*,va_list)", @@ -23619,7 +23794,7 @@ "cimguiname": "igImFormatStringV", "defaults": {}, "funcname": "ImFormatStringV", - "location": "imgui_internal:397", + "location": "imgui_internal:398", "ov_cimguiname": "igImFormatStringV", "ret": "int", "signature": "(char*,size_t,const char*,va_list)", @@ -23650,7 +23825,7 @@ "seed": "0" }, "funcname": "ImHashData", - "location": "imgui_internal:360", + "location": "imgui_internal:361", "ov_cimguiname": "igImHashData", "ret": "ImGuiID", "signature": "(const void*,size_t,ImGuiID)", @@ -23682,7 +23857,7 @@ "seed": "0" }, "funcname": "ImHashStr", - "location": "imgui_internal:361", + "location": "imgui_internal:362", "ov_cimguiname": "igImHashStr", "ret": "ImGuiID", "signature": "(const char*,size_t,ImGuiID)", @@ -23749,7 +23924,7 @@ "cimguiname": "igImIsPowerOfTwo", "defaults": {}, "funcname": "ImIsPowerOfTwo", - "location": "imgui_internal:372", + "location": "imgui_internal:373", "ov_cimguiname": "igImIsPowerOfTwo_Int", "ret": "bool", "signature": "(int)", @@ -23768,7 +23943,7 @@ "cimguiname": "igImIsPowerOfTwo", "defaults": {}, "funcname": "ImIsPowerOfTwo", - "location": "imgui_internal:373", + "location": "imgui_internal:374", "ov_cimguiname": "igImIsPowerOfTwo_U64", "ret": "bool", "signature": "(ImU64)", @@ -24146,7 +24321,7 @@ "cimguiname": "igImParseFormatFindEnd", "defaults": {}, "funcname": "ImParseFormatFindEnd", - "location": "imgui_internal:401", + "location": "imgui_internal:402", "ov_cimguiname": "igImParseFormatFindEnd", "ret": "const char*", "signature": "(const char*)", @@ -24167,7 +24342,7 @@ "cimguiname": "igImParseFormatFindStart", "defaults": {}, "funcname": "ImParseFormatFindStart", - "location": "imgui_internal:400", + "location": "imgui_internal:401", "ov_cimguiname": "igImParseFormatFindStart", "ret": "const char*", "signature": "(const char*)", @@ -24192,7 +24367,7 @@ "cimguiname": "igImParseFormatPrecision", "defaults": {}, "funcname": "ImParseFormatPrecision", - "location": "imgui_internal:405", + "location": "imgui_internal:406", "ov_cimguiname": "igImParseFormatPrecision", "ret": "int", "signature": "(const char*,int)", @@ -24221,7 +24396,7 @@ "cimguiname": "igImParseFormatSanitizeForPrinting", "defaults": {}, "funcname": "ImParseFormatSanitizeForPrinting", - "location": "imgui_internal:403", + "location": "imgui_internal:404", "ov_cimguiname": "igImParseFormatSanitizeForPrinting", "ret": "void", "signature": "(const char*,char*,size_t)", @@ -24250,7 +24425,7 @@ "cimguiname": "igImParseFormatSanitizeForScanning", "defaults": {}, "funcname": "ImParseFormatSanitizeForScanning", - "location": "imgui_internal:404", + "location": "imgui_internal:405", "ov_cimguiname": "igImParseFormatSanitizeForScanning", "ret": "const char*", "signature": "(const char*,char*,size_t)", @@ -24279,7 +24454,7 @@ "cimguiname": "igImParseFormatTrimDecorations", "defaults": {}, "funcname": "ImParseFormatTrimDecorations", - "location": "imgui_internal:402", + "location": "imgui_internal:403", "ov_cimguiname": "igImParseFormatTrimDecorations", "ret": "const char*", "signature": "(const char*,char*,size_t)", @@ -24363,7 +24538,7 @@ "cimguiname": "igImQsort", "defaults": {}, "funcname": "ImQsort", - "location": "imgui_internal:365", + "location": "imgui_internal:366", "ov_cimguiname": "igImQsort", "ret": "void", "signature": "(void*,size_t,size_t,int(*)(void const*,void const*))", @@ -24521,7 +24696,7 @@ "comment": "// Find first non-blank character.", "defaults": {}, "funcname": "ImStrSkipBlank", - "location": "imgui_internal:386", + "location": "imgui_internal:387", "ov_cimguiname": "igImStrSkipBlank", "ret": "const char*", "signature": "(const char*)", @@ -24543,7 +24718,7 @@ "comment": "// Remove leading and trailing blanks from a buffer.", "defaults": {}, "funcname": "ImStrTrimBlanks", - "location": "imgui_internal:385", + "location": "imgui_internal:386", "ov_cimguiname": "igImStrTrimBlanks", "ret": "void", "signature": "(char*)", @@ -24569,7 +24744,7 @@ "comment": "// Find beginning-of-line (ImWchar string)", "defaults": {}, "funcname": "ImStrbolW", - "location": "imgui_internal:388", + "location": "imgui_internal:389", "ov_cimguiname": "igImStrbolW", "ret": "const ImWchar*", "signature": "(const ImWchar*,const ImWchar*)", @@ -24599,7 +24774,7 @@ "comment": "// Find first occurrence of 'c' in string range.", "defaults": {}, "funcname": "ImStrchrRange", - "location": "imgui_internal:382", + "location": "imgui_internal:383", "ov_cimguiname": "igImStrchrRange", "ret": "const char*", "signature": "(const char*,const char*,char)", @@ -24621,7 +24796,7 @@ "comment": "// Duplicate a string.", "defaults": {}, "funcname": "ImStrdup", - "location": "imgui_internal:380", + "location": "imgui_internal:381", "ov_cimguiname": "igImStrdup", "ret": "char*", "signature": "(const char*)", @@ -24651,7 +24826,7 @@ "comment": "// Copy in provided buffer, recreate buffer if needed.", "defaults": {}, "funcname": "ImStrdupcpy", - "location": "imgui_internal:381", + "location": "imgui_internal:382", "ov_cimguiname": "igImStrdupcpy", "ret": "char*", "signature": "(char*,size_t*,const char*)", @@ -24677,7 +24852,7 @@ "comment": "// End end-of-line", "defaults": {}, "funcname": "ImStreolRange", - "location": "imgui_internal:383", + "location": "imgui_internal:384", "ov_cimguiname": "igImStreolRange", "ret": "const char*", "signature": "(const char*,const char*)", @@ -24703,7 +24878,7 @@ "comment": "// Case insensitive compare.", "defaults": {}, "funcname": "ImStricmp", - "location": "imgui_internal:377", + "location": "imgui_internal:378", "ov_cimguiname": "igImStricmp", "ret": "int", "signature": "(const char*,const char*)", @@ -24737,7 +24912,7 @@ "comment": "// Find a substring in a string range.", "defaults": {}, "funcname": "ImStristr", - "location": "imgui_internal:384", + "location": "imgui_internal:385", "ov_cimguiname": "igImStristr", "ret": "const char*", "signature": "(const char*,const char*,const char*,const char*)", @@ -24759,7 +24934,7 @@ "comment": "// Computer string length (ImWchar string)", "defaults": {}, "funcname": "ImStrlenW", - "location": "imgui_internal:387", + "location": "imgui_internal:388", "ov_cimguiname": "igImStrlenW", "ret": "int", "signature": "(const ImWchar*)", @@ -24789,7 +24964,7 @@ "comment": "// Copy to a certain count and always zero terminate (strncpy doesn't).", "defaults": {}, "funcname": "ImStrncpy", - "location": "imgui_internal:379", + "location": "imgui_internal:380", "ov_cimguiname": "igImStrncpy", "ret": "void", "signature": "(char*,const char*,size_t)", @@ -24819,7 +24994,7 @@ "comment": "// Case insensitive compare to a certain count.", "defaults": {}, "funcname": "ImStrnicmp", - "location": "imgui_internal:378", + "location": "imgui_internal:379", "ov_cimguiname": "igImStrnicmp", "ret": "int", "signature": "(const char*,const char*,size_t)", @@ -24849,7 +25024,7 @@ "comment": "// read one character. return input UTF-8 bytes count", "defaults": {}, "funcname": "ImTextCharFromUtf8", - "location": "imgui_internal:410", + "location": "imgui_internal:411", "ov_cimguiname": "igImTextCharFromUtf8", "ret": "int", "signature": "(unsigned int*,const char*,const char*)", @@ -24875,7 +25050,7 @@ "comment": "// return out_buf", "defaults": {}, "funcname": "ImTextCharToUtf8", - "location": "imgui_internal:408", + "location": "imgui_internal:409", "ov_cimguiname": "igImTextCharToUtf8", "ret": "const char*", "signature": "(char[5],unsigned int)", @@ -24901,7 +25076,7 @@ "comment": "// return number of UTF-8 code-points (NOT bytes count)", "defaults": {}, "funcname": "ImTextCountCharsFromUtf8", - "location": "imgui_internal:412", + "location": "imgui_internal:413", "ov_cimguiname": "igImTextCountCharsFromUtf8", "ret": "int", "signature": "(const char*,const char*)", @@ -24927,7 +25102,7 @@ "comment": "// return number of bytes to express one char in UTF-8", "defaults": {}, "funcname": "ImTextCountUtf8BytesFromChar", - "location": "imgui_internal:413", + "location": "imgui_internal:414", "ov_cimguiname": "igImTextCountUtf8BytesFromChar", "ret": "int", "signature": "(const char*,const char*)", @@ -24953,7 +25128,7 @@ "comment": "// return number of bytes to express string in UTF-8", "defaults": {}, "funcname": "ImTextCountUtf8BytesFromStr", - "location": "imgui_internal:414", + "location": "imgui_internal:415", "ov_cimguiname": "igImTextCountUtf8BytesFromStr", "ret": "int", "signature": "(const ImWchar*,const ImWchar*)", @@ -24979,7 +25154,7 @@ "comment": "// return previous UTF-8 code-point.", "defaults": {}, "funcname": "ImTextFindPreviousUtf8Codepoint", - "location": "imgui_internal:415", + "location": "imgui_internal:416", "ov_cimguiname": "igImTextFindPreviousUtf8Codepoint", "ret": "const char*", "signature": "(const char*,const char*)", @@ -25019,7 +25194,7 @@ "in_remaining": "NULL" }, "funcname": "ImTextStrFromUtf8", - "location": "imgui_internal:411", + "location": "imgui_internal:412", "ov_cimguiname": "igImTextStrFromUtf8", "ret": "int", "signature": "(ImWchar*,int,const char*,const char*,const char**)", @@ -25053,7 +25228,7 @@ "comment": "// return output UTF-8 bytes count", "defaults": {}, "funcname": "ImTextStrToUtf8", - "location": "imgui_internal:409", + "location": "imgui_internal:410", "ov_cimguiname": "igImTextStrToUtf8", "ret": "int", "signature": "(char*,int,const ImWchar*,const ImWchar*)", @@ -25074,7 +25249,7 @@ "cimguiname": "igImToUpper", "defaults": {}, "funcname": "ImToUpper", - "location": "imgui_internal:390", + "location": "imgui_internal:391", "ov_cimguiname": "igImToUpper", "ret": "char", "signature": "(char)", @@ -25229,6 +25404,51 @@ "stname": "" } ], + "igImTrunc": [ + { + "args": "(float f)", + "argsT": [ + { + "name": "f", + "type": "float" + } + ], + "argsoriginal": "(float f)", + "call_args": "(f)", + "cimguiname": "igImTrunc", + "defaults": {}, + "funcname": "ImTrunc", + "location": "imgui_internal:489", + "ov_cimguiname": "igImTrunc_Float", + "ret": "float", + "signature": "(float)", + "stname": "" + }, + { + "args": "(ImVec2 *pOut,const ImVec2 v)", + "argsT": [ + { + "name": "pOut", + "type": "ImVec2*" + }, + { + "name": "v", + "type": "const ImVec2" + } + ], + "argsoriginal": "(const ImVec2& v)", + "call_args": "(v)", + "cimguiname": "igImTrunc", + "defaults": {}, + "funcname": "ImTrunc", + "location": "imgui_internal:490", + "nonUDT": 1, + "ov_cimguiname": "igImTrunc_Vec2", + "ret": "void", + "signature": "(const ImVec2)", + "stname": "" + } + ], "igImUpperPowerOfTwo": [ { "args": "(int v)", @@ -25243,7 +25463,7 @@ "cimguiname": "igImUpperPowerOfTwo", "defaults": {}, "funcname": "ImUpperPowerOfTwo", - "location": "imgui_internal:374", + "location": "imgui_internal:375", "ov_cimguiname": "igImUpperPowerOfTwo", "ret": "int", "signature": "(int)", @@ -25252,14 +25472,14 @@ ], "igImage": [ { - "args": "(ImTextureID user_texture_id,const ImVec2 size,const ImVec2 uv0,const ImVec2 uv1,const ImVec4 tint_col,const ImVec4 border_col)", + "args": "(ImTextureID user_texture_id,const ImVec2 image_size,const ImVec2 uv0,const ImVec2 uv1,const ImVec4 tint_col,const ImVec4 border_col)", "argsT": [ { "name": "user_texture_id", "type": "ImTextureID" }, { - "name": "size", + "name": "image_size", "type": "const ImVec2" }, { @@ -25279,8 +25499,8 @@ "type": "const ImVec4" } ], - "argsoriginal": "(ImTextureID user_texture_id,const ImVec2& size,const ImVec2& uv0=ImVec2(0,0),const ImVec2& uv1=ImVec2(1,1),const ImVec4& tint_col=ImVec4(1,1,1,1),const ImVec4& border_col=ImVec4(0,0,0,0))", - "call_args": "(user_texture_id,size,uv0,uv1,tint_col,border_col)", + "argsoriginal": "(ImTextureID user_texture_id,const ImVec2& image_size,const ImVec2& uv0=ImVec2(0,0),const ImVec2& uv1=ImVec2(1,1),const ImVec4& tint_col=ImVec4(1,1,1,1),const ImVec4& border_col=ImVec4(0,0,0,0))", + "call_args": "(user_texture_id,image_size,uv0,uv1,tint_col,border_col)", "cimguiname": "igImage", "defaults": { "border_col": "ImVec4(0,0,0,0)", @@ -25289,7 +25509,7 @@ "uv1": "ImVec2(1,1)" }, "funcname": "Image", - "location": "imgui:529", + "location": "imgui:549", "namespace": "ImGui", "ov_cimguiname": "igImage", "ret": "void", @@ -25299,7 +25519,7 @@ ], "igImageButton": [ { - "args": "(const char* str_id,ImTextureID user_texture_id,const ImVec2 size,const ImVec2 uv0,const ImVec2 uv1,const ImVec4 bg_col,const ImVec4 tint_col)", + "args": "(const char* str_id,ImTextureID user_texture_id,const ImVec2 image_size,const ImVec2 uv0,const ImVec2 uv1,const ImVec4 bg_col,const ImVec4 tint_col)", "argsT": [ { "name": "str_id", @@ -25310,7 +25530,7 @@ "type": "ImTextureID" }, { - "name": "size", + "name": "image_size", "type": "const ImVec2" }, { @@ -25330,8 +25550,8 @@ "type": "const ImVec4" } ], - "argsoriginal": "(const char* str_id,ImTextureID user_texture_id,const ImVec2& size,const ImVec2& uv0=ImVec2(0,0),const ImVec2& uv1=ImVec2(1,1),const ImVec4& bg_col=ImVec4(0,0,0,0),const ImVec4& tint_col=ImVec4(1,1,1,1))", - "call_args": "(str_id,user_texture_id,size,uv0,uv1,bg_col,tint_col)", + "argsoriginal": "(const char* str_id,ImTextureID user_texture_id,const ImVec2& image_size,const ImVec2& uv0=ImVec2(0,0),const ImVec2& uv1=ImVec2(1,1),const ImVec4& bg_col=ImVec4(0,0,0,0),const ImVec4& tint_col=ImVec4(1,1,1,1))", + "call_args": "(str_id,user_texture_id,image_size,uv0,uv1,bg_col,tint_col)", "cimguiname": "igImageButton", "defaults": { "bg_col": "ImVec4(0,0,0,0)", @@ -25340,7 +25560,7 @@ "uv1": "ImVec2(1,1)" }, "funcname": "ImageButton", - "location": "imgui:530", + "location": "imgui:550", "namespace": "ImGui", "ov_cimguiname": "igImageButton", "ret": "bool", @@ -25350,7 +25570,7 @@ ], "igImageButtonEx": [ { - "args": "(ImGuiID id,ImTextureID texture_id,const ImVec2 size,const ImVec2 uv0,const ImVec2 uv1,const ImVec4 bg_col,const ImVec4 tint_col,ImGuiButtonFlags flags)", + "args": "(ImGuiID id,ImTextureID texture_id,const ImVec2 image_size,const ImVec2 uv0,const ImVec2 uv1,const ImVec4 bg_col,const ImVec4 tint_col,ImGuiButtonFlags flags)", "argsT": [ { "name": "id", @@ -25361,7 +25581,7 @@ "type": "ImTextureID" }, { - "name": "size", + "name": "image_size", "type": "const ImVec2" }, { @@ -25385,14 +25605,14 @@ "type": "ImGuiButtonFlags" } ], - "argsoriginal": "(ImGuiID id,ImTextureID texture_id,const ImVec2& size,const ImVec2& uv0,const ImVec2& uv1,const ImVec4& bg_col,const ImVec4& tint_col,ImGuiButtonFlags flags=0)", - "call_args": "(id,texture_id,size,uv0,uv1,bg_col,tint_col,flags)", + "argsoriginal": "(ImGuiID id,ImTextureID texture_id,const ImVec2& image_size,const ImVec2& uv0,const ImVec2& uv1,const ImVec4& bg_col,const ImVec4& tint_col,ImGuiButtonFlags flags=0)", + "call_args": "(id,texture_id,image_size,uv0,uv1,bg_col,tint_col,flags)", "cimguiname": "igImageButtonEx", "defaults": { "flags": "0" }, "funcname": "ImageButtonEx", - "location": "imgui_internal:3557", + "location": "imgui_internal:3707", "namespace": "ImGui", "ov_cimguiname": "igImageButtonEx", "ret": "bool", @@ -25417,7 +25637,7 @@ "indent_w": "0.0f" }, "funcname": "Indent", - "location": "imgui:457", + "location": "imgui:484", "namespace": "ImGui", "ov_cimguiname": "igIndent", "ret": "void", @@ -25434,7 +25654,7 @@ "cimguiname": "igInitialize", "defaults": {}, "funcname": "Initialize", - "location": "imgui_internal:3131", + "location": "imgui_internal:3269", "namespace": "ImGui", "ov_cimguiname": "igInitialize", "ret": "void", @@ -25481,7 +25701,7 @@ "step_fast": "0.0" }, "funcname": "InputDouble", - "location": "imgui:601", + "location": "imgui:621", "namespace": "ImGui", "ov_cimguiname": "igInputDouble", "ret": "bool", @@ -25528,7 +25748,7 @@ "step_fast": "0.0f" }, "funcname": "InputFloat", - "location": "imgui:593", + "location": "imgui:613", "namespace": "ImGui", "ov_cimguiname": "igInputFloat", "ret": "bool", @@ -25565,7 +25785,7 @@ "format": "\"%.3f\"" }, "funcname": "InputFloat2", - "location": "imgui:594", + "location": "imgui:614", "namespace": "ImGui", "ov_cimguiname": "igInputFloat2", "ret": "bool", @@ -25602,7 +25822,7 @@ "format": "\"%.3f\"" }, "funcname": "InputFloat3", - "location": "imgui:595", + "location": "imgui:615", "namespace": "ImGui", "ov_cimguiname": "igInputFloat3", "ret": "bool", @@ -25639,7 +25859,7 @@ "format": "\"%.3f\"" }, "funcname": "InputFloat4", - "location": "imgui:596", + "location": "imgui:616", "namespace": "ImGui", "ov_cimguiname": "igInputFloat4", "ret": "bool", @@ -25681,7 +25901,7 @@ "step_fast": "100" }, "funcname": "InputInt", - "location": "imgui:597", + "location": "imgui:617", "namespace": "ImGui", "ov_cimguiname": "igInputInt", "ret": "bool", @@ -25713,7 +25933,7 @@ "flags": "0" }, "funcname": "InputInt2", - "location": "imgui:598", + "location": "imgui:618", "namespace": "ImGui", "ov_cimguiname": "igInputInt2", "ret": "bool", @@ -25745,7 +25965,7 @@ "flags": "0" }, "funcname": "InputInt3", - "location": "imgui:599", + "location": "imgui:619", "namespace": "ImGui", "ov_cimguiname": "igInputInt3", "ret": "bool", @@ -25777,7 +25997,7 @@ "flags": "0" }, "funcname": "InputInt4", - "location": "imgui:600", + "location": "imgui:620", "namespace": "ImGui", "ov_cimguiname": "igInputInt4", "ret": "bool", @@ -25828,7 +26048,7 @@ "p_step_fast": "NULL" }, "funcname": "InputScalar", - "location": "imgui:602", + "location": "imgui:622", "namespace": "ImGui", "ov_cimguiname": "igInputScalar", "ret": "bool", @@ -25883,7 +26103,7 @@ "p_step_fast": "NULL" }, "funcname": "InputScalarN", - "location": "imgui:603", + "location": "imgui:623", "namespace": "ImGui", "ov_cimguiname": "igInputScalarN", "ret": "bool", @@ -25929,7 +26149,7 @@ "user_data": "NULL" }, "funcname": "InputText", - "location": "imgui:590", + "location": "imgui:610", "namespace": "ImGui", "ov_cimguiname": "igInputText", "ret": "bool", @@ -25951,7 +26171,7 @@ "cimguiname": "igInputTextDeactivateHook", "defaults": {}, "funcname": "InputTextDeactivateHook", - "location": "imgui_internal:3604", + "location": "imgui_internal:3754", "namespace": "ImGui", "ov_cimguiname": "igInputTextDeactivateHook", "ret": "void", @@ -26004,7 +26224,7 @@ "user_data": "NULL" }, "funcname": "InputTextEx", - "location": "imgui_internal:3603", + "location": "imgui_internal:3753", "namespace": "ImGui", "ov_cimguiname": "igInputTextEx", "ret": "bool", @@ -26055,7 +26275,7 @@ "user_data": "NULL" }, "funcname": "InputTextMultiline", - "location": "imgui:591", + "location": "imgui:611", "namespace": "ImGui", "ov_cimguiname": "igInputTextMultiline", "ret": "bool", @@ -26105,7 +26325,7 @@ "user_data": "NULL" }, "funcname": "InputTextWithHint", - "location": "imgui:592", + "location": "imgui:612", "namespace": "ImGui", "ov_cimguiname": "igInputTextWithHint", "ret": "bool", @@ -26138,7 +26358,7 @@ "flags": "0" }, "funcname": "InvisibleButton", - "location": "imgui:517", + "location": "imgui:535", "namespace": "ImGui", "ov_cimguiname": "igInvisibleButton", "ret": "bool", @@ -26160,7 +26380,7 @@ "cimguiname": "igIsActiveIdUsingNavDir", "defaults": {}, "funcname": "IsActiveIdUsingNavDir", - "location": "imgui_internal:3311", + "location": "imgui_internal:3453", "namespace": "ImGui", "ov_cimguiname": "igIsActiveIdUsingNavDir", "ret": "bool", @@ -26182,7 +26402,7 @@ "cimguiname": "igIsAliasKey", "defaults": {}, "funcname": "IsAliasKey", - "location": "imgui_internal:3287", + "location": "imgui_internal:3428", "namespace": "ImGui", "ov_cimguiname": "igIsAliasKey", "ret": "bool", @@ -26200,7 +26420,7 @@ "comment": "// is any item active?", "defaults": {}, "funcname": "IsAnyItemActive", - "location": "imgui:894", + "location": "imgui:911", "namespace": "ImGui", "ov_cimguiname": "igIsAnyItemActive", "ret": "bool", @@ -26218,7 +26438,7 @@ "comment": "// is any item focused?", "defaults": {}, "funcname": "IsAnyItemFocused", - "location": "imgui:895", + "location": "imgui:912", "namespace": "ImGui", "ov_cimguiname": "igIsAnyItemFocused", "ret": "bool", @@ -26236,7 +26456,7 @@ "comment": "// is any item hovered?", "defaults": {}, "funcname": "IsAnyItemHovered", - "location": "imgui:893", + "location": "imgui:910", "namespace": "ImGui", "ov_cimguiname": "igIsAnyItemHovered", "ret": "bool", @@ -26254,7 +26474,7 @@ "comment": "// [WILL OBSOLETE] is any mouse button held? This was designed for backends, but prefer having backend maintain a mask of held mouse buttons, because upcoming input queue system will make this invalid.", "defaults": {}, "funcname": "IsAnyMouseDown", - "location": "imgui:957", + "location": "imgui:973", "namespace": "ImGui", "ov_cimguiname": "igIsAnyMouseDown", "ret": "bool", @@ -26280,7 +26500,7 @@ "cimguiname": "igIsClippedEx", "defaults": {}, "funcname": "IsClippedEx", - "location": "imgui_internal:3210", + "location": "imgui_internal:3348", "namespace": "ImGui", "ov_cimguiname": "igIsClippedEx", "ret": "bool", @@ -26297,7 +26517,7 @@ "cimguiname": "igIsDragDropActive", "defaults": {}, "funcname": "IsDragDropActive", - "location": "imgui_internal:3427", + "location": "imgui_internal:3575", "namespace": "ImGui", "ov_cimguiname": "igIsDragDropActive", "ret": "bool", @@ -26314,7 +26534,7 @@ "cimguiname": "igIsDragDropPayloadBeingAccepted", "defaults": {}, "funcname": "IsDragDropPayloadBeingAccepted", - "location": "imgui_internal:3430", + "location": "imgui_internal:3578", "namespace": "ImGui", "ov_cimguiname": "igIsDragDropPayloadBeingAccepted", "ret": "bool", @@ -26336,7 +26556,7 @@ "cimguiname": "igIsGamepadKey", "defaults": {}, "funcname": "IsGamepadKey", - "location": "imgui_internal:3285", + "location": "imgui_internal:3426", "namespace": "ImGui", "ov_cimguiname": "igIsGamepadKey", "ret": "bool", @@ -26354,7 +26574,7 @@ "comment": "// was the last item just made active (item was previously inactive).", "defaults": {}, "funcname": "IsItemActivated", - "location": "imgui:889", + "location": "imgui:906", "namespace": "ImGui", "ov_cimguiname": "igIsItemActivated", "ret": "bool", @@ -26372,7 +26592,7 @@ "comment": "// is the last item active? (e.g. button being held, text field being edited. This will continuously return true while holding mouse button on an item. Items that don't interact will always return false)", "defaults": {}, "funcname": "IsItemActive", - "location": "imgui:884", + "location": "imgui:901", "namespace": "ImGui", "ov_cimguiname": "igIsItemActive", "ret": "bool", @@ -26397,7 +26617,7 @@ "mouse_button": "0" }, "funcname": "IsItemClicked", - "location": "imgui:886", + "location": "imgui:903", "namespace": "ImGui", "ov_cimguiname": "igIsItemClicked", "ret": "bool", @@ -26415,7 +26635,7 @@ "comment": "// was the last item just made inactive (item was previously active). Useful for Undo/Redo patterns with widgets that require continuous editing.", "defaults": {}, "funcname": "IsItemDeactivated", - "location": "imgui:890", + "location": "imgui:907", "namespace": "ImGui", "ov_cimguiname": "igIsItemDeactivated", "ret": "bool", @@ -26433,7 +26653,7 @@ "comment": "// was the last item just made inactive and made a value change when it was active? (e.g. Slider/Drag moved). Useful for Undo/Redo patterns with widgets that require continuous editing. Note that you may get false positives (some widgets such as Combo()/ListBox()/Selectable() will return true even when clicking an already selected item).", "defaults": {}, "funcname": "IsItemDeactivatedAfterEdit", - "location": "imgui:891", + "location": "imgui:908", "namespace": "ImGui", "ov_cimguiname": "igIsItemDeactivatedAfterEdit", "ret": "bool", @@ -26451,7 +26671,7 @@ "comment": "// did the last item modify its underlying value this frame? or was pressed? This is generally the same as the \"bool\" return value of many widgets.", "defaults": {}, "funcname": "IsItemEdited", - "location": "imgui:888", + "location": "imgui:905", "namespace": "ImGui", "ov_cimguiname": "igIsItemEdited", "ret": "bool", @@ -26469,7 +26689,7 @@ "comment": "// is the last item focused for keyboard/gamepad navigation?", "defaults": {}, "funcname": "IsItemFocused", - "location": "imgui:885", + "location": "imgui:902", "namespace": "ImGui", "ov_cimguiname": "igIsItemFocused", "ret": "bool", @@ -26494,7 +26714,7 @@ "flags": "0" }, "funcname": "IsItemHovered", - "location": "imgui:883", + "location": "imgui:900", "namespace": "ImGui", "ov_cimguiname": "igIsItemHovered", "ret": "bool", @@ -26512,7 +26732,7 @@ "comment": "// was the last item open state toggled? set by TreeNode().", "defaults": {}, "funcname": "IsItemToggledOpen", - "location": "imgui:892", + "location": "imgui:909", "namespace": "ImGui", "ov_cimguiname": "igIsItemToggledOpen", "ret": "bool", @@ -26530,7 +26750,7 @@ "comment": "// Was the last item selection toggled? (after Selectable(), TreeNode() etc. We only returns toggle _event_ in order to handle clipping correctly)", "defaults": {}, "funcname": "IsItemToggledSelection", - "location": "imgui_internal:3215", + "location": "imgui_internal:3353", "namespace": "ImGui", "ov_cimguiname": "igIsItemToggledSelection", "ret": "bool", @@ -26548,7 +26768,7 @@ "comment": "// is the last item visible? (items may be out of sight because of clipping/scrolling)", "defaults": {}, "funcname": "IsItemVisible", - "location": "imgui:887", + "location": "imgui:904", "namespace": "ImGui", "ov_cimguiname": "igIsItemVisible", "ret": "bool", @@ -26556,6 +26776,59 @@ "stname": "" } ], + "igIsKeyChordPressed": [ + { + "args": "(ImGuiKeyChord key_chord)", + "argsT": [ + { + "name": "key_chord", + "type": "ImGuiKeyChord" + } + ], + "argsoriginal": "(ImGuiKeyChord key_chord)", + "call_args": "(key_chord)", + "cimguiname": "igIsKeyChordPressed", + "comment": "// was key chord (mods + key) pressed, e.g. you can pass 'ImGuiMod_Ctrl | ImGuiKey_S' as a key-chord. This doesn't do any routing or focus check, please consider using Shortcut() function instead.", + "defaults": {}, + "funcname": "IsKeyChordPressed", + "location": "imgui:957", + "namespace": "ImGui", + "ov_cimguiname": "igIsKeyChordPressed_Nil", + "ret": "bool", + "signature": "(ImGuiKeyChord)", + "stname": "" + }, + { + "args": "(ImGuiKeyChord key_chord,ImGuiID owner_id,ImGuiInputFlags flags)", + "argsT": [ + { + "name": "key_chord", + "type": "ImGuiKeyChord" + }, + { + "name": "owner_id", + "type": "ImGuiID" + }, + { + "name": "flags", + "type": "ImGuiInputFlags" + } + ], + "argsoriginal": "(ImGuiKeyChord key_chord,ImGuiID owner_id,ImGuiInputFlags flags=0)", + "call_args": "(key_chord,owner_id,flags)", + "cimguiname": "igIsKeyChordPressed", + "defaults": { + "flags": "0" + }, + "funcname": "IsKeyChordPressed", + "location": "imgui_internal:3500", + "namespace": "ImGui", + "ov_cimguiname": "igIsKeyChordPressed_ID", + "ret": "bool", + "signature": "(ImGuiKeyChord,ImGuiID,ImGuiInputFlags)", + "stname": "" + } + ], "igIsKeyDown": [ { "args": "(ImGuiKey key)", @@ -26571,7 +26844,7 @@ "comment": "// is key being held.", "defaults": {}, "funcname": "IsKeyDown", - "location": "imgui:939", + "location": "imgui:954", "namespace": "ImGui", "ov_cimguiname": "igIsKeyDown_Nil", "ret": "bool", @@ -26595,7 +26868,7 @@ "cimguiname": "igIsKeyDown", "defaults": {}, "funcname": "IsKeyDown", - "location": "imgui_internal:3337", + "location": "imgui_internal:3479", "namespace": "ImGui", "ov_cimguiname": "igIsKeyDown_ID", "ret": "bool", @@ -26624,7 +26897,7 @@ "repeat": "true" }, "funcname": "IsKeyPressed", - "location": "imgui:940", + "location": "imgui:955", "namespace": "ImGui", "ov_cimguiname": "igIsKeyPressed_Bool", "ret": "bool", @@ -26655,7 +26928,7 @@ "flags": "0" }, "funcname": "IsKeyPressed", - "location": "imgui_internal:3338", + "location": "imgui_internal:3480", "namespace": "ImGui", "ov_cimguiname": "igIsKeyPressed_ID", "ret": "bool", @@ -26663,35 +26936,6 @@ "stname": "" } ], - "igIsKeyPressedMap": [ - { - "args": "(ImGuiKey key,bool repeat)", - "argsT": [ - { - "name": "key", - "type": "ImGuiKey" - }, - { - "name": "repeat", - "type": "bool" - } - ], - "argsoriginal": "(ImGuiKey key,bool repeat=true)", - "call_args": "(key,repeat)", - "cimguiname": "igIsKeyPressedMap", - "comment": "// Removed in 1.87: Mapping from named key is always identity!", - "defaults": { - "repeat": "true" - }, - "funcname": "IsKeyPressedMap", - "location": "imgui_internal:3678", - "namespace": "ImGui", - "ov_cimguiname": "igIsKeyPressedMap", - "ret": "bool", - "signature": "(ImGuiKey,bool)", - "stname": "" - } - ], "igIsKeyReleased": [ { "args": "(ImGuiKey key)", @@ -26707,7 +26951,7 @@ "comment": "// was key released (went from Down to !Down)?", "defaults": {}, "funcname": "IsKeyReleased", - "location": "imgui:941", + "location": "imgui:956", "namespace": "ImGui", "ov_cimguiname": "igIsKeyReleased_Nil", "ret": "bool", @@ -26731,7 +26975,7 @@ "cimguiname": "igIsKeyReleased", "defaults": {}, "funcname": "IsKeyReleased", - "location": "imgui_internal:3339", + "location": "imgui_internal:3481", "namespace": "ImGui", "ov_cimguiname": "igIsKeyReleased_ID", "ret": "bool", @@ -26753,7 +26997,7 @@ "cimguiname": "igIsKeyboardKey", "defaults": {}, "funcname": "IsKeyboardKey", - "location": "imgui_internal:3284", + "location": "imgui_internal:3425", "namespace": "ImGui", "ov_cimguiname": "igIsKeyboardKey", "ret": "bool", @@ -26775,7 +27019,7 @@ "cimguiname": "igIsLegacyKey", "defaults": {}, "funcname": "IsLegacyKey", - "location": "imgui_internal:3283", + "location": "imgui_internal:3424", "namespace": "ImGui", "ov_cimguiname": "igIsLegacyKey", "ret": "bool", @@ -26783,6 +27027,28 @@ "stname": "" } ], + "igIsModKey": [ + { + "args": "(ImGuiKey key)", + "argsT": [ + { + "name": "key", + "type": "ImGuiKey" + } + ], + "argsoriginal": "(ImGuiKey key)", + "call_args": "(key)", + "cimguiname": "igIsModKey", + "defaults": {}, + "funcname": "IsModKey", + "location": "imgui_internal:3429", + "namespace": "ImGui", + "ov_cimguiname": "igIsModKey", + "ret": "bool", + "signature": "(ImGuiKey)", + "stname": "" + } + ], "igIsMouseClicked": [ { "args": "(ImGuiMouseButton button,bool repeat)", @@ -26804,7 +27070,7 @@ "repeat": "false" }, "funcname": "IsMouseClicked", - "location": "imgui:951", + "location": "imgui:967", "namespace": "ImGui", "ov_cimguiname": "igIsMouseClicked_Bool", "ret": "bool", @@ -26834,7 +27100,7 @@ "flags": "0" }, "funcname": "IsMouseClicked", - "location": "imgui_internal:3341", + "location": "imgui_internal:3483", "namespace": "ImGui", "ov_cimguiname": "igIsMouseClicked_ID", "ret": "bool", @@ -26857,12 +27123,36 @@ "comment": "// did mouse button double-clicked? Same as GetMouseClickedCount() == 2. (note that a double-click will also report IsMouseClicked() == true)", "defaults": {}, "funcname": "IsMouseDoubleClicked", - "location": "imgui:953", + "location": "imgui:969", "namespace": "ImGui", - "ov_cimguiname": "igIsMouseDoubleClicked", + "ov_cimguiname": "igIsMouseDoubleClicked_Nil", "ret": "bool", "signature": "(ImGuiMouseButton)", "stname": "" + }, + { + "args": "(ImGuiMouseButton button,ImGuiID owner_id)", + "argsT": [ + { + "name": "button", + "type": "ImGuiMouseButton" + }, + { + "name": "owner_id", + "type": "ImGuiID" + } + ], + "argsoriginal": "(ImGuiMouseButton button,ImGuiID owner_id)", + "call_args": "(button,owner_id)", + "cimguiname": "igIsMouseDoubleClicked", + "defaults": {}, + "funcname": "IsMouseDoubleClicked", + "location": "imgui_internal:3485", + "namespace": "ImGui", + "ov_cimguiname": "igIsMouseDoubleClicked_ID", + "ret": "bool", + "signature": "(ImGuiMouseButton,ImGuiID)", + "stname": "" } ], "igIsMouseDown": [ @@ -26880,7 +27170,7 @@ "comment": "// is mouse button held?", "defaults": {}, "funcname": "IsMouseDown", - "location": "imgui:950", + "location": "imgui:966", "namespace": "ImGui", "ov_cimguiname": "igIsMouseDown_Nil", "ret": "bool", @@ -26904,7 +27194,7 @@ "cimguiname": "igIsMouseDown", "defaults": {}, "funcname": "IsMouseDown", - "location": "imgui_internal:3340", + "location": "imgui_internal:3482", "namespace": "ImGui", "ov_cimguiname": "igIsMouseDown_ID", "ret": "bool", @@ -26932,7 +27222,7 @@ "lock_threshold": "-1.0f" }, "funcname": "IsMouseDragPastThreshold", - "location": "imgui_internal:3304", + "location": "imgui_internal:3446", "namespace": "ImGui", "ov_cimguiname": "igIsMouseDragPastThreshold", "ret": "bool", @@ -26961,7 +27251,7 @@ "lock_threshold": "-1.0f" }, "funcname": "IsMouseDragging", - "location": "imgui:960", + "location": "imgui:976", "namespace": "ImGui", "ov_cimguiname": "igIsMouseDragging", "ret": "bool", @@ -26994,7 +27284,7 @@ "clip": "true" }, "funcname": "IsMouseHoveringRect", - "location": "imgui:955", + "location": "imgui:971", "namespace": "ImGui", "ov_cimguiname": "igIsMouseHoveringRect", "ret": "bool", @@ -27016,7 +27306,7 @@ "cimguiname": "igIsMouseKey", "defaults": {}, "funcname": "IsMouseKey", - "location": "imgui_internal:3286", + "location": "imgui_internal:3427", "namespace": "ImGui", "ov_cimguiname": "igIsMouseKey", "ret": "bool", @@ -27041,7 +27331,7 @@ "mouse_pos": "NULL" }, "funcname": "IsMousePosValid", - "location": "imgui:956", + "location": "imgui:972", "namespace": "ImGui", "ov_cimguiname": "igIsMousePosValid", "ret": "bool", @@ -27064,7 +27354,7 @@ "comment": "// did mouse button released? (went from Down to !Down)", "defaults": {}, "funcname": "IsMouseReleased", - "location": "imgui:952", + "location": "imgui:968", "namespace": "ImGui", "ov_cimguiname": "igIsMouseReleased_Nil", "ret": "bool", @@ -27088,7 +27378,7 @@ "cimguiname": "igIsMouseReleased", "defaults": {}, "funcname": "IsMouseReleased", - "location": "imgui_internal:3342", + "location": "imgui_internal:3484", "namespace": "ImGui", "ov_cimguiname": "igIsMouseReleased_ID", "ret": "bool", @@ -27110,7 +27400,7 @@ "cimguiname": "igIsNamedKey", "defaults": {}, "funcname": "IsNamedKey", - "location": "imgui_internal:3281", + "location": "imgui_internal:3422", "namespace": "ImGui", "ov_cimguiname": "igIsNamedKey", "ret": "bool", @@ -27132,7 +27422,7 @@ "cimguiname": "igIsNamedKeyOrModKey", "defaults": {}, "funcname": "IsNamedKeyOrModKey", - "location": "imgui_internal:3282", + "location": "imgui_internal:3423", "namespace": "ImGui", "ov_cimguiname": "igIsNamedKeyOrModKey", "ret": "bool", @@ -27161,7 +27451,7 @@ "flags": "0" }, "funcname": "IsPopupOpen", - "location": "imgui:738", + "location": "imgui:756", "namespace": "ImGui", "ov_cimguiname": "igIsPopupOpen_Str", "ret": "bool", @@ -27185,7 +27475,7 @@ "cimguiname": "igIsPopupOpen", "defaults": {}, "funcname": "IsPopupOpen", - "location": "imgui_internal:3236", + "location": "imgui_internal:3374", "namespace": "ImGui", "ov_cimguiname": "igIsPopupOpen_ID", "ret": "bool", @@ -27208,7 +27498,7 @@ "comment": "// test if rectangle (of given size, starting from cursor position) is visible / not clipped.", "defaults": {}, "funcname": "IsRectVisible", - "location": "imgui:914", + "location": "imgui:931", "namespace": "ImGui", "ov_cimguiname": "igIsRectVisible_Nil", "ret": "bool", @@ -27233,7 +27523,7 @@ "comment": "// test if rectangle (in screen space) is visible / not clipped. to perform coarse clipping on user's side.", "defaults": {}, "funcname": "IsRectVisible", - "location": "imgui:915", + "location": "imgui:932", "namespace": "ImGui", "ov_cimguiname": "igIsRectVisible_Vec2", "ret": "bool", @@ -27259,7 +27549,7 @@ "cimguiname": "igIsWindowAbove", "defaults": {}, "funcname": "IsWindowAbove", - "location": "imgui_internal:3103", + "location": "imgui_internal:3240", "namespace": "ImGui", "ov_cimguiname": "igIsWindowAbove", "ret": "bool", @@ -27276,7 +27566,7 @@ "cimguiname": "igIsWindowAppearing", "defaults": {}, "funcname": "IsWindowAppearing", - "location": "imgui:358", + "location": "imgui:373", "namespace": "ImGui", "ov_cimguiname": "igIsWindowAppearing", "ret": "bool", @@ -27310,7 +27600,7 @@ "cimguiname": "igIsWindowChildOf", "defaults": {}, "funcname": "IsWindowChildOf", - "location": "imgui_internal:3101", + "location": "imgui_internal:3238", "namespace": "ImGui", "ov_cimguiname": "igIsWindowChildOf", "ret": "bool", @@ -27327,7 +27617,7 @@ "cimguiname": "igIsWindowCollapsed", "defaults": {}, "funcname": "IsWindowCollapsed", - "location": "imgui:359", + "location": "imgui:374", "namespace": "ImGui", "ov_cimguiname": "igIsWindowCollapsed", "ret": "bool", @@ -27355,7 +27645,7 @@ "flags": "0" }, "funcname": "IsWindowContentHoverable", - "location": "imgui_internal:3209", + "location": "imgui_internal:3347", "namespace": "ImGui", "ov_cimguiname": "igIsWindowContentHoverable", "ret": "bool", @@ -27373,7 +27663,7 @@ "comment": "// is current window docked into another window?", "defaults": {}, "funcname": "IsWindowDocked", - "location": "imgui:835", + "location": "imgui:852", "namespace": "ImGui", "ov_cimguiname": "igIsWindowDocked", "ret": "bool", @@ -27398,7 +27688,7 @@ "flags": "0" }, "funcname": "IsWindowFocused", - "location": "imgui:360", + "location": "imgui:375", "namespace": "ImGui", "ov_cimguiname": "igIsWindowFocused", "ret": "bool", @@ -27418,12 +27708,12 @@ "argsoriginal": "(ImGuiHoveredFlags flags=0)", "call_args": "(flags)", "cimguiname": "igIsWindowHovered", - "comment": "// is current window hovered (and typically: not blocked by a popup/modal)? see flags for options. NB: If you are trying to check whether your mouse should be dispatched to imgui or to your app, you should use the 'io.WantCaptureMouse' boolean for that! Please read the FAQ!", + "comment": "// 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.", "defaults": { "flags": "0" }, "funcname": "IsWindowHovered", - "location": "imgui:361", + "location": "imgui:376", "namespace": "ImGui", "ov_cimguiname": "igIsWindowHovered", "ret": "bool", @@ -27445,7 +27735,7 @@ "cimguiname": "igIsWindowNavFocusable", "defaults": {}, "funcname": "IsWindowNavFocusable", - "location": "imgui_internal:3104", + "location": "imgui_internal:3241", "namespace": "ImGui", "ov_cimguiname": "igIsWindowNavFocusable", "ret": "bool", @@ -27471,7 +27761,7 @@ "cimguiname": "igIsWindowWithinBeginStackOf", "defaults": {}, "funcname": "IsWindowWithinBeginStackOf", - "location": "imgui_internal:3102", + "location": "imgui_internal:3239", "namespace": "ImGui", "ov_cimguiname": "igIsWindowWithinBeginStackOf", "ret": "bool", @@ -27508,7 +27798,7 @@ "nav_bb": "NULL" }, "funcname": "ItemAdd", - "location": "imgui_internal:3207", + "location": "imgui_internal:3345", "namespace": "ImGui", "ov_cimguiname": "igItemAdd", "ret": "bool", @@ -27538,7 +27828,7 @@ "cimguiname": "igItemHoverable", "defaults": {}, "funcname": "ItemHoverable", - "location": "imgui_internal:3208", + "location": "imgui_internal:3346", "namespace": "ImGui", "ov_cimguiname": "igItemHoverable", "ret": "bool", @@ -27566,7 +27856,7 @@ "text_baseline_y": "-1.0f" }, "funcname": "ItemSize", - "location": "imgui_internal:3205", + "location": "imgui_internal:3343", "namespace": "ImGui", "ov_cimguiname": "igItemSize_Vec2", "ret": "void", @@ -27593,7 +27883,7 @@ "text_baseline_y": "-1.0f" }, "funcname": "ItemSize", - "location": "imgui_internal:3206", + "location": "imgui_internal:3344", "namespace": "ImGui", "ov_cimguiname": "igItemSize_Rect", "ret": "void", @@ -27615,7 +27905,7 @@ "cimguiname": "igKeepAliveID", "defaults": {}, "funcname": "KeepAliveID", - "location": "imgui_internal:3198", + "location": "imgui_internal:3336", "namespace": "ImGui", "ov_cimguiname": "igKeepAliveID", "ret": "void", @@ -27647,7 +27937,7 @@ "defaults": {}, "funcname": "LabelText", "isvararg": "...)", - "location": "imgui:506", + "location": "imgui:524", "namespace": "ImGui", "ov_cimguiname": "igLabelText", "ret": "void", @@ -27677,7 +27967,7 @@ "cimguiname": "igLabelTextV", "defaults": {}, "funcname": "LabelTextV", - "location": "imgui:507", + "location": "imgui:525", "namespace": "ImGui", "ov_cimguiname": "igLabelTextV", "ret": "void", @@ -27717,7 +28007,7 @@ "height_in_items": "-1" }, "funcname": "ListBox", - "location": "imgui:649", + "location": "imgui:669", "namespace": "ImGui", "ov_cimguiname": "igListBox_Str_arr", "ret": "bool", @@ -27761,7 +28051,7 @@ "height_in_items": "-1" }, "funcname": "ListBox", - "location": "imgui:650", + "location": "imgui:670", "namespace": "ImGui", "ov_cimguiname": "igListBox_FnStrPtr", "ret": "bool", @@ -27784,7 +28074,7 @@ "comment": "// call after CreateContext() and before the first call to NewFrame(). NewFrame() automatically calls LoadIniSettingsFromDisk(io.IniFilename).", "defaults": {}, "funcname": "LoadIniSettingsFromDisk", - "location": "imgui:976", + "location": "imgui:992", "namespace": "ImGui", "ov_cimguiname": "igLoadIniSettingsFromDisk", "ret": "void", @@ -27813,7 +28103,7 @@ "ini_size": "0" }, "funcname": "LoadIniSettingsFromMemory", - "location": "imgui:977", + "location": "imgui:993", "namespace": "ImGui", "ov_cimguiname": "igLoadIniSettingsFromMemory", "ret": "void", @@ -27835,7 +28125,7 @@ "cimguiname": "igLocalizeGetMsg", "defaults": {}, "funcname": "LocalizeGetMsg", - "location": "imgui_internal:3172", + "location": "imgui_internal:3310", "namespace": "ImGui", "ov_cimguiname": "igLocalizeGetMsg", "ret": "const char*", @@ -27861,7 +28151,7 @@ "cimguiname": "igLocalizeRegisterEntries", "defaults": {}, "funcname": "LocalizeRegisterEntries", - "location": "imgui_internal:3171", + "location": "imgui_internal:3309", "namespace": "ImGui", "ov_cimguiname": "igLocalizeRegisterEntries", "ret": "void", @@ -27888,7 +28178,7 @@ "comment": "// -> BeginCapture() when we design v2 api, for now stay under the radar by using the old name.", "defaults": {}, "funcname": "LogBegin", - "location": "imgui_internal:3225", + "location": "imgui_internal:3363", "namespace": "ImGui", "ov_cimguiname": "igLogBegin", "ret": "void", @@ -27906,7 +28196,7 @@ "comment": "// helper to display buttons for logging to tty/file/clipboard", "defaults": {}, "funcname": "LogButtons", - "location": "imgui:843", + "location": "imgui:860", "namespace": "ImGui", "ov_cimguiname": "igLogButtons", "ret": "void", @@ -27924,7 +28214,7 @@ "comment": "// stop logging (close file, etc.)", "defaults": {}, "funcname": "LogFinish", - "location": "imgui:842", + "location": "imgui:859", "namespace": "ImGui", "ov_cimguiname": "igLogFinish", "ret": "void", @@ -27956,7 +28246,7 @@ "text_end": "NULL" }, "funcname": "LogRenderedText", - "location": "imgui_internal:3227", + "location": "imgui_internal:3365", "namespace": "ImGui", "ov_cimguiname": "igLogRenderedText", "ret": "void", @@ -27982,7 +28272,7 @@ "cimguiname": "igLogSetNextTextDecoration", "defaults": {}, "funcname": "LogSetNextTextDecoration", - "location": "imgui_internal:3228", + "location": "imgui_internal:3366", "namespace": "ImGui", "ov_cimguiname": "igLogSetNextTextDecoration", "ret": "void", @@ -28010,7 +28300,7 @@ "defaults": {}, "funcname": "LogText", "isvararg": "...)", - "location": "imgui:844", + "location": "imgui:861", "manual": true, "namespace": "ImGui", "ov_cimguiname": "igLogText", @@ -28037,7 +28327,7 @@ "cimguiname": "igLogTextV", "defaults": {}, "funcname": "LogTextV", - "location": "imgui:845", + "location": "imgui:862", "namespace": "ImGui", "ov_cimguiname": "igLogTextV", "ret": "void", @@ -28062,7 +28352,7 @@ "auto_open_depth": "-1" }, "funcname": "LogToBuffer", - "location": "imgui_internal:3226", + "location": "imgui_internal:3364", "namespace": "ImGui", "ov_cimguiname": "igLogToBuffer", "ret": "void", @@ -28087,7 +28377,7 @@ "auto_open_depth": "-1" }, "funcname": "LogToClipboard", - "location": "imgui:841", + "location": "imgui:858", "namespace": "ImGui", "ov_cimguiname": "igLogToClipboard", "ret": "void", @@ -28117,7 +28407,7 @@ "filename": "NULL" }, "funcname": "LogToFile", - "location": "imgui:840", + "location": "imgui:857", "namespace": "ImGui", "ov_cimguiname": "igLogToFile", "ret": "void", @@ -28142,7 +28432,7 @@ "auto_open_depth": "-1" }, "funcname": "LogToTTY", - "location": "imgui:839", + "location": "imgui:856", "namespace": "ImGui", "ov_cimguiname": "igLogToTTY", "ret": "void", @@ -28159,7 +28449,7 @@ "cimguiname": "igMarkIniSettingsDirty", "defaults": {}, "funcname": "MarkIniSettingsDirty", - "location": "imgui_internal:3157", + "location": "imgui_internal:3295", "namespace": "ImGui", "ov_cimguiname": "igMarkIniSettingsDirty_Nil", "ret": "void", @@ -28179,7 +28469,7 @@ "cimguiname": "igMarkIniSettingsDirty", "defaults": {}, "funcname": "MarkIniSettingsDirty", - "location": "imgui_internal:3158", + "location": "imgui_internal:3296", "namespace": "ImGui", "ov_cimguiname": "igMarkIniSettingsDirty_WindowPtr", "ret": "void", @@ -28202,7 +28492,7 @@ "comment": "// Mark data associated to given item as \"edited\", used by IsItemDeactivatedAfterEdit() function.", "defaults": {}, "funcname": "MarkItemEdited", - "location": "imgui_internal:3199", + "location": "imgui_internal:3337", "namespace": "ImGui", "ov_cimguiname": "igMarkItemEdited", "ret": "void", @@ -28224,7 +28514,7 @@ "cimguiname": "igMemAlloc", "defaults": {}, "funcname": "MemAlloc", - "location": "imgui:991", + "location": "imgui:1010", "namespace": "ImGui", "ov_cimguiname": "igMemAlloc", "ret": "void*", @@ -28246,7 +28536,7 @@ "cimguiname": "igMemFree", "defaults": {}, "funcname": "MemFree", - "location": "imgui:992", + "location": "imgui:1011", "namespace": "ImGui", "ov_cimguiname": "igMemFree", "ret": "void", @@ -28285,7 +28575,7 @@ "shortcut": "NULL" }, "funcname": "MenuItem", - "location": "imgui:677", + "location": "imgui:697", "namespace": "ImGui", "ov_cimguiname": "igMenuItem_Bool", "ret": "bool", @@ -28320,7 +28610,7 @@ "enabled": "true" }, "funcname": "MenuItem", - "location": "imgui:678", + "location": "imgui:698", "namespace": "ImGui", "ov_cimguiname": "igMenuItem_BoolPtr", "ret": "bool", @@ -28362,7 +28652,7 @@ "shortcut": "NULL" }, "funcname": "MenuItemEx", - "location": "imgui_internal:3249", + "location": "imgui_internal:3388", "namespace": "ImGui", "ov_cimguiname": "igMenuItemEx", "ret": "bool", @@ -28384,7 +28674,7 @@ "cimguiname": "igMouseButtonToKey", "defaults": {}, "funcname": "MouseButtonToKey", - "location": "imgui_internal:3303", + "location": "imgui_internal:3445", "namespace": "ImGui", "ov_cimguiname": "igMouseButtonToKey", "ret": "ImGuiKey", @@ -28406,7 +28696,7 @@ "cimguiname": "igNavClearPreferredPosForAxis", "defaults": {}, "funcname": "NavClearPreferredPosForAxis", - "location": "imgui_internal:3267", + "location": "imgui_internal:3407", "namespace": "ImGui", "ov_cimguiname": "igNavClearPreferredPosForAxis", "ret": "void", @@ -28414,6 +28704,28 @@ "stname": "" } ], + "igNavHighlightActivated": [ + { + "args": "(ImGuiID id)", + "argsT": [ + { + "name": "id", + "type": "ImGuiID" + } + ], + "argsoriginal": "(ImGuiID id)", + "call_args": "(id)", + "cimguiname": "igNavHighlightActivated", + "defaults": {}, + "funcname": "NavHighlightActivated", + "location": "imgui_internal:3406", + "namespace": "ImGui", + "ov_cimguiname": "igNavHighlightActivated", + "ret": "void", + "signature": "(ImGuiID)", + "stname": "" + } + ], "igNavInitRequestApplyResult": [ { "args": "()", @@ -28423,7 +28735,7 @@ "cimguiname": "igNavInitRequestApplyResult", "defaults": {}, "funcname": "NavInitRequestApplyResult", - "location": "imgui_internal:3258", + "location": "imgui_internal:3397", "namespace": "ImGui", "ov_cimguiname": "igNavInitRequestApplyResult", "ret": "void", @@ -28449,7 +28761,7 @@ "cimguiname": "igNavInitWindow", "defaults": {}, "funcname": "NavInitWindow", - "location": "imgui_internal:3257", + "location": "imgui_internal:3396", "namespace": "ImGui", "ov_cimguiname": "igNavInitWindow", "ret": "void", @@ -28466,7 +28778,7 @@ "cimguiname": "igNavMoveRequestApplyResult", "defaults": {}, "funcname": "NavMoveRequestApplyResult", - "location": "imgui_internal:3265", + "location": "imgui_internal:3404", "namespace": "ImGui", "ov_cimguiname": "igNavMoveRequestApplyResult", "ret": "void", @@ -28483,7 +28795,7 @@ "cimguiname": "igNavMoveRequestButNoResultYet", "defaults": {}, "funcname": "NavMoveRequestButNoResultYet", - "location": "imgui_internal:3259", + "location": "imgui_internal:3398", "namespace": "ImGui", "ov_cimguiname": "igNavMoveRequestButNoResultYet", "ret": "bool", @@ -28500,7 +28812,7 @@ "cimguiname": "igNavMoveRequestCancel", "defaults": {}, "funcname": "NavMoveRequestCancel", - "location": "imgui_internal:3264", + "location": "imgui_internal:3403", "namespace": "ImGui", "ov_cimguiname": "igNavMoveRequestCancel", "ret": "void", @@ -28534,7 +28846,7 @@ "cimguiname": "igNavMoveRequestForward", "defaults": {}, "funcname": "NavMoveRequestForward", - "location": "imgui_internal:3261", + "location": "imgui_internal:3400", "namespace": "ImGui", "ov_cimguiname": "igNavMoveRequestForward", "ret": "void", @@ -28556,7 +28868,7 @@ "cimguiname": "igNavMoveRequestResolveWithLastItem", "defaults": {}, "funcname": "NavMoveRequestResolveWithLastItem", - "location": "imgui_internal:3262", + "location": "imgui_internal:3401", "namespace": "ImGui", "ov_cimguiname": "igNavMoveRequestResolveWithLastItem", "ret": "void", @@ -28582,7 +28894,7 @@ "cimguiname": "igNavMoveRequestResolveWithPastTreeNode", "defaults": {}, "funcname": "NavMoveRequestResolveWithPastTreeNode", - "location": "imgui_internal:3263", + "location": "imgui_internal:3402", "namespace": "ImGui", "ov_cimguiname": "igNavMoveRequestResolveWithPastTreeNode", "ret": "void", @@ -28616,7 +28928,7 @@ "cimguiname": "igNavMoveRequestSubmit", "defaults": {}, "funcname": "NavMoveRequestSubmit", - "location": "imgui_internal:3260", + "location": "imgui_internal:3399", "namespace": "ImGui", "ov_cimguiname": "igNavMoveRequestSubmit", "ret": "void", @@ -28642,7 +28954,7 @@ "cimguiname": "igNavMoveRequestTryWrapping", "defaults": {}, "funcname": "NavMoveRequestTryWrapping", - "location": "imgui_internal:3266", + "location": "imgui_internal:3405", "namespace": "ImGui", "ov_cimguiname": "igNavMoveRequestTryWrapping", "ret": "void", @@ -28659,7 +28971,7 @@ "cimguiname": "igNavRestoreHighlightAfterMove", "defaults": {}, "funcname": "NavRestoreHighlightAfterMove", - "location": "imgui_internal:3268", + "location": "imgui_internal:3408", "namespace": "ImGui", "ov_cimguiname": "igNavRestoreHighlightAfterMove", "ret": "void", @@ -28676,7 +28988,7 @@ "cimguiname": "igNavUpdateCurrentWindowIsScrollPushableX", "defaults": {}, "funcname": "NavUpdateCurrentWindowIsScrollPushableX", - "location": "imgui_internal:3269", + "location": "imgui_internal:3409", "namespace": "ImGui", "ov_cimguiname": "igNavUpdateCurrentWindowIsScrollPushableX", "ret": "void", @@ -28694,7 +29006,7 @@ "comment": "// start a new Dear ImGui frame, you can submit any command from this point until Render()/EndFrame().", "defaults": {}, "funcname": "NewFrame", - "location": "imgui:307", + "location": "imgui:312", "namespace": "ImGui", "ov_cimguiname": "igNewFrame", "ret": "void", @@ -28712,7 +29024,7 @@ "comment": "// undo a SameLine() or force a new line when in a horizontal-layout context.", "defaults": {}, "funcname": "NewLine", - "location": "imgui:454", + "location": "imgui:481", "namespace": "ImGui", "ov_cimguiname": "igNewLine", "ret": "void", @@ -28730,7 +29042,7 @@ "comment": "// next column, defaults to current row or next row if the current row is finished", "defaults": {}, "funcname": "NextColumn", - "location": "imgui:800", + "location": "imgui:817", "namespace": "ImGui", "ov_cimguiname": "igNextColumn", "ret": "void", @@ -28759,7 +29071,7 @@ "popup_flags": "0" }, "funcname": "OpenPopup", - "location": "imgui:720", + "location": "imgui:738", "namespace": "ImGui", "ov_cimguiname": "igOpenPopup_Str", "ret": "void", @@ -28786,7 +29098,7 @@ "popup_flags": "0" }, "funcname": "OpenPopup", - "location": "imgui:721", + "location": "imgui:739", "namespace": "ImGui", "ov_cimguiname": "igOpenPopup_ID", "ret": "void", @@ -28814,7 +29126,7 @@ "popup_flags": "ImGuiPopupFlags_None" }, "funcname": "OpenPopupEx", - "location": "imgui_internal:3232", + "location": "imgui_internal:3370", "namespace": "ImGui", "ov_cimguiname": "igOpenPopupEx", "ret": "void", @@ -28844,7 +29156,7 @@ "str_id": "NULL" }, "funcname": "OpenPopupOnItemClick", - "location": "imgui:722", + "location": "imgui:740", "namespace": "ImGui", "ov_cimguiname": "igOpenPopupOnItemClick", "ret": "void", @@ -28904,7 +29216,7 @@ "cimguiname": "igPlotEx", "defaults": {}, "funcname": "PlotEx", - "location": "imgui_internal:3616", + "location": "imgui_internal:3766", "namespace": "ImGui", "ov_cimguiname": "igPlotEx", "ret": "int", @@ -28965,7 +29277,7 @@ "values_offset": "0" }, "funcname": "PlotHistogram", - "location": "imgui:656", + "location": "imgui:676", "namespace": "ImGui", "ov_cimguiname": "igPlotHistogram_FloatPtr", "ret": "void", @@ -29025,7 +29337,7 @@ "values_offset": "0" }, "funcname": "PlotHistogram", - "location": "imgui:657", + "location": "imgui:677", "namespace": "ImGui", "ov_cimguiname": "igPlotHistogram_FnFloatPtr", "ret": "void", @@ -29086,7 +29398,7 @@ "values_offset": "0" }, "funcname": "PlotLines", - "location": "imgui:654", + "location": "imgui:674", "namespace": "ImGui", "ov_cimguiname": "igPlotLines_FloatPtr", "ret": "void", @@ -29146,7 +29458,7 @@ "values_offset": "0" }, "funcname": "PlotLines", - "location": "imgui:655", + "location": "imgui:675", "namespace": "ImGui", "ov_cimguiname": "igPlotLines_FnFloatPtr", "ret": "void", @@ -29163,7 +29475,7 @@ "cimguiname": "igPopButtonRepeat", "defaults": {}, "funcname": "PopButtonRepeat", - "location": "imgui:425", + "location": "imgui:440", "namespace": "ImGui", "ov_cimguiname": "igPopButtonRepeat", "ret": "void", @@ -29180,7 +29492,7 @@ "cimguiname": "igPopClipRect", "defaults": {}, "funcname": "PopClipRect", - "location": "imgui:870", + "location": "imgui:887", "namespace": "ImGui", "ov_cimguiname": "igPopClipRect", "ret": "void", @@ -29197,7 +29509,7 @@ "cimguiname": "igPopColumnsBackground", "defaults": {}, "funcname": "PopColumnsBackground", - "location": "imgui_internal:3445", + "location": "imgui_internal:3593", "namespace": "ImGui", "ov_cimguiname": "igPopColumnsBackground", "ret": "void", @@ -29214,7 +29526,7 @@ "cimguiname": "igPopFocusScope", "defaults": {}, "funcname": "PopFocusScope", - "location": "imgui_internal:3423", + "location": "imgui_internal:3571", "namespace": "ImGui", "ov_cimguiname": "igPopFocusScope", "ret": "void", @@ -29231,7 +29543,7 @@ "cimguiname": "igPopFont", "defaults": {}, "funcname": "PopFont", - "location": "imgui:415", + "location": "imgui:430", "namespace": "ImGui", "ov_cimguiname": "igPopFont", "ret": "void", @@ -29249,7 +29561,7 @@ "comment": "// pop from the ID stack.", "defaults": {}, "funcname": "PopID", - "location": "imgui:491", + "location": "imgui:509", "namespace": "ImGui", "ov_cimguiname": "igPopID", "ret": "void", @@ -29266,7 +29578,7 @@ "cimguiname": "igPopItemFlag", "defaults": {}, "funcname": "PopItemFlag", - "location": "imgui_internal:3221", + "location": "imgui_internal:3359", "namespace": "ImGui", "ov_cimguiname": "igPopItemFlag", "ret": "void", @@ -29283,7 +29595,7 @@ "cimguiname": "igPopItemWidth", "defaults": {}, "funcname": "PopItemWidth", - "location": "imgui:429", + "location": "imgui:444", "namespace": "ImGui", "ov_cimguiname": "igPopItemWidth", "ret": "void", @@ -29307,7 +29619,7 @@ "count": "1" }, "funcname": "PopStyleColor", - "location": "imgui:418", + "location": "imgui:433", "namespace": "ImGui", "ov_cimguiname": "igPopStyleColor", "ret": "void", @@ -29331,7 +29643,7 @@ "count": "1" }, "funcname": "PopStyleVar", - "location": "imgui:421", + "location": "imgui:436", "namespace": "ImGui", "ov_cimguiname": "igPopStyleVar", "ret": "void", @@ -29348,7 +29660,7 @@ "cimguiname": "igPopTabStop", "defaults": {}, "funcname": "PopTabStop", - "location": "imgui:423", + "location": "imgui:438", "namespace": "ImGui", "ov_cimguiname": "igPopTabStop", "ret": "void", @@ -29365,7 +29677,7 @@ "cimguiname": "igPopTextWrapPos", "defaults": {}, "funcname": "PopTextWrapPos", - "location": "imgui:433", + "location": "imgui:448", "namespace": "ImGui", "ov_cimguiname": "igPopTextWrapPos", "ret": "void", @@ -29398,7 +29710,7 @@ "size_arg": "ImVec2(-FLT_MIN,0)" }, "funcname": "ProgressBar", - "location": "imgui:524", + "location": "imgui:542", "namespace": "ImGui", "ov_cimguiname": "igProgressBar", "ret": "void", @@ -29421,7 +29733,7 @@ "comment": "// 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.", "defaults": {}, "funcname": "PushButtonRepeat", - "location": "imgui:424", + "location": "imgui:439", "namespace": "ImGui", "ov_cimguiname": "igPushButtonRepeat", "ret": "void", @@ -29451,7 +29763,7 @@ "cimguiname": "igPushClipRect", "defaults": {}, "funcname": "PushClipRect", - "location": "imgui:869", + "location": "imgui:886", "namespace": "ImGui", "ov_cimguiname": "igPushClipRect", "ret": "void", @@ -29473,7 +29785,7 @@ "cimguiname": "igPushColumnClipRect", "defaults": {}, "funcname": "PushColumnClipRect", - "location": "imgui_internal:3443", + "location": "imgui_internal:3591", "namespace": "ImGui", "ov_cimguiname": "igPushColumnClipRect", "ret": "void", @@ -29490,7 +29802,7 @@ "cimguiname": "igPushColumnsBackground", "defaults": {}, "funcname": "PushColumnsBackground", - "location": "imgui_internal:3444", + "location": "imgui_internal:3592", "namespace": "ImGui", "ov_cimguiname": "igPushColumnsBackground", "ret": "void", @@ -29512,7 +29824,7 @@ "cimguiname": "igPushFocusScope", "defaults": {}, "funcname": "PushFocusScope", - "location": "imgui_internal:3422", + "location": "imgui_internal:3570", "namespace": "ImGui", "ov_cimguiname": "igPushFocusScope", "ret": "void", @@ -29535,7 +29847,7 @@ "comment": "// use NULL as a shortcut to push default font", "defaults": {}, "funcname": "PushFont", - "location": "imgui:414", + "location": "imgui:429", "namespace": "ImGui", "ov_cimguiname": "igPushFont", "ret": "void", @@ -29558,7 +29870,7 @@ "comment": "// push string into the ID stack (will hash string).", "defaults": {}, "funcname": "PushID", - "location": "imgui:487", + "location": "imgui:505", "namespace": "ImGui", "ov_cimguiname": "igPushID_Str", "ret": "void", @@ -29583,7 +29895,7 @@ "comment": "// push string into the ID stack (will hash string).", "defaults": {}, "funcname": "PushID", - "location": "imgui:488", + "location": "imgui:506", "namespace": "ImGui", "ov_cimguiname": "igPushID_StrStr", "ret": "void", @@ -29604,7 +29916,7 @@ "comment": "// push pointer into the ID stack (will hash pointer).", "defaults": {}, "funcname": "PushID", - "location": "imgui:489", + "location": "imgui:507", "namespace": "ImGui", "ov_cimguiname": "igPushID_Ptr", "ret": "void", @@ -29625,7 +29937,7 @@ "comment": "// push integer into the ID stack (will hash integer).", "defaults": {}, "funcname": "PushID", - "location": "imgui:490", + "location": "imgui:508", "namespace": "ImGui", "ov_cimguiname": "igPushID_Int", "ret": "void", @@ -29651,7 +29963,7 @@ "cimguiname": "igPushItemFlag", "defaults": {}, "funcname": "PushItemFlag", - "location": "imgui_internal:3220", + "location": "imgui_internal:3358", "namespace": "ImGui", "ov_cimguiname": "igPushItemFlag", "ret": "void", @@ -29674,7 +29986,7 @@ "comment": "// 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).", "defaults": {}, "funcname": "PushItemWidth", - "location": "imgui:428", + "location": "imgui:443", "namespace": "ImGui", "ov_cimguiname": "igPushItemWidth", "ret": "void", @@ -29700,7 +30012,7 @@ "cimguiname": "igPushMultiItemsWidths", "defaults": {}, "funcname": "PushMultiItemsWidths", - "location": "imgui_internal:3214", + "location": "imgui_internal:3352", "namespace": "ImGui", "ov_cimguiname": "igPushMultiItemsWidths", "ret": "void", @@ -29723,7 +30035,7 @@ "comment": "// Push given value as-is at the top of the ID stack (whereas PushID combines old and new hashes)", "defaults": {}, "funcname": "PushOverrideID", - "location": "imgui_internal:3200", + "location": "imgui_internal:3338", "namespace": "ImGui", "ov_cimguiname": "igPushOverrideID", "ret": "void", @@ -29750,7 +30062,7 @@ "comment": "// modify a style color. always use this if you modify the style after NewFrame().", "defaults": {}, "funcname": "PushStyleColor", - "location": "imgui:416", + "location": "imgui:431", "namespace": "ImGui", "ov_cimguiname": "igPushStyleColor_U32", "ret": "void", @@ -29774,7 +30086,7 @@ "cimguiname": "igPushStyleColor", "defaults": {}, "funcname": "PushStyleColor", - "location": "imgui:417", + "location": "imgui:432", "namespace": "ImGui", "ov_cimguiname": "igPushStyleColor_Vec4", "ret": "void", @@ -29801,7 +30113,7 @@ "comment": "// modify a style float variable. always use this if you modify the style after NewFrame().", "defaults": {}, "funcname": "PushStyleVar", - "location": "imgui:419", + "location": "imgui:434", "namespace": "ImGui", "ov_cimguiname": "igPushStyleVar_Float", "ret": "void", @@ -29826,7 +30138,7 @@ "comment": "// modify a style ImVec2 variable. always use this if you modify the style after NewFrame().", "defaults": {}, "funcname": "PushStyleVar", - "location": "imgui:420", + "location": "imgui:435", "namespace": "ImGui", "ov_cimguiname": "igPushStyleVar_Vec2", "ret": "void", @@ -29849,7 +30161,7 @@ "comment": "// == tab stop enable. Allow focusing using TAB/Shift-TAB, enabled by default but you can disable it for certain widgets", "defaults": {}, "funcname": "PushTabStop", - "location": "imgui:422", + "location": "imgui:437", "namespace": "ImGui", "ov_cimguiname": "igPushTabStop", "ret": "void", @@ -29874,7 +30186,7 @@ "wrap_local_pos_x": "0.0f" }, "funcname": "PushTextWrapPos", - "location": "imgui:432", + "location": "imgui:447", "namespace": "ImGui", "ov_cimguiname": "igPushTextWrapPos", "ret": "void", @@ -29901,7 +30213,7 @@ "comment": "// use with e.g. if (RadioButton(\"one\", my_value==1)) my_value = 1; ", "defaults": {}, "funcname": "RadioButton", - "location": "imgui:522", + "location": "imgui:540", "namespace": "ImGui", "ov_cimguiname": "igRadioButton_Bool", "ret": "bool", @@ -29930,7 +30242,7 @@ "comment": "// shortcut to handle the above pattern when value is an integer", "defaults": {}, "funcname": "RadioButton", - "location": "imgui:523", + "location": "imgui:541", "namespace": "ImGui", "ov_cimguiname": "igRadioButton_IntPtr", "ret": "bool", @@ -29956,7 +30268,7 @@ "cimguiname": "igRemoveContextHook", "defaults": {}, "funcname": "RemoveContextHook", - "location": "imgui_internal:3144", + "location": "imgui_internal:3282", "namespace": "ImGui", "ov_cimguiname": "igRemoveContextHook", "ret": "void", @@ -29978,7 +30290,7 @@ "cimguiname": "igRemoveSettingsHandler", "defaults": {}, "funcname": "RemoveSettingsHandler", - "location": "imgui_internal:3161", + "location": "imgui_internal:3299", "namespace": "ImGui", "ov_cimguiname": "igRemoveSettingsHandler", "ret": "void", @@ -29996,7 +30308,7 @@ "comment": "// ends the Dear ImGui frame, finalize the draw data. You can then get call GetDrawData().", "defaults": {}, "funcname": "Render", - "location": "imgui:309", + "location": "imgui:314", "namespace": "ImGui", "ov_cimguiname": "igRender", "ret": "void", @@ -30036,7 +30348,7 @@ "scale": "1.0f" }, "funcname": "RenderArrow", - "location": "imgui_internal:3544", + "location": "imgui_internal:3694", "namespace": "ImGui", "ov_cimguiname": "igRenderArrow", "ret": "void", @@ -30070,7 +30382,7 @@ "cimguiname": "igRenderArrowDockMenu", "defaults": {}, "funcname": "RenderArrowDockMenu", - "location": "imgui_internal:3548", + "location": "imgui_internal:3698", "namespace": "ImGui", "ov_cimguiname": "igRenderArrowDockMenu", "ret": "void", @@ -30108,7 +30420,7 @@ "cimguiname": "igRenderArrowPointingAt", "defaults": {}, "funcname": "RenderArrowPointingAt", - "location": "imgui_internal:3547", + "location": "imgui_internal:3697", "namespace": "ImGui", "ov_cimguiname": "igRenderArrowPointingAt", "ret": "void", @@ -30138,7 +30450,7 @@ "cimguiname": "igRenderBullet", "defaults": {}, "funcname": "RenderBullet", - "location": "imgui_internal:3545", + "location": "imgui_internal:3695", "namespace": "ImGui", "ov_cimguiname": "igRenderBullet", "ret": "void", @@ -30172,7 +30484,7 @@ "cimguiname": "igRenderCheckMark", "defaults": {}, "funcname": "RenderCheckMark", - "location": "imgui_internal:3546", + "location": "imgui_internal:3696", "namespace": "ImGui", "ov_cimguiname": "igRenderCheckMark", "ret": "void", @@ -30225,7 +30537,7 @@ "rounding": "0.0f" }, "funcname": "RenderColorRectWithAlphaCheckerboard", - "location": "imgui_internal:3538", + "location": "imgui_internal:3688", "namespace": "ImGui", "ov_cimguiname": "igRenderColorRectWithAlphaCheckerboard", "ret": "void", @@ -30235,23 +30547,27 @@ ], "igRenderDragDropTargetRect": [ { - "args": "(const ImRect bb)", + "args": "(const ImRect bb,const ImRect item_clip_rect)", "argsT": [ { "name": "bb", "type": "const ImRect" + }, + { + "name": "item_clip_rect", + "type": "const ImRect" } ], - "argsoriginal": "(const ImRect& bb)", - "call_args": "(bb)", + "argsoriginal": "(const ImRect& bb,const ImRect& item_clip_rect)", + "call_args": "(bb,item_clip_rect)", "cimguiname": "igRenderDragDropTargetRect", "defaults": {}, "funcname": "RenderDragDropTargetRect", - "location": "imgui_internal:3431", + "location": "imgui_internal:3579", "namespace": "ImGui", "ov_cimguiname": "igRenderDragDropTargetRect", "ret": "void", - "signature": "(const ImRect)", + "signature": "(const ImRect,const ImRect)", "stname": "" } ], @@ -30288,7 +30604,7 @@ "rounding": "0.0f" }, "funcname": "RenderFrame", - "location": "imgui_internal:3536", + "location": "imgui_internal:3686", "namespace": "ImGui", "ov_cimguiname": "igRenderFrame", "ret": "void", @@ -30320,7 +30636,7 @@ "rounding": "0.0f" }, "funcname": "RenderFrameBorder", - "location": "imgui_internal:3537", + "location": "imgui_internal:3687", "namespace": "ImGui", "ov_cimguiname": "igRenderFrameBorder", "ret": "void", @@ -30362,7 +30678,7 @@ "cimguiname": "igRenderMouseCursor", "defaults": {}, "funcname": "RenderMouseCursor", - "location": "imgui_internal:3541", + "location": "imgui_internal:3691", "namespace": "ImGui", "ov_cimguiname": "igRenderMouseCursor", "ret": "void", @@ -30387,15 +30703,15 @@ "type": "ImGuiNavHighlightFlags" } ], - "argsoriginal": "(const ImRect& bb,ImGuiID id,ImGuiNavHighlightFlags flags=ImGuiNavHighlightFlags_TypeDefault)", + "argsoriginal": "(const ImRect& bb,ImGuiID id,ImGuiNavHighlightFlags flags=ImGuiNavHighlightFlags_None)", "call_args": "(bb,id,flags)", "cimguiname": "igRenderNavHighlight", "comment": "// Navigation highlight", "defaults": { - "flags": "ImGuiNavHighlightFlags_TypeDefault" + "flags": "ImGuiNavHighlightFlags_None" }, "funcname": "RenderNavHighlight", - "location": "imgui_internal:3539", + "location": "imgui_internal:3689", "namespace": "ImGui", "ov_cimguiname": "igRenderNavHighlight", "ret": "void", @@ -30425,7 +30741,7 @@ "renderer_render_arg": "NULL" }, "funcname": "RenderPlatformWindowsDefault", - "location": "imgui:999", + "location": "imgui:1018", "namespace": "ImGui", "ov_cimguiname": "igRenderPlatformWindowsDefault", "ret": "void", @@ -30467,7 +30783,7 @@ "cimguiname": "igRenderRectFilledRangeH", "defaults": {}, "funcname": "RenderRectFilledRangeH", - "location": "imgui_internal:3549", + "location": "imgui_internal:3699", "namespace": "ImGui", "ov_cimguiname": "igRenderRectFilledRangeH", "ret": "void", @@ -30505,7 +30821,7 @@ "cimguiname": "igRenderRectFilledWithHole", "defaults": {}, "funcname": "RenderRectFilledWithHole", - "location": "imgui_internal:3550", + "location": "imgui_internal:3700", "namespace": "ImGui", "ov_cimguiname": "igRenderRectFilledWithHole", "ret": "void", @@ -30542,7 +30858,7 @@ "text_end": "NULL" }, "funcname": "RenderText", - "location": "imgui_internal:3531", + "location": "imgui_internal:3681", "namespace": "ImGui", "ov_cimguiname": "igRenderText", "ret": "void", @@ -30591,7 +30907,7 @@ "clip_rect": "NULL" }, "funcname": "RenderTextClipped", - "location": "imgui_internal:3533", + "location": "imgui_internal:3683", "namespace": "ImGui", "ov_cimguiname": "igRenderTextClipped", "ret": "void", @@ -30644,7 +30960,7 @@ "clip_rect": "NULL" }, "funcname": "RenderTextClippedEx", - "location": "imgui_internal:3534", + "location": "imgui_internal:3684", "namespace": "ImGui", "ov_cimguiname": "igRenderTextClippedEx", "ret": "void", @@ -30694,7 +31010,7 @@ "cimguiname": "igRenderTextEllipsis", "defaults": {}, "funcname": "RenderTextEllipsis", - "location": "imgui_internal:3535", + "location": "imgui_internal:3685", "namespace": "ImGui", "ov_cimguiname": "igRenderTextEllipsis", "ret": "void", @@ -30728,7 +31044,7 @@ "cimguiname": "igRenderTextWrapped", "defaults": {}, "funcname": "RenderTextWrapped", - "location": "imgui_internal:3532", + "location": "imgui_internal:3682", "namespace": "ImGui", "ov_cimguiname": "igRenderTextWrapped", "ret": "void", @@ -30753,7 +31069,7 @@ "button": "0" }, "funcname": "ResetMouseDragDelta", - "location": "imgui:962", + "location": "imgui:978", "namespace": "ImGui", "ov_cimguiname": "igResetMouseDragDelta", "ret": "void", @@ -30783,7 +31099,7 @@ "spacing": "-1.0f" }, "funcname": "SameLine", - "location": "imgui:453", + "location": "imgui:480", "namespace": "ImGui", "ov_cimguiname": "igSameLine", "ret": "void", @@ -30806,7 +31122,7 @@ "comment": "// this is automatically called (if io.IniFilename is not empty) a few seconds after any modification that should be reflected in the .ini file (and also by DestroyContext).", "defaults": {}, "funcname": "SaveIniSettingsToDisk", - "location": "imgui:978", + "location": "imgui:994", "namespace": "ImGui", "ov_cimguiname": "igSaveIniSettingsToDisk", "ret": "void", @@ -30831,7 +31147,7 @@ "out_ini_size": "NULL" }, "funcname": "SaveIniSettingsToMemory", - "location": "imgui:979", + "location": "imgui:995", "namespace": "ImGui", "ov_cimguiname": "igSaveIniSettingsToMemory", "ret": "const char*", @@ -30857,7 +31173,7 @@ "cimguiname": "igScaleWindowsInViewport", "defaults": {}, "funcname": "ScaleWindowsInViewport", - "location": "imgui_internal:3149", + "location": "imgui_internal:3287", "namespace": "ImGui", "ov_cimguiname": "igScaleWindowsInViewport", "ret": "void", @@ -30883,7 +31199,7 @@ "cimguiname": "igScrollToBringRectIntoView", "defaults": {}, "funcname": "ScrollToBringRectIntoView", - "location": "imgui_internal:3185", + "location": "imgui_internal:3323", "namespace": "ImGui", "ov_cimguiname": "igScrollToBringRectIntoView", "ret": "void", @@ -30907,7 +31223,7 @@ "flags": "0" }, "funcname": "ScrollToItem", - "location": "imgui_internal:3181", + "location": "imgui_internal:3319", "namespace": "ImGui", "ov_cimguiname": "igScrollToItem", "ret": "void", @@ -30939,7 +31255,7 @@ "flags": "0" }, "funcname": "ScrollToRect", - "location": "imgui_internal:3182", + "location": "imgui_internal:3320", "namespace": "ImGui", "ov_cimguiname": "igScrollToRect", "ret": "void", @@ -30975,7 +31291,7 @@ "flags": "0" }, "funcname": "ScrollToRectEx", - "location": "imgui_internal:3183", + "location": "imgui_internal:3321", "namespace": "ImGui", "nonUDT": 1, "ov_cimguiname": "igScrollToRectEx", @@ -30998,7 +31314,7 @@ "cimguiname": "igScrollbar", "defaults": {}, "funcname": "Scrollbar", - "location": "imgui_internal:3566", + "location": "imgui_internal:3716", "namespace": "ImGui", "ov_cimguiname": "igScrollbar", "ret": "void", @@ -31044,7 +31360,7 @@ "cimguiname": "igScrollbarEx", "defaults": {}, "funcname": "ScrollbarEx", - "location": "imgui_internal:3567", + "location": "imgui_internal:3717", "namespace": "ImGui", "ov_cimguiname": "igScrollbarEx", "ret": "bool", @@ -31083,7 +31399,7 @@ "size": "ImVec2(0,0)" }, "funcname": "Selectable", - "location": "imgui:638", + "location": "imgui:658", "namespace": "ImGui", "ov_cimguiname": "igSelectable_Bool", "ret": "bool", @@ -31119,7 +31435,7 @@ "size": "ImVec2(0,0)" }, "funcname": "Selectable", - "location": "imgui:639", + "location": "imgui:659", "namespace": "ImGui", "ov_cimguiname": "igSelectable_BoolPtr", "ret": "bool", @@ -31137,7 +31453,7 @@ "comment": "// separator, generally horizontal. inside a menu bar or in horizontal layout mode, this becomes a vertical separator.", "defaults": {}, "funcname": "Separator", - "location": "imgui:452", + "location": "imgui:479", "namespace": "ImGui", "ov_cimguiname": "igSeparator", "ret": "void", @@ -31165,7 +31481,7 @@ "thickness": "1.0f" }, "funcname": "SeparatorEx", - "location": "imgui_internal:3558", + "location": "imgui_internal:3708", "namespace": "ImGui", "ov_cimguiname": "igSeparatorEx", "ret": "void", @@ -31188,7 +31504,7 @@ "comment": "// currently: formatted text with an horizontal line", "defaults": {}, "funcname": "SeparatorText", - "location": "imgui:510", + "location": "imgui:528", "namespace": "ImGui", "ov_cimguiname": "igSeparatorText", "ret": "void", @@ -31222,7 +31538,7 @@ "cimguiname": "igSeparatorTextEx", "defaults": {}, "funcname": "SeparatorTextEx", - "location": "imgui_internal:3559", + "location": "imgui_internal:3709", "namespace": "ImGui", "ov_cimguiname": "igSeparatorTextEx", "ret": "void", @@ -31248,7 +31564,7 @@ "cimguiname": "igSetActiveID", "defaults": {}, "funcname": "SetActiveID", - "location": "imgui_internal:3193", + "location": "imgui_internal:3331", "namespace": "ImGui", "ov_cimguiname": "igSetActiveID", "ret": "void", @@ -31265,7 +31581,7 @@ "cimguiname": "igSetActiveIdUsingAllKeyboardKeys", "defaults": {}, "funcname": "SetActiveIdUsingAllKeyboardKeys", - "location": "imgui_internal:3310", + "location": "imgui_internal:3452", "namespace": "ImGui", "ov_cimguiname": "igSetActiveIdUsingAllKeyboardKeys", "ret": "void", @@ -31297,7 +31613,7 @@ "user_data": "NULL" }, "funcname": "SetAllocatorFunctions", - "location": "imgui:989", + "location": "imgui:1008", "namespace": "ImGui", "ov_cimguiname": "igSetAllocatorFunctions", "ret": "void", @@ -31319,7 +31635,7 @@ "cimguiname": "igSetClipboardText", "defaults": {}, "funcname": "SetClipboardText", - "location": "imgui:970", + "location": "imgui:986", "namespace": "ImGui", "ov_cimguiname": "igSetClipboardText", "ret": "void", @@ -31342,7 +31658,7 @@ "comment": "// initialize current options (generally on application startup) if you want to select a default format, picker type, etc. User will be able to change many settings, unless you pass the _NoOptions flag to your calls.", "defaults": {}, "funcname": "SetColorEditOptions", - "location": "imgui:613", + "location": "imgui:633", "namespace": "ImGui", "ov_cimguiname": "igSetColorEditOptions", "ret": "void", @@ -31369,7 +31685,7 @@ "comment": "// set position of column line (in pixels, from the left side of the contents region). pass -1 to use current column", "defaults": {}, "funcname": "SetColumnOffset", - "location": "imgui:805", + "location": "imgui:822", "namespace": "ImGui", "ov_cimguiname": "igSetColumnOffset", "ret": "void", @@ -31396,7 +31712,7 @@ "comment": "// set column width (in pixels). pass -1 to use current column", "defaults": {}, "funcname": "SetColumnWidth", - "location": "imgui:803", + "location": "imgui:820", "namespace": "ImGui", "ov_cimguiname": "igSetColumnWidth", "ret": "void", @@ -31418,7 +31734,7 @@ "cimguiname": "igSetCurrentContext", "defaults": {}, "funcname": "SetCurrentContext", - "location": "imgui:302", + "location": "imgui:307", "namespace": "ImGui", "ov_cimguiname": "igSetCurrentContext", "ret": "void", @@ -31440,7 +31756,7 @@ "cimguiname": "igSetCurrentFont", "defaults": {}, "funcname": "SetCurrentFont", - "location": "imgui_internal:3125", + "location": "imgui_internal:3263", "namespace": "ImGui", "ov_cimguiname": "igSetCurrentFont", "ret": "void", @@ -31466,7 +31782,7 @@ "cimguiname": "igSetCurrentViewport", "defaults": {}, "funcname": "SetCurrentViewport", - "location": "imgui_internal:3152", + "location": "imgui_internal:3290", "namespace": "ImGui", "ov_cimguiname": "igSetCurrentViewport", "ret": "void", @@ -31486,10 +31802,10 @@ "argsoriginal": "(const ImVec2& local_pos)", "call_args": "(local_pos)", "cimguiname": "igSetCursorPos", - "comment": "// are using the main, absolute coordinate system.", + "comment": "// [window-local] \"", "defaults": {}, "funcname": "SetCursorPos", - "location": "imgui:464", + "location": "imgui:473", "namespace": "ImGui", "ov_cimguiname": "igSetCursorPos", "ret": "void", @@ -31509,10 +31825,10 @@ "argsoriginal": "(float local_x)", "call_args": "(local_x)", "cimguiname": "igSetCursorPosX", - "comment": "// GetWindowPos() + GetCursorPos() == GetCursorScreenPos() etc.)", + "comment": "// [window-local] \"", "defaults": {}, "funcname": "SetCursorPosX", - "location": "imgui:465", + "location": "imgui:474", "namespace": "ImGui", "ov_cimguiname": "igSetCursorPosX", "ret": "void", @@ -31532,10 +31848,10 @@ "argsoriginal": "(float local_y)", "call_args": "(local_y)", "cimguiname": "igSetCursorPosY", - "comment": "//", + "comment": "// [window-local] \"", "defaults": {}, "funcname": "SetCursorPosY", - "location": "imgui:466", + "location": "imgui:475", "namespace": "ImGui", "ov_cimguiname": "igSetCursorPosY", "ret": "void", @@ -31595,7 +31911,7 @@ "cond": "0" }, "funcname": "SetDragDropPayload", - "location": "imgui:853", + "location": "imgui:870", "namespace": "ImGui", "ov_cimguiname": "igSetDragDropPayload", "ret": "bool", @@ -31621,7 +31937,7 @@ "cimguiname": "igSetFocusID", "defaults": {}, "funcname": "SetFocusID", - "location": "imgui_internal:3194", + "location": "imgui_internal:3332", "namespace": "ImGui", "ov_cimguiname": "igSetFocusID", "ret": "void", @@ -31643,7 +31959,7 @@ "cimguiname": "igSetHoveredID", "defaults": {}, "funcname": "SetHoveredID", - "location": "imgui_internal:3197", + "location": "imgui_internal:3335", "namespace": "ImGui", "ov_cimguiname": "igSetHoveredID", "ret": "void", @@ -31661,7 +31977,7 @@ "comment": "// make last item the default focused item of a window.", "defaults": {}, "funcname": "SetItemDefaultFocus", - "location": "imgui:874", + "location": "imgui:891", "namespace": "ImGui", "ov_cimguiname": "igSetItemDefaultFocus", "ret": "void", @@ -31690,7 +32006,7 @@ "flags": "0" }, "funcname": "SetItemKeyOwner", - "location": "imgui_internal:3327", + "location": "imgui_internal:3469", "namespace": "ImGui", "ov_cimguiname": "igSetItemKeyOwner", "ret": "void", @@ -31718,7 +32034,7 @@ "defaults": {}, "funcname": "SetItemTooltip", "isvararg": "...)", - "location": "imgui:693", + "location": "imgui:713", "namespace": "ImGui", "ov_cimguiname": "igSetItemTooltip", "ret": "void", @@ -31744,7 +32060,7 @@ "cimguiname": "igSetItemTooltipV", "defaults": {}, "funcname": "SetItemTooltipV", - "location": "imgui:694", + "location": "imgui:714", "namespace": "ImGui", "ov_cimguiname": "igSetItemTooltipV", "ret": "void", @@ -31776,7 +32092,7 @@ "flags": "0" }, "funcname": "SetKeyOwner", - "location": "imgui_internal:3325", + "location": "imgui_internal:3467", "namespace": "ImGui", "ov_cimguiname": "igSetKeyOwner", "ret": "void", @@ -31808,7 +32124,7 @@ "flags": "0" }, "funcname": "SetKeyOwnersForKeyChord", - "location": "imgui_internal:3326", + "location": "imgui_internal:3468", "namespace": "ImGui", "ov_cimguiname": "igSetKeyOwnersForKeyChord", "ret": "void", @@ -31833,7 +32149,7 @@ "offset": "0" }, "funcname": "SetKeyboardFocusHere", - "location": "imgui:875", + "location": "imgui:892", "namespace": "ImGui", "ov_cimguiname": "igSetKeyboardFocusHere", "ret": "void", @@ -31867,7 +32183,7 @@ "cimguiname": "igSetLastItemData", "defaults": {}, "funcname": "SetLastItemData", - "location": "imgui_internal:3211", + "location": "imgui_internal:3349", "namespace": "ImGui", "ov_cimguiname": "igSetLastItemData", "ret": "void", @@ -31890,7 +32206,7 @@ "comment": "// set desired mouse cursor shape", "defaults": {}, "funcname": "SetMouseCursor", - "location": "imgui:964", + "location": "imgui:980", "namespace": "ImGui", "ov_cimguiname": "igSetMouseCursor", "ret": "void", @@ -31898,6 +32214,28 @@ "stname": "" } ], + "igSetNavFocusScope": [ + { + "args": "(ImGuiID focus_scope_id)", + "argsT": [ + { + "name": "focus_scope_id", + "type": "ImGuiID" + } + ], + "argsoriginal": "(ImGuiID focus_scope_id)", + "call_args": "(focus_scope_id)", + "cimguiname": "igSetNavFocusScope", + "defaults": {}, + "funcname": "SetNavFocusScope", + "location": "imgui_internal:3412", + "namespace": "ImGui", + "ov_cimguiname": "igSetNavFocusScope", + "ret": "void", + "signature": "(ImGuiID)", + "stname": "" + } + ], "igSetNavID": [ { "args": "(ImGuiID id,ImGuiNavLayer nav_layer,ImGuiID focus_scope_id,const ImRect rect_rel)", @@ -31924,7 +32262,7 @@ "cimguiname": "igSetNavID", "defaults": {}, "funcname": "SetNavID", - "location": "imgui_internal:3271", + "location": "imgui_internal:3411", "namespace": "ImGui", "ov_cimguiname": "igSetNavID", "ret": "void", @@ -31946,7 +32284,7 @@ "cimguiname": "igSetNavWindow", "defaults": {}, "funcname": "SetNavWindow", - "location": "imgui_internal:3270", + "location": "imgui_internal:3410", "namespace": "ImGui", "ov_cimguiname": "igSetNavWindow", "ret": "void", @@ -31969,7 +32307,7 @@ "comment": "// Override io.WantCaptureKeyboard flag next frame (said flag is left for your application to handle, typically when true it instructs your app to ignore inputs). e.g. force capture keyboard when your widget is being hovered. This is equivalent to setting \"io.WantCaptureKeyboard = want_capture_keyboard\"; after the next NewFrame() call.", "defaults": {}, "funcname": "SetNextFrameWantCaptureKeyboard", - "location": "imgui:944", + "location": "imgui:960", "namespace": "ImGui", "ov_cimguiname": "igSetNextFrameWantCaptureKeyboard", "ret": "void", @@ -31992,7 +32330,7 @@ "comment": "// Override io.WantCaptureMouse flag next frame (said flag is left for your application to handle, typical when true it instucts your app to ignore inputs). This is equivalent to setting \"io.WantCaptureMouse = want_capture_mouse;\" after the next NewFrame() call.", "defaults": {}, "funcname": "SetNextFrameWantCaptureMouse", - "location": "imgui:965", + "location": "imgui:981", "namespace": "ImGui", "ov_cimguiname": "igSetNextFrameWantCaptureMouse", "ret": "void", @@ -32010,7 +32348,7 @@ "comment": "// allow next item to be overlapped by a subsequent item. Useful with invisible buttons, selectable, treenode covering an area where subsequent items may need to be added. Note that both Selectable() and TreeNode() have dedicated flags doing this.", "defaults": {}, "funcname": "SetNextItemAllowOverlap", - "location": "imgui:878", + "location": "imgui:895", "namespace": "ImGui", "ov_cimguiname": "igSetNextItemAllowOverlap", "ret": "void", @@ -32039,7 +32377,7 @@ "cond": "0" }, "funcname": "SetNextItemOpen", - "location": "imgui:633", + "location": "imgui:653", "namespace": "ImGui", "ov_cimguiname": "igSetNextItemOpen", "ret": "void", @@ -32061,7 +32399,7 @@ "cimguiname": "igSetNextItemSelectionUserData", "defaults": {}, "funcname": "SetNextItemSelectionUserData", - "location": "imgui_internal:3582", + "location": "imgui_internal:3732", "namespace": "ImGui", "ov_cimguiname": "igSetNextItemSelectionUserData", "ret": "void", @@ -32069,6 +32407,28 @@ "stname": "" } ], + "igSetNextItemShortcut": [ + { + "args": "(ImGuiKeyChord key_chord)", + "argsT": [ + { + "name": "key_chord", + "type": "ImGuiKeyChord" + } + ], + "argsoriginal": "(ImGuiKeyChord key_chord)", + "call_args": "(key_chord)", + "cimguiname": "igSetNextItemShortcut", + "defaults": {}, + "funcname": "SetNextItemShortcut", + "location": "imgui_internal:3501", + "namespace": "ImGui", + "ov_cimguiname": "igSetNextItemShortcut", + "ret": "void", + "signature": "(ImGuiKeyChord)", + "stname": "" + } + ], "igSetNextItemWidth": [ { "args": "(float item_width)", @@ -32084,7 +32444,7 @@ "comment": "// set width of the _next_ common large \"item+label\" widget. >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)", "defaults": {}, "funcname": "SetNextItemWidth", - "location": "imgui:430", + "location": "imgui:445", "namespace": "ImGui", "ov_cimguiname": "igSetNextItemWidth", "ret": "void", @@ -32107,7 +32467,7 @@ "comment": "// set next window background color alpha. helper to easily override the Alpha component of ImGuiCol_WindowBg/ChildBg/PopupBg. you may also use ImGuiWindowFlags_NoBackground.", "defaults": {}, "funcname": "SetNextWindowBgAlpha", - "location": "imgui:379", + "location": "imgui:394", "namespace": "ImGui", "ov_cimguiname": "igSetNextWindowBgAlpha", "ret": "void", @@ -32130,7 +32490,7 @@ "comment": "// set next window class (control docking compatibility + provide hints to platform backend via custom viewport flags and platform parent/child relationship)", "defaults": {}, "funcname": "SetNextWindowClass", - "location": "imgui:833", + "location": "imgui:850", "namespace": "ImGui", "ov_cimguiname": "igSetNextWindowClass", "ret": "void", @@ -32159,7 +32519,7 @@ "cond": "0" }, "funcname": "SetNextWindowCollapsed", - "location": "imgui:376", + "location": "imgui:391", "namespace": "ImGui", "ov_cimguiname": "igSetNextWindowCollapsed", "ret": "void", @@ -32182,7 +32542,7 @@ "comment": "// set next window content size (~ scrollable client area, which enforce the range of scrollbars). Not including window decorations (title bar, menu bar, etc.) nor WindowPadding. set an axis to 0.0f to leave it automatic. call before Begin()", "defaults": {}, "funcname": "SetNextWindowContentSize", - "location": "imgui:375", + "location": "imgui:390", "namespace": "ImGui", "ov_cimguiname": "igSetNextWindowContentSize", "ret": "void", @@ -32211,7 +32571,7 @@ "cond": "0" }, "funcname": "SetNextWindowDockID", - "location": "imgui:832", + "location": "imgui:849", "namespace": "ImGui", "ov_cimguiname": "igSetNextWindowDockID", "ret": "void", @@ -32229,7 +32589,7 @@ "comment": "// set next window to be focused / top-most. call before Begin()", "defaults": {}, "funcname": "SetNextWindowFocus", - "location": "imgui:377", + "location": "imgui:392", "namespace": "ImGui", "ov_cimguiname": "igSetNextWindowFocus", "ret": "void", @@ -32263,7 +32623,7 @@ "pivot": "ImVec2(0,0)" }, "funcname": "SetNextWindowPos", - "location": "imgui:372", + "location": "imgui:387", "namespace": "ImGui", "ov_cimguiname": "igSetNextWindowPos", "ret": "void", @@ -32286,7 +32646,7 @@ "comment": "// set next window scrolling value (use < 0.0f to not affect a given axis).", "defaults": {}, "funcname": "SetNextWindowScroll", - "location": "imgui:378", + "location": "imgui:393", "namespace": "ImGui", "ov_cimguiname": "igSetNextWindowScroll", "ret": "void", @@ -32315,7 +32675,7 @@ "cond": "0" }, "funcname": "SetNextWindowSize", - "location": "imgui:373", + "location": "imgui:388", "namespace": "ImGui", "ov_cimguiname": "igSetNextWindowSize", "ret": "void", @@ -32347,13 +32707,13 @@ "argsoriginal": "(const ImVec2& size_min,const ImVec2& size_max,ImGuiSizeCallback custom_callback=((void*)0),void* custom_callback_data=((void*)0))", "call_args": "(size_min,size_max,custom_callback,custom_callback_data)", "cimguiname": "igSetNextWindowSizeConstraints", - "comment": "// set next window size limits. use -1,-1 on either X/Y axis to preserve the current size. Sizes will be rounded down. Use callback to apply non-trivial programmatic constraints.", + "comment": "// set next window size limits. use 0.0f or FLT_MAX if you don't want limits. Use -1 for both min and max of same axis to preserve current size (which itself is a constraint). Use callback to apply non-trivial programmatic constraints.", "defaults": { "custom_callback": "NULL", "custom_callback_data": "NULL" }, "funcname": "SetNextWindowSizeConstraints", - "location": "imgui:374", + "location": "imgui:389", "namespace": "ImGui", "ov_cimguiname": "igSetNextWindowSizeConstraints", "ret": "void", @@ -32376,7 +32736,7 @@ "comment": "// set next window viewport", "defaults": {}, "funcname": "SetNextWindowViewport", - "location": "imgui:380", + "location": "imgui:395", "namespace": "ImGui", "ov_cimguiname": "igSetNextWindowViewport", "ret": "void", @@ -32405,7 +32765,7 @@ "center_x_ratio": "0.5f" }, "funcname": "SetScrollFromPosX", - "location": "imgui:410", + "location": "imgui:425", "namespace": "ImGui", "ov_cimguiname": "igSetScrollFromPosX_Float", "ret": "void", @@ -32433,7 +32793,7 @@ "cimguiname": "igSetScrollFromPosX", "defaults": {}, "funcname": "SetScrollFromPosX", - "location": "imgui_internal:3177", + "location": "imgui_internal:3315", "namespace": "ImGui", "ov_cimguiname": "igSetScrollFromPosX_WindowPtr", "ret": "void", @@ -32462,7 +32822,7 @@ "center_y_ratio": "0.5f" }, "funcname": "SetScrollFromPosY", - "location": "imgui:411", + "location": "imgui:426", "namespace": "ImGui", "ov_cimguiname": "igSetScrollFromPosY_Float", "ret": "void", @@ -32490,7 +32850,7 @@ "cimguiname": "igSetScrollFromPosY", "defaults": {}, "funcname": "SetScrollFromPosY", - "location": "imgui_internal:3178", + "location": "imgui_internal:3316", "namespace": "ImGui", "ov_cimguiname": "igSetScrollFromPosY_WindowPtr", "ret": "void", @@ -32515,7 +32875,7 @@ "center_x_ratio": "0.5f" }, "funcname": "SetScrollHereX", - "location": "imgui:408", + "location": "imgui:423", "namespace": "ImGui", "ov_cimguiname": "igSetScrollHereX", "ret": "void", @@ -32540,7 +32900,7 @@ "center_y_ratio": "0.5f" }, "funcname": "SetScrollHereY", - "location": "imgui:409", + "location": "imgui:424", "namespace": "ImGui", "ov_cimguiname": "igSetScrollHereY", "ret": "void", @@ -32563,7 +32923,7 @@ "comment": "// set scrolling amount [0 .. GetScrollMaxX()]", "defaults": {}, "funcname": "SetScrollX", - "location": "imgui:404", + "location": "imgui:419", "namespace": "ImGui", "ov_cimguiname": "igSetScrollX_Float", "ret": "void", @@ -32587,7 +32947,7 @@ "cimguiname": "igSetScrollX", "defaults": {}, "funcname": "SetScrollX", - "location": "imgui_internal:3175", + "location": "imgui_internal:3313", "namespace": "ImGui", "ov_cimguiname": "igSetScrollX_WindowPtr", "ret": "void", @@ -32610,7 +32970,7 @@ "comment": "// set scrolling amount [0 .. GetScrollMaxY()]", "defaults": {}, "funcname": "SetScrollY", - "location": "imgui:405", + "location": "imgui:420", "namespace": "ImGui", "ov_cimguiname": "igSetScrollY_Float", "ret": "void", @@ -32634,7 +32994,7 @@ "cimguiname": "igSetScrollY", "defaults": {}, "funcname": "SetScrollY", - "location": "imgui_internal:3176", + "location": "imgui_internal:3314", "namespace": "ImGui", "ov_cimguiname": "igSetScrollY_WindowPtr", "ret": "void", @@ -32659,15 +33019,15 @@ "type": "ImGuiInputFlags" } ], - "argsoriginal": "(ImGuiKeyChord key_chord,ImGuiID owner_id=0,ImGuiInputFlags flags=0)", + "argsoriginal": "(ImGuiKeyChord key_chord,ImGuiID owner_id,ImGuiInputFlags flags=0)", "call_args": "(key_chord,owner_id,flags)", "cimguiname": "igSetShortcutRouting", + "comment": "// owner_id needs to be explicit and cannot be 0", "defaults": { - "flags": "0", - "owner_id": "0" + "flags": "0" }, "funcname": "SetShortcutRouting", - "location": "imgui_internal:3355", + "location": "imgui_internal:3503", "namespace": "ImGui", "ov_cimguiname": "igSetShortcutRouting", "ret": "bool", @@ -32690,7 +33050,7 @@ "comment": "// replace current window storage with our own (if you want to manipulate it yourself, typically clear subsection of it)", "defaults": {}, "funcname": "SetStateStorage", - "location": "imgui:920", + "location": "imgui:937", "namespace": "ImGui", "ov_cimguiname": "igSetStateStorage", "ret": "void", @@ -32713,7 +33073,7 @@ "comment": "// notify TabBar or Docking system of a closed tab/window ahead (useful to reduce visual flicker on reorderable tab bars). For tab-bar: call after BeginTabBar() and before Tab submissions. Otherwise call with a window name.", "defaults": {}, "funcname": "SetTabItemClosed", - "location": "imgui:815", + "location": "imgui:832", "namespace": "ImGui", "ov_cimguiname": "igSetTabItemClosed", "ret": "void", @@ -32741,7 +33101,7 @@ "defaults": {}, "funcname": "SetTooltip", "isvararg": "...)", - "location": "imgui:685", + "location": "imgui:705", "namespace": "ImGui", "ov_cimguiname": "igSetTooltip", "ret": "void", @@ -32767,7 +33127,7 @@ "cimguiname": "igSetTooltipV", "defaults": {}, "funcname": "SetTooltipV", - "location": "imgui:686", + "location": "imgui:706", "namespace": "ImGui", "ov_cimguiname": "igSetTooltipV", "ret": "void", @@ -32793,7 +33153,7 @@ "cimguiname": "igSetWindowClipRectBeforeSetChannel", "defaults": {}, "funcname": "SetWindowClipRectBeforeSetChannel", - "location": "imgui_internal:3440", + "location": "imgui_internal:3588", "namespace": "ImGui", "ov_cimguiname": "igSetWindowClipRectBeforeSetChannel", "ret": "void", @@ -32822,7 +33182,7 @@ "cond": "0" }, "funcname": "SetWindowCollapsed", - "location": "imgui:383", + "location": "imgui:398", "namespace": "ImGui", "ov_cimguiname": "igSetWindowCollapsed_Bool", "ret": "void", @@ -32853,7 +33213,7 @@ "cond": "0" }, "funcname": "SetWindowCollapsed", - "location": "imgui:388", + "location": "imgui:403", "namespace": "ImGui", "ov_cimguiname": "igSetWindowCollapsed_Str", "ret": "void", @@ -32883,7 +33243,7 @@ "cond": "0" }, "funcname": "SetWindowCollapsed", - "location": "imgui_internal:3107", + "location": "imgui_internal:3244", "namespace": "ImGui", "ov_cimguiname": "igSetWindowCollapsed_WindowPtr", "ret": "void", @@ -32913,7 +33273,7 @@ "cimguiname": "igSetWindowDock", "defaults": {}, "funcname": "SetWindowDock", - "location": "imgui_internal:3388", + "location": "imgui_internal:3536", "namespace": "ImGui", "ov_cimguiname": "igSetWindowDock", "ret": "void", @@ -32931,7 +33291,7 @@ "comment": "// (not recommended) set current window to be focused / top-most. prefer using SetNextWindowFocus().", "defaults": {}, "funcname": "SetWindowFocus", - "location": "imgui:384", + "location": "imgui:399", "namespace": "ImGui", "ov_cimguiname": "igSetWindowFocus_Nil", "ret": "void", @@ -32952,7 +33312,7 @@ "comment": "// set named window to be focused / top-most. use NULL to remove focus.", "defaults": {}, "funcname": "SetWindowFocus", - "location": "imgui:389", + "location": "imgui:404", "namespace": "ImGui", "ov_cimguiname": "igSetWindowFocus_Str", "ret": "void", @@ -32975,7 +33335,7 @@ "comment": "// [OBSOLETE] set font scale. Adjust IO.FontGlobalScale if you want to scale all windows. This is an old API! For correct scaling, prefer to reload font + rebuild ImFontAtlas + call style.ScaleAllSizes().", "defaults": {}, "funcname": "SetWindowFontScale", - "location": "imgui:385", + "location": "imgui:400", "namespace": "ImGui", "ov_cimguiname": "igSetWindowFontScale", "ret": "void", @@ -32983,7 +33343,7 @@ "stname": "" } ], - "igSetWindowHiddendAndSkipItemsForCurrentFrame": [ + "igSetWindowHiddenAndSkipItemsForCurrentFrame": [ { "args": "(ImGuiWindow* window)", "argsT": [ @@ -32994,12 +33354,12 @@ ], "argsoriginal": "(ImGuiWindow* window)", "call_args": "(window)", - "cimguiname": "igSetWindowHiddendAndSkipItemsForCurrentFrame", + "cimguiname": "igSetWindowHiddenAndSkipItemsForCurrentFrame", "defaults": {}, - "funcname": "SetWindowHiddendAndSkipItemsForCurrentFrame", - "location": "imgui_internal:3109", + "funcname": "SetWindowHiddenAndSkipItemsForCurrentFrame", + "location": "imgui_internal:3246", "namespace": "ImGui", - "ov_cimguiname": "igSetWindowHiddendAndSkipItemsForCurrentFrame", + "ov_cimguiname": "igSetWindowHiddenAndSkipItemsForCurrentFrame", "ret": "void", "signature": "(ImGuiWindow*)", "stname": "" @@ -33027,7 +33387,7 @@ "cimguiname": "igSetWindowHitTestHole", "defaults": {}, "funcname": "SetWindowHitTestHole", - "location": "imgui_internal:3108", + "location": "imgui_internal:3245", "namespace": "ImGui", "ov_cimguiname": "igSetWindowHitTestHole", "ret": "void", @@ -33035,6 +33395,33 @@ "stname": "" } ], + "igSetWindowParentWindowForFocusRoute": [ + { + "args": "(ImGuiWindow* window,ImGuiWindow* parent_window)", + "argsT": [ + { + "name": "window", + "type": "ImGuiWindow*" + }, + { + "name": "parent_window", + "type": "ImGuiWindow*" + } + ], + "argsoriginal": "(ImGuiWindow* window,ImGuiWindow* parent_window)", + "call_args": "(window,parent_window)", + "cimguiname": "igSetWindowParentWindowForFocusRoute", + "comment": "// You may also use SetNextWindowClass()'s FocusRouteParentWindowId field.", + "defaults": {}, + "funcname": "SetWindowParentWindowForFocusRoute", + "location": "imgui_internal:3247", + "namespace": "ImGui", + "ov_cimguiname": "igSetWindowParentWindowForFocusRoute", + "ret": "void", + "signature": "(ImGuiWindow*,ImGuiWindow*)", + "stname": "" + } + ], "igSetWindowPos": [ { "args": "(const ImVec2 pos,ImGuiCond cond)", @@ -33056,7 +33443,7 @@ "cond": "0" }, "funcname": "SetWindowPos", - "location": "imgui:381", + "location": "imgui:396", "namespace": "ImGui", "ov_cimguiname": "igSetWindowPos_Vec2", "ret": "void", @@ -33087,7 +33474,7 @@ "cond": "0" }, "funcname": "SetWindowPos", - "location": "imgui:386", + "location": "imgui:401", "namespace": "ImGui", "ov_cimguiname": "igSetWindowPos_Str", "ret": "void", @@ -33117,7 +33504,7 @@ "cond": "0" }, "funcname": "SetWindowPos", - "location": "imgui_internal:3105", + "location": "imgui_internal:3242", "namespace": "ImGui", "ov_cimguiname": "igSetWindowPos_WindowPtr", "ret": "void", @@ -33146,7 +33533,7 @@ "cond": "0" }, "funcname": "SetWindowSize", - "location": "imgui:382", + "location": "imgui:397", "namespace": "ImGui", "ov_cimguiname": "igSetWindowSize_Vec2", "ret": "void", @@ -33177,7 +33564,7 @@ "cond": "0" }, "funcname": "SetWindowSize", - "location": "imgui:387", + "location": "imgui:402", "namespace": "ImGui", "ov_cimguiname": "igSetWindowSize_Str", "ret": "void", @@ -33207,7 +33594,7 @@ "cond": "0" }, "funcname": "SetWindowSize", - "location": "imgui_internal:3106", + "location": "imgui_internal:3243", "namespace": "ImGui", "ov_cimguiname": "igSetWindowSize_WindowPtr", "ret": "void", @@ -33233,7 +33620,7 @@ "cimguiname": "igSetWindowViewport", "defaults": {}, "funcname": "SetWindowViewport", - "location": "imgui_internal:3151", + "location": "imgui_internal:3289", "namespace": "ImGui", "ov_cimguiname": "igSetWindowViewport", "ret": "void", @@ -33279,7 +33666,7 @@ "cimguiname": "igShadeVertsLinearColorGradientKeepAlpha", "defaults": {}, "funcname": "ShadeVertsLinearColorGradientKeepAlpha", - "location": "imgui_internal:3619", + "location": "imgui_internal:3769", "namespace": "ImGui", "ov_cimguiname": "igShadeVertsLinearColorGradientKeepAlpha", "ret": "void", @@ -33329,7 +33716,7 @@ "cimguiname": "igShadeVertsLinearUV", "defaults": {}, "funcname": "ShadeVertsLinearUV", - "location": "imgui_internal:3620", + "location": "imgui_internal:3770", "namespace": "ImGui", "ov_cimguiname": "igShadeVertsLinearUV", "ret": "void", @@ -33337,6 +33724,52 @@ "stname": "" } ], + "igShadeVertsTransformPos": [ + { + "args": "(ImDrawList* draw_list,int vert_start_idx,int vert_end_idx,const ImVec2 pivot_in,float cos_a,float sin_a,const ImVec2 pivot_out)", + "argsT": [ + { + "name": "draw_list", + "type": "ImDrawList*" + }, + { + "name": "vert_start_idx", + "type": "int" + }, + { + "name": "vert_end_idx", + "type": "int" + }, + { + "name": "pivot_in", + "type": "const ImVec2" + }, + { + "name": "cos_a", + "type": "float" + }, + { + "name": "sin_a", + "type": "float" + }, + { + "name": "pivot_out", + "type": "const ImVec2" + } + ], + "argsoriginal": "(ImDrawList* draw_list,int vert_start_idx,int vert_end_idx,const ImVec2& pivot_in,float cos_a,float sin_a,const ImVec2& pivot_out)", + "call_args": "(draw_list,vert_start_idx,vert_end_idx,pivot_in,cos_a,sin_a,pivot_out)", + "cimguiname": "igShadeVertsTransformPos", + "defaults": {}, + "funcname": "ShadeVertsTransformPos", + "location": "imgui_internal:3771", + "namespace": "ImGui", + "ov_cimguiname": "igShadeVertsTransformPos", + "ret": "void", + "signature": "(ImDrawList*,int,int,const ImVec2,float,float,const ImVec2)", + "stname": "" + } + ], "igShortcut": [ { "args": "(ImGuiKeyChord key_chord,ImGuiID owner_id,ImGuiInputFlags flags)", @@ -33362,7 +33795,7 @@ "owner_id": "0" }, "funcname": "Shortcut", - "location": "imgui_internal:3354", + "location": "imgui_internal:3502", "namespace": "ImGui", "ov_cimguiname": "igShortcut", "ret": "bool", @@ -33387,7 +33820,7 @@ "p_open": "NULL" }, "funcname": "ShowAboutWindow", - "location": "imgui:317", + "location": "imgui:322", "namespace": "ImGui", "ov_cimguiname": "igShowAboutWindow", "ret": "void", @@ -33412,7 +33845,7 @@ "p_open": "NULL" }, "funcname": "ShowDebugLogWindow", - "location": "imgui:315", + "location": "imgui:320", "namespace": "ImGui", "ov_cimguiname": "igShowDebugLogWindow", "ret": "void", @@ -33437,7 +33870,7 @@ "p_open": "NULL" }, "funcname": "ShowDemoWindow", - "location": "imgui:313", + "location": "imgui:318", "namespace": "ImGui", "ov_cimguiname": "igShowDemoWindow", "ret": "void", @@ -33459,7 +33892,7 @@ "cimguiname": "igShowFontAtlas", "defaults": {}, "funcname": "ShowFontAtlas", - "location": "imgui_internal:3642", + "location": "imgui_internal:3796", "namespace": "ImGui", "ov_cimguiname": "igShowFontAtlas", "ret": "void", @@ -33482,7 +33915,7 @@ "comment": "// add font selector block (not a window), essentially a combo listing the loaded fonts.", "defaults": {}, "funcname": "ShowFontSelector", - "location": "imgui:320", + "location": "imgui:325", "namespace": "ImGui", "ov_cimguiname": "igShowFontSelector", "ret": "void", @@ -33490,7 +33923,7 @@ "stname": "" } ], - "igShowMetricsWindow": [ + "igShowIDStackToolWindow": [ { "args": "(bool* p_open)", "argsT": [ @@ -33501,21 +33934,21 @@ ], "argsoriginal": "(bool* p_open=((void*)0))", "call_args": "(p_open)", - "cimguiname": "igShowMetricsWindow", - "comment": "// create Metrics/Debugger window. display Dear ImGui internals: windows, draw commands, various internal state, etc.", + "cimguiname": "igShowIDStackToolWindow", + "comment": "// create Stack Tool window. hover items with mouse to query information about the source of their unique ID.", "defaults": { "p_open": "NULL" }, - "funcname": "ShowMetricsWindow", - "location": "imgui:314", + "funcname": "ShowIDStackToolWindow", + "location": "imgui:321", "namespace": "ImGui", - "ov_cimguiname": "igShowMetricsWindow", + "ov_cimguiname": "igShowIDStackToolWindow", "ret": "void", "signature": "(bool*)", "stname": "" } ], - "igShowStackToolWindow": [ + "igShowMetricsWindow": [ { "args": "(bool* p_open)", "argsT": [ @@ -33526,15 +33959,15 @@ ], "argsoriginal": "(bool* p_open=((void*)0))", "call_args": "(p_open)", - "cimguiname": "igShowStackToolWindow", - "comment": "// create Stack Tool window. hover items with mouse to query information about the source of their unique ID.", + "cimguiname": "igShowMetricsWindow", + "comment": "// create Metrics/Debugger window. display Dear ImGui internals: windows, draw commands, various internal state, etc.", "defaults": { "p_open": "NULL" }, - "funcname": "ShowStackToolWindow", - "location": "imgui:316", + "funcname": "ShowMetricsWindow", + "location": "imgui:319", "namespace": "ImGui", - "ov_cimguiname": "igShowStackToolWindow", + "ov_cimguiname": "igShowMetricsWindow", "ret": "void", "signature": "(bool*)", "stname": "" @@ -33557,7 +33990,7 @@ "ref": "NULL" }, "funcname": "ShowStyleEditor", - "location": "imgui:318", + "location": "imgui:323", "namespace": "ImGui", "ov_cimguiname": "igShowStyleEditor", "ret": "void", @@ -33580,7 +34013,7 @@ "comment": "// add style selector block (not a window), essentially a combo listing the default styles.", "defaults": {}, "funcname": "ShowStyleSelector", - "location": "imgui:319", + "location": "imgui:324", "namespace": "ImGui", "ov_cimguiname": "igShowStyleSelector", "ret": "bool", @@ -33598,7 +34031,7 @@ "comment": "// add basic help/info block (not a window): how to manipulate ImGui as an end-user (mouse/keyboard controls).", "defaults": {}, "funcname": "ShowUserGuide", - "location": "imgui:321", + "location": "imgui:326", "namespace": "ImGui", "ov_cimguiname": "igShowUserGuide", "ret": "void", @@ -33628,7 +34061,7 @@ "cimguiname": "igShrinkWidths", "defaults": {}, "funcname": "ShrinkWidths", - "location": "imgui_internal:3217", + "location": "imgui_internal:3355", "namespace": "ImGui", "ov_cimguiname": "igShrinkWidths", "ret": "void", @@ -33646,7 +34079,7 @@ "comment": "// Since 1.60 this is a _private_ function. You can call DestroyContext() to destroy the context created by CreateContext().", "defaults": {}, "funcname": "Shutdown", - "location": "imgui_internal:3132", + "location": "imgui_internal:3270", "namespace": "ImGui", "ov_cimguiname": "igShutdown", "ret": "void", @@ -33693,7 +34126,7 @@ "v_degrees_min": "-360.0f" }, "funcname": "SliderAngle", - "location": "imgui:576", + "location": "imgui:596", "namespace": "ImGui", "ov_cimguiname": "igSliderAngle", "ret": "bool", @@ -33747,7 +34180,7 @@ "cimguiname": "igSliderBehavior", "defaults": {}, "funcname": "SliderBehavior", - "location": "imgui_internal:3576", + "location": "imgui_internal:3726", "namespace": "ImGui", "ov_cimguiname": "igSliderBehavior", "ret": "bool", @@ -33793,7 +34226,7 @@ "format": "\"%.3f\"" }, "funcname": "SliderFloat", - "location": "imgui:572", + "location": "imgui:592", "namespace": "ImGui", "ov_cimguiname": "igSliderFloat", "ret": "bool", @@ -33838,7 +34271,7 @@ "format": "\"%.3f\"" }, "funcname": "SliderFloat2", - "location": "imgui:573", + "location": "imgui:593", "namespace": "ImGui", "ov_cimguiname": "igSliderFloat2", "ret": "bool", @@ -33883,7 +34316,7 @@ "format": "\"%.3f\"" }, "funcname": "SliderFloat3", - "location": "imgui:574", + "location": "imgui:594", "namespace": "ImGui", "ov_cimguiname": "igSliderFloat3", "ret": "bool", @@ -33928,7 +34361,7 @@ "format": "\"%.3f\"" }, "funcname": "SliderFloat4", - "location": "imgui:575", + "location": "imgui:595", "namespace": "ImGui", "ov_cimguiname": "igSliderFloat4", "ret": "bool", @@ -33973,7 +34406,7 @@ "format": "\"%d\"" }, "funcname": "SliderInt", - "location": "imgui:577", + "location": "imgui:597", "namespace": "ImGui", "ov_cimguiname": "igSliderInt", "ret": "bool", @@ -34018,7 +34451,7 @@ "format": "\"%d\"" }, "funcname": "SliderInt2", - "location": "imgui:578", + "location": "imgui:598", "namespace": "ImGui", "ov_cimguiname": "igSliderInt2", "ret": "bool", @@ -34063,7 +34496,7 @@ "format": "\"%d\"" }, "funcname": "SliderInt3", - "location": "imgui:579", + "location": "imgui:599", "namespace": "ImGui", "ov_cimguiname": "igSliderInt3", "ret": "bool", @@ -34108,7 +34541,7 @@ "format": "\"%d\"" }, "funcname": "SliderInt4", - "location": "imgui:580", + "location": "imgui:600", "namespace": "ImGui", "ov_cimguiname": "igSliderInt4", "ret": "bool", @@ -34157,7 +34590,7 @@ "format": "NULL" }, "funcname": "SliderScalar", - "location": "imgui:581", + "location": "imgui:601", "namespace": "ImGui", "ov_cimguiname": "igSliderScalar", "ret": "bool", @@ -34210,7 +34643,7 @@ "format": "NULL" }, "funcname": "SliderScalarN", - "location": "imgui:582", + "location": "imgui:602", "namespace": "ImGui", "ov_cimguiname": "igSliderScalarN", "ret": "bool", @@ -34230,10 +34663,10 @@ "argsoriginal": "(const char* label)", "call_args": "(label)", "cimguiname": "igSmallButton", - "comment": "// button with FramePadding=(0,0) to easily embed within text", + "comment": "// button with (FramePadding.y == 0) to easily embed within text", "defaults": {}, "funcname": "SmallButton", - "location": "imgui:516", + "location": "imgui:534", "namespace": "ImGui", "ov_cimguiname": "igSmallButton", "ret": "bool", @@ -34251,7 +34684,7 @@ "comment": "// add vertical spacing.", "defaults": {}, "funcname": "Spacing", - "location": "imgui:455", + "location": "imgui:482", "namespace": "ImGui", "ov_cimguiname": "igSpacing", "ret": "void", @@ -34313,7 +34746,7 @@ "hover_visibility_delay": "0.0f" }, "funcname": "SplitterBehavior", - "location": "imgui_internal:3577", + "location": "imgui_internal:3727", "namespace": "ImGui", "ov_cimguiname": "igSplitterBehavior", "ret": "bool", @@ -34335,7 +34768,7 @@ "cimguiname": "igStartMouseMovingWindow", "defaults": {}, "funcname": "StartMouseMovingWindow", - "location": "imgui_internal:3137", + "location": "imgui_internal:3275", "namespace": "ImGui", "ov_cimguiname": "igStartMouseMovingWindow", "ret": "void", @@ -34345,7 +34778,7 @@ ], "igStartMouseMovingWindowOrNode": [ { - "args": "(ImGuiWindow* window,ImGuiDockNode* node,bool undock_floating_node)", + "args": "(ImGuiWindow* window,ImGuiDockNode* node,bool undock)", "argsT": [ { "name": "window", @@ -34356,16 +34789,16 @@ "type": "ImGuiDockNode*" }, { - "name": "undock_floating_node", + "name": "undock", "type": "bool" } ], - "argsoriginal": "(ImGuiWindow* window,ImGuiDockNode* node,bool undock_floating_node)", - "call_args": "(window,node,undock_floating_node)", + "argsoriginal": "(ImGuiWindow* window,ImGuiDockNode* node,bool undock)", + "call_args": "(window,node,undock)", "cimguiname": "igStartMouseMovingWindowOrNode", "defaults": {}, "funcname": "StartMouseMovingWindowOrNode", - "location": "imgui_internal:3138", + "location": "imgui_internal:3276", "namespace": "ImGui", "ov_cimguiname": "igStartMouseMovingWindowOrNode", "ret": "void", @@ -34390,7 +34823,7 @@ "dst": "NULL" }, "funcname": "StyleColorsClassic", - "location": "imgui:327", + "location": "imgui:332", "namespace": "ImGui", "ov_cimguiname": "igStyleColorsClassic", "ret": "void", @@ -34415,7 +34848,7 @@ "dst": "NULL" }, "funcname": "StyleColorsDark", - "location": "imgui:325", + "location": "imgui:330", "namespace": "ImGui", "ov_cimguiname": "igStyleColorsDark", "ret": "void", @@ -34440,7 +34873,7 @@ "dst": "NULL" }, "funcname": "StyleColorsLight", - "location": "imgui:326", + "location": "imgui:331", "namespace": "ImGui", "ov_cimguiname": "igStyleColorsLight", "ret": "void", @@ -34470,7 +34903,7 @@ "cimguiname": "igTabBarAddTab", "defaults": {}, "funcname": "TabBarAddTab", - "location": "imgui_internal:3515", + "location": "imgui_internal:3665", "namespace": "ImGui", "ov_cimguiname": "igTabBarAddTab", "ret": "void", @@ -34496,7 +34929,7 @@ "cimguiname": "igTabBarCloseTab", "defaults": {}, "funcname": "TabBarCloseTab", - "location": "imgui_internal:3517", + "location": "imgui_internal:3667", "namespace": "ImGui", "ov_cimguiname": "igTabBarCloseTab", "ret": "void", @@ -34518,7 +34951,7 @@ "cimguiname": "igTabBarFindMostRecentlySelectedTabForActiveWindow", "defaults": {}, "funcname": "TabBarFindMostRecentlySelectedTabForActiveWindow", - "location": "imgui_internal:3511", + "location": "imgui_internal:3661", "namespace": "ImGui", "ov_cimguiname": "igTabBarFindMostRecentlySelectedTabForActiveWindow", "ret": "ImGuiTabItem*", @@ -34544,7 +34977,7 @@ "cimguiname": "igTabBarFindTabByID", "defaults": {}, "funcname": "TabBarFindTabByID", - "location": "imgui_internal:3509", + "location": "imgui_internal:3659", "namespace": "ImGui", "ov_cimguiname": "igTabBarFindTabByID", "ret": "ImGuiTabItem*", @@ -34570,7 +35003,7 @@ "cimguiname": "igTabBarFindTabByOrder", "defaults": {}, "funcname": "TabBarFindTabByOrder", - "location": "imgui_internal:3510", + "location": "imgui_internal:3660", "namespace": "ImGui", "ov_cimguiname": "igTabBarFindTabByOrder", "ret": "ImGuiTabItem*", @@ -34592,7 +35025,7 @@ "cimguiname": "igTabBarGetCurrentTab", "defaults": {}, "funcname": "TabBarGetCurrentTab", - "location": "imgui_internal:3512", + "location": "imgui_internal:3662", "namespace": "ImGui", "ov_cimguiname": "igTabBarGetCurrentTab", "ret": "ImGuiTabItem*", @@ -34618,7 +35051,7 @@ "cimguiname": "igTabBarGetTabName", "defaults": {}, "funcname": "TabBarGetTabName", - "location": "imgui_internal:3514", + "location": "imgui_internal:3664", "namespace": "ImGui", "ov_cimguiname": "igTabBarGetTabName", "ret": "const char*", @@ -34644,7 +35077,7 @@ "cimguiname": "igTabBarGetTabOrder", "defaults": {}, "funcname": "TabBarGetTabOrder", - "location": "imgui_internal:3513", + "location": "imgui_internal:3663", "namespace": "ImGui", "ov_cimguiname": "igTabBarGetTabOrder", "ret": "int", @@ -34666,7 +35099,7 @@ "cimguiname": "igTabBarProcessReorder", "defaults": {}, "funcname": "TabBarProcessReorder", - "location": "imgui_internal:3521", + "location": "imgui_internal:3671", "namespace": "ImGui", "ov_cimguiname": "igTabBarProcessReorder", "ret": "bool", @@ -34692,7 +35125,7 @@ "cimguiname": "igTabBarQueueFocus", "defaults": {}, "funcname": "TabBarQueueFocus", - "location": "imgui_internal:3518", + "location": "imgui_internal:3668", "namespace": "ImGui", "ov_cimguiname": "igTabBarQueueFocus", "ret": "void", @@ -34722,7 +35155,7 @@ "cimguiname": "igTabBarQueueReorder", "defaults": {}, "funcname": "TabBarQueueReorder", - "location": "imgui_internal:3519", + "location": "imgui_internal:3669", "namespace": "ImGui", "ov_cimguiname": "igTabBarQueueReorder", "ret": "void", @@ -34752,7 +35185,7 @@ "cimguiname": "igTabBarQueueReorderFromMousePos", "defaults": {}, "funcname": "TabBarQueueReorderFromMousePos", - "location": "imgui_internal:3520", + "location": "imgui_internal:3670", "namespace": "ImGui", "ov_cimguiname": "igTabBarQueueReorderFromMousePos", "ret": "void", @@ -34778,7 +35211,7 @@ "cimguiname": "igTabBarRemoveTab", "defaults": {}, "funcname": "TabBarRemoveTab", - "location": "imgui_internal:3516", + "location": "imgui_internal:3666", "namespace": "ImGui", "ov_cimguiname": "igTabBarRemoveTab", "ret": "void", @@ -34812,7 +35245,7 @@ "cimguiname": "igTabItemBackground", "defaults": {}, "funcname": "TabItemBackground", - "location": "imgui_internal:3525", + "location": "imgui_internal:3675", "namespace": "ImGui", "ov_cimguiname": "igTabItemBackground", "ret": "void", @@ -34841,7 +35274,7 @@ "flags": "0" }, "funcname": "TabItemButton", - "location": "imgui:814", + "location": "imgui:831", "namespace": "ImGui", "ov_cimguiname": "igTabItemButton", "ret": "bool", @@ -34871,7 +35304,7 @@ "cimguiname": "igTabItemCalcSize", "defaults": {}, "funcname": "TabItemCalcSize", - "location": "imgui_internal:3523", + "location": "imgui_internal:3673", "namespace": "ImGui", "nonUDT": 1, "ov_cimguiname": "igTabItemCalcSize_Str", @@ -34896,7 +35329,7 @@ "cimguiname": "igTabItemCalcSize", "defaults": {}, "funcname": "TabItemCalcSize", - "location": "imgui_internal:3524", + "location": "imgui_internal:3674", "namespace": "ImGui", "nonUDT": 1, "ov_cimguiname": "igTabItemCalcSize_WindowPtr", @@ -34935,7 +35368,7 @@ "cimguiname": "igTabItemEx", "defaults": {}, "funcname": "TabItemEx", - "location": "imgui_internal:3522", + "location": "imgui_internal:3672", "namespace": "ImGui", "ov_cimguiname": "igTabItemEx", "ret": "bool", @@ -34993,7 +35426,7 @@ "cimguiname": "igTabItemLabelAndCloseButton", "defaults": {}, "funcname": "TabItemLabelAndCloseButton", - "location": "imgui_internal:3526", + "location": "imgui_internal:3676", "namespace": "ImGui", "ov_cimguiname": "igTabItemLabelAndCloseButton", "ret": "void", @@ -35001,6 +35434,52 @@ "stname": "" } ], + "igTableAngledHeadersRow": [ + { + "args": "()", + "argsT": [], + "argsoriginal": "()", + "call_args": "()", + "cimguiname": "igTableAngledHeadersRow", + "comment": "// submit a row with angled headers for every column with the ImGuiTableColumnFlags_AngledHeader flag. MUST BE FIRST ROW.", + "defaults": {}, + "funcname": "TableAngledHeadersRow", + "location": "imgui:797", + "namespace": "ImGui", + "ov_cimguiname": "igTableAngledHeadersRow", + "ret": "void", + "signature": "()", + "stname": "" + } + ], + "igTableAngledHeadersRowEx": [ + { + "args": "(float angle,float max_label_width)", + "argsT": [ + { + "name": "angle", + "type": "float" + }, + { + "name": "max_label_width", + "type": "float" + } + ], + "argsoriginal": "(float angle,float max_label_width=0.0f)", + "call_args": "(angle,max_label_width)", + "cimguiname": "igTableAngledHeadersRowEx", + "defaults": { + "max_label_width": "0.0f" + }, + "funcname": "TableAngledHeadersRowEx", + "location": "imgui_internal:3609", + "namespace": "ImGui", + "ov_cimguiname": "igTableAngledHeadersRowEx", + "ret": "void", + "signature": "(float,float)", + "stname": "" + } + ], "igTableBeginApplyRequests": [ { "args": "(ImGuiTable* table)", @@ -35015,7 +35494,7 @@ "cimguiname": "igTableBeginApplyRequests", "defaults": {}, "funcname": "TableBeginApplyRequests", - "location": "imgui_internal:3466", + "location": "imgui_internal:3616", "namespace": "ImGui", "ov_cimguiname": "igTableBeginApplyRequests", "ret": "void", @@ -35041,7 +35520,7 @@ "cimguiname": "igTableBeginCell", "defaults": {}, "funcname": "TableBeginCell", - "location": "imgui_internal:3484", + "location": "imgui_internal:3634", "namespace": "ImGui", "ov_cimguiname": "igTableBeginCell", "ret": "void", @@ -35063,7 +35542,7 @@ "cimguiname": "igTableBeginContextMenuPopup", "defaults": {}, "funcname": "TableBeginContextMenuPopup", - "location": "imgui_internal:3473", + "location": "imgui_internal:3623", "namespace": "ImGui", "ov_cimguiname": "igTableBeginContextMenuPopup", "ret": "bool", @@ -35089,7 +35568,7 @@ "cimguiname": "igTableBeginInitMemory", "defaults": {}, "funcname": "TableBeginInitMemory", - "location": "imgui_internal:3465", + "location": "imgui_internal:3615", "namespace": "ImGui", "ov_cimguiname": "igTableBeginInitMemory", "ret": "void", @@ -35111,7 +35590,7 @@ "cimguiname": "igTableBeginRow", "defaults": {}, "funcname": "TableBeginRow", - "location": "imgui_internal:3482", + "location": "imgui_internal:3632", "namespace": "ImGui", "ov_cimguiname": "igTableBeginRow", "ret": "void", @@ -35133,7 +35612,7 @@ "cimguiname": "igTableDrawBorders", "defaults": {}, "funcname": "TableDrawBorders", - "location": "imgui_internal:3471", + "location": "imgui_internal:3621", "namespace": "ImGui", "ov_cimguiname": "igTableDrawBorders", "ret": "void", @@ -35141,25 +35620,29 @@ "stname": "" } ], - "igTableDrawContextMenu": [ + "igTableDrawDefaultContextMenu": [ { - "args": "(ImGuiTable* table)", + "args": "(ImGuiTable* table,ImGuiTableFlags flags_for_section_to_display)", "argsT": [ { "name": "table", "type": "ImGuiTable*" + }, + { + "name": "flags_for_section_to_display", + "type": "ImGuiTableFlags" } ], - "argsoriginal": "(ImGuiTable* table)", - "call_args": "(table)", - "cimguiname": "igTableDrawContextMenu", + "argsoriginal": "(ImGuiTable* table,ImGuiTableFlags flags_for_section_to_display)", + "call_args": "(table,flags_for_section_to_display)", + "cimguiname": "igTableDrawDefaultContextMenu", "defaults": {}, - "funcname": "TableDrawContextMenu", - "location": "imgui_internal:3472", + "funcname": "TableDrawDefaultContextMenu", + "location": "imgui_internal:3622", "namespace": "ImGui", - "ov_cimguiname": "igTableDrawContextMenu", + "ov_cimguiname": "igTableDrawDefaultContextMenu", "ret": "void", - "signature": "(ImGuiTable*)", + "signature": "(ImGuiTable*,ImGuiTableFlags)", "stname": "" } ], @@ -35177,7 +35660,7 @@ "cimguiname": "igTableEndCell", "defaults": {}, "funcname": "TableEndCell", - "location": "imgui_internal:3485", + "location": "imgui_internal:3635", "namespace": "ImGui", "ov_cimguiname": "igTableEndCell", "ret": "void", @@ -35199,7 +35682,7 @@ "cimguiname": "igTableEndRow", "defaults": {}, "funcname": "TableEndRow", - "location": "imgui_internal:3483", + "location": "imgui_internal:3633", "namespace": "ImGui", "ov_cimguiname": "igTableEndRow", "ret": "void", @@ -35221,7 +35704,7 @@ "cimguiname": "igTableFindByID", "defaults": {}, "funcname": "TableFindByID", - "location": "imgui_internal:3463", + "location": "imgui_internal:3613", "namespace": "ImGui", "ov_cimguiname": "igTableFindByID", "ret": "ImGuiTable*", @@ -35247,7 +35730,7 @@ "cimguiname": "igTableFixColumnSortDirection", "defaults": {}, "funcname": "TableFixColumnSortDirection", - "location": "imgui_internal:3480", + "location": "imgui_internal:3630", "namespace": "ImGui", "ov_cimguiname": "igTableFixColumnSortDirection", "ret": "void", @@ -35264,7 +35747,7 @@ "cimguiname": "igTableGcCompactSettings", "defaults": {}, "funcname": "TableGcCompactSettings", - "location": "imgui_internal:3495", + "location": "imgui_internal:3645", "namespace": "ImGui", "ov_cimguiname": "igTableGcCompactSettings", "ret": "void", @@ -35286,7 +35769,7 @@ "cimguiname": "igTableGcCompactTransientBuffers", "defaults": {}, "funcname": "TableGcCompactTransientBuffers", - "location": "imgui_internal:3493", + "location": "imgui_internal:3643", "namespace": "ImGui", "ov_cimguiname": "igTableGcCompactTransientBuffers_TablePtr", "ret": "void", @@ -35306,7 +35789,7 @@ "cimguiname": "igTableGcCompactTransientBuffers", "defaults": {}, "funcname": "TableGcCompactTransientBuffers", - "location": "imgui_internal:3494", + "location": "imgui_internal:3644", "namespace": "ImGui", "ov_cimguiname": "igTableGcCompactTransientBuffers_TableTempDataPtr", "ret": "void", @@ -35328,7 +35811,7 @@ "cimguiname": "igTableGetBoundSettings", "defaults": {}, "funcname": "TableGetBoundSettings", - "location": "imgui_internal:3501", + "location": "imgui_internal:3651", "namespace": "ImGui", "ov_cimguiname": "igTableGetBoundSettings", "ret": "ImGuiTableSettings*", @@ -35358,7 +35841,7 @@ "cimguiname": "igTableGetCellBgRect", "defaults": {}, "funcname": "TableGetCellBgRect", - "location": "imgui_internal:3486", + "location": "imgui_internal:3636", "namespace": "ImGui", "nonUDT": 1, "ov_cimguiname": "igTableGetCellBgRect", @@ -35377,7 +35860,7 @@ "comment": "// return number of columns (value passed to BeginTable)", "defaults": {}, "funcname": "TableGetColumnCount", - "location": "imgui:789", + "location": "imgui:806", "namespace": "ImGui", "ov_cimguiname": "igTableGetColumnCount", "ret": "int", @@ -35402,7 +35885,7 @@ "column_n": "-1" }, "funcname": "TableGetColumnFlags", - "location": "imgui:793", + "location": "imgui:810", "namespace": "ImGui", "ov_cimguiname": "igTableGetColumnFlags", "ret": "ImGuiTableColumnFlags", @@ -35420,7 +35903,7 @@ "comment": "// return current column index.", "defaults": {}, "funcname": "TableGetColumnIndex", - "location": "imgui:790", + "location": "imgui:807", "namespace": "ImGui", "ov_cimguiname": "igTableGetColumnIndex", "ret": "int", @@ -35445,7 +35928,7 @@ "column_n": "-1" }, "funcname": "TableGetColumnName", - "location": "imgui:792", + "location": "imgui:809", "namespace": "ImGui", "ov_cimguiname": "igTableGetColumnName_Int", "ret": "const char*", @@ -35469,7 +35952,7 @@ "cimguiname": "igTableGetColumnName", "defaults": {}, "funcname": "TableGetColumnName", - "location": "imgui_internal:3487", + "location": "imgui_internal:3637", "namespace": "ImGui", "ov_cimguiname": "igTableGetColumnName_TablePtr", "ret": "const char*", @@ -35491,7 +35974,7 @@ "cimguiname": "igTableGetColumnNextSortDirection", "defaults": {}, "funcname": "TableGetColumnNextSortDirection", - "location": "imgui_internal:3479", + "location": "imgui_internal:3629", "namespace": "ImGui", "ov_cimguiname": "igTableGetColumnNextSortDirection", "ret": "ImGuiSortDirection", @@ -35523,7 +36006,7 @@ "instance_no": "0" }, "funcname": "TableGetColumnResizeID", - "location": "imgui_internal:3488", + "location": "imgui_internal:3638", "namespace": "ImGui", "ov_cimguiname": "igTableGetColumnResizeID", "ret": "ImGuiID", @@ -35549,7 +36032,7 @@ "cimguiname": "igTableGetColumnWidthAuto", "defaults": {}, "funcname": "TableGetColumnWidthAuto", - "location": "imgui_internal:3481", + "location": "imgui_internal:3631", "namespace": "ImGui", "ov_cimguiname": "igTableGetColumnWidthAuto", "ret": "float", @@ -35557,6 +36040,23 @@ "stname": "" } ], + "igTableGetHeaderAngledMaxLabelWidth": [ + { + "args": "()", + "argsT": [], + "argsoriginal": "()", + "call_args": "()", + "cimguiname": "igTableGetHeaderAngledMaxLabelWidth", + "defaults": {}, + "funcname": "TableGetHeaderAngledMaxLabelWidth", + "location": "imgui_internal:3606", + "namespace": "ImGui", + "ov_cimguiname": "igTableGetHeaderAngledMaxLabelWidth", + "ret": "float", + "signature": "()", + "stname": "" + } + ], "igTableGetHeaderRowHeight": [ { "args": "()", @@ -35566,7 +36066,7 @@ "cimguiname": "igTableGetHeaderRowHeight", "defaults": {}, "funcname": "TableGetHeaderRowHeight", - "location": "imgui_internal:3457", + "location": "imgui_internal:3605", "namespace": "ImGui", "ov_cimguiname": "igTableGetHeaderRowHeight", "ret": "float", @@ -35584,7 +36084,7 @@ "comment": "// May use (TableGetColumnFlags() & ImGuiTableColumnFlags_IsHovered) instead. Return hovered column. return -1 when table is not hovered. return columns_count if the unused space at the right of visible columns is hovered.", "defaults": {}, "funcname": "TableGetHoveredColumn", - "location": "imgui_internal:3455", + "location": "imgui_internal:3603", "namespace": "ImGui", "ov_cimguiname": "igTableGetHoveredColumn", "ret": "int", @@ -35602,7 +36102,7 @@ "comment": "// Retrieve *PREVIOUS FRAME* hovered row. This difference with TableGetHoveredColumn() is the reason why this is not public yet.", "defaults": {}, "funcname": "TableGetHoveredRow", - "location": "imgui_internal:3456", + "location": "imgui_internal:3604", "namespace": "ImGui", "ov_cimguiname": "igTableGetHoveredRow", "ret": "int", @@ -35628,7 +36128,7 @@ "cimguiname": "igTableGetInstanceData", "defaults": {}, "funcname": "TableGetInstanceData", - "location": "imgui_internal:3475", + "location": "imgui_internal:3625", "namespace": "ImGui", "ov_cimguiname": "igTableGetInstanceData", "ret": "ImGuiTableInstanceData*", @@ -35654,7 +36154,7 @@ "cimguiname": "igTableGetInstanceID", "defaults": {}, "funcname": "TableGetInstanceID", - "location": "imgui_internal:3476", + "location": "imgui_internal:3626", "namespace": "ImGui", "ov_cimguiname": "igTableGetInstanceID", "ret": "ImGuiID", @@ -35680,7 +36180,7 @@ "cimguiname": "igTableGetMaxColumnWidth", "defaults": {}, "funcname": "TableGetMaxColumnWidth", - "location": "imgui_internal:3489", + "location": "imgui_internal:3639", "namespace": "ImGui", "ov_cimguiname": "igTableGetMaxColumnWidth", "ret": "float", @@ -35698,7 +36198,7 @@ "comment": "// return current row index.", "defaults": {}, "funcname": "TableGetRowIndex", - "location": "imgui:791", + "location": "imgui:808", "namespace": "ImGui", "ov_cimguiname": "igTableGetRowIndex", "ret": "int", @@ -35716,7 +36216,7 @@ "comment": "// get latest sort specs for the table (NULL if not sorting). Lifetime: don't hold on this pointer over multiple frames or past any subsequent call to BeginTable().", "defaults": {}, "funcname": "TableGetSortSpecs", - "location": "imgui:788", + "location": "imgui:805", "namespace": "ImGui", "ov_cimguiname": "igTableGetSortSpecs", "ret": "ImGuiTableSortSpecs*", @@ -35739,7 +36239,7 @@ "comment": "// submit one header cell manually (rarely used)", "defaults": {}, "funcname": "TableHeader", - "location": "imgui:780", + "location": "imgui:795", "namespace": "ImGui", "ov_cimguiname": "igTableHeader", "ret": "void", @@ -35754,10 +36254,10 @@ "argsoriginal": "()", "call_args": "()", "cimguiname": "igTableHeadersRow", - "comment": "// submit all headers cells based on data provided to TableSetupColumn() + submit context menu", + "comment": "// submit a row with headers cells based on data provided to TableSetupColumn() + submit context menu", "defaults": {}, "funcname": "TableHeadersRow", - "location": "imgui:779", + "location": "imgui:796", "namespace": "ImGui", "ov_cimguiname": "igTableHeadersRow", "ret": "void", @@ -35779,7 +36279,7 @@ "cimguiname": "igTableLoadSettings", "defaults": {}, "funcname": "TableLoadSettings", - "location": "imgui_internal:3498", + "location": "imgui_internal:3648", "namespace": "ImGui", "ov_cimguiname": "igTableLoadSettings", "ret": "void", @@ -35801,7 +36301,7 @@ "cimguiname": "igTableMergeDrawChannels", "defaults": {}, "funcname": "TableMergeDrawChannels", - "location": "imgui_internal:3474", + "location": "imgui_internal:3624", "namespace": "ImGui", "ov_cimguiname": "igTableMergeDrawChannels", "ret": "void", @@ -35819,7 +36319,7 @@ "comment": "// append into the next column (or first column of next row if currently in last column). Return true when column is visible.", "defaults": {}, "funcname": "TableNextColumn", - "location": "imgui:766", + "location": "imgui:782", "namespace": "ImGui", "ov_cimguiname": "igTableNextColumn", "ret": "bool", @@ -35849,7 +36349,7 @@ "row_flags": "0" }, "funcname": "TableNextRow", - "location": "imgui:765", + "location": "imgui:781", "namespace": "ImGui", "ov_cimguiname": "igTableNextRow", "ret": "void", @@ -35873,7 +36373,7 @@ "column_n": "-1" }, "funcname": "TableOpenContextMenu", - "location": "imgui_internal:3452", + "location": "imgui_internal:3600", "namespace": "ImGui", "ov_cimguiname": "igTableOpenContextMenu", "ret": "void", @@ -35890,7 +36390,7 @@ "cimguiname": "igTablePopBackgroundChannel", "defaults": {}, "funcname": "TablePopBackgroundChannel", - "location": "imgui_internal:3459", + "location": "imgui_internal:3608", "namespace": "ImGui", "ov_cimguiname": "igTablePopBackgroundChannel", "ret": "void", @@ -35907,7 +36407,7 @@ "cimguiname": "igTablePushBackgroundChannel", "defaults": {}, "funcname": "TablePushBackgroundChannel", - "location": "imgui_internal:3458", + "location": "imgui_internal:3607", "namespace": "ImGui", "ov_cimguiname": "igTablePushBackgroundChannel", "ret": "void", @@ -35929,7 +36429,7 @@ "cimguiname": "igTableRemove", "defaults": {}, "funcname": "TableRemove", - "location": "imgui_internal:3492", + "location": "imgui_internal:3642", "namespace": "ImGui", "ov_cimguiname": "igTableRemove", "ret": "void", @@ -35951,7 +36451,7 @@ "cimguiname": "igTableResetSettings", "defaults": {}, "funcname": "TableResetSettings", - "location": "imgui_internal:3500", + "location": "imgui_internal:3650", "namespace": "ImGui", "ov_cimguiname": "igTableResetSettings", "ret": "void", @@ -35973,7 +36473,7 @@ "cimguiname": "igTableSaveSettings", "defaults": {}, "funcname": "TableSaveSettings", - "location": "imgui_internal:3499", + "location": "imgui_internal:3649", "namespace": "ImGui", "ov_cimguiname": "igTableSaveSettings", "ret": "void", @@ -36006,7 +36506,7 @@ "column_n": "-1" }, "funcname": "TableSetBgColor", - "location": "imgui:795", + "location": "imgui:812", "namespace": "ImGui", "ov_cimguiname": "igTableSetBgColor", "ret": "void", @@ -36033,7 +36533,7 @@ "comment": "// change user accessible enabled/disabled state of a column. Set to false to hide the column. User can use the context menu to change this themselves (right-click in headers, or right-click in columns body with ImGuiTableFlags_ContextMenuInBody)", "defaults": {}, "funcname": "TableSetColumnEnabled", - "location": "imgui:794", + "location": "imgui:811", "namespace": "ImGui", "ov_cimguiname": "igTableSetColumnEnabled", "ret": "void", @@ -36056,7 +36556,7 @@ "comment": "// append into the specified column. Return true when column is visible.", "defaults": {}, "funcname": "TableSetColumnIndex", - "location": "imgui:767", + "location": "imgui:783", "namespace": "ImGui", "ov_cimguiname": "igTableSetColumnIndex", "ret": "bool", @@ -36086,7 +36586,7 @@ "cimguiname": "igTableSetColumnSortDirection", "defaults": {}, "funcname": "TableSetColumnSortDirection", - "location": "imgui_internal:3454", + "location": "imgui_internal:3602", "namespace": "ImGui", "ov_cimguiname": "igTableSetColumnSortDirection", "ret": "void", @@ -36112,7 +36612,7 @@ "cimguiname": "igTableSetColumnWidth", "defaults": {}, "funcname": "TableSetColumnWidth", - "location": "imgui_internal:3453", + "location": "imgui_internal:3601", "namespace": "ImGui", "ov_cimguiname": "igTableSetColumnWidth", "ret": "void", @@ -36134,7 +36634,7 @@ "cimguiname": "igTableSetColumnWidthAutoAll", "defaults": {}, "funcname": "TableSetColumnWidthAutoAll", - "location": "imgui_internal:3491", + "location": "imgui_internal:3641", "namespace": "ImGui", "ov_cimguiname": "igTableSetColumnWidthAutoAll", "ret": "void", @@ -36160,7 +36660,7 @@ "cimguiname": "igTableSetColumnWidthAutoSingle", "defaults": {}, "funcname": "TableSetColumnWidthAutoSingle", - "location": "imgui_internal:3490", + "location": "imgui_internal:3640", "namespace": "ImGui", "ov_cimguiname": "igTableSetColumnWidthAutoSingle", "ret": "void", @@ -36177,7 +36677,7 @@ "cimguiname": "igTableSettingsAddSettingsHandler", "defaults": {}, "funcname": "TableSettingsAddSettingsHandler", - "location": "imgui_internal:3502", + "location": "imgui_internal:3652", "namespace": "ImGui", "ov_cimguiname": "igTableSettingsAddSettingsHandler", "ret": "void", @@ -36203,7 +36703,7 @@ "cimguiname": "igTableSettingsCreate", "defaults": {}, "funcname": "TableSettingsCreate", - "location": "imgui_internal:3503", + "location": "imgui_internal:3653", "namespace": "ImGui", "ov_cimguiname": "igTableSettingsCreate", "ret": "ImGuiTableSettings*", @@ -36225,7 +36725,7 @@ "cimguiname": "igTableSettingsFindByID", "defaults": {}, "funcname": "TableSettingsFindByID", - "location": "imgui_internal:3504", + "location": "imgui_internal:3654", "namespace": "ImGui", "ov_cimguiname": "igTableSettingsFindByID", "ret": "ImGuiTableSettings*", @@ -36263,7 +36763,7 @@ "user_id": "0" }, "funcname": "TableSetupColumn", - "location": "imgui:777", + "location": "imgui:793", "namespace": "ImGui", "ov_cimguiname": "igTableSetupColumn", "ret": "void", @@ -36285,7 +36785,7 @@ "cimguiname": "igTableSetupDrawChannels", "defaults": {}, "funcname": "TableSetupDrawChannels", - "location": "imgui_internal:3467", + "location": "imgui_internal:3617", "namespace": "ImGui", "ov_cimguiname": "igTableSetupDrawChannels", "ret": "void", @@ -36312,7 +36812,7 @@ "comment": "// lock columns/rows so they stay visible when scrolled.", "defaults": {}, "funcname": "TableSetupScrollFreeze", - "location": "imgui:778", + "location": "imgui:794", "namespace": "ImGui", "ov_cimguiname": "igTableSetupScrollFreeze", "ret": "void", @@ -36334,7 +36834,7 @@ "cimguiname": "igTableSortSpecsBuild", "defaults": {}, "funcname": "TableSortSpecsBuild", - "location": "imgui_internal:3478", + "location": "imgui_internal:3628", "namespace": "ImGui", "ov_cimguiname": "igTableSortSpecsBuild", "ret": "void", @@ -36356,7 +36856,7 @@ "cimguiname": "igTableSortSpecsSanitize", "defaults": {}, "funcname": "TableSortSpecsSanitize", - "location": "imgui_internal:3477", + "location": "imgui_internal:3627", "namespace": "ImGui", "ov_cimguiname": "igTableSortSpecsSanitize", "ret": "void", @@ -36378,7 +36878,7 @@ "cimguiname": "igTableUpdateBorders", "defaults": {}, "funcname": "TableUpdateBorders", - "location": "imgui_internal:3469", + "location": "imgui_internal:3619", "namespace": "ImGui", "ov_cimguiname": "igTableUpdateBorders", "ret": "void", @@ -36400,7 +36900,7 @@ "cimguiname": "igTableUpdateColumnsWeightFromWidth", "defaults": {}, "funcname": "TableUpdateColumnsWeightFromWidth", - "location": "imgui_internal:3470", + "location": "imgui_internal:3620", "namespace": "ImGui", "ov_cimguiname": "igTableUpdateColumnsWeightFromWidth", "ret": "void", @@ -36422,7 +36922,7 @@ "cimguiname": "igTableUpdateLayout", "defaults": {}, "funcname": "TableUpdateLayout", - "location": "imgui_internal:3468", + "location": "imgui_internal:3618", "namespace": "ImGui", "ov_cimguiname": "igTableUpdateLayout", "ret": "void", @@ -36444,7 +36944,7 @@ "cimguiname": "igTeleportMousePos", "defaults": {}, "funcname": "TeleportMousePos", - "location": "imgui_internal:3309", + "location": "imgui_internal:3451", "namespace": "ImGui", "ov_cimguiname": "igTeleportMousePos", "ret": "void", @@ -36466,7 +36966,7 @@ "cimguiname": "igTempInputIsActive", "defaults": {}, "funcname": "TempInputIsActive", - "location": "imgui_internal:3607", + "location": "imgui_internal:3757", "namespace": "ImGui", "ov_cimguiname": "igTempInputIsActive", "ret": "bool", @@ -36519,7 +37019,7 @@ "p_clamp_min": "NULL" }, "funcname": "TempInputScalar", - "location": "imgui_internal:3606", + "location": "imgui_internal:3756", "namespace": "ImGui", "ov_cimguiname": "igTempInputScalar", "ret": "bool", @@ -36561,7 +37061,7 @@ "cimguiname": "igTempInputText", "defaults": {}, "funcname": "TempInputText", - "location": "imgui_internal:3605", + "location": "imgui_internal:3755", "namespace": "ImGui", "ov_cimguiname": "igTempInputText", "ret": "bool", @@ -36588,7 +37088,7 @@ "comment": "// Test that key is either not owned, either owned by 'owner_id'", "defaults": {}, "funcname": "TestKeyOwner", - "location": "imgui_internal:3328", + "location": "imgui_internal:3470", "namespace": "ImGui", "ov_cimguiname": "igTestKeyOwner", "ret": "bool", @@ -36614,7 +37114,7 @@ "cimguiname": "igTestShortcutRouting", "defaults": {}, "funcname": "TestShortcutRouting", - "location": "imgui_internal:3356", + "location": "imgui_internal:3504", "namespace": "ImGui", "ov_cimguiname": "igTestShortcutRouting", "ret": "bool", @@ -36642,7 +37142,7 @@ "defaults": {}, "funcname": "Text", "isvararg": "...)", - "location": "imgui:498", + "location": "imgui:516", "namespace": "ImGui", "ov_cimguiname": "igText", "ret": "void", @@ -36674,7 +37174,7 @@ "defaults": {}, "funcname": "TextColored", "isvararg": "...)", - "location": "imgui:500", + "location": "imgui:518", "namespace": "ImGui", "ov_cimguiname": "igTextColored", "ret": "void", @@ -36704,7 +37204,7 @@ "cimguiname": "igTextColoredV", "defaults": {}, "funcname": "TextColoredV", - "location": "imgui:501", + "location": "imgui:519", "namespace": "ImGui", "ov_cimguiname": "igTextColoredV", "ret": "void", @@ -36732,7 +37232,7 @@ "defaults": {}, "funcname": "TextDisabled", "isvararg": "...)", - "location": "imgui:502", + "location": "imgui:520", "namespace": "ImGui", "ov_cimguiname": "igTextDisabled", "ret": "void", @@ -36758,7 +37258,7 @@ "cimguiname": "igTextDisabledV", "defaults": {}, "funcname": "TextDisabledV", - "location": "imgui:503", + "location": "imgui:521", "namespace": "ImGui", "ov_cimguiname": "igTextDisabledV", "ret": "void", @@ -36791,7 +37291,7 @@ "text_end": "NULL" }, "funcname": "TextEx", - "location": "imgui_internal:3554", + "location": "imgui_internal:3704", "namespace": "ImGui", "ov_cimguiname": "igTextEx", "ret": "void", @@ -36820,7 +37320,7 @@ "text_end": "NULL" }, "funcname": "TextUnformatted", - "location": "imgui:497", + "location": "imgui:515", "namespace": "ImGui", "ov_cimguiname": "igTextUnformatted", "ret": "void", @@ -36846,7 +37346,7 @@ "cimguiname": "igTextV", "defaults": {}, "funcname": "TextV", - "location": "imgui:499", + "location": "imgui:517", "namespace": "ImGui", "ov_cimguiname": "igTextV", "ret": "void", @@ -36874,7 +37374,7 @@ "defaults": {}, "funcname": "TextWrapped", "isvararg": "...)", - "location": "imgui:504", + "location": "imgui:522", "namespace": "ImGui", "ov_cimguiname": "igTextWrapped", "ret": "void", @@ -36900,7 +37400,7 @@ "cimguiname": "igTextWrappedV", "defaults": {}, "funcname": "TextWrappedV", - "location": "imgui:505", + "location": "imgui:523", "namespace": "ImGui", "ov_cimguiname": "igTextWrappedV", "ret": "void", @@ -36930,7 +37430,7 @@ "cimguiname": "igTranslateWindowsInViewport", "defaults": {}, "funcname": "TranslateWindowsInViewport", - "location": "imgui_internal:3148", + "location": "imgui_internal:3286", "namespace": "ImGui", "ov_cimguiname": "igTranslateWindowsInViewport", "ret": "void", @@ -36952,7 +37452,7 @@ "cimguiname": "igTreeNode", "defaults": {}, "funcname": "TreeNode", - "location": "imgui:617", + "location": "imgui:637", "namespace": "ImGui", "ov_cimguiname": "igTreeNode_Str", "ret": "bool", @@ -36982,7 +37482,7 @@ "defaults": {}, "funcname": "TreeNode", "isvararg": "...)", - "location": "imgui:618", + "location": "imgui:638", "namespace": "ImGui", "ov_cimguiname": "igTreeNode_StrStr", "ret": "bool", @@ -37012,7 +37512,7 @@ "defaults": {}, "funcname": "TreeNode", "isvararg": "...)", - "location": "imgui:619", + "location": "imgui:639", "namespace": "ImGui", "ov_cimguiname": "igTreeNode_Ptr", "ret": "bool", @@ -37048,7 +37548,7 @@ "label_end": "NULL" }, "funcname": "TreeNodeBehavior", - "location": "imgui_internal:3578", + "location": "imgui_internal:3728", "namespace": "ImGui", "ov_cimguiname": "igTreeNodeBehavior", "ret": "bool", @@ -37076,7 +37576,7 @@ "flags": "0" }, "funcname": "TreeNodeEx", - "location": "imgui:622", + "location": "imgui:642", "namespace": "ImGui", "ov_cimguiname": "igTreeNodeEx_Str", "ret": "bool", @@ -37109,7 +37609,7 @@ "defaults": {}, "funcname": "TreeNodeEx", "isvararg": "...)", - "location": "imgui:623", + "location": "imgui:643", "namespace": "ImGui", "ov_cimguiname": "igTreeNodeEx_StrStr", "ret": "bool", @@ -37142,7 +37642,7 @@ "defaults": {}, "funcname": "TreeNodeEx", "isvararg": "...)", - "location": "imgui:624", + "location": "imgui:644", "namespace": "ImGui", "ov_cimguiname": "igTreeNodeEx_Ptr", "ret": "bool", @@ -37176,7 +37676,7 @@ "cimguiname": "igTreeNodeExV", "defaults": {}, "funcname": "TreeNodeExV", - "location": "imgui:625", + "location": "imgui:645", "namespace": "ImGui", "ov_cimguiname": "igTreeNodeExV_Str", "ret": "bool", @@ -37208,7 +37708,7 @@ "cimguiname": "igTreeNodeExV", "defaults": {}, "funcname": "TreeNodeExV", - "location": "imgui:626", + "location": "imgui:646", "namespace": "ImGui", "ov_cimguiname": "igTreeNodeExV_Ptr", "ret": "bool", @@ -37234,7 +37734,7 @@ "cimguiname": "igTreeNodeSetOpen", "defaults": {}, "funcname": "TreeNodeSetOpen", - "location": "imgui_internal:3580", + "location": "imgui_internal:3730", "namespace": "ImGui", "ov_cimguiname": "igTreeNodeSetOpen", "ret": "void", @@ -37261,7 +37761,7 @@ "comment": "// Return open state. Consume previous SetNextItemOpen() data, if any. May return true when logging.", "defaults": {}, "funcname": "TreeNodeUpdateNextOpen", - "location": "imgui_internal:3581", + "location": "imgui_internal:3731", "namespace": "ImGui", "ov_cimguiname": "igTreeNodeUpdateNextOpen", "ret": "bool", @@ -37291,7 +37791,7 @@ "cimguiname": "igTreeNodeV", "defaults": {}, "funcname": "TreeNodeV", - "location": "imgui:620", + "location": "imgui:640", "namespace": "ImGui", "ov_cimguiname": "igTreeNodeV_Str", "ret": "bool", @@ -37319,7 +37819,7 @@ "cimguiname": "igTreeNodeV", "defaults": {}, "funcname": "TreeNodeV", - "location": "imgui:621", + "location": "imgui:641", "namespace": "ImGui", "ov_cimguiname": "igTreeNodeV_Ptr", "ret": "bool", @@ -37334,10 +37834,10 @@ "argsoriginal": "()", "call_args": "()", "cimguiname": "igTreePop", - "comment": "// ~ Unindent()+PopId()", + "comment": "// ~ Unindent()+PopID()", "defaults": {}, "funcname": "TreePop", - "location": "imgui:629", + "location": "imgui:649", "namespace": "ImGui", "ov_cimguiname": "igTreePop", "ret": "void", @@ -37357,10 +37857,10 @@ "argsoriginal": "(const char* str_id)", "call_args": "(str_id)", "cimguiname": "igTreePush", - "comment": "// ~ Indent()+PushId(). Already called by TreeNode() when returning true, but you can call TreePush/TreePop yourself if desired.", + "comment": "// ~ Indent()+PushID(). Already called by TreeNode() when returning true, but you can call TreePush/TreePop yourself if desired.", "defaults": {}, "funcname": "TreePush", - "location": "imgui:627", + "location": "imgui:647", "namespace": "ImGui", "ov_cimguiname": "igTreePush_Str", "ret": "void", @@ -37381,7 +37881,7 @@ "comment": "// \"", "defaults": {}, "funcname": "TreePush", - "location": "imgui:628", + "location": "imgui:648", "namespace": "ImGui", "ov_cimguiname": "igTreePush_Ptr", "ret": "void", @@ -37403,7 +37903,7 @@ "cimguiname": "igTreePushOverrideID", "defaults": {}, "funcname": "TreePushOverrideID", - "location": "imgui_internal:3579", + "location": "imgui_internal:3729", "namespace": "ImGui", "ov_cimguiname": "igTreePushOverrideID", "ret": "void", @@ -37439,7 +37939,7 @@ "cimguiname": "igTypingSelectFindBestLeadingMatch", "defaults": {}, "funcname": "TypingSelectFindBestLeadingMatch", - "location": "imgui_internal:3437", + "location": "imgui_internal:3585", "namespace": "ImGui", "ov_cimguiname": "igTypingSelectFindBestLeadingMatch", "ret": "int", @@ -37479,7 +37979,7 @@ "cimguiname": "igTypingSelectFindMatch", "defaults": {}, "funcname": "TypingSelectFindMatch", - "location": "imgui_internal:3435", + "location": "imgui_internal:3583", "namespace": "ImGui", "ov_cimguiname": "igTypingSelectFindMatch", "ret": "int", @@ -37519,7 +38019,7 @@ "cimguiname": "igTypingSelectFindNextSingleCharMatch", "defaults": {}, "funcname": "TypingSelectFindNextSingleCharMatch", - "location": "imgui_internal:3436", + "location": "imgui_internal:3584", "namespace": "ImGui", "ov_cimguiname": "igTypingSelectFindNextSingleCharMatch", "ret": "int", @@ -37544,7 +38044,7 @@ "indent_w": "0.0f" }, "funcname": "Unindent", - "location": "imgui:458", + "location": "imgui:485", "namespace": "ImGui", "ov_cimguiname": "igUnindent", "ret": "void", @@ -37561,7 +38061,7 @@ "cimguiname": "igUpdateHoveredWindowAndCaptureFlags", "defaults": {}, "funcname": "UpdateHoveredWindowAndCaptureFlags", - "location": "imgui_internal:3136", + "location": "imgui_internal:3274", "namespace": "ImGui", "ov_cimguiname": "igUpdateHoveredWindowAndCaptureFlags", "ret": "void", @@ -37583,7 +38083,7 @@ "cimguiname": "igUpdateInputEvents", "defaults": {}, "funcname": "UpdateInputEvents", - "location": "imgui_internal:3135", + "location": "imgui_internal:3273", "namespace": "ImGui", "ov_cimguiname": "igUpdateInputEvents", "ret": "void", @@ -37600,7 +38100,7 @@ "cimguiname": "igUpdateMouseMovingWindowEndFrame", "defaults": {}, "funcname": "UpdateMouseMovingWindowEndFrame", - "location": "imgui_internal:3140", + "location": "imgui_internal:3278", "namespace": "ImGui", "ov_cimguiname": "igUpdateMouseMovingWindowEndFrame", "ret": "void", @@ -37617,7 +38117,7 @@ "cimguiname": "igUpdateMouseMovingWindowNewFrame", "defaults": {}, "funcname": "UpdateMouseMovingWindowNewFrame", - "location": "imgui_internal:3139", + "location": "imgui_internal:3277", "namespace": "ImGui", "ov_cimguiname": "igUpdateMouseMovingWindowNewFrame", "ret": "void", @@ -37635,7 +38135,7 @@ "comment": "// call in main loop. will call CreateWindow/ResizeWindow/etc. platform functions for each secondary viewport, and DestroyWindow for each inactive viewport.", "defaults": {}, "funcname": "UpdatePlatformWindows", - "location": "imgui:998", + "location": "imgui:1017", "namespace": "ImGui", "ov_cimguiname": "igUpdatePlatformWindows", "ret": "void", @@ -37665,7 +38165,7 @@ "cimguiname": "igUpdateWindowParentAndRootLinks", "defaults": {}, "funcname": "UpdateWindowParentAndRootLinks", - "location": "imgui_internal:3099", + "location": "imgui_internal:3236", "namespace": "ImGui", "ov_cimguiname": "igUpdateWindowParentAndRootLinks", "ret": "void", @@ -37714,7 +38214,7 @@ "format": "\"%.3f\"" }, "funcname": "VSliderFloat", - "location": "imgui:583", + "location": "imgui:603", "namespace": "ImGui", "ov_cimguiname": "igVSliderFloat", "ret": "bool", @@ -37763,7 +38263,7 @@ "format": "\"%d\"" }, "funcname": "VSliderInt", - "location": "imgui:584", + "location": "imgui:604", "namespace": "ImGui", "ov_cimguiname": "igVSliderInt", "ret": "bool", @@ -37816,7 +38316,7 @@ "format": "NULL" }, "funcname": "VSliderScalar", - "location": "imgui:585", + "location": "imgui:605", "namespace": "ImGui", "ov_cimguiname": "igVSliderScalar", "ret": "bool", @@ -37842,7 +38342,7 @@ "cimguiname": "igValue", "defaults": {}, "funcname": "Value", - "location": "imgui:661", + "location": "imgui:681", "namespace": "ImGui", "ov_cimguiname": "igValue_Bool", "ret": "void", @@ -37866,7 +38366,7 @@ "cimguiname": "igValue", "defaults": {}, "funcname": "Value", - "location": "imgui:662", + "location": "imgui:682", "namespace": "ImGui", "ov_cimguiname": "igValue_Int", "ret": "void", @@ -37890,7 +38390,7 @@ "cimguiname": "igValue", "defaults": {}, "funcname": "Value", - "location": "imgui:663", + "location": "imgui:683", "namespace": "ImGui", "ov_cimguiname": "igValue_Uint", "ret": "void", @@ -37920,7 +38420,7 @@ "float_format": "NULL" }, "funcname": "Value", - "location": "imgui:664", + "location": "imgui:684", "namespace": "ImGui", "ov_cimguiname": "igValue_Float", "ret": "void", @@ -37950,7 +38450,7 @@ "cimguiname": "igWindowPosRelToAbs", "defaults": {}, "funcname": "WindowPosRelToAbs", - "location": "imgui_internal:3112", + "location": "imgui_internal:3250", "namespace": "ImGui", "nonUDT": 1, "ov_cimguiname": "igWindowPosRelToAbs", @@ -37981,7 +38481,7 @@ "cimguiname": "igWindowRectAbsToRel", "defaults": {}, "funcname": "WindowRectAbsToRel", - "location": "imgui_internal:3110", + "location": "imgui_internal:3248", "namespace": "ImGui", "nonUDT": 1, "ov_cimguiname": "igWindowRectAbsToRel", @@ -38012,7 +38512,7 @@ "cimguiname": "igWindowRectRelToAbs", "defaults": {}, "funcname": "WindowRectRelToAbs", - "location": "imgui_internal:3111", + "location": "imgui_internal:3249", "namespace": "ImGui", "nonUDT": 1, "ov_cimguiname": "igWindowRectRelToAbs", diff --git a/cimgui/cimgui_templates/impl_definitions.json b/cimgui/cimgui_templates/impl_definitions.json index b1c56aa6a..958d12f97 100644 --- a/cimgui/cimgui_templates/impl_definitions.json +++ b/cimgui/cimgui_templates/impl_definitions.json @@ -17,7 +17,7 @@ "cimguiname": "ImGui_ImplGlfw_CharCallback", "defaults": {}, "funcname": "ImGui_ImplGlfw_CharCallback", - "location": "imgui_impl_glfw:55", + "location": "imgui_impl_glfw:60", "ov_cimguiname": "ImGui_ImplGlfw_CharCallback", "ret": "void", "signature": "(GLFWwindow*,unsigned int)", @@ -42,7 +42,7 @@ "cimguiname": "ImGui_ImplGlfw_CursorEnterCallback", "defaults": {}, "funcname": "ImGui_ImplGlfw_CursorEnterCallback", - "location": "imgui_impl_glfw:50", + "location": "imgui_impl_glfw:55", "ov_cimguiname": "ImGui_ImplGlfw_CursorEnterCallback", "ret": "void", "signature": "(GLFWwindow*,int)", @@ -71,7 +71,7 @@ "cimguiname": "ImGui_ImplGlfw_CursorPosCallback", "defaults": {}, "funcname": "ImGui_ImplGlfw_CursorPosCallback", - "location": "imgui_impl_glfw:51", + "location": "imgui_impl_glfw:56", "ov_cimguiname": "ImGui_ImplGlfw_CursorPosCallback", "ret": "void", "signature": "(GLFWwindow*,double,double)", @@ -167,7 +167,7 @@ "cimguiname": "ImGui_ImplGlfw_InstallCallbacks", "defaults": {}, "funcname": "ImGui_ImplGlfw_InstallCallbacks", - "location": "imgui_impl_glfw:41", + "location": "imgui_impl_glfw:46", "ov_cimguiname": "ImGui_ImplGlfw_InstallCallbacks", "ret": "void", "signature": "(GLFWwindow*)", @@ -204,7 +204,7 @@ "cimguiname": "ImGui_ImplGlfw_KeyCallback", "defaults": {}, "funcname": "ImGui_ImplGlfw_KeyCallback", - "location": "imgui_impl_glfw:54", + "location": "imgui_impl_glfw:59", "ov_cimguiname": "ImGui_ImplGlfw_KeyCallback", "ret": "void", "signature": "(GLFWwindow*,int,int,int,int)", @@ -229,7 +229,7 @@ "cimguiname": "ImGui_ImplGlfw_MonitorCallback", "defaults": {}, "funcname": "ImGui_ImplGlfw_MonitorCallback", - "location": "imgui_impl_glfw:56", + "location": "imgui_impl_glfw:61", "ov_cimguiname": "ImGui_ImplGlfw_MonitorCallback", "ret": "void", "signature": "(GLFWmonitor*,int)", @@ -262,7 +262,7 @@ "cimguiname": "ImGui_ImplGlfw_MouseButtonCallback", "defaults": {}, "funcname": "ImGui_ImplGlfw_MouseButtonCallback", - "location": "imgui_impl_glfw:52", + "location": "imgui_impl_glfw:57", "ov_cimguiname": "ImGui_ImplGlfw_MouseButtonCallback", "ret": "void", "signature": "(GLFWwindow*,int,int,int)", @@ -299,7 +299,7 @@ "cimguiname": "ImGui_ImplGlfw_RestoreCallbacks", "defaults": {}, "funcname": "ImGui_ImplGlfw_RestoreCallbacks", - "location": "imgui_impl_glfw:42", + "location": "imgui_impl_glfw:47", "ov_cimguiname": "ImGui_ImplGlfw_RestoreCallbacks", "ret": "void", "signature": "(GLFWwindow*)", @@ -328,7 +328,7 @@ "cimguiname": "ImGui_ImplGlfw_ScrollCallback", "defaults": {}, "funcname": "ImGui_ImplGlfw_ScrollCallback", - "location": "imgui_impl_glfw:53", + "location": "imgui_impl_glfw:58", "ov_cimguiname": "ImGui_ImplGlfw_ScrollCallback", "ret": "void", "signature": "(GLFWwindow*,double,double)", @@ -349,7 +349,7 @@ "cimguiname": "ImGui_ImplGlfw_SetCallbacksChainForAllWindows", "defaults": {}, "funcname": "ImGui_ImplGlfw_SetCallbacksChainForAllWindows", - "location": "imgui_impl_glfw:46", + "location": "imgui_impl_glfw:51", "ov_cimguiname": "ImGui_ImplGlfw_SetCallbacksChainForAllWindows", "ret": "void", "signature": "(bool)", @@ -390,7 +390,7 @@ "cimguiname": "ImGui_ImplGlfw_WindowFocusCallback", "defaults": {}, "funcname": "ImGui_ImplGlfw_WindowFocusCallback", - "location": "imgui_impl_glfw:49", + "location": "imgui_impl_glfw:54", "ov_cimguiname": "ImGui_ImplGlfw_WindowFocusCallback", "ret": "void", "signature": "(GLFWwindow*,int)", @@ -684,7 +684,7 @@ "cimguiname": "ImGui_ImplSDL2_InitForD3D", "defaults": {}, "funcname": "ImGui_ImplSDL2_InitForD3D", - "location": "imgui_impl_sdl2:34", + "location": "imgui_impl_sdl2:35", "ov_cimguiname": "ImGui_ImplSDL2_InitForD3D", "ret": "bool", "signature": "(SDL_Window*)", @@ -705,7 +705,7 @@ "cimguiname": "ImGui_ImplSDL2_InitForMetal", "defaults": {}, "funcname": "ImGui_ImplSDL2_InitForMetal", - "location": "imgui_impl_sdl2:35", + "location": "imgui_impl_sdl2:36", "ov_cimguiname": "ImGui_ImplSDL2_InitForMetal", "ret": "bool", "signature": "(SDL_Window*)", @@ -730,7 +730,7 @@ "cimguiname": "ImGui_ImplSDL2_InitForOpenGL", "defaults": {}, "funcname": "ImGui_ImplSDL2_InitForOpenGL", - "location": "imgui_impl_sdl2:32", + "location": "imgui_impl_sdl2:33", "ov_cimguiname": "ImGui_ImplSDL2_InitForOpenGL", "ret": "bool", "signature": "(SDL_Window*,void*)", @@ -751,7 +751,7 @@ "cimguiname": "ImGui_ImplSDL2_InitForOther", "defaults": {}, "funcname": "ImGui_ImplSDL2_InitForOther", - "location": "imgui_impl_sdl2:37", + "location": "imgui_impl_sdl2:38", "ov_cimguiname": "ImGui_ImplSDL2_InitForOther", "ret": "bool", "signature": "(SDL_Window*)", @@ -776,7 +776,7 @@ "cimguiname": "ImGui_ImplSDL2_InitForSDLRenderer", "defaults": {}, "funcname": "ImGui_ImplSDL2_InitForSDLRenderer", - "location": "imgui_impl_sdl2:36", + "location": "imgui_impl_sdl2:37", "ov_cimguiname": "ImGui_ImplSDL2_InitForSDLRenderer", "ret": "bool", "signature": "(SDL_Window*,SDL_Renderer*)", @@ -797,7 +797,7 @@ "cimguiname": "ImGui_ImplSDL2_InitForVulkan", "defaults": {}, "funcname": "ImGui_ImplSDL2_InitForVulkan", - "location": "imgui_impl_sdl2:33", + "location": "imgui_impl_sdl2:34", "ov_cimguiname": "ImGui_ImplSDL2_InitForVulkan", "ret": "bool", "signature": "(SDL_Window*)", @@ -813,7 +813,7 @@ "cimguiname": "ImGui_ImplSDL2_NewFrame", "defaults": {}, "funcname": "ImGui_ImplSDL2_NewFrame", - "location": "imgui_impl_sdl2:39", + "location": "imgui_impl_sdl2:40", "ov_cimguiname": "ImGui_ImplSDL2_NewFrame", "ret": "void", "signature": "()", @@ -834,13 +834,45 @@ "cimguiname": "ImGui_ImplSDL2_ProcessEvent", "defaults": {}, "funcname": "ImGui_ImplSDL2_ProcessEvent", - "location": "imgui_impl_sdl2:40", + "location": "imgui_impl_sdl2:41", "ov_cimguiname": "ImGui_ImplSDL2_ProcessEvent", "ret": "bool", "signature": "(const SDL_Event*)", "stname": "" } ], + "ImGui_ImplSDL2_SetGamepadMode": [ + { + "args": "(ImGui_ImplSDL2_GamepadMode mode,struct _SDL_GameController** manual_gamepads_array,int manual_gamepads_count)", + "argsT": [ + { + "name": "mode", + "type": "ImGui_ImplSDL2_GamepadMode" + }, + { + "name": "manual_gamepads_array", + "type": "struct _SDL_GameController**" + }, + { + "name": "manual_gamepads_count", + "type": "int" + } + ], + "argsoriginal": "(ImGui_ImplSDL2_GamepadMode mode,struct _SDL_GameController** manual_gamepads_array=((void*)0),int manual_gamepads_count=-1)", + "call_args": "(mode,manual_gamepads_array,manual_gamepads_count)", + "cimguiname": "ImGui_ImplSDL2_SetGamepadMode", + "defaults": { + "manual_gamepads_array": "NULL", + "manual_gamepads_count": "-1" + }, + "funcname": "ImGui_ImplSDL2_SetGamepadMode", + "location": "imgui_impl_sdl2:46", + "ov_cimguiname": "ImGui_ImplSDL2_SetGamepadMode", + "ret": "void", + "signature": "(ImGui_ImplSDL2_GamepadMode,struct _SDL_GameController**,int)", + "stname": "" + } + ], "ImGui_ImplSDL2_Shutdown": [ { "args": "()", @@ -850,7 +882,7 @@ "cimguiname": "ImGui_ImplSDL2_Shutdown", "defaults": {}, "funcname": "ImGui_ImplSDL2_Shutdown", - "location": "imgui_impl_sdl2:38", + "location": "imgui_impl_sdl2:39", "ov_cimguiname": "ImGui_ImplSDL2_Shutdown", "ret": "void", "signature": "()", diff --git a/cimgui/cimgui_templates/structs_and_enums.json b/cimgui/cimgui_templates/structs_and_enums.json index f91cb4316..00821811d 100644 --- a/cimgui/cimgui_templates/structs_and_enums.json +++ b/cimgui/cimgui_templates/structs_and_enums.json @@ -21,6 +21,9 @@ "ImGuiButtonFlags_": { "above": "// Flags for InvisibleButton() [extended in imgui_internal.h]" }, + "ImGuiChildFlags_": { + "above": "// Flags for ImGui::BeginChild()\n// (Legacy: bit 0 must always correspond to ImGuiChildFlags_Border to be backward compatible with old API using 'bool border = false'.\n// About using AutoResizeX/AutoResizeY flags:\n// - May be combined with SetNextWindowSizeConstraints() to set a min/max size for each axis (see \"Demo->Child->Auto-resize with Constraints\").\n// - Size measurement for a given axis is only performed when the child window is within visible boundaries, or is just appearing.\n// - This allows BeginChild() to return false when not within boundaries (e.g. when scrolling), which is more optimal. BUT it won't update its auto-size while clipped.\n// While not perfect, it is a better default behavior as the always-on performance gain is more valuable than the occasional \"resizing after becoming visible again\" glitch.\n// - You may also use ImGuiChildFlags_AlwaysAutoResize to force an update even when child window is not in view.\n// HOWEVER PLEASE UNDERSTAND THAT DOING SO WILL PREVENT BeginChild() FROM EVER RETURNING FALSE, disabling benefits of coarse clipping." + }, "ImGuiCol_": { "above": "// Enumeration for PushStyleColor() / PopStyleColor()" }, @@ -34,10 +37,10 @@ "above": "// Flags for ImGui::BeginCombo()" }, "ImGuiCond_": { - "above": "// Enumeration for ImGui::SetWindow***(), SetNextWindow***(), SetNextItem***() functions\n// Represent a condition.\n// Important: Treat as a regular enum! Do NOT combine multiple values using binary operators! All the functions above treat 0 as a shortcut to ImGuiCond_Always." + "above": "// Enumeration for ImGui::SetNextWindow***(), SetWindow***(), SetNextItem***() functions\n// Represent a condition.\n// Important: Treat as a regular enum! Do NOT combine multiple values using binary operators! All the functions above treat 0 as a shortcut to ImGuiCond_Always." }, "ImGuiConfigFlags_": { - "above": "// Configuration flags stored in io.ConfigFlags. Set by user/application." + "above": "\n// Configuration flags stored in io.ConfigFlags. Set by user/application." }, "ImGuiDataAuthority_": { "above": "// Store the source authority (dock node vs window) of a field" @@ -76,7 +79,7 @@ "above": "// [Internal] Key ranges\n// [Internal] Named shortcuts for Navigation" }, "ImGuiInputFlags_": { - "above": "// Flags for extended versions of IsKeyPressed(), IsMouseClicked(), Shortcut(), SetKeyOwner(), SetItemKeyOwner()\n// Don't mistake with ImGuiInputTextFlags! (for ImGui::InputText() function)" + "above": "// Flags for extended versions of IsKeyPressed(), IsMouseClicked(), Shortcut(), SetKeyOwner(), SetItemKeyOwner()\n// Don't mistake with ImGuiInputTextFlags! (which is for ImGui::InputText() function)" }, "ImGuiInputTextFlagsPrivate_": { "above": "// Extend ImGuiInputTextFlags_" @@ -91,7 +94,7 @@ "above": "// Status flags for an already submitted item\n// - output: stored in g.LastItemData.StatusFlags" }, "ImGuiKey": { - "above": "// A key identifier (ImGuiKey_XXX or ImGuiMod_XXX value): can represent Keyboard, Mouse and Gamepad values.\n// All our named keys are >= 512. Keys value 0 to 511 are left unused as legacy native/opaque key values (< 1.87).\n// Since >= 1.89 we increased typing (went from int to enum), some legacy code may need a cast to ImGuiKey.\n// Read details about the 1.87 and 1.89 transition : https://github.com/ocornut/imgui/issues/4921\n// Note that \"Keys\" related to physical keys and are not the same concept as input \"Characters\", the later are submitted via io.AddInputCharacter()." + "above": "// A key identifier (ImGuiKey_XXX or ImGuiMod_XXX value): can represent Keyboard, Mouse and Gamepad values.\n// All our named keys are >= 512. Keys value 0 to 511 are left unused as legacy native/opaque key values (< 1.87).\n// Since >= 1.89 we increased typing (went from int to enum), some legacy code may need a cast to ImGuiKey.\n// Read details about the 1.87 and 1.89 transition : https://github.com/ocornut/imgui/issues/4921\n// Note that \"Keys\" related to physical keys and are not the same concept as input \"Characters\", the later are submitted via io.AddInputCharacter().\n// The keyboard key enum values are named after the keys on a standard US keyboard, and on other keyboard types the keys reported may not match the keycaps." }, "ImGuiLayoutType_": { "above": "// FIXME: this is in development, not exposed/functional as a generic feature yet.\n// Horizontal/Vertical enums are fixed to 0/1 so they may be used to index ImVec2" @@ -108,14 +111,11 @@ "ImGuiMouseSource": { "above": "// Enumeration for AddMouseSourceEvent() actual source of Mouse Input data.\n// Historically we use \"Mouse\" terminology everywhere to indicate pointer data, e.g. MousePos, IsMousePressed(), io.AddMousePosEvent()\n// But that \"Mouse\" data can come from different source which occasionally may be useful for application to know about.\n// You can submit a change of pointer type using io.AddMouseSourceEvent()." }, - "ImGuiNavInput": { - "above": "// OBSOLETED in 1.88 (from July 2022): ImGuiNavInput and io.NavInputs[].\n// Official backends between 1.60 and 1.86: will keep working and feed gamepad inputs as long as IMGUI_DISABLE_OBSOLETE_KEYIO is not set.\n// Custom backends: feed gamepad inputs via io.AddKeyEvent() and ImGuiKey_GamepadXXX enums." - }, "ImGuiOldColumnFlags_": { - "above": "// Flags for internal's BeginColumns(). Prefix using BeginTable() nowadays!" + "above": "// Flags for internal's BeginColumns(). This is an obsolete API. Prefer using BeginTable() nowadays!" }, "ImGuiPopupFlags_": { - "above": "// Flags for OpenPopup*(), BeginPopupContext*(), IsPopupOpen() functions.\n// - To be backward compatible with older API which took an 'int mouse_button = 1' argument, we need to treat\n// small flags values as a mouse button index, so we encode the mouse button in the first few bits of the flags.\n// It is therefore guaranteed to be legal to pass a mouse button index in ImGuiPopupFlags.\n// - For the same reason, we exceptionally default the ImGuiPopupFlags argument of BeginPopupContextXXX functions to 1 instead of 0.\n// IMPORTANT: because the default parameter is 1 (==ImGuiPopupFlags_MouseButtonRight), if you rely on the default parameter\n// and want to use another flag, you need to pass in the ImGuiPopupFlags_MouseButtonRight flag explicitly.\n// - Multiple buttons currently cannot be combined/or-ed in those functions (we could allow it later)." + "above": "// Flags for OpenPopup*(), BeginPopupContext*(), IsPopupOpen() functions.\n// - To be backward compatible with older API which took an 'int mouse_button = 1' argument instead of 'ImGuiPopupFlags flags',\n// we need to treat small flags values as a mouse button index, so we encode the mouse button in the first few bits of the flags.\n// It is therefore guaranteed to be legal to pass a mouse button index in ImGuiPopupFlags.\n// - For the same reason, we exceptionally default the ImGuiPopupFlags argument of BeginPopupContextXXX functions to 1 instead of 0.\n// IMPORTANT: because the default parameter is 1 (==ImGuiPopupFlags_MouseButtonRight), if you rely on the default parameter\n// and want to use another flag, you need to pass in the ImGuiPopupFlags_MouseButtonRight flag explicitly.\n// - Multiple buttons currently cannot be combined/or-ed in those functions (we could allow it later)." }, "ImGuiScrollFlags_": { "above": "// Early work-in-progress API for ScrollToItem()" @@ -340,6 +340,18 @@ "comment": "// Request widget to preserve state if it can (e.g. InputText will try to preserve cursor/selection)", "name": "ImGuiActivateFlags_TryToPreserveState", "value": "1 << 2" + }, + { + "calc_value": 8, + "comment": "// Activation requested by a tabbing request", + "name": "ImGuiActivateFlags_FromTabbing", + "value": "1 << 3" + }, + { + "calc_value": 16, + "comment": "// Activation requested by an item shortcut via SetNextItemShortcut() function.", + "name": "ImGuiActivateFlags_FromShortcut", + "value": "1 << 4" } ], "ImGuiAxis": [ @@ -557,6 +569,61 @@ "value": "ImGuiButtonFlags_MouseButtonLeft" } ], + "ImGuiChildFlags_": [ + { + "calc_value": 0, + "name": "ImGuiChildFlags_None", + "value": "0" + }, + { + "calc_value": 1, + "comment": "// Show an outer border and enable WindowPadding. (IMPORTANT: this is always == 1 == true for legacy reason)", + "name": "ImGuiChildFlags_Border", + "value": "1 << 0" + }, + { + "calc_value": 2, + "comment": "// Pad with style.WindowPadding even if no border are drawn (no padding by default for non-bordered child windows because it makes more sense)", + "name": "ImGuiChildFlags_AlwaysUseWindowPadding", + "value": "1 << 1" + }, + { + "calc_value": 4, + "comment": "// Allow resize from right border (layout direction). Enable .ini saving (unless ImGuiWindowFlags_NoSavedSettings passed to window flags)", + "name": "ImGuiChildFlags_ResizeX", + "value": "1 << 2" + }, + { + "calc_value": 8, + "comment": "// Allow resize from bottom border (layout direction). \"", + "name": "ImGuiChildFlags_ResizeY", + "value": "1 << 3" + }, + { + "calc_value": 16, + "comment": "// Enable auto-resizing width. Read \"IMPORTANT: Size measurement\" details above.", + "name": "ImGuiChildFlags_AutoResizeX", + "value": "1 << 4" + }, + { + "calc_value": 32, + "comment": "// Enable auto-resizing height. Read \"IMPORTANT: Size measurement\" details above.", + "name": "ImGuiChildFlags_AutoResizeY", + "value": "1 << 5" + }, + { + "calc_value": 64, + "comment": "// Combined with AutoResizeX/AutoResizeY. Always measure size even when child is hidden, always return true, always disable clipping optimization! NOT RECOMMENDED.", + "name": "ImGuiChildFlags_AlwaysAutoResize", + "value": "1 << 6" + }, + { + "calc_value": 128, + "comment": "// Style the child window like a framed item: use FrameBg, FrameRounding, FrameBorderSize, FramePadding instead of ChildBg, ChildRounding, ChildBorderSize, WindowPadding.", + "name": "ImGuiChildFlags_FrameStyle", + "value": "1 << 7" + } + ], "ImGuiCol_": [ { "calc_value": 0, @@ -614,16 +681,19 @@ }, { "calc_value": 10, + "comment": "// Title bar", "name": "ImGuiCol_TitleBg", "value": "10" }, { "calc_value": 11, + "comment": "// Title bar when focused", "name": "ImGuiCol_TitleBgActive", "value": "11" }, { "calc_value": 12, + "comment": "// Title bar when collapsed", "name": "ImGuiCol_TitleBgCollapsed", "value": "12" }, @@ -654,6 +724,7 @@ }, { "calc_value": 18, + "comment": "// Checkbox tick and RadioButton circle", "name": "ImGuiCol_CheckMark", "value": "18" }, @@ -1084,6 +1155,12 @@ "name": "ImGuiComboFlags_NoPreview", "value": "1 << 6" }, + { + "calc_value": 128, + "comment": "// Width dynamically calculated from preview contents", + "name": "ImGuiComboFlags_WidthFitPreview", + "value": "1 << 7" + }, { "calc_value": 30, "name": "ImGuiComboFlags_HeightMask_", @@ -1387,30 +1464,35 @@ }, { "calc_value": 128, - "name": "ImGuiDebugLogFlags_EventDocking", + "name": "ImGuiDebugLogFlags_EventInputRouting", "value": "1 << 7" }, { "calc_value": 256, - "name": "ImGuiDebugLogFlags_EventViewport", + "name": "ImGuiDebugLogFlags_EventDocking", "value": "1 << 8" }, { - "calc_value": 511, + "calc_value": 512, + "name": "ImGuiDebugLogFlags_EventViewport", + "value": "1 << 9" + }, + { + "calc_value": 1023, "name": "ImGuiDebugLogFlags_EventMask_", - "value": "ImGuiDebugLogFlags_EventActiveId | ImGuiDebugLogFlags_EventFocus | ImGuiDebugLogFlags_EventPopup | ImGuiDebugLogFlags_EventNav | ImGuiDebugLogFlags_EventClipper | ImGuiDebugLogFlags_EventSelection | ImGuiDebugLogFlags_EventIO | ImGuiDebugLogFlags_EventDocking | ImGuiDebugLogFlags_EventViewport" + "value": "ImGuiDebugLogFlags_EventActiveId | ImGuiDebugLogFlags_EventFocus | ImGuiDebugLogFlags_EventPopup | ImGuiDebugLogFlags_EventNav | ImGuiDebugLogFlags_EventClipper | ImGuiDebugLogFlags_EventSelection | ImGuiDebugLogFlags_EventIO | ImGuiDebugLogFlags_EventInputRouting | ImGuiDebugLogFlags_EventDocking | ImGuiDebugLogFlags_EventViewport" }, { - "calc_value": 1024, + "calc_value": 1048576, "comment": "// Also send output to TTY", "name": "ImGuiDebugLogFlags_OutputToTTY", - "value": "1 << 10" + "value": "1 << 20" }, { - "calc_value": 2048, + "calc_value": 2097152, "comment": "// Also send output to Test Engine", "name": "ImGuiDebugLogFlags_OutputToTestEngine", - "value": "1 << 11" + "value": "1 << 21" } ], "ImGuiDir_": [ @@ -1494,6 +1576,12 @@ "name": "ImGuiDockNodeFlags_NoResizeY", "value": "1 << 17" }, + { + "calc_value": 262144, + "comment": "// // Any docked window will be automatically be focus-route chained (window->ParentWindowForFocusRoute set to this) so Shortcut() in this window can run when any docked window is focused.", + "name": "ImGuiDockNodeFlags_DockedWindowsInFocusRoute", + "value": "1 << 18" + }, { "calc_value": 524288, "comment": "// // Disable this node from splitting other windows/nodes.", @@ -1940,7 +2028,7 @@ }, { "calc_value": 1, - "comment": "// Return true on successive repeats. Default for legacy IsKeyPressed(). NOT Default for legacy IsMouseClicked(). MUST BE == 1.", + "comment": "// Enable repeat. Return true on successive repeats. Default for legacy IsKeyPressed(). NOT Default for legacy IsMouseClicked(). MUST BE == 1.", "name": "ImGuiInputFlags_Repeat", "value": "1 << 0" }, @@ -1962,109 +2050,143 @@ "name": "ImGuiInputFlags_RepeatRateNavTweak", "value": "1 << 3" }, - { - "calc_value": 14, - "name": "ImGuiInputFlags_RepeatRateMask_", - "value": "ImGuiInputFlags_RepeatRateDefault | ImGuiInputFlags_RepeatRateNavMove | ImGuiInputFlags_RepeatRateNavTweak" - }, { "calc_value": 16, - "comment": "// Only set if item is hovered (default to both)", - "name": "ImGuiInputFlags_CondHovered", + "comment": "// Stop repeating when released (default for all functions except Shortcut). This only exists to allow overriding Shortcut() default behavior.", + "name": "ImGuiInputFlags_RepeatUntilRelease", "value": "1 << 4" }, { "calc_value": 32, - "comment": "// Only set if item is active (default to both)", - "name": "ImGuiInputFlags_CondActive", + "comment": "// Stop repeating when released OR if keyboard mods are changed (default for Shortcut)", + "name": "ImGuiInputFlags_RepeatUntilKeyModsChange", "value": "1 << 5" }, - { - "calc_value": 48, - "name": "ImGuiInputFlags_CondDefault_", - "value": "ImGuiInputFlags_CondHovered | ImGuiInputFlags_CondActive" - }, - { - "calc_value": 48, - "name": "ImGuiInputFlags_CondMask_", - "value": "ImGuiInputFlags_CondHovered | ImGuiInputFlags_CondActive" - }, { "calc_value": 64, - "comment": "// Access to key data will require EXPLICIT owner ID (ImGuiKeyOwner_Any/0 will NOT accepted for polling). Cleared at end of frame. This is useful to make input-owner-aware code steal keys from non-input-owner-aware code.", - "name": "ImGuiInputFlags_LockThisFrame", + "comment": "// Stop repeating when released OR if keyboard mods are leaving the None state. Allows going from Mod+Key to Key by releasing Mod.", + "name": "ImGuiInputFlags_RepeatUntilKeyModsChangeFromNone", "value": "1 << 6" }, { "calc_value": 128, - "comment": "// Access to key data will require EXPLICIT owner ID (ImGuiKeyOwner_Any/0 will NOT accepted for polling). Cleared when the key is released or at end of each frame if key is released. This is useful to make input-owner-aware code steal keys from non-input-owner-aware code.", - "name": "ImGuiInputFlags_LockUntilRelease", + "comment": "// Stop repeating when released OR if any other keyboard key is pressed during the repeat", + "name": "ImGuiInputFlags_RepeatUntilOtherKeyPress", "value": "1 << 7" }, { "calc_value": 256, - "comment": "// (Default) Register focused route: Accept inputs if window is in focus stack. Deep-most focused window takes inputs. ActiveId takes inputs over deep-most focused window.", - "name": "ImGuiInputFlags_RouteFocused", + "comment": "// Only set if item is hovered (default to both)", + "name": "ImGuiInputFlags_CondHovered", "value": "1 << 8" }, { "calc_value": 512, - "comment": "// Register route globally (lowest priority: unless a focused window or active item registered the route) -> recommended Global priority.", - "name": "ImGuiInputFlags_RouteGlobalLow", + "comment": "// Only set if item is active (default to both)", + "name": "ImGuiInputFlags_CondActive", "value": "1 << 9" }, + { + "calc_value": 768, + "name": "ImGuiInputFlags_CondDefault_", + "value": "ImGuiInputFlags_CondHovered | ImGuiInputFlags_CondActive" + }, { "calc_value": 1024, - "comment": "// Register route globally (medium priority: unless an active item registered the route, e.g. CTRL+A registered by InputText).", - "name": "ImGuiInputFlags_RouteGlobal", + "comment": "// Further accesses to key data will require EXPLICIT owner ID (ImGuiKeyOwner_Any/0 will NOT accepted for polling). Cleared at end of frame.", + "name": "ImGuiInputFlags_LockThisFrame", "value": "1 << 10" }, { "calc_value": 2048, - "comment": "// Register route globally (highest priority: unlikely you need to use that: will interfere with every active items)", - "name": "ImGuiInputFlags_RouteGlobalHigh", + "comment": "// Further accesses to key data will require EXPLICIT owner ID (ImGuiKeyOwner_Any/0 will NOT accepted for polling). Cleared when the key is released or at end of each frame if key is released.", + "name": "ImGuiInputFlags_LockUntilRelease", "value": "1 << 11" }, { - "calc_value": 3840, - "comment": "// _Always not part of this!", - "name": "ImGuiInputFlags_RouteMask_", - "value": "ImGuiInputFlags_RouteFocused | ImGuiInputFlags_RouteGlobal | ImGuiInputFlags_RouteGlobalLow | ImGuiInputFlags_RouteGlobalHigh" + "calc_value": 4096, + "comment": "// (Default) Honor focus route: Accept inputs if window is in focus stack. Deep-most focused window takes inputs. ActiveId takes inputs over deep-most focused window.", + "name": "ImGuiInputFlags_RouteFocused", + "value": "1 << 12" }, { - "calc_value": 4096, + "calc_value": 8192, + "comment": "// Register route globally (lowest priority: unless a focused window or active item registered the route) -> recommended Global priority IF you need a Global priority.", + "name": "ImGuiInputFlags_RouteGlobalLow", + "value": "1 << 13" + }, + { + "calc_value": 16384, + "comment": "// Register route globally (medium priority: unless an active item registered the route, e.g. CTRL+A registered by InputText will take priority over this).", + "name": "ImGuiInputFlags_RouteGlobal", + "value": "1 << 14" + }, + { + "calc_value": 32768, + "comment": "// Register route globally (higher priority: unlikely you need to use that: will interfere with every active items, e.g. CTRL+A registered by InputText will be overriden by this)", + "name": "ImGuiInputFlags_RouteGlobalHigh", + "value": "1 << 15" + }, + { + "calc_value": 65536, "comment": "// Do not register route, poll keys directly.", "name": "ImGuiInputFlags_RouteAlways", - "value": "1 << 12" + "value": "1 << 16" }, { - "calc_value": 8192, + "calc_value": 131072, "comment": "// Global routes will not be applied if underlying background/void is focused (== no Dear ImGui windows are focused). Useful for overlay applications.", "name": "ImGuiInputFlags_RouteUnlessBgFocused", - "value": "1 << 13" + "value": "1 << 17" }, { - "calc_value": 12288, - "name": "ImGuiInputFlags_RouteExtraMask_", - "value": "ImGuiInputFlags_RouteAlways | ImGuiInputFlags_RouteUnlessBgFocused" + "calc_value": 14, + "name": "ImGuiInputFlags_RepeatRateMask_", + "value": "ImGuiInputFlags_RepeatRateDefault | ImGuiInputFlags_RepeatRateNavMove | ImGuiInputFlags_RepeatRateNavTweak" }, { - "calc_value": 15, + "calc_value": 240, + "name": "ImGuiInputFlags_RepeatUntilMask_", + "value": "ImGuiInputFlags_RepeatUntilRelease | ImGuiInputFlags_RepeatUntilKeyModsChange | ImGuiInputFlags_RepeatUntilKeyModsChangeFromNone | ImGuiInputFlags_RepeatUntilOtherKeyPress" + }, + { + "calc_value": 255, + "name": "ImGuiInputFlags_RepeatMask_", + "value": "ImGuiInputFlags_Repeat | ImGuiInputFlags_RepeatRateMask_ | ImGuiInputFlags_RepeatUntilMask_" + }, + { + "calc_value": 768, + "name": "ImGuiInputFlags_CondMask_", + "value": "ImGuiInputFlags_CondHovered | ImGuiInputFlags_CondActive" + }, + { + "calc_value": 61440, + "comment": "// _Always not part of this!", + "name": "ImGuiInputFlags_RouteMask_", + "value": "ImGuiInputFlags_RouteFocused | ImGuiInputFlags_RouteGlobal | ImGuiInputFlags_RouteGlobalLow | ImGuiInputFlags_RouteGlobalHigh" + }, + { + "calc_value": 255, "name": "ImGuiInputFlags_SupportedByIsKeyPressed", - "value": "ImGuiInputFlags_Repeat | ImGuiInputFlags_RepeatRateMask_" + "value": "ImGuiInputFlags_RepeatMask_" + }, + { + "calc_value": 1, + "name": "ImGuiInputFlags_SupportedByIsMouseClicked", + "value": "ImGuiInputFlags_Repeat" }, { - "calc_value": 16143, + "calc_value": 258303, "name": "ImGuiInputFlags_SupportedByShortcut", - "value": "ImGuiInputFlags_Repeat | ImGuiInputFlags_RepeatRateMask_ | ImGuiInputFlags_RouteMask_ | ImGuiInputFlags_RouteExtraMask_" + "value": "ImGuiInputFlags_RepeatMask_ | ImGuiInputFlags_RouteMask_ | ImGuiInputFlags_RouteAlways | ImGuiInputFlags_RouteUnlessBgFocused" }, { - "calc_value": 192, + "calc_value": 3072, "name": "ImGuiInputFlags_SupportedBySetKeyOwner", "value": "ImGuiInputFlags_LockThisFrame | ImGuiInputFlags_LockUntilRelease" }, { - "calc_value": 240, + "calc_value": 3840, "name": "ImGuiInputFlags_SupportedBySetItemKeyOwner", "value": "ImGuiInputFlags_SupportedBySetKeyOwner | ImGuiInputFlags_CondMask_" } @@ -2391,14 +2513,14 @@ }, { "calc_value": 256, - "comment": "// Set when the Focusable item just got focused by Tabbing (FIXME: to be removed soon)", - "name": "ImGuiItemStatusFlags_FocusedByTabbing", + "comment": "// [WIP] Set when item is overlapping the current clipping rectangle (Used internally. Please don't use yet: API/system will change as we refactor Itemadd()).", + "name": "ImGuiItemStatusFlags_Visible", "value": "1 << 8" }, { "calc_value": 512, - "comment": "// [WIP] Set when item is overlapping the current clipping rectangle (Used internally. Please don't use yet: API/system will change as we refactor Itemadd()).", - "name": "ImGuiItemStatusFlags_Visible", + "comment": "// g.LastItemData.ClipRect is valid", + "name": "ImGuiItemStatusFlags_HasClipRect", "value": "1 << 9" } ], @@ -2771,384 +2893,455 @@ }, { "calc_value": 584, - "comment": "// '", - "name": "ImGuiKey_Apostrophe", + "name": "ImGuiKey_F13", "value": "584" }, { "calc_value": 585, - "comment": "// ,", - "name": "ImGuiKey_Comma", + "name": "ImGuiKey_F14", "value": "585" }, { "calc_value": 586, - "comment": "// -", - "name": "ImGuiKey_Minus", + "name": "ImGuiKey_F15", "value": "586" }, { "calc_value": 587, - "comment": "// .", - "name": "ImGuiKey_Period", + "name": "ImGuiKey_F16", "value": "587" }, { "calc_value": 588, - "comment": "// /", - "name": "ImGuiKey_Slash", + "name": "ImGuiKey_F17", "value": "588" }, { "calc_value": 589, - "comment": "// ;", - "name": "ImGuiKey_Semicolon", + "name": "ImGuiKey_F18", "value": "589" }, { "calc_value": 590, - "comment": "// =", - "name": "ImGuiKey_Equal", + "name": "ImGuiKey_F19", "value": "590" }, { "calc_value": 591, - "comment": "// [", - "name": "ImGuiKey_LeftBracket", + "name": "ImGuiKey_F20", "value": "591" }, { "calc_value": 592, - "comment": "// \\ (this text inhibit multiline comment caused by backslash)", - "name": "ImGuiKey_Backslash", + "name": "ImGuiKey_F21", "value": "592" }, { "calc_value": 593, - "comment": "// ]", - "name": "ImGuiKey_RightBracket", + "name": "ImGuiKey_F22", "value": "593" }, { "calc_value": 594, - "comment": "// `", - "name": "ImGuiKey_GraveAccent", + "name": "ImGuiKey_F23", "value": "594" }, { "calc_value": 595, - "name": "ImGuiKey_CapsLock", + "name": "ImGuiKey_F24", "value": "595" }, { "calc_value": 596, - "name": "ImGuiKey_ScrollLock", + "comment": "// '", + "name": "ImGuiKey_Apostrophe", "value": "596" }, { "calc_value": 597, - "name": "ImGuiKey_NumLock", + "comment": "// ,", + "name": "ImGuiKey_Comma", "value": "597" }, { "calc_value": 598, - "name": "ImGuiKey_PrintScreen", + "comment": "// -", + "name": "ImGuiKey_Minus", "value": "598" }, { "calc_value": 599, - "name": "ImGuiKey_Pause", + "comment": "// .", + "name": "ImGuiKey_Period", "value": "599" }, { "calc_value": 600, - "name": "ImGuiKey_Keypad0", + "comment": "// /", + "name": "ImGuiKey_Slash", "value": "600" }, { "calc_value": 601, - "name": "ImGuiKey_Keypad1", + "comment": "// ;", + "name": "ImGuiKey_Semicolon", "value": "601" }, { "calc_value": 602, - "name": "ImGuiKey_Keypad2", + "comment": "// =", + "name": "ImGuiKey_Equal", "value": "602" }, { "calc_value": 603, - "name": "ImGuiKey_Keypad3", + "comment": "// [", + "name": "ImGuiKey_LeftBracket", "value": "603" }, { "calc_value": 604, - "name": "ImGuiKey_Keypad4", + "comment": "// \\ (this text inhibit multiline comment caused by backslash)", + "name": "ImGuiKey_Backslash", "value": "604" }, { "calc_value": 605, - "name": "ImGuiKey_Keypad5", + "comment": "// ]", + "name": "ImGuiKey_RightBracket", "value": "605" }, { "calc_value": 606, - "name": "ImGuiKey_Keypad6", + "comment": "// `", + "name": "ImGuiKey_GraveAccent", "value": "606" }, { "calc_value": 607, - "name": "ImGuiKey_Keypad7", + "name": "ImGuiKey_CapsLock", "value": "607" }, { "calc_value": 608, - "name": "ImGuiKey_Keypad8", + "name": "ImGuiKey_ScrollLock", "value": "608" }, { "calc_value": 609, - "name": "ImGuiKey_Keypad9", + "name": "ImGuiKey_NumLock", "value": "609" }, { "calc_value": 610, - "name": "ImGuiKey_KeypadDecimal", + "name": "ImGuiKey_PrintScreen", "value": "610" }, { "calc_value": 611, - "name": "ImGuiKey_KeypadDivide", + "name": "ImGuiKey_Pause", "value": "611" }, { "calc_value": 612, - "name": "ImGuiKey_KeypadMultiply", + "name": "ImGuiKey_Keypad0", "value": "612" }, { "calc_value": 613, - "name": "ImGuiKey_KeypadSubtract", + "name": "ImGuiKey_Keypad1", "value": "613" }, { "calc_value": 614, - "name": "ImGuiKey_KeypadAdd", + "name": "ImGuiKey_Keypad2", "value": "614" }, { "calc_value": 615, - "name": "ImGuiKey_KeypadEnter", + "name": "ImGuiKey_Keypad3", "value": "615" }, { "calc_value": 616, - "name": "ImGuiKey_KeypadEqual", + "name": "ImGuiKey_Keypad4", "value": "616" }, { "calc_value": 617, - "comment": "// Menu (Xbox) + (Switch) Start/Options (PS)", - "name": "ImGuiKey_GamepadStart", + "name": "ImGuiKey_Keypad5", "value": "617" }, { "calc_value": 618, - "comment": "// View (Xbox) - (Switch) Share (PS)", - "name": "ImGuiKey_GamepadBack", + "name": "ImGuiKey_Keypad6", "value": "618" }, { "calc_value": 619, - "comment": "// X (Xbox) Y (Switch) Square (PS) // Tap: Toggle Menu. Hold: Windowing mode (Focus/Move/Resize windows)", - "name": "ImGuiKey_GamepadFaceLeft", + "name": "ImGuiKey_Keypad7", "value": "619" }, { "calc_value": 620, - "comment": "// B (Xbox) A (Switch) Circle (PS) // Cancel / Close / Exit", - "name": "ImGuiKey_GamepadFaceRight", + "name": "ImGuiKey_Keypad8", "value": "620" }, { "calc_value": 621, - "comment": "// Y (Xbox) X (Switch) Triangle (PS) // Text Input / On-screen Keyboard", - "name": "ImGuiKey_GamepadFaceUp", + "name": "ImGuiKey_Keypad9", "value": "621" }, { "calc_value": 622, - "comment": "// A (Xbox) B (Switch) Cross (PS) // Activate / Open / Toggle / Tweak", - "name": "ImGuiKey_GamepadFaceDown", + "name": "ImGuiKey_KeypadDecimal", "value": "622" }, { "calc_value": 623, - "comment": "// D-pad Left // Move / Tweak / Resize Window (in Windowing mode)", - "name": "ImGuiKey_GamepadDpadLeft", + "name": "ImGuiKey_KeypadDivide", "value": "623" }, { "calc_value": 624, - "comment": "// D-pad Right // Move / Tweak / Resize Window (in Windowing mode)", - "name": "ImGuiKey_GamepadDpadRight", + "name": "ImGuiKey_KeypadMultiply", "value": "624" }, { "calc_value": 625, - "comment": "// D-pad Up // Move / Tweak / Resize Window (in Windowing mode)", - "name": "ImGuiKey_GamepadDpadUp", + "name": "ImGuiKey_KeypadSubtract", "value": "625" }, { "calc_value": 626, - "comment": "// D-pad Down // Move / Tweak / Resize Window (in Windowing mode)", - "name": "ImGuiKey_GamepadDpadDown", + "name": "ImGuiKey_KeypadAdd", "value": "626" }, { "calc_value": 627, - "comment": "// L Bumper (Xbox) L (Switch) L1 (PS) // Tweak Slower / Focus Previous (in Windowing mode)", - "name": "ImGuiKey_GamepadL1", + "name": "ImGuiKey_KeypadEnter", "value": "627" }, { "calc_value": 628, - "comment": "// R Bumper (Xbox) R (Switch) R1 (PS) // Tweak Faster / Focus Next (in Windowing mode)", - "name": "ImGuiKey_GamepadR1", + "name": "ImGuiKey_KeypadEqual", "value": "628" }, { "calc_value": 629, - "comment": "// L Trig. (Xbox) ZL (Switch) L2 (PS) [Analog]", - "name": "ImGuiKey_GamepadL2", + "comment": "// Available on some keyboard/mouses. Often referred as \"Browser Back\"", + "name": "ImGuiKey_AppBack", "value": "629" }, { "calc_value": 630, - "comment": "// R Trig. (Xbox) ZR (Switch) R2 (PS) [Analog]", - "name": "ImGuiKey_GamepadR2", + "name": "ImGuiKey_AppForward", "value": "630" }, { "calc_value": 631, - "comment": "// L Stick (Xbox) L3 (Switch) L3 (PS)", - "name": "ImGuiKey_GamepadL3", + "comment": "// Menu (Xbox) + (Switch) Start/Options (PS)", + "name": "ImGuiKey_GamepadStart", "value": "631" }, { "calc_value": 632, - "comment": "// R Stick (Xbox) R3 (Switch) R3 (PS)", - "name": "ImGuiKey_GamepadR3", + "comment": "// View (Xbox) - (Switch) Share (PS)", + "name": "ImGuiKey_GamepadBack", "value": "632" }, { "calc_value": 633, - "comment": "// [Analog] // Move Window (in Windowing mode)", - "name": "ImGuiKey_GamepadLStickLeft", + "comment": "// X (Xbox) Y (Switch) Square (PS) // Tap: Toggle Menu. Hold: Windowing mode (Focus/Move/Resize windows)", + "name": "ImGuiKey_GamepadFaceLeft", "value": "633" }, { "calc_value": 634, - "comment": "// [Analog] // Move Window (in Windowing mode)", - "name": "ImGuiKey_GamepadLStickRight", + "comment": "// B (Xbox) A (Switch) Circle (PS) // Cancel / Close / Exit", + "name": "ImGuiKey_GamepadFaceRight", "value": "634" }, { "calc_value": 635, - "comment": "// [Analog] // Move Window (in Windowing mode)", - "name": "ImGuiKey_GamepadLStickUp", + "comment": "// Y (Xbox) X (Switch) Triangle (PS) // Text Input / On-screen Keyboard", + "name": "ImGuiKey_GamepadFaceUp", "value": "635" }, { "calc_value": 636, - "comment": "// [Analog] // Move Window (in Windowing mode)", - "name": "ImGuiKey_GamepadLStickDown", + "comment": "// A (Xbox) B (Switch) Cross (PS) // Activate / Open / Toggle / Tweak", + "name": "ImGuiKey_GamepadFaceDown", "value": "636" }, { "calc_value": 637, - "comment": "// [Analog]", - "name": "ImGuiKey_GamepadRStickLeft", + "comment": "// D-pad Left // Move / Tweak / Resize Window (in Windowing mode)", + "name": "ImGuiKey_GamepadDpadLeft", "value": "637" }, { "calc_value": 638, - "comment": "// [Analog]", - "name": "ImGuiKey_GamepadRStickRight", + "comment": "// D-pad Right // Move / Tweak / Resize Window (in Windowing mode)", + "name": "ImGuiKey_GamepadDpadRight", "value": "638" }, { "calc_value": 639, - "comment": "// [Analog]", - "name": "ImGuiKey_GamepadRStickUp", + "comment": "// D-pad Up // Move / Tweak / Resize Window (in Windowing mode)", + "name": "ImGuiKey_GamepadDpadUp", "value": "639" }, { "calc_value": 640, - "comment": "// [Analog]", - "name": "ImGuiKey_GamepadRStickDown", + "comment": "// D-pad Down // Move / Tweak / Resize Window (in Windowing mode)", + "name": "ImGuiKey_GamepadDpadDown", "value": "640" }, { "calc_value": 641, - "name": "ImGuiKey_MouseLeft", + "comment": "// L Bumper (Xbox) L (Switch) L1 (PS) // Tweak Slower / Focus Previous (in Windowing mode)", + "name": "ImGuiKey_GamepadL1", "value": "641" }, { "calc_value": 642, - "name": "ImGuiKey_MouseRight", + "comment": "// R Bumper (Xbox) R (Switch) R1 (PS) // Tweak Faster / Focus Next (in Windowing mode)", + "name": "ImGuiKey_GamepadR1", "value": "642" }, { "calc_value": 643, - "name": "ImGuiKey_MouseMiddle", + "comment": "// L Trig. (Xbox) ZL (Switch) L2 (PS) [Analog]", + "name": "ImGuiKey_GamepadL2", "value": "643" }, { "calc_value": 644, - "name": "ImGuiKey_MouseX1", + "comment": "// R Trig. (Xbox) ZR (Switch) R2 (PS) [Analog]", + "name": "ImGuiKey_GamepadR2", "value": "644" }, { "calc_value": 645, - "name": "ImGuiKey_MouseX2", + "comment": "// L Stick (Xbox) L3 (Switch) L3 (PS)", + "name": "ImGuiKey_GamepadL3", "value": "645" }, { "calc_value": 646, - "name": "ImGuiKey_MouseWheelX", + "comment": "// R Stick (Xbox) R3 (Switch) R3 (PS)", + "name": "ImGuiKey_GamepadR3", "value": "646" }, { "calc_value": 647, - "name": "ImGuiKey_MouseWheelY", + "comment": "// [Analog] // Move Window (in Windowing mode)", + "name": "ImGuiKey_GamepadLStickLeft", "value": "647" }, { "calc_value": 648, - "name": "ImGuiKey_ReservedForModCtrl", + "comment": "// [Analog] // Move Window (in Windowing mode)", + "name": "ImGuiKey_GamepadLStickRight", "value": "648" }, { "calc_value": 649, - "name": "ImGuiKey_ReservedForModShift", + "comment": "// [Analog] // Move Window (in Windowing mode)", + "name": "ImGuiKey_GamepadLStickUp", "value": "649" }, { "calc_value": 650, - "name": "ImGuiKey_ReservedForModAlt", + "comment": "// [Analog] // Move Window (in Windowing mode)", + "name": "ImGuiKey_GamepadLStickDown", "value": "650" }, { "calc_value": 651, - "name": "ImGuiKey_ReservedForModSuper", + "comment": "// [Analog]", + "name": "ImGuiKey_GamepadRStickLeft", "value": "651" }, { "calc_value": 652, - "name": "ImGuiKey_COUNT", + "comment": "// [Analog]", + "name": "ImGuiKey_GamepadRStickRight", "value": "652" }, + { + "calc_value": 653, + "comment": "// [Analog]", + "name": "ImGuiKey_GamepadRStickUp", + "value": "653" + }, + { + "calc_value": 654, + "comment": "// [Analog]", + "name": "ImGuiKey_GamepadRStickDown", + "value": "654" + }, + { + "calc_value": 655, + "name": "ImGuiKey_MouseLeft", + "value": "655" + }, + { + "calc_value": 656, + "name": "ImGuiKey_MouseRight", + "value": "656" + }, + { + "calc_value": 657, + "name": "ImGuiKey_MouseMiddle", + "value": "657" + }, + { + "calc_value": 658, + "name": "ImGuiKey_MouseX1", + "value": "658" + }, + { + "calc_value": 659, + "name": "ImGuiKey_MouseX2", + "value": "659" + }, + { + "calc_value": 660, + "name": "ImGuiKey_MouseWheelX", + "value": "660" + }, + { + "calc_value": 661, + "name": "ImGuiKey_MouseWheelY", + "value": "661" + }, + { + "calc_value": 662, + "name": "ImGuiKey_ReservedForModCtrl", + "value": "662" + }, + { + "calc_value": 663, + "name": "ImGuiKey_ReservedForModShift", + "value": "663" + }, + { + "calc_value": 664, + "name": "ImGuiKey_ReservedForModAlt", + "value": "664" + }, + { + "calc_value": 665, + "name": "ImGuiKey_ReservedForModSuper", + "value": "665" + }, + { + "calc_value": 666, + "name": "ImGuiKey_COUNT", + "value": "666" + }, { "calc_value": 0, "name": "ImGuiMod_None", @@ -3196,26 +3389,26 @@ "value": "512" }, { - "calc_value": 652, + "calc_value": 666, "name": "ImGuiKey_NamedKey_END", "value": "ImGuiKey_COUNT" }, { - "calc_value": 140, + "calc_value": 154, "name": "ImGuiKey_NamedKey_COUNT", "value": "ImGuiKey_NamedKey_END - ImGuiKey_NamedKey_BEGIN" }, { - "calc_value": 652, - "comment": "// Size of KeysData[]: hold legacy 0..512 keycodes + named keys", + "calc_value": 154, + "comment": "// Size of KeysData[]: only hold named keys", "name": "ImGuiKey_KeysData_SIZE", - "value": "ImGuiKey_COUNT" + "value": "ImGuiKey_NamedKey_COUNT" }, { - "calc_value": 0, + "calc_value": 512, "comment": "// Accesses to io.KeysData[] must use (key - ImGuiKey_KeysData_OFFSET) index.", "name": "ImGuiKey_KeysData_OFFSET", - "value": "0" + "value": "ImGuiKey_NamedKey_BEGIN" } ], "ImGuiLayoutType_": [ @@ -3283,8 +3476,13 @@ }, { "calc_value": 10, - "name": "ImGuiLocKey_COUNT", + "name": "ImGuiLocKey_DockingDragToUndockOrMoveNode", "value": "10" + }, + { + "calc_value": 11, + "name": "ImGuiLocKey_COUNT", + "value": "11" } ], "ImGuiLogType": [ @@ -3428,117 +3626,26 @@ ], "ImGuiNavHighlightFlags_": [ { - "calc_value": 0, - "name": "ImGuiNavHighlightFlags_None", - "value": "0" - }, - { - "calc_value": 1, - "name": "ImGuiNavHighlightFlags_TypeDefault", - "value": "1 << 0" - }, - { - "calc_value": 2, - "name": "ImGuiNavHighlightFlags_TypeThin", - "value": "1 << 1" - }, - { - "calc_value": 4, - "comment": "// Draw rectangular highlight if (g.NavId == id) _even_ when using the mouse.", - "name": "ImGuiNavHighlightFlags_AlwaysDraw", - "value": "1 << 2" - }, - { - "calc_value": 8, - "name": "ImGuiNavHighlightFlags_NoRounding", - "value": "1 << 3" - } - ], - "ImGuiNavInput": [ - { - "calc_value": 0, - "name": "ImGuiNavInput_Activate", - "value": "0" - }, - { - "calc_value": 1, - "name": "ImGuiNavInput_Cancel", - "value": "1" - }, - { - "calc_value": 2, - "name": "ImGuiNavInput_Input", - "value": "2" - }, - { - "calc_value": 3, - "name": "ImGuiNavInput_Menu", - "value": "3" - }, - { - "calc_value": 4, - "name": "ImGuiNavInput_DpadLeft", - "value": "4" - }, - { - "calc_value": 5, - "name": "ImGuiNavInput_DpadRight", - "value": "5" - }, - { - "calc_value": 6, - "name": "ImGuiNavInput_DpadUp", - "value": "6" - }, - { - "calc_value": 7, - "name": "ImGuiNavInput_DpadDown", - "value": "7" - }, - { - "calc_value": 8, - "name": "ImGuiNavInput_LStickLeft", - "value": "8" - }, - { - "calc_value": 9, - "name": "ImGuiNavInput_LStickRight", - "value": "9" - }, - { - "calc_value": 10, - "name": "ImGuiNavInput_LStickUp", - "value": "10" - }, - { - "calc_value": 11, - "name": "ImGuiNavInput_LStickDown", - "value": "11" - }, - { - "calc_value": 12, - "name": "ImGuiNavInput_FocusPrev", - "value": "12" - }, - { - "calc_value": 13, - "name": "ImGuiNavInput_FocusNext", - "value": "13" + "calc_value": 0, + "name": "ImGuiNavHighlightFlags_None", + "value": "0" }, { - "calc_value": 14, - "name": "ImGuiNavInput_TweakSlow", - "value": "14" + "calc_value": 2, + "comment": "// Compact highlight, no padding", + "name": "ImGuiNavHighlightFlags_Compact", + "value": "1 << 1" }, { - "calc_value": 15, - "name": "ImGuiNavInput_TweakFast", - "value": "15" + "calc_value": 4, + "comment": "// Draw rectangular highlight if (g.NavId == id) _even_ when using the mouse.", + "name": "ImGuiNavHighlightFlags_AlwaysDraw", + "value": "1 << 2" }, { - "calc_value": 16, - "name": "ImGuiNavInput_COUNT", - "value": "16" + "calc_value": 8, + "name": "ImGuiNavHighlightFlags_NoRounding", + "value": "1 << 3" } ], "ImGuiNavLayer": [ @@ -3675,6 +3782,11 @@ "calc_value": 2, "name": "ImGuiNextItemDataFlags_HasOpen", "value": "1 << 1" + }, + { + "calc_value": 4, + "name": "ImGuiNextItemDataFlags_HasShortcut", + "value": "1 << 2" } ], "ImGuiNextWindowDataFlags_": [ @@ -3725,18 +3837,23 @@ }, { "calc_value": 256, - "name": "ImGuiNextWindowDataFlags_HasViewport", + "name": "ImGuiNextWindowDataFlags_HasChildFlags", "value": "1 << 8" }, { "calc_value": 512, - "name": "ImGuiNextWindowDataFlags_HasDock", + "name": "ImGuiNextWindowDataFlags_HasViewport", "value": "1 << 9" }, { "calc_value": 1024, - "name": "ImGuiNextWindowDataFlags_HasWindowClass", + "name": "ImGuiNextWindowDataFlags_HasDock", "value": "1 << 10" + }, + { + "calc_value": 2048, + "name": "ImGuiNextWindowDataFlags_HasWindowClass", + "value": "1 << 11" } ], "ImGuiOldColumnFlags_": [ @@ -3771,7 +3888,7 @@ }, { "calc_value": 16, - "comment": "// (WIP) Restore pre-1.51 behavior of extending the parent window contents size but _without affecting the columns width at all_. Will eventually remove.", + "comment": "// Restore pre-1.51 behavior of extending the parent window contents size but _without affecting the columns width at all_. Will eventually remove.", "name": "ImGuiOldColumnFlags_GrowParentContentsSize", "value": "1 << 4" } @@ -3824,30 +3941,36 @@ }, { "calc_value": 32, + "comment": "// For OpenPopup*(), BeginPopupContext*(): don't reopen same popup if already open (won't reposition, won't reinitialize navigation)", + "name": "ImGuiPopupFlags_NoReopen", + "value": "1 << 5" + }, + { + "calc_value": 128, "comment": "// For OpenPopup*(), BeginPopupContext*(): don't open if there's already a popup at the same level of the popup stack", "name": "ImGuiPopupFlags_NoOpenOverExistingPopup", - "value": "1 << 5" + "value": "1 << 7" }, { - "calc_value": 64, + "calc_value": 256, "comment": "// For BeginPopupContextWindow(): don't return true when hovering items, only when hovering empty space", "name": "ImGuiPopupFlags_NoOpenOverItems", - "value": "1 << 6" + "value": "1 << 8" }, { - "calc_value": 128, + "calc_value": 1024, "comment": "// For IsPopupOpen(): ignore the ImGuiID parameter and test for any popup.", "name": "ImGuiPopupFlags_AnyPopupId", - "value": "1 << 7" + "value": "1 << 10" }, { - "calc_value": 256, + "calc_value": 2048, "comment": "// For IsPopupOpen(): search/test at any level of the popup stack (default test in the current level)", "name": "ImGuiPopupFlags_AnyPopupLevel", - "value": "1 << 8" + "value": "1 << 11" }, { - "calc_value": 384, + "calc_value": 3072, "name": "ImGuiPopupFlags_AnyPopup", "value": "ImGuiPopupFlags_AnyPopupId | ImGuiPopupFlags_AnyPopupLevel" } @@ -3991,7 +4114,7 @@ }, { "calc_value": 2, - "comment": "// Selectable frame can span all columns (text will still fit in current column)", + "comment": "// Frame will span all columns of its container table (text will still fit in current column)", "name": "ImGuiSelectableFlags_SpanAllColumns", "value": "1 << 1" }, @@ -4340,7 +4463,7 @@ }, { "calc_value": 8, - "comment": "// Disable behavior of closing tabs (that are submitted with p_open != NULL) with middle mouse button. You can still repro this behavior on user's side with if (IsItemHovered() && IsMouseClicked(2)) *p_open = false.", + "comment": "// Disable behavior of closing tabs (that are submitted with p_open != NULL) with middle mouse button. You may handle this behavior manually on user's side with if (IsItemHovered() && IsMouseClicked(2)) *p_open = false.", "name": "ImGuiTabBarFlags_NoCloseWithMiddleMouseButton", "value": "1 << 3" }, @@ -4412,7 +4535,7 @@ }, { "calc_value": 1, - "comment": "// Display a dot next to the title + tab is selected when clicking the X + closure is not assumed (will wait for user to stop submitting the tab). Otherwise closure is assumed when pressing the X, so if you keep submitting the tab may reappear at end of tab bar.", + "comment": "// Display a dot next to the title + set ImGuiTabItemFlags_NoAssumedClosure.", "name": "ImGuiTabItemFlags_UnsavedDocument", "value": "1 << 0" }, @@ -4424,13 +4547,13 @@ }, { "calc_value": 4, - "comment": "// Disable behavior of closing tabs (that are submitted with p_open != NULL) with middle mouse button. You can still repro this behavior on user's side with if (IsItemHovered() && IsMouseClicked(2)) *p_open = false.", + "comment": "// Disable behavior of closing tabs (that are submitted with p_open != NULL) with middle mouse button. You may handle this behavior manually on user's side with if (IsItemHovered() && IsMouseClicked(2)) *p_open = false.", "name": "ImGuiTabItemFlags_NoCloseWithMiddleMouseButton", "value": "1 << 2" }, { "calc_value": 8, - "comment": "// Don't call PushID(tab->ID)/PopID() on BeginTabItem()/EndTabItem()", + "comment": "// Don't call PushID()/PopID() on BeginTabItem()/EndTabItem()", "name": "ImGuiTabItemFlags_NoPushId", "value": "1 << 3" }, @@ -4457,6 +4580,12 @@ "comment": "// Enforce the tab position to the right of the tab bar (before the scrolling buttons)", "name": "ImGuiTabItemFlags_Trailing", "value": "1 << 7" + }, + { + "calc_value": 256, + "comment": "// Tab is selected when trying to close + closure is not immediately assumed (will wait for user to stop submitting the tab). Otherwise closure is assumed when pressing the X, so if you keep submitting the tab may reappear at end of tab bar.", + "name": "ImGuiTabItemFlags_NoAssumedClosure", + "value": "1 << 8" } ], "ImGuiTableBgTarget_": [ @@ -4564,7 +4693,7 @@ }, { "calc_value": 4096, - "comment": "// TableHeadersRow() will not submit label for this column. Convenient for some small columns. Name will still appear in context menu.", + "comment": "// TableHeadersRow() will not submit horizontal label for this column. Convenient for some small columns. Name will still appear in context menu or in angled headers.", "name": "ImGuiTableColumnFlags_NoHeaderLabel", "value": "1 << 12" }, @@ -4598,6 +4727,12 @@ "name": "ImGuiTableColumnFlags_IndentDisable", "value": "1 << 17" }, + { + "calc_value": 262144, + "comment": "// TableHeadersRow() will submit an angled header row for this column. Note this will add an extra row.", + "name": "ImGuiTableColumnFlags_AngledHeader", + "value": "1 << 18" + }, { "calc_value": 16777216, "comment": "// Status: is enabled == not hidden by user/api (referred to as \"Hide\" in _DefaultHide and _NoHide) flags.", @@ -4854,6 +4989,12 @@ "name": "ImGuiTableFlags_SortTristate", "value": "1 << 27" }, + { + "calc_value": 268435456, + "comment": "// Highlight column headers when hovered (may evolve into a fuller highlight)", + "name": "ImGuiTableFlags_HighlightHoveredColumn", + "value": "1 << 28" + }, { "calc_value": 57344, "name": "ImGuiTableFlags_SizingMask_", @@ -4997,9 +5138,15 @@ }, { "calc_value": 8192, + "comment": "// Frame will span all columns of its container table (text will still fit in current column)", + "name": "ImGuiTreeNodeFlags_SpanAllColumns", + "value": "1 << 13" + }, + { + "calc_value": 16384, "comment": "// (WIP) Nav: left direction may move to this TreeNode() from any of its child (items submitted between TreeNode and TreePop)", "name": "ImGuiTreeNodeFlags_NavLeftJumpsBackHere", - "value": "1 << 13" + "value": "1 << 14" }, { "calc_value": 26, @@ -5258,36 +5405,30 @@ }, { "calc_value": 65536, - "comment": "// Ensure child windows without border uses style.WindowPadding (ignored by default for non-bordered child windows, because more convenient)", - "name": "ImGuiWindowFlags_AlwaysUseWindowPadding", - "value": "1 << 16" - }, - { - "calc_value": 262144, "comment": "// No gamepad/keyboard navigation within the window", "name": "ImGuiWindowFlags_NoNavInputs", - "value": "1 << 18" + "value": "1 << 16" }, { - "calc_value": 524288, + "calc_value": 131072, "comment": "// No focusing toward this window with gamepad/keyboard navigation (e.g. skipped by CTRL+TAB)", "name": "ImGuiWindowFlags_NoNavFocus", - "value": "1 << 19" + "value": "1 << 17" }, { - "calc_value": 1048576, + "calc_value": 262144, "comment": "// Display a dot next to the title. When used in a tab/docking context, tab is selected when clicking the X + closure is not assumed (will wait for user to stop submitting the tab). Otherwise closure is assumed when pressing the X, so if you keep submitting the tab may reappear at end of tab bar.", "name": "ImGuiWindowFlags_UnsavedDocument", - "value": "1 << 20" + "value": "1 << 18" }, { - "calc_value": 2097152, + "calc_value": 524288, "comment": "// Disable docking of this window", "name": "ImGuiWindowFlags_NoDocking", - "value": "1 << 21" + "value": "1 << 19" }, { - "calc_value": 786432, + "calc_value": 196608, "name": "ImGuiWindowFlags_NoNav", "value": "ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus" }, @@ -5297,13 +5438,13 @@ "value": "ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoCollapse" }, { - "calc_value": 786944, + "calc_value": 197120, "name": "ImGuiWindowFlags_NoInputs", "value": "ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus" }, { "calc_value": 8388608, - "comment": "// [BETA] On child window: allow gamepad/keyboard navigation to cross over parent border to this child or between sibling child windows.", + "comment": "// [BETA] On child window: share focus scope, allow gamepad/keyboard navigation to cross over parent border to this child or between sibling child windows.", "name": "ImGuiWindowFlags_NavFlattened", "value": "1 << 23" }, @@ -5351,190 +5492,193 @@ "ImGuiMouseSource": "int" }, "locations": { - "ImBitVector": "imgui_internal:611", - "ImColor": "imgui:2592", - "ImDrawChannel": "imgui:2682", - "ImDrawCmd": "imgui:2641", - "ImDrawCmdHeader": "imgui:2674", - "ImDrawData": "imgui:2876", - "ImDrawDataBuilder": "imgui_internal:801", - "ImDrawFlags_": "imgui:2708", - "ImDrawList": "imgui:2746", - "ImDrawListFlags_": "imgui:2728", - "ImDrawListSharedData": "imgui_internal:778", - "ImDrawListSplitter": "imgui:2691", - "ImDrawVert": "imgui:2659", - "ImFont": "imgui:3098", - "ImFontAtlas": "imgui:2994", - "ImFontAtlasCustomRect": "imgui:2956", - "ImFontAtlasFlags_": "imgui:2969", - "ImFontBuilderIO": "imgui_internal:3689", - "ImFontConfig": "imgui:2900", - "ImFontGlyph": "imgui:2929", - "ImFontGlyphRangesBuilder": "imgui:2941", - "ImGuiActivateFlags_": "imgui_internal:1503", - "ImGuiAxis": "imgui_internal:988", - "ImGuiBackendFlags_": "imgui:1621", - "ImGuiButtonFlagsPrivate_": "imgui_internal:882", - "ImGuiButtonFlags_": "imgui:1740", - "ImGuiCol_": "imgui:1636", - "ImGuiColorEditFlags_": "imgui:1753", - "ImGuiColorMod": "imgui_internal:1039", - "ImGuiComboFlagsPrivate_": "imgui_internal:907", - "ImGuiComboFlags_": "imgui:1147", - "ImGuiComboPreviewData": "imgui_internal:1056", - "ImGuiCond_": "imgui:1854", - "ImGuiConfigFlags_": "imgui:1596", - "ImGuiContext": "imgui_internal:2026", - "ImGuiContextHook": "imgui_internal:2011", - "ImGuiContextHookType": "imgui_internal:2009", - "ImGuiDataAuthority_": "imgui_internal:1721", - "ImGuiDataTypeInfo": "imgui_internal:1022", - "ImGuiDataTypePrivate_": "imgui_internal:1031", - "ImGuiDataTypeTempStorage": "imgui_internal:1016", - "ImGuiDataType_": "imgui:1419", - "ImGuiDataVarInfo": "imgui_internal:1008", - "ImGuiDebugLogFlags_": "imgui_internal:1947", - "ImGuiDir_": "imgui:1435", - "ImGuiDockContext": "imgui_internal:1820", - "ImGuiDockNode": "imgui_internal:1737", - "ImGuiDockNodeFlagsPrivate_": "imgui_internal:1693", - "ImGuiDockNodeFlags_": "imgui:1378", - "ImGuiDockNodeState": "imgui_internal:1728", - "ImGuiDragDropFlags_": "imgui:1397", - "ImGuiFocusRequestFlags_": "imgui_internal:951", - "ImGuiFocusedFlags_": "imgui:1324", - "ImGuiGroupData": "imgui_internal:1069", - "ImGuiHoveredFlagsPrivate_": "imgui_internal:865", - "ImGuiHoveredFlags_": "imgui:1338", - "ImGuiIO": "imgui:2045", - "ImGuiInputEvent": "imgui_internal:1359", - "ImGuiInputEventAppFocused": "imgui_internal:1357", - "ImGuiInputEventKey": "imgui_internal:1355", - "ImGuiInputEventMouseButton": "imgui_internal:1353", - "ImGuiInputEventMousePos": "imgui_internal:1351", - "ImGuiInputEventMouseViewport": "imgui_internal:1354", - "ImGuiInputEventMouseWheel": "imgui_internal:1352", - "ImGuiInputEventText": "imgui_internal:1356", - "ImGuiInputEventType": "imgui_internal:1326", - "ImGuiInputFlags_": "imgui_internal:1423", - "ImGuiInputSource": "imgui_internal:1339", - "ImGuiInputTextCallbackData": "imgui:2264", - "ImGuiInputTextDeactivatedState": "imgui_internal:1103", - "ImGuiInputTextFlagsPrivate_": "imgui_internal:873", - "ImGuiInputTextFlags_": "imgui:1053", - "ImGuiInputTextState": "imgui_internal:1113", - "ImGuiItemFlags_": "imgui_internal:818", - "ImGuiItemStatusFlags_": "imgui_internal:840", - "ImGuiKey": "imgui:1458", - "ImGuiKeyData": "imgui:2037", - "ImGuiKeyOwnerData": "imgui_internal:1411", - "ImGuiKeyRoutingData": "imgui_internal:1386", - "ImGuiKeyRoutingTable": "imgui_internal:1399", - "ImGuiLastItemData": "imgui_internal:1234", - "ImGuiLayoutType_": "imgui_internal:972", - "ImGuiListClipper": "imgui:2510", - "ImGuiListClipperData": "imgui_internal:1487", - "ImGuiListClipperRange": "imgui_internal:1474", - "ImGuiLocEntry": "imgui_internal:1936", - "ImGuiLocKey": "imgui_internal:1921", - "ImGuiLogType": "imgui_internal:978", - "ImGuiMenuColumns": "imgui_internal:1085", - "ImGuiMetricsConfig": "imgui_internal:1965", - "ImGuiMouseButton_": "imgui:1814", - "ImGuiMouseCursor_": "imgui:1824", - "ImGuiMouseSource": "imgui:1843", - "ImGuiNavHighlightFlags_": "imgui_internal:1526", - "ImGuiNavInput": "imgui:1587", - "ImGuiNavItemData": "imgui_internal:1563", - "ImGuiNavLayer": "imgui_internal:1556", - "ImGuiNavMoveFlags_": "imgui_internal:1535", - "ImGuiNavTreeNodeData": "imgui_internal:1249", - "ImGuiNextItemData": "imgui_internal:1219", - "ImGuiNextItemDataFlags_": "imgui_internal:1212", - "ImGuiNextWindowData": "imgui_internal:1181", - "ImGuiNextWindowDataFlags_": "imgui_internal:1164", - "ImGuiOldColumnData": "imgui_internal:1641", - "ImGuiOldColumnFlags_": "imgui_internal:1621", - "ImGuiOldColumns": "imgui_internal:1651", - "ImGuiOnceUponAFrame": "imgui:2385", - "ImGuiPayload": "imgui:2326", - "ImGuiPlatformIO": "imgui:3268", - "ImGuiPlatformImeData": "imgui:3341", - "ImGuiPlatformMonitor": "imgui:3331", - "ImGuiPlotType": "imgui_internal:995", - "ImGuiPopupData": "imgui_internal:1150", - "ImGuiPopupFlags_": "imgui:1116", - "ImGuiPopupPositionPolicy": "imgui_internal:1001", - "ImGuiPtrOrIndex": "imgui_internal:1288", - "ImGuiScrollFlags_": "imgui_internal:1512", - "ImGuiSelectableFlagsPrivate_": "imgui_internal:920", - "ImGuiSelectableFlags_": "imgui:1132", - "ImGuiSeparatorFlags_": "imgui_internal:940", - "ImGuiSettingsHandler": "imgui_internal:1901", - "ImGuiShrinkWidthItem": "imgui_internal:1281", - "ImGuiSizeCallbackData": "imgui:2296", - "ImGuiSliderFlagsPrivate_": "imgui_internal:913", - "ImGuiSliderFlags_": "imgui:1799", - "ImGuiSortDirection_": "imgui:1446", - "ImGuiStackLevelInfo": "imgui_internal:1980", - "ImGuiStackSizes": "imgui_internal:1256", - "ImGuiStackTool": "imgui_internal:1992", - "ImGuiStorage": "imgui:2447", - "ImGuiStoragePair": "imgui:2450", - "ImGuiStyle": "imgui:1967", - "ImGuiStyleMod": "imgui_internal:1046", - "ImGuiStyleVar_": "imgui:1703", - "ImGuiTabBar": "imgui_internal:2775", - "ImGuiTabBarFlagsPrivate_": "imgui_internal:2738", - "ImGuiTabBarFlags_": "imgui:1161", - "ImGuiTabItem": "imgui_internal:2755", - "ImGuiTabItemFlagsPrivate_": "imgui_internal:2746", - "ImGuiTabItemFlags_": "imgui:1177", - "ImGuiTable": "imgui_internal:2909", - "ImGuiTableBgTarget_": "imgui:1315", - "ImGuiTableCellData": "imgui_internal:2888", - "ImGuiTableColumn": "imgui_internal:2829", - "ImGuiTableColumnFlags_": "imgui:1263", - "ImGuiTableColumnSettings": "imgui_internal:3046", - "ImGuiTableColumnSortSpecs": "imgui:2348", - "ImGuiTableFlags_": "imgui:1212", - "ImGuiTableInstanceData": "imgui_internal:2895", - "ImGuiTableRowFlags_": "imgui:1300", - "ImGuiTableSettings": "imgui_internal:3070", - "ImGuiTableSortSpecs": "imgui:2362", - "ImGuiTableTempData": "imgui_internal:3025", - "ImGuiTextBuffer": "imgui:2420", - "ImGuiTextFilter": "imgui:2393", - "ImGuiTextFlags_": "imgui_internal:958", - "ImGuiTextIndex": "imgui_internal:735", - "ImGuiTextRange": "imgui:2403", - "ImGuiTooltipFlags_": "imgui_internal:964", - "ImGuiTreeNodeFlagsPrivate_": "imgui_internal:934", - "ImGuiTreeNodeFlags_": "imgui:1083", - "ImGuiTypingSelectFlags_": "imgui_internal:1584", - "ImGuiTypingSelectRequest": "imgui_internal:1592", - "ImGuiTypingSelectState": "imgui_internal:1603", - "ImGuiViewport": "imgui:3184", - "ImGuiViewportFlags_": "imgui:3156", - "ImGuiViewportP": "imgui_internal:1837", - "ImGuiWindow": "imgui_internal:2589", - "ImGuiWindowClass": "imgui:2311", - "ImGuiWindowDockStyle": "imgui_internal:1815", - "ImGuiWindowDockStyleCol": "imgui_internal:1804", - "ImGuiWindowFlags_": "imgui:1012", - "ImGuiWindowSettings": "imgui_internal:1883", - "ImGuiWindowStackData": "imgui_internal:1274", - "ImGuiWindowTempData": "imgui_internal:2540", + "ImBitVector": "imgui_internal:612", + "ImColor": "imgui:2664", + "ImDrawChannel": "imgui:2754", + "ImDrawCmd": "imgui:2713", + "ImDrawCmdHeader": "imgui:2746", + "ImDrawData": "imgui:2949", + "ImDrawDataBuilder": "imgui_internal:798", + "ImDrawFlags_": "imgui:2780", + "ImDrawList": "imgui:2818", + "ImDrawListFlags_": "imgui:2800", + "ImDrawListSharedData": "imgui_internal:775", + "ImDrawListSplitter": "imgui:2763", + "ImDrawVert": "imgui:2731", + "ImFont": "imgui:3172", + "ImFontAtlas": "imgui:3068", + "ImFontAtlasCustomRect": "imgui:3030", + "ImFontAtlasFlags_": "imgui:3043", + "ImFontBuilderIO": "imgui_internal:3842", + "ImFontConfig": "imgui:2973", + "ImFontGlyph": "imgui:3003", + "ImFontGlyphRangesBuilder": "imgui:3015", + "ImGuiActivateFlags_": "imgui_internal:1550", + "ImGuiAxis": "imgui_internal:985", + "ImGuiBackendFlags_": "imgui:1547", + "ImGuiButtonFlagsPrivate_": "imgui_internal:879", + "ImGuiButtonFlags_": "imgui:1666", + "ImGuiChildFlags_": "imgui:1082", + "ImGuiCol_": "imgui:1562", + "ImGuiColorEditFlags_": "imgui:1679", + "ImGuiColorMod": "imgui_internal:999", + "ImGuiComboFlagsPrivate_": "imgui_internal:904", + "ImGuiComboFlags_": "imgui:1194", + "ImGuiComboPreviewData": "imgui_internal:1016", + "ImGuiCond_": "imgui:1780", + "ImGuiConfigFlags_": "imgui:1522", + "ImGuiContext": "imgui_internal:2105", + "ImGuiContextHook": "imgui_internal:2090", + "ImGuiContextHookType": "imgui_internal:2088", + "ImGuiDataAuthority_": "imgui_internal:1776", + "ImGuiDataTypeInfo": "imgui_internal:1281", + "ImGuiDataTypePrivate_": "imgui_internal:1290", + "ImGuiDataTypeTempStorage": "imgui_internal:1275", + "ImGuiDataType_": "imgui:1335", + "ImGuiDataVarInfo": "imgui_internal:1267", + "ImGuiDebugAllocEntry": "imgui_internal:2024", + "ImGuiDebugAllocInfo": "imgui_internal:2031", + "ImGuiDebugLogFlags_": "imgui_internal:2004", + "ImGuiDir_": "imgui:1351", + "ImGuiDockContext": "imgui_internal:1875", + "ImGuiDockNode": "imgui_internal:1792", + "ImGuiDockNodeFlagsPrivate_": "imgui_internal:1747", + "ImGuiDockNodeFlags_": "imgui:1294", + "ImGuiDockNodeState": "imgui_internal:1783", + "ImGuiDragDropFlags_": "imgui:1313", + "ImGuiFocusRequestFlags_": "imgui_internal:948", + "ImGuiFocusScopeData": "imgui_internal:1627", + "ImGuiFocusedFlags_": "imgui:1240", + "ImGuiGroupData": "imgui_internal:1029", + "ImGuiHoveredFlagsPrivate_": "imgui_internal:862", + "ImGuiHoveredFlags_": "imgui:1254", + "ImGuiIDStackTool": "imgui_internal:2071", + "ImGuiIO": "imgui:2136", + "ImGuiInputEvent": "imgui_internal:1385", + "ImGuiInputEventAppFocused": "imgui_internal:1383", + "ImGuiInputEventKey": "imgui_internal:1381", + "ImGuiInputEventMouseButton": "imgui_internal:1379", + "ImGuiInputEventMousePos": "imgui_internal:1377", + "ImGuiInputEventMouseViewport": "imgui_internal:1380", + "ImGuiInputEventMouseWheel": "imgui_internal:1378", + "ImGuiInputEventText": "imgui_internal:1382", + "ImGuiInputEventType": "imgui_internal:1352", + "ImGuiInputFlags_": "imgui_internal:1450", + "ImGuiInputSource": "imgui_internal:1365", + "ImGuiInputTextCallbackData": "imgui:2356", + "ImGuiInputTextDeactivatedState": "imgui_internal:1065", + "ImGuiInputTextFlagsPrivate_": "imgui_internal:870", + "ImGuiInputTextFlags_": "imgui:1097", + "ImGuiInputTextState": "imgui_internal:1075", + "ImGuiItemFlags_": "imgui_internal:815", + "ImGuiItemStatusFlags_": "imgui_internal:837", + "ImGuiKey": "imgui:1380", + "ImGuiKeyData": "imgui:2128", + "ImGuiKeyOwnerData": "imgui_internal:1438", + "ImGuiKeyRoutingData": "imgui_internal:1412", + "ImGuiKeyRoutingTable": "imgui_internal:1426", + "ImGuiLastItemData": "imgui_internal:1198", + "ImGuiLayoutType_": "imgui_internal:969", + "ImGuiListClipper": "imgui:2578", + "ImGuiListClipperData": "imgui_internal:1534", + "ImGuiListClipperRange": "imgui_internal:1521", + "ImGuiLocEntry": "imgui_internal:1993", + "ImGuiLocKey": "imgui_internal:1977", + "ImGuiLogType": "imgui_internal:975", + "ImGuiMenuColumns": "imgui_internal:1047", + "ImGuiMetricsConfig": "imgui_internal:2041", + "ImGuiMouseButton_": "imgui:1740", + "ImGuiMouseCursor_": "imgui:1750", + "ImGuiMouseSource": "imgui:1769", + "ImGuiNavHighlightFlags_": "imgui_internal:1575", + "ImGuiNavItemData": "imgui_internal:1611", + "ImGuiNavLayer": "imgui_internal:1604", + "ImGuiNavMoveFlags_": "imgui_internal:1583", + "ImGuiNavTreeNodeData": "imgui_internal:1215", + "ImGuiNextItemData": "imgui_internal:1182", + "ImGuiNextItemDataFlags_": "imgui_internal:1174", + "ImGuiNextWindowData": "imgui_internal:1142", + "ImGuiNextWindowDataFlags_": "imgui_internal:1124", + "ImGuiOldColumnData": "imgui_internal:1695", + "ImGuiOldColumnFlags_": "imgui_internal:1675", + "ImGuiOldColumns": "imgui_internal:1705", + "ImGuiOnceUponAFrame": "imgui:2454", + "ImGuiPayload": "imgui:2419", + "ImGuiPlatformIO": "imgui:3342", + "ImGuiPlatformImeData": "imgui:3415", + "ImGuiPlatformMonitor": "imgui:3405", + "ImGuiPlotType": "imgui_internal:992", + "ImGuiPopupData": "imgui_internal:1309", + "ImGuiPopupFlags_": "imgui:1161", + "ImGuiPopupPositionPolicy": "imgui_internal:1301", + "ImGuiPtrOrIndex": "imgui_internal:1254", + "ImGuiScrollFlags_": "imgui_internal:1561", + "ImGuiSelectableFlagsPrivate_": "imgui_internal:917", + "ImGuiSelectableFlags_": "imgui:1179", + "ImGuiSeparatorFlags_": "imgui_internal:937", + "ImGuiSettingsHandler": "imgui_internal:1957", + "ImGuiShrinkWidthItem": "imgui_internal:1247", + "ImGuiSizeCallbackData": "imgui:2388", + "ImGuiSliderFlagsPrivate_": "imgui_internal:910", + "ImGuiSliderFlags_": "imgui:1725", + "ImGuiSortDirection_": "imgui:1362", + "ImGuiStackLevelInfo": "imgui_internal:2059", + "ImGuiStackSizes": "imgui_internal:1222", + "ImGuiStorage": "imgui:2516", + "ImGuiStoragePair": "imgui:2519", + "ImGuiStyle": "imgui:2057", + "ImGuiStyleMod": "imgui_internal:1006", + "ImGuiStyleVar_": "imgui:1629", + "ImGuiTabBar": "imgui_internal:2903", + "ImGuiTabBarFlagsPrivate_": "imgui_internal:2866", + "ImGuiTabBarFlags_": "imgui:1209", + "ImGuiTabItem": "imgui_internal:2883", + "ImGuiTabItemFlagsPrivate_": "imgui_internal:2874", + "ImGuiTabItemFlags_": "imgui:1225", + "ImGuiTable": "imgui_internal:3038", + "ImGuiTableBgTarget_": "imgui:1921", + "ImGuiTableCellData": "imgui_internal:3016", + "ImGuiTableColumn": "imgui_internal:2957", + "ImGuiTableColumnFlags_": "imgui:1868", + "ImGuiTableColumnSettings": "imgui_internal:3183", + "ImGuiTableColumnSortSpecs": "imgui:1943", + "ImGuiTableFlags_": "imgui:1815", + "ImGuiTableInstanceData": "imgui_internal:3024", + "ImGuiTableRowFlags_": "imgui:1906", + "ImGuiTableSettings": "imgui_internal:3207", + "ImGuiTableSortSpecs": "imgui:1933", + "ImGuiTableTempData": "imgui_internal:3161", + "ImGuiTextBuffer": "imgui:2489", + "ImGuiTextFilter": "imgui:2462", + "ImGuiTextFlags_": "imgui_internal:955", + "ImGuiTextIndex": "imgui_internal:732", + "ImGuiTextRange": "imgui:2472", + "ImGuiTooltipFlags_": "imgui_internal:961", + "ImGuiTreeNodeFlagsPrivate_": "imgui_internal:931", + "ImGuiTreeNodeFlags_": "imgui:1127", + "ImGuiTypingSelectFlags_": "imgui_internal:1638", + "ImGuiTypingSelectRequest": "imgui_internal:1646", + "ImGuiTypingSelectState": "imgui_internal:1657", + "ImGuiViewport": "imgui:3258", + "ImGuiViewportFlags_": "imgui:3230", + "ImGuiViewportP": "imgui_internal:1892", + "ImGuiWindow": "imgui_internal:2715", + "ImGuiWindowClass": "imgui:2403", + "ImGuiWindowDockStyle": "imgui_internal:1870", + "ImGuiWindowDockStyleCol": "imgui_internal:1859", + "ImGuiWindowFlags_": "imgui:1031", + "ImGuiWindowSettings": "imgui_internal:1938", + "ImGuiWindowStackData": "imgui_internal:1240", + "ImGuiWindowTempData": "imgui_internal:2665", "ImRect": "imgui_internal:534", "ImVec1": "imgui_internal:516", - "ImVec2": "imgui:264", + "ImVec2": "imgui:269", "ImVec2ih": "imgui_internal:524", - "ImVec4": "imgui:277", - "STB_TexteditState": "imstb_textedit:320", - "StbTexteditRow": "imstb_textedit:367", - "StbUndoRecord": "imstb_textedit:302", - "StbUndoState": "imstb_textedit:311" + "ImVec4": "imgui:282", + "STB_TexteditState": "imstb_textedit:321", + "StbTexteditRow": "imstb_textedit:368", + "StbUndoRecord": "imstb_textedit:303", + "StbUndoState": "imstb_textedit:312" }, "struct_comments": { "ImBitVector": { @@ -5597,6 +5741,9 @@ "ImGuiGroupData": { "above": "// Stacked storage data for BeginGroup()/EndGroup()" }, + "ImGuiIDStackTool": { + "above": "// State for ID Stack tool queries" + }, "ImGuiInputEventMousePos": { "above": "// FIXME: Structures in the union below need to be declared as anonymous unions appears to be an extension?\n// Using ImVec2() would fail on Clang 'union member 'MousePos' has a non-trivial default constructor'" }, @@ -5658,14 +5805,11 @@ "above": "// (Optional) This is required when enabling multi-viewport. Represent the bounds of each connected monitor/display and their DPI.\n// We use this information for multiple DPI support + clamping the position of popups and tooltips so they don't straddle multiple monitors." }, "ImGuiPopupData": { - "above": "// Storage for current popup stack" + "above": "// Storage for popup stacks (g.OpenPopupStack and g.BeginPopupStack)" }, "ImGuiSizeCallbackData": { "above": "// Resizing callback data to apply custom constraint. As enabled by SetNextWindowSizeConstraints(). Callback is called during the next Begin().\n// NB: For basic min/max size constraint on each axis you don't need to use the callback! The SetNextWindowSizeConstraints() parameters are enough." }, - "ImGuiStackTool": { - "above": "// State for Stack tool queries" - }, "ImGuiStorage": { "above": "// Helper: Key->Value storage\n// Typically you don't have to worry about this since a storage is held within each Window.\n// We use it to e.g. store collapse state for a tree (Int 0/1)\n// This is optimized for efficient lookup (dichotomy into a contiguous buffer) and rare insertion (typically tied to user interactions aka max once a frame)\n// You can use it as custom user storage for temporary values. Declare your own storage if, for example:\n// - You want to manipulate the open/close state of a particular sub-tree in your interface (tree node uses Int 0/1 to store their state).\n// - You want to store custom debug data easily without adding or editing structures in your code (probably not efficient, but convenient)\n// Types are NOT stored, so it is up to you to make sure your Key don't collide with different types." }, @@ -5697,7 +5841,7 @@ "above": "// Sorting specification for one column of a table (sizeof == 12 bytes)" }, "ImGuiTableInstanceData": { - "above": "// Per-instance data that needs preserving across frames (seemingly most others do not need to be preserved aside from debug needs. Does that means they could be moved to ImGuiTableTempData?)" + "above": "// Per-instance data that needs preserving across frames (seemingly most others do not need to be preserved aside from debug needs. Does that means they could be moved to ImGuiTableTempData?)\n// sizeof() ~ 24 bytes" }, "ImGuiTableSettings": { "above": "// This is designed to be stored in a single ImChunkStream (1 header followed by N ImGuiTableColumnSettings, etc.)" @@ -5706,7 +5850,7 @@ "above": "// Sorting specifications for a table (often handling sort specs for a single column, occasionally more)\n// Obtained by calling TableGetSortSpecs().\n// When 'SpecsDirty == true' you can sort your data. It will be true with sorting specs have changed since last call, or the first time.\n// Make sure to set 'SpecsDirty = false' after sorting, else you may wastefully sort your data every frame!" }, "ImGuiTableTempData": { - "above": "// Transient data that are only needed between BeginTable() and EndTable(), those buffers are shared (1 per level of stacked table).\n// - Accessing those requires chasing an extra pointer so for very frequently used data we leave them in the main table structure.\n// - We also leave out of this structure data that tend to be particularly useful for debugging/metrics.\n// sizeof() ~ 112 bytes." + "above": "// Transient data that are only needed between BeginTable() and EndTable(), those buffers are shared (1 per level of stacked table).\n// - Accessing those requires chasing an extra pointer so for very frequently used data we leave them in the main table structure.\n// - We also leave out of this structure data that tend to be particularly useful for debugging/metrics.\n// sizeof() ~ 120 bytes." }, "ImGuiTextBuffer": { "above": "// Helper: Growable text buffer for logging/accumulating text\n// (this could be called 'ImGuiTextBuilder' / 'ImGuiStringBuilder')" @@ -6663,11 +6807,18 @@ }, { "comment": { - "sameline": "// 1.0f // Brighten (>1.0f) or darken (<1.0f) font output. Brightening small fonts may be a good workaround to make them more readable." + "sameline": "// 1.0f // Linearly brighten (>1.0f) or darken (<1.0f) font output. Brightening small fonts may be a good workaround to make them more readable. This is a silly thing we may remove in the future." }, "name": "RasterizerMultiply", "type": "float" }, + { + "comment": { + "sameline": "// 1.0f // DPI scale for rasterization, not altering other font metrics: make it easy to swap between e.g. a 100% and a 400% fonts for a zooming display. IMPORTANT: If you increase this it is expected that you increase font scale accordingly, otherwise quality may look lowered." + }, + "name": "RasterizerDensity", + "type": "float" + }, { "comment": { "sameline": "// -1 // Explicitly specify unicode codepoint of ellipsis character. When fonts are being merged first specified ellipsis will be used." @@ -7022,6 +7173,13 @@ "name": "WindowsHoverPadding", "type": "ImVec2" }, + { + "comment": { + "sameline": "// Set to break in Begin() call." + }, + "name": "DebugBreakInWindow", + "type": "ImGuiID" + }, { "comment": { "sameline": "// Window being drawn into" @@ -7068,6 +7226,10 @@ "name": "WheelingWindowStartFrame", "type": "int" }, + { + "name": "WheelingWindowScrolledFrame", + "type": "int" + }, { "name": "WheelingWindowReleaseTimer", "type": "float" @@ -7083,7 +7245,7 @@ { "comment": { "above": " // Item/widgets state and tracking information", - "sameline": "// Will call core hooks: DebugHookIdInfo() from GetID functions, used by Stack Tool [next HoveredId/ActiveId to not pull in an extra cache-line]" + "sameline": "// Will call core hooks: DebugHookIdInfo() from GetID functions, used by ID Stack Tool [next HoveredId/ActiveId to not pull in an extra cache-line]" }, "name": "DebugHookIdInfo", "type": "ImGuiID" @@ -7181,6 +7343,15 @@ "name": "ActiveIdHasBeenEditedThisFrame", "type": "bool" }, + { + "name": "ActiveIdFromShortcut", + "type": "bool" + }, + { + "bitfield": "8", + "name": "ActiveIdMouseButton", + "type": "int" + }, { "comment": { "sameline": "// Clicked offset from upper-left corner, if applicable (currently only set by ButtonBehavior)" @@ -7199,10 +7370,6 @@ "name": "ActiveIdSource", "type": "ImGuiInputSource" }, - { - "name": "ActiveIdMouseButton", - "type": "int" - }, { "name": "ActiveIdPreviousFrame", "type": "ImGuiID" @@ -7235,10 +7402,36 @@ }, { "comment": { - "above": " // [EXPERIMENTAL] Key/Input Ownership + Shortcut Routing system\n // - The idea is that instead of \"eating\" a given key, we can link to an owner.\n // - Input query can then read input by specifying ImGuiKeyOwner_Any (== 0), ImGuiKeyOwner_None (== -1) or a custom ID.\n // - Routing is requested ahead of time for a given chord (Key + Mods) and granted in NewFrame()." + "above": " // [EXPERIMENTAL] Key/Input Ownership + Shortcut Routing system\n // - The idea is that instead of \"eating\" a given key, we can link to an owner.\n // - Input query can then read input by specifying ImGuiKeyOwner_Any (== 0), ImGuiKeyOwner_None (== -1) or a custom ID.\n // - Routing is requested ahead of time for a given chord (Key + Mods) and granted in NewFrame().", + "sameline": "// Record the last time key mods changed (affect repeat delay when using shortcut logic)" + }, + "name": "LastKeyModsChangeTime", + "type": "double" + }, + { + "comment": { + "sameline": "// Record the last time key mods changed away from being 0 (affect repeat delay when using shortcut logic)" + }, + "name": "LastKeyModsChangeFromNoneTime", + "type": "double" + }, + { + "comment": { + "sameline": "// Record the last time a keyboard key (ignore mouse/gamepad ones) was pressed." + }, + "name": "LastKeyboardKeyPressTime", + "type": "double" + }, + { + "comment": { + "sameline": "// Lookup to tell if a key can emit char input, see IsKeyChordPotentiallyCharInput(). sizeof() = 20 bytes" }, + "name": "KeysMayBeCharInput", + "type": "ImBitArrayForNamedKeys" + }, + { "name": "KeysOwnerData[ImGuiKey_NamedKey_COUNT]", - "size": 140, + "size": 154, "type": "ImGuiKeyOwnerData" }, { @@ -7261,22 +7454,22 @@ }, { "comment": { - "sameline": "// If you used this. Since (IMGUI_VERSION_NUM >= 18804) : 'g.ActiveIdUsingNavInputMask |= (1 << ImGuiNavInput_Cancel);' becomes 'SetKeyOwner(ImGuiKey_Escape, g.ActiveId) and/or SetKeyOwner(ImGuiKey_NavGamepadCancel, g.ActiveId);'" + "sameline": "// Set to break in SetShortcutRouting()/Shortcut() calls." }, - "name": "ActiveIdUsingNavInputMask", - "type": "ImU32" + "name": "DebugBreakInShortcutRouting", + "type": "ImGuiKeyChord" }, { "comment": { "above": " // Next window/item data", - "sameline": "// == g.FocusScopeStack.back()" + "sameline": "// Value for currently appending items == g.FocusScopeStack.back(). Not to be mistaken with g.NavFocusScopeId." }, "name": "CurrentFocusScopeId", "type": "ImGuiID" }, { "comment": { - "sameline": "// == g.ItemFlagsStack.back()" + "sameline": "// Value for currently appending items == g.ItemFlagsStack.back()" }, "name": "CurrentItemFlags", "type": "ImGuiItemFlags" @@ -7309,9 +7502,20 @@ "name": "NextWindowData", "type": "ImGuiNextWindowData" }, + { + "name": "DebugShowGroupRects", + "type": "bool" + }, { "comment": { "above": " // Shared stacks", + "sameline": "// (Keep close to ColorStack to share cache line)" + }, + "name": "DebugFlashStyleColorIdx", + "type": "ImGuiCol" + }, + { + "comment": { "sameline": "// Stack for PushStyleColor()/PopStyleColor() - inherited by Begin()" }, "name": "ColorStack", @@ -7339,8 +7543,8 @@ "sameline": "// Stack for PushFocusScope()/PopFocusScope() - inherited by BeginChild(), pushed into by Begin()" }, "name": "FocusScopeStack", - "template_type": "ImGuiID", - "type": "ImVector_ImGuiID" + "template_type": "ImGuiFocusScopeData", + "type": "ImVector_ImGuiFocusScopeData" }, { "comment": { @@ -7382,10 +7586,6 @@ "template_type": "ImGuiNavTreeNodeData", "type": "ImVector_ImGuiNavTreeNodeData" }, - { - "name": "BeginMenuCount", - "type": "int" - }, { "comment": { "above": " // Viewports", @@ -7431,6 +7631,13 @@ "name": "FallbackMonitor", "type": "ImGuiPlatformMonitor" }, + { + "comment": { + "sameline": "// Bounding box of all platform monitors" + }, + "name": "PlatformMonitorsFullWorkRect", + "type": "ImRect" + }, { "comment": { "sameline": "// Unique sequential creation counter (mostly for testing/debugging)" @@ -7469,11 +7676,19 @@ }, { "comment": { - "sameline": "// Identify a selection scope (selection code often wants to \"clear other items\" when landing on an item of the selection set)" + "sameline": "// Focused focus scope (e.g. selection code often wants to \"clear other items\" when landing on an item of the same scope)" }, "name": "NavFocusScopeId", "type": "ImGuiID" }, + { + "comment": { + "sameline": "// Reversed copy focus scope stack for NavId (should contains NavFocusScopeId). This essentially follow the window->ParentWindowForFocusRoute chain." + }, + "name": "NavFocusRoute", + "template_type": "ImGuiFocusScopeData", + "type": "ImVector_ImGuiFocusScopeData" + }, { "comment": { "sameline": "// ~~ (g.ActiveId == 0) && (IsKeyPressed(ImGuiKey_Space) || IsKeyDown(ImGuiKey_Enter) || IsKeyPressed(ImGuiKey_NavGamepadActivate)) ? NavId : 0, also set when calling ActivateItem()" @@ -7499,6 +7714,14 @@ "name": "NavActivateFlags", "type": "ImGuiActivateFlags" }, + { + "name": "NavHighlightActivatedId", + "type": "ImGuiID" + }, + { + "name": "NavHighlightActivatedTimer", + "type": "float" + }, { "comment": { "sameline": "// Just navigated to this id (result of a successfully MoveRequest)." @@ -7762,6 +7985,10 @@ "name": "NavWindowingToggleLayer", "type": "bool" }, + { + "name": "NavWindowingToggleKey", + "type": "ImGuiKey" + }, { "name": "NavWindowingAccumDeltaPos", "type": "ImVec2" @@ -7822,6 +8049,13 @@ "name": "DragDropTargetRect", "type": "ImRect" }, + { + "comment": { + "sameline": "// Store ClipRect at the time of item's drawing" + }, + "name": "DragDropTargetClipRect", + "type": "ImRect" + }, { "name": "DragDropTargetId", "type": "ImGuiID" @@ -7900,6 +8134,13 @@ "name": "CurrentTable", "type": "ImGuiTable*" }, + { + "comment": { + "sameline": "// Set to break in BeginTable() call." + }, + "name": "DebugBreakInTable", + "type": "ImGuiID" + }, { "comment": { "sameline": "// Temporary table data size (because we leave previous instances undestructed, we generally don't use TablesTempData.Size)" @@ -8037,6 +8278,14 @@ "name": "TempInputId", "type": "ImGuiID" }, + { + "name": "BeginMenuDepth", + "type": "int" + }, + { + "name": "BeginComboDepth", + "type": "int" + }, { "comment": { "sameline": "// Store user options for color edit widgets" @@ -8090,6 +8339,17 @@ "name": "ComboPreviewData", "type": "ImGuiComboPreviewData" }, + { + "comment": { + "sameline": "// Expected border rect, switch to relative edit if moving" + }, + "name": "WindowResizeBorderExpectedRect", + "type": "ImRect" + }, + { + "name": "WindowResizeRelativeMode", + "type": "bool" + }, { "name": "SliderGrabClickOffset", "type": "float" @@ -8270,7 +8530,7 @@ "above": " // Localization" }, "name": "LocalizationTable[ImGuiLocKey_COUNT]", - "size": 10, + "size": 11, "type": "const char*" }, { @@ -8335,7 +8595,7 @@ }, { "comment": { - "above": " // Debug Tools" + "above": " // Debug Tools\n // (some of the highly frequently used data are interleaved in other structures above: DebugBreakXXX fields, DebugHookIdInfo, DebugLocateId etc.)" }, "name": "DebugLogFlags", "type": "ImGuiDebugLogFlags" @@ -8349,7 +8609,11 @@ "type": "ImGuiTextIndex" }, { - "name": "DebugLogClipperAutoDisableFrames", + "name": "DebugLogAutoDisableFlags", + "type": "ImGuiDebugLogFlags" + }, + { + "name": "DebugLogAutoDisableFrames", "type": "ImU8" }, { @@ -8359,6 +8623,20 @@ "name": "DebugLocateFrames", "type": "ImU8" }, + { + "comment": { + "sameline": "// Debug break in ItemAdd() call for g.DebugLocateId." + }, + "name": "DebugBreakInLocateId", + "type": "bool" + }, + { + "comment": { + "sameline": "// = ImGuiKey_Pause" + }, + "name": "DebugBreakKeyChord", + "type": "ImGuiKeyChord" + }, { "comment": { "sameline": "// Cycle between 0..9 then wrap around." @@ -8384,13 +8662,25 @@ "name": "DebugItemPickerBreakId", "type": "ImGuiID" }, + { + "name": "DebugFlashStyleColorTime", + "type": "float" + }, + { + "name": "DebugFlashStyleColorBackup", + "type": "ImVec4" + }, { "name": "DebugMetricsConfig", "type": "ImGuiMetricsConfig" }, { - "name": "DebugStackTool", - "type": "ImGuiStackTool" + "name": "DebugIDStackTool", + "type": "ImGuiIDStackTool" + }, + { + "name": "DebugAllocInfo", + "type": "ImGuiDebugAllocInfo" }, { "comment": { @@ -8445,6 +8735,11 @@ "name": "TempBuffer", "template_type": "char", "type": "ImVector_char" + }, + { + "name": "TempKeychordName[64]", + "size": 64, + "type": "char" } ], "ImGuiContextHook": [ @@ -8502,34 +8797,76 @@ "type": "const char*" } ], - "ImGuiDataTypeTempStorage": [ + "ImGuiDataTypeTempStorage": [ + { + "comment": { + "sameline": "// Can fit any data up to ImGuiDataType_COUNT" + }, + "name": "Data[8]", + "size": 8, + "type": "ImU8" + } + ], + "ImGuiDataVarInfo": [ + { + "name": "Type", + "type": "ImGuiDataType" + }, + { + "comment": { + "sameline": "// 1+" + }, + "name": "Count", + "type": "ImU32" + }, + { + "comment": { + "sameline": "// Offset in parent structure" + }, + "name": "Offset", + "type": "ImU32" + } + ], + "ImGuiDebugAllocEntry": [ + { + "name": "FrameCount", + "type": "int" + }, + { + "name": "AllocCount", + "type": "ImS16" + }, + { + "name": "FreeCount", + "type": "ImS16" + } + ], + "ImGuiDebugAllocInfo": [ { "comment": { - "sameline": "// Can fit any data up to ImGuiDataType_COUNT" + "sameline": "// Number of call to MemAlloc()." }, - "name": "Data[8]", - "size": 8, - "type": "ImU8" - } - ], - "ImGuiDataVarInfo": [ + "name": "TotalAllocCount", + "type": "int" + }, { - "name": "Type", - "type": "ImGuiDataType" + "name": "TotalFreeCount", + "type": "int" }, { "comment": { - "sameline": "// 1+" + "sameline": "// Current index in buffer" }, - "name": "Count", - "type": "ImU32" + "name": "LastEntriesIdx", + "type": "ImS16" }, { "comment": { - "sameline": "// Offset in parent structure" + "sameline": "// Track last 6 frames that had allocations" }, - "name": "Offset", - "type": "ImU32" + "name": "LastEntriesBuf[6]", + "size": 6, + "type": "ImGuiDebugAllocEntry" } ], "ImGuiDockContext": [ @@ -8819,6 +9156,16 @@ "type": "bool" } ], + "ImGuiFocusScopeData": [ + { + "name": "ID", + "type": "ImGuiID" + }, + { + "name": "WindowID", + "type": "ImGuiID" + } + ], "ImGuiGroupData": [ { "name": "WindowID", @@ -8832,6 +9179,10 @@ "name": "BackupCursorMaxPos", "type": "ImVec2" }, + { + "name": "BackupCursorPosPrevLine", + "type": "ImVec2" + }, { "name": "BackupIndent", "type": "ImVec1" @@ -8860,11 +9211,48 @@ "name": "BackupHoveredIdIsAlive", "type": "bool" }, + { + "name": "BackupIsSameLine", + "type": "bool" + }, { "name": "EmitItem", "type": "bool" } ], + "ImGuiIDStackTool": [ + { + "name": "LastActiveFrame", + "type": "int" + }, + { + "comment": { + "sameline": "// -1: query stack and resize Results, >= 0: individual stack level" + }, + "name": "StackLevel", + "type": "int" + }, + { + "comment": { + "sameline": "// ID to query details for" + }, + "name": "QueryId", + "type": "ImGuiID" + }, + { + "name": "Results", + "template_type": "ImGuiStackLevelInfo", + "type": "ImVector_ImGuiStackLevelInfo" + }, + { + "name": "CopyToClipboardOnCtrlC", + "type": "bool" + }, + { + "name": "CopyToClipboardLastTime", + "type": "float" + } + ], "ImGuiIO": [ { "comment": { @@ -9117,7 +9505,15 @@ }, { "comment": { - "above": " // Tools to test correct Begin/End and BeginChild/EndChild behaviors.\n // Presently Begin()/End() and BeginChild()/EndChild() needs to ALWAYS be called in tandem, regardless of return value of BeginXXX()\n // This is inconsistent with other BeginXXX functions and create confusion for many users.\n // We expect to update the API eventually. In the meanwhile we provide tools to facilitate checking user-code behavior.", + "above": " // Option to enable various debug tools showing buttons that will call the IM_DEBUG_BREAK() macro.\n // - The Item Picker tool will be available regardless of this being enabled, in order to maximize its discoverability.\n // - Requires a debugger being attached, otherwise IM_DEBUG_BREAK() options will appear to crash your application.\n // e.g. io.ConfigDebugIsDebuggerPresent = ::IsDebuggerPresent() on Win32, or refer to ImOsIsDebuggerPresent() imgui_test_engine/imgui_te_utils.cpp for a Unix compatible version).", + "sameline": "// = false // Enable various tools calling IM_DEBUG_BREAK()." + }, + "name": "ConfigDebugIsDebuggerPresent", + "type": "bool" + }, + { + "comment": { + "above": " // Tools to test correct Begin/End and BeginChild/EndChild behaviors.\n // - Presently Begin()/End() and BeginChild()/EndChild() needs to ALWAYS be called in tandem, regardless of return value of BeginXXX()\n // - This is inconsistent with other BeginXXX functions and create confusion for many users.\n // - We expect to update the API eventually. In the meanwhile we provide tools to facilitate checking user-code behavior.", "sameline": "// = false // First-time calls to Begin()/BeginChild() will return false. NEEDS TO BE SET AT APPLICATION BOOT TIME if you don't want to miss windows." }, "name": "ConfigDebugBeginReturnValueOnce", @@ -9132,7 +9528,7 @@ }, { "comment": { - "above": " // Option to deactivate io.AddFocusEvent(false) handling. May facilitate interactions with a debugger when focus loss leads to clearing inputs data.\n // Backends may have other side-effects on focus loss, so this will reduce side-effects but not necessary remove all of them.\n // Consider using e.g. Win32's IsDebuggerPresent() as an additional filter (or see ImOsIsDebuggerPresent() in imgui_test_engine/imgui_te_utils.cpp for a Unix compatible version).", + "above": " // Option to deactivate io.AddFocusEvent(false) handling.\n // - May facilitate interactions with a debugger when focus loss leads to clearing inputs data.\n // - Backends may have other side-effects on focus loss, so this will reduce side-effects but not necessary remove all of them.", "sameline": "// = false // Ignore io.AddFocusEvent(false), consequently not calling io.ClearInputKeys() in input processing." }, "name": "ConfigDebugIgnoreFocusLoss", @@ -9204,13 +9600,6 @@ "name": "SetPlatformImeDataFn", "type": "void(*)(ImGuiViewport* viewport,ImGuiPlatformImeData* data)" }, - { - "comment": { - "sameline": "// Unused field to keep data structure the same size." - }, - "name": "_UnusedPadding", - "type": "void*" - }, { "comment": { "above": " // Optional: Platform locale", @@ -9303,13 +9692,6 @@ "name": "MetricsActiveWindows", "type": "int" }, - { - "comment": { - "sameline": "// Number of active allocations, updated by MemAlloc/MemFree based on current context. May be off if you have multiple imgui contexts." - }, - "name": "MetricsActiveAllocations", - "type": "int" - }, { "comment": { "sameline": "// 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." @@ -9317,30 +9699,6 @@ "name": "MouseDelta", "type": "ImVec2" }, - { - "comment": { - "sameline": "// [LEGACY] Input: map of indices into the KeysDown[512] entries array which represent your \"native\" keyboard state. The first 512 are now unused and should be kept zero. Legacy backend will write into KeyMap[] using ImGuiKey_ indices which are always >512." - }, - "name": "KeyMap[ImGuiKey_COUNT]", - "size": 652, - "type": "int" - }, - { - "comment": { - "sameline": "// [LEGACY] Input: 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). This used to be [512] sized. It is now ImGuiKey_COUNT to allow legacy io.KeysDown[GetKeyIndex(...)] to work without an overflow." - }, - "name": "KeysDown[ImGuiKey_COUNT]", - "size": 652, - "type": "bool" - }, - { - "comment": { - "sameline": "// [LEGACY] Since 1.88, NavInputs[] was removed. Backends from 1.60 to 1.86 won't build. Feed gamepad inputs via io.AddKeyEvent() and ImGuiKey_GamepadXXX enums." - }, - "name": "NavInputs[ImGuiNavInput_COUNT]", - "size": 16, - "type": "float" - }, { "comment": { "sameline": "// Parent UI context (needs to be set explicitly by parent)." @@ -9433,7 +9791,7 @@ "sameline": "// Key state for all known keys. Use IsKeyXXX() functions to access this." }, "name": "KeysData[ImGuiKey_KeysData_SIZE]", - "size": 652, + "size": 154, "type": "ImGuiKeyData" }, { @@ -9872,7 +10230,7 @@ }, { "comment": { - "sameline": "// backup of end-user buffer at the time of focus (in UTF-8, unaltered)" + "sameline": "// value to revert to when pressing Escape = backup of end-user buffer at the time of focus (in UTF-8, unaltered)" }, "name": "InitialTextA", "template_type": "char", @@ -9940,6 +10298,24 @@ }, "name": "Flags", "type": "ImGuiInputTextFlags" + }, + { + "comment": { + "sameline": "// force a reload of user buf so it may be modified externally. may be automatic in future version." + }, + "name": "ReloadUserBuf", + "type": "bool" + }, + { + "comment": { + "sameline": "// POSITIONS ARE IN IMWCHAR units *NOT* UTF-8 this is why this is not exposed yet." + }, + "name": "ReloadSelectionStart", + "type": "int" + }, + { + "name": "ReloadSelectionEnd", + "type": "int" } ], "ImGuiKeyData": [ @@ -10008,6 +10384,13 @@ "name": "Mods", "type": "ImU16" }, + { + "comment": { + "sameline": "// [DEBUG] For debug display" + }, + "name": "RoutingCurrScore", + "type": "ImU8" + }, { "comment": { "sameline": "// Lower is better (0: perfect score)" @@ -10030,7 +10413,7 @@ "sameline": "// Index of first entry in Entries[]" }, "name": "Index[ImGuiKey_NamedKey_COUNT]", - "size": 140, + "size": 154, "type": "ImGuiKeyRoutingIndex" }, { @@ -10082,10 +10465,18 @@ }, { "comment": { - "sameline": "// Display rectangle (only if ImGuiItemStatusFlags_HasDisplayRect is set)" + "above": "\n // Rarely used fields are not explicitly cleared, only valid when the corresponding ImGuiItemStatusFlags is set.", + "sameline": "// Display rectangle (ONLY VALID IF ImGuiItemStatusFlags_HasDisplayRect is set)" }, "name": "DisplayRect", "type": "ImRect" + }, + { + "comment": { + "sameline": "// Clip rectangle at the time of submitting item (ONLY VALID IF ImGuiItemStatusFlags_HasClipRect is set)" + }, + "name": "ClipRect", + "type": "ImRect" } ], "ImGuiListClipper": [ @@ -10253,7 +10644,7 @@ "type": "bool" }, { - "name": "ShowStackTool", + "name": "ShowIDStackTool", "type": "bool" }, { @@ -10276,6 +10667,10 @@ "name": "ShowDrawCmdBoundingBoxes", "type": "bool" }, + { + "name": "ShowTextEncodingViewer", + "type": "bool" + }, { "name": "ShowAtlasTintedWithTextColor", "type": "bool" @@ -10291,6 +10686,14 @@ { "name": "ShowTablesRectsType", "type": "int" + }, + { + "name": "HighlightMonitorIdx", + "type": "int" + }, + { + "name": "HighlightViewportID", + "type": "ImGuiID" } ], "ImGuiNavItemData": [ @@ -10387,6 +10790,13 @@ { "comment": { "above": "\n // Non-flags members are NOT cleared by ItemAdd() meaning they are still valid during NavProcessItem()", + "sameline": "// Set by SetNextItemSelectionUserData() (note that NULL/0 is a valid value, we use -1 == ImGuiSelectionUserData_Invalid to mark invalid values)" + }, + "name": "SelectionUserData", + "type": "ImGuiSelectionUserData" + }, + { + "comment": { "sameline": "// Set by SetNextItemWidth()" }, "name": "Width", @@ -10394,14 +10804,10 @@ }, { "comment": { - "sameline": "// Set by SetNextItemSelectionUserData() (note that NULL/0 is a valid value, we use -1 == ImGuiSelectionUserData_Invalid to mark invalid values)" + "sameline": "// Set by SetNextItemShortcut()" }, - "name": "SelectionUserData", - "type": "ImGuiSelectionUserData" - }, - { - "name": "OpenCond", - "type": "ImGuiCond" + "name": "Shortcut", + "type": "ImGuiKeyChord" }, { "comment": { @@ -10409,6 +10815,11 @@ }, "name": "OpenVal", "type": "bool" + }, + { + "bitfield": "8", + "name": "OpenCond", + "type": "ImGuiCond" } ], "ImGuiNextWindowData": [ @@ -10452,6 +10863,10 @@ "name": "ScrollVal", "type": "ImVec2" }, + { + "name": "ChildFlags", + "type": "ImGuiChildFlags" + }, { "name": "PosUndock", "type": "bool" @@ -11182,39 +11597,6 @@ "type": "short" } ], - "ImGuiStackTool": [ - { - "name": "LastActiveFrame", - "type": "int" - }, - { - "comment": { - "sameline": "// -1: query stack and resize Results, >= 0: individual stack level" - }, - "name": "StackLevel", - "type": "int" - }, - { - "comment": { - "sameline": "// ID to query details for" - }, - "name": "QueryId", - "type": "ImGuiID" - }, - { - "name": "Results", - "template_type": "ImGuiStackLevelInfo", - "type": "ImVector_ImGuiStackLevelInfo" - }, - { - "name": "CopyToClipboardOnCtrlC", - "type": "bool" - }, - { - "name": "CopyToClipboardLastTime", - "type": "float" - } - ], "ImGuiStorage": [ { "name": "Data", @@ -11443,6 +11825,13 @@ "name": "TabBarBorderSize", "type": "float" }, + { + "comment": { + "sameline": "// Angle of angled headers (supported values range from -50.0f degrees to +50.0f degrees)." + }, + "name": "TableAngledHeadersAngle", + "type": "float" + }, { "comment": { "sameline": "// Side of the color button in the ColorEdit4 widget (left/right). Defaults to ImGuiDir_Right." @@ -12120,6 +12509,20 @@ "name": "RefScale", "type": "float" }, + { + "comment": { + "sameline": "// Set by TableAngledHeadersRow(), used in TableUpdateLayout()" + }, + "name": "AngledHeadersHeight", + "type": "float" + }, + { + "comment": { + "sameline": "// Set by TableAngledHeadersRow(), used in TableUpdateLayout()" + }, + "name": "AngledHeadersSlope", + "type": "float" + }, { "comment": { "sameline": "// Note: for non-scrolling table, OuterRect.Max.y is often FLT_MAX until EndTable(), unless a height has been specified in BeginTable()." @@ -12261,6 +12664,13 @@ "name": "DeclColumnsCount", "type": "ImGuiTableColumnIdx" }, + { + "comment": { + "sameline": "// Count columns with angled headers" + }, + "name": "AngledHeadersCount", + "type": "ImGuiTableColumnIdx" + }, { "comment": { "sameline": "// Index of column whose visible region is being hovered. Important: == ColumnsCount when hovering empty region after the right-most column!" @@ -12275,6 +12685,13 @@ "name": "HoveredColumnBorder", "type": "ImGuiTableColumnIdx" }, + { + "comment": { + "sameline": "// Index of column which should be highlighted." + }, + "name": "HighlightColumnHeader", + "type": "ImGuiTableColumnIdx" + }, { "comment": { "sameline": "// Index of single column requesting auto-fit." @@ -12441,6 +12858,13 @@ "name": "IsContextPopupOpen", "type": "bool" }, + { + "comment": { + "sameline": "// Disable default context menu contents. You may submit your own using TableBeginContextMenuPopup()/EndPopup()" + }, + "name": "DisableDefaultContextMenu", + "type": "bool" + }, { "name": "IsSettingsRequestLoad", "type": "bool" @@ -12481,6 +12905,14 @@ "name": "IsDefaultSizingPolicy", "type": "bool" }, + { + "name": "IsActiveIdAliveBeforeTable", + "type": "bool" + }, + { + "name": "IsActiveIdInTable", + "type": "bool" + }, { "comment": { "sameline": "// Whether ANY instance of this table had a vertical scrollbar during the current frame." @@ -12882,9 +13314,9 @@ }, { "comment": { - "sameline": "// Height of first row from last frame (FIXME: this is used as \"header height\" and may be reworked)" + "sameline": "// Height of first consecutive header rows from last frame (FIXME: this is used assuming consecutive headers are in same frozen set)" }, - "name": "LastFirstRowHeight", + "name": "LastTopHeadersRowHeight", "type": "float" }, { @@ -12988,6 +13420,13 @@ "name": "LastTimeActive", "type": "float" }, + { + "comment": { + "sameline": "// Used in EndTable()" + }, + "name": "AngledHeadersExtraWidth", + "type": "float" + }, { "comment": { "sameline": "// outer_size.x passed to BeginTable()" @@ -13466,6 +13905,13 @@ "name": "FlagsPreviousFrame", "type": "ImGuiWindowFlags" }, + { + "comment": { + "sameline": "// Set when window is a child window. See enum ImGuiChildFlags_" + }, + "name": "ChildFlags", + "type": "ImGuiChildFlags" + }, { "comment": { "sameline": "// Advanced users only. Set with SetNextWindowClass()" @@ -13756,6 +14202,13 @@ "name": "HasCloseButton", "type": "bool" }, + { + "comment": { + "sameline": "// Current border being hovered for resize (-1: none, otherwise 0-3)" + }, + "name": "ResizeBorderHovered", + "type": "signed char" + }, { "comment": { "sameline": "// Current border being held for resize (-1: none, otherwise 0-3)" @@ -13813,10 +14266,6 @@ "name": "AutoFitFramesY", "type": "ImS8" }, - { - "name": "AutoFitChildAxises", - "type": "ImS8" - }, { "name": "AutoFitOnlyGrows", "type": "bool" @@ -14084,6 +14533,13 @@ "name": "RootWindowForNav", "type": "ImGuiWindow*" }, + { + "comment": { + "sameline": "// Set to manual link a window to its logical parent so that Shortcut() chain are honoerd (e.g. Tool linked to Document)" + }, + "name": "ParentWindowForFocusRoute", + "type": "ImGuiWindow*" + }, { "comment": { "sameline": "// When going to the menu bar, we remember the child window we came from. (This could probably be made implicit if we kept g.Windows sorted by last focused including child window.)" @@ -14223,6 +14679,13 @@ "name": "ParentViewportId", "type": "ImGuiID" }, + { + "comment": { + "sameline": "// ID of parent window for shortcut focus route evaluation, e.g. Shortcut() call from Parent Window will succeed when this window is focused." + }, + "name": "FocusRouteParentWindowId", + "type": "ImGuiID" + }, { "comment": { "sameline": "// Viewport flags to set when a window of this class owns a viewport. This allows you to enforce OS decoration or task bar icon, override the defaults on a per-window basis." @@ -14322,6 +14785,10 @@ "name": "Collapsed", "type": "bool" }, + { + "name": "IsChild", + "type": "bool" + }, { "comment": { "sameline": "// Set when loaded from .ini data (to enable merging/loading .ini data into an already running context)" @@ -14553,6 +15020,10 @@ "name": "ParentLayoutType", "type": "ImGuiLayoutType" }, + { + "name": "ModalDimBgColor", + "type": "ImU32" + }, { "comment": { "above": " // Local parameters stacks\n // We store the current settings outside of the vectors to increase memory locality (reduce cache misses). The vectors are rarely modified. Also it allows us to not heap allocate for short-lived windows which are not using those settings.", @@ -14929,6 +15400,7 @@ "ImGuiContextHook": true, "ImGuiDockNodeSettings": true, "ImGuiDockRequest": true, + "ImGuiFocusScopeData": true, "ImGuiGroupData": true, "ImGuiID": true, "ImGuiInputEvent": true, diff --git a/cimgui/cimgui_templates/typedefs_dict.json b/cimgui/cimgui_templates/typedefs_dict.json index 9ad415b5e..d838d5c7e 100644 --- a/cimgui/cimgui_templates/typedefs_dict.json +++ b/cimgui/cimgui_templates/typedefs_dict.json @@ -28,6 +28,7 @@ "ImGuiActivateFlags": "int", "ImGuiBackendFlags": "int", "ImGuiButtonFlags": "int", + "ImGuiChildFlags": "int", "ImGuiCol": "int", "ImGuiColorEditFlags": "int", "ImGuiColorMod": "struct ImGuiColorMod", @@ -43,6 +44,8 @@ "ImGuiDataTypeInfo": "struct ImGuiDataTypeInfo", "ImGuiDataTypeTempStorage": "struct ImGuiDataTypeTempStorage", "ImGuiDataVarInfo": "struct ImGuiDataVarInfo", + "ImGuiDebugAllocEntry": "struct ImGuiDebugAllocEntry", + "ImGuiDebugAllocInfo": "struct ImGuiDebugAllocInfo", "ImGuiDebugLogFlags": "int", "ImGuiDir": "int", "ImGuiDockContext": "struct ImGuiDockContext", @@ -53,10 +56,12 @@ "ImGuiDragDropFlags": "int", "ImGuiErrorLogCallback": "void(*)(void* user_data,const char* fmt,...);", "ImGuiFocusRequestFlags": "int", + "ImGuiFocusScopeData": "struct ImGuiFocusScopeData", "ImGuiFocusedFlags": "int", "ImGuiGroupData": "struct ImGuiGroupData", "ImGuiHoveredFlags": "int", "ImGuiID": "unsigned int", + "ImGuiIDStackTool": "struct ImGuiIDStackTool", "ImGuiIO": "struct ImGuiIO", "ImGuiInputEvent": "struct ImGuiInputEvent", "ImGuiInputEventAppFocused": "struct ImGuiInputEventAppFocused", @@ -124,7 +129,6 @@ "ImGuiSortDirection": "int", "ImGuiStackLevelInfo": "struct ImGuiStackLevelInfo", "ImGuiStackSizes": "struct ImGuiStackSizes", - "ImGuiStackTool": "struct ImGuiStackTool", "ImGuiStorage": "struct ImGuiStorage", "ImGuiStoragePair": "struct ImGuiStoragePair", "ImGuiStyle": "struct ImGuiStyle", diff --git a/cimgui/cimplot.cpp b/cimgui/cimplot.cpp index 05b7dce5b..2b64795ea 100644 --- a/cimgui/cimplot.cpp +++ b/cimgui/cimplot.cpp @@ -947,43 +947,83 @@ CIMGUI_API void ImPlot_PlotInfLines_U64Ptr(const char* label_id,const ImU64* val { return ImPlot::PlotInfLines(label_id,values,count,flags,offset,stride); } -CIMGUI_API void ImPlot_PlotPieChart_FloatPtr(const char* const label_ids[],const float* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags) +CIMGUI_API void ImPlot_PlotPieChart_FloatPtrPlotFormatter(const char* const label_ids[],const float* values,int count,double x,double y,double radius,ImPlotFormatter fmt,void* fmt_data,double angle0,ImPlotPieChartFlags flags) +{ + return ImPlot::PlotPieChart(label_ids,values,count,x,y,radius,fmt,fmt_data,angle0,flags); +} +CIMGUI_API void ImPlot_PlotPieChart_doublePtrPlotFormatter(const char* const label_ids[],const double* values,int count,double x,double y,double radius,ImPlotFormatter fmt,void* fmt_data,double angle0,ImPlotPieChartFlags flags) +{ + return ImPlot::PlotPieChart(label_ids,values,count,x,y,radius,fmt,fmt_data,angle0,flags); +} +CIMGUI_API void ImPlot_PlotPieChart_S8PtrPlotFormatter(const char* const label_ids[],const ImS8* values,int count,double x,double y,double radius,ImPlotFormatter fmt,void* fmt_data,double angle0,ImPlotPieChartFlags flags) +{ + return ImPlot::PlotPieChart(label_ids,values,count,x,y,radius,fmt,fmt_data,angle0,flags); +} +CIMGUI_API void ImPlot_PlotPieChart_U8PtrPlotFormatter(const char* const label_ids[],const ImU8* values,int count,double x,double y,double radius,ImPlotFormatter fmt,void* fmt_data,double angle0,ImPlotPieChartFlags flags) +{ + return ImPlot::PlotPieChart(label_ids,values,count,x,y,radius,fmt,fmt_data,angle0,flags); +} +CIMGUI_API void ImPlot_PlotPieChart_S16PtrPlotFormatter(const char* const label_ids[],const ImS16* values,int count,double x,double y,double radius,ImPlotFormatter fmt,void* fmt_data,double angle0,ImPlotPieChartFlags flags) +{ + return ImPlot::PlotPieChart(label_ids,values,count,x,y,radius,fmt,fmt_data,angle0,flags); +} +CIMGUI_API void ImPlot_PlotPieChart_U16PtrPlotFormatter(const char* const label_ids[],const ImU16* values,int count,double x,double y,double radius,ImPlotFormatter fmt,void* fmt_data,double angle0,ImPlotPieChartFlags flags) +{ + return ImPlot::PlotPieChart(label_ids,values,count,x,y,radius,fmt,fmt_data,angle0,flags); +} +CIMGUI_API void ImPlot_PlotPieChart_S32PtrPlotFormatter(const char* const label_ids[],const ImS32* values,int count,double x,double y,double radius,ImPlotFormatter fmt,void* fmt_data,double angle0,ImPlotPieChartFlags flags) +{ + return ImPlot::PlotPieChart(label_ids,values,count,x,y,radius,fmt,fmt_data,angle0,flags); +} +CIMGUI_API void ImPlot_PlotPieChart_U32PtrPlotFormatter(const char* const label_ids[],const ImU32* values,int count,double x,double y,double radius,ImPlotFormatter fmt,void* fmt_data,double angle0,ImPlotPieChartFlags flags) +{ + return ImPlot::PlotPieChart(label_ids,values,count,x,y,radius,fmt,fmt_data,angle0,flags); +} +CIMGUI_API void ImPlot_PlotPieChart_S64PtrPlotFormatter(const char* const label_ids[],const ImS64* values,int count,double x,double y,double radius,ImPlotFormatter fmt,void* fmt_data,double angle0,ImPlotPieChartFlags flags) +{ + return ImPlot::PlotPieChart(label_ids,values,count,x,y,radius,fmt,fmt_data,angle0,flags); +} +CIMGUI_API void ImPlot_PlotPieChart_U64PtrPlotFormatter(const char* const label_ids[],const ImU64* values,int count,double x,double y,double radius,ImPlotFormatter fmt,void* fmt_data,double angle0,ImPlotPieChartFlags flags) +{ + return ImPlot::PlotPieChart(label_ids,values,count,x,y,radius,fmt,fmt_data,angle0,flags); +} +CIMGUI_API void ImPlot_PlotPieChart_FloatPtrStr(const char* const label_ids[],const float* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags) { return ImPlot::PlotPieChart(label_ids,values,count,x,y,radius,label_fmt,angle0,flags); } -CIMGUI_API void ImPlot_PlotPieChart_doublePtr(const char* const label_ids[],const double* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags) +CIMGUI_API void ImPlot_PlotPieChart_doublePtrStr(const char* const label_ids[],const double* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags) { return ImPlot::PlotPieChart(label_ids,values,count,x,y,radius,label_fmt,angle0,flags); } -CIMGUI_API void ImPlot_PlotPieChart_S8Ptr(const char* const label_ids[],const ImS8* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags) +CIMGUI_API void ImPlot_PlotPieChart_S8PtrStr(const char* const label_ids[],const ImS8* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags) { return ImPlot::PlotPieChart(label_ids,values,count,x,y,radius,label_fmt,angle0,flags); } -CIMGUI_API void ImPlot_PlotPieChart_U8Ptr(const char* const label_ids[],const ImU8* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags) +CIMGUI_API void ImPlot_PlotPieChart_U8PtrStr(const char* const label_ids[],const ImU8* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags) { return ImPlot::PlotPieChart(label_ids,values,count,x,y,radius,label_fmt,angle0,flags); } -CIMGUI_API void ImPlot_PlotPieChart_S16Ptr(const char* const label_ids[],const ImS16* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags) +CIMGUI_API void ImPlot_PlotPieChart_S16PtrStr(const char* const label_ids[],const ImS16* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags) { return ImPlot::PlotPieChart(label_ids,values,count,x,y,radius,label_fmt,angle0,flags); } -CIMGUI_API void ImPlot_PlotPieChart_U16Ptr(const char* const label_ids[],const ImU16* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags) +CIMGUI_API void ImPlot_PlotPieChart_U16PtrStr(const char* const label_ids[],const ImU16* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags) { return ImPlot::PlotPieChart(label_ids,values,count,x,y,radius,label_fmt,angle0,flags); } -CIMGUI_API void ImPlot_PlotPieChart_S32Ptr(const char* const label_ids[],const ImS32* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags) +CIMGUI_API void ImPlot_PlotPieChart_S32PtrStr(const char* const label_ids[],const ImS32* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags) { return ImPlot::PlotPieChart(label_ids,values,count,x,y,radius,label_fmt,angle0,flags); } -CIMGUI_API void ImPlot_PlotPieChart_U32Ptr(const char* const label_ids[],const ImU32* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags) +CIMGUI_API void ImPlot_PlotPieChart_U32PtrStr(const char* const label_ids[],const ImU32* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags) { return ImPlot::PlotPieChart(label_ids,values,count,x,y,radius,label_fmt,angle0,flags); } -CIMGUI_API void ImPlot_PlotPieChart_S64Ptr(const char* const label_ids[],const ImS64* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags) +CIMGUI_API void ImPlot_PlotPieChart_S64PtrStr(const char* const label_ids[],const ImS64* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags) { return ImPlot::PlotPieChart(label_ids,values,count,x,y,radius,label_fmt,angle0,flags); } -CIMGUI_API void ImPlot_PlotPieChart_U64Ptr(const char* const label_ids[],const ImU64* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags) +CIMGUI_API void ImPlot_PlotPieChart_U64PtrStr(const char* const label_ids[],const ImU64* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags) { return ImPlot::PlotPieChart(label_ids,values,count,x,y,radius,label_fmt,angle0,flags); } diff --git a/cimgui/cimplot.h b/cimgui/cimplot.h index 8ff9f8286..9d10ad1a3 100644 --- a/cimgui/cimplot.h +++ b/cimgui/cimplot.h @@ -203,7 +203,8 @@ typedef enum { }ImPlotInfLinesFlags_; typedef enum { ImPlotPieChartFlags_None = 0, - ImPlotPieChartFlags_Normalize = 1 << 10 + ImPlotPieChartFlags_Normalize = 1 << 10, + ImPlotPieChartFlags_IgnoreHidden = 1 << 11 }ImPlotPieChartFlags_; typedef enum { ImPlotHeatmapFlags_None = 0, @@ -1041,16 +1042,26 @@ CIMGUI_API void ImPlot_PlotInfLines_S32Ptr(const char* label_id,const ImS32* val CIMGUI_API void ImPlot_PlotInfLines_U32Ptr(const char* label_id,const ImU32* values,int count,ImPlotInfLinesFlags flags,int offset,int stride); CIMGUI_API void ImPlot_PlotInfLines_S64Ptr(const char* label_id,const ImS64* values,int count,ImPlotInfLinesFlags flags,int offset,int stride); CIMGUI_API void ImPlot_PlotInfLines_U64Ptr(const char* label_id,const ImU64* values,int count,ImPlotInfLinesFlags flags,int offset,int stride); -CIMGUI_API void ImPlot_PlotPieChart_FloatPtr(const char* const label_ids[],const float* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags); -CIMGUI_API void ImPlot_PlotPieChart_doublePtr(const char* const label_ids[],const double* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags); -CIMGUI_API void ImPlot_PlotPieChart_S8Ptr(const char* const label_ids[],const ImS8* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags); -CIMGUI_API void ImPlot_PlotPieChart_U8Ptr(const char* const label_ids[],const ImU8* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags); -CIMGUI_API void ImPlot_PlotPieChart_S16Ptr(const char* const label_ids[],const ImS16* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags); -CIMGUI_API void ImPlot_PlotPieChart_U16Ptr(const char* const label_ids[],const ImU16* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags); -CIMGUI_API void ImPlot_PlotPieChart_S32Ptr(const char* const label_ids[],const ImS32* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags); -CIMGUI_API void ImPlot_PlotPieChart_U32Ptr(const char* const label_ids[],const ImU32* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags); -CIMGUI_API void ImPlot_PlotPieChart_S64Ptr(const char* const label_ids[],const ImS64* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags); -CIMGUI_API void ImPlot_PlotPieChart_U64Ptr(const char* const label_ids[],const ImU64* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags); +CIMGUI_API void ImPlot_PlotPieChart_FloatPtrPlotFormatter(const char* const label_ids[],const float* values,int count,double x,double y,double radius,ImPlotFormatter fmt,void* fmt_data,double angle0,ImPlotPieChartFlags flags); +CIMGUI_API void ImPlot_PlotPieChart_doublePtrPlotFormatter(const char* const label_ids[],const double* values,int count,double x,double y,double radius,ImPlotFormatter fmt,void* fmt_data,double angle0,ImPlotPieChartFlags flags); +CIMGUI_API void ImPlot_PlotPieChart_S8PtrPlotFormatter(const char* const label_ids[],const ImS8* values,int count,double x,double y,double radius,ImPlotFormatter fmt,void* fmt_data,double angle0,ImPlotPieChartFlags flags); +CIMGUI_API void ImPlot_PlotPieChart_U8PtrPlotFormatter(const char* const label_ids[],const ImU8* values,int count,double x,double y,double radius,ImPlotFormatter fmt,void* fmt_data,double angle0,ImPlotPieChartFlags flags); +CIMGUI_API void ImPlot_PlotPieChart_S16PtrPlotFormatter(const char* const label_ids[],const ImS16* values,int count,double x,double y,double radius,ImPlotFormatter fmt,void* fmt_data,double angle0,ImPlotPieChartFlags flags); +CIMGUI_API void ImPlot_PlotPieChart_U16PtrPlotFormatter(const char* const label_ids[],const ImU16* values,int count,double x,double y,double radius,ImPlotFormatter fmt,void* fmt_data,double angle0,ImPlotPieChartFlags flags); +CIMGUI_API void ImPlot_PlotPieChart_S32PtrPlotFormatter(const char* const label_ids[],const ImS32* values,int count,double x,double y,double radius,ImPlotFormatter fmt,void* fmt_data,double angle0,ImPlotPieChartFlags flags); +CIMGUI_API void ImPlot_PlotPieChart_U32PtrPlotFormatter(const char* const label_ids[],const ImU32* values,int count,double x,double y,double radius,ImPlotFormatter fmt,void* fmt_data,double angle0,ImPlotPieChartFlags flags); +CIMGUI_API void ImPlot_PlotPieChart_S64PtrPlotFormatter(const char* const label_ids[],const ImS64* values,int count,double x,double y,double radius,ImPlotFormatter fmt,void* fmt_data,double angle0,ImPlotPieChartFlags flags); +CIMGUI_API void ImPlot_PlotPieChart_U64PtrPlotFormatter(const char* const label_ids[],const ImU64* values,int count,double x,double y,double radius,ImPlotFormatter fmt,void* fmt_data,double angle0,ImPlotPieChartFlags flags); +CIMGUI_API void ImPlot_PlotPieChart_FloatPtrStr(const char* const label_ids[],const float* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags); +CIMGUI_API void ImPlot_PlotPieChart_doublePtrStr(const char* const label_ids[],const double* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags); +CIMGUI_API void ImPlot_PlotPieChart_S8PtrStr(const char* const label_ids[],const ImS8* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags); +CIMGUI_API void ImPlot_PlotPieChart_U8PtrStr(const char* const label_ids[],const ImU8* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags); +CIMGUI_API void ImPlot_PlotPieChart_S16PtrStr(const char* const label_ids[],const ImS16* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags); +CIMGUI_API void ImPlot_PlotPieChart_U16PtrStr(const char* const label_ids[],const ImU16* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags); +CIMGUI_API void ImPlot_PlotPieChart_S32PtrStr(const char* const label_ids[],const ImS32* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags); +CIMGUI_API void ImPlot_PlotPieChart_U32PtrStr(const char* const label_ids[],const ImU32* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags); +CIMGUI_API void ImPlot_PlotPieChart_S64PtrStr(const char* const label_ids[],const ImS64* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags); +CIMGUI_API void ImPlot_PlotPieChart_U64PtrStr(const char* const label_ids[],const ImU64* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags); CIMGUI_API void ImPlot_PlotHeatmap_FloatPtr(const char* label_id,const float* values,int rows,int cols,double scale_min,double scale_max,const char* label_fmt,const ImPlotPoint bounds_min,const ImPlotPoint bounds_max,ImPlotHeatmapFlags flags); CIMGUI_API void ImPlot_PlotHeatmap_doublePtr(const char* label_id,const double* values,int rows,int cols,double scale_min,double scale_max,const char* label_fmt,const ImPlotPoint bounds_min,const ImPlotPoint bounds_max,ImPlotHeatmapFlags flags); CIMGUI_API void ImPlot_PlotHeatmap_S8Ptr(const char* label_id,const ImS8* values,int rows,int cols,double scale_min,double scale_max,const char* label_fmt,const ImPlotPoint bounds_min,const ImPlotPoint bounds_max,ImPlotHeatmapFlags flags); diff --git a/cimgui/cimplot_templates/definitions.json b/cimgui/cimplot_templates/definitions.json index 25ed3c2db..4990a6634 100644 --- a/cimgui/cimplot_templates/definitions.json +++ b/cimgui/cimplot_templates/definitions.json @@ -1703,7 +1703,7 @@ "constructor": true, "defaults": {}, "funcname": "ImPlotInputMap", - "location": "implot:576", + "location": "implot:577", "ov_cimguiname": "ImPlotInputMap_ImPlotInputMap", "signature": "()", "stname": "ImPlotInputMap" @@ -2632,7 +2632,7 @@ "constructor": true, "defaults": {}, "funcname": "ImPlotPoint", - "location": "implot:469", + "location": "implot:470", "ov_cimguiname": "ImPlotPoint_ImPlotPoint_Nil", "signature": "()", "stname": "ImPlotPoint" @@ -2655,7 +2655,7 @@ "constructor": true, "defaults": {}, "funcname": "ImPlotPoint", - "location": "implot:470", + "location": "implot:471", "ov_cimguiname": "ImPlotPoint_ImPlotPoint_double", "signature": "(double,double)", "stname": "ImPlotPoint" @@ -2674,7 +2674,7 @@ "constructor": true, "defaults": {}, "funcname": "ImPlotPoint", - "location": "implot:471", + "location": "implot:472", "ov_cimguiname": "ImPlotPoint_ImPlotPoint_Vec2", "signature": "(const ImVec2)", "stname": "ImPlotPoint" @@ -2717,7 +2717,7 @@ "cimguiname": "ImPlotRange_Clamp", "defaults": {}, "funcname": "Clamp", - "location": "implot:488", + "location": "implot:489", "ov_cimguiname": "ImPlotRange_Clamp", "ret": "double", "signature": "(double)const", @@ -2742,7 +2742,7 @@ "cimguiname": "ImPlotRange_Contains", "defaults": {}, "funcname": "Contains", - "location": "implot:486", + "location": "implot:487", "ov_cimguiname": "ImPlotRange_Contains", "ret": "bool", "signature": "(double)const", @@ -2759,7 +2759,7 @@ "constructor": true, "defaults": {}, "funcname": "ImPlotRange", - "location": "implot:484", + "location": "implot:485", "ov_cimguiname": "ImPlotRange_ImPlotRange_Nil", "signature": "()", "stname": "ImPlotRange" @@ -2782,7 +2782,7 @@ "constructor": true, "defaults": {}, "funcname": "ImPlotRange", - "location": "implot:485", + "location": "implot:486", "ov_cimguiname": "ImPlotRange_ImPlotRange_double", "signature": "(double,double)", "stname": "ImPlotRange" @@ -2802,7 +2802,7 @@ "cimguiname": "ImPlotRange_Size", "defaults": {}, "funcname": "Size", - "location": "implot:487", + "location": "implot:488", "ov_cimguiname": "ImPlotRange_Size", "ret": "double", "signature": "()const", @@ -2850,7 +2850,7 @@ "cimguiname": "ImPlotRect_Clamp", "defaults": {}, "funcname": "Clamp", - "location": "implot:499", + "location": "implot:500", "nonUDT": 1, "ov_cimguiname": "ImPlotRect_Clamp_PlotPoInt", "ret": "void", @@ -2882,7 +2882,7 @@ "cimguiname": "ImPlotRect_Clamp", "defaults": {}, "funcname": "Clamp", - "location": "implot:500", + "location": "implot:501", "nonUDT": 1, "ov_cimguiname": "ImPlotRect_Clamp_double", "ret": "void", @@ -2908,7 +2908,7 @@ "cimguiname": "ImPlotRect_Contains", "defaults": {}, "funcname": "Contains", - "location": "implot:496", + "location": "implot:497", "ov_cimguiname": "ImPlotRect_Contains_PlotPoInt", "ret": "bool", "signature": "(const ImPlotPoint)const", @@ -2935,7 +2935,7 @@ "cimguiname": "ImPlotRect_Contains", "defaults": {}, "funcname": "Contains", - "location": "implot:497", + "location": "implot:498", "ov_cimguiname": "ImPlotRect_Contains_double", "ret": "bool", "signature": "(double,double)const", @@ -2952,7 +2952,7 @@ "constructor": true, "defaults": {}, "funcname": "ImPlotRect", - "location": "implot:494", + "location": "implot:495", "ov_cimguiname": "ImPlotRect_ImPlotRect_Nil", "signature": "()", "stname": "ImPlotRect" @@ -2983,7 +2983,7 @@ "constructor": true, "defaults": {}, "funcname": "ImPlotRect", - "location": "implot:495", + "location": "implot:496", "ov_cimguiname": "ImPlotRect_ImPlotRect_double", "signature": "(double,double,double,double)", "stname": "ImPlotRect" @@ -3007,7 +3007,7 @@ "cimguiname": "ImPlotRect_Max", "defaults": {}, "funcname": "Max", - "location": "implot:502", + "location": "implot:503", "nonUDT": 1, "ov_cimguiname": "ImPlotRect_Max", "ret": "void", @@ -3033,7 +3033,7 @@ "cimguiname": "ImPlotRect_Min", "defaults": {}, "funcname": "Min", - "location": "implot:501", + "location": "implot:502", "nonUDT": 1, "ov_cimguiname": "ImPlotRect_Min", "ret": "void", @@ -3059,7 +3059,7 @@ "cimguiname": "ImPlotRect_Size", "defaults": {}, "funcname": "Size", - "location": "implot:498", + "location": "implot:499", "nonUDT": 1, "ov_cimguiname": "ImPlotRect_Size", "ret": "void", @@ -3096,7 +3096,7 @@ "constructor": true, "defaults": {}, "funcname": "ImPlotStyle", - "location": "implot:544", + "location": "implot:545", "ov_cimguiname": "ImPlotStyle_ImPlotStyle", "signature": "()", "stname": "ImPlotStyle" @@ -3797,7 +3797,7 @@ "qual": "true" }, "funcname": "AddColormap", - "location": "implot:1151", + "location": "implot:1153", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_AddColormap_Vec4Ptr", "ret": "ImPlotColormap", @@ -3831,7 +3831,7 @@ "qual": "true" }, "funcname": "AddColormap", - "location": "implot:1152", + "location": "implot:1154", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_AddColormap_U32Ptr", "ret": "ImPlotColormap", @@ -4016,7 +4016,7 @@ "round": "false" }, "funcname": "Annotation", - "location": "implot:941", + "location": "implot:943", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_Annotation_Bool", "ret": "void", @@ -4061,7 +4061,7 @@ "defaults": {}, "funcname": "Annotation", "isvararg": "...)", - "location": "implot:942", + "location": "implot:944", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_Annotation_Str", "ret": "void", @@ -4107,7 +4107,7 @@ "cimguiname": "ImPlot_AnnotationV", "defaults": {}, "funcname": "AnnotationV", - "location": "implot:943", + "location": "implot:945", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_AnnotationV", "ret": "void", @@ -4213,7 +4213,7 @@ "vertical": "true" }, "funcname": "BeginAlignedPlots", - "location": "implot:1006", + "location": "implot:1008", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_BeginAlignedPlots", "ret": "bool", @@ -4241,7 +4241,7 @@ "flags": "0" }, "funcname": "BeginDragDropSourceAxis", - "location": "implot:1040", + "location": "implot:1042", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_BeginDragDropSourceAxis", "ret": "bool", @@ -4269,7 +4269,7 @@ "flags": "0" }, "funcname": "BeginDragDropSourceItem", - "location": "implot:1042", + "location": "implot:1044", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_BeginDragDropSourceItem", "ret": "bool", @@ -4293,7 +4293,7 @@ "flags": "0" }, "funcname": "BeginDragDropSourcePlot", - "location": "implot:1038", + "location": "implot:1040", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_BeginDragDropSourcePlot", "ret": "bool", @@ -4315,7 +4315,7 @@ "cimguiname": "ImPlot_BeginDragDropTargetAxis", "defaults": {}, "funcname": "BeginDragDropTargetAxis", - "location": "implot:1028", + "location": "implot:1030", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_BeginDragDropTargetAxis", "ret": "bool", @@ -4332,7 +4332,7 @@ "cimguiname": "ImPlot_BeginDragDropTargetLegend", "defaults": {}, "funcname": "BeginDragDropTargetLegend", - "location": "implot:1030", + "location": "implot:1032", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_BeginDragDropTargetLegend", "ret": "bool", @@ -4349,7 +4349,7 @@ "cimguiname": "ImPlot_BeginDragDropTargetPlot", "defaults": {}, "funcname": "BeginDragDropTargetPlot", - "location": "implot:1026", + "location": "implot:1028", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_BeginDragDropTargetPlot", "ret": "bool", @@ -4410,7 +4410,7 @@ "mouse_button": "1" }, "funcname": "BeginLegendPopup", - "location": "implot:1015", + "location": "implot:1017", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_BeginLegendPopup", "ret": "bool", @@ -4443,7 +4443,7 @@ "size": "ImVec2(-1,0)" }, "funcname": "BeginPlot", - "location": "implot:633", + "location": "implot:634", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_BeginPlot", "ret": "bool", @@ -4493,7 +4493,7 @@ "row_ratios": "nullptr" }, "funcname": "BeginSubplots", - "location": "implot:689", + "location": "implot:690", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_BeginSubplots", "ret": "bool", @@ -4517,7 +4517,7 @@ "plot_title_id": "nullptr" }, "funcname": "BustColorCache", - "location": "implot:1196", + "location": "implot:1198", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_BustColorCache", "ret": "void", @@ -5120,7 +5120,7 @@ "cimguiname": "ImPlot_CancelPlotSelection", "defaults": {}, "funcname": "CancelPlotSelection", - "location": "implot:993", + "location": "implot:995", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_CancelPlotSelection", "ret": "void", @@ -5254,7 +5254,7 @@ "size": "ImVec2(0,0)" }, "funcname": "ColormapButton", - "location": "implot:1187", + "location": "implot:1189", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_ColormapButton", "ret": "bool", @@ -5276,7 +5276,7 @@ "cimguiname": "ImPlot_ColormapIcon", "defaults": {}, "funcname": "ColormapIcon", - "location": "implot:1217", + "location": "implot:1219", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_ColormapIcon", "ret": "void", @@ -5327,7 +5327,7 @@ "size": "ImVec2(0,0)" }, "funcname": "ColormapScale", - "location": "implot:1183", + "location": "implot:1185", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_ColormapScale", "ret": "void", @@ -5369,7 +5369,7 @@ "out": "nullptr" }, "funcname": "ColormapSlider", - "location": "implot:1185", + "location": "implot:1187", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_ColormapSlider", "ret": "bool", @@ -5417,7 +5417,7 @@ "cimguiname": "ImPlot_CreateContext", "defaults": {}, "funcname": "CreateContext", - "location": "implot:599", + "location": "implot:600", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_CreateContext", "ret": "ImPlotContext*", @@ -5441,7 +5441,7 @@ "ctx": "nullptr" }, "funcname": "DestroyContext", - "location": "implot:601", + "location": "implot:602", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_DestroyContext", "ret": "void", @@ -5497,7 +5497,7 @@ "thickness": "1" }, "funcname": "DragLineX", - "location": "implot:934", + "location": "implot:936", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_DragLineX", "ret": "bool", @@ -5553,7 +5553,7 @@ "thickness": "1" }, "funcname": "DragLineY", - "location": "implot:936", + "location": "implot:938", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_DragLineY", "ret": "bool", @@ -5613,7 +5613,7 @@ "size": "4" }, "funcname": "DragPoint", - "location": "implot:932", + "location": "implot:934", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_DragPoint", "ret": "bool", @@ -5676,7 +5676,7 @@ "out_hovered": "nullptr" }, "funcname": "DragRect", - "location": "implot:938", + "location": "implot:940", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_DragRect", "ret": "bool", @@ -5693,7 +5693,7 @@ "cimguiname": "ImPlot_EndAlignedPlots", "defaults": {}, "funcname": "EndAlignedPlots", - "location": "implot:1008", + "location": "implot:1010", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_EndAlignedPlots", "ret": "void", @@ -5710,7 +5710,7 @@ "cimguiname": "ImPlot_EndDragDropSource", "defaults": {}, "funcname": "EndDragDropSource", - "location": "implot:1044", + "location": "implot:1046", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_EndDragDropSource", "ret": "void", @@ -5727,7 +5727,7 @@ "cimguiname": "ImPlot_EndDragDropTarget", "defaults": {}, "funcname": "EndDragDropTarget", - "location": "implot:1032", + "location": "implot:1034", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_EndDragDropTarget", "ret": "void", @@ -5761,7 +5761,7 @@ "cimguiname": "ImPlot_EndLegendPopup", "defaults": {}, "funcname": "EndLegendPopup", - "location": "implot:1017", + "location": "implot:1019", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_EndLegendPopup", "ret": "void", @@ -5778,7 +5778,7 @@ "cimguiname": "ImPlot_EndPlot", "defaults": {}, "funcname": "EndPlot", - "location": "implot:637", + "location": "implot:638", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_EndPlot", "ret": "void", @@ -5795,7 +5795,7 @@ "cimguiname": "ImPlot_EndSubplots", "defaults": {}, "funcname": "EndSubplots", - "location": "implot:699", + "location": "implot:700", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_EndSubplots", "ret": "void", @@ -6512,7 +6512,7 @@ "cmap": "-1" }, "funcname": "GetColormapColor", - "location": "implot:1178", + "location": "implot:1180", "namespace": "ImPlot", "nonUDT": 1, "ov_cimguiname": "ImPlot_GetColormapColor", @@ -6556,7 +6556,7 @@ "cimguiname": "ImPlot_GetColormapCount", "defaults": {}, "funcname": "GetColormapCount", - "location": "implot:1155", + "location": "implot:1157", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_GetColormapCount", "ret": "int", @@ -6578,7 +6578,7 @@ "cimguiname": "ImPlot_GetColormapIndex", "defaults": {}, "funcname": "GetColormapIndex", - "location": "implot:1159", + "location": "implot:1161", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_GetColormapIndex", "ret": "ImPlotColormap", @@ -6600,7 +6600,7 @@ "cimguiname": "ImPlot_GetColormapName", "defaults": {}, "funcname": "GetColormapName", - "location": "implot:1157", + "location": "implot:1159", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_GetColormapName", "ret": "const char*", @@ -6624,7 +6624,7 @@ "cmap": "-1" }, "funcname": "GetColormapSize", - "location": "implot:1176", + "location": "implot:1178", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_GetColormapSize", "ret": "int", @@ -6641,7 +6641,7 @@ "cimguiname": "ImPlot_GetCurrentContext", "defaults": {}, "funcname": "GetCurrentContext", - "location": "implot:603", + "location": "implot:604", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_GetCurrentContext", "ret": "ImPlotContext*", @@ -6744,7 +6744,7 @@ "cimguiname": "ImPlot_GetInputMap", "defaults": {}, "funcname": "GetInputMap", - "location": "implot:1203", + "location": "implot:1205", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_GetInputMap", "ret": "ImPlotInputMap*", @@ -6807,7 +6807,7 @@ "cimguiname": "ImPlot_GetLastItemColor", "defaults": {}, "funcname": "GetLastItemColor", - "location": "implot:1125", + "location": "implot:1127", "namespace": "ImPlot", "nonUDT": 1, "ov_cimguiname": "ImPlot_GetLastItemColor", @@ -6897,7 +6897,7 @@ "cimguiname": "ImPlot_GetMarkerName", "defaults": {}, "funcname": "GetMarkerName", - "location": "implot:1130", + "location": "implot:1132", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_GetMarkerName", "ret": "const char*", @@ -6936,7 +6936,7 @@ "cimguiname": "ImPlot_GetPlotDrawList", "defaults": {}, "funcname": "GetPlotDrawList", - "location": "implot:1220", + "location": "implot:1222", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_GetPlotDrawList", "ret": "ImDrawList*", @@ -6969,7 +6969,7 @@ "y_axis": "-1" }, "funcname": "GetPlotLimits", - "location": "implot:979", + "location": "implot:981", "namespace": "ImPlot", "nonUDT": 1, "ov_cimguiname": "ImPlot_GetPlotLimits", @@ -7003,7 +7003,7 @@ "y_axis": "-1" }, "funcname": "GetPlotMousePos", - "location": "implot:977", + "location": "implot:979", "namespace": "ImPlot", "nonUDT": 1, "ov_cimguiname": "ImPlot_GetPlotMousePos", @@ -7026,7 +7026,7 @@ "cimguiname": "ImPlot_GetPlotPos", "defaults": {}, "funcname": "GetPlotPos", - "location": "implot:972", + "location": "implot:974", "namespace": "ImPlot", "nonUDT": 1, "ov_cimguiname": "ImPlot_GetPlotPos", @@ -7060,7 +7060,7 @@ "y_axis": "-1" }, "funcname": "GetPlotSelection", - "location": "implot:991", + "location": "implot:993", "namespace": "ImPlot", "nonUDT": 1, "ov_cimguiname": "ImPlot_GetPlotSelection", @@ -7083,7 +7083,7 @@ "cimguiname": "ImPlot_GetPlotSize", "defaults": {}, "funcname": "GetPlotSize", - "location": "implot:974", + "location": "implot:976", "namespace": "ImPlot", "nonUDT": 1, "ov_cimguiname": "ImPlot_GetPlotSize", @@ -7101,7 +7101,7 @@ "cimguiname": "ImPlot_GetStyle", "defaults": {}, "funcname": "GetStyle", - "location": "implot:1080", + "location": "implot:1082", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_GetStyle", "ret": "ImPlotStyle*", @@ -7124,7 +7124,7 @@ "cimguiname": "ImPlot_GetStyleColorName", "defaults": {}, "funcname": "GetStyleColorName", - "location": "implot:1128", + "location": "implot:1130", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_GetStyleColorName", "ret": "const char*", @@ -7224,7 +7224,7 @@ "hidden": "true" }, "funcname": "HideNextItem", - "location": "implot:997", + "location": "implot:999", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_HideNextItem", "ret": "void", @@ -10100,7 +10100,7 @@ "cimguiname": "ImPlot_IsAxisHovered", "defaults": {}, "funcname": "IsAxisHovered", - "location": "implot:984", + "location": "implot:986", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_IsAxisHovered", "ret": "bool", @@ -10186,7 +10186,7 @@ "cimguiname": "ImPlot_IsLegendEntryHovered", "defaults": {}, "funcname": "IsLegendEntryHovered", - "location": "implot:1019", + "location": "implot:1021", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_IsLegendEntryHovered", "ret": "bool", @@ -10203,7 +10203,7 @@ "cimguiname": "ImPlot_IsPlotHovered", "defaults": {}, "funcname": "IsPlotHovered", - "location": "implot:982", + "location": "implot:984", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_IsPlotHovered", "ret": "bool", @@ -10220,7 +10220,7 @@ "cimguiname": "ImPlot_IsPlotSelected", "defaults": {}, "funcname": "IsPlotSelected", - "location": "implot:989", + "location": "implot:991", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_IsPlotSelected", "ret": "bool", @@ -10237,7 +10237,7 @@ "cimguiname": "ImPlot_IsSubplotsHovered", "defaults": {}, "funcname": "IsSubplotsHovered", - "location": "implot:986", + "location": "implot:988", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_IsSubplotsHovered", "ret": "bool", @@ -10259,7 +10259,7 @@ "cimguiname": "ImPlot_ItemIcon", "defaults": {}, "funcname": "ItemIcon", - "location": "implot:1215", + "location": "implot:1217", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_ItemIcon_Vec4", "ret": "void", @@ -10279,7 +10279,7 @@ "cimguiname": "ImPlot_ItemIcon", "defaults": {}, "funcname": "ItemIcon", - "location": "implot:1216", + "location": "implot:1218", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_ItemIcon_U32", "ret": "void", @@ -10573,7 +10573,7 @@ "dst": "nullptr" }, "funcname": "MapInputDefault", - "location": "implot:1206", + "location": "implot:1208", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_MapInputDefault", "ret": "void", @@ -10597,7 +10597,7 @@ "dst": "nullptr" }, "funcname": "MapInputReverse", - "location": "implot:1208", + "location": "implot:1210", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_MapInputReverse", "ret": "void", @@ -10673,7 +10673,7 @@ "cimguiname": "ImPlot_NextColormapColor", "defaults": {}, "funcname": "NextColormapColor", - "location": "implot:1170", + "location": "implot:1172", "namespace": "ImPlot", "nonUDT": 1, "ov_cimguiname": "ImPlot_NextColormapColor", @@ -10798,7 +10798,7 @@ "y_axis": "-1" }, "funcname": "PixelsToPlot", - "location": "implot:964", + "location": "implot:966", "namespace": "ImPlot", "nonUDT": 1, "ov_cimguiname": "ImPlot_PixelsToPlot_Vec2", @@ -10838,7 +10838,7 @@ "y_axis": "-1" }, "funcname": "PixelsToPlot", - "location": "implot:965", + "location": "implot:967", "namespace": "ImPlot", "nonUDT": 1, "ov_cimguiname": "ImPlot_PixelsToPlot_Float", @@ -10889,7 +10889,7 @@ "shift": "0" }, "funcname": "PlotBarGroups", - "location": "implot:881", + "location": "implot:882", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotBarGroups_FloatPtr", "ret": "void", @@ -10937,7 +10937,7 @@ "shift": "0" }, "funcname": "PlotBarGroups", - "location": "implot:881", + "location": "implot:882", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotBarGroups_doublePtr", "ret": "void", @@ -10985,7 +10985,7 @@ "shift": "0" }, "funcname": "PlotBarGroups", - "location": "implot:881", + "location": "implot:882", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotBarGroups_S8Ptr", "ret": "void", @@ -11033,7 +11033,7 @@ "shift": "0" }, "funcname": "PlotBarGroups", - "location": "implot:881", + "location": "implot:882", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotBarGroups_U8Ptr", "ret": "void", @@ -11081,7 +11081,7 @@ "shift": "0" }, "funcname": "PlotBarGroups", - "location": "implot:881", + "location": "implot:882", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotBarGroups_S16Ptr", "ret": "void", @@ -11129,7 +11129,7 @@ "shift": "0" }, "funcname": "PlotBarGroups", - "location": "implot:881", + "location": "implot:882", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotBarGroups_U16Ptr", "ret": "void", @@ -11177,7 +11177,7 @@ "shift": "0" }, "funcname": "PlotBarGroups", - "location": "implot:881", + "location": "implot:882", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotBarGroups_S32Ptr", "ret": "void", @@ -11225,7 +11225,7 @@ "shift": "0" }, "funcname": "PlotBarGroups", - "location": "implot:881", + "location": "implot:882", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotBarGroups_U32Ptr", "ret": "void", @@ -11273,7 +11273,7 @@ "shift": "0" }, "funcname": "PlotBarGroups", - "location": "implot:881", + "location": "implot:882", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotBarGroups_S64Ptr", "ret": "void", @@ -11321,7 +11321,7 @@ "shift": "0" }, "funcname": "PlotBarGroups", - "location": "implot:881", + "location": "implot:882", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotBarGroups_U64Ptr", "ret": "void", @@ -11377,7 +11377,7 @@ "stride": "sizeof(float)" }, "funcname": "PlotBars", - "location": "implot:876", + "location": "implot:877", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotBars_FloatPtrInt", "ret": "void", @@ -11431,7 +11431,7 @@ "stride": "sizeof(double)" }, "funcname": "PlotBars", - "location": "implot:876", + "location": "implot:877", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotBars_doublePtrInt", "ret": "void", @@ -11485,7 +11485,7 @@ "stride": "sizeof(ImS8)" }, "funcname": "PlotBars", - "location": "implot:876", + "location": "implot:877", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotBars_S8PtrInt", "ret": "void", @@ -11539,7 +11539,7 @@ "stride": "sizeof(ImU8)" }, "funcname": "PlotBars", - "location": "implot:876", + "location": "implot:877", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotBars_U8PtrInt", "ret": "void", @@ -11593,7 +11593,7 @@ "stride": "sizeof(ImS16)" }, "funcname": "PlotBars", - "location": "implot:876", + "location": "implot:877", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotBars_S16PtrInt", "ret": "void", @@ -11647,7 +11647,7 @@ "stride": "sizeof(ImU16)" }, "funcname": "PlotBars", - "location": "implot:876", + "location": "implot:877", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotBars_U16PtrInt", "ret": "void", @@ -11701,7 +11701,7 @@ "stride": "sizeof(ImS32)" }, "funcname": "PlotBars", - "location": "implot:876", + "location": "implot:877", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotBars_S32PtrInt", "ret": "void", @@ -11755,7 +11755,7 @@ "stride": "sizeof(ImU32)" }, "funcname": "PlotBars", - "location": "implot:876", + "location": "implot:877", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotBars_U32PtrInt", "ret": "void", @@ -11809,7 +11809,7 @@ "stride": "sizeof(ImS64)" }, "funcname": "PlotBars", - "location": "implot:876", + "location": "implot:877", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotBars_S64PtrInt", "ret": "void", @@ -11863,7 +11863,7 @@ "stride": "sizeof(ImU64)" }, "funcname": "PlotBars", - "location": "implot:876", + "location": "implot:877", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotBars_U64PtrInt", "ret": "void", @@ -11915,7 +11915,7 @@ "stride": "sizeof(float)" }, "funcname": "PlotBars", - "location": "implot:877", + "location": "implot:878", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotBars_FloatPtrFloatPtr", "ret": "void", @@ -11967,7 +11967,7 @@ "stride": "sizeof(double)" }, "funcname": "PlotBars", - "location": "implot:877", + "location": "implot:878", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotBars_doublePtrdoublePtr", "ret": "void", @@ -12019,7 +12019,7 @@ "stride": "sizeof(ImS8)" }, "funcname": "PlotBars", - "location": "implot:877", + "location": "implot:878", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotBars_S8PtrS8Ptr", "ret": "void", @@ -12071,7 +12071,7 @@ "stride": "sizeof(ImU8)" }, "funcname": "PlotBars", - "location": "implot:877", + "location": "implot:878", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotBars_U8PtrU8Ptr", "ret": "void", @@ -12123,7 +12123,7 @@ "stride": "sizeof(ImS16)" }, "funcname": "PlotBars", - "location": "implot:877", + "location": "implot:878", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotBars_S16PtrS16Ptr", "ret": "void", @@ -12175,7 +12175,7 @@ "stride": "sizeof(ImU16)" }, "funcname": "PlotBars", - "location": "implot:877", + "location": "implot:878", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotBars_U16PtrU16Ptr", "ret": "void", @@ -12227,7 +12227,7 @@ "stride": "sizeof(ImS32)" }, "funcname": "PlotBars", - "location": "implot:877", + "location": "implot:878", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotBars_S32PtrS32Ptr", "ret": "void", @@ -12279,7 +12279,7 @@ "stride": "sizeof(ImU32)" }, "funcname": "PlotBars", - "location": "implot:877", + "location": "implot:878", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotBars_U32PtrU32Ptr", "ret": "void", @@ -12331,7 +12331,7 @@ "stride": "sizeof(ImS64)" }, "funcname": "PlotBars", - "location": "implot:877", + "location": "implot:878", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotBars_S64PtrS64Ptr", "ret": "void", @@ -12383,7 +12383,7 @@ "stride": "sizeof(ImU64)" }, "funcname": "PlotBars", - "location": "implot:877", + "location": "implot:878", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotBars_U64PtrU64Ptr", "ret": "void", @@ -12428,7 +12428,7 @@ "flags": "0" }, "funcname": "PlotBarsG", - "location": "implot:878", + "location": "implot:879", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotBarsG", "ret": "void", @@ -12478,7 +12478,7 @@ "stride": "sizeof(float)" }, "funcname": "PlotDigital", - "location": "implot:909", + "location": "implot:911", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotDigital_FloatPtr", "ret": "void", @@ -12526,7 +12526,7 @@ "stride": "sizeof(double)" }, "funcname": "PlotDigital", - "location": "implot:909", + "location": "implot:911", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotDigital_doublePtr", "ret": "void", @@ -12574,7 +12574,7 @@ "stride": "sizeof(ImS8)" }, "funcname": "PlotDigital", - "location": "implot:909", + "location": "implot:911", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotDigital_S8Ptr", "ret": "void", @@ -12622,7 +12622,7 @@ "stride": "sizeof(ImU8)" }, "funcname": "PlotDigital", - "location": "implot:909", + "location": "implot:911", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotDigital_U8Ptr", "ret": "void", @@ -12670,7 +12670,7 @@ "stride": "sizeof(ImS16)" }, "funcname": "PlotDigital", - "location": "implot:909", + "location": "implot:911", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotDigital_S16Ptr", "ret": "void", @@ -12718,7 +12718,7 @@ "stride": "sizeof(ImU16)" }, "funcname": "PlotDigital", - "location": "implot:909", + "location": "implot:911", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotDigital_U16Ptr", "ret": "void", @@ -12766,7 +12766,7 @@ "stride": "sizeof(ImS32)" }, "funcname": "PlotDigital", - "location": "implot:909", + "location": "implot:911", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotDigital_S32Ptr", "ret": "void", @@ -12814,7 +12814,7 @@ "stride": "sizeof(ImU32)" }, "funcname": "PlotDigital", - "location": "implot:909", + "location": "implot:911", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotDigital_U32Ptr", "ret": "void", @@ -12862,7 +12862,7 @@ "stride": "sizeof(ImS64)" }, "funcname": "PlotDigital", - "location": "implot:909", + "location": "implot:911", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotDigital_S64Ptr", "ret": "void", @@ -12910,7 +12910,7 @@ "stride": "sizeof(ImU64)" }, "funcname": "PlotDigital", - "location": "implot:909", + "location": "implot:911", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotDigital_U64Ptr", "ret": "void", @@ -12951,7 +12951,7 @@ "flags": "0" }, "funcname": "PlotDigitalG", - "location": "implot:910", + "location": "implot:912", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotDigitalG", "ret": "void", @@ -12979,7 +12979,7 @@ "flags": "0" }, "funcname": "PlotDummy", - "location": "implot:919", + "location": "implot:921", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotDummy", "ret": "void", @@ -13033,7 +13033,7 @@ "stride": "sizeof(float)" }, "funcname": "PlotErrorBars", - "location": "implot:884", + "location": "implot:885", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotErrorBars_FloatPtrFloatPtrFloatPtrInt", "ret": "void", @@ -13085,7 +13085,7 @@ "stride": "sizeof(double)" }, "funcname": "PlotErrorBars", - "location": "implot:884", + "location": "implot:885", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotErrorBars_doublePtrdoublePtrdoublePtrInt", "ret": "void", @@ -13137,7 +13137,7 @@ "stride": "sizeof(ImS8)" }, "funcname": "PlotErrorBars", - "location": "implot:884", + "location": "implot:885", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotErrorBars_S8PtrS8PtrS8PtrInt", "ret": "void", @@ -13189,7 +13189,7 @@ "stride": "sizeof(ImU8)" }, "funcname": "PlotErrorBars", - "location": "implot:884", + "location": "implot:885", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotErrorBars_U8PtrU8PtrU8PtrInt", "ret": "void", @@ -13241,7 +13241,7 @@ "stride": "sizeof(ImS16)" }, "funcname": "PlotErrorBars", - "location": "implot:884", + "location": "implot:885", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotErrorBars_S16PtrS16PtrS16PtrInt", "ret": "void", @@ -13293,7 +13293,7 @@ "stride": "sizeof(ImU16)" }, "funcname": "PlotErrorBars", - "location": "implot:884", + "location": "implot:885", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotErrorBars_U16PtrU16PtrU16PtrInt", "ret": "void", @@ -13345,7 +13345,7 @@ "stride": "sizeof(ImS32)" }, "funcname": "PlotErrorBars", - "location": "implot:884", + "location": "implot:885", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotErrorBars_S32PtrS32PtrS32PtrInt", "ret": "void", @@ -13397,7 +13397,7 @@ "stride": "sizeof(ImU32)" }, "funcname": "PlotErrorBars", - "location": "implot:884", + "location": "implot:885", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotErrorBars_U32PtrU32PtrU32PtrInt", "ret": "void", @@ -13449,7 +13449,7 @@ "stride": "sizeof(ImS64)" }, "funcname": "PlotErrorBars", - "location": "implot:884", + "location": "implot:885", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotErrorBars_S64PtrS64PtrS64PtrInt", "ret": "void", @@ -13501,7 +13501,7 @@ "stride": "sizeof(ImU64)" }, "funcname": "PlotErrorBars", - "location": "implot:884", + "location": "implot:885", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotErrorBars_U64PtrU64PtrU64PtrInt", "ret": "void", @@ -13557,7 +13557,7 @@ "stride": "sizeof(float)" }, "funcname": "PlotErrorBars", - "location": "implot:885", + "location": "implot:886", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotErrorBars_FloatPtrFloatPtrFloatPtrFloatPtr", "ret": "void", @@ -13613,7 +13613,7 @@ "stride": "sizeof(double)" }, "funcname": "PlotErrorBars", - "location": "implot:885", + "location": "implot:886", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotErrorBars_doublePtrdoublePtrdoublePtrdoublePtr", "ret": "void", @@ -13669,7 +13669,7 @@ "stride": "sizeof(ImS8)" }, "funcname": "PlotErrorBars", - "location": "implot:885", + "location": "implot:886", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotErrorBars_S8PtrS8PtrS8PtrS8Ptr", "ret": "void", @@ -13725,7 +13725,7 @@ "stride": "sizeof(ImU8)" }, "funcname": "PlotErrorBars", - "location": "implot:885", + "location": "implot:886", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotErrorBars_U8PtrU8PtrU8PtrU8Ptr", "ret": "void", @@ -13781,7 +13781,7 @@ "stride": "sizeof(ImS16)" }, "funcname": "PlotErrorBars", - "location": "implot:885", + "location": "implot:886", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotErrorBars_S16PtrS16PtrS16PtrS16Ptr", "ret": "void", @@ -13837,7 +13837,7 @@ "stride": "sizeof(ImU16)" }, "funcname": "PlotErrorBars", - "location": "implot:885", + "location": "implot:886", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotErrorBars_U16PtrU16PtrU16PtrU16Ptr", "ret": "void", @@ -13893,7 +13893,7 @@ "stride": "sizeof(ImS32)" }, "funcname": "PlotErrorBars", - "location": "implot:885", + "location": "implot:886", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotErrorBars_S32PtrS32PtrS32PtrS32Ptr", "ret": "void", @@ -13949,7 +13949,7 @@ "stride": "sizeof(ImU32)" }, "funcname": "PlotErrorBars", - "location": "implot:885", + "location": "implot:886", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotErrorBars_U32PtrU32PtrU32PtrU32Ptr", "ret": "void", @@ -14005,7 +14005,7 @@ "stride": "sizeof(ImS64)" }, "funcname": "PlotErrorBars", - "location": "implot:885", + "location": "implot:886", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotErrorBars_S64PtrS64PtrS64PtrS64Ptr", "ret": "void", @@ -14061,7 +14061,7 @@ "stride": "sizeof(ImU64)" }, "funcname": "PlotErrorBars", - "location": "implot:885", + "location": "implot:886", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotErrorBars_U64PtrU64PtrU64PtrU64Ptr", "ret": "void", @@ -14126,7 +14126,7 @@ "scale_min": "0" }, "funcname": "PlotHeatmap", - "location": "implot:898", + "location": "implot:900", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotHeatmap_FloatPtr", "ret": "void", @@ -14189,7 +14189,7 @@ "scale_min": "0" }, "funcname": "PlotHeatmap", - "location": "implot:898", + "location": "implot:900", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotHeatmap_doublePtr", "ret": "void", @@ -14252,7 +14252,7 @@ "scale_min": "0" }, "funcname": "PlotHeatmap", - "location": "implot:898", + "location": "implot:900", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotHeatmap_S8Ptr", "ret": "void", @@ -14315,7 +14315,7 @@ "scale_min": "0" }, "funcname": "PlotHeatmap", - "location": "implot:898", + "location": "implot:900", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotHeatmap_U8Ptr", "ret": "void", @@ -14378,7 +14378,7 @@ "scale_min": "0" }, "funcname": "PlotHeatmap", - "location": "implot:898", + "location": "implot:900", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotHeatmap_S16Ptr", "ret": "void", @@ -14441,7 +14441,7 @@ "scale_min": "0" }, "funcname": "PlotHeatmap", - "location": "implot:898", + "location": "implot:900", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotHeatmap_U16Ptr", "ret": "void", @@ -14504,7 +14504,7 @@ "scale_min": "0" }, "funcname": "PlotHeatmap", - "location": "implot:898", + "location": "implot:900", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotHeatmap_S32Ptr", "ret": "void", @@ -14567,7 +14567,7 @@ "scale_min": "0" }, "funcname": "PlotHeatmap", - "location": "implot:898", + "location": "implot:900", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotHeatmap_U32Ptr", "ret": "void", @@ -14630,7 +14630,7 @@ "scale_min": "0" }, "funcname": "PlotHeatmap", - "location": "implot:898", + "location": "implot:900", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotHeatmap_S64Ptr", "ret": "void", @@ -14693,7 +14693,7 @@ "scale_min": "0" }, "funcname": "PlotHeatmap", - "location": "implot:898", + "location": "implot:900", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotHeatmap_U64Ptr", "ret": "void", @@ -14744,7 +14744,7 @@ "range": "ImPlotRange()" }, "funcname": "PlotHistogram", - "location": "implot:902", + "location": "implot:904", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotHistogram_FloatPtr", "ret": "double", @@ -14793,7 +14793,7 @@ "range": "ImPlotRange()" }, "funcname": "PlotHistogram", - "location": "implot:902", + "location": "implot:904", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotHistogram_doublePtr", "ret": "double", @@ -14842,7 +14842,7 @@ "range": "ImPlotRange()" }, "funcname": "PlotHistogram", - "location": "implot:902", + "location": "implot:904", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotHistogram_S8Ptr", "ret": "double", @@ -14891,7 +14891,7 @@ "range": "ImPlotRange()" }, "funcname": "PlotHistogram", - "location": "implot:902", + "location": "implot:904", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotHistogram_U8Ptr", "ret": "double", @@ -14940,7 +14940,7 @@ "range": "ImPlotRange()" }, "funcname": "PlotHistogram", - "location": "implot:902", + "location": "implot:904", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotHistogram_S16Ptr", "ret": "double", @@ -14989,7 +14989,7 @@ "range": "ImPlotRange()" }, "funcname": "PlotHistogram", - "location": "implot:902", + "location": "implot:904", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotHistogram_U16Ptr", "ret": "double", @@ -15038,7 +15038,7 @@ "range": "ImPlotRange()" }, "funcname": "PlotHistogram", - "location": "implot:902", + "location": "implot:904", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotHistogram_S32Ptr", "ret": "double", @@ -15087,7 +15087,7 @@ "range": "ImPlotRange()" }, "funcname": "PlotHistogram", - "location": "implot:902", + "location": "implot:904", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotHistogram_U32Ptr", "ret": "double", @@ -15136,7 +15136,7 @@ "range": "ImPlotRange()" }, "funcname": "PlotHistogram", - "location": "implot:902", + "location": "implot:904", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotHistogram_S64Ptr", "ret": "double", @@ -15185,7 +15185,7 @@ "range": "ImPlotRange()" }, "funcname": "PlotHistogram", - "location": "implot:902", + "location": "implot:904", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotHistogram_U64Ptr", "ret": "double", @@ -15240,7 +15240,7 @@ "y_bins": "ImPlotBin_Sturges" }, "funcname": "PlotHistogram2D", - "location": "implot:906", + "location": "implot:908", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotHistogram2D_FloatPtr", "ret": "double", @@ -15293,7 +15293,7 @@ "y_bins": "ImPlotBin_Sturges" }, "funcname": "PlotHistogram2D", - "location": "implot:906", + "location": "implot:908", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotHistogram2D_doublePtr", "ret": "double", @@ -15346,7 +15346,7 @@ "y_bins": "ImPlotBin_Sturges" }, "funcname": "PlotHistogram2D", - "location": "implot:906", + "location": "implot:908", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotHistogram2D_S8Ptr", "ret": "double", @@ -15399,7 +15399,7 @@ "y_bins": "ImPlotBin_Sturges" }, "funcname": "PlotHistogram2D", - "location": "implot:906", + "location": "implot:908", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotHistogram2D_U8Ptr", "ret": "double", @@ -15452,7 +15452,7 @@ "y_bins": "ImPlotBin_Sturges" }, "funcname": "PlotHistogram2D", - "location": "implot:906", + "location": "implot:908", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotHistogram2D_S16Ptr", "ret": "double", @@ -15505,7 +15505,7 @@ "y_bins": "ImPlotBin_Sturges" }, "funcname": "PlotHistogram2D", - "location": "implot:906", + "location": "implot:908", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotHistogram2D_U16Ptr", "ret": "double", @@ -15558,7 +15558,7 @@ "y_bins": "ImPlotBin_Sturges" }, "funcname": "PlotHistogram2D", - "location": "implot:906", + "location": "implot:908", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotHistogram2D_S32Ptr", "ret": "double", @@ -15611,7 +15611,7 @@ "y_bins": "ImPlotBin_Sturges" }, "funcname": "PlotHistogram2D", - "location": "implot:906", + "location": "implot:908", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotHistogram2D_U32Ptr", "ret": "double", @@ -15664,7 +15664,7 @@ "y_bins": "ImPlotBin_Sturges" }, "funcname": "PlotHistogram2D", - "location": "implot:906", + "location": "implot:908", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotHistogram2D_S64Ptr", "ret": "double", @@ -15717,7 +15717,7 @@ "y_bins": "ImPlotBin_Sturges" }, "funcname": "PlotHistogram2D", - "location": "implot:906", + "location": "implot:908", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotHistogram2D_U64Ptr", "ret": "double", @@ -15772,7 +15772,7 @@ "uv1": "ImVec2(1,1)" }, "funcname": "PlotImage", - "location": "implot:913", + "location": "implot:915", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotImage", "ret": "void", @@ -15818,7 +15818,7 @@ "stride": "sizeof(float)" }, "funcname": "PlotInfLines", - "location": "implot:892", + "location": "implot:893", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotInfLines_FloatPtr", "ret": "void", @@ -15862,7 +15862,7 @@ "stride": "sizeof(double)" }, "funcname": "PlotInfLines", - "location": "implot:892", + "location": "implot:893", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotInfLines_doublePtr", "ret": "void", @@ -15906,7 +15906,7 @@ "stride": "sizeof(ImS8)" }, "funcname": "PlotInfLines", - "location": "implot:892", + "location": "implot:893", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotInfLines_S8Ptr", "ret": "void", @@ -15950,7 +15950,7 @@ "stride": "sizeof(ImU8)" }, "funcname": "PlotInfLines", - "location": "implot:892", + "location": "implot:893", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotInfLines_U8Ptr", "ret": "void", @@ -15994,7 +15994,7 @@ "stride": "sizeof(ImS16)" }, "funcname": "PlotInfLines", - "location": "implot:892", + "location": "implot:893", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotInfLines_S16Ptr", "ret": "void", @@ -16038,7 +16038,7 @@ "stride": "sizeof(ImU16)" }, "funcname": "PlotInfLines", - "location": "implot:892", + "location": "implot:893", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotInfLines_U16Ptr", "ret": "void", @@ -16082,7 +16082,7 @@ "stride": "sizeof(ImS32)" }, "funcname": "PlotInfLines", - "location": "implot:892", + "location": "implot:893", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotInfLines_S32Ptr", "ret": "void", @@ -16126,7 +16126,7 @@ "stride": "sizeof(ImU32)" }, "funcname": "PlotInfLines", - "location": "implot:892", + "location": "implot:893", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotInfLines_U32Ptr", "ret": "void", @@ -16170,7 +16170,7 @@ "stride": "sizeof(ImS64)" }, "funcname": "PlotInfLines", - "location": "implot:892", + "location": "implot:893", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotInfLines_S64Ptr", "ret": "void", @@ -16214,7 +16214,7 @@ "stride": "sizeof(ImU64)" }, "funcname": "PlotInfLines", - "location": "implot:892", + "location": "implot:893", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotInfLines_U64Ptr", "ret": "void", @@ -16270,7 +16270,7 @@ "xstart": "0" }, "funcname": "PlotLine", - "location": "implot:855", + "location": "implot:856", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotLine_FloatPtrInt", "ret": "void", @@ -16324,7 +16324,7 @@ "xstart": "0" }, "funcname": "PlotLine", - "location": "implot:855", + "location": "implot:856", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotLine_doublePtrInt", "ret": "void", @@ -16378,7 +16378,7 @@ "xstart": "0" }, "funcname": "PlotLine", - "location": "implot:855", + "location": "implot:856", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotLine_S8PtrInt", "ret": "void", @@ -16432,7 +16432,7 @@ "xstart": "0" }, "funcname": "PlotLine", - "location": "implot:855", + "location": "implot:856", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotLine_U8PtrInt", "ret": "void", @@ -16486,7 +16486,7 @@ "xstart": "0" }, "funcname": "PlotLine", - "location": "implot:855", + "location": "implot:856", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotLine_S16PtrInt", "ret": "void", @@ -16540,7 +16540,7 @@ "xstart": "0" }, "funcname": "PlotLine", - "location": "implot:855", + "location": "implot:856", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotLine_U16PtrInt", "ret": "void", @@ -16594,7 +16594,7 @@ "xstart": "0" }, "funcname": "PlotLine", - "location": "implot:855", + "location": "implot:856", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotLine_S32PtrInt", "ret": "void", @@ -16648,7 +16648,7 @@ "xstart": "0" }, "funcname": "PlotLine", - "location": "implot:855", + "location": "implot:856", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotLine_U32PtrInt", "ret": "void", @@ -16702,7 +16702,7 @@ "xstart": "0" }, "funcname": "PlotLine", - "location": "implot:855", + "location": "implot:856", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotLine_S64PtrInt", "ret": "void", @@ -16756,7 +16756,7 @@ "xstart": "0" }, "funcname": "PlotLine", - "location": "implot:855", + "location": "implot:856", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotLine_U64PtrInt", "ret": "void", @@ -16804,7 +16804,7 @@ "stride": "sizeof(float)" }, "funcname": "PlotLine", - "location": "implot:856", + "location": "implot:857", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotLine_FloatPtrFloatPtr", "ret": "void", @@ -16852,7 +16852,7 @@ "stride": "sizeof(double)" }, "funcname": "PlotLine", - "location": "implot:856", + "location": "implot:857", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotLine_doublePtrdoublePtr", "ret": "void", @@ -16900,7 +16900,7 @@ "stride": "sizeof(ImS8)" }, "funcname": "PlotLine", - "location": "implot:856", + "location": "implot:857", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotLine_S8PtrS8Ptr", "ret": "void", @@ -16948,7 +16948,7 @@ "stride": "sizeof(ImU8)" }, "funcname": "PlotLine", - "location": "implot:856", + "location": "implot:857", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotLine_U8PtrU8Ptr", "ret": "void", @@ -16996,7 +16996,7 @@ "stride": "sizeof(ImS16)" }, "funcname": "PlotLine", - "location": "implot:856", + "location": "implot:857", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotLine_S16PtrS16Ptr", "ret": "void", @@ -17044,7 +17044,7 @@ "stride": "sizeof(ImU16)" }, "funcname": "PlotLine", - "location": "implot:856", + "location": "implot:857", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotLine_U16PtrU16Ptr", "ret": "void", @@ -17092,7 +17092,7 @@ "stride": "sizeof(ImS32)" }, "funcname": "PlotLine", - "location": "implot:856", + "location": "implot:857", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotLine_S32PtrS32Ptr", "ret": "void", @@ -17140,7 +17140,7 @@ "stride": "sizeof(ImU32)" }, "funcname": "PlotLine", - "location": "implot:856", + "location": "implot:857", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotLine_U32PtrU32Ptr", "ret": "void", @@ -17188,7 +17188,7 @@ "stride": "sizeof(ImS64)" }, "funcname": "PlotLine", - "location": "implot:856", + "location": "implot:857", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotLine_S64PtrS64Ptr", "ret": "void", @@ -17236,7 +17236,7 @@ "stride": "sizeof(ImU64)" }, "funcname": "PlotLine", - "location": "implot:856", + "location": "implot:857", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotLine_U64PtrU64Ptr", "ret": "void", @@ -17277,7 +17277,7 @@ "flags": "0" }, "funcname": "PlotLineG", - "location": "implot:857", + "location": "implot:858", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotLineG", "ret": "void", @@ -17287,7 +17287,7 @@ ], "ImPlot_PlotPieChart": [ { - "args": "(const char* const label_ids[],const float* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags)", + "args": "(const char* const label_ids[],const float* values,int count,double x,double y,double radius,ImPlotFormatter fmt,void* fmt_data,double angle0,ImPlotPieChartFlags flags)", "argsT": [ { "name": "label_ids", @@ -17314,8 +17314,12 @@ "type": "double" }, { - "name": "label_fmt", - "type": "const char*" + "name": "fmt", + "type": "ImPlotFormatter" + }, + { + "name": "fmt_data", + "type": "void*" }, { "name": "angle0", @@ -17326,24 +17330,24 @@ "type": "ImPlotPieChartFlags" } ], - "argsoriginal": "(const char* const label_ids[],const float* values,int count,double x,double y,double radius,const char* label_fmt=\"%.1f\",double angle0=90,ImPlotPieChartFlags flags=0)", - "call_args": "(label_ids,values,count,x,y,radius,label_fmt,angle0,flags)", + "argsoriginal": "(const char* const label_ids[],const float* values,int count,double x,double y,double radius,ImPlotFormatter fmt,void* fmt_data=nullptr,double angle0=90,ImPlotPieChartFlags flags=0)", + "call_args": "(label_ids,values,count,x,y,radius,fmt,fmt_data,angle0,flags)", "cimguiname": "ImPlot_PlotPieChart", "defaults": { "angle0": "90", "flags": "0", - "label_fmt": "\"%.1f\"" + "fmt_data": "nullptr" }, "funcname": "PlotPieChart", - "location": "implot:895", + "location": "implot:896", "namespace": "ImPlot", - "ov_cimguiname": "ImPlot_PlotPieChart_FloatPtr", + "ov_cimguiname": "ImPlot_PlotPieChart_FloatPtrPlotFormatter", "ret": "void", - "signature": "(const char* const[],const float*,int,double,double,double,const char*,double,ImPlotPieChartFlags)", + "signature": "(const char* const[],const float*,int,double,double,double,ImPlotFormatter,void*,double,ImPlotPieChartFlags)", "stname": "" }, { - "args": "(const char* const label_ids[],const double* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags)", + "args": "(const char* const label_ids[],const double* values,int count,double x,double y,double radius,ImPlotFormatter fmt,void* fmt_data,double angle0,ImPlotPieChartFlags flags)", "argsT": [ { "name": "label_ids", @@ -17370,8 +17374,12 @@ "type": "double" }, { - "name": "label_fmt", - "type": "const char*" + "name": "fmt", + "type": "ImPlotFormatter" + }, + { + "name": "fmt_data", + "type": "void*" }, { "name": "angle0", @@ -17382,24 +17390,24 @@ "type": "ImPlotPieChartFlags" } ], - "argsoriginal": "(const char* const label_ids[],const double* values,int count,double x,double y,double radius,const char* label_fmt=\"%.1f\",double angle0=90,ImPlotPieChartFlags flags=0)", - "call_args": "(label_ids,values,count,x,y,radius,label_fmt,angle0,flags)", + "argsoriginal": "(const char* const label_ids[],const double* values,int count,double x,double y,double radius,ImPlotFormatter fmt,void* fmt_data=nullptr,double angle0=90,ImPlotPieChartFlags flags=0)", + "call_args": "(label_ids,values,count,x,y,radius,fmt,fmt_data,angle0,flags)", "cimguiname": "ImPlot_PlotPieChart", "defaults": { "angle0": "90", "flags": "0", - "label_fmt": "\"%.1f\"" + "fmt_data": "nullptr" }, "funcname": "PlotPieChart", - "location": "implot:895", + "location": "implot:896", "namespace": "ImPlot", - "ov_cimguiname": "ImPlot_PlotPieChart_doublePtr", + "ov_cimguiname": "ImPlot_PlotPieChart_doublePtrPlotFormatter", "ret": "void", - "signature": "(const char* const[],const double*,int,double,double,double,const char*,double,ImPlotPieChartFlags)", + "signature": "(const char* const[],const double*,int,double,double,double,ImPlotFormatter,void*,double,ImPlotPieChartFlags)", "stname": "" }, { - "args": "(const char* const label_ids[],const ImS8* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags)", + "args": "(const char* const label_ids[],const ImS8* values,int count,double x,double y,double radius,ImPlotFormatter fmt,void* fmt_data,double angle0,ImPlotPieChartFlags flags)", "argsT": [ { "name": "label_ids", @@ -17426,8 +17434,12 @@ "type": "double" }, { - "name": "label_fmt", - "type": "const char*" + "name": "fmt", + "type": "ImPlotFormatter" + }, + { + "name": "fmt_data", + "type": "void*" }, { "name": "angle0", @@ -17438,24 +17450,24 @@ "type": "ImPlotPieChartFlags" } ], - "argsoriginal": "(const char* const label_ids[],const ImS8* values,int count,double x,double y,double radius,const char* label_fmt=\"%.1f\",double angle0=90,ImPlotPieChartFlags flags=0)", - "call_args": "(label_ids,values,count,x,y,radius,label_fmt,angle0,flags)", + "argsoriginal": "(const char* const label_ids[],const ImS8* values,int count,double x,double y,double radius,ImPlotFormatter fmt,void* fmt_data=nullptr,double angle0=90,ImPlotPieChartFlags flags=0)", + "call_args": "(label_ids,values,count,x,y,radius,fmt,fmt_data,angle0,flags)", "cimguiname": "ImPlot_PlotPieChart", "defaults": { "angle0": "90", "flags": "0", - "label_fmt": "\"%.1f\"" + "fmt_data": "nullptr" }, "funcname": "PlotPieChart", - "location": "implot:895", + "location": "implot:896", "namespace": "ImPlot", - "ov_cimguiname": "ImPlot_PlotPieChart_S8Ptr", + "ov_cimguiname": "ImPlot_PlotPieChart_S8PtrPlotFormatter", "ret": "void", - "signature": "(const char* const[],const ImS8*,int,double,double,double,const char*,double,ImPlotPieChartFlags)", + "signature": "(const char* const[],const ImS8*,int,double,double,double,ImPlotFormatter,void*,double,ImPlotPieChartFlags)", "stname": "" }, { - "args": "(const char* const label_ids[],const ImU8* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags)", + "args": "(const char* const label_ids[],const ImU8* values,int count,double x,double y,double radius,ImPlotFormatter fmt,void* fmt_data,double angle0,ImPlotPieChartFlags flags)", "argsT": [ { "name": "label_ids", @@ -17482,8 +17494,12 @@ "type": "double" }, { - "name": "label_fmt", - "type": "const char*" + "name": "fmt", + "type": "ImPlotFormatter" + }, + { + "name": "fmt_data", + "type": "void*" }, { "name": "angle0", @@ -17494,24 +17510,24 @@ "type": "ImPlotPieChartFlags" } ], - "argsoriginal": "(const char* const label_ids[],const ImU8* values,int count,double x,double y,double radius,const char* label_fmt=\"%.1f\",double angle0=90,ImPlotPieChartFlags flags=0)", - "call_args": "(label_ids,values,count,x,y,radius,label_fmt,angle0,flags)", + "argsoriginal": "(const char* const label_ids[],const ImU8* values,int count,double x,double y,double radius,ImPlotFormatter fmt,void* fmt_data=nullptr,double angle0=90,ImPlotPieChartFlags flags=0)", + "call_args": "(label_ids,values,count,x,y,radius,fmt,fmt_data,angle0,flags)", "cimguiname": "ImPlot_PlotPieChart", "defaults": { "angle0": "90", "flags": "0", - "label_fmt": "\"%.1f\"" + "fmt_data": "nullptr" }, "funcname": "PlotPieChart", - "location": "implot:895", + "location": "implot:896", "namespace": "ImPlot", - "ov_cimguiname": "ImPlot_PlotPieChart_U8Ptr", + "ov_cimguiname": "ImPlot_PlotPieChart_U8PtrPlotFormatter", "ret": "void", - "signature": "(const char* const[],const ImU8*,int,double,double,double,const char*,double,ImPlotPieChartFlags)", + "signature": "(const char* const[],const ImU8*,int,double,double,double,ImPlotFormatter,void*,double,ImPlotPieChartFlags)", "stname": "" }, { - "args": "(const char* const label_ids[],const ImS16* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags)", + "args": "(const char* const label_ids[],const ImS16* values,int count,double x,double y,double radius,ImPlotFormatter fmt,void* fmt_data,double angle0,ImPlotPieChartFlags flags)", "argsT": [ { "name": "label_ids", @@ -17538,8 +17554,12 @@ "type": "double" }, { - "name": "label_fmt", - "type": "const char*" + "name": "fmt", + "type": "ImPlotFormatter" + }, + { + "name": "fmt_data", + "type": "void*" }, { "name": "angle0", @@ -17550,24 +17570,24 @@ "type": "ImPlotPieChartFlags" } ], - "argsoriginal": "(const char* const label_ids[],const ImS16* values,int count,double x,double y,double radius,const char* label_fmt=\"%.1f\",double angle0=90,ImPlotPieChartFlags flags=0)", - "call_args": "(label_ids,values,count,x,y,radius,label_fmt,angle0,flags)", + "argsoriginal": "(const char* const label_ids[],const ImS16* values,int count,double x,double y,double radius,ImPlotFormatter fmt,void* fmt_data=nullptr,double angle0=90,ImPlotPieChartFlags flags=0)", + "call_args": "(label_ids,values,count,x,y,radius,fmt,fmt_data,angle0,flags)", "cimguiname": "ImPlot_PlotPieChart", "defaults": { "angle0": "90", "flags": "0", - "label_fmt": "\"%.1f\"" + "fmt_data": "nullptr" }, "funcname": "PlotPieChart", - "location": "implot:895", + "location": "implot:896", "namespace": "ImPlot", - "ov_cimguiname": "ImPlot_PlotPieChart_S16Ptr", + "ov_cimguiname": "ImPlot_PlotPieChart_S16PtrPlotFormatter", "ret": "void", - "signature": "(const char* const[],const ImS16*,int,double,double,double,const char*,double,ImPlotPieChartFlags)", + "signature": "(const char* const[],const ImS16*,int,double,double,double,ImPlotFormatter,void*,double,ImPlotPieChartFlags)", "stname": "" }, { - "args": "(const char* const label_ids[],const ImU16* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags)", + "args": "(const char* const label_ids[],const ImU16* values,int count,double x,double y,double radius,ImPlotFormatter fmt,void* fmt_data,double angle0,ImPlotPieChartFlags flags)", "argsT": [ { "name": "label_ids", @@ -17594,8 +17614,12 @@ "type": "double" }, { - "name": "label_fmt", - "type": "const char*" + "name": "fmt", + "type": "ImPlotFormatter" + }, + { + "name": "fmt_data", + "type": "void*" }, { "name": "angle0", @@ -17606,24 +17630,24 @@ "type": "ImPlotPieChartFlags" } ], - "argsoriginal": "(const char* const label_ids[],const ImU16* values,int count,double x,double y,double radius,const char* label_fmt=\"%.1f\",double angle0=90,ImPlotPieChartFlags flags=0)", - "call_args": "(label_ids,values,count,x,y,radius,label_fmt,angle0,flags)", + "argsoriginal": "(const char* const label_ids[],const ImU16* values,int count,double x,double y,double radius,ImPlotFormatter fmt,void* fmt_data=nullptr,double angle0=90,ImPlotPieChartFlags flags=0)", + "call_args": "(label_ids,values,count,x,y,radius,fmt,fmt_data,angle0,flags)", "cimguiname": "ImPlot_PlotPieChart", "defaults": { "angle0": "90", "flags": "0", - "label_fmt": "\"%.1f\"" + "fmt_data": "nullptr" }, "funcname": "PlotPieChart", - "location": "implot:895", + "location": "implot:896", "namespace": "ImPlot", - "ov_cimguiname": "ImPlot_PlotPieChart_U16Ptr", + "ov_cimguiname": "ImPlot_PlotPieChart_U16PtrPlotFormatter", "ret": "void", - "signature": "(const char* const[],const ImU16*,int,double,double,double,const char*,double,ImPlotPieChartFlags)", + "signature": "(const char* const[],const ImU16*,int,double,double,double,ImPlotFormatter,void*,double,ImPlotPieChartFlags)", "stname": "" }, { - "args": "(const char* const label_ids[],const ImS32* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags)", + "args": "(const char* const label_ids[],const ImS32* values,int count,double x,double y,double radius,ImPlotFormatter fmt,void* fmt_data,double angle0,ImPlotPieChartFlags flags)", "argsT": [ { "name": "label_ids", @@ -17650,8 +17674,12 @@ "type": "double" }, { - "name": "label_fmt", - "type": "const char*" + "name": "fmt", + "type": "ImPlotFormatter" + }, + { + "name": "fmt_data", + "type": "void*" }, { "name": "angle0", @@ -17662,24 +17690,24 @@ "type": "ImPlotPieChartFlags" } ], - "argsoriginal": "(const char* const label_ids[],const ImS32* values,int count,double x,double y,double radius,const char* label_fmt=\"%.1f\",double angle0=90,ImPlotPieChartFlags flags=0)", - "call_args": "(label_ids,values,count,x,y,radius,label_fmt,angle0,flags)", + "argsoriginal": "(const char* const label_ids[],const ImS32* values,int count,double x,double y,double radius,ImPlotFormatter fmt,void* fmt_data=nullptr,double angle0=90,ImPlotPieChartFlags flags=0)", + "call_args": "(label_ids,values,count,x,y,radius,fmt,fmt_data,angle0,flags)", "cimguiname": "ImPlot_PlotPieChart", "defaults": { "angle0": "90", "flags": "0", - "label_fmt": "\"%.1f\"" + "fmt_data": "nullptr" }, "funcname": "PlotPieChart", - "location": "implot:895", + "location": "implot:896", "namespace": "ImPlot", - "ov_cimguiname": "ImPlot_PlotPieChart_S32Ptr", + "ov_cimguiname": "ImPlot_PlotPieChart_S32PtrPlotFormatter", "ret": "void", - "signature": "(const char* const[],const ImS32*,int,double,double,double,const char*,double,ImPlotPieChartFlags)", + "signature": "(const char* const[],const ImS32*,int,double,double,double,ImPlotFormatter,void*,double,ImPlotPieChartFlags)", "stname": "" }, { - "args": "(const char* const label_ids[],const ImU32* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags)", + "args": "(const char* const label_ids[],const ImU32* values,int count,double x,double y,double radius,ImPlotFormatter fmt,void* fmt_data,double angle0,ImPlotPieChartFlags flags)", "argsT": [ { "name": "label_ids", @@ -17706,11 +17734,583 @@ "type": "double" }, { - "name": "label_fmt", - "type": "const char*" + "name": "fmt", + "type": "ImPlotFormatter" }, { - "name": "angle0", + "name": "fmt_data", + "type": "void*" + }, + { + "name": "angle0", + "type": "double" + }, + { + "name": "flags", + "type": "ImPlotPieChartFlags" + } + ], + "argsoriginal": "(const char* const label_ids[],const ImU32* values,int count,double x,double y,double radius,ImPlotFormatter fmt,void* fmt_data=nullptr,double angle0=90,ImPlotPieChartFlags flags=0)", + "call_args": "(label_ids,values,count,x,y,radius,fmt,fmt_data,angle0,flags)", + "cimguiname": "ImPlot_PlotPieChart", + "defaults": { + "angle0": "90", + "flags": "0", + "fmt_data": "nullptr" + }, + "funcname": "PlotPieChart", + "location": "implot:896", + "namespace": "ImPlot", + "ov_cimguiname": "ImPlot_PlotPieChart_U32PtrPlotFormatter", + "ret": "void", + "signature": "(const char* const[],const ImU32*,int,double,double,double,ImPlotFormatter,void*,double,ImPlotPieChartFlags)", + "stname": "" + }, + { + "args": "(const char* const label_ids[],const ImS64* values,int count,double x,double y,double radius,ImPlotFormatter fmt,void* fmt_data,double angle0,ImPlotPieChartFlags flags)", + "argsT": [ + { + "name": "label_ids", + "type": "const char* const[]" + }, + { + "name": "values", + "type": "const ImS64*" + }, + { + "name": "count", + "type": "int" + }, + { + "name": "x", + "type": "double" + }, + { + "name": "y", + "type": "double" + }, + { + "name": "radius", + "type": "double" + }, + { + "name": "fmt", + "type": "ImPlotFormatter" + }, + { + "name": "fmt_data", + "type": "void*" + }, + { + "name": "angle0", + "type": "double" + }, + { + "name": "flags", + "type": "ImPlotPieChartFlags" + } + ], + "argsoriginal": "(const char* const label_ids[],const ImS64* values,int count,double x,double y,double radius,ImPlotFormatter fmt,void* fmt_data=nullptr,double angle0=90,ImPlotPieChartFlags flags=0)", + "call_args": "(label_ids,values,count,x,y,radius,fmt,fmt_data,angle0,flags)", + "cimguiname": "ImPlot_PlotPieChart", + "defaults": { + "angle0": "90", + "flags": "0", + "fmt_data": "nullptr" + }, + "funcname": "PlotPieChart", + "location": "implot:896", + "namespace": "ImPlot", + "ov_cimguiname": "ImPlot_PlotPieChart_S64PtrPlotFormatter", + "ret": "void", + "signature": "(const char* const[],const ImS64*,int,double,double,double,ImPlotFormatter,void*,double,ImPlotPieChartFlags)", + "stname": "" + }, + { + "args": "(const char* const label_ids[],const ImU64* values,int count,double x,double y,double radius,ImPlotFormatter fmt,void* fmt_data,double angle0,ImPlotPieChartFlags flags)", + "argsT": [ + { + "name": "label_ids", + "type": "const char* const[]" + }, + { + "name": "values", + "type": "const ImU64*" + }, + { + "name": "count", + "type": "int" + }, + { + "name": "x", + "type": "double" + }, + { + "name": "y", + "type": "double" + }, + { + "name": "radius", + "type": "double" + }, + { + "name": "fmt", + "type": "ImPlotFormatter" + }, + { + "name": "fmt_data", + "type": "void*" + }, + { + "name": "angle0", + "type": "double" + }, + { + "name": "flags", + "type": "ImPlotPieChartFlags" + } + ], + "argsoriginal": "(const char* const label_ids[],const ImU64* values,int count,double x,double y,double radius,ImPlotFormatter fmt,void* fmt_data=nullptr,double angle0=90,ImPlotPieChartFlags flags=0)", + "call_args": "(label_ids,values,count,x,y,radius,fmt,fmt_data,angle0,flags)", + "cimguiname": "ImPlot_PlotPieChart", + "defaults": { + "angle0": "90", + "flags": "0", + "fmt_data": "nullptr" + }, + "funcname": "PlotPieChart", + "location": "implot:896", + "namespace": "ImPlot", + "ov_cimguiname": "ImPlot_PlotPieChart_U64PtrPlotFormatter", + "ret": "void", + "signature": "(const char* const[],const ImU64*,int,double,double,double,ImPlotFormatter,void*,double,ImPlotPieChartFlags)", + "stname": "" + }, + { + "args": "(const char* const label_ids[],const float* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags)", + "argsT": [ + { + "name": "label_ids", + "type": "const char* const[]" + }, + { + "name": "values", + "type": "const float*" + }, + { + "name": "count", + "type": "int" + }, + { + "name": "x", + "type": "double" + }, + { + "name": "y", + "type": "double" + }, + { + "name": "radius", + "type": "double" + }, + { + "name": "label_fmt", + "type": "const char*" + }, + { + "name": "angle0", + "type": "double" + }, + { + "name": "flags", + "type": "ImPlotPieChartFlags" + } + ], + "argsoriginal": "(const char* const label_ids[],const float* values,int count,double x,double y,double radius,const char* label_fmt=\"%.1f\",double angle0=90,ImPlotPieChartFlags flags=0)", + "call_args": "(label_ids,values,count,x,y,radius,label_fmt,angle0,flags)", + "cimguiname": "ImPlot_PlotPieChart", + "defaults": { + "angle0": "90", + "flags": "0", + "label_fmt": "\"%.1f\"" + }, + "funcname": "PlotPieChart", + "location": "implot:897", + "namespace": "ImPlot", + "ov_cimguiname": "ImPlot_PlotPieChart_FloatPtrStr", + "ret": "void", + "signature": "(const char* const[],const float*,int,double,double,double,const char*,double,ImPlotPieChartFlags)", + "stname": "" + }, + { + "args": "(const char* const label_ids[],const double* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags)", + "argsT": [ + { + "name": "label_ids", + "type": "const char* const[]" + }, + { + "name": "values", + "type": "const double*" + }, + { + "name": "count", + "type": "int" + }, + { + "name": "x", + "type": "double" + }, + { + "name": "y", + "type": "double" + }, + { + "name": "radius", + "type": "double" + }, + { + "name": "label_fmt", + "type": "const char*" + }, + { + "name": "angle0", + "type": "double" + }, + { + "name": "flags", + "type": "ImPlotPieChartFlags" + } + ], + "argsoriginal": "(const char* const label_ids[],const double* values,int count,double x,double y,double radius,const char* label_fmt=\"%.1f\",double angle0=90,ImPlotPieChartFlags flags=0)", + "call_args": "(label_ids,values,count,x,y,radius,label_fmt,angle0,flags)", + "cimguiname": "ImPlot_PlotPieChart", + "defaults": { + "angle0": "90", + "flags": "0", + "label_fmt": "\"%.1f\"" + }, + "funcname": "PlotPieChart", + "location": "implot:897", + "namespace": "ImPlot", + "ov_cimguiname": "ImPlot_PlotPieChart_doublePtrStr", + "ret": "void", + "signature": "(const char* const[],const double*,int,double,double,double,const char*,double,ImPlotPieChartFlags)", + "stname": "" + }, + { + "args": "(const char* const label_ids[],const ImS8* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags)", + "argsT": [ + { + "name": "label_ids", + "type": "const char* const[]" + }, + { + "name": "values", + "type": "const ImS8*" + }, + { + "name": "count", + "type": "int" + }, + { + "name": "x", + "type": "double" + }, + { + "name": "y", + "type": "double" + }, + { + "name": "radius", + "type": "double" + }, + { + "name": "label_fmt", + "type": "const char*" + }, + { + "name": "angle0", + "type": "double" + }, + { + "name": "flags", + "type": "ImPlotPieChartFlags" + } + ], + "argsoriginal": "(const char* const label_ids[],const ImS8* values,int count,double x,double y,double radius,const char* label_fmt=\"%.1f\",double angle0=90,ImPlotPieChartFlags flags=0)", + "call_args": "(label_ids,values,count,x,y,radius,label_fmt,angle0,flags)", + "cimguiname": "ImPlot_PlotPieChart", + "defaults": { + "angle0": "90", + "flags": "0", + "label_fmt": "\"%.1f\"" + }, + "funcname": "PlotPieChart", + "location": "implot:897", + "namespace": "ImPlot", + "ov_cimguiname": "ImPlot_PlotPieChart_S8PtrStr", + "ret": "void", + "signature": "(const char* const[],const ImS8*,int,double,double,double,const char*,double,ImPlotPieChartFlags)", + "stname": "" + }, + { + "args": "(const char* const label_ids[],const ImU8* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags)", + "argsT": [ + { + "name": "label_ids", + "type": "const char* const[]" + }, + { + "name": "values", + "type": "const ImU8*" + }, + { + "name": "count", + "type": "int" + }, + { + "name": "x", + "type": "double" + }, + { + "name": "y", + "type": "double" + }, + { + "name": "radius", + "type": "double" + }, + { + "name": "label_fmt", + "type": "const char*" + }, + { + "name": "angle0", + "type": "double" + }, + { + "name": "flags", + "type": "ImPlotPieChartFlags" + } + ], + "argsoriginal": "(const char* const label_ids[],const ImU8* values,int count,double x,double y,double radius,const char* label_fmt=\"%.1f\",double angle0=90,ImPlotPieChartFlags flags=0)", + "call_args": "(label_ids,values,count,x,y,radius,label_fmt,angle0,flags)", + "cimguiname": "ImPlot_PlotPieChart", + "defaults": { + "angle0": "90", + "flags": "0", + "label_fmt": "\"%.1f\"" + }, + "funcname": "PlotPieChart", + "location": "implot:897", + "namespace": "ImPlot", + "ov_cimguiname": "ImPlot_PlotPieChart_U8PtrStr", + "ret": "void", + "signature": "(const char* const[],const ImU8*,int,double,double,double,const char*,double,ImPlotPieChartFlags)", + "stname": "" + }, + { + "args": "(const char* const label_ids[],const ImS16* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags)", + "argsT": [ + { + "name": "label_ids", + "type": "const char* const[]" + }, + { + "name": "values", + "type": "const ImS16*" + }, + { + "name": "count", + "type": "int" + }, + { + "name": "x", + "type": "double" + }, + { + "name": "y", + "type": "double" + }, + { + "name": "radius", + "type": "double" + }, + { + "name": "label_fmt", + "type": "const char*" + }, + { + "name": "angle0", + "type": "double" + }, + { + "name": "flags", + "type": "ImPlotPieChartFlags" + } + ], + "argsoriginal": "(const char* const label_ids[],const ImS16* values,int count,double x,double y,double radius,const char* label_fmt=\"%.1f\",double angle0=90,ImPlotPieChartFlags flags=0)", + "call_args": "(label_ids,values,count,x,y,radius,label_fmt,angle0,flags)", + "cimguiname": "ImPlot_PlotPieChart", + "defaults": { + "angle0": "90", + "flags": "0", + "label_fmt": "\"%.1f\"" + }, + "funcname": "PlotPieChart", + "location": "implot:897", + "namespace": "ImPlot", + "ov_cimguiname": "ImPlot_PlotPieChart_S16PtrStr", + "ret": "void", + "signature": "(const char* const[],const ImS16*,int,double,double,double,const char*,double,ImPlotPieChartFlags)", + "stname": "" + }, + { + "args": "(const char* const label_ids[],const ImU16* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags)", + "argsT": [ + { + "name": "label_ids", + "type": "const char* const[]" + }, + { + "name": "values", + "type": "const ImU16*" + }, + { + "name": "count", + "type": "int" + }, + { + "name": "x", + "type": "double" + }, + { + "name": "y", + "type": "double" + }, + { + "name": "radius", + "type": "double" + }, + { + "name": "label_fmt", + "type": "const char*" + }, + { + "name": "angle0", + "type": "double" + }, + { + "name": "flags", + "type": "ImPlotPieChartFlags" + } + ], + "argsoriginal": "(const char* const label_ids[],const ImU16* values,int count,double x,double y,double radius,const char* label_fmt=\"%.1f\",double angle0=90,ImPlotPieChartFlags flags=0)", + "call_args": "(label_ids,values,count,x,y,radius,label_fmt,angle0,flags)", + "cimguiname": "ImPlot_PlotPieChart", + "defaults": { + "angle0": "90", + "flags": "0", + "label_fmt": "\"%.1f\"" + }, + "funcname": "PlotPieChart", + "location": "implot:897", + "namespace": "ImPlot", + "ov_cimguiname": "ImPlot_PlotPieChart_U16PtrStr", + "ret": "void", + "signature": "(const char* const[],const ImU16*,int,double,double,double,const char*,double,ImPlotPieChartFlags)", + "stname": "" + }, + { + "args": "(const char* const label_ids[],const ImS32* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags)", + "argsT": [ + { + "name": "label_ids", + "type": "const char* const[]" + }, + { + "name": "values", + "type": "const ImS32*" + }, + { + "name": "count", + "type": "int" + }, + { + "name": "x", + "type": "double" + }, + { + "name": "y", + "type": "double" + }, + { + "name": "radius", + "type": "double" + }, + { + "name": "label_fmt", + "type": "const char*" + }, + { + "name": "angle0", + "type": "double" + }, + { + "name": "flags", + "type": "ImPlotPieChartFlags" + } + ], + "argsoriginal": "(const char* const label_ids[],const ImS32* values,int count,double x,double y,double radius,const char* label_fmt=\"%.1f\",double angle0=90,ImPlotPieChartFlags flags=0)", + "call_args": "(label_ids,values,count,x,y,radius,label_fmt,angle0,flags)", + "cimguiname": "ImPlot_PlotPieChart", + "defaults": { + "angle0": "90", + "flags": "0", + "label_fmt": "\"%.1f\"" + }, + "funcname": "PlotPieChart", + "location": "implot:897", + "namespace": "ImPlot", + "ov_cimguiname": "ImPlot_PlotPieChart_S32PtrStr", + "ret": "void", + "signature": "(const char* const[],const ImS32*,int,double,double,double,const char*,double,ImPlotPieChartFlags)", + "stname": "" + }, + { + "args": "(const char* const label_ids[],const ImU32* values,int count,double x,double y,double radius,const char* label_fmt,double angle0,ImPlotPieChartFlags flags)", + "argsT": [ + { + "name": "label_ids", + "type": "const char* const[]" + }, + { + "name": "values", + "type": "const ImU32*" + }, + { + "name": "count", + "type": "int" + }, + { + "name": "x", + "type": "double" + }, + { + "name": "y", + "type": "double" + }, + { + "name": "radius", + "type": "double" + }, + { + "name": "label_fmt", + "type": "const char*" + }, + { + "name": "angle0", "type": "double" }, { @@ -17727,9 +18327,9 @@ "label_fmt": "\"%.1f\"" }, "funcname": "PlotPieChart", - "location": "implot:895", + "location": "implot:897", "namespace": "ImPlot", - "ov_cimguiname": "ImPlot_PlotPieChart_U32Ptr", + "ov_cimguiname": "ImPlot_PlotPieChart_U32PtrStr", "ret": "void", "signature": "(const char* const[],const ImU32*,int,double,double,double,const char*,double,ImPlotPieChartFlags)", "stname": "" @@ -17783,9 +18383,9 @@ "label_fmt": "\"%.1f\"" }, "funcname": "PlotPieChart", - "location": "implot:895", + "location": "implot:897", "namespace": "ImPlot", - "ov_cimguiname": "ImPlot_PlotPieChart_S64Ptr", + "ov_cimguiname": "ImPlot_PlotPieChart_S64PtrStr", "ret": "void", "signature": "(const char* const[],const ImS64*,int,double,double,double,const char*,double,ImPlotPieChartFlags)", "stname": "" @@ -17839,9 +18439,9 @@ "label_fmt": "\"%.1f\"" }, "funcname": "PlotPieChart", - "location": "implot:895", + "location": "implot:897", "namespace": "ImPlot", - "ov_cimguiname": "ImPlot_PlotPieChart_U64Ptr", + "ov_cimguiname": "ImPlot_PlotPieChart_U64PtrStr", "ret": "void", "signature": "(const char* const[],const ImU64*,int,double,double,double,const char*,double,ImPlotPieChartFlags)", "stname": "" @@ -17895,7 +18495,7 @@ "xstart": "0" }, "funcname": "PlotScatter", - "location": "implot:860", + "location": "implot:861", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotScatter_FloatPtrInt", "ret": "void", @@ -17949,7 +18549,7 @@ "xstart": "0" }, "funcname": "PlotScatter", - "location": "implot:860", + "location": "implot:861", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotScatter_doublePtrInt", "ret": "void", @@ -18003,7 +18603,7 @@ "xstart": "0" }, "funcname": "PlotScatter", - "location": "implot:860", + "location": "implot:861", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotScatter_S8PtrInt", "ret": "void", @@ -18057,7 +18657,7 @@ "xstart": "0" }, "funcname": "PlotScatter", - "location": "implot:860", + "location": "implot:861", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotScatter_U8PtrInt", "ret": "void", @@ -18111,7 +18711,7 @@ "xstart": "0" }, "funcname": "PlotScatter", - "location": "implot:860", + "location": "implot:861", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotScatter_S16PtrInt", "ret": "void", @@ -18165,7 +18765,7 @@ "xstart": "0" }, "funcname": "PlotScatter", - "location": "implot:860", + "location": "implot:861", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotScatter_U16PtrInt", "ret": "void", @@ -18219,7 +18819,7 @@ "xstart": "0" }, "funcname": "PlotScatter", - "location": "implot:860", + "location": "implot:861", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotScatter_S32PtrInt", "ret": "void", @@ -18273,7 +18873,7 @@ "xstart": "0" }, "funcname": "PlotScatter", - "location": "implot:860", + "location": "implot:861", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotScatter_U32PtrInt", "ret": "void", @@ -18327,7 +18927,7 @@ "xstart": "0" }, "funcname": "PlotScatter", - "location": "implot:860", + "location": "implot:861", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotScatter_S64PtrInt", "ret": "void", @@ -18381,7 +18981,7 @@ "xstart": "0" }, "funcname": "PlotScatter", - "location": "implot:860", + "location": "implot:861", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotScatter_U64PtrInt", "ret": "void", @@ -18429,7 +19029,7 @@ "stride": "sizeof(float)" }, "funcname": "PlotScatter", - "location": "implot:861", + "location": "implot:862", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotScatter_FloatPtrFloatPtr", "ret": "void", @@ -18477,7 +19077,7 @@ "stride": "sizeof(double)" }, "funcname": "PlotScatter", - "location": "implot:861", + "location": "implot:862", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotScatter_doublePtrdoublePtr", "ret": "void", @@ -18525,7 +19125,7 @@ "stride": "sizeof(ImS8)" }, "funcname": "PlotScatter", - "location": "implot:861", + "location": "implot:862", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotScatter_S8PtrS8Ptr", "ret": "void", @@ -18573,7 +19173,7 @@ "stride": "sizeof(ImU8)" }, "funcname": "PlotScatter", - "location": "implot:861", + "location": "implot:862", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotScatter_U8PtrU8Ptr", "ret": "void", @@ -18621,7 +19221,7 @@ "stride": "sizeof(ImS16)" }, "funcname": "PlotScatter", - "location": "implot:861", + "location": "implot:862", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotScatter_S16PtrS16Ptr", "ret": "void", @@ -18669,7 +19269,7 @@ "stride": "sizeof(ImU16)" }, "funcname": "PlotScatter", - "location": "implot:861", + "location": "implot:862", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotScatter_U16PtrU16Ptr", "ret": "void", @@ -18717,7 +19317,7 @@ "stride": "sizeof(ImS32)" }, "funcname": "PlotScatter", - "location": "implot:861", + "location": "implot:862", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotScatter_S32PtrS32Ptr", "ret": "void", @@ -18765,7 +19365,7 @@ "stride": "sizeof(ImU32)" }, "funcname": "PlotScatter", - "location": "implot:861", + "location": "implot:862", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotScatter_U32PtrU32Ptr", "ret": "void", @@ -18813,7 +19413,7 @@ "stride": "sizeof(ImS64)" }, "funcname": "PlotScatter", - "location": "implot:861", + "location": "implot:862", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotScatter_S64PtrS64Ptr", "ret": "void", @@ -18861,7 +19461,7 @@ "stride": "sizeof(ImU64)" }, "funcname": "PlotScatter", - "location": "implot:861", + "location": "implot:862", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotScatter_U64PtrU64Ptr", "ret": "void", @@ -18902,7 +19502,7 @@ "flags": "0" }, "funcname": "PlotScatterG", - "location": "implot:862", + "location": "implot:863", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotScatterG", "ret": "void", @@ -18963,7 +19563,7 @@ "yref": "0" }, "funcname": "PlotShaded", - "location": "implot:870", + "location": "implot:871", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotShaded_FloatPtrInt", "ret": "void", @@ -19022,7 +19622,7 @@ "yref": "0" }, "funcname": "PlotShaded", - "location": "implot:870", + "location": "implot:871", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotShaded_doublePtrInt", "ret": "void", @@ -19081,7 +19681,7 @@ "yref": "0" }, "funcname": "PlotShaded", - "location": "implot:870", + "location": "implot:871", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotShaded_S8PtrInt", "ret": "void", @@ -19140,7 +19740,7 @@ "yref": "0" }, "funcname": "PlotShaded", - "location": "implot:870", + "location": "implot:871", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotShaded_U8PtrInt", "ret": "void", @@ -19199,7 +19799,7 @@ "yref": "0" }, "funcname": "PlotShaded", - "location": "implot:870", + "location": "implot:871", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotShaded_S16PtrInt", "ret": "void", @@ -19258,7 +19858,7 @@ "yref": "0" }, "funcname": "PlotShaded", - "location": "implot:870", + "location": "implot:871", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotShaded_U16PtrInt", "ret": "void", @@ -19317,7 +19917,7 @@ "yref": "0" }, "funcname": "PlotShaded", - "location": "implot:870", + "location": "implot:871", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotShaded_S32PtrInt", "ret": "void", @@ -19376,7 +19976,7 @@ "yref": "0" }, "funcname": "PlotShaded", - "location": "implot:870", + "location": "implot:871", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotShaded_U32PtrInt", "ret": "void", @@ -19435,7 +20035,7 @@ "yref": "0" }, "funcname": "PlotShaded", - "location": "implot:870", + "location": "implot:871", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotShaded_S64PtrInt", "ret": "void", @@ -19494,7 +20094,7 @@ "yref": "0" }, "funcname": "PlotShaded", - "location": "implot:870", + "location": "implot:871", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotShaded_U64PtrInt", "ret": "void", @@ -19547,7 +20147,7 @@ "yref": "0" }, "funcname": "PlotShaded", - "location": "implot:871", + "location": "implot:872", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotShaded_FloatPtrFloatPtrInt", "ret": "void", @@ -19600,7 +20200,7 @@ "yref": "0" }, "funcname": "PlotShaded", - "location": "implot:871", + "location": "implot:872", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotShaded_doublePtrdoublePtrInt", "ret": "void", @@ -19653,7 +20253,7 @@ "yref": "0" }, "funcname": "PlotShaded", - "location": "implot:871", + "location": "implot:872", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotShaded_S8PtrS8PtrInt", "ret": "void", @@ -19706,7 +20306,7 @@ "yref": "0" }, "funcname": "PlotShaded", - "location": "implot:871", + "location": "implot:872", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotShaded_U8PtrU8PtrInt", "ret": "void", @@ -19759,7 +20359,7 @@ "yref": "0" }, "funcname": "PlotShaded", - "location": "implot:871", + "location": "implot:872", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotShaded_S16PtrS16PtrInt", "ret": "void", @@ -19812,7 +20412,7 @@ "yref": "0" }, "funcname": "PlotShaded", - "location": "implot:871", + "location": "implot:872", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotShaded_U16PtrU16PtrInt", "ret": "void", @@ -19865,7 +20465,7 @@ "yref": "0" }, "funcname": "PlotShaded", - "location": "implot:871", + "location": "implot:872", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotShaded_S32PtrS32PtrInt", "ret": "void", @@ -19918,7 +20518,7 @@ "yref": "0" }, "funcname": "PlotShaded", - "location": "implot:871", + "location": "implot:872", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotShaded_U32PtrU32PtrInt", "ret": "void", @@ -19971,7 +20571,7 @@ "yref": "0" }, "funcname": "PlotShaded", - "location": "implot:871", + "location": "implot:872", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotShaded_S64PtrS64PtrInt", "ret": "void", @@ -20024,7 +20624,7 @@ "yref": "0" }, "funcname": "PlotShaded", - "location": "implot:871", + "location": "implot:872", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotShaded_U64PtrU64PtrInt", "ret": "void", @@ -20076,7 +20676,7 @@ "stride": "sizeof(float)" }, "funcname": "PlotShaded", - "location": "implot:872", + "location": "implot:873", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotShaded_FloatPtrFloatPtrFloatPtr", "ret": "void", @@ -20128,7 +20728,7 @@ "stride": "sizeof(double)" }, "funcname": "PlotShaded", - "location": "implot:872", + "location": "implot:873", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotShaded_doublePtrdoublePtrdoublePtr", "ret": "void", @@ -20180,7 +20780,7 @@ "stride": "sizeof(ImS8)" }, "funcname": "PlotShaded", - "location": "implot:872", + "location": "implot:873", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotShaded_S8PtrS8PtrS8Ptr", "ret": "void", @@ -20232,7 +20832,7 @@ "stride": "sizeof(ImU8)" }, "funcname": "PlotShaded", - "location": "implot:872", + "location": "implot:873", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotShaded_U8PtrU8PtrU8Ptr", "ret": "void", @@ -20284,7 +20884,7 @@ "stride": "sizeof(ImS16)" }, "funcname": "PlotShaded", - "location": "implot:872", + "location": "implot:873", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotShaded_S16PtrS16PtrS16Ptr", "ret": "void", @@ -20336,7 +20936,7 @@ "stride": "sizeof(ImU16)" }, "funcname": "PlotShaded", - "location": "implot:872", + "location": "implot:873", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotShaded_U16PtrU16PtrU16Ptr", "ret": "void", @@ -20388,7 +20988,7 @@ "stride": "sizeof(ImS32)" }, "funcname": "PlotShaded", - "location": "implot:872", + "location": "implot:873", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotShaded_S32PtrS32PtrS32Ptr", "ret": "void", @@ -20440,7 +21040,7 @@ "stride": "sizeof(ImU32)" }, "funcname": "PlotShaded", - "location": "implot:872", + "location": "implot:873", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotShaded_U32PtrU32PtrU32Ptr", "ret": "void", @@ -20492,7 +21092,7 @@ "stride": "sizeof(ImS64)" }, "funcname": "PlotShaded", - "location": "implot:872", + "location": "implot:873", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotShaded_S64PtrS64PtrS64Ptr", "ret": "void", @@ -20544,7 +21144,7 @@ "stride": "sizeof(ImU64)" }, "funcname": "PlotShaded", - "location": "implot:872", + "location": "implot:873", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotShaded_U64PtrU64PtrU64Ptr", "ret": "void", @@ -20594,7 +21194,7 @@ "flags": "0" }, "funcname": "PlotShadedG", - "location": "implot:873", + "location": "implot:874", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotShadedG", "ret": "void", @@ -20650,7 +21250,7 @@ "xstart": "0" }, "funcname": "PlotStairs", - "location": "implot:865", + "location": "implot:866", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotStairs_FloatPtrInt", "ret": "void", @@ -20704,7 +21304,7 @@ "xstart": "0" }, "funcname": "PlotStairs", - "location": "implot:865", + "location": "implot:866", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotStairs_doublePtrInt", "ret": "void", @@ -20758,7 +21358,7 @@ "xstart": "0" }, "funcname": "PlotStairs", - "location": "implot:865", + "location": "implot:866", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotStairs_S8PtrInt", "ret": "void", @@ -20812,7 +21412,7 @@ "xstart": "0" }, "funcname": "PlotStairs", - "location": "implot:865", + "location": "implot:866", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotStairs_U8PtrInt", "ret": "void", @@ -20866,7 +21466,7 @@ "xstart": "0" }, "funcname": "PlotStairs", - "location": "implot:865", + "location": "implot:866", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotStairs_S16PtrInt", "ret": "void", @@ -20920,7 +21520,7 @@ "xstart": "0" }, "funcname": "PlotStairs", - "location": "implot:865", + "location": "implot:866", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotStairs_U16PtrInt", "ret": "void", @@ -20974,7 +21574,7 @@ "xstart": "0" }, "funcname": "PlotStairs", - "location": "implot:865", + "location": "implot:866", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotStairs_S32PtrInt", "ret": "void", @@ -21028,7 +21628,7 @@ "xstart": "0" }, "funcname": "PlotStairs", - "location": "implot:865", + "location": "implot:866", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotStairs_U32PtrInt", "ret": "void", @@ -21082,7 +21682,7 @@ "xstart": "0" }, "funcname": "PlotStairs", - "location": "implot:865", + "location": "implot:866", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotStairs_S64PtrInt", "ret": "void", @@ -21136,7 +21736,7 @@ "xstart": "0" }, "funcname": "PlotStairs", - "location": "implot:865", + "location": "implot:866", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotStairs_U64PtrInt", "ret": "void", @@ -21184,7 +21784,7 @@ "stride": "sizeof(float)" }, "funcname": "PlotStairs", - "location": "implot:866", + "location": "implot:867", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotStairs_FloatPtrFloatPtr", "ret": "void", @@ -21232,7 +21832,7 @@ "stride": "sizeof(double)" }, "funcname": "PlotStairs", - "location": "implot:866", + "location": "implot:867", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotStairs_doublePtrdoublePtr", "ret": "void", @@ -21280,7 +21880,7 @@ "stride": "sizeof(ImS8)" }, "funcname": "PlotStairs", - "location": "implot:866", + "location": "implot:867", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotStairs_S8PtrS8Ptr", "ret": "void", @@ -21328,7 +21928,7 @@ "stride": "sizeof(ImU8)" }, "funcname": "PlotStairs", - "location": "implot:866", + "location": "implot:867", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotStairs_U8PtrU8Ptr", "ret": "void", @@ -21376,7 +21976,7 @@ "stride": "sizeof(ImS16)" }, "funcname": "PlotStairs", - "location": "implot:866", + "location": "implot:867", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotStairs_S16PtrS16Ptr", "ret": "void", @@ -21424,7 +22024,7 @@ "stride": "sizeof(ImU16)" }, "funcname": "PlotStairs", - "location": "implot:866", + "location": "implot:867", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotStairs_U16PtrU16Ptr", "ret": "void", @@ -21472,7 +22072,7 @@ "stride": "sizeof(ImS32)" }, "funcname": "PlotStairs", - "location": "implot:866", + "location": "implot:867", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotStairs_S32PtrS32Ptr", "ret": "void", @@ -21520,7 +22120,7 @@ "stride": "sizeof(ImU32)" }, "funcname": "PlotStairs", - "location": "implot:866", + "location": "implot:867", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotStairs_U32PtrU32Ptr", "ret": "void", @@ -21568,7 +22168,7 @@ "stride": "sizeof(ImS64)" }, "funcname": "PlotStairs", - "location": "implot:866", + "location": "implot:867", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotStairs_S64PtrS64Ptr", "ret": "void", @@ -21616,7 +22216,7 @@ "stride": "sizeof(ImU64)" }, "funcname": "PlotStairs", - "location": "implot:866", + "location": "implot:867", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotStairs_U64PtrU64Ptr", "ret": "void", @@ -21657,7 +22257,7 @@ "flags": "0" }, "funcname": "PlotStairsG", - "location": "implot:867", + "location": "implot:868", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotStairsG", "ret": "void", @@ -21718,7 +22318,7 @@ "stride": "sizeof(float)" }, "funcname": "PlotStems", - "location": "implot:888", + "location": "implot:889", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotStems_FloatPtrInt", "ret": "void", @@ -21777,7 +22377,7 @@ "stride": "sizeof(double)" }, "funcname": "PlotStems", - "location": "implot:888", + "location": "implot:889", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotStems_doublePtrInt", "ret": "void", @@ -21836,7 +22436,7 @@ "stride": "sizeof(ImS8)" }, "funcname": "PlotStems", - "location": "implot:888", + "location": "implot:889", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotStems_S8PtrInt", "ret": "void", @@ -21895,7 +22495,7 @@ "stride": "sizeof(ImU8)" }, "funcname": "PlotStems", - "location": "implot:888", + "location": "implot:889", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotStems_U8PtrInt", "ret": "void", @@ -21954,7 +22554,7 @@ "stride": "sizeof(ImS16)" }, "funcname": "PlotStems", - "location": "implot:888", + "location": "implot:889", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotStems_S16PtrInt", "ret": "void", @@ -22013,7 +22613,7 @@ "stride": "sizeof(ImU16)" }, "funcname": "PlotStems", - "location": "implot:888", + "location": "implot:889", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotStems_U16PtrInt", "ret": "void", @@ -22072,7 +22672,7 @@ "stride": "sizeof(ImS32)" }, "funcname": "PlotStems", - "location": "implot:888", + "location": "implot:889", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotStems_S32PtrInt", "ret": "void", @@ -22131,7 +22731,7 @@ "stride": "sizeof(ImU32)" }, "funcname": "PlotStems", - "location": "implot:888", + "location": "implot:889", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotStems_U32PtrInt", "ret": "void", @@ -22190,7 +22790,7 @@ "stride": "sizeof(ImS64)" }, "funcname": "PlotStems", - "location": "implot:888", + "location": "implot:889", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotStems_S64PtrInt", "ret": "void", @@ -22249,7 +22849,7 @@ "stride": "sizeof(ImU64)" }, "funcname": "PlotStems", - "location": "implot:888", + "location": "implot:889", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotStems_U64PtrInt", "ret": "void", @@ -22302,7 +22902,7 @@ "stride": "sizeof(float)" }, "funcname": "PlotStems", - "location": "implot:889", + "location": "implot:890", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotStems_FloatPtrFloatPtr", "ret": "void", @@ -22355,7 +22955,7 @@ "stride": "sizeof(double)" }, "funcname": "PlotStems", - "location": "implot:889", + "location": "implot:890", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotStems_doublePtrdoublePtr", "ret": "void", @@ -22408,7 +23008,7 @@ "stride": "sizeof(ImS8)" }, "funcname": "PlotStems", - "location": "implot:889", + "location": "implot:890", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotStems_S8PtrS8Ptr", "ret": "void", @@ -22461,7 +23061,7 @@ "stride": "sizeof(ImU8)" }, "funcname": "PlotStems", - "location": "implot:889", + "location": "implot:890", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotStems_U8PtrU8Ptr", "ret": "void", @@ -22514,7 +23114,7 @@ "stride": "sizeof(ImS16)" }, "funcname": "PlotStems", - "location": "implot:889", + "location": "implot:890", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotStems_S16PtrS16Ptr", "ret": "void", @@ -22567,7 +23167,7 @@ "stride": "sizeof(ImU16)" }, "funcname": "PlotStems", - "location": "implot:889", + "location": "implot:890", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotStems_U16PtrU16Ptr", "ret": "void", @@ -22620,7 +23220,7 @@ "stride": "sizeof(ImS32)" }, "funcname": "PlotStems", - "location": "implot:889", + "location": "implot:890", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotStems_S32PtrS32Ptr", "ret": "void", @@ -22673,7 +23273,7 @@ "stride": "sizeof(ImU32)" }, "funcname": "PlotStems", - "location": "implot:889", + "location": "implot:890", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotStems_U32PtrU32Ptr", "ret": "void", @@ -22726,7 +23326,7 @@ "stride": "sizeof(ImS64)" }, "funcname": "PlotStems", - "location": "implot:889", + "location": "implot:890", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotStems_S64PtrS64Ptr", "ret": "void", @@ -22779,7 +23379,7 @@ "stride": "sizeof(ImU64)" }, "funcname": "PlotStems", - "location": "implot:889", + "location": "implot:890", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotStems_U64PtrU64Ptr", "ret": "void", @@ -22820,7 +23420,7 @@ "pix_offset": "ImVec2(0,0)" }, "funcname": "PlotText", - "location": "implot:916", + "location": "implot:918", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PlotText", "ret": "void", @@ -22857,7 +23457,7 @@ "y_axis": "-1" }, "funcname": "PlotToPixels", - "location": "implot:968", + "location": "implot:970", "namespace": "ImPlot", "nonUDT": 1, "ov_cimguiname": "ImPlot_PlotToPixels_PlotPoInt", @@ -22897,7 +23497,7 @@ "y_axis": "-1" }, "funcname": "PlotToPixels", - "location": "implot:969", + "location": "implot:971", "namespace": "ImPlot", "nonUDT": 1, "ov_cimguiname": "ImPlot_PlotToPixels_double", @@ -22922,7 +23522,7 @@ "count": "1" }, "funcname": "PopColormap", - "location": "implot:1166", + "location": "implot:1168", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PopColormap", "ret": "void", @@ -22939,7 +23539,7 @@ "cimguiname": "ImPlot_PopPlotClipRect", "defaults": {}, "funcname": "PopPlotClipRect", - "location": "implot:1224", + "location": "implot:1226", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PopPlotClipRect", "ret": "void", @@ -22963,7 +23563,7 @@ "count": "1" }, "funcname": "PopStyleColor", - "location": "implot:1099", + "location": "implot:1101", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PopStyleColor", "ret": "void", @@ -22987,7 +23587,7 @@ "count": "1" }, "funcname": "PopStyleVar", - "location": "implot:1108", + "location": "implot:1110", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PopStyleVar", "ret": "void", @@ -23031,7 +23631,7 @@ "cimguiname": "ImPlot_PushColormap", "defaults": {}, "funcname": "PushColormap", - "location": "implot:1162", + "location": "implot:1164", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PushColormap_PlotColormap", "ret": "void", @@ -23051,7 +23651,7 @@ "cimguiname": "ImPlot_PushColormap", "defaults": {}, "funcname": "PushColormap", - "location": "implot:1164", + "location": "implot:1166", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PushColormap_Str", "ret": "void", @@ -23075,7 +23675,7 @@ "expand": "0" }, "funcname": "PushPlotClipRect", - "location": "implot:1222", + "location": "implot:1224", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PushPlotClipRect", "ret": "void", @@ -23101,7 +23701,7 @@ "cimguiname": "ImPlot_PushStyleColor", "defaults": {}, "funcname": "PushStyleColor", - "location": "implot:1096", + "location": "implot:1098", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PushStyleColor_U32", "ret": "void", @@ -23125,7 +23725,7 @@ "cimguiname": "ImPlot_PushStyleColor", "defaults": {}, "funcname": "PushStyleColor", - "location": "implot:1097", + "location": "implot:1099", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PushStyleColor_Vec4", "ret": "void", @@ -23151,7 +23751,7 @@ "cimguiname": "ImPlot_PushStyleVar", "defaults": {}, "funcname": "PushStyleVar", - "location": "implot:1102", + "location": "implot:1104", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PushStyleVar_Float", "ret": "void", @@ -23175,7 +23775,7 @@ "cimguiname": "ImPlot_PushStyleVar", "defaults": {}, "funcname": "PushStyleVar", - "location": "implot:1104", + "location": "implot:1106", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PushStyleVar_Int", "ret": "void", @@ -23199,7 +23799,7 @@ "cimguiname": "ImPlot_PushStyleVar", "defaults": {}, "funcname": "PushStyleVar", - "location": "implot:1106", + "location": "implot:1108", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_PushStyleVar_Vec2", "ret": "void", @@ -23459,7 +24059,7 @@ "cmap": "-1" }, "funcname": "SampleColormap", - "location": "implot:1180", + "location": "implot:1182", "namespace": "ImPlot", "nonUDT": 1, "ov_cimguiname": "ImPlot_SampleColormap", @@ -23512,7 +24112,7 @@ "cimguiname": "ImPlot_SetAxes", "defaults": {}, "funcname": "SetAxes", - "location": "implot:961", + "location": "implot:963", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_SetAxes", "ret": "void", @@ -23534,7 +24134,7 @@ "cimguiname": "ImPlot_SetAxis", "defaults": {}, "funcname": "SetAxis", - "location": "implot:960", + "location": "implot:962", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_SetAxis", "ret": "void", @@ -23556,7 +24156,7 @@ "cimguiname": "ImPlot_SetCurrentContext", "defaults": {}, "funcname": "SetCurrentContext", - "location": "implot:605", + "location": "implot:606", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_SetCurrentContext", "ret": "void", @@ -23578,7 +24178,7 @@ "cimguiname": "ImPlot_SetImGuiContext", "defaults": {}, "funcname": "SetImGuiContext", - "location": "implot:611", + "location": "implot:612", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_SetImGuiContext", "ret": "void", @@ -23618,7 +24218,7 @@ "cond": "ImPlotCond_Once" }, "funcname": "SetNextAxesLimits", - "location": "implot:798", + "location": "implot:799", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_SetNextAxesLimits", "ret": "void", @@ -23635,7 +24235,7 @@ "cimguiname": "ImPlot_SetNextAxesToFit", "defaults": {}, "funcname": "SetNextAxesToFit", - "location": "implot:800", + "location": "implot:801", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_SetNextAxesToFit", "ret": "void", @@ -23671,7 +24271,7 @@ "cond": "ImPlotCond_Once" }, "funcname": "SetNextAxisLimits", - "location": "implot:791", + "location": "implot:792", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_SetNextAxisLimits", "ret": "void", @@ -23701,7 +24301,7 @@ "cimguiname": "ImPlot_SetNextAxisLinks", "defaults": {}, "funcname": "SetNextAxisLinks", - "location": "implot:793", + "location": "implot:794", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_SetNextAxisLinks", "ret": "void", @@ -23723,7 +24323,7 @@ "cimguiname": "ImPlot_SetNextAxisToFit", "defaults": {}, "funcname": "SetNextAxisToFit", - "location": "implot:795", + "location": "implot:796", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_SetNextAxisToFit", "ret": "void", @@ -23757,7 +24357,7 @@ "weight": "-1" }, "funcname": "SetNextErrorBarStyle", - "location": "implot:1122", + "location": "implot:1124", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_SetNextErrorBarStyle", "ret": "void", @@ -23786,7 +24386,7 @@ "col": "ImVec4(0,0,0,-1)" }, "funcname": "SetNextFillStyle", - "location": "implot:1118", + "location": "implot:1120", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_SetNextFillStyle", "ret": "void", @@ -23815,7 +24415,7 @@ "weight": "-1" }, "funcname": "SetNextLineStyle", - "location": "implot:1116", + "location": "implot:1118", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_SetNextLineStyle", "ret": "void", @@ -23859,7 +24459,7 @@ "weight": "-1" }, "funcname": "SetNextMarkerStyle", - "location": "implot:1120", + "location": "implot:1122", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_SetNextMarkerStyle", "ret": "void", @@ -23896,7 +24496,7 @@ "y_flags": "0" }, "funcname": "SetupAxes", - "location": "implot:754", + "location": "implot:755", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_SetupAxes", "ret": "void", @@ -23936,7 +24536,7 @@ "cond": "ImPlotCond_Once" }, "funcname": "SetupAxesLimits", - "location": "implot:756", + "location": "implot:757", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_SetupAxesLimits", "ret": "void", @@ -23969,7 +24569,7 @@ "label": "nullptr" }, "funcname": "SetupAxis", - "location": "implot:731", + "location": "implot:732", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_SetupAxis", "ret": "void", @@ -23995,7 +24595,7 @@ "cimguiname": "ImPlot_SetupAxisFormat", "defaults": {}, "funcname": "SetupAxisFormat", - "location": "implot:737", + "location": "implot:738", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_SetupAxisFormat_Str", "ret": "void", @@ -24025,7 +24625,7 @@ "data": "nullptr" }, "funcname": "SetupAxisFormat", - "location": "implot:739", + "location": "implot:740", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_SetupAxisFormat_PlotFormatter", "ret": "void", @@ -24061,7 +24661,7 @@ "cond": "ImPlotCond_Once" }, "funcname": "SetupAxisLimits", - "location": "implot:733", + "location": "implot:734", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_SetupAxisLimits", "ret": "void", @@ -24091,7 +24691,7 @@ "cimguiname": "ImPlot_SetupAxisLimitsConstraints", "defaults": {}, "funcname": "SetupAxisLimitsConstraints", - "location": "implot:749", + "location": "implot:750", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_SetupAxisLimitsConstraints", "ret": "void", @@ -24121,7 +24721,7 @@ "cimguiname": "ImPlot_SetupAxisLinks", "defaults": {}, "funcname": "SetupAxisLinks", - "location": "implot:735", + "location": "implot:736", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_SetupAxisLinks", "ret": "void", @@ -24147,7 +24747,7 @@ "cimguiname": "ImPlot_SetupAxisScale", "defaults": {}, "funcname": "SetupAxisScale", - "location": "implot:745", + "location": "implot:746", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_SetupAxisScale_PlotScale", "ret": "void", @@ -24181,7 +24781,7 @@ "data": "nullptr" }, "funcname": "SetupAxisScale", - "location": "implot:747", + "location": "implot:748", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_SetupAxisScale_PlotTransform", "ret": "void", @@ -24222,7 +24822,7 @@ "labels": "nullptr" }, "funcname": "SetupAxisTicks", - "location": "implot:741", + "location": "implot:742", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_SetupAxisTicks_doublePtr", "ret": "void", @@ -24265,7 +24865,7 @@ "labels": "nullptr" }, "funcname": "SetupAxisTicks", - "location": "implot:743", + "location": "implot:744", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_SetupAxisTicks_double", "ret": "void", @@ -24295,7 +24895,7 @@ "cimguiname": "ImPlot_SetupAxisZoomConstraints", "defaults": {}, "funcname": "SetupAxisZoomConstraints", - "location": "implot:751", + "location": "implot:752", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_SetupAxisZoomConstraints", "ret": "void", @@ -24312,7 +24912,7 @@ "cimguiname": "ImPlot_SetupFinish", "defaults": {}, "funcname": "SetupFinish", - "location": "implot:765", + "location": "implot:766", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_SetupFinish", "ret": "void", @@ -24340,7 +24940,7 @@ "flags": "0" }, "funcname": "SetupLegend", - "location": "implot:759", + "location": "implot:760", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_SetupLegend", "ret": "void", @@ -24385,7 +24985,7 @@ "flags": "0" }, "funcname": "SetupMouseText", - "location": "implot:761", + "location": "implot:762", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_SetupMouseText", "ret": "void", @@ -24478,7 +25078,7 @@ "cimguiname": "ImPlot_ShowColormapSelector", "defaults": {}, "funcname": "ShowColormapSelector", - "location": "implot:1229", + "location": "implot:1231", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_ShowColormapSelector", "ret": "bool", @@ -24543,7 +25143,7 @@ "p_open": "nullptr" }, "funcname": "ShowDemoWindow", - "location": "implot:1244", + "location": "implot:1246", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_ShowDemoWindow", "ret": "void", @@ -24565,7 +25165,7 @@ "cimguiname": "ImPlot_ShowInputMapSelector", "defaults": {}, "funcname": "ShowInputMapSelector", - "location": "implot:1231", + "location": "implot:1233", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_ShowInputMapSelector", "ret": "bool", @@ -24664,7 +25264,7 @@ "p_popen": "nullptr" }, "funcname": "ShowMetricsWindow", - "location": "implot:1237", + "location": "implot:1239", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_ShowMetricsWindow", "ret": "void", @@ -24711,7 +25311,7 @@ "ref": "nullptr" }, "funcname": "ShowStyleEditor", - "location": "implot:1233", + "location": "implot:1235", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_ShowStyleEditor", "ret": "void", @@ -24733,7 +25333,7 @@ "cimguiname": "ImPlot_ShowStyleSelector", "defaults": {}, "funcname": "ShowStyleSelector", - "location": "implot:1227", + "location": "implot:1229", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_ShowStyleSelector", "ret": "bool", @@ -24799,7 +25399,7 @@ "cimguiname": "ImPlot_ShowUserGuide", "defaults": {}, "funcname": "ShowUserGuide", - "location": "implot:1235", + "location": "implot:1237", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_ShowUserGuide", "ret": "void", @@ -24823,7 +25423,7 @@ "dst": "nullptr" }, "funcname": "StyleColorsAuto", - "location": "implot:1083", + "location": "implot:1085", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_StyleColorsAuto", "ret": "void", @@ -24847,7 +25447,7 @@ "dst": "nullptr" }, "funcname": "StyleColorsClassic", - "location": "implot:1085", + "location": "implot:1087", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_StyleColorsClassic", "ret": "void", @@ -24871,7 +25471,7 @@ "dst": "nullptr" }, "funcname": "StyleColorsDark", - "location": "implot:1087", + "location": "implot:1089", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_StyleColorsDark", "ret": "void", @@ -24895,7 +25495,7 @@ "dst": "nullptr" }, "funcname": "StyleColorsLight", - "location": "implot:1089", + "location": "implot:1091", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_StyleColorsLight", "ret": "void", @@ -24944,7 +25544,7 @@ "round": "false" }, "funcname": "TagX", - "location": "implot:946", + "location": "implot:948", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_TagX_Bool", "ret": "void", @@ -24977,7 +25577,7 @@ "defaults": {}, "funcname": "TagX", "isvararg": "...)", - "location": "implot:947", + "location": "implot:949", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_TagX_Str", "ret": "void", @@ -25011,7 +25611,7 @@ "cimguiname": "ImPlot_TagXV", "defaults": {}, "funcname": "TagXV", - "location": "implot:948", + "location": "implot:950", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_TagXV", "ret": "void", @@ -25043,7 +25643,7 @@ "round": "false" }, "funcname": "TagY", - "location": "implot:951", + "location": "implot:953", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_TagY_Bool", "ret": "void", @@ -25076,7 +25676,7 @@ "defaults": {}, "funcname": "TagY", "isvararg": "...)", - "location": "implot:952", + "location": "implot:954", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_TagY_Str", "ret": "void", @@ -25110,7 +25710,7 @@ "cimguiname": "ImPlot_TagYV", "defaults": {}, "funcname": "TagYV", - "location": "implot:953", + "location": "implot:955", "namespace": "ImPlot", "ov_cimguiname": "ImPlot_TagYV", "ret": "void", diff --git a/cimgui/cimplot_templates/structs_and_enums.json b/cimgui/cimplot_templates/structs_and_enums.json index f2e79db12..d427aa929 100644 --- a/cimgui/cimplot_templates/structs_and_enums.json +++ b/cimgui/cimplot_templates/structs_and_enums.json @@ -860,6 +860,11 @@ "calc_value": 1024, "name": "ImPlotPieChartFlags_Normalize", "value": "1 << 10" + }, + { + "calc_value": 2048, + "name": "ImPlotPieChartFlags_IgnoreHidden", + "value": "1 << 11" } ], "ImPlotScale_": [ @@ -1259,54 +1264,54 @@ "ImPlotAxisFlags_": "implot:145", "ImPlotBarGroupsFlags_": "implot:263", "ImPlotBarsFlags_": "implot:257", - "ImPlotBin_": "implot:458", - "ImPlotCol_": "implot:339", + "ImPlotBin_": "implot:459", + "ImPlotCol_": "implot:340", "ImPlotColormapData": "implot_internal:319", "ImPlotColormapScaleFlags_": "implot:214", - "ImPlotColormap_": "implot:425", - "ImPlotCond_": "implot:331", + "ImPlotColormap_": "implot:426", + "ImPlotCond_": "implot:332", "ImPlotContext": "implot_internal:1204", "ImPlotDateFmt_": "implot_internal:245", "ImPlotDateTimeSpec": "implot_internal:278", - "ImPlotDigitalFlags_": "implot:310", + "ImPlotDigitalFlags_": "implot:311", "ImPlotDragToolFlags_": "implot:205", - "ImPlotDummyFlags_": "implot:326", + "ImPlotDummyFlags_": "implot:327", "ImPlotErrorBarsFlags_": "implot:270", "ImPlotFlags_": "implot:130", - "ImPlotHeatmapFlags_": "implot:294", - "ImPlotHistogramFlags_": "implot:300", - "ImPlotImageFlags_": "implot:315", + "ImPlotHeatmapFlags_": "implot:295", + "ImPlotHistogramFlags_": "implot:301", + "ImPlotImageFlags_": "implot:316", "ImPlotInfLinesFlags_": "implot:282", - "ImPlotInputMap": "implot:563", + "ImPlotInputMap": "implot:564", "ImPlotItem": "implot_internal:940", "ImPlotItemFlags_": "implot:222", "ImPlotItemGroup": "implot_internal:990", "ImPlotLegend": "implot_internal:963", "ImPlotLegendFlags_": "implot:185", "ImPlotLineFlags_": "implot:229", - "ImPlotLocation_": "implot:445", - "ImPlotMarker_": "implot:409", + "ImPlotLocation_": "implot:446", + "ImPlotMarker_": "implot:410", "ImPlotMouseTextFlags_": "implot:197", "ImPlotNextItemData": "implot_internal:1175", "ImPlotNextPlotData": "implot_internal:1153", "ImPlotPieChartFlags_": "implot:288", "ImPlotPlot": "implot_internal:1013", - "ImPlotPoint": "implot:467", + "ImPlotPoint": "implot:468", "ImPlotPointError": "implot_internal:421", - "ImPlotRange": "implot:482", - "ImPlotRect": "implot:492", - "ImPlotScale_": "implot:401", + "ImPlotRange": "implot:483", + "ImPlotRect": "implot:493", + "ImPlotScale_": "implot:402", "ImPlotScatterFlags_": "implot:239", "ImPlotShadedFlags_": "implot:252", "ImPlotStairsFlags_": "implot:245", "ImPlotStemsFlags_": "implot:276", - "ImPlotStyle": "implot:506", - "ImPlotStyleVar_": "implot:367", + "ImPlotStyle": "implot:507", + "ImPlotStyleVar_": "implot:368", "ImPlotSubplot": "implot_internal:1118", "ImPlotSubplotFlags_": "implot:169", "ImPlotTag": "implot_internal:483", "ImPlotTagCollection": "implot_internal:491", - "ImPlotTextFlags_": "implot:320", + "ImPlotTextFlags_": "implot:321", "ImPlotTick": "implot_internal:532", "ImPlotTicker": "implot_internal:554", "ImPlotTime": "implot_internal:293", diff --git a/cimgui/imgui/LICENSE.txt b/cimgui/imgui/LICENSE.txt index fb715bdc8..3282f5b5b 100644 --- a/cimgui/imgui/LICENSE.txt +++ b/cimgui/imgui/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2014-2023 Omar Cornut +Copyright (c) 2014-2024 Omar Cornut Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/cimgui/imgui/backends/imgui_impl_allegro5.cpp b/cimgui/imgui/backends/imgui_impl_allegro5.cpp index 3d98636ea..3ef024a34 100644 --- a/cimgui/imgui/backends/imgui_impl_allegro5.cpp +++ b/cimgui/imgui/backends/imgui_impl_allegro5.cpp @@ -28,7 +28,7 @@ // 2022-01-17: Inputs: calling new io.AddMousePosEvent(), io.AddMouseButtonEvent(), io.AddMouseWheelEvent() API (1.87+). // 2022-01-17: Inputs: always calling io.AddKeyModsEvent() next and before key event (not in NewFrame) to fix input queue with very low framerates. // 2022-01-10: Inputs: calling new io.AddKeyEvent(), io.AddKeyModsEvent() + io.SetKeyEventNativeData() API (1.87+). Support for full ImGuiKey range. -// 2021-12-08: Renderer: Fixed mishandling of the the ImDrawCmd::IdxOffset field! This is an old bug but it never had an effect until some internal rendering changes in 1.86. +// 2021-12-08: Renderer: Fixed mishandling of the ImDrawCmd::IdxOffset field! This is an old bug but it never had an effect until some internal rendering changes in 1.86. // 2021-08-17: Calling io.AddFocusEvent() on ALLEGRO_EVENT_DISPLAY_SWITCH_OUT/ALLEGRO_EVENT_DISPLAY_SWITCH_IN events. // 2021-06-29: Reorganized backend to pull data from a single structure to facilitate usage with multiple-contexts (all g_XXXX access changed to bd->XXXX). // 2021-05-19: Renderer: Replaced direct access to ImDrawCmd::TextureId with a call to ImDrawCmd::GetTexID(). (will become a requirement) @@ -439,9 +439,9 @@ bool ImGui_ImplAllegro5_Init(ALLEGRO_DISPLAY* display) // We still use a custom declaration to use 'ALLEGRO_PRIM_TEX_COORD' instead of 'ALLEGRO_PRIM_TEX_COORD_PIXEL' else we can't do a reliable conversion. ALLEGRO_VERTEX_ELEMENT elems[] = { - { ALLEGRO_PRIM_POSITION, ALLEGRO_PRIM_FLOAT_2, IM_OFFSETOF(ImDrawVertAllegro, pos) }, - { ALLEGRO_PRIM_TEX_COORD, ALLEGRO_PRIM_FLOAT_2, IM_OFFSETOF(ImDrawVertAllegro, uv) }, - { ALLEGRO_PRIM_COLOR_ATTR, 0, IM_OFFSETOF(ImDrawVertAllegro, col) }, + { ALLEGRO_PRIM_POSITION, ALLEGRO_PRIM_FLOAT_2, offsetof(ImDrawVertAllegro, pos) }, + { ALLEGRO_PRIM_TEX_COORD, ALLEGRO_PRIM_FLOAT_2, offsetof(ImDrawVertAllegro, uv) }, + { ALLEGRO_PRIM_COLOR_ATTR, 0, offsetof(ImDrawVertAllegro, col) }, { 0, 0, 0 } }; bd->VertexDecl = al_create_vertex_decl(elems, sizeof(ImDrawVertAllegro)); diff --git a/cimgui/imgui/backends/imgui_impl_android.cpp b/cimgui/imgui/backends/imgui_impl_android.cpp index b679ac39e..f387c4830 100644 --- a/cimgui/imgui/backends/imgui_impl_android.cpp +++ b/cimgui/imgui/backends/imgui_impl_android.cpp @@ -157,7 +157,7 @@ static ImGuiKey ImGui_ImplAndroid_KeyCodeToImGuiKey(int32_t key_code) } } -int32_t ImGui_ImplAndroid_HandleInputEvent(AInputEvent* input_event) +int32_t ImGui_ImplAndroid_HandleInputEvent(const AInputEvent* input_event) { ImGuiIO& io = ImGui::GetIO(); int32_t event_type = AInputEvent_getType(input_event); @@ -184,7 +184,7 @@ int32_t ImGui_ImplAndroid_HandleInputEvent(AInputEvent* input_event) case AKEY_EVENT_ACTION_UP: { ImGuiKey key = ImGui_ImplAndroid_KeyCodeToImGuiKey(event_key_code); - if (key != ImGuiKey_None && (event_action == AKEY_EVENT_ACTION_DOWN || event_action == AKEY_EVENT_ACTION_UP)) + if (key != ImGuiKey_None) { io.AddKeyEvent(key, event_action == AKEY_EVENT_ACTION_DOWN); io.SetKeyEventNativeData(key, event_key_code, event_scan_code); @@ -222,25 +222,27 @@ int32_t ImGui_ImplAndroid_HandleInputEvent(AInputEvent* input_event) { case AMOTION_EVENT_ACTION_DOWN: case AMOTION_EVENT_ACTION_UP: + { // Physical mouse buttons (and probably other physical devices) also invoke the actions AMOTION_EVENT_ACTION_DOWN/_UP, // but we have to process them separately to identify the actual button pressed. This is done below via // AMOTION_EVENT_ACTION_BUTTON_PRESS/_RELEASE. Here, we only process "FINGER" input (and "UNKNOWN", as a fallback). - if((AMotionEvent_getToolType(input_event, event_pointer_index) == AMOTION_EVENT_TOOL_TYPE_FINGER) - || (AMotionEvent_getToolType(input_event, event_pointer_index) == AMOTION_EVENT_TOOL_TYPE_UNKNOWN)) + int tool_type = AMotionEvent_getToolType(input_event, event_pointer_index); + if (tool_type == AMOTION_EVENT_TOOL_TYPE_FINGER || tool_type == AMOTION_EVENT_TOOL_TYPE_UNKNOWN) { io.AddMousePosEvent(AMotionEvent_getX(input_event, event_pointer_index), AMotionEvent_getY(input_event, event_pointer_index)); io.AddMouseButtonEvent(0, event_action == AMOTION_EVENT_ACTION_DOWN); } break; + } case AMOTION_EVENT_ACTION_BUTTON_PRESS: case AMOTION_EVENT_ACTION_BUTTON_RELEASE: - { - int32_t button_state = AMotionEvent_getButtonState(input_event); - io.AddMouseButtonEvent(0, (button_state & AMOTION_EVENT_BUTTON_PRIMARY) != 0); - io.AddMouseButtonEvent(1, (button_state & AMOTION_EVENT_BUTTON_SECONDARY) != 0); - io.AddMouseButtonEvent(2, (button_state & AMOTION_EVENT_BUTTON_TERTIARY) != 0); - } + { + int32_t button_state = AMotionEvent_getButtonState(input_event); + io.AddMouseButtonEvent(0, (button_state & AMOTION_EVENT_BUTTON_PRIMARY) != 0); + io.AddMouseButtonEvent(1, (button_state & AMOTION_EVENT_BUTTON_SECONDARY) != 0); + io.AddMouseButtonEvent(2, (button_state & AMOTION_EVENT_BUTTON_TERTIARY) != 0); break; + } case AMOTION_EVENT_ACTION_HOVER_MOVE: // Hovering: Tool moves while NOT pressed (such as a physical mouse) case AMOTION_EVENT_ACTION_MOVE: // Touch pointer moves while DOWN io.AddMousePosEvent(AMotionEvent_getX(input_event, event_pointer_index), AMotionEvent_getY(input_event, event_pointer_index)); diff --git a/cimgui/imgui/backends/imgui_impl_android.h b/cimgui/imgui/backends/imgui_impl_android.h index e078b25b2..7cd4ef16f 100644 --- a/cimgui/imgui/backends/imgui_impl_android.h +++ b/cimgui/imgui/backends/imgui_impl_android.h @@ -30,7 +30,7 @@ struct ANativeWindow; struct AInputEvent; IMGUI_IMPL_API bool ImGui_ImplAndroid_Init(ANativeWindow* window); -IMGUI_IMPL_API int32_t ImGui_ImplAndroid_HandleInputEvent(AInputEvent* input_event); +IMGUI_IMPL_API int32_t ImGui_ImplAndroid_HandleInputEvent(const AInputEvent* input_event); IMGUI_IMPL_API void ImGui_ImplAndroid_Shutdown(); IMGUI_IMPL_API void ImGui_ImplAndroid_NewFrame(); diff --git a/cimgui/imgui/backends/imgui_impl_dx10.cpp b/cimgui/imgui/backends/imgui_impl_dx10.cpp index 2d53e182f..d4d0b5a34 100644 --- a/cimgui/imgui/backends/imgui_impl_dx10.cpp +++ b/cimgui/imgui/backends/imgui_impl_dx10.cpp @@ -16,7 +16,7 @@ // CHANGELOG // (minor and older changes stripped away, please see git history for details) -// 2023-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface. +// 2024-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface. // 2022-10-11: Using 'nullptr' instead of 'NULL' as per our switch to C++11. // 2021-06-29: Reorganized backend to pull data from a single structure to facilitate usage with multiple-contexts (all g_XXXX access changed to bd->XXXX). // 2021-05-19: DirectX10: Replaced direct access to ImDrawCmd::TextureId with a call to ImDrawCmd::GetTexID(). (will become a requirement) @@ -420,9 +420,9 @@ bool ImGui_ImplDX10_CreateDeviceObjects() // Create the input layout D3D10_INPUT_ELEMENT_DESC local_layout[] = { - { "POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, (UINT)IM_OFFSETOF(ImDrawVert, pos), D3D10_INPUT_PER_VERTEX_DATA, 0 }, - { "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, (UINT)IM_OFFSETOF(ImDrawVert, uv), D3D10_INPUT_PER_VERTEX_DATA, 0 }, - { "COLOR", 0, DXGI_FORMAT_R8G8B8A8_UNORM, 0, (UINT)IM_OFFSETOF(ImDrawVert, col), D3D10_INPUT_PER_VERTEX_DATA, 0 }, + { "POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, (UINT)offsetof(ImDrawVert, pos), D3D10_INPUT_PER_VERTEX_DATA, 0 }, + { "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, (UINT)offsetof(ImDrawVert, uv), D3D10_INPUT_PER_VERTEX_DATA, 0 }, + { "COLOR", 0, DXGI_FORMAT_R8G8B8A8_UNORM, 0, (UINT)offsetof(ImDrawVert, col), D3D10_INPUT_PER_VERTEX_DATA, 0 }, }; if (bd->pd3dDevice->CreateInputLayout(local_layout, 3, vertexShaderBlob->GetBufferPointer(), vertexShaderBlob->GetBufferSize(), &bd->pInputLayout) != S_OK) { diff --git a/cimgui/imgui/backends/imgui_impl_dx11.cpp b/cimgui/imgui/backends/imgui_impl_dx11.cpp index f2b20e4a4..804d20adb 100644 --- a/cimgui/imgui/backends/imgui_impl_dx11.cpp +++ b/cimgui/imgui/backends/imgui_impl_dx11.cpp @@ -16,7 +16,7 @@ // CHANGELOG // (minor and older changes stripped away, please see git history for details) -// 2023-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface. +// 2024-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface. // 2022-10-11: Using 'nullptr' instead of 'NULL' as per our switch to C++11. // 2021-06-29: Reorganized backend to pull data from a single structure to facilitate usage with multiple-contexts (all g_XXXX access changed to bd->XXXX). // 2021-05-19: DirectX11: Replaced direct access to ImDrawCmd::TextureId with a call to ImDrawCmd::GetTexID(). (will become a requirement) @@ -432,9 +432,9 @@ bool ImGui_ImplDX11_CreateDeviceObjects() // Create the input layout D3D11_INPUT_ELEMENT_DESC local_layout[] = { - { "POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, (UINT)IM_OFFSETOF(ImDrawVert, pos), D3D11_INPUT_PER_VERTEX_DATA, 0 }, - { "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, (UINT)IM_OFFSETOF(ImDrawVert, uv), D3D11_INPUT_PER_VERTEX_DATA, 0 }, - { "COLOR", 0, DXGI_FORMAT_R8G8B8A8_UNORM, 0, (UINT)IM_OFFSETOF(ImDrawVert, col), D3D11_INPUT_PER_VERTEX_DATA, 0 }, + { "POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, (UINT)offsetof(ImDrawVert, pos), D3D11_INPUT_PER_VERTEX_DATA, 0 }, + { "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, (UINT)offsetof(ImDrawVert, uv), D3D11_INPUT_PER_VERTEX_DATA, 0 }, + { "COLOR", 0, DXGI_FORMAT_R8G8B8A8_UNORM, 0, (UINT)offsetof(ImDrawVert, col), D3D11_INPUT_PER_VERTEX_DATA, 0 }, }; if (bd->pd3dDevice->CreateInputLayout(local_layout, 3, vertexShaderBlob->GetBufferPointer(), vertexShaderBlob->GetBufferSize(), &bd->pInputLayout) != S_OK) { diff --git a/cimgui/imgui/backends/imgui_impl_dx12.cpp b/cimgui/imgui/backends/imgui_impl_dx12.cpp index 22261a1db..31ee73727 100644 --- a/cimgui/imgui/backends/imgui_impl_dx12.cpp +++ b/cimgui/imgui/backends/imgui_impl_dx12.cpp @@ -25,7 +25,7 @@ // CHANGELOG // (minor and older changes stripped away, please see git history for details) -// 2023-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface. +// 2024-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface. // 2022-10-11: Using 'nullptr' instead of 'NULL' as per our switch to C++11. // 2021-06-29: Reorganized backend to pull data from a single structure to facilitate usage with multiple-contexts (all g_XXXX access changed to bd->XXXX). // 2021-05-19: DirectX12: Replaced direct access to ImDrawCmd::TextureId with a call to ImDrawCmd::GetTexID(). (will become a requirement) @@ -667,9 +667,9 @@ bool ImGui_ImplDX12_CreateDeviceObjects() // Create the input layout static D3D12_INPUT_ELEMENT_DESC local_layout[] = { - { "POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, (UINT)IM_OFFSETOF(ImDrawVert, pos), D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 }, - { "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, (UINT)IM_OFFSETOF(ImDrawVert, uv), D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 }, - { "COLOR", 0, DXGI_FORMAT_R8G8B8A8_UNORM, 0, (UINT)IM_OFFSETOF(ImDrawVert, col), D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 }, + { "POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, (UINT)offsetof(ImDrawVert, pos), D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 }, + { "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, (UINT)offsetof(ImDrawVert, uv), D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 }, + { "COLOR", 0, DXGI_FORMAT_R8G8B8A8_UNORM, 0, (UINT)offsetof(ImDrawVert, col), D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 }, }; psoDesc.InputLayout = { local_layout, 3 }; } @@ -899,7 +899,7 @@ static void ImGui_ImplDX12_CreateWindow(ImGuiViewport* viewport) sd1.SampleDesc.Quality = 0; sd1.SwapEffect = DXGI_SWAP_EFFECT_FLIP_DISCARD; sd1.AlphaMode = DXGI_ALPHA_MODE_UNSPECIFIED; - sd1.Scaling = DXGI_SCALING_STRETCH; + sd1.Scaling = DXGI_SCALING_NONE; sd1.Stereo = FALSE; IDXGIFactory4* dxgi_factory = nullptr; diff --git a/cimgui/imgui/backends/imgui_impl_dx9.cpp b/cimgui/imgui/backends/imgui_impl_dx9.cpp index 7c14c402f..2f03fa6e3 100644 --- a/cimgui/imgui/backends/imgui_impl_dx9.cpp +++ b/cimgui/imgui/backends/imgui_impl_dx9.cpp @@ -16,7 +16,8 @@ // CHANGELOG // (minor and older changes stripped away, please see git history for details) -// 2023-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface. +// 2024-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface. +// 2024-02-12: DirectX9: Using RGBA format when supported by the driver to avoid CPU side conversion. (#6575) // 2022-10-11: Using 'nullptr' instead of 'NULL' as per our switch to C++11. // 2021-06-29: Reorganized backend to pull data from a single structure to facilitate usage with multiple-contexts (all g_XXXX access changed to bd->XXXX). // 2021-06-25: DirectX9: Explicitly disable texture state stages after >= 1. @@ -330,6 +331,24 @@ void ImGui_ImplDX9_Shutdown() IM_DELETE(bd); } +static bool ImGui_ImplDX9_CheckFormatSupport(IDirect3DDevice9* pDevice, D3DFORMAT format) +{ + IDirect3D9* pd3d = nullptr; + if (pDevice->GetDirect3D(&pd3d) != D3D_OK) + return false; + D3DDEVICE_CREATION_PARAMETERS param = {}; + D3DDISPLAYMODE mode = {}; + if (pDevice->GetCreationParameters(¶m) != D3D_OK || pDevice->GetDisplayMode(0, &mode) != D3D_OK) + { + pd3d->Release(); + return false; + } + // Font texture should support linear filter, color blend and write to render-target + bool support = (pd3d->CheckDeviceFormat(param.AdapterOrdinal, param.DeviceType, mode.Format, D3DUSAGE_DYNAMIC | D3DUSAGE_QUERY_FILTER | D3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING, D3DRTYPE_TEXTURE, format)) == D3D_OK; + pd3d->Release(); + return support; +} + static bool ImGui_ImplDX9_CreateFontsTexture() { // Build texture atlas @@ -341,18 +360,21 @@ static bool ImGui_ImplDX9_CreateFontsTexture() // Convert RGBA32 to BGRA32 (because RGBA32 is not well supported by DX9 devices) #ifndef IMGUI_USE_BGRA_PACKED_COLOR - if (io.Fonts->TexPixelsUseColors) + const bool rgba_support = ImGui_ImplDX9_CheckFormatSupport(bd->pd3dDevice, D3DFMT_A8B8G8R8); + if (!rgba_support && io.Fonts->TexPixelsUseColors) { ImU32* dst_start = (ImU32*)ImGui::MemAlloc((size_t)width * height * bytes_per_pixel); for (ImU32* src = (ImU32*)pixels, *dst = dst_start, *dst_end = dst_start + (size_t)width * height; dst < dst_end; src++, dst++) *dst = IMGUI_COL_TO_DX9_ARGB(*src); pixels = (unsigned char*)dst_start; } +#else + const bool rgba_support = false; #endif // Upload texture to graphics system bd->FontTexture = nullptr; - if (bd->pd3dDevice->CreateTexture(width, height, 1, D3DUSAGE_DYNAMIC, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &bd->FontTexture, nullptr) < 0) + if (bd->pd3dDevice->CreateTexture(width, height, 1, D3DUSAGE_DYNAMIC, rgba_support ? D3DFMT_A8B8G8R8 : D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &bd->FontTexture, nullptr) < 0) return false; D3DLOCKED_RECT tex_locked_rect; if (bd->FontTexture->LockRect(0, &tex_locked_rect, nullptr, 0) != D3D_OK) @@ -365,7 +387,7 @@ static bool ImGui_ImplDX9_CreateFontsTexture() io.Fonts->SetTexID((ImTextureID)bd->FontTexture); #ifndef IMGUI_USE_BGRA_PACKED_COLOR - if (io.Fonts->TexPixelsUseColors) + if (!rgba_support && io.Fonts->TexPixelsUseColors) ImGui::MemFree(pixels); #endif @@ -511,7 +533,7 @@ static void ImGui_ImplDX9_SwapBuffers(ImGuiViewport* viewport, void*) ImGui_ImplDX9_ViewportData* vd = (ImGui_ImplDX9_ViewportData*)viewport->RendererUserData; HRESULT hr = vd->SwapChain->Present(nullptr, nullptr, vd->d3dpp.hDeviceWindow, nullptr, 0); // Let main application handle D3DERR_DEVICELOST by resetting the device. - IM_ASSERT(hr == D3D_OK || hr == D3DERR_DEVICELOST); + IM_ASSERT(SUCCEEDED(hr) || hr == D3DERR_DEVICELOST); } static void ImGui_ImplDX9_InitPlatformInterface() diff --git a/cimgui/imgui/backends/imgui_impl_glfw.cpp b/cimgui/imgui/backends/imgui_impl_glfw.cpp index 10be0b304..1df78a548 100644 --- a/cimgui/imgui/backends/imgui_impl_glfw.cpp +++ b/cimgui/imgui/backends/imgui_impl_glfw.cpp @@ -24,7 +24,9 @@ // CHANGELOG // (minor and older changes stripped away, please see git history for details) -// 2023-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface. +// 2024-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface. +// 2023-12-19: Emscripten: Added ImGui_ImplGlfw_InstallEmscriptenCanvasResizeCallback() to register canvas selector and auto-resize GLFW window. +// 2023-10-05: Inputs: Added support for extra ImGuiKey values: F13 to F24 function keys. // 2023-07-18: Inputs: Revert ignoring mouse data on GLFW_CURSOR_DISABLED as it can be used differently. User may set ImGuiConfigFLags_NoMouse if desired. (#5625, #6609) // 2023-06-12: Accept glfwGetTime() not returning a monotonically increasing value. This seems to happens on some Windows setup when peripherals disconnect, and is likely to also happen on browser + Emscripten. (#6491) // 2023-04-04: Inputs: Added support for io.AddMouseSourceEvent() to discriminate ImGuiMouseSource_Mouse/ImGuiMouseSource_TouchScreen/ImGuiMouseSource_Pen on Windows ONLY, using a custom WndProc hook. (#2702) @@ -136,7 +138,7 @@ enum GlfwClientApi { GlfwClientApi_Unknown, GlfwClientApi_OpenGL, - GlfwClientApi_Vulkan + GlfwClientApi_Vulkan, }; struct ImGui_ImplGlfw_Data @@ -151,6 +153,9 @@ struct ImGui_ImplGlfw_Data bool InstalledCallbacks; bool CallbacksChainForAllWindows; bool WantUpdateMonitors; +#ifdef __EMSCRIPTEN__ + const char* CanvasSelector; +#endif // Chain GLFW callbacks: our callbacks will call the user's previously installed callbacks, if any. GLFWwindowfocusfun PrevUserCallbackWindowFocus; @@ -162,7 +167,7 @@ struct ImGui_ImplGlfw_Data GLFWcharfun PrevUserCallbackChar; GLFWmonitorfun PrevUserCallbackMonitor; #ifdef _WIN32 - WNDPROC GlfwWndProc; + WNDPROC PrevWndProc; #endif ImGui_ImplGlfw_Data() { memset((void*)this, 0, sizeof(*this)); } @@ -305,6 +310,18 @@ static ImGuiKey ImGui_ImplGlfw_KeyToImGuiKey(int key) case GLFW_KEY_F10: return ImGuiKey_F10; case GLFW_KEY_F11: return ImGuiKey_F11; case GLFW_KEY_F12: return ImGuiKey_F12; + case GLFW_KEY_F13: return ImGuiKey_F13; + case GLFW_KEY_F14: return ImGuiKey_F14; + case GLFW_KEY_F15: return ImGuiKey_F15; + case GLFW_KEY_F16: return ImGuiKey_F16; + case GLFW_KEY_F17: return ImGuiKey_F17; + case GLFW_KEY_F18: return ImGuiKey_F18; + case GLFW_KEY_F19: return ImGuiKey_F19; + case GLFW_KEY_F20: return ImGuiKey_F20; + case GLFW_KEY_F21: return ImGuiKey_F21; + case GLFW_KEY_F22: return ImGuiKey_F22; + case GLFW_KEY_F23: return ImGuiKey_F23; + case GLFW_KEY_F24: return ImGuiKey_F24; default: return ImGuiKey_None; } } @@ -494,48 +511,7 @@ static EM_BOOL ImGui_ImplEmscripten_WheelCallback(int, const EmscriptenWheelEven #endif #ifdef _WIN32 -// GLFW doesn't allow to distinguish Mouse vs TouchScreen vs Pen. -// Add support for Win32 (based on imgui_impl_win32), because we rely on _TouchScreen info to trickle inputs differently. -static ImGuiMouseSource GetMouseSourceFromMessageExtraInfo() -{ - LPARAM extra_info = ::GetMessageExtraInfo(); - if ((extra_info & 0xFFFFFF80) == 0xFF515700) - return ImGuiMouseSource_Pen; - if ((extra_info & 0xFFFFFF80) == 0xFF515780) - return ImGuiMouseSource_TouchScreen; - return ImGuiMouseSource_Mouse; -} -static LRESULT CALLBACK ImGui_ImplGlfw_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - ImGui_ImplGlfw_Data* bd = ImGui_ImplGlfw_GetBackendData(); - switch (msg) - { - case WM_MOUSEMOVE: case WM_NCMOUSEMOVE: - case WM_LBUTTONDOWN: case WM_LBUTTONDBLCLK: case WM_LBUTTONUP: - case WM_RBUTTONDOWN: case WM_RBUTTONDBLCLK: case WM_RBUTTONUP: - case WM_MBUTTONDOWN: case WM_MBUTTONDBLCLK: case WM_MBUTTONUP: - case WM_XBUTTONDOWN: case WM_XBUTTONDBLCLK: case WM_XBUTTONUP: - ImGui::GetIO().AddMouseSourceEvent(GetMouseSourceFromMessageExtraInfo()); - break; - - // We have submitted https://github.com/glfw/glfw/pull/1568 to allow GLFW to support "transparent inputs". - // In the meanwhile we implement custom per-platform workarounds here (FIXME-VIEWPORT: Implement same work-around for Linux/OSX!) -#if !GLFW_HAS_MOUSE_PASSTHROUGH && GLFW_HAS_WINDOW_HOVERED - case WM_NCHITTEST: - { - // Let mouse pass-through the window. This will allow the backend to call io.AddMouseViewportEvent() properly (which is OPTIONAL). - // The ImGuiViewportFlags_NoInputs flag is set while dragging a viewport, as want to detect the window behind the one we are dragging. - // If you cannot easily access those viewport flags from your windowing/event code: you may manually synchronize its state e.g. in - // your main loop after calling UpdatePlatformWindows(). Iterate all viewports/platform windows and pass the flag to your windowing system. - ImGuiViewport* viewport = (ImGuiViewport*)::GetPropA(hWnd, "IMGUI_VIEWPORT"); - if (viewport && (viewport->Flags & ImGuiViewportFlags_NoInputs)) - return HTTRANSPARENT; - break; - } -#endif - } - return ::CallWindowProc(bd->GlfwWndProc, hWnd, msg, wParam, lParam); -} +static LRESULT CALLBACK ImGui_ImplGlfw_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); #endif void ImGui_ImplGlfw_InstallCallbacks(GLFWwindow* window) @@ -605,7 +581,7 @@ static bool ImGui_ImplGlfw_Init(GLFWwindow* window, bool install_callbacks, Glfw #ifndef __EMSCRIPTEN__ io.BackendFlags |= ImGuiBackendFlags_PlatformHasViewports; // We can create multi-viewports on the Platform side (optional) #endif -#if GLFW_HAS_MOUSE_PASSTHROUGH || (GLFW_HAS_WINDOW_HOVERED && defined(_WIN32)) +#if GLFW_HAS_MOUSE_PASSTHROUGH || GLFW_HAS_WINDOW_HOVERED io.BackendFlags |= ImGuiBackendFlags_HasMouseHoveredViewport; // We can call io.AddMouseViewportEvent() with correct data (optional) #endif @@ -672,9 +648,9 @@ static bool ImGui_ImplGlfw_Init(GLFWwindow* window, bool install_callbacks, Glfw // Windows: register a WndProc hook so we can intercept some messages. #ifdef _WIN32 - bd->GlfwWndProc = (WNDPROC)::GetWindowLongPtr((HWND)main_viewport->PlatformHandleRaw, GWLP_WNDPROC); - IM_ASSERT(bd->GlfwWndProc != nullptr); - ::SetWindowLongPtr((HWND)main_viewport->PlatformHandleRaw, GWLP_WNDPROC, (LONG_PTR)ImGui_ImplGlfw_WndProc); + bd->PrevWndProc = (WNDPROC)::GetWindowLongPtrW((HWND)main_viewport->PlatformHandleRaw, GWLP_WNDPROC); + IM_ASSERT(bd->PrevWndProc != nullptr); + ::SetWindowLongPtrW((HWND)main_viewport->PlatformHandleRaw, GWLP_WNDPROC, (LONG_PTR)ImGui_ImplGlfw_WndProc); #endif bd->ClientApi = client_api; @@ -713,11 +689,11 @@ void ImGui_ImplGlfw_Shutdown() for (ImGuiMouseCursor cursor_n = 0; cursor_n < ImGuiMouseCursor_COUNT; cursor_n++) glfwDestroyCursor(bd->MouseCursors[cursor_n]); - // Windows: register a WndProc hook so we can intercept some messages. + // Windows: restore our WndProc hook #ifdef _WIN32 ImGuiViewport* main_viewport = ImGui::GetMainViewport(); - ::SetWindowLongPtr((HWND)main_viewport->PlatformHandleRaw, GWLP_WNDPROC, (LONG_PTR)bd->GlfwWndProc); - bd->GlfwWndProc = nullptr; + ::SetWindowLongPtrW((HWND)main_viewport->PlatformHandleRaw, GWLP_WNDPROC, (LONG_PTR)bd->PrevWndProc); + bd->PrevWndProc = nullptr; #endif io.BackendPlatformName = nullptr; @@ -732,7 +708,6 @@ static void ImGui_ImplGlfw_UpdateMouseData() ImGuiIO& io = ImGui::GetIO(); ImGuiPlatformIO& platform_io = ImGui::GetPlatformIO(); - ImGuiID mouse_viewport_id = 0; const ImVec2 mouse_pos_prev = io.MousePos; for (int n = 0; n < platform_io.Viewports.Size; n++) @@ -773,7 +748,8 @@ static void ImGui_ImplGlfw_UpdateMouseData() // (Optional) When using multiple viewports: call io.AddMouseViewportEvent() with the viewport the OS mouse cursor is hovering. // If ImGuiBackendFlags_HasMouseHoveredViewport is not set by the backend, Dear imGui will ignore this field and infer the information using its flawed heuristic. - // - [X] GLFW >= 3.3 backend ON WINDOWS ONLY does correctly ignore viewports with the _NoInputs flag. + // - [X] GLFW >= 3.3 backend ON WINDOWS ONLY does correctly ignore viewports with the _NoInputs flag (since we implement hit via our WndProc hook) + // On other platforms we rely on the library fallbacking to its own search when reporting a viewport with _NoInputs flag. // - [!] GLFW <= 3.2 backend CANNOT correctly ignore viewports with the _NoInputs flag, and CANNOT reported Hovered Viewport because of mouse capture. // Some backend are not able to handle that correctly. If a backend report an hovered viewport that has the _NoInputs flag (e.g. when dragging a window // for docking, the viewport has the _NoInputs flag in order to allow us to find the viewport under), then Dear ImGui is forced to ignore the value reported @@ -781,12 +757,12 @@ static void ImGui_ImplGlfw_UpdateMouseData() // - [X] GLFW backend correctly reports this regardless of another viewport behind focused and dragged from (we need this to find a useful drag and drop target). // FIXME: This is currently only correct on Win32. See what we do below with the WM_NCHITTEST, missing an equivalent for other systems. // See https://github.com/glfw/glfw/issues/1236 if you want to help in making this a GLFW feature. -#if GLFW_HAS_MOUSE_PASSTHROUGH || (GLFW_HAS_WINDOW_HOVERED && defined(_WIN32)) - const bool window_no_input = (viewport->Flags & ImGuiViewportFlags_NoInputs) != 0; #if GLFW_HAS_MOUSE_PASSTHROUGH + const bool window_no_input = (viewport->Flags & ImGuiViewportFlags_NoInputs) != 0; glfwSetWindowAttrib(window, GLFW_MOUSE_PASSTHROUGH, window_no_input); #endif - if (glfwGetWindowAttrib(window, GLFW_HOVERED) && !window_no_input) +#if GLFW_HAS_MOUSE_PASSTHROUGH || GLFW_HAS_WINDOW_HOVERED + if (glfwGetWindowAttrib(window, GLFW_HOVERED)) mouse_viewport_id = viewport->ID; #else // We cannot use bd->MouseWindow maintained from CursorEnter/Leave callbacks, because it is locked to the window capturing mouse. @@ -951,6 +927,43 @@ void ImGui_ImplGlfw_NewFrame() ImGui_ImplGlfw_UpdateGamepads(); } +#ifdef __EMSCRIPTEN__ +static EM_BOOL ImGui_ImplGlfw_OnCanvasSizeChange(int event_type, const EmscriptenUiEvent* event, void* user_data) +{ + ImGui_ImplGlfw_Data* bd = (ImGui_ImplGlfw_Data*)user_data; + double canvas_width, canvas_height; + emscripten_get_element_css_size(bd->CanvasSelector, &canvas_width, &canvas_height); + glfwSetWindowSize(bd->Window, (int)canvas_width, (int)canvas_height); + return true; +} + +static EM_BOOL ImGui_ImplEmscripten_FullscreenChangeCallback(int event_type, const EmscriptenFullscreenChangeEvent* event, void* user_data) +{ + ImGui_ImplGlfw_Data* bd = (ImGui_ImplGlfw_Data*)user_data; + double canvas_width, canvas_height; + emscripten_get_element_css_size(bd->CanvasSelector, &canvas_width, &canvas_height); + glfwSetWindowSize(bd->Window, (int)canvas_width, (int)canvas_height); + return true; +} + +// 'canvas_selector' is a CSS selector. The event listener is applied to the first element that matches the query. +// STRING MUST PERSIST FOR THE APPLICATION DURATION. PLEASE USE A STRING LITERAL OR ENSURE POINTER WILL STAY VALID. +void ImGui_ImplGlfw_InstallEmscriptenCanvasResizeCallback(const char* canvas_selector) +{ + IM_ASSERT(canvas_selector != nullptr); + ImGui_ImplGlfw_Data* bd = ImGui_ImplGlfw_GetBackendData(); + IM_ASSERT(bd != nullptr && "Did you call ImGui_ImplGlfw_InitForXXX()?"); + + bd->CanvasSelector = canvas_selector; + emscripten_set_resize_callback(EMSCRIPTEN_EVENT_TARGET_WINDOW, bd, false, ImGui_ImplGlfw_OnCanvasSizeChange); + emscripten_set_fullscreenchange_callback(EMSCRIPTEN_EVENT_TARGET_DOCUMENT, bd, false, ImGui_ImplEmscripten_FullscreenChangeCallback); + + // Change the size of the GLFW window according to the size of the canvas + ImGui_ImplGlfw_OnCanvasSizeChange(EMSCRIPTEN_EVENT_RESIZE, {}, bd); +} +#endif + + //-------------------------------------------------------------------------------------------------------- // MULTI-VIEWPORT / PLATFORM INTERFACE SUPPORT // This is an _advanced_ and _optional_ feature, allowing the backend to create and handle multiple viewports simultaneously. @@ -964,8 +977,11 @@ struct ImGui_ImplGlfw_ViewportData bool WindowOwned; int IgnoreWindowPosEventFrame; int IgnoreWindowSizeEventFrame; +#ifdef _WIN32 + WNDPROC PrevWndProc; +#endif - ImGui_ImplGlfw_ViewportData() { Window = nullptr; WindowOwned = false; IgnoreWindowSizeEventFrame = IgnoreWindowPosEventFrame = -1; } + ImGui_ImplGlfw_ViewportData() { memset(this, 0, sizeof(*this)); IgnoreWindowSizeEventFrame = IgnoreWindowPosEventFrame = -1; } ~ImGui_ImplGlfw_ViewportData() { IM_ASSERT(Window == nullptr); } }; @@ -1100,10 +1116,9 @@ static void ImGui_ImplGlfw_ShowWindow(ImGuiViewport* viewport) // GLFW hack: install hook for WM_NCHITTEST message handler #if !GLFW_HAS_MOUSE_PASSTHROUGH && GLFW_HAS_WINDOW_HOVERED && defined(_WIN32) - ImGui_ImplGlfw_Data* bd = ImGui_ImplGlfw_GetBackendData(); ::SetPropA(hwnd, "IMGUI_VIEWPORT", viewport); - IM_ASSERT(bd->GlfwWndProc == (WNDPROC)::GetWindowLongPtr(hwnd, GWLP_WNDPROC)); - ::SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)ImGui_ImplGlfw_WndProc); + vd->PrevWndProc = (WNDPROC)::GetWindowLongPtrW(hwnd, GWLP_WNDPROC); + ::SetWindowLongPtrW(hwnd, GWLP_WNDPROC, (LONG_PTR)ImGui_ImplGlfw_WndProc); #endif #if !GLFW_HAS_FOCUS_ON_SHOW @@ -1290,6 +1305,59 @@ static void ImGui_ImplGlfw_ShutdownPlatformInterface() //----------------------------------------------------------------------------- +// WndProc hook (declared here because we will need access to ImGui_ImplGlfw_ViewportData) +#ifdef _WIN32 +static ImGuiMouseSource GetMouseSourceFromMessageExtraInfo() +{ + LPARAM extra_info = ::GetMessageExtraInfo(); + if ((extra_info & 0xFFFFFF80) == 0xFF515700) + return ImGuiMouseSource_Pen; + if ((extra_info & 0xFFFFFF80) == 0xFF515780) + return ImGuiMouseSource_TouchScreen; + return ImGuiMouseSource_Mouse; +} +static LRESULT CALLBACK ImGui_ImplGlfw_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + ImGui_ImplGlfw_Data* bd = ImGui_ImplGlfw_GetBackendData(); + WNDPROC prev_wndproc = bd->PrevWndProc; + ImGuiViewport* viewport = (ImGuiViewport*)::GetPropA(hWnd, "IMGUI_VIEWPORT"); + if (viewport != NULL) + if (ImGui_ImplGlfw_ViewportData* vd = (ImGui_ImplGlfw_ViewportData*)viewport->PlatformUserData) + prev_wndproc = vd->PrevWndProc; + + switch (msg) + { + // GLFW doesn't allow to distinguish Mouse vs TouchScreen vs Pen. + // Add support for Win32 (based on imgui_impl_win32), because we rely on _TouchScreen info to trickle inputs differently. + case WM_MOUSEMOVE: case WM_NCMOUSEMOVE: + case WM_LBUTTONDOWN: case WM_LBUTTONDBLCLK: case WM_LBUTTONUP: + case WM_RBUTTONDOWN: case WM_RBUTTONDBLCLK: case WM_RBUTTONUP: + case WM_MBUTTONDOWN: case WM_MBUTTONDBLCLK: case WM_MBUTTONUP: + case WM_XBUTTONDOWN: case WM_XBUTTONDBLCLK: case WM_XBUTTONUP: + ImGui::GetIO().AddMouseSourceEvent(GetMouseSourceFromMessageExtraInfo()); + break; + + // We have submitted https://github.com/glfw/glfw/pull/1568 to allow GLFW to support "transparent inputs". + // In the meanwhile we implement custom per-platform workarounds here (FIXME-VIEWPORT: Implement same work-around for Linux/OSX!) +#if !GLFW_HAS_MOUSE_PASSTHROUGH && GLFW_HAS_WINDOW_HOVERED + case WM_NCHITTEST: + { + // Let mouse pass-through the window. This will allow the backend to call io.AddMouseViewportEvent() properly (which is OPTIONAL). + // The ImGuiViewportFlags_NoInputs flag is set while dragging a viewport, as want to detect the window behind the one we are dragging. + // If you cannot easily access those viewport flags from your windowing/event code: you may manually synchronize its state e.g. in + // your main loop after calling UpdatePlatformWindows(). Iterate all viewports/platform windows and pass the flag to your windowing system. + if (viewport && (viewport->Flags & ImGuiViewportFlags_NoInputs)) + return HTTRANSPARENT; + break; + } +#endif + } + return ::CallWindowProcW(prev_wndproc, hWnd, msg, wParam, lParam); +} +#endif // #ifdef _WIN32 + +//----------------------------------------------------------------------------- + #if defined(__clang__) #pragma clang diagnostic pop #endif diff --git a/cimgui/imgui/backends/imgui_impl_glfw.h b/cimgui/imgui/backends/imgui_impl_glfw.h index d2fcbbb8b..14e6ee6a7 100644 --- a/cimgui/imgui/backends/imgui_impl_glfw.h +++ b/cimgui/imgui/backends/imgui_impl_glfw.h @@ -35,6 +35,11 @@ IMGUI_IMPL_API bool ImGui_ImplGlfw_InitForOther(GLFWwindow* window, bool ins IMGUI_IMPL_API void ImGui_ImplGlfw_Shutdown(); IMGUI_IMPL_API void ImGui_ImplGlfw_NewFrame(); +// Emscripten related initialization phase methods +#ifdef __EMSCRIPTEN__ +IMGUI_IMPL_API void ImGui_ImplGlfw_InstallEmscriptenCanvasResizeCallback(const char* canvas_selector); +#endif + // GLFW callbacks install // - When calling Init with 'install_callbacks=true': ImGui_ImplGlfw_InstallCallbacks() is called. GLFW callbacks will be installed for you. They will chain-call user's previously installed callbacks, if any. // - When calling Init with 'install_callbacks=false': GLFW callbacks won't be installed. You will need to call individual function yourself from your own GLFW callbacks. diff --git a/cimgui/imgui/backends/imgui_impl_metal.mm b/cimgui/imgui/backends/imgui_impl_metal.mm index 55af1b1e3..bae0468d7 100644 --- a/cimgui/imgui/backends/imgui_impl_metal.mm +++ b/cimgui/imgui/backends/imgui_impl_metal.mm @@ -16,7 +16,7 @@ // CHANGELOG // (minor and older changes stripped away, please see git history for details) -// 2023-XX-XX: Metal: Added support for multiple windows via the ImGuiPlatformIO interface. +// 2024-XX-XX: Metal: Added support for multiple windows via the ImGuiPlatformIO interface. // 2022-08-23: Metal: Update deprecated property 'sampleCount'->'rasterSampleCount'. // 2022-07-05: Metal: Add dispatch synchronization. // 2022-06-30: Metal: Use __bridge for ARC based systems. @@ -707,13 +707,13 @@ - (MetalBuffer*)dequeueReusableBufferOfLength:(NSUInteger)length device:(idXXXX). // 2021-05-19: OpenGL: Replaced direct access to ImDrawCmd::TextureId with a call to ImDrawCmd::GetTexID(). (will become a requirement) // 2021-01-03: OpenGL: Backup, setup and restore GL_SHADE_MODEL state, disable GL_STENCIL_TEST and disable GL_NORMAL_ARRAY client state to increase compatibility with legacy OpenGL applications. @@ -203,9 +203,9 @@ void ImGui_ImplOpenGL2_RenderDrawData(ImDrawData* draw_data) const ImDrawList* cmd_list = draw_data->CmdLists[n]; const ImDrawVert* vtx_buffer = cmd_list->VtxBuffer.Data; const ImDrawIdx* idx_buffer = cmd_list->IdxBuffer.Data; - glVertexPointer(2, GL_FLOAT, sizeof(ImDrawVert), (const GLvoid*)((const char*)vtx_buffer + IM_OFFSETOF(ImDrawVert, pos))); - glTexCoordPointer(2, GL_FLOAT, sizeof(ImDrawVert), (const GLvoid*)((const char*)vtx_buffer + IM_OFFSETOF(ImDrawVert, uv))); - glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(ImDrawVert), (const GLvoid*)((const char*)vtx_buffer + IM_OFFSETOF(ImDrawVert, col))); + glVertexPointer(2, GL_FLOAT, sizeof(ImDrawVert), (const GLvoid*)((const char*)vtx_buffer + offsetof(ImDrawVert, pos))); + glTexCoordPointer(2, GL_FLOAT, sizeof(ImDrawVert), (const GLvoid*)((const char*)vtx_buffer + offsetof(ImDrawVert, uv))); + glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(ImDrawVert), (const GLvoid*)((const char*)vtx_buffer + offsetof(ImDrawVert, col))); for (int cmd_i = 0; cmd_i < cmd_list->CmdBuffer.Size; cmd_i++) { diff --git a/cimgui/imgui/backends/imgui_impl_opengl3.cpp b/cimgui/imgui/backends/imgui_impl_opengl3.cpp index 0c2cd3497..0be98b639 100644 --- a/cimgui/imgui/backends/imgui_impl_opengl3.cpp +++ b/cimgui/imgui/backends/imgui_impl_opengl3.cpp @@ -23,7 +23,10 @@ // CHANGELOG // (minor and older changes stripped away, please see git history for details) -// 2023-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface. +// 2024-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface. +// 2024-01-09: OpenGL: Update GL3W based imgui_impl_opengl3_loader.h to load "libGL.so" and variants, fixing regression on distros missing a symlink. +// 2023-11-08: OpenGL: Update GL3W based imgui_impl_opengl3_loader.h to load "libGL.so" instead of "libGL.so.1", accommodating for NetBSD systems having only "libGL.so.3" available. (#6983) +// 2023-10-05: OpenGL: Rename symbols in our internal loader so that LTO compilation with another copy of gl3w is possible. (#6875, #6668, #4445) // 2023-06-20: OpenGL: Fixed erroneous use glGetIntegerv(GL_CONTEXT_PROFILE_MASK) on contexts lower than 3.2. (#6539, #6333) // 2023-05-09: OpenGL: Support for glBindSampler() backup/restore on ES3. (#6375) // 2023-04-18: OpenGL: Restore front and back polygon mode separately when supported by context. (#6333) @@ -175,9 +178,20 @@ #define GL_VERTEX_ARRAY_BINDING GL_VERTEX_ARRAY_BINDING_OES #endif -// Desktop GL 2.0+ has glPolygonMode() which GL ES and WebGL don't have. -#ifdef GL_POLYGON_MODE -#define IMGUI_IMPL_HAS_POLYGON_MODE +// Desktop GL 2.0+ has extension and glPolygonMode() which GL ES and WebGL don't have.. +#if !defined(IMGUI_IMPL_OPENGL_ES2) && !defined(IMGUI_IMPL_OPENGL_ES3) +#define IMGUI_IMPL_OPENGL_HAS_EXTENSIONS // has glGetIntegerv(GL_NUM_EXTENSIONS) +#define IMGUI_IMPL_OPENGL_HAS_POLYGON_MODE // has glPolygonMode() +#endif + +// Desktop GL 2.1+ and GL ES 3.0+ have glBindBuffer() with GL_PIXEL_UNPACK_BUFFER target. +#if !defined(IMGUI_IMPL_OPENGL_ES2) +#define IMGUI_IMPL_OPENGL_MAY_HAVE_BIND_BUFFER_PIXEL_UNPACK +#endif + +// Desktop GL 3.1+ has GL_PRIMITIVE_RESTART state +#if !defined(IMGUI_IMPL_OPENGL_ES2) && !defined(IMGUI_IMPL_OPENGL_ES3) && defined(GL_VERSION_3_1) +#define IMGUI_IMPL_OPENGL_MAY_HAVE_PRIMITIVE_RESTART #endif // Desktop GL 3.2+ has glDrawElementsBaseVertex() which GL ES and WebGL don't have. @@ -190,16 +204,6 @@ #define IMGUI_IMPL_OPENGL_MAY_HAVE_BIND_SAMPLER #endif -// Desktop GL 3.1+ has GL_PRIMITIVE_RESTART state -#if !defined(IMGUI_IMPL_OPENGL_ES2) && !defined(IMGUI_IMPL_OPENGL_ES3) && defined(GL_VERSION_3_1) -#define IMGUI_IMPL_OPENGL_MAY_HAVE_PRIMITIVE_RESTART -#endif - -// Desktop GL use extension detection -#if !defined(IMGUI_IMPL_OPENGL_ES2) && !defined(IMGUI_IMPL_OPENGL_ES3) -#define IMGUI_IMPL_OPENGL_MAY_HAVE_EXTENSIONS -#endif - // [Debugging] //#define IMGUI_IMPL_OPENGL_DEBUG #ifdef IMGUI_IMPL_OPENGL_DEBUG @@ -363,7 +367,7 @@ bool ImGui_ImplOpenGL3_Init(const char* glsl_version) // Detect extensions we support bd->HasClipOrigin = (bd->GlVersion >= 450); -#ifdef IMGUI_IMPL_OPENGL_MAY_HAVE_EXTENSIONS +#ifdef IMGUI_IMPL_OPENGL_HAS_EXTENSIONS GLint num_extensions = 0; glGetIntegerv(GL_NUM_EXTENSIONS, &num_extensions); for (GLint i = 0; i < num_extensions; i++) @@ -419,7 +423,7 @@ static void ImGui_ImplOpenGL3_SetupRenderState(ImDrawData* draw_data, int fb_wid if (bd->GlVersion >= 310) glDisable(GL_PRIMITIVE_RESTART); #endif -#ifdef IMGUI_IMPL_HAS_POLYGON_MODE +#ifdef IMGUI_IMPL_OPENGL_HAS_POLYGON_MODE glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); #endif @@ -471,9 +475,9 @@ static void ImGui_ImplOpenGL3_SetupRenderState(ImDrawData* draw_data, int fb_wid GL_CALL(glEnableVertexAttribArray(bd->AttribLocationVtxPos)); GL_CALL(glEnableVertexAttribArray(bd->AttribLocationVtxUV)); GL_CALL(glEnableVertexAttribArray(bd->AttribLocationVtxColor)); - GL_CALL(glVertexAttribPointer(bd->AttribLocationVtxPos, 2, GL_FLOAT, GL_FALSE, sizeof(ImDrawVert), (GLvoid*)IM_OFFSETOF(ImDrawVert, pos))); - GL_CALL(glVertexAttribPointer(bd->AttribLocationVtxUV, 2, GL_FLOAT, GL_FALSE, sizeof(ImDrawVert), (GLvoid*)IM_OFFSETOF(ImDrawVert, uv))); - GL_CALL(glVertexAttribPointer(bd->AttribLocationVtxColor, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(ImDrawVert), (GLvoid*)IM_OFFSETOF(ImDrawVert, col))); + GL_CALL(glVertexAttribPointer(bd->AttribLocationVtxPos, 2, GL_FLOAT, GL_FALSE, sizeof(ImDrawVert), (GLvoid*)offsetof(ImDrawVert, pos))); + GL_CALL(glVertexAttribPointer(bd->AttribLocationVtxUV, 2, GL_FLOAT, GL_FALSE, sizeof(ImDrawVert), (GLvoid*)offsetof(ImDrawVert, uv))); + GL_CALL(glVertexAttribPointer(bd->AttribLocationVtxColor, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(ImDrawVert), (GLvoid*)offsetof(ImDrawVert, col))); } // OpenGL3 Render function. @@ -508,7 +512,7 @@ void ImGui_ImplOpenGL3_RenderDrawData(ImDrawData* draw_data) #ifdef IMGUI_IMPL_OPENGL_USE_VERTEX_ARRAY GLuint last_vertex_array_object; glGetIntegerv(GL_VERTEX_ARRAY_BINDING, (GLint*)&last_vertex_array_object); #endif -#ifdef IMGUI_IMPL_HAS_POLYGON_MODE +#ifdef IMGUI_IMPL_OPENGL_HAS_POLYGON_MODE GLint last_polygon_mode[2]; glGetIntegerv(GL_POLYGON_MODE, last_polygon_mode); #endif GLint last_viewport[4]; glGetIntegerv(GL_VIEWPORT, last_viewport); @@ -647,7 +651,7 @@ void ImGui_ImplOpenGL3_RenderDrawData(ImDrawData* draw_data) if (bd->GlVersion >= 310) { if (last_enable_primitive_restart) glEnable(GL_PRIMITIVE_RESTART); else glDisable(GL_PRIMITIVE_RESTART); } #endif -#ifdef IMGUI_IMPL_HAS_POLYGON_MODE +#ifdef IMGUI_IMPL_OPENGL_HAS_POLYGON_MODE // Desktop OpenGL 3.0 and OpenGL 3.1 had separate polygon draw modes for front-facing and back-facing faces of polygons if (bd->GlVersion <= 310 || bd->GlProfileIsCompat) { @@ -658,7 +662,7 @@ void ImGui_ImplOpenGL3_RenderDrawData(ImDrawData* draw_data) { glPolygonMode(GL_FRONT_AND_BACK, (GLenum)last_polygon_mode[0]); } -#endif // IMGUI_IMPL_HAS_POLYGON_MODE +#endif // IMGUI_IMPL_OPENGL_HAS_POLYGON_MODE glViewport(last_viewport[0], last_viewport[1], (GLsizei)last_viewport[2], (GLsizei)last_viewport[3]); glScissor(last_scissor_box[0], last_scissor_box[1], (GLsizei)last_scissor_box[2], (GLsizei)last_scissor_box[3]); @@ -755,6 +759,10 @@ bool ImGui_ImplOpenGL3_CreateDeviceObjects() GLint last_texture, last_array_buffer; glGetIntegerv(GL_TEXTURE_BINDING_2D, &last_texture); glGetIntegerv(GL_ARRAY_BUFFER_BINDING, &last_array_buffer); +#ifdef IMGUI_IMPL_OPENGL_MAY_HAVE_BIND_BUFFER_PIXEL_UNPACK + GLint last_pixel_unpack_buffer; + if (bd->GlVersion >= 210) { glGetIntegerv(GL_PIXEL_UNPACK_BUFFER_BINDING, &last_pixel_unpack_buffer); glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0); } +#endif #ifdef IMGUI_IMPL_OPENGL_USE_VERTEX_ARRAY GLint last_vertex_array; glGetIntegerv(GL_VERTEX_ARRAY_BINDING, &last_vertex_array); @@ -928,6 +936,9 @@ bool ImGui_ImplOpenGL3_CreateDeviceObjects() // Restore modified GL state glBindTexture(GL_TEXTURE_2D, last_texture); glBindBuffer(GL_ARRAY_BUFFER, last_array_buffer); +#ifdef IMGUI_IMPL_OPENGL_MAY_HAVE_BIND_BUFFER_PIXEL_UNPACK + if (bd->GlVersion >= 210) { glBindBuffer(GL_PIXEL_UNPACK_BUFFER, last_pixel_unpack_buffer); } +#endif #ifdef IMGUI_IMPL_OPENGL_USE_VERTEX_ARRAY glBindVertexArray(last_vertex_array); #endif diff --git a/cimgui/imgui/backends/imgui_impl_opengl3_loader.h b/cimgui/imgui/backends/imgui_impl_opengl3_loader.h index 7ca72e378..4019f937f 100644 --- a/cimgui/imgui/backends/imgui_impl_opengl3_loader.h +++ b/cimgui/imgui/backends/imgui_impl_opengl3_loader.h @@ -118,7 +118,7 @@ extern "C" { ** included as . ** ** glcorearb.h includes only APIs in the latest OpenGL core profile -** implementation together with APIs in newer ARB extensions which +** implementation together with APIs in newer ARB extensions which ** can be supported by the core profile. It does not, and never will ** include functionality removed from the core profile, such as ** fixed-function vertex and fragment processing. @@ -260,6 +260,8 @@ typedef khronos_intptr_t GLintptr; #define GL_ARRAY_BUFFER_BINDING 0x8894 #define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 #define GL_STREAM_DRAW 0x88E0 +#define GL_PIXEL_UNPACK_BUFFER 0x88EC +#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF typedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer); typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers); typedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers); @@ -467,7 +469,7 @@ GL3W_API int imgl3wIsSupported(int major, int minor); GL3W_API GL3WglProc imgl3wGetProcAddress(const char *proc); /* gl3w internal state */ -union GL3WProcs { +union ImGL3WProcs { GL3WglProc ptr[59]; struct { PFNGLACTIVETEXTUREPROC ActiveTexture; @@ -532,7 +534,7 @@ union GL3WProcs { } gl; }; -GL3W_API extern union GL3WProcs imgl3wProcs; +GL3W_API extern union ImGL3WProcs imgl3wProcs; /* OpenGL functions */ #define glActiveTexture imgl3wProcs.gl.ActiveTexture @@ -608,7 +610,7 @@ extern "C" { #include -#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) +#define GL3W_ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) #if defined(_WIN32) #ifndef WIN32_LEAN_AND_MEAN @@ -666,7 +668,12 @@ static GL3WglProc (*glx_get_proc_address)(const GLubyte *); static int open_libgl(void) { - libgl = dlopen("libGL.so.1", RTLD_LAZY | RTLD_LOCAL); + // While most systems use libGL.so.1, NetBSD seems to use that libGL.so.3. See https://github.com/ocornut/imgui/issues/6983 + libgl = dlopen("libGL.so", RTLD_LAZY | RTLD_LOCAL); + if (!libgl) + libgl = dlopen("libGL.so.1", RTLD_LAZY | RTLD_LOCAL); + if (!libgl) + libgl = dlopen("libGL.so.3", RTLD_LAZY | RTLD_LOCAL); if (!libgl) return GL3W_ERROR_LIBRARY_OPEN; *(void **)(&glx_get_proc_address) = dlsym(libgl, "glXGetProcAddressARB"); @@ -794,12 +801,12 @@ static const char *proc_names[] = { "glViewport", }; -GL3W_API union GL3WProcs imgl3wProcs; +GL3W_API union ImGL3WProcs imgl3wProcs; static void load_procs(GL3WGetProcAddressProc proc) { size_t i; - for (i = 0; i < ARRAY_SIZE(proc_names); i++) + for (i = 0; i < GL3W_ARRAY_SIZE(proc_names); i++) imgl3wProcs.ptr[i] = proc(proc_names[i]); } diff --git a/cimgui/imgui/backends/imgui_impl_osx.h b/cimgui/imgui/backends/imgui_impl_osx.h index 360317fc8..f2c704fd8 100644 --- a/cimgui/imgui/backends/imgui_impl_osx.h +++ b/cimgui/imgui/backends/imgui_impl_osx.h @@ -10,7 +10,8 @@ // [X] Platform: OSX clipboard is supported within core Dear ImGui (no specific code in this backend). // [X] Platform: Gamepad support. Enabled with 'io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad'. // [X] Platform: IME support. -// [X] Platform: Multi-viewport / platform windows. +// [x] Platform: Multi-viewport / platform windows. +// - [ ] Window size not correctly reported when enabling io.ConfigViewportsNoDecoration // You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this. // Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need. diff --git a/cimgui/imgui/backends/imgui_impl_osx.mm b/cimgui/imgui/backends/imgui_impl_osx.mm index fab681b29..8656bfe45 100644 --- a/cimgui/imgui/backends/imgui_impl_osx.mm +++ b/cimgui/imgui/backends/imgui_impl_osx.mm @@ -10,7 +10,8 @@ // [X] Platform: OSX clipboard is supported within core Dear ImGui (no specific code in this backend). // [X] Platform: Gamepad support. Enabled with 'io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad'. // [X] Platform: IME support. -// [X] Platform: Multi-viewport / platform windows. +// [x] Platform: Multi-viewport / platform windows. +// - [ ] Window size not correctly reported when enabling io.ConfigViewportsNoDecoration // You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this. // Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need. @@ -30,7 +31,8 @@ // CHANGELOG // (minor and older changes stripped away, please see git history for details) -// 2023-XX-XX: Added support for multiple windows via the ImGuiPlatformIO interface. +// 2024-XX-XX: Added support for multiple windows via the ImGuiPlatformIO interface. +// 2023-10-05: Inputs: Added support for extra ImGuiKey values: F13 to F20 function keys. Stopped mapping F13 into PrintScreen. // 2023-04-09: Inputs: Added support for io.AddMouseSourceEvent() to discriminate ImGuiMouseSource_Mouse/ImGuiMouseSource_Pen. // 2023-02-01: Fixed scroll wheel scaling for devices emitting events with hasPreciseScrollingDeltas==false (e.g. non-Apple mices). // 2022-11-02: Fixed mouse coordinates before clicking the host window. @@ -139,12 +141,28 @@ - (void)setImePosX:(float)posX imePosY:(float)posY - (void)updateImePosWithView:(NSView *)view { - NSWindow *window = view.window; + NSWindow* window = view.window; if (!window) return; - NSRect contentRect = [window contentRectForFrameRect:window.frame]; - NSRect rect = NSMakeRect(_posX, contentRect.size.height - _posY, 0, 0); - _imeRect = [window convertRectToScreen:rect]; + + ImGuiIO& io = ImGui::GetIO(); + if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) + { + NSRect frame = window.frame; + NSRect contentRect = window.contentLayoutRect; + if (window.styleMask & NSWindowStyleMaskFullSizeContentView) // No title bar windows should be considered. + contentRect = frame; + + NSRect firstScreenFrame = NSScreen.screens[0].frame; + _imeRect = NSMakeRect(_posX, _posY, 0, 0); + _imeRect.origin.y = firstScreenFrame.size.height - _imeRect.size.height - _imeRect.origin.y; // Opposite of ConvertNSRect() + } + else + { + NSRect contentRect = [window contentRectForFrameRect:window.frame]; + NSRect rect = NSMakeRect(_posX, contentRect.size.height - _posY, 0, 0); + _imeRect = [window convertRectToScreen:rect]; + } } - (void)viewDidMoveToWindow @@ -349,36 +367,36 @@ static ImGuiKey ImGui_ImplOSX_KeyCodeToImGuiKey(int key_code) case kVK_RightOption: return ImGuiKey_RightAlt; case kVK_RightCommand: return ImGuiKey_RightSuper; // case kVK_Function: return ImGuiKey_; -// case kVK_F17: return ImGuiKey_; // case kVK_VolumeUp: return ImGuiKey_; // case kVK_VolumeDown: return ImGuiKey_; // case kVK_Mute: return ImGuiKey_; -// case kVK_F18: return ImGuiKey_; -// case kVK_F19: return ImGuiKey_; -// case kVK_F20: return ImGuiKey_; + case kVK_F1: return ImGuiKey_F1; + case kVK_F2: return ImGuiKey_F2; + case kVK_F3: return ImGuiKey_F3; + case kVK_F4: return ImGuiKey_F4; case kVK_F5: return ImGuiKey_F5; case kVK_F6: return ImGuiKey_F6; case kVK_F7: return ImGuiKey_F7; - case kVK_F3: return ImGuiKey_F3; case kVK_F8: return ImGuiKey_F8; case kVK_F9: return ImGuiKey_F9; - case kVK_F11: return ImGuiKey_F11; - case kVK_F13: return ImGuiKey_PrintScreen; -// case kVK_F16: return ImGuiKey_; -// case kVK_F14: return ImGuiKey_; case kVK_F10: return ImGuiKey_F10; - case 0x6E: return ImGuiKey_Menu; + case kVK_F11: return ImGuiKey_F11; case kVK_F12: return ImGuiKey_F12; -// case kVK_F15: return ImGuiKey_; + case kVK_F13: return ImGuiKey_F13; + case kVK_F14: return ImGuiKey_F14; + case kVK_F15: return ImGuiKey_F15; + case kVK_F16: return ImGuiKey_F16; + case kVK_F17: return ImGuiKey_F17; + case kVK_F18: return ImGuiKey_F18; + case kVK_F19: return ImGuiKey_F19; + case kVK_F20: return ImGuiKey_F20; + case 0x6E: return ImGuiKey_Menu; case kVK_Help: return ImGuiKey_Insert; case kVK_Home: return ImGuiKey_Home; case kVK_PageUp: return ImGuiKey_PageUp; case kVK_ForwardDelete: return ImGuiKey_Delete; - case kVK_F4: return ImGuiKey_F4; case kVK_End: return ImGuiKey_End; - case kVK_F2: return ImGuiKey_F2; case kVK_PageDown: return ImGuiKey_PageDown; - case kVK_F1: return ImGuiKey_F1; case kVK_LeftArrow: return ImGuiKey_LeftArrow; case kVK_RightArrow: return ImGuiKey_RightArrow; case kVK_DownArrow: return ImGuiKey_DownArrow; @@ -417,6 +435,7 @@ bool ImGui_ImplOSX_Init(NSView* view) bd->Window = view.window ?: NSApp.orderedWindows.firstObject; ImGuiViewport* main_viewport = ImGui::GetMainViewport(); main_viewport->PlatformHandle = main_viewport->PlatformHandleRaw = (__bridge_retained void*)bd->Window; + ImGui_ImplOSX_UpdateMonitors(); if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) ImGui_ImplOSX_InitPlatformInterface(); @@ -552,7 +571,6 @@ static void ImGui_ImplOSX_UpdateMouseCursor() static void ImGui_ImplOSX_UpdateGamepads() { ImGuiIO& io = ImGui::GetIO(); - memset(io.NavInputs, 0, sizeof(io.NavInputs)); if ((io.ConfigFlags & ImGuiConfigFlags_NavEnableGamepad) == 0) // FIXME: Technically feeding gamepad shouldn't depend on this now that they are regular inputs. return; @@ -861,9 +879,11 @@ - (BOOL)canBecomeKeyWindow @end -static void ConvertNSRect(NSScreen* screen, NSRect* r) +static void ConvertNSRect(NSRect* r) { - r->origin.y = screen.frame.size.height - r->origin.y - r->size.height; + NSRect firstScreenFrame = NSScreen.screens[0].frame; + IM_ASSERT(firstScreenFrame.origin.x == 0 && firstScreenFrame.origin.y == 0); + r->origin.y = firstScreenFrame.size.height - r->origin.y - r->size.height; } static void ImGui_ImplOSX_CreateWindow(ImGuiViewport* viewport) @@ -874,7 +894,7 @@ static void ImGui_ImplOSX_CreateWindow(ImGuiViewport* viewport) NSScreen* screen = bd->Window.screen; NSRect rect = NSMakeRect(viewport->Pos.x, viewport->Pos.y, viewport->Size.x, viewport->Size.y); - ConvertNSRect(screen, &rect); + ConvertNSRect(&rect); NSWindowStyleMask styleMask = 0; if (viewport->Flags & ImGuiViewportFlags_NoDecoration) @@ -944,11 +964,13 @@ static ImVec2 ImGui_ImplOSX_GetWindowPos(ImGuiViewport* viewport) IM_ASSERT(data->Window != 0); NSWindow* window = data->Window; - NSScreen* screen = window.screen; - NSSize size = screen.frame.size; NSRect frame = window.frame; - NSRect rect = window.contentLayoutRect; - return ImVec2(frame.origin.x, size.height - frame.origin.y - rect.size.height); + NSRect contentRect = window.contentLayoutRect; + if (window.styleMask & NSWindowStyleMaskFullSizeContentView) // No title bar windows should be considered. + contentRect = frame; + + NSRect firstScreenFrame = NSScreen.screens[0].frame; + return ImVec2(frame.origin.x, firstScreenFrame.size.height - frame.origin.y - contentRect.size.height); } static void ImGui_ImplOSX_SetWindowPos(ImGuiViewport* viewport, ImVec2 pos) @@ -960,7 +982,7 @@ static void ImGui_ImplOSX_SetWindowPos(ImGuiViewport* viewport, ImVec2 pos) NSSize size = window.frame.size; NSRect r = NSMakeRect(pos.x, pos.y, size.width, size.height); - ConvertNSRect(window.screen, &r); + ConvertNSRect(&r); [window setFrameOrigin:r.origin]; } @@ -1041,10 +1063,15 @@ static void ImGui_ImplOSX_UpdateMonitors() ImGuiPlatformIO& platform_io = ImGui::GetPlatformIO(); platform_io.Monitors.resize(0); + NSRect firstScreenFrame = NSScreen.screens[0].frame; + IM_ASSERT(firstScreenFrame.origin.x == 0 && firstScreenFrame.origin.y == 0); + for (NSScreen* screen in NSScreen.screens) { NSRect frame = screen.frame; NSRect visibleFrame = screen.visibleFrame; + ConvertNSRect(&frame); + ConvertNSRect(&visibleFrame); ImGuiPlatformMonitor imgui_monitor; imgui_monitor.MainPos = ImVec2(frame.origin.x, frame.origin.y); @@ -1061,7 +1088,6 @@ static void ImGui_ImplOSX_UpdateMonitors() static void ImGui_ImplOSX_InitPlatformInterface() { ImGui_ImplOSX_Data* bd = ImGui_ImplOSX_GetBackendData(); - ImGui_ImplOSX_UpdateMonitors(); // Register platform interface (will be coupled with a renderer interface) ImGuiPlatformIO& platform_io = ImGui::GetPlatformIO(); diff --git a/cimgui/imgui/backends/imgui_impl_sdl2.cpp b/cimgui/imgui/backends/imgui_impl_sdl2.cpp index 048311eaf..f101cf3e5 100644 --- a/cimgui/imgui/backends/imgui_impl_sdl2.cpp +++ b/cimgui/imgui/backends/imgui_impl_sdl2.cpp @@ -24,7 +24,9 @@ // CHANGELOG // (minor and older changes stripped away, please see git history for details) -// 2023-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface. +// 2024-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface. +// 2024-02-14: Inputs: Handle gamepad disconnection. Added ImGui_ImplSDL2_SetGamepadMode(). +// 2023-10-05: Inputs: Added support for extra ImGuiKey values: F13 to F24 function keys, app back/forward keys. // 2023-04-06: Inputs: Avoid calling SDL_StartTextInput()/SDL_StopTextInput() as they don't only pertain to IME. It's unclear exactly what their relation is to IME. (#6306) // 2023-04-04: Inputs: Added support for io.AddMouseSourceEvent() to discriminate ImGuiMouseSource_Mouse/ImGuiMouseSource_TouchScreen. (#2702) // 2023-02-23: Accept SDL_GetPerformanceCounter() not returning a monotonically increasing value. (#6189, #6114, #3644) @@ -115,19 +117,26 @@ static const Uint32 SDL_WINDOW_VULKAN = 0x10000000; // SDL Data struct ImGui_ImplSDL2_Data { - SDL_Window* Window; - SDL_Renderer* Renderer; - Uint64 Time; - Uint32 MouseWindowID; - int MouseButtonsDown; - SDL_Cursor* MouseCursors[ImGuiMouseCursor_COUNT]; - SDL_Cursor* LastMouseCursor; - int PendingMouseLeaveFrame; - char* ClipboardTextData; - bool MouseCanUseGlobalState; - bool MouseCanReportHoveredViewport; // This is hard to use/unreliable on SDL so we'll set ImGuiBackendFlags_HasMouseHoveredViewport dynamically based on state. - bool UseVulkan; - bool WantUpdateMonitors; + SDL_Window* Window; + SDL_Renderer* Renderer; + Uint64 Time; + char* ClipboardTextData; + bool UseVulkan; + bool WantUpdateMonitors; + + // Mouse handling + Uint32 MouseWindowID; + int MouseButtonsDown; + SDL_Cursor* MouseCursors[ImGuiMouseCursor_COUNT]; + SDL_Cursor* MouseLastCursor; + int MouseLastLeaveFrame; + bool MouseCanUseGlobalState; + bool MouseCanReportHoveredViewport; // This is hard to use/unreliable on SDL so we'll set ImGuiBackendFlags_HasMouseHoveredViewport dynamically based on state. + + // Gamepad handling + ImVector Gamepads; + ImGui_ImplSDL2_GamepadMode GamepadMode; + bool WantUpdateGamepadsList; ImGui_ImplSDL2_Data() { memset((void*)this, 0, sizeof(*this)); } }; @@ -284,6 +293,20 @@ static ImGuiKey ImGui_ImplSDL2_KeycodeToImGuiKey(int keycode) case SDLK_F10: return ImGuiKey_F10; case SDLK_F11: return ImGuiKey_F11; case SDLK_F12: return ImGuiKey_F12; + case SDLK_F13: return ImGuiKey_F13; + case SDLK_F14: return ImGuiKey_F14; + case SDLK_F15: return ImGuiKey_F15; + case SDLK_F16: return ImGuiKey_F16; + case SDLK_F17: return ImGuiKey_F17; + case SDLK_F18: return ImGuiKey_F18; + case SDLK_F19: return ImGuiKey_F19; + case SDLK_F20: return ImGuiKey_F20; + case SDLK_F21: return ImGuiKey_F21; + case SDLK_F22: return ImGuiKey_F22; + case SDLK_F23: return ImGuiKey_F23; + case SDLK_F24: return ImGuiKey_F24; + case SDLK_AC_BACK: return ImGuiKey_AppBack; + case SDLK_AC_FORWARD: return ImGuiKey_AppForward; } return ImGuiKey_None; } @@ -390,10 +413,10 @@ bool ImGui_ImplSDL2_ProcessEvent(const SDL_Event* event) if (window_event == SDL_WINDOWEVENT_ENTER) { bd->MouseWindowID = event->window.windowID; - bd->PendingMouseLeaveFrame = 0; + bd->MouseLastLeaveFrame = 0; } if (window_event == SDL_WINDOWEVENT_LEAVE) - bd->PendingMouseLeaveFrame = ImGui::GetFrameCount() + 1; + bd->MouseLastLeaveFrame = ImGui::GetFrameCount() + 1; if (window_event == SDL_WINDOWEVENT_FOCUS_GAINED) io.AddFocusEvent(true); else if (window_event == SDL_WINDOWEVENT_FOCUS_LOST) @@ -411,6 +434,12 @@ bool ImGui_ImplSDL2_ProcessEvent(const SDL_Event* event) } return true; } + case SDL_CONTROLLERDEVICEADDED: + case SDL_CONTROLLERDEVICEREMOVED: + { + bd->WantUpdateGamepadsList = true; + return true; + } } return false; } @@ -458,6 +487,10 @@ static bool ImGui_ImplSDL2_Init(SDL_Window* window, SDL_Renderer* renderer, void io.ClipboardUserData = nullptr; io.SetPlatformImeDataFn = ImGui_ImplSDL2_SetPlatformImeData; + // Gamepad handling + bd->GamepadMode = ImGui_ImplSDL2_GamepadMode_AutoFirst; + bd->WantUpdateGamepadsList = true; + // Load mouse cursors bd->MouseCursors[ImGuiMouseCursor_Arrow] = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_ARROW); bd->MouseCursors[ImGuiMouseCursor_TextInput] = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_IBEAM); @@ -554,6 +587,8 @@ bool ImGui_ImplSDL2_InitForOther(SDL_Window* window) return ImGui_ImplSDL2_Init(window, nullptr, nullptr); } +static void ImGui_ImplSDL2_CloseGamepads(); + void ImGui_ImplSDL2_Shutdown() { ImGui_ImplSDL2_Data* bd = ImGui_ImplSDL2_GetBackendData(); @@ -566,7 +601,7 @@ void ImGui_ImplSDL2_Shutdown() SDL_free(bd->ClipboardTextData); for (ImGuiMouseCursor cursor_n = 0; cursor_n < ImGuiMouseCursor_COUNT; cursor_n++) SDL_FreeCursor(bd->MouseCursors[cursor_n]); - bd->LastMouseCursor = nullptr; + ImGui_ImplSDL2_CloseGamepads(); io.BackendPlatformName = nullptr; io.BackendPlatformUserData = nullptr; @@ -655,59 +690,118 @@ static void ImGui_ImplSDL2_UpdateMouseCursor() { // Show OS mouse cursor SDL_Cursor* expected_cursor = bd->MouseCursors[imgui_cursor] ? bd->MouseCursors[imgui_cursor] : bd->MouseCursors[ImGuiMouseCursor_Arrow]; - if (bd->LastMouseCursor != expected_cursor) + if (bd->MouseLastCursor != expected_cursor) { SDL_SetCursor(expected_cursor); // SDL function doesn't have an early out (see #6113) - bd->LastMouseCursor = expected_cursor; + bd->MouseLastCursor = expected_cursor; } SDL_ShowCursor(SDL_TRUE); } } +static void ImGui_ImplSDL2_CloseGamepads() +{ + ImGui_ImplSDL2_Data* bd = ImGui_ImplSDL2_GetBackendData(); + if (bd->GamepadMode != ImGui_ImplSDL2_GamepadMode_Manual) + for (SDL_GameController* gamepad : bd->Gamepads) + SDL_GameControllerClose(gamepad); + bd->Gamepads.resize(0); +} + +void ImGui_ImplSDL2_SetGamepadMode(ImGui_ImplSDL2_GamepadMode mode, struct _SDL_GameController** manual_gamepads_array, int manual_gamepads_count) +{ + ImGui_ImplSDL2_Data* bd = ImGui_ImplSDL2_GetBackendData(); + ImGui_ImplSDL2_CloseGamepads(); + if (mode == ImGui_ImplSDL2_GamepadMode_Manual) + { + IM_ASSERT(manual_gamepads_array != nullptr && manual_gamepads_count > 0); + for (int n = 0; n < manual_gamepads_count; n++) + bd->Gamepads.push_back(manual_gamepads_array[n]); + } + else + { + IM_ASSERT(manual_gamepads_array == nullptr && manual_gamepads_count <= 0); + bd->WantUpdateGamepadsList = true; + } + bd->GamepadMode = mode; +} + +static void ImGui_ImplSDL2_UpdateGamepadButton(ImGui_ImplSDL2_Data* bd, ImGuiIO& io, ImGuiKey key, SDL_GameControllerButton button_no) +{ + bool merged_value = false; + for (SDL_GameController* gamepad : bd->Gamepads) + merged_value |= SDL_GameControllerGetButton(gamepad, button_no) != 0; + io.AddKeyEvent(key, merged_value); +} + +static inline float Saturate(float v) { return v < 0.0f ? 0.0f : v > 1.0f ? 1.0f : v; } +static void ImGui_ImplSDL2_UpdateGamepadAnalog(ImGui_ImplSDL2_Data* bd, ImGuiIO& io, ImGuiKey key, SDL_GameControllerAxis axis_no, float v0, float v1) +{ + float merged_value = 0.0f; + for (SDL_GameController* gamepad : bd->Gamepads) + { + float vn = Saturate((float)(SDL_GameControllerGetAxis(gamepad, axis_no) - v0) / (float)(v1 - v0)); + if (merged_value < vn) + merged_value = vn; + } + io.AddKeyAnalogEvent(key, merged_value > 0.1f, merged_value); +} + static void ImGui_ImplSDL2_UpdateGamepads() { + ImGui_ImplSDL2_Data* bd = ImGui_ImplSDL2_GetBackendData(); ImGuiIO& io = ImGui::GetIO(); - if ((io.ConfigFlags & ImGuiConfigFlags_NavEnableGamepad) == 0) // FIXME: Technically feeding gamepad shouldn't depend on this now that they are regular inputs. - return; - // Get gamepad + // Update list of controller(s) to use + if (bd->WantUpdateGamepadsList && bd->GamepadMode != ImGui_ImplSDL2_GamepadMode_Manual) + { + ImGui_ImplSDL2_CloseGamepads(); + int joystick_count = SDL_NumJoysticks(); + for (int n = 0; n < joystick_count; n++) + if (SDL_IsGameController(n)) + if (SDL_GameController* gamepad = SDL_GameControllerOpen(n)) + { + bd->Gamepads.push_back(gamepad); + if (bd->GamepadMode == ImGui_ImplSDL2_GamepadMode_AutoFirst) + break; + } + bd->WantUpdateGamepadsList = false; + } + + // FIXME: Technically feeding gamepad shouldn't depend on this now that they are regular inputs. + if ((io.ConfigFlags & ImGuiConfigFlags_NavEnableGamepad) == 0) + return; io.BackendFlags &= ~ImGuiBackendFlags_HasGamepad; - SDL_GameController* game_controller = SDL_GameControllerOpen(0); - if (!game_controller) + if (bd->Gamepads.Size == 0) return; io.BackendFlags |= ImGuiBackendFlags_HasGamepad; // Update gamepad inputs - #define IM_SATURATE(V) (V < 0.0f ? 0.0f : V > 1.0f ? 1.0f : V) - #define MAP_BUTTON(KEY_NO, BUTTON_NO) { io.AddKeyEvent(KEY_NO, SDL_GameControllerGetButton(game_controller, BUTTON_NO) != 0); } - #define MAP_ANALOG(KEY_NO, AXIS_NO, V0, V1) { float vn = (float)(SDL_GameControllerGetAxis(game_controller, AXIS_NO) - V0) / (float)(V1 - V0); vn = IM_SATURATE(vn); io.AddKeyAnalogEvent(KEY_NO, vn > 0.1f, vn); } - const int thumb_dead_zone = 8000; // SDL_gamecontroller.h suggests using this value. - MAP_BUTTON(ImGuiKey_GamepadStart, SDL_CONTROLLER_BUTTON_START); - MAP_BUTTON(ImGuiKey_GamepadBack, SDL_CONTROLLER_BUTTON_BACK); - MAP_BUTTON(ImGuiKey_GamepadFaceLeft, SDL_CONTROLLER_BUTTON_X); // Xbox X, PS Square - MAP_BUTTON(ImGuiKey_GamepadFaceRight, SDL_CONTROLLER_BUTTON_B); // Xbox B, PS Circle - MAP_BUTTON(ImGuiKey_GamepadFaceUp, SDL_CONTROLLER_BUTTON_Y); // Xbox Y, PS Triangle - MAP_BUTTON(ImGuiKey_GamepadFaceDown, SDL_CONTROLLER_BUTTON_A); // Xbox A, PS Cross - MAP_BUTTON(ImGuiKey_GamepadDpadLeft, SDL_CONTROLLER_BUTTON_DPAD_LEFT); - MAP_BUTTON(ImGuiKey_GamepadDpadRight, SDL_CONTROLLER_BUTTON_DPAD_RIGHT); - MAP_BUTTON(ImGuiKey_GamepadDpadUp, SDL_CONTROLLER_BUTTON_DPAD_UP); - MAP_BUTTON(ImGuiKey_GamepadDpadDown, SDL_CONTROLLER_BUTTON_DPAD_DOWN); - MAP_BUTTON(ImGuiKey_GamepadL1, SDL_CONTROLLER_BUTTON_LEFTSHOULDER); - MAP_BUTTON(ImGuiKey_GamepadR1, SDL_CONTROLLER_BUTTON_RIGHTSHOULDER); - MAP_ANALOG(ImGuiKey_GamepadL2, SDL_CONTROLLER_AXIS_TRIGGERLEFT, 0.0f, 32767); - MAP_ANALOG(ImGuiKey_GamepadR2, SDL_CONTROLLER_AXIS_TRIGGERRIGHT, 0.0f, 32767); - MAP_BUTTON(ImGuiKey_GamepadL3, SDL_CONTROLLER_BUTTON_LEFTSTICK); - MAP_BUTTON(ImGuiKey_GamepadR3, SDL_CONTROLLER_BUTTON_RIGHTSTICK); - MAP_ANALOG(ImGuiKey_GamepadLStickLeft, SDL_CONTROLLER_AXIS_LEFTX, -thumb_dead_zone, -32768); - MAP_ANALOG(ImGuiKey_GamepadLStickRight, SDL_CONTROLLER_AXIS_LEFTX, +thumb_dead_zone, +32767); - MAP_ANALOG(ImGuiKey_GamepadLStickUp, SDL_CONTROLLER_AXIS_LEFTY, -thumb_dead_zone, -32768); - MAP_ANALOG(ImGuiKey_GamepadLStickDown, SDL_CONTROLLER_AXIS_LEFTY, +thumb_dead_zone, +32767); - MAP_ANALOG(ImGuiKey_GamepadRStickLeft, SDL_CONTROLLER_AXIS_RIGHTX, -thumb_dead_zone, -32768); - MAP_ANALOG(ImGuiKey_GamepadRStickRight, SDL_CONTROLLER_AXIS_RIGHTX, +thumb_dead_zone, +32767); - MAP_ANALOG(ImGuiKey_GamepadRStickUp, SDL_CONTROLLER_AXIS_RIGHTY, -thumb_dead_zone, -32768); - MAP_ANALOG(ImGuiKey_GamepadRStickDown, SDL_CONTROLLER_AXIS_RIGHTY, +thumb_dead_zone, +32767); - #undef MAP_BUTTON - #undef MAP_ANALOG + const int thumb_dead_zone = 8000; // SDL_gamecontroller.h suggests using this value. + ImGui_ImplSDL2_UpdateGamepadButton(bd, io, ImGuiKey_GamepadStart, SDL_CONTROLLER_BUTTON_START); + ImGui_ImplSDL2_UpdateGamepadButton(bd, io, ImGuiKey_GamepadBack, SDL_CONTROLLER_BUTTON_BACK); + ImGui_ImplSDL2_UpdateGamepadButton(bd, io, ImGuiKey_GamepadFaceLeft, SDL_CONTROLLER_BUTTON_X); // Xbox X, PS Square + ImGui_ImplSDL2_UpdateGamepadButton(bd, io, ImGuiKey_GamepadFaceRight, SDL_CONTROLLER_BUTTON_B); // Xbox B, PS Circle + ImGui_ImplSDL2_UpdateGamepadButton(bd, io, ImGuiKey_GamepadFaceUp, SDL_CONTROLLER_BUTTON_Y); // Xbox Y, PS Triangle + ImGui_ImplSDL2_UpdateGamepadButton(bd, io, ImGuiKey_GamepadFaceDown, SDL_CONTROLLER_BUTTON_A); // Xbox A, PS Cross + ImGui_ImplSDL2_UpdateGamepadButton(bd, io, ImGuiKey_GamepadDpadLeft, SDL_CONTROLLER_BUTTON_DPAD_LEFT); + ImGui_ImplSDL2_UpdateGamepadButton(bd, io, ImGuiKey_GamepadDpadRight, SDL_CONTROLLER_BUTTON_DPAD_RIGHT); + ImGui_ImplSDL2_UpdateGamepadButton(bd, io, ImGuiKey_GamepadDpadUp, SDL_CONTROLLER_BUTTON_DPAD_UP); + ImGui_ImplSDL2_UpdateGamepadButton(bd, io, ImGuiKey_GamepadDpadDown, SDL_CONTROLLER_BUTTON_DPAD_DOWN); + ImGui_ImplSDL2_UpdateGamepadButton(bd, io, ImGuiKey_GamepadL1, SDL_CONTROLLER_BUTTON_LEFTSHOULDER); + ImGui_ImplSDL2_UpdateGamepadButton(bd, io, ImGuiKey_GamepadR1, SDL_CONTROLLER_BUTTON_RIGHTSHOULDER); + ImGui_ImplSDL2_UpdateGamepadAnalog(bd, io, ImGuiKey_GamepadL2, SDL_CONTROLLER_AXIS_TRIGGERLEFT, 0.0f, 32767); + ImGui_ImplSDL2_UpdateGamepadAnalog(bd, io, ImGuiKey_GamepadR2, SDL_CONTROLLER_AXIS_TRIGGERRIGHT, 0.0f, 32767); + ImGui_ImplSDL2_UpdateGamepadButton(bd, io, ImGuiKey_GamepadL3, SDL_CONTROLLER_BUTTON_LEFTSTICK); + ImGui_ImplSDL2_UpdateGamepadButton(bd, io, ImGuiKey_GamepadR3, SDL_CONTROLLER_BUTTON_RIGHTSTICK); + ImGui_ImplSDL2_UpdateGamepadAnalog(bd, io, ImGuiKey_GamepadLStickLeft, SDL_CONTROLLER_AXIS_LEFTX, -thumb_dead_zone, -32768); + ImGui_ImplSDL2_UpdateGamepadAnalog(bd, io, ImGuiKey_GamepadLStickRight, SDL_CONTROLLER_AXIS_LEFTX, +thumb_dead_zone, +32767); + ImGui_ImplSDL2_UpdateGamepadAnalog(bd, io, ImGuiKey_GamepadLStickUp, SDL_CONTROLLER_AXIS_LEFTY, -thumb_dead_zone, -32768); + ImGui_ImplSDL2_UpdateGamepadAnalog(bd, io, ImGuiKey_GamepadLStickDown, SDL_CONTROLLER_AXIS_LEFTY, +thumb_dead_zone, +32767); + ImGui_ImplSDL2_UpdateGamepadAnalog(bd, io, ImGuiKey_GamepadRStickLeft, SDL_CONTROLLER_AXIS_RIGHTX, -thumb_dead_zone, -32768); + ImGui_ImplSDL2_UpdateGamepadAnalog(bd, io, ImGuiKey_GamepadRStickRight, SDL_CONTROLLER_AXIS_RIGHTX, +thumb_dead_zone, +32767); + ImGui_ImplSDL2_UpdateGamepadAnalog(bd, io, ImGuiKey_GamepadRStickUp, SDL_CONTROLLER_AXIS_RIGHTY, -thumb_dead_zone, -32768); + ImGui_ImplSDL2_UpdateGamepadAnalog(bd, io, ImGuiKey_GamepadRStickDown, SDL_CONTROLLER_AXIS_RIGHTY, +thumb_dead_zone, +32767); } // FIXME: Note that doesn't update with DPI/Scaling change only as SDL2 doesn't have an event for it (SDL3 has). @@ -776,10 +870,10 @@ void ImGui_ImplSDL2_NewFrame() io.DeltaTime = bd->Time > 0 ? (float)((double)(current_time - bd->Time) / frequency) : (float)(1.0f / 60.0f); bd->Time = current_time; - if (bd->PendingMouseLeaveFrame && bd->PendingMouseLeaveFrame >= ImGui::GetFrameCount() && bd->MouseButtonsDown == 0) + if (bd->MouseLastLeaveFrame && bd->MouseLastLeaveFrame >= ImGui::GetFrameCount() && bd->MouseButtonsDown == 0) { bd->MouseWindowID = 0; - bd->PendingMouseLeaveFrame = 0; + bd->MouseLastLeaveFrame = 0; io.AddMousePosEvent(-FLT_MAX, -FLT_MAX); } diff --git a/cimgui/imgui/backends/imgui_impl_sdl2.h b/cimgui/imgui/backends/imgui_impl_sdl2.h index dee37fb62..2970772ef 100644 --- a/cimgui/imgui/backends/imgui_impl_sdl2.h +++ b/cimgui/imgui/backends/imgui_impl_sdl2.h @@ -27,6 +27,7 @@ struct SDL_Window; struct SDL_Renderer; +struct _SDL_GameController; typedef union SDL_Event SDL_Event; IMGUI_IMPL_API bool ImGui_ImplSDL2_InitForOpenGL(SDL_Window* window, void* sdl_gl_context); @@ -39,8 +40,9 @@ IMGUI_IMPL_API void ImGui_ImplSDL2_Shutdown(); IMGUI_IMPL_API void ImGui_ImplSDL2_NewFrame(); IMGUI_IMPL_API bool ImGui_ImplSDL2_ProcessEvent(const SDL_Event* event); -#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS -static inline void ImGui_ImplSDL2_NewFrame(SDL_Window*) { ImGui_ImplSDL2_NewFrame(); } // 1.84: removed unnecessary parameter -#endif +// Gamepad selection automatically starts in AutoFirst mode, picking first available SDL_Gamepad. You may override this. +// When using manual mode, caller is responsible for opening/closing gamepad. +enum ImGui_ImplSDL2_GamepadMode { ImGui_ImplSDL2_GamepadMode_AutoFirst, ImGui_ImplSDL2_GamepadMode_AutoAll, ImGui_ImplSDL2_GamepadMode_Manual }; +IMGUI_IMPL_API void ImGui_ImplSDL2_SetGamepadMode(ImGui_ImplSDL2_GamepadMode mode, struct _SDL_GameController** manual_gamepads_array = NULL, int manual_gamepads_count = -1); #endif // #ifndef IMGUI_DISABLE diff --git a/cimgui/imgui/backends/imgui_impl_sdl3.cpp b/cimgui/imgui/backends/imgui_impl_sdl3.cpp index bbe598082..8eccaa89b 100644 --- a/cimgui/imgui/backends/imgui_impl_sdl3.cpp +++ b/cimgui/imgui/backends/imgui_impl_sdl3.cpp @@ -24,7 +24,10 @@ // CHANGELOG // (minor and older changes stripped away, please see git history for details) -// 2023-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface. +// 2024-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface. +// 2024-02-13: Inputs: Fixed gamepad support. Handle gamepad disconnection. Added ImGui_ImplSDL3_SetGamepadMode(). +// 2023-11-13: Updated for recent SDL3 API changes. +// 2023-10-05: Inputs: Added support for extra ImGuiKey values: F13 to F24 function keys, app back/forward keys. // 2023-05-04: Fixed build on Emscripten/iOS/Android. (#6391) // 2023-04-06: Inputs: Avoid calling SDL_StartTextInput()/SDL_StopTextInput() as they don't only pertain to IME. It's unclear exactly what their relation is to IME. (#6306) // 2023-04-04: Inputs: Added support for io.AddMouseSourceEvent() to discriminate ImGuiMouseSource_Mouse/ImGuiMouseSource_TouchScreen. (#2702) @@ -43,10 +46,15 @@ // SDL #include -#include #if defined(__APPLE__) #include #endif +#ifdef _WIN32 +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include +#endif #if !defined(__EMSCRIPTEN__) && !defined(__ANDROID__) && !(defined(__APPLE__) && TARGET_OS_IOS) && !defined(__amigaos4__) #define SDL_HAS_CAPTURE_AND_GLOBAL_MOUSE 1 @@ -57,19 +65,26 @@ // SDL Data struct ImGui_ImplSDL3_Data { - SDL_Window* Window; - SDL_Renderer* Renderer; - Uint64 Time; - Uint32 MouseWindowID; - int MouseButtonsDown; - SDL_Cursor* MouseCursors[ImGuiMouseCursor_COUNT]; - SDL_Cursor* LastMouseCursor; - int PendingMouseLeaveFrame; - char* ClipboardTextData; - bool MouseCanUseGlobalState; - bool MouseCanReportHoveredViewport; // This is hard to use/unreliable on SDL so we'll set ImGuiBackendFlags_HasMouseHoveredViewport dynamically based on state. - bool UseVulkan; - bool WantUpdateMonitors; + SDL_Window* Window; + SDL_Renderer* Renderer; + Uint64 Time; + char* ClipboardTextData; + bool UseVulkan; + bool WantUpdateMonitors; + + // Mouse handling + Uint32 MouseWindowID; + int MouseButtonsDown; + SDL_Cursor* MouseCursors[ImGuiMouseCursor_COUNT]; + SDL_Cursor* MouseLastCursor; + int MousePendingLeaveFrame; + bool MouseCanUseGlobalState; + bool MouseCanReportHoveredViewport; // This is hard to use/unreliable on SDL so we'll set ImGuiBackendFlags_HasMouseHoveredViewport dynamically based on state. + + // Gamepad handling + ImVector Gamepads; + ImGui_ImplSDL3_GamepadMode GamepadMode; + bool WantUpdateGamepadsList; ImGui_ImplSDL3_Data() { memset((void*)this, 0, sizeof(*this)); } }; @@ -225,6 +240,20 @@ static ImGuiKey ImGui_ImplSDL3_KeycodeToImGuiKey(int keycode) case SDLK_F10: return ImGuiKey_F10; case SDLK_F11: return ImGuiKey_F11; case SDLK_F12: return ImGuiKey_F12; + case SDLK_F13: return ImGuiKey_F13; + case SDLK_F14: return ImGuiKey_F14; + case SDLK_F15: return ImGuiKey_F15; + case SDLK_F16: return ImGuiKey_F16; + case SDLK_F17: return ImGuiKey_F17; + case SDLK_F18: return ImGuiKey_F18; + case SDLK_F19: return ImGuiKey_F19; + case SDLK_F20: return ImGuiKey_F20; + case SDLK_F21: return ImGuiKey_F21; + case SDLK_F22: return ImGuiKey_F22; + case SDLK_F23: return ImGuiKey_F23; + case SDLK_F24: return ImGuiKey_F24; + case SDLK_AC_BACK: return ImGuiKey_AppBack; + case SDLK_AC_FORWARD: return ImGuiKey_AppForward; } return ImGuiKey_None; } @@ -307,8 +336,8 @@ bool ImGui_ImplSDL3_ProcessEvent(const SDL_Event* event) return true; } case SDL_EVENT_DISPLAY_ORIENTATION: - case SDL_EVENT_DISPLAY_CONNECTED: - case SDL_EVENT_DISPLAY_DISCONNECTED: + case SDL_EVENT_DISPLAY_ADDED: + case SDL_EVENT_DISPLAY_REMOVED: case SDL_EVENT_DISPLAY_MOVED: case SDL_EVENT_DISPLAY_CONTENT_SCALE_CHANGED: { @@ -318,7 +347,7 @@ bool ImGui_ImplSDL3_ProcessEvent(const SDL_Event* event) case SDL_EVENT_WINDOW_MOUSE_ENTER: { bd->MouseWindowID = event->window.windowID; - bd->PendingMouseLeaveFrame = 0; + bd->MousePendingLeaveFrame = 0; return true; } // - In some cases, when detaching a window from main viewport SDL may send SDL_WINDOWEVENT_ENTER one frame too late, @@ -327,7 +356,7 @@ bool ImGui_ImplSDL3_ProcessEvent(const SDL_Event* event) // FIXME: Unconfirmed whether this is still needed with SDL3. case SDL_EVENT_WINDOW_MOUSE_LEAVE: { - bd->PendingMouseLeaveFrame = ImGui::GetFrameCount() + 1; + bd->MousePendingLeaveFrame = ImGui::GetFrameCount() + 1; return true; } case SDL_EVENT_WINDOW_FOCUS_GAINED: @@ -350,14 +379,32 @@ bool ImGui_ImplSDL3_ProcessEvent(const SDL_Event* event) return true; } return true; + case SDL_EVENT_GAMEPAD_ADDED: + case SDL_EVENT_GAMEPAD_REMOVED: + { + bd->WantUpdateGamepadsList = true; + return true; + } } return false; } +static void ImGui_ImplSDL3_SetupPlatformHandles(ImGuiViewport* viewport, SDL_Window* window) +{ + viewport->PlatformHandle = window; + viewport->PlatformHandleRaw = nullptr; +#if defined(__WIN32__) && !defined(__WINRT__) + viewport->PlatformHandleRaw = (HWND)SDL_GetProperty(SDL_GetWindowProperties(window), "SDL.window.win32.hwnd", nullptr); +#elif defined(__APPLE__) && defined(SDL_VIDEO_DRIVER_COCOA) + viewport->PlatformHandleRaw = (void*)SDL_GetProperty(SDL_GetWindowProperties(window), "SDL.window.cocoa.window", nullptr); +#endif +} + static bool ImGui_ImplSDL3_Init(SDL_Window* window, SDL_Renderer* renderer, void* sdl_gl_context) { ImGuiIO& io = ImGui::GetIO(); IM_ASSERT(io.BackendPlatformUserData == nullptr && "Already initialized a platform backend!"); + IM_UNUSED(sdl_gl_context); // Unused in this branch // Check and store if we are on a SDL backend that supports global mouse position // ("wayland" and "rpi" don't support it, but we chose to use a white-list instead of a black-list) @@ -397,6 +444,10 @@ static bool ImGui_ImplSDL3_Init(SDL_Window* window, SDL_Renderer* renderer, void io.ClipboardUserData = nullptr; io.SetPlatformImeDataFn = ImGui_ImplSDL3_SetPlatformImeData; + // Gamepad handling + bd->GamepadMode = ImGui_ImplSDL3_GamepadMode_AutoFirst; + bd->WantUpdateGamepadsList = true; + // Load mouse cursors bd->MouseCursors[ImGuiMouseCursor_Arrow] = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_ARROW); bd->MouseCursors[ImGuiMouseCursor_TextInput] = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_IBEAM); @@ -411,17 +462,7 @@ static bool ImGui_ImplSDL3_Init(SDL_Window* window, SDL_Renderer* renderer, void // Set platform dependent data in viewport // Our mouse update function expect PlatformHandle to be filled for the main viewport ImGuiViewport* main_viewport = ImGui::GetMainViewport(); - main_viewport->PlatformHandle = (void*)window; - main_viewport->PlatformHandleRaw = nullptr; - SDL_SysWMinfo info; - if (SDL_GetWindowWMInfo(window, &info, SDL_SYSWM_CURRENT_VERSION) == 0) - { -#if defined(SDL_ENABLE_SYSWM_WINDOWS) - main_viewport->PlatformHandleRaw = (void*)info.info.win.window; -#elif defined(__APPLE__) && defined(SDL_ENABLE_SYSWM_COCOA) - main_viewport->PlatformHandleRaw = (void*)info.info.cocoa.window; -#endif - } + ImGui_ImplSDL3_SetupPlatformHandles(main_viewport, window); // From 2.0.5: Set SDL hint to receive mouse click events on window focus, otherwise SDL doesn't emit the event. // Without this, when clicking to gain focus, our widgets wouldn't activate even though they showed as hovered. @@ -481,6 +522,8 @@ bool ImGui_ImplSDL3_InitForOther(SDL_Window* window) return ImGui_ImplSDL3_Init(window, nullptr, nullptr); } +static void ImGui_ImplSDL3_CloseGamepads(); + void ImGui_ImplSDL3_Shutdown() { ImGui_ImplSDL3_Data* bd = ImGui_ImplSDL3_GetBackendData(); @@ -493,7 +536,7 @@ void ImGui_ImplSDL3_Shutdown() SDL_free(bd->ClipboardTextData); for (ImGuiMouseCursor cursor_n = 0; cursor_n < ImGuiMouseCursor_COUNT; cursor_n++) SDL_DestroyCursor(bd->MouseCursors[cursor_n]); - bd->LastMouseCursor = nullptr; + ImGui_ImplSDL3_CloseGamepads(); io.BackendPlatformName = nullptr; io.BackendPlatformUserData = nullptr; @@ -582,59 +625,118 @@ static void ImGui_ImplSDL3_UpdateMouseCursor() { // Show OS mouse cursor SDL_Cursor* expected_cursor = bd->MouseCursors[imgui_cursor] ? bd->MouseCursors[imgui_cursor] : bd->MouseCursors[ImGuiMouseCursor_Arrow]; - if (bd->LastMouseCursor != expected_cursor) + if (bd->MouseLastCursor != expected_cursor) { SDL_SetCursor(expected_cursor); // SDL function doesn't have an early out (see #6113) - bd->LastMouseCursor = expected_cursor; + bd->MouseLastCursor = expected_cursor; } SDL_ShowCursor(); } } +static void ImGui_ImplSDL3_CloseGamepads() +{ + ImGui_ImplSDL3_Data* bd = ImGui_ImplSDL3_GetBackendData(); + if (bd->GamepadMode != ImGui_ImplSDL3_GamepadMode_Manual) + for (SDL_Gamepad* gamepad : bd->Gamepads) + SDL_CloseGamepad(gamepad); + bd->Gamepads.resize(0); +} + +void ImGui_ImplSDL3_SetGamepadMode(ImGui_ImplSDL3_GamepadMode mode, SDL_Gamepad** manual_gamepads_array, int manual_gamepads_count) +{ + ImGui_ImplSDL3_Data* bd = ImGui_ImplSDL3_GetBackendData(); + ImGui_ImplSDL3_CloseGamepads(); + if (mode == ImGui_ImplSDL3_GamepadMode_Manual) + { + IM_ASSERT(manual_gamepads_array != nullptr && manual_gamepads_count > 0); + for (int n = 0; n < manual_gamepads_count; n++) + bd->Gamepads.push_back(manual_gamepads_array[n]); + } + else + { + IM_ASSERT(manual_gamepads_array == nullptr && manual_gamepads_count <= 0); + bd->WantUpdateGamepadsList = true; + } + bd->GamepadMode = mode; +} + +static void ImGui_ImplSDL3_UpdateGamepadButton(ImGui_ImplSDL3_Data* bd, ImGuiIO& io, ImGuiKey key, SDL_GamepadButton button_no) +{ + bool merged_value = false; + for (SDL_Gamepad* gamepad : bd->Gamepads) + merged_value |= SDL_GetGamepadButton(gamepad, button_no) != 0; + io.AddKeyEvent(key, merged_value); +} + +static inline float Saturate(float v) { return v < 0.0f ? 0.0f : v > 1.0f ? 1.0f : v; } +static void ImGui_ImplSDL3_UpdateGamepadAnalog(ImGui_ImplSDL3_Data* bd, ImGuiIO& io, ImGuiKey key, SDL_GamepadAxis axis_no, float v0, float v1) +{ + float merged_value = 0.0f; + for (SDL_Gamepad* gamepad : bd->Gamepads) + { + float vn = Saturate((float)(SDL_GetGamepadAxis(gamepad, axis_no) - v0) / (float)(v1 - v0)); + if (merged_value < vn) + merged_value = vn; + } + io.AddKeyAnalogEvent(key, merged_value > 0.1f, merged_value); +} + static void ImGui_ImplSDL3_UpdateGamepads() { ImGuiIO& io = ImGui::GetIO(); - if ((io.ConfigFlags & ImGuiConfigFlags_NavEnableGamepad) == 0) // FIXME: Technically feeding gamepad shouldn't depend on this now that they are regular inputs. - return; + ImGui_ImplSDL3_Data* bd = ImGui_ImplSDL3_GetBackendData(); + + // Update list of gamepads to use + if (bd->WantUpdateGamepadsList && bd->GamepadMode != ImGui_ImplSDL3_GamepadMode_Manual) + { + ImGui_ImplSDL3_CloseGamepads(); + int sdl_gamepads_count = 0; + SDL_JoystickID* sdl_gamepads = SDL_GetGamepads(&sdl_gamepads_count); + for (int n = 0; n < sdl_gamepads_count; n++) + if (SDL_Gamepad* gamepad = SDL_OpenGamepad(sdl_gamepads[n])) + { + bd->Gamepads.push_back(gamepad); + if (bd->GamepadMode == ImGui_ImplSDL3_GamepadMode_AutoFirst) + break; + } + bd->WantUpdateGamepadsList = false; + } - // Get gamepad + // FIXME: Technically feeding gamepad shouldn't depend on this now that they are regular inputs. + if ((io.ConfigFlags & ImGuiConfigFlags_NavEnableGamepad) == 0) + return; io.BackendFlags &= ~ImGuiBackendFlags_HasGamepad; - SDL_Gamepad* gamepad = SDL_OpenGamepad(0); - if (!gamepad) + if (bd->Gamepads.Size == 0) return; io.BackendFlags |= ImGuiBackendFlags_HasGamepad; // Update gamepad inputs - #define IM_SATURATE(V) (V < 0.0f ? 0.0f : V > 1.0f ? 1.0f : V) - #define MAP_BUTTON(KEY_NO, BUTTON_NO) { io.AddKeyEvent(KEY_NO, SDL_GetGamepadButton(gamepad, BUTTON_NO) != 0); } - #define MAP_ANALOG(KEY_NO, AXIS_NO, V0, V1) { float vn = (float)(SDL_GetGamepadAxis(gamepad, AXIS_NO) - V0) / (float)(V1 - V0); vn = IM_SATURATE(vn); io.AddKeyAnalogEvent(KEY_NO, vn > 0.1f, vn); } - const int thumb_dead_zone = 8000; // SDL_gamecontroller.h suggests using this value. - MAP_BUTTON(ImGuiKey_GamepadStart, SDL_GAMEPAD_BUTTON_START); - MAP_BUTTON(ImGuiKey_GamepadBack, SDL_GAMEPAD_BUTTON_BACK); - MAP_BUTTON(ImGuiKey_GamepadFaceLeft, SDL_GAMEPAD_BUTTON_X); // Xbox X, PS Square - MAP_BUTTON(ImGuiKey_GamepadFaceRight, SDL_GAMEPAD_BUTTON_B); // Xbox B, PS Circle - MAP_BUTTON(ImGuiKey_GamepadFaceUp, SDL_GAMEPAD_BUTTON_Y); // Xbox Y, PS Triangle - MAP_BUTTON(ImGuiKey_GamepadFaceDown, SDL_GAMEPAD_BUTTON_A); // Xbox A, PS Cross - MAP_BUTTON(ImGuiKey_GamepadDpadLeft, SDL_GAMEPAD_BUTTON_DPAD_LEFT); - MAP_BUTTON(ImGuiKey_GamepadDpadRight, SDL_GAMEPAD_BUTTON_DPAD_RIGHT); - MAP_BUTTON(ImGuiKey_GamepadDpadUp, SDL_GAMEPAD_BUTTON_DPAD_UP); - MAP_BUTTON(ImGuiKey_GamepadDpadDown, SDL_GAMEPAD_BUTTON_DPAD_DOWN); - MAP_BUTTON(ImGuiKey_GamepadL1, SDL_GAMEPAD_BUTTON_LEFT_SHOULDER); - MAP_BUTTON(ImGuiKey_GamepadR1, SDL_GAMEPAD_BUTTON_RIGHT_SHOULDER); - MAP_ANALOG(ImGuiKey_GamepadL2, SDL_GAMEPAD_AXIS_LEFT_TRIGGER, 0.0f, 32767); - MAP_ANALOG(ImGuiKey_GamepadR2, SDL_GAMEPAD_AXIS_RIGHT_TRIGGER, 0.0f, 32767); - MAP_BUTTON(ImGuiKey_GamepadL3, SDL_GAMEPAD_BUTTON_LEFT_STICK); - MAP_BUTTON(ImGuiKey_GamepadR3, SDL_GAMEPAD_BUTTON_RIGHT_STICK); - MAP_ANALOG(ImGuiKey_GamepadLStickLeft, SDL_GAMEPAD_AXIS_LEFTX, -thumb_dead_zone, -32768); - MAP_ANALOG(ImGuiKey_GamepadLStickRight, SDL_GAMEPAD_AXIS_LEFTX, +thumb_dead_zone, +32767); - MAP_ANALOG(ImGuiKey_GamepadLStickUp, SDL_GAMEPAD_AXIS_LEFTY, -thumb_dead_zone, -32768); - MAP_ANALOG(ImGuiKey_GamepadLStickDown, SDL_GAMEPAD_AXIS_LEFTY, +thumb_dead_zone, +32767); - MAP_ANALOG(ImGuiKey_GamepadRStickLeft, SDL_GAMEPAD_AXIS_RIGHTX, -thumb_dead_zone, -32768); - MAP_ANALOG(ImGuiKey_GamepadRStickRight, SDL_GAMEPAD_AXIS_RIGHTX, +thumb_dead_zone, +32767); - MAP_ANALOG(ImGuiKey_GamepadRStickUp, SDL_GAMEPAD_AXIS_RIGHTY, -thumb_dead_zone, -32768); - MAP_ANALOG(ImGuiKey_GamepadRStickDown, SDL_GAMEPAD_AXIS_RIGHTY, +thumb_dead_zone, +32767); - #undef MAP_BUTTON - #undef MAP_ANALOG + const int thumb_dead_zone = 8000; // SDL_gamepad.h suggests using this value. + ImGui_ImplSDL3_UpdateGamepadButton(bd, io, ImGuiKey_GamepadStart, SDL_GAMEPAD_BUTTON_START); + ImGui_ImplSDL3_UpdateGamepadButton(bd, io, ImGuiKey_GamepadBack, SDL_GAMEPAD_BUTTON_BACK); + ImGui_ImplSDL3_UpdateGamepadButton(bd, io, ImGuiKey_GamepadFaceLeft, SDL_GAMEPAD_BUTTON_WEST); // Xbox X, PS Square + ImGui_ImplSDL3_UpdateGamepadButton(bd, io, ImGuiKey_GamepadFaceRight, SDL_GAMEPAD_BUTTON_EAST); // Xbox B, PS Circle + ImGui_ImplSDL3_UpdateGamepadButton(bd, io, ImGuiKey_GamepadFaceUp, SDL_GAMEPAD_BUTTON_NORTH); // Xbox Y, PS Triangle + ImGui_ImplSDL3_UpdateGamepadButton(bd, io, ImGuiKey_GamepadFaceDown, SDL_GAMEPAD_BUTTON_SOUTH); // Xbox A, PS Cross + ImGui_ImplSDL3_UpdateGamepadButton(bd, io, ImGuiKey_GamepadDpadLeft, SDL_GAMEPAD_BUTTON_DPAD_LEFT); + ImGui_ImplSDL3_UpdateGamepadButton(bd, io, ImGuiKey_GamepadDpadRight, SDL_GAMEPAD_BUTTON_DPAD_RIGHT); + ImGui_ImplSDL3_UpdateGamepadButton(bd, io, ImGuiKey_GamepadDpadUp, SDL_GAMEPAD_BUTTON_DPAD_UP); + ImGui_ImplSDL3_UpdateGamepadButton(bd, io, ImGuiKey_GamepadDpadDown, SDL_GAMEPAD_BUTTON_DPAD_DOWN); + ImGui_ImplSDL3_UpdateGamepadButton(bd, io, ImGuiKey_GamepadL1, SDL_GAMEPAD_BUTTON_LEFT_SHOULDER); + ImGui_ImplSDL3_UpdateGamepadButton(bd, io, ImGuiKey_GamepadR1, SDL_GAMEPAD_BUTTON_RIGHT_SHOULDER); + ImGui_ImplSDL3_UpdateGamepadAnalog(bd, io, ImGuiKey_GamepadL2, SDL_GAMEPAD_AXIS_LEFT_TRIGGER, 0.0f, 32767); + ImGui_ImplSDL3_UpdateGamepadAnalog(bd, io, ImGuiKey_GamepadR2, SDL_GAMEPAD_AXIS_RIGHT_TRIGGER, 0.0f, 32767); + ImGui_ImplSDL3_UpdateGamepadButton(bd, io, ImGuiKey_GamepadL3, SDL_GAMEPAD_BUTTON_LEFT_STICK); + ImGui_ImplSDL3_UpdateGamepadButton(bd, io, ImGuiKey_GamepadR3, SDL_GAMEPAD_BUTTON_RIGHT_STICK); + ImGui_ImplSDL3_UpdateGamepadAnalog(bd, io, ImGuiKey_GamepadLStickLeft, SDL_GAMEPAD_AXIS_LEFTX, -thumb_dead_zone, -32768); + ImGui_ImplSDL3_UpdateGamepadAnalog(bd, io, ImGuiKey_GamepadLStickRight, SDL_GAMEPAD_AXIS_LEFTX, +thumb_dead_zone, +32767); + ImGui_ImplSDL3_UpdateGamepadAnalog(bd, io, ImGuiKey_GamepadLStickUp, SDL_GAMEPAD_AXIS_LEFTY, -thumb_dead_zone, -32768); + ImGui_ImplSDL3_UpdateGamepadAnalog(bd, io, ImGuiKey_GamepadLStickDown, SDL_GAMEPAD_AXIS_LEFTY, +thumb_dead_zone, +32767); + ImGui_ImplSDL3_UpdateGamepadAnalog(bd, io, ImGuiKey_GamepadRStickLeft, SDL_GAMEPAD_AXIS_RIGHTX, -thumb_dead_zone, -32768); + ImGui_ImplSDL3_UpdateGamepadAnalog(bd, io, ImGuiKey_GamepadRStickRight, SDL_GAMEPAD_AXIS_RIGHTX, +thumb_dead_zone, +32767); + ImGui_ImplSDL3_UpdateGamepadAnalog(bd, io, ImGuiKey_GamepadRStickUp, SDL_GAMEPAD_AXIS_RIGHTY, -thumb_dead_zone, -32768); + ImGui_ImplSDL3_UpdateGamepadAnalog(bd, io, ImGuiKey_GamepadRStickDown, SDL_GAMEPAD_AXIS_RIGHTY, +thumb_dead_zone, +32767); } static void ImGui_ImplSDL3_UpdateMonitors() @@ -696,10 +798,10 @@ void ImGui_ImplSDL3_NewFrame() io.DeltaTime = bd->Time > 0 ? (float)((double)(current_time - bd->Time) / frequency) : (float)(1.0f / 60.0f); bd->Time = current_time; - if (bd->PendingMouseLeaveFrame && bd->PendingMouseLeaveFrame >= ImGui::GetFrameCount() && bd->MouseButtonsDown == 0) + if (bd->MousePendingLeaveFrame && bd->MousePendingLeaveFrame >= ImGui::GetFrameCount() && bd->MouseButtonsDown == 0) { bd->MouseWindowID = 0; - bd->PendingMouseLeaveFrame = 0; + bd->MousePendingLeaveFrame = 0; io.AddMousePosEvent(-FLT_MAX, -FLT_MAX); } @@ -775,17 +877,7 @@ static void ImGui_ImplSDL3_CreateWindow(ImGuiViewport* viewport) if (use_opengl && backup_context) SDL_GL_MakeCurrent(vd->Window, backup_context); - viewport->PlatformHandle = (void*)vd->Window; - viewport->PlatformHandleRaw = nullptr; - SDL_SysWMinfo info; - if (SDL_GetWindowWMInfo(vd->Window, &info, SDL_SYSWM_CURRENT_VERSION)) - { -#if defined(SDL_VIDEO_DRIVER_WINDOWS) - viewport->PlatformHandleRaw = info.info.win.window; -#elif defined(__APPLE__) && defined(SDL_VIDEO_DRIVER_COCOA) - viewport->PlatformHandleRaw = (void*)info.info.cocoa.window; -#endif - } + ImGui_ImplSDL3_SetupPlatformHandles(viewport, vd->Window); } static void ImGui_ImplSDL3_DestroyWindow(ImGuiViewport* viewport) @@ -912,7 +1004,7 @@ static int ImGui_ImplSDL3_CreateVkSurface(ImGuiViewport* viewport, ImU64 vk_inst { ImGui_ImplSDL3_ViewportData* vd = (ImGui_ImplSDL3_ViewportData*)viewport->PlatformUserData; (void)vk_allocator; - SDL_bool ret = SDL_Vulkan_CreateSurface(vd->Window, (VkInstance)vk_instance, (VkSurfaceKHR*)out_vk_surface); + SDL_bool ret = SDL_Vulkan_CreateSurface(vd->Window, (VkInstance)vk_instance, (VkAllocationCallbacks*)vk_allocator, (VkSurfaceKHR*)out_vk_surface); return ret ? 0 : 1; // ret ? VK_SUCCESS : VK_NOT_READY } diff --git a/cimgui/imgui/backends/imgui_impl_sdl3.h b/cimgui/imgui/backends/imgui_impl_sdl3.h index 1a4b31706..18ab945af 100644 --- a/cimgui/imgui/backends/imgui_impl_sdl3.h +++ b/cimgui/imgui/backends/imgui_impl_sdl3.h @@ -28,6 +28,7 @@ struct SDL_Window; struct SDL_Renderer; +struct SDL_Gamepad; typedef union SDL_Event SDL_Event; IMGUI_IMPL_API bool ImGui_ImplSDL3_InitForOpenGL(SDL_Window* window, void* sdl_gl_context); @@ -40,4 +41,9 @@ IMGUI_IMPL_API void ImGui_ImplSDL3_Shutdown(); IMGUI_IMPL_API void ImGui_ImplSDL3_NewFrame(); IMGUI_IMPL_API bool ImGui_ImplSDL3_ProcessEvent(const SDL_Event* event); +// Gamepad selection automatically starts in AutoFirst mode, picking first available SDL_Gamepad. You may override this. +// When using manual mode, caller is responsible for opening/closing gamepad. +enum ImGui_ImplSDL3_GamepadMode { ImGui_ImplSDL3_GamepadMode_AutoFirst, ImGui_ImplSDL3_GamepadMode_AutoAll, ImGui_ImplSDL3_GamepadMode_Manual }; +IMGUI_IMPL_API void ImGui_ImplSDL3_SetGamepadMode(ImGui_ImplSDL3_GamepadMode mode, SDL_Gamepad** manual_gamepads_array = NULL, int manual_gamepads_count = -1); + #endif // #ifndef IMGUI_DISABLE diff --git a/cimgui/imgui/backends/imgui_impl_sdlrenderer2.cpp b/cimgui/imgui/backends/imgui_impl_sdlrenderer2.cpp index affa13950..4c90492e7 100644 --- a/cimgui/imgui/backends/imgui_impl_sdlrenderer2.cpp +++ b/cimgui/imgui/backends/imgui_impl_sdlrenderer2.cpp @@ -183,12 +183,12 @@ void ImGui_ImplSDLRenderer2_RenderDrawData(ImDrawData* draw_data) SDL_Rect r = { (int)(clip_min.x), (int)(clip_min.y), (int)(clip_max.x - clip_min.x), (int)(clip_max.y - clip_min.y) }; SDL_RenderSetClipRect(bd->SDLRenderer, &r); - const float* xy = (const float*)(const void*)((const char*)(vtx_buffer + pcmd->VtxOffset) + IM_OFFSETOF(ImDrawVert, pos)); - const float* uv = (const float*)(const void*)((const char*)(vtx_buffer + pcmd->VtxOffset) + IM_OFFSETOF(ImDrawVert, uv)); + const float* xy = (const float*)(const void*)((const char*)(vtx_buffer + pcmd->VtxOffset) + offsetof(ImDrawVert, pos)); + const float* uv = (const float*)(const void*)((const char*)(vtx_buffer + pcmd->VtxOffset) + offsetof(ImDrawVert, uv)); #if SDL_VERSION_ATLEAST(2,0,19) - const SDL_Color* color = (const SDL_Color*)(const void*)((const char*)(vtx_buffer + pcmd->VtxOffset) + IM_OFFSETOF(ImDrawVert, col)); // SDL 2.0.19+ + const SDL_Color* color = (const SDL_Color*)(const void*)((const char*)(vtx_buffer + pcmd->VtxOffset) + offsetof(ImDrawVert, col)); // SDL 2.0.19+ #else - const int* color = (const int*)(const void*)((const char*)(vtx_buffer + pcmd->VtxOffset) + IM_OFFSETOF(ImDrawVert, col)); // SDL 2.0.17 and 2.0.18 + const int* color = (const int*)(const void*)((const char*)(vtx_buffer + pcmd->VtxOffset) + offsetof(ImDrawVert, col)); // SDL 2.0.17 and 2.0.18 #endif // Bind texture, Draw diff --git a/cimgui/imgui/backends/imgui_impl_sdlrenderer3.cpp b/cimgui/imgui/backends/imgui_impl_sdlrenderer3.cpp index 2deb6075b..6675356e4 100644 --- a/cimgui/imgui/backends/imgui_impl_sdlrenderer3.cpp +++ b/cimgui/imgui/backends/imgui_impl_sdlrenderer3.cpp @@ -22,6 +22,7 @@ // - Introduction, links and more at the top of imgui.cpp // CHANGELOG +// 2024-02-12: Amend to query SDL_RenderViewportSet() and restore viewport accordingly. // 2023-05-30: Initial version. #include "imgui.h" @@ -131,10 +132,12 @@ void ImGui_ImplSDLRenderer3_RenderDrawData(ImDrawData* draw_data) struct BackupSDLRendererState { SDL_Rect Viewport; + bool ViewportEnabled; bool ClipEnabled; SDL_Rect ClipRect; }; BackupSDLRendererState old = {}; + old.ViewportEnabled = SDL_RenderViewportSet(bd->SDLRenderer) == SDL_TRUE; old.ClipEnabled = SDL_RenderClipEnabled(bd->SDLRenderer) == SDL_TRUE; SDL_GetRenderViewport(bd->SDLRenderer, &old.Viewport); SDL_GetRenderClipRect(bd->SDLRenderer, &old.ClipRect); @@ -178,13 +181,9 @@ void ImGui_ImplSDLRenderer3_RenderDrawData(ImDrawData* draw_data) SDL_Rect r = { (int)(clip_min.x), (int)(clip_min.y), (int)(clip_max.x - clip_min.x), (int)(clip_max.y - clip_min.y) }; SDL_SetRenderClipRect(bd->SDLRenderer, &r); - const float* xy = (const float*)(const void*)((const char*)(vtx_buffer + pcmd->VtxOffset) + IM_OFFSETOF(ImDrawVert, pos)); - const float* uv = (const float*)(const void*)((const char*)(vtx_buffer + pcmd->VtxOffset) + IM_OFFSETOF(ImDrawVert, uv)); -#if SDL_VERSION_ATLEAST(2,0,19) - const SDL_Color* color = (const SDL_Color*)(const void*)((const char*)(vtx_buffer + pcmd->VtxOffset) + IM_OFFSETOF(ImDrawVert, col)); // SDL 2.0.19+ -#else - const int* color = (const int*)(const void*)((const char*)(vtx_buffer + pcmd->VtxOffset) + IM_OFFSETOF(ImDrawVert, col)); // SDL 2.0.17 and 2.0.18 -#endif + const float* xy = (const float*)(const void*)((const char*)(vtx_buffer + pcmd->VtxOffset) + offsetof(ImDrawVert, pos)); + const float* uv = (const float*)(const void*)((const char*)(vtx_buffer + pcmd->VtxOffset) + offsetof(ImDrawVert, uv)); + const SDL_Color* color = (const SDL_Color*)(const void*)((const char*)(vtx_buffer + pcmd->VtxOffset) + offsetof(ImDrawVert, col)); // SDL 2.0.19+ // Bind texture, Draw SDL_Texture* tex = (SDL_Texture*)pcmd->GetTexID(); @@ -199,7 +198,7 @@ void ImGui_ImplSDLRenderer3_RenderDrawData(ImDrawData* draw_data) } // Restore modified SDL_Renderer state - SDL_SetRenderViewport(bd->SDLRenderer, &old.Viewport); + SDL_SetRenderViewport(bd->SDLRenderer, old.ViewportEnabled ? &old.Viewport : nullptr); SDL_SetRenderClipRect(bd->SDLRenderer, old.ClipEnabled ? &old.ClipRect : nullptr); } diff --git a/cimgui/imgui/backends/imgui_impl_vulkan.cpp b/cimgui/imgui/backends/imgui_impl_vulkan.cpp index c75ceb3aa..e7f7c8d82 100644 --- a/cimgui/imgui/backends/imgui_impl_vulkan.cpp +++ b/cimgui/imgui/backends/imgui_impl_vulkan.cpp @@ -34,7 +34,19 @@ // CHANGELOG // (minor and older changes stripped away, please see git history for details) -// 2023-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface. +// 2024-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface. +// 2024-02-14: *BREAKING CHANGE*: Moved RenderPass parameter from ImGui_ImplVulkan_Init() function to ImGui_ImplVulkan_InitInfo structure. Not required when using dynamic rendering. +// 2024-02-12: *BREAKING CHANGE*: Dynamic rendering now require filling PipelineRenderingCreateInfo structure. +// 2024-01-19: Vulkan: Fixed vkAcquireNextImageKHR() validation errors in VulkanSDK 1.3.275 by allocating one extra semaphore than in-flight frames. (#7236) +// 2024-01-11: Vulkan: Fixed vkMapMemory() calls unnecessarily using full buffer size (#3957). Fixed MinAllocationSize handing (#7189). +// 2024-01-03: Vulkan: Added MinAllocationSize field in ImGui_ImplVulkan_InitInfo to workaround zealous "best practice" validation layer. (#7189, #4238) +// 2024-01-03: Vulkan: Stopped creating command pools with VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT as we don't reset them. +// 2023-11-29: Vulkan: Fixed mismatching allocator passed to vkCreateCommandPool() vs vkDestroyCommandPool(). (#7075) +// 2023-11-10: *BREAKING CHANGE*: Removed parameter from ImGui_ImplVulkan_CreateFontsTexture(): backend now creates its own command-buffer to upload fonts. +// *BREAKING CHANGE*: Removed ImGui_ImplVulkan_DestroyFontUploadObjects() which is now unecessary as we create and destroy those objects in the backend. +// ImGui_ImplVulkan_CreateFontsTexture() is automatically called by NewFrame() the first time. +// You can call ImGui_ImplVulkan_CreateFontsTexture() again to recreate the font atlas texture. +// Added ImGui_ImplVulkan_DestroyFontsTexture() but you probably never need to call this. // 2023-07-04: Vulkan: Added optional support for VK_KHR_dynamic_rendering. User needs to set init_info->UseDynamicRendering = true and init_info->ColorAttachmentFormat. // 2023-01-02: Vulkan: Fixed sampler passed to ImGui_ImplVulkan_AddTexture() not being honored + removed a bunch of duplicate code. // 2022-10-11: Using 'nullptr' instead of 'NULL' as per our switch to C++11. @@ -75,85 +87,24 @@ #ifndef IMGUI_DISABLE #include "imgui_impl_vulkan.h" #include +#ifndef IM_MAX +#define IM_MAX(A, B) (((A) >= (B)) ? (A) : (B)) +#endif // Visual Studio warnings #ifdef _MSC_VER #pragma warning (disable: 4127) // condition expression is constant #endif -// Reusable buffers used for rendering 1 current in-flight frame, for ImGui_ImplVulkan_RenderDrawData() -// [Please zero-clear before use!] -struct ImGui_ImplVulkanH_FrameRenderBuffers -{ - VkDeviceMemory VertexBufferMemory; - VkDeviceMemory IndexBufferMemory; - VkDeviceSize VertexBufferSize; - VkDeviceSize IndexBufferSize; - VkBuffer VertexBuffer; - VkBuffer IndexBuffer; -}; - -// Each viewport will hold 1 ImGui_ImplVulkanH_WindowRenderBuffers -// [Please zero-clear before use!] -struct ImGui_ImplVulkanH_WindowRenderBuffers -{ - uint32_t Index; - uint32_t Count; - ImGui_ImplVulkanH_FrameRenderBuffers* FrameRenderBuffers; -}; - -// For multi-viewport support: -// Helper structure we store in the void* RendererUserData field of each ImGuiViewport to easily retrieve our backend data. -struct ImGui_ImplVulkan_ViewportData -{ - bool WindowOwned; - ImGui_ImplVulkanH_Window Window; // Used by secondary viewports only - ImGui_ImplVulkanH_WindowRenderBuffers RenderBuffers; // Used by all viewports - - ImGui_ImplVulkan_ViewportData() { WindowOwned = false; memset(&RenderBuffers, 0, sizeof(RenderBuffers)); } - ~ImGui_ImplVulkan_ViewportData() { } -}; - -// Vulkan data -struct ImGui_ImplVulkan_Data -{ - ImGui_ImplVulkan_InitInfo VulkanInitInfo; - VkRenderPass RenderPass; - VkDeviceSize BufferMemoryAlignment; - VkPipelineCreateFlags PipelineCreateFlags; - VkDescriptorSetLayout DescriptorSetLayout; - VkPipelineLayout PipelineLayout; - VkPipeline Pipeline; - uint32_t Subpass; - VkShaderModule ShaderModuleVert; - VkShaderModule ShaderModuleFrag; - - // Font data - VkSampler FontSampler; - VkDeviceMemory FontMemory; - VkImage FontImage; - VkImageView FontView; - VkDescriptorSet FontDescriptorSet; - VkDeviceMemory UploadBufferMemory; - VkBuffer UploadBuffer; - - // Render buffers for main window - ImGui_ImplVulkanH_WindowRenderBuffers MainWindowRenderBuffers; - - ImGui_ImplVulkan_Data() - { - memset((void*)this, 0, sizeof(*this)); - BufferMemoryAlignment = 256; - } -}; - // Forward Declarations +struct ImGui_ImplVulkan_FrameRenderBuffers; +struct ImGui_ImplVulkan_WindowRenderBuffers; bool ImGui_ImplVulkan_CreateDeviceObjects(); void ImGui_ImplVulkan_DestroyDeviceObjects(); +void ImGui_ImplVulkan_DestroyFrameRenderBuffers(VkDevice device, ImGui_ImplVulkan_FrameRenderBuffers* buffers, const VkAllocationCallbacks* allocator); +void ImGui_ImplVulkan_DestroyWindowRenderBuffers(VkDevice device, ImGui_ImplVulkan_WindowRenderBuffers* buffers, const VkAllocationCallbacks* allocator); void ImGui_ImplVulkanH_DestroyFrame(VkDevice device, ImGui_ImplVulkanH_Frame* fd, const VkAllocationCallbacks* allocator); void ImGui_ImplVulkanH_DestroyFrameSemaphores(VkDevice device, ImGui_ImplVulkanH_FrameSemaphores* fsd, const VkAllocationCallbacks* allocator); -void ImGui_ImplVulkanH_DestroyFrameRenderBuffers(VkDevice device, ImGui_ImplVulkanH_FrameRenderBuffers* buffers, const VkAllocationCallbacks* allocator); -void ImGui_ImplVulkanH_DestroyWindowRenderBuffers(VkDevice device, ImGui_ImplVulkanH_WindowRenderBuffers* buffers, const VkAllocationCallbacks* allocator); void ImGui_ImplVulkanH_DestroyAllViewportsRenderBuffers(VkDevice device, const VkAllocationCallbacks* allocator); void ImGui_ImplVulkanH_CreateWindowSwapChain(VkPhysicalDevice physical_device, VkDevice device, ImGui_ImplVulkanH_Window* wd, const VkAllocationCallbacks* allocator, int w, int h, uint32_t min_image_count); void ImGui_ImplVulkanH_CreateWindowCommandBuffers(VkPhysicalDevice physical_device, VkDevice device, ImGui_ImplVulkanH_Window* wd, uint32_t queue_family, const VkAllocationCallbacks* allocator); @@ -170,14 +121,18 @@ static bool g_FunctionsLoaded = true; IMGUI_VULKAN_FUNC_MAP_MACRO(vkAllocateCommandBuffers) \ IMGUI_VULKAN_FUNC_MAP_MACRO(vkAllocateDescriptorSets) \ IMGUI_VULKAN_FUNC_MAP_MACRO(vkAllocateMemory) \ + IMGUI_VULKAN_FUNC_MAP_MACRO(vkAcquireNextImageKHR) \ + IMGUI_VULKAN_FUNC_MAP_MACRO(vkBeginCommandBuffer) \ IMGUI_VULKAN_FUNC_MAP_MACRO(vkBindBufferMemory) \ IMGUI_VULKAN_FUNC_MAP_MACRO(vkBindImageMemory) \ + IMGUI_VULKAN_FUNC_MAP_MACRO(vkCmdBeginRenderPass) \ IMGUI_VULKAN_FUNC_MAP_MACRO(vkCmdBindDescriptorSets) \ IMGUI_VULKAN_FUNC_MAP_MACRO(vkCmdBindIndexBuffer) \ IMGUI_VULKAN_FUNC_MAP_MACRO(vkCmdBindPipeline) \ IMGUI_VULKAN_FUNC_MAP_MACRO(vkCmdBindVertexBuffers) \ IMGUI_VULKAN_FUNC_MAP_MACRO(vkCmdCopyBufferToImage) \ IMGUI_VULKAN_FUNC_MAP_MACRO(vkCmdDrawIndexed) \ + IMGUI_VULKAN_FUNC_MAP_MACRO(vkCmdEndRenderPass) \ IMGUI_VULKAN_FUNC_MAP_MACRO(vkCmdPipelineBarrier) \ IMGUI_VULKAN_FUNC_MAP_MACRO(vkCmdPushConstants) \ IMGUI_VULKAN_FUNC_MAP_MACRO(vkCmdSetScissor) \ @@ -212,6 +167,7 @@ static bool g_FunctionsLoaded = true; IMGUI_VULKAN_FUNC_MAP_MACRO(vkDestroySurfaceKHR) \ IMGUI_VULKAN_FUNC_MAP_MACRO(vkDestroySwapchainKHR) \ IMGUI_VULKAN_FUNC_MAP_MACRO(vkDeviceWaitIdle) \ + IMGUI_VULKAN_FUNC_MAP_MACRO(vkEndCommandBuffer) \ IMGUI_VULKAN_FUNC_MAP_MACRO(vkFlushMappedMemoryRanges) \ IMGUI_VULKAN_FUNC_MAP_MACRO(vkFreeCommandBuffers) \ IMGUI_VULKAN_FUNC_MAP_MACRO(vkFreeDescriptorSets) \ @@ -222,21 +178,17 @@ static bool g_FunctionsLoaded = true; IMGUI_VULKAN_FUNC_MAP_MACRO(vkGetPhysicalDeviceSurfaceCapabilitiesKHR) \ IMGUI_VULKAN_FUNC_MAP_MACRO(vkGetPhysicalDeviceSurfaceFormatsKHR) \ IMGUI_VULKAN_FUNC_MAP_MACRO(vkGetPhysicalDeviceSurfacePresentModesKHR) \ + IMGUI_VULKAN_FUNC_MAP_MACRO(vkGetPhysicalDeviceSurfaceSupportKHR) \ IMGUI_VULKAN_FUNC_MAP_MACRO(vkGetSwapchainImagesKHR) \ IMGUI_VULKAN_FUNC_MAP_MACRO(vkMapMemory) \ - IMGUI_VULKAN_FUNC_MAP_MACRO(vkUnmapMemory) \ - IMGUI_VULKAN_FUNC_MAP_MACRO(vkUpdateDescriptorSets) \ - IMGUI_VULKAN_FUNC_MAP_MACRO(vkGetPhysicalDeviceSurfaceSupportKHR) \ - IMGUI_VULKAN_FUNC_MAP_MACRO(vkWaitForFences) \ - IMGUI_VULKAN_FUNC_MAP_MACRO(vkCmdBeginRenderPass) \ - IMGUI_VULKAN_FUNC_MAP_MACRO(vkCmdEndRenderPass) \ IMGUI_VULKAN_FUNC_MAP_MACRO(vkQueuePresentKHR) \ - IMGUI_VULKAN_FUNC_MAP_MACRO(vkBeginCommandBuffer) \ - IMGUI_VULKAN_FUNC_MAP_MACRO(vkEndCommandBuffer) \ - IMGUI_VULKAN_FUNC_MAP_MACRO(vkResetFences) \ IMGUI_VULKAN_FUNC_MAP_MACRO(vkQueueSubmit) \ + IMGUI_VULKAN_FUNC_MAP_MACRO(vkQueueWaitIdle) \ IMGUI_VULKAN_FUNC_MAP_MACRO(vkResetCommandPool) \ - IMGUI_VULKAN_FUNC_MAP_MACRO(vkAcquireNextImageKHR) + IMGUI_VULKAN_FUNC_MAP_MACRO(vkResetFences) \ + IMGUI_VULKAN_FUNC_MAP_MACRO(vkUnmapMemory) \ + IMGUI_VULKAN_FUNC_MAP_MACRO(vkUpdateDescriptorSets) \ + IMGUI_VULKAN_FUNC_MAP_MACRO(vkWaitForFences) // Define function pointers #define IMGUI_VULKAN_FUNC_DEF(func) static PFN_##func func; @@ -244,12 +196,75 @@ IMGUI_VULKAN_FUNC_MAP(IMGUI_VULKAN_FUNC_DEF) #undef IMGUI_VULKAN_FUNC_DEF #endif // VK_NO_PROTOTYPES -#if defined(VK_VERSION_1_3) || defined(VK_KHR_dynamic_rendering) -#define IMGUI_IMPL_VULKAN_HAS_DYNAMIC_RENDERING +#ifdef IMGUI_IMPL_VULKAN_HAS_DYNAMIC_RENDERING static PFN_vkCmdBeginRenderingKHR ImGuiImplVulkanFuncs_vkCmdBeginRenderingKHR; static PFN_vkCmdEndRenderingKHR ImGuiImplVulkanFuncs_vkCmdEndRenderingKHR; #endif +// Reusable buffers used for rendering 1 current in-flight frame, for ImGui_ImplVulkan_RenderDrawData() +// [Please zero-clear before use!] +struct ImGui_ImplVulkan_FrameRenderBuffers +{ + VkDeviceMemory VertexBufferMemory; + VkDeviceMemory IndexBufferMemory; + VkDeviceSize VertexBufferSize; + VkDeviceSize IndexBufferSize; + VkBuffer VertexBuffer; + VkBuffer IndexBuffer; +}; + +// Each viewport will hold 1 ImGui_ImplVulkanH_WindowRenderBuffers +// [Please zero-clear before use!] +struct ImGui_ImplVulkan_WindowRenderBuffers +{ + uint32_t Index; + uint32_t Count; + ImGui_ImplVulkan_FrameRenderBuffers* FrameRenderBuffers; +}; + +// For multi-viewport support: +// Helper structure we store in the void* RendererUserData field of each ImGuiViewport to easily retrieve our backend data. +struct ImGui_ImplVulkan_ViewportData +{ + bool WindowOwned; + ImGui_ImplVulkanH_Window Window; // Used by secondary viewports only + ImGui_ImplVulkan_WindowRenderBuffers RenderBuffers; // Used by all viewports + + ImGui_ImplVulkan_ViewportData() { WindowOwned = false; memset(&RenderBuffers, 0, sizeof(RenderBuffers)); } + ~ImGui_ImplVulkan_ViewportData() { } +}; + +// Vulkan data +struct ImGui_ImplVulkan_Data +{ + ImGui_ImplVulkan_InitInfo VulkanInitInfo; + VkDeviceSize BufferMemoryAlignment; + VkPipelineCreateFlags PipelineCreateFlags; + VkDescriptorSetLayout DescriptorSetLayout; + VkPipelineLayout PipelineLayout; + VkPipeline Pipeline; + VkShaderModule ShaderModuleVert; + VkShaderModule ShaderModuleFrag; + + // Font data + VkSampler FontSampler; + VkDeviceMemory FontMemory; + VkImage FontImage; + VkImageView FontView; + VkDescriptorSet FontDescriptorSet; + VkCommandPool FontCommandPool; + VkCommandBuffer FontCommandBuffer; + + // Render buffers for main window + ImGui_ImplVulkan_WindowRenderBuffers MainWindowRenderBuffers; + + ImGui_ImplVulkan_Data() + { + memset((void*)this, 0, sizeof(*this)); + BufferMemoryAlignment = 256; + } +}; + //----------------------------------------------------------------------------- // SHADERS //----------------------------------------------------------------------------- @@ -258,7 +273,7 @@ static PFN_vkCmdEndRenderingKHR ImGuiImplVulkanFuncs_vkCmdEndRenderingKHR; static void ImGui_ImplVulkan_InitPlatformInterface(); static void ImGui_ImplVulkan_ShutdownPlatformInterface(); -// glsl_shader.vert, compiled with: +// backends/vulkan/glsl_shader.vert, compiled with: // # glslangValidator -V -x -o glsl_shader.vert.u32 glsl_shader.vert /* #version 450 core @@ -322,7 +337,7 @@ static uint32_t __glsl_shader_vert_spv[] = 0x0000002d,0x0000002c,0x000100fd,0x00010038 }; -// glsl_shader.frag, compiled with: +// backends/vulkan/glsl_shader.frag, compiled with: // # glslangValidator -V -x -o glsl_shader.frag.u32 glsl_shader.frag /* #version 450 core @@ -397,7 +412,13 @@ static void check_vk_result(VkResult err) v->CheckVkResultFn(err); } -static void CreateOrResizeBuffer(VkBuffer& buffer, VkDeviceMemory& buffer_memory, VkDeviceSize& p_buffer_size, size_t new_size, VkBufferUsageFlagBits usage) +// Same as IM_MEMALIGN(). 'alignment' must be a power of two. +static inline VkDeviceSize AlignBufferSize(VkDeviceSize size, VkDeviceSize alignment) +{ + return (size + alignment - 1) & ~(alignment - 1); +} + +static void CreateOrResizeBuffer(VkBuffer& buffer, VkDeviceMemory& buffer_memory, VkDeviceSize& buffer_size, size_t new_size, VkBufferUsageFlagBits usage) { ImGui_ImplVulkan_Data* bd = ImGui_ImplVulkan_GetBackendData(); ImGui_ImplVulkan_InitInfo* v = &bd->VulkanInitInfo; @@ -407,10 +428,10 @@ static void CreateOrResizeBuffer(VkBuffer& buffer, VkDeviceMemory& buffer_memory if (buffer_memory != VK_NULL_HANDLE) vkFreeMemory(v->Device, buffer_memory, v->Allocator); - VkDeviceSize vertex_buffer_size_aligned = ((new_size - 1) / bd->BufferMemoryAlignment + 1) * bd->BufferMemoryAlignment; + VkDeviceSize buffer_size_aligned = AlignBufferSize(IM_MAX(v->MinAllocationSize, new_size), bd->BufferMemoryAlignment); VkBufferCreateInfo buffer_info = {}; buffer_info.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO; - buffer_info.size = vertex_buffer_size_aligned; + buffer_info.size = buffer_size_aligned; buffer_info.usage = usage; buffer_info.sharingMode = VK_SHARING_MODE_EXCLUSIVE; err = vkCreateBuffer(v->Device, &buffer_info, v->Allocator, &buffer); @@ -428,10 +449,10 @@ static void CreateOrResizeBuffer(VkBuffer& buffer, VkDeviceMemory& buffer_memory err = vkBindBufferMemory(v->Device, buffer, buffer_memory, 0); check_vk_result(err); - p_buffer_size = req.size; + buffer_size = buffer_size_aligned; } -static void ImGui_ImplVulkan_SetupRenderState(ImDrawData* draw_data, VkPipeline pipeline, VkCommandBuffer command_buffer, ImGui_ImplVulkanH_FrameRenderBuffers* rb, int fb_width, int fb_height) +static void ImGui_ImplVulkan_SetupRenderState(ImDrawData* draw_data, VkPipeline pipeline, VkCommandBuffer command_buffer, ImGui_ImplVulkan_FrameRenderBuffers* rb, int fb_width, int fb_height) { ImGui_ImplVulkan_Data* bd = ImGui_ImplVulkan_GetBackendData(); @@ -492,23 +513,23 @@ void ImGui_ImplVulkan_RenderDrawData(ImDrawData* draw_data, VkCommandBuffer comm // Allocate array to store enough vertex/index buffers. Each unique viewport gets its own storage. ImGui_ImplVulkan_ViewportData* viewport_renderer_data = (ImGui_ImplVulkan_ViewportData*)draw_data->OwnerViewport->RendererUserData; IM_ASSERT(viewport_renderer_data != nullptr); - ImGui_ImplVulkanH_WindowRenderBuffers* wrb = &viewport_renderer_data->RenderBuffers; + ImGui_ImplVulkan_WindowRenderBuffers* wrb = &viewport_renderer_data->RenderBuffers; if (wrb->FrameRenderBuffers == nullptr) { wrb->Index = 0; wrb->Count = v->ImageCount; - wrb->FrameRenderBuffers = (ImGui_ImplVulkanH_FrameRenderBuffers*)IM_ALLOC(sizeof(ImGui_ImplVulkanH_FrameRenderBuffers) * wrb->Count); - memset(wrb->FrameRenderBuffers, 0, sizeof(ImGui_ImplVulkanH_FrameRenderBuffers) * wrb->Count); + wrb->FrameRenderBuffers = (ImGui_ImplVulkan_FrameRenderBuffers*)IM_ALLOC(sizeof(ImGui_ImplVulkan_FrameRenderBuffers) * wrb->Count); + memset(wrb->FrameRenderBuffers, 0, sizeof(ImGui_ImplVulkan_FrameRenderBuffers) * wrb->Count); } IM_ASSERT(wrb->Count == v->ImageCount); wrb->Index = (wrb->Index + 1) % wrb->Count; - ImGui_ImplVulkanH_FrameRenderBuffers* rb = &wrb->FrameRenderBuffers[wrb->Index]; + ImGui_ImplVulkan_FrameRenderBuffers* rb = &wrb->FrameRenderBuffers[wrb->Index]; if (draw_data->TotalVtxCount > 0) { // Create or resize the vertex/index buffers - size_t vertex_size = draw_data->TotalVtxCount * sizeof(ImDrawVert); - size_t index_size = draw_data->TotalIdxCount * sizeof(ImDrawIdx); + size_t vertex_size = AlignBufferSize(draw_data->TotalVtxCount * sizeof(ImDrawVert), bd->BufferMemoryAlignment); + size_t index_size = AlignBufferSize(draw_data->TotalIdxCount * sizeof(ImDrawIdx), bd->BufferMemoryAlignment); if (rb->VertexBuffer == VK_NULL_HANDLE || rb->VertexBufferSize < vertex_size) CreateOrResizeBuffer(rb->VertexBuffer, rb->VertexBufferMemory, rb->VertexBufferSize, vertex_size, VK_BUFFER_USAGE_VERTEX_BUFFER_BIT); if (rb->IndexBuffer == VK_NULL_HANDLE || rb->IndexBufferSize < index_size) @@ -517,9 +538,9 @@ void ImGui_ImplVulkan_RenderDrawData(ImDrawData* draw_data, VkCommandBuffer comm // Upload vertex/index data into a single contiguous GPU buffer ImDrawVert* vtx_dst = nullptr; ImDrawIdx* idx_dst = nullptr; - VkResult err = vkMapMemory(v->Device, rb->VertexBufferMemory, 0, rb->VertexBufferSize, 0, (void**)(&vtx_dst)); + VkResult err = vkMapMemory(v->Device, rb->VertexBufferMemory, 0, vertex_size, 0, (void**)&vtx_dst); check_vk_result(err); - err = vkMapMemory(v->Device, rb->IndexBufferMemory, 0, rb->IndexBufferSize, 0, (void**)(&idx_dst)); + err = vkMapMemory(v->Device, rb->IndexBufferMemory, 0, index_size, 0, (void**)&idx_dst); check_vk_result(err); for (int n = 0; n < draw_data->CmdListsCount; n++) { @@ -619,19 +640,55 @@ void ImGui_ImplVulkan_RenderDrawData(ImDrawData* draw_data, VkCommandBuffer comm vkCmdSetScissor(command_buffer, 0, 1, &scissor); } -bool ImGui_ImplVulkan_CreateFontsTexture(VkCommandBuffer command_buffer) +bool ImGui_ImplVulkan_CreateFontsTexture() { ImGuiIO& io = ImGui::GetIO(); ImGui_ImplVulkan_Data* bd = ImGui_ImplVulkan_GetBackendData(); ImGui_ImplVulkan_InitInfo* v = &bd->VulkanInitInfo; + VkResult err; + + // Destroy existing texture (if any) + if (bd->FontView || bd->FontImage || bd->FontMemory || bd->FontDescriptorSet) + { + vkQueueWaitIdle(v->Queue); + ImGui_ImplVulkan_DestroyFontsTexture(); + } + + // Create command pool/buffer + if (bd->FontCommandPool == VK_NULL_HANDLE) + { + VkCommandPoolCreateInfo info = {}; + info.sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO; + info.flags = 0; + info.queueFamilyIndex = v->QueueFamily; + vkCreateCommandPool(v->Device, &info, v->Allocator, &bd->FontCommandPool); + } + if (bd->FontCommandBuffer == VK_NULL_HANDLE) + { + VkCommandBufferAllocateInfo info = {}; + info.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO; + info.commandPool = bd->FontCommandPool; + info.commandBufferCount = 1; + err = vkAllocateCommandBuffers(v->Device, &info, &bd->FontCommandBuffer); + check_vk_result(err); + } + + // Start command buffer + { + err = vkResetCommandPool(v->Device, bd->FontCommandPool, 0); + check_vk_result(err); + VkCommandBufferBeginInfo begin_info = {}; + begin_info.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO; + begin_info.flags |= VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT; + err = vkBeginCommandBuffer(bd->FontCommandBuffer, &begin_info); + check_vk_result(err); + } unsigned char* pixels; int width, height; io.Fonts->GetTexDataAsRGBA32(&pixels, &width, &height); size_t upload_size = width * height * 4 * sizeof(char); - VkResult err; - // Create the Image: { VkImageCreateInfo info = {}; @@ -654,7 +711,7 @@ bool ImGui_ImplVulkan_CreateFontsTexture(VkCommandBuffer command_buffer) vkGetImageMemoryRequirements(v->Device, bd->FontImage, &req); VkMemoryAllocateInfo alloc_info = {}; alloc_info.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO; - alloc_info.allocationSize = req.size; + alloc_info.allocationSize = IM_MAX(v->MinAllocationSize, req.size); alloc_info.memoryTypeIndex = ImGui_ImplVulkan_MemoryType(VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, req.memoryTypeBits); err = vkAllocateMemory(v->Device, &alloc_info, v->Allocator, &bd->FontMemory); check_vk_result(err); @@ -680,40 +737,42 @@ bool ImGui_ImplVulkan_CreateFontsTexture(VkCommandBuffer command_buffer) bd->FontDescriptorSet = (VkDescriptorSet)ImGui_ImplVulkan_AddTexture(bd->FontSampler, bd->FontView, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL); // Create the Upload Buffer: + VkDeviceMemory upload_buffer_memory; + VkBuffer upload_buffer; { VkBufferCreateInfo buffer_info = {}; buffer_info.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO; buffer_info.size = upload_size; buffer_info.usage = VK_BUFFER_USAGE_TRANSFER_SRC_BIT; buffer_info.sharingMode = VK_SHARING_MODE_EXCLUSIVE; - err = vkCreateBuffer(v->Device, &buffer_info, v->Allocator, &bd->UploadBuffer); + err = vkCreateBuffer(v->Device, &buffer_info, v->Allocator, &upload_buffer); check_vk_result(err); VkMemoryRequirements req; - vkGetBufferMemoryRequirements(v->Device, bd->UploadBuffer, &req); + vkGetBufferMemoryRequirements(v->Device, upload_buffer, &req); bd->BufferMemoryAlignment = (bd->BufferMemoryAlignment > req.alignment) ? bd->BufferMemoryAlignment : req.alignment; VkMemoryAllocateInfo alloc_info = {}; alloc_info.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO; - alloc_info.allocationSize = req.size; + alloc_info.allocationSize = IM_MAX(v->MinAllocationSize, req.size); alloc_info.memoryTypeIndex = ImGui_ImplVulkan_MemoryType(VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT, req.memoryTypeBits); - err = vkAllocateMemory(v->Device, &alloc_info, v->Allocator, &bd->UploadBufferMemory); + err = vkAllocateMemory(v->Device, &alloc_info, v->Allocator, &upload_buffer_memory); check_vk_result(err); - err = vkBindBufferMemory(v->Device, bd->UploadBuffer, bd->UploadBufferMemory, 0); + err = vkBindBufferMemory(v->Device, upload_buffer, upload_buffer_memory, 0); check_vk_result(err); } // Upload to Buffer: { char* map = nullptr; - err = vkMapMemory(v->Device, bd->UploadBufferMemory, 0, upload_size, 0, (void**)(&map)); + err = vkMapMemory(v->Device, upload_buffer_memory, 0, upload_size, 0, (void**)(&map)); check_vk_result(err); memcpy(map, pixels, upload_size); VkMappedMemoryRange range[1] = {}; range[0].sType = VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE; - range[0].memory = bd->UploadBufferMemory; + range[0].memory = upload_buffer_memory; range[0].size = upload_size; err = vkFlushMappedMemoryRanges(v->Device, 1, range); check_vk_result(err); - vkUnmapMemory(v->Device, bd->UploadBufferMemory); + vkUnmapMemory(v->Device, upload_buffer_memory); } // Copy to Image: @@ -729,7 +788,7 @@ bool ImGui_ImplVulkan_CreateFontsTexture(VkCommandBuffer command_buffer) copy_barrier[0].subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; copy_barrier[0].subresourceRange.levelCount = 1; copy_barrier[0].subresourceRange.layerCount = 1; - vkCmdPipelineBarrier(command_buffer, VK_PIPELINE_STAGE_HOST_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 0, nullptr, 0, nullptr, 1, copy_barrier); + vkCmdPipelineBarrier(bd->FontCommandBuffer, VK_PIPELINE_STAGE_HOST_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 0, nullptr, 0, nullptr, 1, copy_barrier); VkBufferImageCopy region = {}; region.imageSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; @@ -737,7 +796,7 @@ bool ImGui_ImplVulkan_CreateFontsTexture(VkCommandBuffer command_buffer) region.imageExtent.width = width; region.imageExtent.height = height; region.imageExtent.depth = 1; - vkCmdCopyBufferToImage(command_buffer, bd->UploadBuffer, bd->FontImage, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 1, ®ion); + vkCmdCopyBufferToImage(bd->FontCommandBuffer, upload_buffer, bd->FontImage, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 1, ®ion); VkImageMemoryBarrier use_barrier[1] = {}; use_barrier[0].sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER; @@ -751,15 +810,50 @@ bool ImGui_ImplVulkan_CreateFontsTexture(VkCommandBuffer command_buffer) use_barrier[0].subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; use_barrier[0].subresourceRange.levelCount = 1; use_barrier[0].subresourceRange.layerCount = 1; - vkCmdPipelineBarrier(command_buffer, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, 0, 0, nullptr, 0, nullptr, 1, use_barrier); + vkCmdPipelineBarrier(bd->FontCommandBuffer, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, 0, 0, nullptr, 0, nullptr, 1, use_barrier); } // Store our identifier io.Fonts->SetTexID((ImTextureID)bd->FontDescriptorSet); + // End command buffer + VkSubmitInfo end_info = {}; + end_info.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO; + end_info.commandBufferCount = 1; + end_info.pCommandBuffers = &bd->FontCommandBuffer; + err = vkEndCommandBuffer(bd->FontCommandBuffer); + check_vk_result(err); + err = vkQueueSubmit(v->Queue, 1, &end_info, VK_NULL_HANDLE); + check_vk_result(err); + + err = vkQueueWaitIdle(v->Queue); + check_vk_result(err); + + vkDestroyBuffer(v->Device, upload_buffer, v->Allocator); + vkFreeMemory(v->Device, upload_buffer_memory, v->Allocator); + return true; } +// You probably never need to call this, as it is called by ImGui_ImplVulkan_CreateFontsTexture() and ImGui_ImplVulkan_Shutdown(). +void ImGui_ImplVulkan_DestroyFontsTexture() +{ + ImGuiIO& io = ImGui::GetIO(); + ImGui_ImplVulkan_Data* bd = ImGui_ImplVulkan_GetBackendData(); + ImGui_ImplVulkan_InitInfo* v = &bd->VulkanInitInfo; + + if (bd->FontDescriptorSet) + { + ImGui_ImplVulkan_RemoveTexture(bd->FontDescriptorSet); + bd->FontDescriptorSet = VK_NULL_HANDLE; + io.Fonts->SetTexID(0); + } + + if (bd->FontView) { vkDestroyImageView(v->Device, bd->FontView, v->Allocator); bd->FontView = VK_NULL_HANDLE; } + if (bd->FontImage) { vkDestroyImage(v->Device, bd->FontImage, v->Allocator); bd->FontImage = VK_NULL_HANDLE; } + if (bd->FontMemory) { vkFreeMemory(v->Device, bd->FontMemory, v->Allocator); bd->FontMemory = VK_NULL_HANDLE; } +} + static void ImGui_ImplVulkan_CreateShaderModules(VkDevice device, const VkAllocationCallbacks* allocator) { // Create the shader modules @@ -807,15 +901,15 @@ static void ImGui_ImplVulkan_CreatePipeline(VkDevice device, const VkAllocationC attribute_desc[0].location = 0; attribute_desc[0].binding = binding_desc[0].binding; attribute_desc[0].format = VK_FORMAT_R32G32_SFLOAT; - attribute_desc[0].offset = IM_OFFSETOF(ImDrawVert, pos); + attribute_desc[0].offset = offsetof(ImDrawVert, pos); attribute_desc[1].location = 1; attribute_desc[1].binding = binding_desc[0].binding; attribute_desc[1].format = VK_FORMAT_R32G32_SFLOAT; - attribute_desc[1].offset = IM_OFFSETOF(ImDrawVert, uv); + attribute_desc[1].offset = offsetof(ImDrawVert, uv); attribute_desc[2].location = 2; attribute_desc[2].binding = binding_desc[0].binding; attribute_desc[2].format = VK_FORMAT_R8G8B8A8_UNORM; - attribute_desc[2].offset = IM_OFFSETOF(ImDrawVert, col); + attribute_desc[2].offset = offsetof(ImDrawVert, col); VkPipelineVertexInputStateCreateInfo vertex_info = {}; vertex_info.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO; @@ -886,13 +980,11 @@ static void ImGui_ImplVulkan_CreatePipeline(VkDevice device, const VkAllocationC info.subpass = subpass; #ifdef IMGUI_IMPL_VULKAN_HAS_DYNAMIC_RENDERING - VkPipelineRenderingCreateInfoKHR pipelineRenderingCreateInfo = {}; - pipelineRenderingCreateInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO_KHR; - pipelineRenderingCreateInfo.colorAttachmentCount = 1; - pipelineRenderingCreateInfo.pColorAttachmentFormats = &bd->VulkanInitInfo.ColorAttachmentFormat; if (bd->VulkanInitInfo.UseDynamicRendering) { - info.pNext = &pipelineRenderingCreateInfo; + IM_ASSERT(bd->VulkanInitInfo.PipelineRenderingCreateInfo.sType == VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO_KHR && "PipelineRenderingCreateInfo sType must be VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO_KHR"); + IM_ASSERT(bd->VulkanInitInfo.PipelineRenderingCreateInfo.pNext == nullptr && "PipelineRenderingCreateInfo pNext must be NULL"); + info.pNext = &bd->VulkanInitInfo.PipelineRenderingCreateInfo; info.renderPass = VK_NULL_HANDLE; // Just make sure it's actually nullptr. } #endif @@ -957,39 +1049,22 @@ bool ImGui_ImplVulkan_CreateDeviceObjects() check_vk_result(err); } - ImGui_ImplVulkan_CreatePipeline(v->Device, v->Allocator, v->PipelineCache, bd->RenderPass, v->MSAASamples, &bd->Pipeline, bd->Subpass); + ImGui_ImplVulkan_CreatePipeline(v->Device, v->Allocator, v->PipelineCache, v->RenderPass, v->MSAASamples, &bd->Pipeline, v->Subpass); return true; } -void ImGui_ImplVulkan_DestroyFontUploadObjects() -{ - ImGui_ImplVulkan_Data* bd = ImGui_ImplVulkan_GetBackendData(); - ImGui_ImplVulkan_InitInfo* v = &bd->VulkanInitInfo; - if (bd->UploadBuffer) - { - vkDestroyBuffer(v->Device, bd->UploadBuffer, v->Allocator); - bd->UploadBuffer = VK_NULL_HANDLE; - } - if (bd->UploadBufferMemory) - { - vkFreeMemory(v->Device, bd->UploadBufferMemory, v->Allocator); - bd->UploadBufferMemory = VK_NULL_HANDLE; - } -} - void ImGui_ImplVulkan_DestroyDeviceObjects() { ImGui_ImplVulkan_Data* bd = ImGui_ImplVulkan_GetBackendData(); ImGui_ImplVulkan_InitInfo* v = &bd->VulkanInitInfo; ImGui_ImplVulkanH_DestroyAllViewportsRenderBuffers(v->Device, v->Allocator); - ImGui_ImplVulkan_DestroyFontUploadObjects(); + ImGui_ImplVulkan_DestroyFontsTexture(); + if (bd->FontCommandBuffer) { vkFreeCommandBuffers(v->Device, bd->FontCommandPool, 1, &bd->FontCommandBuffer); bd->FontCommandBuffer = VK_NULL_HANDLE; } + if (bd->FontCommandPool) { vkDestroyCommandPool(v->Device, bd->FontCommandPool, v->Allocator); bd->FontCommandPool = VK_NULL_HANDLE; } if (bd->ShaderModuleVert) { vkDestroyShaderModule(v->Device, bd->ShaderModuleVert, v->Allocator); bd->ShaderModuleVert = VK_NULL_HANDLE; } if (bd->ShaderModuleFrag) { vkDestroyShaderModule(v->Device, bd->ShaderModuleFrag, v->Allocator); bd->ShaderModuleFrag = VK_NULL_HANDLE; } - if (bd->FontView) { vkDestroyImageView(v->Device, bd->FontView, v->Allocator); bd->FontView = VK_NULL_HANDLE; } - if (bd->FontImage) { vkDestroyImage(v->Device, bd->FontImage, v->Allocator); bd->FontImage = VK_NULL_HANDLE; } - if (bd->FontMemory) { vkFreeMemory(v->Device, bd->FontMemory, v->Allocator); bd->FontMemory = VK_NULL_HANDLE; } if (bd->FontSampler) { vkDestroySampler(v->Device, bd->FontSampler, v->Allocator); bd->FontSampler = VK_NULL_HANDLE; } if (bd->DescriptorSetLayout) { vkDestroyDescriptorSetLayout(v->Device, bd->DescriptorSetLayout, v->Allocator); bd->DescriptorSetLayout = VK_NULL_HANDLE; } if (bd->PipelineLayout) { vkDestroyPipelineLayout(v->Device, bd->PipelineLayout, v->Allocator); bd->PipelineLayout = VK_NULL_HANDLE; } @@ -1024,7 +1099,7 @@ bool ImGui_ImplVulkan_LoadFunctions(PFN_vkVoidFunction(*loader_func)(const ch return true; } -bool ImGui_ImplVulkan_Init(ImGui_ImplVulkan_InitInfo* info, VkRenderPass render_pass) +bool ImGui_ImplVulkan_Init(ImGui_ImplVulkan_InitInfo* info) { IM_ASSERT(g_FunctionsLoaded && "Need to call ImGui_ImplVulkan_LoadFunctions() if IMGUI_IMPL_VULKAN_NO_PROTOTYPES or VK_NO_PROTOTYPES are set!"); @@ -1060,11 +1135,9 @@ bool ImGui_ImplVulkan_Init(ImGui_ImplVulkan_InitInfo* info, VkRenderPass rend IM_ASSERT(info->MinImageCount >= 2); IM_ASSERT(info->ImageCount >= info->MinImageCount); if (info->UseDynamicRendering == false) - IM_ASSERT(render_pass != VK_NULL_HANDLE); + IM_ASSERT(info->RenderPass != VK_NULL_HANDLE); bd->VulkanInitInfo = *info; - bd->RenderPass = render_pass; - bd->Subpass = info->Subpass; ImGui_ImplVulkan_CreateDeviceObjects(); @@ -1106,7 +1179,9 @@ void ImGui_ImplVulkan_NewFrame() { ImGui_ImplVulkan_Data* bd = ImGui_ImplVulkan_GetBackendData(); IM_ASSERT(bd != nullptr && "Did you call ImGui_ImplVulkan_Init()?"); - IM_UNUSED(bd); + + if (!bd->FontDescriptorSet) + ImGui_ImplVulkan_CreateFontsTexture(); } void ImGui_ImplVulkan_SetMinImageCount(uint32_t min_image_count) @@ -1168,6 +1243,26 @@ void ImGui_ImplVulkan_RemoveTexture(VkDescriptorSet descriptor_set) vkFreeDescriptorSets(v->Device, v->DescriptorPool, 1, &descriptor_set); } +void ImGui_ImplVulkan_DestroyFrameRenderBuffers(VkDevice device, ImGui_ImplVulkan_FrameRenderBuffers* buffers, const VkAllocationCallbacks* allocator) +{ + if (buffers->VertexBuffer) { vkDestroyBuffer(device, buffers->VertexBuffer, allocator); buffers->VertexBuffer = VK_NULL_HANDLE; } + if (buffers->VertexBufferMemory) { vkFreeMemory(device, buffers->VertexBufferMemory, allocator); buffers->VertexBufferMemory = VK_NULL_HANDLE; } + if (buffers->IndexBuffer) { vkDestroyBuffer(device, buffers->IndexBuffer, allocator); buffers->IndexBuffer = VK_NULL_HANDLE; } + if (buffers->IndexBufferMemory) { vkFreeMemory(device, buffers->IndexBufferMemory, allocator); buffers->IndexBufferMemory = VK_NULL_HANDLE; } + buffers->VertexBufferSize = 0; + buffers->IndexBufferSize = 0; +} + +void ImGui_ImplVulkan_DestroyWindowRenderBuffers(VkDevice device, ImGui_ImplVulkan_WindowRenderBuffers* buffers, const VkAllocationCallbacks* allocator) +{ + for (uint32_t n = 0; n < buffers->Count; n++) + ImGui_ImplVulkan_DestroyFrameRenderBuffers(device, &buffers->FrameRenderBuffers[n], allocator); + IM_FREE(buffers->FrameRenderBuffers); + buffers->FrameRenderBuffers = nullptr; + buffers->Index = 0; + buffers->Count = 0; +} + //------------------------------------------------------------------------- // Internal / Miscellaneous Vulkan Helpers // (Used by example's main.cpp. Used by multi-viewport features. PROBABLY NOT used by your own app.) @@ -1255,19 +1350,17 @@ VkPresentModeKHR ImGui_ImplVulkanH_SelectPresentMode(VkPhysicalDevice physical_d void ImGui_ImplVulkanH_CreateWindowCommandBuffers(VkPhysicalDevice physical_device, VkDevice device, ImGui_ImplVulkanH_Window* wd, uint32_t queue_family, const VkAllocationCallbacks* allocator) { IM_ASSERT(physical_device != VK_NULL_HANDLE && device != VK_NULL_HANDLE); - (void)physical_device; - (void)allocator; + IM_UNUSED(physical_device); // Create Command Buffers VkResult err; for (uint32_t i = 0; i < wd->ImageCount; i++) { ImGui_ImplVulkanH_Frame* fd = &wd->Frames[i]; - ImGui_ImplVulkanH_FrameSemaphores* fsd = &wd->FrameSemaphores[i]; { VkCommandPoolCreateInfo info = {}; info.sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO; - info.flags = VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT; + info.flags = 0; info.queueFamilyIndex = queue_family; err = vkCreateCommandPool(device, &info, allocator, &fd->CommandPool); check_vk_result(err); @@ -1288,6 +1381,11 @@ void ImGui_ImplVulkanH_CreateWindowCommandBuffers(VkPhysicalDevice physical_devi err = vkCreateFence(device, &info, allocator, &fd->Fence); check_vk_result(err); } + } + + for (uint32_t i = 0; i < wd->SemaphoreCount; i++) + { + ImGui_ImplVulkanH_FrameSemaphores* fsd = &wd->FrameSemaphores[i]; { VkSemaphoreCreateInfo info = {}; info.sType = VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO; @@ -1323,10 +1421,9 @@ void ImGui_ImplVulkanH_CreateWindowSwapChain(VkPhysicalDevice physical_device, V // We don't use ImGui_ImplVulkanH_DestroyWindow() because we want to preserve the old swapchain to create the new one. // Destroy old Framebuffer for (uint32_t i = 0; i < wd->ImageCount; i++) - { ImGui_ImplVulkanH_DestroyFrame(device, &wd->Frames[i], allocator); + for (uint32_t i = 0; i < wd->SemaphoreCount; i++) ImGui_ImplVulkanH_DestroyFrameSemaphores(device, &wd->FrameSemaphores[i], allocator); - } IM_FREE(wd->Frames); IM_FREE(wd->FrameSemaphores); wd->Frames = nullptr; @@ -1385,11 +1482,12 @@ void ImGui_ImplVulkanH_CreateWindowSwapChain(VkPhysicalDevice physical_device, V err = vkGetSwapchainImagesKHR(device, wd->Swapchain, &wd->ImageCount, backbuffers); check_vk_result(err); - IM_ASSERT(wd->Frames == nullptr); + IM_ASSERT(wd->Frames == nullptr && wd->FrameSemaphores == nullptr); + wd->SemaphoreCount = wd->ImageCount + 1; wd->Frames = (ImGui_ImplVulkanH_Frame*)IM_ALLOC(sizeof(ImGui_ImplVulkanH_Frame) * wd->ImageCount); - wd->FrameSemaphores = (ImGui_ImplVulkanH_FrameSemaphores*)IM_ALLOC(sizeof(ImGui_ImplVulkanH_FrameSemaphores) * wd->ImageCount); + wd->FrameSemaphores = (ImGui_ImplVulkanH_FrameSemaphores*)IM_ALLOC(sizeof(ImGui_ImplVulkanH_FrameSemaphores) * wd->SemaphoreCount); memset(wd->Frames, 0, sizeof(wd->Frames[0]) * wd->ImageCount); - memset(wd->FrameSemaphores, 0, sizeof(wd->FrameSemaphores[0]) * wd->ImageCount); + memset(wd->FrameSemaphores, 0, sizeof(wd->FrameSemaphores[0]) * wd->SemaphoreCount); for (uint32_t i = 0; i < wd->ImageCount; i++) wd->Frames[i].Backbuffer = backbuffers[i]; } @@ -1435,7 +1533,7 @@ void ImGui_ImplVulkanH_CreateWindowSwapChain(VkPhysicalDevice physical_device, V // We do not create a pipeline by default as this is also used by examples' main.cpp, // but secondary viewport in multi-viewport mode may want to create one with: - //ImGui_ImplVulkan_CreatePipeline(device, allocator, VK_NULL_HANDLE, wd->RenderPass, VK_SAMPLE_COUNT_1_BIT, &wd->Pipeline, bd->Subpass); + //ImGui_ImplVulkan_CreatePipeline(device, allocator, VK_NULL_HANDLE, wd->RenderPass, VK_SAMPLE_COUNT_1_BIT, &wd->Pipeline, v->Subpass); } // Create The Image Views @@ -1497,10 +1595,9 @@ void ImGui_ImplVulkanH_DestroyWindow(VkInstance instance, VkDevice device, ImGui //vkQueueWaitIdle(bd->Queue); for (uint32_t i = 0; i < wd->ImageCount; i++) - { ImGui_ImplVulkanH_DestroyFrame(device, &wd->Frames[i], allocator); + for (uint32_t i = 0; i < wd->SemaphoreCount; i++) ImGui_ImplVulkanH_DestroyFrameSemaphores(device, &wd->FrameSemaphores[i], allocator); - } IM_FREE(wd->Frames); IM_FREE(wd->FrameSemaphores); wd->Frames = nullptr; @@ -1533,32 +1630,12 @@ void ImGui_ImplVulkanH_DestroyFrameSemaphores(VkDevice device, ImGui_ImplVulkanH fsd->ImageAcquiredSemaphore = fsd->RenderCompleteSemaphore = VK_NULL_HANDLE; } -void ImGui_ImplVulkanH_DestroyFrameRenderBuffers(VkDevice device, ImGui_ImplVulkanH_FrameRenderBuffers* buffers, const VkAllocationCallbacks* allocator) -{ - if (buffers->VertexBuffer) { vkDestroyBuffer(device, buffers->VertexBuffer, allocator); buffers->VertexBuffer = VK_NULL_HANDLE; } - if (buffers->VertexBufferMemory) { vkFreeMemory(device, buffers->VertexBufferMemory, allocator); buffers->VertexBufferMemory = VK_NULL_HANDLE; } - if (buffers->IndexBuffer) { vkDestroyBuffer(device, buffers->IndexBuffer, allocator); buffers->IndexBuffer = VK_NULL_HANDLE; } - if (buffers->IndexBufferMemory) { vkFreeMemory(device, buffers->IndexBufferMemory, allocator); buffers->IndexBufferMemory = VK_NULL_HANDLE; } - buffers->VertexBufferSize = 0; - buffers->IndexBufferSize = 0; -} - -void ImGui_ImplVulkanH_DestroyWindowRenderBuffers(VkDevice device, ImGui_ImplVulkanH_WindowRenderBuffers* buffers, const VkAllocationCallbacks* allocator) -{ - for (uint32_t n = 0; n < buffers->Count; n++) - ImGui_ImplVulkanH_DestroyFrameRenderBuffers(device, &buffers->FrameRenderBuffers[n], allocator); - IM_FREE(buffers->FrameRenderBuffers); - buffers->FrameRenderBuffers = nullptr; - buffers->Index = 0; - buffers->Count = 0; -} - void ImGui_ImplVulkanH_DestroyAllViewportsRenderBuffers(VkDevice device, const VkAllocationCallbacks* allocator) { ImGuiPlatformIO& platform_io = ImGui::GetPlatformIO(); for (int n = 0; n < platform_io.Viewports.Size; n++) if (ImGui_ImplVulkan_ViewportData* vd = (ImGui_ImplVulkan_ViewportData*)platform_io.Viewports[n]->RendererUserData) - ImGui_ImplVulkanH_DestroyWindowRenderBuffers(device, &vd->RenderBuffers, allocator); + ImGui_ImplVulkan_DestroyWindowRenderBuffers(device, &vd->RenderBuffers, allocator); } //-------------------------------------------------------------------------------------------------------- @@ -1590,9 +1667,17 @@ static void ImGui_ImplVulkan_CreateWindow(ImGuiViewport* viewport) } // Select Surface Format - const VkFormat requestSurfaceImageFormat[] = { VK_FORMAT_B8G8R8A8_UNORM, VK_FORMAT_R8G8B8A8_UNORM, VK_FORMAT_B8G8R8_UNORM, VK_FORMAT_R8G8B8_UNORM }; + ImVector requestSurfaceImageFormats; +#ifdef IMGUI_IMPL_VULKAN_HAS_DYNAMIC_RENDERING + for (uint32_t n = 0; n < v->PipelineRenderingCreateInfo.colorAttachmentCount; n++) + requestSurfaceImageFormats.push_back(v->PipelineRenderingCreateInfo.pColorAttachmentFormats[n]); +#endif + const VkFormat defaultFormats[] = { VK_FORMAT_B8G8R8A8_UNORM, VK_FORMAT_R8G8B8A8_UNORM, VK_FORMAT_B8G8R8_UNORM, VK_FORMAT_R8G8B8_UNORM }; + for (VkFormat format : defaultFormats) + requestSurfaceImageFormats.push_back(format); + const VkColorSpaceKHR requestSurfaceColorSpace = VK_COLORSPACE_SRGB_NONLINEAR_KHR; - wd->SurfaceFormat = ImGui_ImplVulkanH_SelectSurfaceFormat(v->PhysicalDevice, wd->Surface, requestSurfaceImageFormat, (size_t)IM_ARRAYSIZE(requestSurfaceImageFormat), requestSurfaceColorSpace); + wd->SurfaceFormat = ImGui_ImplVulkanH_SelectSurfaceFormat(v->PhysicalDevice, wd->Surface, requestSurfaceImageFormats.Data, (size_t)requestSurfaceImageFormats.Size, requestSurfaceColorSpace); // Select Present Mode // FIXME-VULKAN: Even thought mailbox seems to get us maximum framerate with a single window, it halves framerate with a second window etc. (w/ Nvidia and SDK 1.82.1) @@ -1616,7 +1701,7 @@ static void ImGui_ImplVulkan_DestroyWindow(ImGuiViewport* viewport) ImGui_ImplVulkan_InitInfo* v = &bd->VulkanInitInfo; if (vd->WindowOwned) ImGui_ImplVulkanH_DestroyWindow(v->Instance, v->Device, &vd->Window, v->Allocator); - ImGui_ImplVulkanH_DestroyWindowRenderBuffers(v->Device, &vd->RenderBuffers, v->Allocator); + ImGui_ImplVulkan_DestroyWindowRenderBuffers(v->Device, &vd->RenderBuffers, v->Allocator); IM_DELETE(vd); } viewport->RendererUserData = nullptr; @@ -1790,8 +1875,8 @@ static void ImGui_ImplVulkan_SwapBuffers(ImGuiViewport* viewport, void*) else check_vk_result(err); - wd->FrameIndex = (wd->FrameIndex + 1) % wd->ImageCount; // This is for the next vkWaitForFences() - wd->SemaphoreIndex = (wd->SemaphoreIndex + 1) % wd->ImageCount; // Now we can use the next set of semaphores + wd->FrameIndex = (wd->FrameIndex + 1) % wd->ImageCount; // This is for the next vkWaitForFences() + wd->SemaphoreIndex = (wd->SemaphoreIndex + 1) % wd->SemaphoreCount; // Now we can use the next set of semaphores } void ImGui_ImplVulkan_InitPlatformInterface() diff --git a/cimgui/imgui/backends/imgui_impl_vulkan.h b/cimgui/imgui/backends/imgui_impl_vulkan.h index 53388c81d..e1bbb4e22 100644 --- a/cimgui/imgui/backends/imgui_impl_vulkan.h +++ b/cimgui/imgui/backends/imgui_impl_vulkan.h @@ -47,9 +47,20 @@ #if defined(IMGUI_IMPL_VULKAN_NO_PROTOTYPES) && !defined(VK_NO_PROTOTYPES) #define VK_NO_PROTOTYPES #endif +#if defined(VK_USE_PLATFORM_WIN32_KHR) && !defined(NOMINMAX) +#define NOMINMAX #include +#else +#include +#endif +#if defined(VK_VERSION_1_3) || defined(VK_KHR_dynamic_rendering) +#define IMGUI_IMPL_VULKAN_HAS_DYNAMIC_RENDERING +#endif // Initialization data, for ImGui_ImplVulkan_Init() +// - VkDescriptorPool should be created with VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT, +// and must contain a pool size large enough to hold an ImGui VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER descriptor. +// - When using dynamic rendering, set UseDynamicRendering=true and fill PipelineRenderingCreateInfo structure. // [Please zero-clear before use!] struct ImGui_ImplVulkan_InitInfo { @@ -58,29 +69,36 @@ struct ImGui_ImplVulkan_InitInfo VkDevice Device; uint32_t QueueFamily; VkQueue Queue; + VkDescriptorPool DescriptorPool; // See requirements in note above + VkRenderPass RenderPass; // Ignored if using dynamic rendering + uint32_t MinImageCount; // >= 2 + uint32_t ImageCount; // >= MinImageCount + VkSampleCountFlagBits MSAASamples; // 0 defaults to VK_SAMPLE_COUNT_1_BIT + + // (Optional) VkPipelineCache PipelineCache; - VkDescriptorPool DescriptorPool; uint32_t Subpass; - uint32_t MinImageCount; // >= 2 - uint32_t ImageCount; // >= MinImageCount - VkSampleCountFlagBits MSAASamples; // >= VK_SAMPLE_COUNT_1_BIT (0 -> default to VK_SAMPLE_COUNT_1_BIT) - // Dynamic Rendering (Optional) - bool UseDynamicRendering; // Need to explicitly enable VK_KHR_dynamic_rendering extension to use this, even for Vulkan 1.3. - VkFormat ColorAttachmentFormat; // Required for dynamic rendering + // (Optional) Dynamic Rendering + // Need to explicitly enable VK_KHR_dynamic_rendering extension to use this, even for Vulkan 1.3. + bool UseDynamicRendering; +#ifdef IMGUI_IMPL_VULKAN_HAS_DYNAMIC_RENDERING + VkPipelineRenderingCreateInfoKHR PipelineRenderingCreateInfo; +#endif - // Allocation, Debugging + // (Optional) Allocation, Debugging const VkAllocationCallbacks* Allocator; void (*CheckVkResultFn)(VkResult err); + VkDeviceSize MinAllocationSize; // Minimum allocation size. Set to 1024*1024 to satisfy zealous best practices validation layer and waste a little memory. }; // Called by user code -IMGUI_IMPL_API bool ImGui_ImplVulkan_Init(ImGui_ImplVulkan_InitInfo* info, VkRenderPass render_pass); +IMGUI_IMPL_API bool ImGui_ImplVulkan_Init(ImGui_ImplVulkan_InitInfo* info); IMGUI_IMPL_API void ImGui_ImplVulkan_Shutdown(); IMGUI_IMPL_API void ImGui_ImplVulkan_NewFrame(); IMGUI_IMPL_API void ImGui_ImplVulkan_RenderDrawData(ImDrawData* draw_data, VkCommandBuffer command_buffer, VkPipeline pipeline = VK_NULL_HANDLE); -IMGUI_IMPL_API bool ImGui_ImplVulkan_CreateFontsTexture(VkCommandBuffer command_buffer); -IMGUI_IMPL_API void ImGui_ImplVulkan_DestroyFontUploadObjects(); +IMGUI_IMPL_API bool ImGui_ImplVulkan_CreateFontsTexture(); +IMGUI_IMPL_API void ImGui_ImplVulkan_DestroyFontsTexture(); IMGUI_IMPL_API void ImGui_ImplVulkan_SetMinImageCount(uint32_t min_image_count); // To override MinImageCount after initialization (e.g. if swap chain is recreated) // Register a texture (VkDescriptorSet == ImTextureID) @@ -155,6 +173,7 @@ struct ImGui_ImplVulkanH_Window VkClearValue ClearValue; uint32_t FrameIndex; // Current frame being rendered to (0 <= FrameIndex < FrameInFlightCount) uint32_t ImageCount; // Number of simultaneous in-flight frames (returned by vkGetSwapchainImagesKHR, usually derived from min_image_count) + uint32_t SemaphoreCount; // Number of simultaneous in-flight frames + 1, to be able to use it in vkAcquireNextImageKHR uint32_t SemaphoreIndex; // Current set of swapchain wait semaphores we're using (needs to be distinct from per frame data) ImGui_ImplVulkanH_Frame* Frames; ImGui_ImplVulkanH_FrameSemaphores* FrameSemaphores; diff --git a/cimgui/imgui/backends/imgui_impl_wgpu.cpp b/cimgui/imgui/backends/imgui_impl_wgpu.cpp index d6f886b56..a8324455a 100644 --- a/cimgui/imgui/backends/imgui_impl_wgpu.cpp +++ b/cimgui/imgui/backends/imgui_impl_wgpu.cpp @@ -18,6 +18,10 @@ // CHANGELOG // (minor and older changes stripped away, please see git history for details) +// 2024-01-22: Added configurable PipelineMultisampleState struct. (#7240) +// 2024-01-22: (Breaking) ImGui_ImplWGPU_Init() now takes a ImGui_ImplWGPU_InitInfo structure instead of variety of parameters, allowing for easier further changes. +// 2024-01-22: Fixed pipeline layout leak. (#7245) +// 2024-01-17: Explicitly fill all of WGPUDepthStencilState since standard removed defaults. // 2023-07-13: Use WGPUShaderModuleWGSLDescriptor's code instead of source. use WGPUMipmapFilterMode_Linear instead of WGPUFilterMode_Linear. (#6602) // 2023-04-11: Align buffer sizes. Use WGSL shaders instead of precompiled SPIR-V. // 2023-04-11: Reorganized backend to pull data from a single structure to facilitate usage with multiple-contexts (all g_XXXX access changed to bd->XXXX). @@ -74,16 +78,17 @@ struct Uniforms struct ImGui_ImplWGPU_Data { - WGPUDevice wgpuDevice = nullptr; - WGPUQueue defaultQueue = nullptr; - WGPUTextureFormat renderTargetFormat = WGPUTextureFormat_Undefined; - WGPUTextureFormat depthStencilFormat = WGPUTextureFormat_Undefined; - WGPURenderPipeline pipelineState = nullptr; - - RenderResources renderResources; - FrameResources* pFrameResources = nullptr; - unsigned int numFramesInFlight = 0; - unsigned int frameIndex = UINT_MAX; + ImGui_ImplWGPU_InitInfo initInfo; + WGPUDevice wgpuDevice = nullptr; + WGPUQueue defaultQueue = nullptr; + WGPUTextureFormat renderTargetFormat = WGPUTextureFormat_Undefined; + WGPUTextureFormat depthStencilFormat = WGPUTextureFormat_Undefined; + WGPURenderPipeline pipelineState = nullptr; + + RenderResources renderResources; + FrameResources* pFrameResources = nullptr; + unsigned int numFramesInFlight = 0; + unsigned int frameIndex = UINT_MAX; }; // Backend data stored in io.BackendRendererUserData to allow support for multiple Dear ImGui contexts @@ -181,6 +186,12 @@ static void SafeRelease(WGPUBuffer& res) wgpuBufferRelease(res); res = nullptr; } +static void SafeRelease(WGPUPipelineLayout& res) +{ + if (res) + wgpuPipelineLayoutRelease(res); + res = nullptr; +} static void SafeRelease(WGPURenderPipeline& res) { if (res) @@ -331,7 +342,9 @@ static void ImGui_ImplWGPU_SetupRenderState(ImDrawData* draw_data, WGPURenderPas void ImGui_ImplWGPU_RenderDrawData(ImDrawData* draw_data, WGPURenderPassEncoder pass_encoder) { // Avoid rendering when minimized - if (draw_data->DisplaySize.x <= 0.0f || draw_data->DisplaySize.y <= 0.0f) + int fb_width = (int)(draw_data->DisplaySize.x * draw_data->FramebufferScale.x); + int fb_height = (int)(draw_data->DisplaySize.y * draw_data->FramebufferScale.y); + if (fb_width <= 0 || fb_height <= 0 || draw_data->CmdListsCount == 0) return; // FIXME: Assuming that this only gets called once per frame! @@ -450,6 +463,12 @@ void ImGui_ImplWGPU_RenderDrawData(ImDrawData* draw_data, WGPURenderPassEncoder // Project scissor/clipping rectangles into framebuffer space ImVec2 clip_min((pcmd->ClipRect.x - clip_off.x) * clip_scale.x, (pcmd->ClipRect.y - clip_off.y) * clip_scale.y); ImVec2 clip_max((pcmd->ClipRect.z - clip_off.x) * clip_scale.x, (pcmd->ClipRect.w - clip_off.y) * clip_scale.y); + + // Clamp to viewport as wgpuRenderPassEncoderSetScissorRect() won't accept values that are off bounds + if (clip_min.x < 0.0f) { clip_min.x = 0.0f; } + if (clip_min.y < 0.0f) { clip_min.y = 0.0f; } + if (clip_max.x > fb_width) { clip_max.x = (float)fb_width; } + if (clip_max.y > fb_height) { clip_max.y = (float)fb_height; } if (clip_max.x <= clip_min.x || clip_max.y <= clip_min.y) continue; @@ -559,9 +578,7 @@ bool ImGui_ImplWGPU_CreateDeviceObjects() graphics_pipeline_desc.primitive.stripIndexFormat = WGPUIndexFormat_Undefined; graphics_pipeline_desc.primitive.frontFace = WGPUFrontFace_CW; graphics_pipeline_desc.primitive.cullMode = WGPUCullMode_None; - graphics_pipeline_desc.multisample.count = 1; - graphics_pipeline_desc.multisample.mask = UINT_MAX; - graphics_pipeline_desc.multisample.alphaToCoverageEnabled = false; + graphics_pipeline_desc.multisample = bd->initInfo.PipelineMultisampleState; // Bind group layouts WGPUBindGroupLayoutEntry common_bg_layout_entries[2] = {}; @@ -603,9 +620,9 @@ bool ImGui_ImplWGPU_CreateDeviceObjects() // Vertex input configuration WGPUVertexAttribute attribute_desc[] = { - { WGPUVertexFormat_Float32x2, (uint64_t)IM_OFFSETOF(ImDrawVert, pos), 0 }, - { WGPUVertexFormat_Float32x2, (uint64_t)IM_OFFSETOF(ImDrawVert, uv), 1 }, - { WGPUVertexFormat_Unorm8x4, (uint64_t)IM_OFFSETOF(ImDrawVert, col), 2 }, + { WGPUVertexFormat_Float32x2, (uint64_t)offsetof(ImDrawVert, pos), 0 }, + { WGPUVertexFormat_Float32x2, (uint64_t)offsetof(ImDrawVert, uv), 1 }, + { WGPUVertexFormat_Unorm8x4, (uint64_t)offsetof(ImDrawVert, col), 2 }, }; WGPUVertexBufferLayout buffer_layouts[1]; @@ -648,7 +665,13 @@ bool ImGui_ImplWGPU_CreateDeviceObjects() depth_stencil_state.depthWriteEnabled = false; depth_stencil_state.depthCompare = WGPUCompareFunction_Always; depth_stencil_state.stencilFront.compare = WGPUCompareFunction_Always; + depth_stencil_state.stencilFront.failOp = WGPUStencilOperation_Keep; + depth_stencil_state.stencilFront.depthFailOp = WGPUStencilOperation_Keep; + depth_stencil_state.stencilFront.passOp = WGPUStencilOperation_Keep; depth_stencil_state.stencilBack.compare = WGPUCompareFunction_Always; + depth_stencil_state.stencilBack.failOp = WGPUStencilOperation_Keep; + depth_stencil_state.stencilBack.depthFailOp = WGPUStencilOperation_Keep; + depth_stencil_state.stencilBack.passOp = WGPUStencilOperation_Keep; // Configure disabled depth-stencil state graphics_pipeline_desc.depthStencil = (bd->depthStencilFormat == WGPUTextureFormat_Undefined) ? nullptr : &depth_stencil_state; @@ -678,6 +701,7 @@ bool ImGui_ImplWGPU_CreateDeviceObjects() SafeRelease(vertex_shader_desc.module); SafeRelease(pixel_shader_desc.module); + SafeRelease(graphics_pipeline_desc.layout); SafeRelease(bg_layouts[0]); return true; @@ -699,7 +723,7 @@ void ImGui_ImplWGPU_InvalidateDeviceObjects() SafeRelease(bd->pFrameResources[i]); } -bool ImGui_ImplWGPU_Init(WGPUDevice device, int num_frames_in_flight, WGPUTextureFormat rt_format, WGPUTextureFormat depth_format) +bool ImGui_ImplWGPU_Init(ImGui_ImplWGPU_InitInfo* init_info) { ImGuiIO& io = ImGui::GetIO(); IM_ASSERT(io.BackendRendererUserData == nullptr && "Already initialized a renderer backend!"); @@ -710,11 +734,12 @@ bool ImGui_ImplWGPU_Init(WGPUDevice device, int num_frames_in_flight, WGPUTextur io.BackendRendererName = "imgui_impl_webgpu"; io.BackendFlags |= ImGuiBackendFlags_RendererHasVtxOffset; // We can honor the ImDrawCmd::VtxOffset field, allowing for large meshes. - bd->wgpuDevice = device; + bd->initInfo = *init_info; + bd->wgpuDevice = init_info->Device; bd->defaultQueue = wgpuDeviceGetQueue(bd->wgpuDevice); - bd->renderTargetFormat = rt_format; - bd->depthStencilFormat = depth_format; - bd->numFramesInFlight = num_frames_in_flight; + bd->renderTargetFormat = init_info->RenderTargetFormat; + bd->depthStencilFormat = init_info->DepthStencilFormat; + bd->numFramesInFlight = init_info->NumFramesInFlight; bd->frameIndex = UINT_MAX; bd->renderResources.FontTexture = nullptr; @@ -727,8 +752,8 @@ bool ImGui_ImplWGPU_Init(WGPUDevice device, int num_frames_in_flight, WGPUTextur bd->renderResources.ImageBindGroupLayout = nullptr; // Create buffers with a default size (they will later be grown as needed) - bd->pFrameResources = new FrameResources[num_frames_in_flight]; - for (int i = 0; i < num_frames_in_flight; i++) + bd->pFrameResources = new FrameResources[bd->numFramesInFlight]; + for (int i = 0; i < bd->numFramesInFlight; i++) { FrameResources* fr = &bd->pFrameResources[i]; fr->IndexBuffer = nullptr; diff --git a/cimgui/imgui/backends/imgui_impl_wgpu.h b/cimgui/imgui/backends/imgui_impl_wgpu.h index b83ef0e83..c0c3b87f6 100644 --- a/cimgui/imgui/backends/imgui_impl_wgpu.h +++ b/cimgui/imgui/backends/imgui_impl_wgpu.h @@ -22,7 +22,24 @@ #include -IMGUI_IMPL_API bool ImGui_ImplWGPU_Init(WGPUDevice device, int num_frames_in_flight, WGPUTextureFormat rt_format, WGPUTextureFormat depth_format = WGPUTextureFormat_Undefined); +// Initialization data, for ImGui_ImplWGPU_Init() +struct ImGui_ImplWGPU_InitInfo +{ + WGPUDevice Device; + int NumFramesInFlight = 3; + WGPUTextureFormat RenderTargetFormat = WGPUTextureFormat_Undefined; + WGPUTextureFormat DepthStencilFormat = WGPUTextureFormat_Undefined; + WGPUMultisampleState PipelineMultisampleState = {}; + + ImGui_ImplWGPU_InitInfo() + { + PipelineMultisampleState.count = 1; + PipelineMultisampleState.mask = -1u; + PipelineMultisampleState.alphaToCoverageEnabled = false; + } +}; + +IMGUI_IMPL_API bool ImGui_ImplWGPU_Init(ImGui_ImplWGPU_InitInfo* init_info); IMGUI_IMPL_API void ImGui_ImplWGPU_Shutdown(); IMGUI_IMPL_API void ImGui_ImplWGPU_NewFrame(); IMGUI_IMPL_API void ImGui_ImplWGPU_RenderDrawData(ImDrawData* draw_data, WGPURenderPassEncoder pass_encoder); diff --git a/cimgui/imgui/backends/imgui_impl_win32.cpp b/cimgui/imgui/backends/imgui_impl_win32.cpp index 7a90ecfaa..b14ae1abb 100644 --- a/cimgui/imgui/backends/imgui_impl_win32.cpp +++ b/cimgui/imgui/backends/imgui_impl_win32.cpp @@ -40,7 +40,9 @@ typedef DWORD (WINAPI *PFN_XInputGetState)(DWORD, XINPUT_STATE*); // CHANGELOG // (minor and older changes stripped away, please see git history for details) -// 2023-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface. +// 2024-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface. +// 2023-10-05: Inputs: Added support for extra ImGuiKey values: F13 to F24 function keys, app back/forward keys. +// 2023-09-25: Inputs: Synthesize key-down event on key-up for VK_SNAPSHOT / ImGuiKey_PrintScreen as Windows doesn't emit it (same behavior as GLFW/SDL). // 2023-09-07: Inputs: Added support for keyboard codepage conversion for when application is compiled in MBCS mode and using a non-Unicode window. // 2023-04-19: Added ImGui_ImplWin32_InitForOpenGL() to facilitate combining raw Win32/Winapi with OpenGL. (#3218) // 2023-04-04: Inputs: Added support for io.AddMouseSourceEvent() to discriminate ImGuiMouseSource_Mouse/ImGuiMouseSource_TouchScreen/ImGuiMouseSource_Pen. (#2702) @@ -587,6 +589,20 @@ static ImGuiKey ImGui_ImplWin32_VirtualKeyToImGuiKey(WPARAM wParam) case VK_F10: return ImGuiKey_F10; case VK_F11: return ImGuiKey_F11; case VK_F12: return ImGuiKey_F12; + case VK_F13: return ImGuiKey_F13; + case VK_F14: return ImGuiKey_F14; + case VK_F15: return ImGuiKey_F15; + case VK_F16: return ImGuiKey_F16; + case VK_F17: return ImGuiKey_F17; + case VK_F18: return ImGuiKey_F18; + case VK_F19: return ImGuiKey_F19; + case VK_F20: return ImGuiKey_F20; + case VK_F21: return ImGuiKey_F21; + case VK_F22: return ImGuiKey_F22; + case VK_F23: return ImGuiKey_F23; + case VK_F24: return ImGuiKey_F24; + case VK_BROWSER_BACK: return ImGuiKey_AppBack; + case VK_BROWSER_FORWARD: return ImGuiKey_AppForward; default: return ImGuiKey_None; } } @@ -731,10 +747,14 @@ IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hwnd, UINT msg, WPARA int vk = (int)wParam; if ((wParam == VK_RETURN) && (HIWORD(lParam) & KF_EXTENDED)) vk = IM_VK_KEYPAD_ENTER; - - // Submit key event const ImGuiKey key = ImGui_ImplWin32_VirtualKeyToImGuiKey(vk); const int scancode = (int)LOBYTE(HIWORD(lParam)); + + // Special behavior for VK_SNAPSHOT / ImGuiKey_PrintScreen as Windows doesn't emit the key down event. + if (key == ImGuiKey_PrintScreen && !is_key_down) + ImGui_ImplWin32_AddKeyEvent(key, true, vk, scancode); + + // Submit key event if (key != ImGuiKey_None) ImGui_ImplWin32_AddKeyEvent(key, is_key_down, vk, scancode); diff --git a/cimgui/imgui/docs/CHANGELOG.txt b/cimgui/imgui/docs/CHANGELOG.txt index 4501b8f7e..8f8341aba 100644 --- a/cimgui/imgui/docs/CHANGELOG.txt +++ b/cimgui/imgui/docs/CHANGELOG.txt @@ -35,13 +35,295 @@ HOW TO UPDATE? and API updates have been a little more frequent lately. They are documented below and in imgui.cpp and should not affect all users. - Please report any issue! +----------------------------------------------------------------------- + VERSION 1.90.4 (Released 2024-02-22) +----------------------------------------------------------------------- + +Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.90.4 + +Other changes: + +- Nav: Fixed SetKeyboardFocusHere() or programmatic tabbing API from not working on + windows with the ImGuiWindowFlags_NoNavInputs flag (regression in 1.90.2, which + among other things broke imgui_memory_editor). +- Menus, Popups: Fixed an issue where hovering a parent-menu upward would + erroneously close the window. (#7325, #7287, #7063) +- Popups: Fixed resizable popup minimum size being too small. Standardized minimum + size logic. (#7329). +- Modals: Temporary changes of ImGuiCol_ModalWindowDimBg are properly handled by + BeginPopupModal(). (#7340) +- Tables: Angled headers: fixed support for multi-line labels. (#6917) +- Tables: Angled headers: various fixes to accurately handle CellPadding changes. (#6917) +- Tables: Angled headers: properly registers horizontal component of angled headers + for auto-resizing of columns. (#6917) +- Tables: Angled headers: fixed TableAngledHeadersRow() incorrect background fill + drawn too low, particularly visible with tables that have no scrolling. (#6917) +- ProgressBar: Fixed a minor tesselation issue when rendering rounded progress bars, + where in some situations the rounded section wouldn't follow regular tesselation rules. +- Debug Tools: Item Picker: Promoted ImGui::DebugStartItemPicker() to public API. (#2673) +- Debug Tools: Item Picker: Menu entry visible in Demo->Tools but greyed out unless + io.ConfigDebugIsDebuggerPresent is set. (#2673) +- Misc: Added optional alpha multiplier parameter to GetColorU32(ImU32) variant. +- Demo: Custom Rendering: better demonstrate PathArcTo(), PathBezierQuadraticCurveTo(), + PathBezierCubicCurveTo(), PathStroke(), PathFillConvex() functions. + +Docking+Viewports Branch: + +- Backends: GLFW: enable ImGuiBackendFlags_HasMouseHoveredViewport support with GLFW 3.3.x, + as required specs for it was relaxed in 1.87. This enable better viewport hovering detection + without GLFW 3.4's GLFW_MOUSE_PASSTHROUGH, with less reliance on dear imgui's own heuristic + of platform windows order. (#7316) + + +----------------------------------------------------------------------- + VERSION 1.90.3 (Released 2024-02-14) +----------------------------------------------------------------------- + +Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.90.3 + +Breaking changes: + +- Backends: SDL2: Removed obsolete ImGui_ImplSDL2_NewFrame(SDL_Window*) signature which + was obsoleted in 1.84. Calling ImGui_ImplSDL2_NewFrame() is fine. +- Backends: Vulkan: Moved RenderPass parameter from ImGui_ImplVulkan_Init() function to + ImGui_ImplVulkan_InitInfo structure. Not required when using dynamic rendering. (#7308) [@shawnhatori] +- Backends: Vulkan: Using dynamic rendering now require filling the PipelineRenderingCreateInfo + structure in ImGui_ImplVulkan_InitInfo, allowing to configure color/depth/stencil formats. + Removed ColorAttachmentFormat field previously provided for dynamic rendering. + (#7166, #6855, #5446, #5037) [@shawnhatori] + +Other changes: + +- Menus, Popups: Fixed menus and popups with ChildWindow flag erroneously not displaying + a scrollbar when contents is over parent viewport size. (#7287, #7063) [@ZingBallyhoo] +- Backends: SDL2, SDL3: Handle gamepad disconnection + fixed increasing gamepad reference + counter continuously. Added support for multiple simultaneous gamepads. + Added ImGui_ImplSDL2_SetGamepadMode()) function to select whether to automatically pick + first available gamepad, all gamepads, or specific gamepads. + (#3884, #6559, #6890, #7180) [@ocornut, @lethal-guitar, @wn2000, @bog-dan-ro] +- Backends: SDL3: Fixed gamepad handling. (#7180) [@bog-dan-ro] +- Backends: SDLRenderer3: query newly added SDL_RenderViewportSet() to not restore + a wrong viewport if none was initially set. +- Backends: DirectX9: Using RGBA format when allowed by the driver to avoid CPU side + conversion. (#6575) [@Demonese] +- Internals: Fixed ImFileOpen not working before context is created, preventing creation + of a font atlas before main context creation. (#7314, #7315) [@PathogenDavid, @ocornut] + + +----------------------------------------------------------------------- + VERSION 1.90.2 (Released 2024-02-09) +----------------------------------------------------------------------- + +Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.90.2 + +Breaking changes: + +- Commented out ImGuiIO::ImeWindowHandle obsoleted in 1.87 in favor of writing + to 'void* ImGuiViewport::PlatformHandleRaw'. +- Backends: WebGPU: ImGui_ImplWGPU_Init() now takes a ImGui_ImplWGPU_InitInfo structure + instead of variety of parameters, allowing for easier further changes. (#7240) + +Other changes: + +- Nav: keyboard/gamepad activation mark widgets as held to give better visual feedback. +- Nav: tweak to logic marking navigated item as hovered when using keyboard, allowing + the hover highlight to stay even while another item is activated. +- Nav: Fixed SetKeyboardFocusHere() not working when current nav focus is in different scope, + regression from 1.90.1 related to code scoping Tab presses to local scope. (#7226) [@bratpilz] +- Nav: Fixed pressing Escape while in a child window with _NavFlattened flag. (#7237) +- Nav: Improve handling of Alt key to toggle menu so that key ownership may be claimed on + individual left/right alt key without interfering with the other. +- Nav, Menus: Fixed click on a BeginMenu() followed by right-arrow from making the child menu + reopen and flicker (using ImGuiPopupFlags_NoReopen). +- Nav: ImGuiWindowFlags_NoNavInputs is tested during scoring so NavFlattened windows can use it. +- Popups: OpenPopup(): added ImGuiPopupFlags_NoReopen flag to specifically not close and reopen + a popup when it is already open. (#1497, #1533) + (Note that this differs from specific handling we already have in place for the case of calling + OpenPopup() repeatedly every frame: we already didn't reopen in that specific situation, otherwise + the effect would be very disastrous in term of confusion, as reopening would steal focus). +- Popups: Slight change to popup closing logic (e.g. after focusing another window) which skipped + over popups that are also child windows. +- Combo: Fixed not reusing windows optimally when used inside a popup stack. +- Debug Tools: Metrics: Fixed debug break in SetShortcutRouting() not handling ImGuiMod_Shortcut redirect. +- Debug Tools: Metrics: Improved Monitors and Viewports minimap display. Highlight on hover. +- Debug Tools: Debug Log: Added "Input Routing" logging. +- Debug Tools: Added "nop" to IM_DEBUG_BREAK macro on GCC to work around GDB bug (#7266) [@Peter0x44] +- Backends: Vulkan: Fixed vkAcquireNextImageKHR() validation errors in VulkanSDK 1.3.275 by + allocating one extra semaphore than in-flight frames. (#7236) [@mklefrancois] +- Backends: Vulkan: Fixed vkMapMemory() calls unnecessarily using full buffer size. (#3957) +- Backends: Vulkan: Fixed handling of ImGui_ImplVulkan_InitInfo::MinAllocationSize field. (#7189, #4238) +- Backends: WebGPU: Added ImGui_ImplWGPU_InitInfo::PipelineMultisampleState. (#7240) +- Backends: WebGPU: Filling all WGPUDepthStencilState fields explicitly as a recent Dawn + update stopped setting default values. (#7232) [@GrigoryGraborenko] +- Backends: WebGPU: Fixed pipeline layout leak. (#7245) [@rajveermalviya] +- Backends: OpenGL3: Backup and restore GL_PIXEL_UNPACK_BUFFER. (#7253) +- Internals: Many improvements related to yet unpublicized shortcut routing and input ownership systems. +- Internals: InputText: Added internal helpers to force reload of user-buf when active. (#2890) [@kudaba, @ocornut] + Often requested in some form (#6962, #5219, #3290, #4627, #5054, #3878, #2881, #1506, #1216, #968), + and useful for interactive completion/suggestions popups (#2057, #718) + +Docking+Viewports Branch: + +- Added ImGuiWindowClass::FocusRouteParentWindowId as a way to connect the focus route between + a tool window to a parent document window, so that Shortcuts in the documents are routed when the + tool is focused (regardless of whether the tool is docked or in a floating viewport, etc.) (#6798) +- Added ImGuiDockNodeFlags_DockedWindowsInFocusRoute to automatically make a dockspace connect + the focus route of its docked window. This is provided a convenience in case you have windows + where a connection is not explicit. (#6798) +- Viewports: Fixed moving accross monitors when io.ConfigWindowsMoveFromTitleBarOnly is set. (#7299, #3071) +- Backends: OSX: Fixed not submitting Monitors info when viewports are not enabled, leading to + missing e.g. DpiScale info. (#7257) [@actboy168] + ----------------------------------------------------------------------- - VERSION 1.90 WIP (In Progress) + VERSION 1.90.1 (Released 2024-01-10) ----------------------------------------------------------------------- +Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.90.1 + +Breaking changes: + +- imgui_freetype: commented out ImGuiFreeType::BuildFontAtlas() obsoleted in 1.81. + Prefer using #define IMGUI_ENABLE_FREETYPE or see commented code for manual calls. +- Removed CalcListClipping() marked obsolete in 1.86. (#3841) + Prefer using ImGuiListClipper which can return non-contiguous ranges. +- Internals, Columns: commented out legacy ImGuiColumnsFlags_XXX symbols redirecting + to ImGuiOldColumnsFlags_XXX, obsoleted from imgui_internal.h in 1.80. +- Commented out obsolete ImGuiKey_KeyPadEnter redirection to ImGuiKey_KeypadEnter. (#2625, #7143) + +Other changes: + +- Windows: + - BeginChild(): Fixed auto-resizing erroneously limiting size to host viewport + minus padding. There are no limit to a child width/height. (#7063) [@Devyre] + - BeginChild(): Resize borders rendered even when ImGuiWindowFlags_NoBackground + is specified. (#1710, #7194) + - Fixed some auto-resizing path using style.WindowMinSize.x (instead of x/y) + for both axises since 1.90. (#7106) [@n0bodysec] + - Scrolling: internal scrolling value is rounded instead of truncated, as a way to reduce + speed asymmetry when (incorrectly) attempting to scroll by non-integer amount. (#6677) +- Navigation (Keyboard/gamepad): + - Nav, IO: SetNextFrameWantCaptureKeyboard(false) calls are not overridden back to true when + navigation is enabled. SetNextFrameWantCaptureKeyboard() is always higher priority. (#6997) + - Nav: Activation can also be performed with Keypad Enter. (#5606) +- Drag and Drop: + - Fixed drop target highlight on items temporarily pushing a widened clip rect + (namely Selectables and Treenodes using SpanAllColumn flag) so the highlight properly covers + all columns. (#7049, #4281, #3272) +- InputText: + - InputTextMultiline: Fixed Tab character input not repeating (1.89.4 regression). + - InputTextMultiline: Tabbing through a multi-line text editor which allows Tab character inputs + (using the ImGuiInputTextFlags_AllowTabInput flag) doesn't automatically activate it, in order + to allow passing through multiple widgets easily. (#3092, #5759, #787) +- Drags, Sliders, Inputs: + - DragScalarN, SliderScalarN, InputScalarN: Fixed incorrect pushes into ItemWidth + stack when number of components is 1. [#7095] [@Nahor] + - Drags, Sliders, Inputs: removed all attempts to filter non-numerical characters during text + editing. Invalid inputs not applied to value, visibly reverted after validation. (#6810, #7096) + - Drags, Sliders, Inputs: removal of filter means that "nan" and "inf" values may be input. (#7096) + - DragScalarN, SliderScalarN, InputScalarN, PushMultiItemsWidths: improve multi-components + width computation to better distribute the error. (#7120, #7121) [@Nahor] +- Menus: + - Tweaked hover slack logic, adding an extra timeout to avoid situations where a slow vertical + movements toward another parent BeginMenu() can keep the wrong child menu open. (#6671, #6926) +- Color Editors: + - ColorEdit: Layout tweaks for very small sizes. (#7120, #7121) + - ColorPicker: Fixed saturation/value cursor radius not scaling properly. +- Tabs: Added ImGuiTabItemFlags_NoAssumedClosure to enable app to react on closure attempt, + without having to draw an unsaved document marker (ImGuiTabItemFlags_UnsavedDocument sets + _NoAssumedClosure automatically). (#7084) +- Debug Tools: + - Added io.ConfigDebugIsDebuggerPresent option. When enabled, this adds buttons in various + locations of Metrics/Debugger to manually request a debugger break: + - Request a debug break in a Begin() call. + - Request a debug break in a ItemAdd() call via debug log and hovering 0xXXXXXX identifiers. + - Request a debug break in a BeginTable() call. + - Request a debug break in a SetShortcutRouting()/Shortcut() call. [Internal] + - Metrics: Reorganize Tools menu. + - Added DebugFlashStyleColor() to identify a style color. Added to Style Editor. + - Debug Log: Hide its own clipper log to reduce noise in the output. (#5855) + - Debug Log: Clicking any filter with SHIFT held enables it for 2 frames only, + making it easier when dealing with spammy logs. (#5855) +- Settings: Fixed an issue marking settings as dirty when merely clicking on a border or resize + grip without moving it. +- Misc: Added IMGUI_USER_H_FILENAME to change the path included when using + IMGUI_INCLUDE_IMGUI_USER_H. (#7039) [@bryceberger] +- Misc: Rework debug display of texture id in Metrics window to avoid compile-error when + ImTextureID is defined to be larger than 64-bits. (#7090) +- Misc: Added extra courtesy ==/!= operators when IMGUI_DEFINE_MATH_OPERATORS is defined. +- Misc: Fixed text functions fast-path for handling "%s" and "%.*s" to handle null pointers gracefully, + like most printf implementations. (#7016, #3466, #6846) [@codefrog2002] +- Misc: Renamed some defines in imstb_textedit.h to avoid conflicts when using unity/jumbo builds + on a codebase where another copy of the library is used. +- Misc: During shutdown, check that io.BackendPlatformUserData and io.BackendRendererUserData are NULL + in order to catch cases where backend was not shut down. (#7175) +- Misc: Reworked Issue Template to a shinier and better form. (#5927) [@Panquesito7, @PathogenDavid, @ocornut] +- Backends: + - GLFW, Emscripten: Added ImGui_ImplGlfw_InstallEmscriptenCanvasResizeCallback() to + register canvas selector and auto-resize GLFW window. (#6751) [@Traveller23, @ypujante] + - GLFW: Fixed Windows specific hooks to use Unicode version of WndProc even when + compiling in MBCS mode. (#7174) [@kimidaisuki22] + - OpenGL3: Update GL3W based imgui_impl_opengl3_loader.h to load libGL.so variants in + case of missing symlink. Fix 1.90 regression for some distros. (#6983) + - Vulkan: Fixed mismatching allocator passed to vkCreateCommandPool() vs + vkDestroyCommandPool(). (#7075) [@FoonTheRaccoon] + - Vulkan: Added MinAllocationSize field in ImGui_ImplVulkan_InitInfo to workaround zealous + "best practice" validation layer. (#7189, #4238) [@philae-ael] + - Vulkan: Stopped creating command pools with VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT + as we don't reset them. + - WebGPU: Fixed wgpuRenderPassEncoderSetScissorRect() crash when rendering modal window's + dimming layer, which has an unclipped value in ImDrawCmd::ClipRect. (#7191) [@aparis69] +- Examples: + - Examples: GLFW+Emscripten: Fixed examples not consistently resizing according to host canvas. + (#6751) [@Traveller23, @ypujante] + - Examples: SDL3: Minor fixes following recent SDL3 in-progress development. + +Docking+Viewports Branch: + +- Windows: Fixed ImGuiCol_TitleBg/Active alpha being used for viewport-owned windows. (#7181) [@PathogenDavid] +- Backends: DX12: Changed swapchain scaling mode to DXGI_SCALING_NONE to reduce artifacts as + queued frames aren't synchronized with platform window resizes. (#7152, #7153) [@SuperWangKai] +- Backends: OSX: Fixed monitor and window position by correctly transforming Y origin on multi-viewports + multi-monitor setups. (#7028, #7101, #6009, #6432) [@dmirty-kuzmenko, @734vin] +- Backends: OSX: Fixed IME position in multi-monitor multi-viewports setups. (#7028) [@734vin] + + +----------------------------------------------------------------------- + VERSION 1.90.0 (Released 2023-11-15) +----------------------------------------------------------------------- + +Decorated log and release notes: https://github.com/ocornut/imgui/releases/tag/v1.90 + Breaking changes: + - BeginChild(): Upgraded 'bool border = false' parameter to 'ImGuiChildFlags flags = 0'. + Added ImGuiChildFlags_Border value. As with our prior "bool-to-flags" API updates, + the ImGuiChildFlags_Border value is guaranteed to be == true forever to ensure a + smoother transition, meaning all existing calls will still work. + If you want to neatly transition your call sites: + Before: BeginChild("Name", size, true) + After: BeginChild("Name", size, ImGuiChildFlags_Border) + Before: BeginChild("Name", size, false) + After: BeginChild("Name", size) or BeginChild("Name", 0) or BeginChild("Name", size, ImGuiChildFlags_None) + Existing code will still work as 'ImGuiChildFlags_Border == true', but you are encouraged to update call sites. + - BeginChild(): Added child-flag ImGuiChildFlags_AlwaysUseWindowPadding as a replacement for + the window-flag ImGuiWindowFlags_AlwaysUseWindowPadding: the feature only ever made sense + for use with BeginChild() anyhow, passing it to Begin() had no effect. Now that we accept + child-flags we are moving it there. (#462) + Before: BeginChild("Name", size, 0, ImGuiWindowFlags_AlwaysUseWindowPadding); + After: BeginChild("Name", size, ImGuiChildFlags_AlwaysUseWindowPadding, 0); + Kept inline redirection enum (will obsolete later) so existing code will work. + - BeginChildFrame()/EndChildFrame(): removed functions in favor of using BeginChild() with + the ImGuiChildFlags_FrameStyle flag. Kept inline redirection function (will obsolete). + Those functions were merely PushStyle/PopStyle helpers and custom versions are easy to create. + (The removal isn't so much motivated by needing to add the feature in BeginChild(), but by the + necessity to avoid BeginChildFrame() signature mismatching BeginChild() signature and features.) + - Debug Tools: Renamed ShowStackToolWindow() ("Stack Tool") to ShowIDStackToolWindow() ("ID Stack Tool"), + as earlier name was misleading. Kept inline redirection function. (#4631) + - IO: Removed io.MetricsActiveAllocations introduced in 1.63, was displayed in Metrics and unlikely to + be accessed by end-user. Value still visible in the UI and easily to recompute from a delta. + - Defining IMGUI_DISABLE_OBSOLETE_FUNCTIONS now automatically defines IMGUI_DISABLE_OBSOLETE_KEYIO. (#4921) + - Removed IM_OFFSETOF() macro in favor of using offsetof() available in C++11. Kept redirection define. (#4537) - ListBox, Combo: Changed signature of "name getter" callback in old one-liner ListBox()/Combo() apis. Before: getter type: bool (*getter)(void* user_data, int idx, const char** out_text) @@ -54,63 +336,192 @@ Breaking changes: Old type was unnecessarily complex and harder to wrap in e.g. a lambda. Kept inline redirection function (will obsolete). - Commented out obsolete redirecting enums/functions that were marked obsolete two years ago: - GetWindowContentRegionWidth() -> use GetWindowContentRegionMax().x - GetWindowContentRegionMin().x. - Consider that generally 'GetContentRegionAvail().x' is more useful. + Consider that generally 'GetContentRegionAvail().x' is often more correct and more useful. - ImDrawCornerFlags_XXX -> use ImDrawFlags_RoundCornersXXX names. - Read 1.82 changelog for details + grep commented names in sources + . + Read 1.82 changelog for details + grep commented names in sources. - Commented out runtime support for hardcoded ~0 or 0x01..0x0F rounding flags values for AddRect()/AddRectFilled()/PathRect()/AddImageRounded(). -> Use ImDrawFlags_RoundCornersXXX flags. - Read 1.82 Changelog for details. + Read 1.82 changelog for details. + - Backends: Vulkan: Removed parameter from ImGui_ImplVulkan_CreateFontsTexture(): backend now creates its own + command-buffer to upload fonts. Removed ImGui_ImplVulkan_DestroyFontUploadObjects() which is now unnecessary. + No need to call ImGui_ImplVulkan_CreateFontsTexture() as it is done automatically in ImGui_ImplVulkan_NewFrame(). + You can call ImGui_ImplVulkan_CreateFontsTexture() manually if you need to reload the font atlas texture. + (#6943, #6715, #6327, #3743, #4618) Other changes: -- Tooltips: made using SetItemTooltip()/IsItemHovered(ImGuiHoveredFlags_ForTooltip) defaults to - activate tooltips on disabled items. This is done by adding ImGuiHoveredFlags_AllowWhenDisabled - to the default value of style.HoverFlagsForTooltipMouse/HoverFlagsForTooltipNav. (#1485) +- Windows: + - BeginChild(): Added ImGuiChildFlags_ResizeX and ImGuiChildFlags_ResizeY to allow resizing + child windows from the bottom/right border (toward layout direction). Resized child windows + settings are saved and persistent in .ini file. (#1710) + - BeginChild(): Added ImGuiChildFlags_Border as a replacement for 'bool border = true' parameter. + - BeginChild(): Added ImGuiChildFlags_AutoResizeX and ImGuiChildFlags_AutoResizeY to auto-resize + on one axis, while generally providing a size on the other axis. (#1666, #1395, #1496, #1710) + e.g. BeginChild("name", {-FLT_MIN, 0.0f}, ImGuiChildFlags_AutoResizeY); + - Size is only reevaluated if the child window is within visible boundaries or just appearing. + This allows coarse clipping to be performed and auto-resizing childs to return false when + hidden because of being scrolled out. + - Combining this with also specifying ImGuiChildFlags_AlwaysAutoResize disables + this optimization, meaning child contents will never be clipped (not recommended). + - Please be considerate that child are full windows and carry significant overhead: + combining auto-resizing for both axises to create a non-scrolling child to merely draw + a border would be better more optimally using BeginGroup(). (see #1496) + (until we come up with new helpers for framed groups and work-rect adjustments). + - BeginChild(): made it possible to use SetNextWindowSizeConstraints() rectangle, often + useful when ImGuiChildFlags_AutoResizeX or ImGuiChildFlags_AutoResizeY. (#1666, #1395, #1496) + Custom constraint callback are not supported with child window. + - BeginChild(): Added ImGuiChildFlags_FrameStyle as a replacement for BeginChildFrame(), + use it to make child window use FrameBg, FrameRounding, FrameBorderSize, FramePadding + instead of ChildBg, ChildRounding, ChildBorderSize, WindowPadding. + - Popups: clarified meaning of 'p_open != NULL' in BeginPopupModal() + set back user value + to false when popup is closed in ways other than clicking the close button. (#6900) + - Double-clicking lower-left resize grip auto-resize (like lower-right one). + - Double-clicking bottom or right window border auto-resize on a singles axis. + - Use relative mouse movement for border resize when the border geometry has moved + (e.g. resizing a child window triggering parent scroll) in order to avoid resizing + feedback loops. Unless manually mouse-wheeling while border resizing. (#1710) +- Separators: + - Altered end-points to use more standard boundaries. (#205, #4787, #1643) + Left position is always current cursor X position, right position is always work-rect + rightmost edge. It effectively means that: + - A separator in the root of a window will end up a little more distant from edges + than previously (essentially following WindowPadding instead of clipping edges). + - A separator inside a table cell end up a little distance from edges instead of + touching them (essentially following CellPadding instead of clipping edges). + - Matches tree indentation (was not the case before). + - Matches SeparatorText(). (#1643) + - Makes things correct inside groups without specific/hard-coded handling. (#205) + - Support legacy behavior when used inside old Columns(), as we favored that idiom back then, + only different is left position follows indentation level, to match calling a Separator() + inside or outside Columns(). +- Tooltips: + - Made using SetItemTooltip()/IsItemHovered(ImGuiHoveredFlags_ForTooltip) defaults to + activate tooltips on disabled items. This is done by adding ImGuiHoveredFlags_AllowWhenDisabled + to the default value of style.HoverFlagsForTooltipMouse/HoverFlagsForTooltipNav. (#1485) + - Made is possible to combine ImGuiHoveredFlags_ForTooltip with a ImGuiHoveredFlags_DelayXXX + override. (#1485) +- Drag and Drop: + - Reworked drop target highlight: reduce rectangle to its visible portion, and then expand + slightly. A full rectangle is always visible and it may protrude slightly. (#4281, #3272) + - Fixed submitting a tooltip from drop target location when using AcceptDragDropPayload() + with ImGuiDragDropFlags_AcceptNoPreviewTooltip and submitting a tooltip manually. +- Tables: + - Added angled headers support. You need to set ImGuiTableColumnFlags_AngledHeader on selected + columns and call TableAngledHeadersRow(). Added style.TableAngledHeadersAngle style option. (#6917) + - Added ImGuiTableFlags_HighlightHoveredColumn flag, currently highlighting column header. + - Fixed an edge-case when no columns are visible + table scrollbar is visible + user + code is always testing return value of TableSetColumnIndex() to coarse clip. With an active + clipper it would have asserted. Without a clipper, the scrollbar range would be wrong. + - Request user to submit contents when outer host-window is requesting auto-resize, + so a scrolling table can contribute to initial window size. (#6510) + - Fixed subtle drawing overlap between borders in some situations. + - Fixed bottom-most and right-most outer border offset by one. (#6765, #3752) [@v-ein] + - Fixed top-most and left-most outer border overlapping inner clip-rect when scrolling. (#6765) + - Fixed top-most outer border being drawn with both TableBorderLight and TableBorderStrong + in some situations, causing the earlier to be visible underneath when alpha is not 1.0f. + - Fixed right-clicking right-most section (past right-most column) from highlighting a column. + - Fixed an issue with ScrollX enabled where an extraneous draw command would be created. +- Menus: + - Menus: Fixed a bug where activating an item in a child-menu and dragging mouse over the + parent-menu would erroneously close the child-menu. (Regression from 1.88). (#6869) + - MenuBar: Fixed an issue where layouting an item in the menu-bar would erroneously + register contents size in a way that would affect the scrolling layer. + Was most often noticeable when using an horizontal scrollbar. (#6789) +- InputText: + - InputTextMultiline: Fixed a crash pressing Down on last empty line of a multi-line buffer. + (regression from 1.89.2, only happened in some states). (#6783, #6000) + - InputTextMultiline: Fixed Tabbing cycle leading to a situation where Enter key wouldn't + be accepted by the widget when navigation highlight is visible. (#6802, #3092, #5759, #787) - Nav: Tabbing always enable nav highlight when ImGuiConfigFlags_NavEnableKeyboard is set. Previously was inconsistent and only enabled when stepping through a non-input item. (#6802, #3092, #5759, #787) -- Tables: Fixed an edge-case when no columns are visible + table scrollbar is visible + user - code is always testing return value of TableSetColumnIndex() to coarse clip. With an active - clipper it would have asserted. Without a clipper, the scrollbar range would be wrong. -- Tables: Request user to submit contents when outer host-window is requesting auto-resize, - so a scrolling table can contribute to initial window size. (#6510) -- Tables: Fixed subtle drawing overlap between borders in some situations. -- Tables: Fixed bottom-most and right-most outer border offset by one. (#6765, #3752) [@v-ein] -- Tables: Fixed top-most outer border being drawn with both TableBorderLight and TableBorderStrong - in some situations, causing the earlier to be visible underneath when alpha is not 1.0f. -- Fonts: 'float size_pixels' passed to AddFontXXX() functions is now rounded to lowest integer. - This is because our layout/font system currently doesn't fully support non-integer sizes. Until - it does, this has been a common pitfall leading to more or less subtle issues. (#3164, #3309, #6800) -- Fonts: Better assert during load when passing truncated font data or wrong data size. (#6822) -- Fonts: Ensure calling AddFontXXX function doesn't invalidates ImFont's ConfigData pointers - prior to building again. (#6825) -- Fonts, imgui_freetype: Fixed a warning and leak in IMGUI_ENABLE_FREETYPE_LUNASVG support. (#6842, #6591) -- InputTextMultiline: Fixed a crash pressing Down on last empty line of a multiline buffer. - (regression from 1.89.2, only happened in some states). (#6783, #6000) -- InputTextMultiline: Fixed Tabbing cycle leading to a situation where Enter key wouldn't - be accepted by the widget when navigation highlight is visible. (#6802, #3092, #5759, #787) -- BeginListBox(): Fixed not consuming SetNextWindowXXX data when returning false. -- MenuBar: Fixed an issue where layouting an item in the menu-bar would erroneously - register contents size in a way that would affect the scrolling layer. - Was most often noticable when using an horizontal scrollbar. (#6789) +- TreeNode: Added ImGuiTreeNodeFlags_SpanAllColumns for use in tables. (#3151, #3565, #2451, #2438) +- TabBar: Fixed position of unsaved document marker (ImGuiTabItemFlags_UnsavedDocument) which was + accidentally offset in 1.89.9. (#6862) [@alektron] +- ColorPicker4(): Fixed ImGuiColorEditFlags_NoTooltip not being forwarded to individual DragFloat3 + sub-widgets which have a visible color preview when ImGuiColorEditFlags_NoSidePreview is also set. (#6957) +- BeginGroup(): Fixed a bug pushing line lower extent too far down when called after a call + to SameLine() followed by manual cursor manipulation. +- BeginCombo(): Added ImGuiComboFlags_WidthFitPreview flag. (#6881) [@mpv-enjoyer] +- BeginListBox(): Fixed not consuming SetNextWindowXXX() data when returning false. +- Fonts: + - Argument 'float size_pixels' passed to AddFontXXX() functions is now rounded to lowest integer. + This is because our layout/font system currently doesn't fully support non-integer sizes. Until + it does, this has been a common pitfall leading to more or less subtle issues. (#3164, #3309, #6800) + - Better assert during load when passing truncated font data or wrong data size. (#6822) + - Ensure calling AddFontXXX function doesn't invalidates ImFont's ConfigData pointers + prior to building again. (#6825) + - Added ImFontConfig::RasterizerDensity field to increase texture size of rendered glyphs + without altering other metrics. Among other things, this makes it easier to have zooming code + swapping between 2 fonts (e.g. a 100% and a 400% fonts) depending on current scale. (#6925) [@thedmd] + Important: if you increase this it is expected that you would render the font with a scale of + similar value or magnitude. Merely increasing this without increasing scale may lower quality. + - imgui_freetype: Added support for RasterizerDensity. (#6925) [@thedmd] + - imgui_freetype: Fixed a warning and leak in IMGUI_ENABLE_FREETYPE_LUNASVG support. (#6842, #6591) +- Inputs: Added IsKeyChordPressed() helper function e.g. IsKeyChordPressed(ImGuiMod_Ctrl | ImGuiKey_S). + (note that ImGuiMod_Shortcut may be used as an alias for Cmd on OSX and Ctrl on other systems). +- Misc: Most text functions also treat "%.*s" (along with "%s") specially to bypass formatting. (#3466, #6846) +- IO: Add extra keys to ImGuiKey enum: ImGuiKey_F13 to ImGuiKey_F24. (#6891, #4921) +- IO: Add extra keys to ImGuiKey enum: ImGuiKey_AppBack, ImGuiKey_AppForward. (#4921) - IO: Setting io.WantSetMousePos ignores incoming MousePos events. (#6837, #228) [@bertaye] +- Debug Tools: Metrics: Added log of recent alloc/free calls. +- Debug Tools: Metrics: Added "Show groups rectangles" in tools. - ImDrawList: Added AddEllipse(), AddEllipseFilled(), PathEllipticalArcTo(). (#2743) [@Doohl] - ImVector: Added find_index() helper. +- Demo: Added "Drag and Drop -> Tooltip at target location" demo. +- Demo: Added "Layout -> Child Windows -> Manual-resize" demo. (#1710) +- Demo: Added "Layout -> Child Windows -> Auto-resize with constraints" demo. (#1666, #1395, #1496, #1710) +- Demo: Partly fixed "Examples -> Constrained-resizing window" custom constrains demo. (#6210) [@cfillion] +- Backends: Vulkan: Removed parameter from ImGui_ImplVulkan_CreateFontsTexture(): backend now creates its own + command-buffer to upload fonts. Removed ImGui_ImplVulkan_DestroyFontUploadObjects() which is now unnecessary. + No need to call ImGui_ImplVulkan_CreateFontsTexture() as it is done automatically in ImGui_ImplVulkan_NewFrame(). + You can call ImGui_ImplVulkan_CreateFontsTexture() manually if you need to reload font atlas texture. + Fixed leaks, and added ImGui_ImplVulkan_DestroyFontsTexture() (probably no need to call this directly). + (#6943, #6715, #6327, #3743, #4618) + [@helynranta, @thomasherzog, @guybrush77, @albin-johansson, @MiroKaku, @benbatya-fb, @ocornut] +- Backends: Vulkan: use specified ColorAttachmentFormat when creating a secondary window when enabling + UseDynamicRendering option. (#6999, #5446, #5037) [@raaaviol] - Backends: GLFW: Clear emscripten's MouseWheel callback before shutdown. (#6790, #6096, #4019) [@halx99] +- Backends: GLFW: Added support for F13 to F24 function keys. (#6891) +- Backends: SDL2, SDL3: Added support for F13 to F24 function keys, AppBack, AppForward. (#6891) +- Backends: SDL3: Updates for recent API changes. (#7000, #6974) +- Backends: Win32: Added support for F13 to F24 function keys, AppBack, AppForward. (#6891) - Backends: Win32: Added support for keyboard codepage conversion for when application is compiled in MBCS mode and using a non-Unicode window. (#6785, #6782, #5725, #5961) [@sneakyevil] +- Backends: Win32: Synthesize key-down event on key-up for VK_SNAPSHOT / ImGuiKey_PrintScreen as Windows + doesn't emit it (same behavior as GLFW/SDL). (#6859) [@thedmd, @SuperWangKai] +- Backends: OpenGL3: rename symbols in our internal loader so that LTO compilation with another + copy of gl3w becomes possible. (#6875, #6668, #4445) [@nicolasnoble] +- Backends: OpenGL3: Update GL3W based imgui_impl_opengl3_loader.h to load "libGL.so" instead + of "libGL.so.1", accommodating for NetBSD systems having only "libGL.so.3" available. (#6983) +- Backends: OSX: Added support for F13 to F20 function keys. Support mapping F13 to PrintScreen. (#6891) +- Examples: GLFW+Vulkan, SDL+Vulkan: Simplified and removed code due to backend improvements. +- Internals: Renamed ImFloor() to ImTrunc(). Renamed ImFloorSigned() to ImFloor(). (#6861) Docking+Viewports Branch: - Viewports: Fixed window inner clipping rectangle off by one when window is located on a monitor with negative coordinates. While it is expected that other small issues with arise from this situation, at the moment we are fixing the most noticeable one. (#6861, #2884) [@Vuhdo, @alektron] +- Docking: revised undocking to reduce accidental whole-node undocking: + - cannot undock a whole node by dragging from empty space in tab-bar. + - can undock whole node by dragging from window/collapse menu button. + - can undock single window by dragging from its tab. + - can still move (but not undock) whole node or whole hierarchy when node is part of a + floating hierarchy. + - added tooltip when hovering the collapse/window menu button, to faciliate understanding + that whole dock node may be undocked or grabbed from here. - Docking: Fixed an issue leading to incorrect restoration of selected tab in dock nodes that don't carry the currently focused window. (#2304) - Docking: added ImGuiDockNodeFlags_NoUndocking. (#2999, #6823, #6780, #3492) - Docking: renamed ImGuiDockNodeFlags_NoSplit to ImGuiDockNodeFlags_NoDockingSplit. - Docking: renamed ImGuiDockNodeFlags_NoDockingInCentralNode to ImGuiDockNodeFlags_NoDockingOverCentralNode. - Docking: Internals: renamed ImGuiDockNodeFlags_NoDockingSplitMe to ImGuiDockNodeFlags_NoDockingSplit. +- Docking: Fixed a bug where ClassId compare tests (when using SetNextWindowClass) on success would + prevent further filter from running, namely the one that prevent docking over a popup. +- Backends: GLFW: Fixed an assertion in situation where the WndProc handler is different between + main and secondary viewport (may happen due to third-party hooks). (#6889) +- Backends: DX9: Fixed incorrect assert triggering on reopening session with minimized windows. (#3424) ----------------------------------------------------------------------- @@ -1597,7 +2008,7 @@ Breaking Changes: - Commented out redirecting functions/enums names that were marked obsolete in 1.67 and 1.69 (March 2019): - ImGui::GetOverlayDrawList() -> use ImGui::GetForegroundDrawList() - ImFont::GlyphRangesBuilder -> use ImFontGlyphRangesBuilder -- Backends: OpenGL3: added a third source file "imgui_impl_opengl3_loader.h". [@rokups] +- Backends: OpenGL3: added a third source file "imgui_impl_opengl3_loader.h". (#4445) [@rokups] - Backends: GLFW: backend now uses glfwSetCursorEnterCallback(). (#3751, #4377, #2445) - Backends: GLFW: backend now uses glfwSetWindowFocusCallback(). (#4388) [@thedmd] - If calling ImGui_ImplGlfw_InitXXX with install_callbacks=true: this is already done for you. @@ -1686,7 +2097,7 @@ Other Changes: about building on 32-bit systems. (#4225) [@kingofthebongo2008] - Backends: OpenGL3: Embed our own minimal GL headers/loader (imgui_impl_opengl3_loader.h) based on gl3w. Reduces the frequent issues and confusion coming from having to support multiple loaders and requiring users to use and - initialize the same loader as the backend. [@rokups] + initialize the same loader as the backend. (#4445) [@rokups] Removed support for gl3w, glew, glad, glad2, glbinding2, glbinding3 (all now unnecessary). - Backends: OpenGL3: Handle GL_CLIP_ORIGIN on <4.5 contexts if "GL_ARB_clip_control" extension is detected. (#4170, #3998) - Backends: OpenGL3: Destroy vertex/fragment shader objects right after they are linked into main shader. (#4244) [@Crowbarous] diff --git a/cimgui/imgui/docs/CONTRIBUTING.md b/cimgui/imgui/docs/CONTRIBUTING.md index 7d6738dc9..5cc9cdb53 100644 --- a/cimgui/imgui/docs/CONTRIBUTING.md +++ b/cimgui/imgui/docs/CONTRIBUTING.md @@ -58,7 +58,7 @@ Steps: - Be mindful that messages are being sent to the mailbox of "Watching" users. Try to proofread your messages before sending them. Edits are not seen by those users unless they browse the site. **Some unfortunate words of warning** -- If you are involved in cheating schemes (e.g. DLL injection) for competitive online multiplayer games, please don't post here. We won't answer and you will be blocked. It doesn't matter if your question relates to said project. We've had too many of you and need to project our time and sanity. +- If you are involved in cheating schemes (e.g. DLL injection) for competitive online multiplayer games, please don't post here. We won't answer and you will be blocked. It doesn't matter if your question relates to said project. We've had too many of you and need to protect our time and sanity. - Due to frequent abuse of this service from the aforementioned users, if your GitHub account is anonymous and was created five minutes ago please understand that your post will receive more scrutiny and incomplete questions will be harshly dismissed. If you have been using Dear ImGui for a while or have been using C/C++ for several years or have demonstrated good behavior here, it is ok to not fulfill every item to the letter. Those are guidelines and experienced users or members of the community will know which information is useful in a given context. diff --git a/cimgui/imgui/docs/FAQ.md b/cimgui/imgui/docs/FAQ.md index dcf144a33..c86cc1368 100644 --- a/cimgui/imgui/docs/FAQ.md +++ b/cimgui/imgui/docs/FAQ.md @@ -125,13 +125,8 @@ void MyLowLevelMouseButtonHandler(int button, bool down) } ``` - **Note:** The `io.WantCaptureMouse` is more correct that any manual attempt to "check if the mouse is hovering a window" (don't do that!). It handles mouse dragging correctly (both dragging that started over your application or over a Dear ImGui window) and handle e.g. popup and modal windows blocking inputs. -**Note:** Those flags are updated by `ImGui::NewFrame()`. However it is generally more correct and easier that you poll flags from the previous frame, then submit your inputs, then call `NewFrame()`. If you attempt to do the opposite (which is generally harder) you are likely going to submit your inputs after `NewFrame()`, and therefore too late. - -**Note:** If you are using a touch device, you may find use for an early call to `UpdateHoveredWindowAndCaptureFlags()` to correctly dispatch your initial touch. We will work on better out-of-the-box touch support in the future. - **Note:** Text input widget releases focus on the "KeyDown" event of the Return key, so the subsequent "KeyUp" event that your application receive will typically have `io.WantCaptureKeyboard == false`. Depending on your application logic it may or not be inconvenient to receive that KeyUp event. You might want to track which key-downs were targeted for Dear ImGui, e.g. with an array of bool, and filter out the corresponding key-ups.) ##### [Return to Index](#index) @@ -217,7 +212,7 @@ Interactive widgets (such as calls to Button buttons) need a unique ID. **Unique IDs are used internally to track active widgets and occasionally associate state to widgets.
Unique IDs are implicitly built from the hash of multiple elements that identify the "path" to the UI element.** -Since Dear ImGui 1.85, you can use `Demo>Tools>Stack Tool` or call `ImGui::ShowStackToolWindow()`. The tool display intermediate values leading to the creation of a unique ID, making things easier to debug and understand. +Since Dear ImGui 1.85, you can use `Demo>Tools>ID Stack Tool` or call `ImGui::ShowIDStackToolWindow()`. The tool display intermediate values leading to the creation of a unique ID, making things easier to debug and understand. ![Stack tool](https://user-images.githubusercontent.com/8225057/136235657-a0ea5665-dcd1-423f-9be6-dc3f8ced8f12.png) @@ -431,7 +426,7 @@ Finally, you may call `ImGui::ShowMetricsWindow()` to explore/visualize/understa ### Q: How can I use maths operators with ImVec2? -We do not export maths operators by default in imgui.h in order to not conflict with the use of your own maths types and maths operators. As a convenience, you may use `#defne IMGUI_DEFINE_MATH_OPERATORS` + `#include "imgui.h"` to access our basic maths operators. +We do not export maths operators by default in imgui.h in order to not conflict with the use of your own maths types and maths operators. As a convenience, you may use `#define IMGUI_DEFINE_MATH_OPERATORS` + `#include "imgui.h"` to access our basic maths operators. ##### [Return to Index](#index) @@ -627,7 +622,7 @@ You may take a look at: - [Quotes](https://github.com/ocornut/imgui/wiki/Quotes) - [Software using Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui) - [Sponsors](https://github.com/ocornut/imgui/wiki/Sponsors) -- [Gallery](https://github.com/ocornut/imgui/issues/6478) +- [Gallery](https://github.com/ocornut/imgui/issues/6897) ##### [Return to Index](#index) @@ -673,7 +668,7 @@ There is an auto-generated [c-api for Dear ImGui (cimgui)](https://github.com/ci - Individuals: you can support continued maintenance and development via PayPal donations. See [README](https://github.com/ocornut/imgui/blob/master/docs/README.md). - If you are experienced with Dear ImGui and C++, look at [GitHub Issues](https://github.com/ocornut/imgui/issues), [GitHub Discussions](https://github.com/ocornut/imgui/discussions), the [Wiki](https://github.com/ocornut/imgui/wiki), read [docs/TODO.txt](https://github.com/ocornut/imgui/blob/master/docs/TODO.txt), and see how you want to help and can help! - Disclose your usage of Dear ImGui via a dev blog post, a tweet, a screenshot, a mention somewhere, etc. -You may post screenshots or links in the [gallery threads](https://github.com/ocornut/imgui/issues/6478). Visuals are ideal as they inspire other programmers. Disclosing your use of Dear ImGui helps the library grow credibility, and helps other teams and programmers with taking decisions. +You may post screenshots or links in the [gallery threads](https://github.com/ocornut/imgui/issues/6897). Visuals are ideal as they inspire other programmers. Disclosing your use of Dear ImGui helps the library grow credibility, and helps other teams and programmers with taking decisions. - If you have issues or if you need to hack into the library, even if you don't expect any support it is useful that you share your issues or sometimes incomplete PR. ##### [Return to Index](#index) diff --git a/cimgui/imgui/docs/FONTS.md b/cimgui/imgui/docs/FONTS.md index b0876a367..df8b610e5 100644 --- a/cimgui/imgui/docs/FONTS.md +++ b/cimgui/imgui/docs/FONTS.md @@ -53,7 +53,7 @@ All loaded fonts glyphs are rendered into a single texture atlas ahead of time. This is often of byproduct of point 3. If you have large number of glyphs or multiple fonts, the texture may become too big for your graphics API. **The typical result of failing to upload a texture is if every glyph or everything appears as empty black or white rectangle.** Mind the fact that some graphics drivers have texture size limitation. If you are building a PC application, mind the fact that your users may use hardware with lower limitations than yours. Some solutions: -- You may reduce oversampling, e.g. `font_config.OversampleH = 1`, this will half your texture size for a quality looss. +- You may reduce oversampling, e.g. `font_config.OversampleH = 1`, this will half your texture size for a quality loss. Note that while OversampleH = 2 looks visibly very close to 3 in most situations, with OversampleH = 1 the quality drop will be noticeable. Read about oversampling [here](https://github.com/nothings/stb/blob/master/tests/oversample). - Reduce glyphs ranges by calculating them from source localization data. You can use the `ImFontGlyphRangesBuilder` for this purpose and rebuilding your atlas between frames when new characters are needed. This will be the biggest win! @@ -404,16 +404,12 @@ ImGui::Text(u8"こんにちは"); // this will always be encoded as UTF-8 ImGui::Text("こんにちは"); // the encoding of this is depending on compiler settings/flags and may be incorrect. ``` -Since C++20, because the C++ committee hate its users, they decided to change the `u8""` syntax to not return `const char*` but a new type `const char_t*` which doesn't cast to `const char*`. +Since C++20, because the C++ committee hate its users, they decided to change the `u8""` syntax to not return `const char*` but a new type `const char8_t*` which doesn't cast to `const char*`. Because of type usage of `u8""` in C++20 is a little more tedious: ```cpp ImGui::Text((const char*)u8"こんにちは"); ``` -We suggest using a macro in your codebase: -```cpp -#define U8(_S) (const char*)u8##_S -ImGui::Text(U8("こんにちは")); -``` +However, you can disable this behavior completely using the compiler option [`/Zc:char8_t-`](https://learn.microsoft.com/en-us/cpp/build/reference/zc-char8-t?view=msvc-170) for MSVC and [`-fno-char8_t`](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1423r3.html) for Clang and GCC. ##### [Return to Index](#index) --------------------------------------- @@ -486,7 +482,7 @@ Some fonts files are available in the `misc/fonts/` folder: #### MONOSPACE FONTS Pixel Perfect: -- Proggy Fonts, by Tristan Grimmer http://www.proggyfonts.net or http://upperbounds.net +- Proggy Fonts, by Tristan Grimmer http://www.proggyfonts.net or http://upperboundsinteractive.com/fonts.php - Sweet16, Sweet16 Mono, by Martin Sedlak (Latin + Supplemental + Extended A) https://github.com/kmar/Sweet16Font (also include an .inl file to use directly in dear imgui.) Regular: diff --git a/cimgui/imgui/docs/README.md b/cimgui/imgui/docs/README.md index 6bcfbff14..a2be7fde2 100644 --- a/cimgui/imgui/docs/README.md +++ b/cimgui/imgui/docs/README.md @@ -16,7 +16,7 @@ Businesses: support continued development and maintenance via invoiced sponsorin | [The Pitch](#the-pitch) - [Usage](#usage) - [How it works](#how-it-works) - [Releases & Changelogs](#releases--changelogs) - [Demo](#demo) - [Integration](#integration) | :----------------------------------------------------------: | | [Gallery](#gallery) - [Support, FAQ](#support-frequently-asked-questions-faq) - [How to help](#how-to-help) - [Sponsors](https://github.com/ocornut/imgui/wiki/Sponsors) - [Credits](#credits) - [License](#license) | -| [Wiki](https://github.com/ocornut/imgui/wiki) - [Languages & frameworks backends/bindings](https://github.com/ocornut/imgui/wiki/Bindings) - [Software using Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui) - [User quotes](https://github.com/ocornut/imgui/wiki/Quotes) | +| [Wiki](https://github.com/ocornut/imgui/wiki) - [Extensions](https://github.com/ocornut/imgui/wiki/Useful-Extensions) - [Languages bindings & frameworks backends](https://github.com/ocornut/imgui/wiki/Bindings) - [Software using Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui) - [User quotes](https://github.com/ocornut/imgui/wiki/Quotes) | ### The Pitch @@ -27,7 +27,7 @@ Dear ImGui is designed to **enable fast iterations** and to **empower programmer Dear ImGui is particularly suited to integration in game engines (for tooling), real-time 3D applications, fullscreen applications, embedded applications, or any applications on console platforms where operating system features are non-standard. - Minimize state synchronization. - - Minimize state storage on user side. + - Minimize UI-related state storage on user side. - Minimize setup and maintenance. - Easy to use to create dynamic UI which are the reflection of a dynamic data set. - Easy to use to create code-driven and data-driven tools. @@ -39,7 +39,7 @@ Dear ImGui is particularly suited to integration in game engines (for tooling), ### Usage -**The core of Dear ImGui is self-contained within a few platform-agnostic files** which you can easily compile in your application/engine. They are all the files in the root folder of the repository (imgui*.cpp, imgui*.h). **No specific build process is required**. You can add the .cpp files into your existing project. +**The core of Dear ImGui is self-contained within a few platform-agnostic files** which you can easily compile in your application/engine. They are all the files in the root folder of the repository (imgui*.cpp, imgui*.h). **No specific build process is required**. You can add the .cpp files into your existing project. **Backends for a variety of graphics API and rendering platforms** are provided in the [backends/](https://github.com/ocornut/imgui/tree/master/backends) folder, along with example applications in the [examples/](https://github.com/ocornut/imgui/tree/master/examples) folder. You may also create your own backend. Anywhere where you can render textured triangles, you can render Dear ImGui. @@ -110,7 +110,7 @@ Reading the changelogs is a good way to keep up to date with the things Dear ImG Calling the `ImGui::ShowDemoWindow()` function will create a demo window showcasing a variety of features and examples. The code is always available for reference in `imgui_demo.cpp`. [Here's how the demo looks](https://raw.githubusercontent.com/wiki/ocornut/imgui/web/v167/v167-misc.png). You should be able to build the examples from sources. If you don't, let us know! If you want to have a quick look at some Dear ImGui features, you can download Windows binaries of the demo app here: -- [imgui-demo-binaries-20230704.zip](https://www.dearimgui.com/binaries/imgui-demo-binaries-20230704.zip) (Windows, 1.89.7, built 2023/07/04, master) or [older binaries](https://www.dearimgui.com/binaries). +- [imgui-demo-binaries-20240105.zip](https://www.dearimgui.com/binaries/imgui-demo-binaries-20240105.zip) (Windows, 1.90.1 WIP, built 2024/01/05, master) or [older binaries](https://www.dearimgui.com/binaries). The demo applications are not DPI aware so expect some blurriness on a 4K screen. For DPI awareness in your application, you can load/reload your font at a different scale and scale your style with `style.ScaleAllSizes()` (see [FAQ](https://www.dearimgui.com/faq)). @@ -128,18 +128,20 @@ Officially maintained backends/bindings (in repository): - Frameworks: Allegro5, Emscripten. [Third-party backends/bindings](https://github.com/ocornut/imgui/wiki/Bindings) wiki page: -- Languages: C, C# and: Beef, ChaiScript, Crystal, D, Go, Haskell, Haxe/hxcpp, Java, JavaScript, Julia, Kotlin, Lobster, Lua, Odin, Pascal, PureBasic, Python, Ruby, Rust, Swift... -- Frameworks: AGS/Adventure Game Studio, Amethyst, Blender, bsf, Cinder, Cocos2d-x, Diligent Engine, Flexium, GML/Game Maker Studio2, GLEQ, Godot, GTK3+OpenGL3, Irrlicht Engine, LÖVE+LUA, Magnum, Monogame, NanoRT, nCine, Nim Game Lib, Nintendo 3DS & Switch (homebrew), Ogre, openFrameworks, OSG/OpenSceneGraph, Orx, Photoshop, px_render, Qt/QtDirect3D, SDL_Renderer, SFML, Sokol, Unity, Unreal Engine 4, vtk, VulkanHpp, VulkanSceneGraph, Win32 GDI, WxWidgets. +- Languages: C, C# and: Beef, ChaiScript, CovScript, Crystal, D, Go, Haskell, Haxe/hxcpp, Java, JavaScript, Julia, Kotlin, Lobster, Lua, Nim, Odin, Pascal, PureBasic, Python, ReaScript, Ruby, Rust, Swift, Zig... +- Frameworks: AGS/Adventure Game Studio, Amethyst, Blender, bsf, Cinder, Cocos2d-x, Defold, Diligent Engine, Ebiten, Flexium, GML/Game Maker Studio, GLEQ, Godot, GTK3, Irrlicht Engine, JUCE, LÖVE+LUA, Mach Engine, Magnum, Marmalade, Monogame, NanoRT, nCine, Nim Game Lib, Nintendo 3DS/Switch/WiiU (homebrew), Ogre, openFrameworks, OSG/OpenSceneGraph, Orx, Photoshop, px_render, Qt/QtDirect3D, raylib, SFML, Sokol, Unity, Unreal Engine 4/5, UWP, vtk, VulkanHpp, VulkanSceneGraph, Win32 GDI, WxWidgets. - Many bindings are auto-generated (by good old [cimgui](https://github.com/cimgui/cimgui) or newer/experimental [dear_bindings](https://github.com/dearimgui/dear_bindings)), you can use their metadata output to generate bindings for other languages. [Useful Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Extensions) wiki page: -- Automation/testing, Text editors, node editors, timeline editors, plotting, software renderers, remote network access, memory editors, gizmos, etc. One of the most notable and well supported extension is [ImPlot](https://github.com/epezent/implot). +- Automation/testing, Text editors, node editors, timeline editors, plotting, software renderers, remote network access, memory editors, gizmos, etc. Notable and well supported extensions include [ImPlot](https://github.com/epezent/implot) and [Dear ImGui Test Engine](https://github.com/ocornut/imgui_test_engine). Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and ideas. ### Gallery -For more user-submitted screenshots of projects using Dear ImGui, check out the [Gallery Threads](https://github.com/ocornut/imgui/issues/6478)! +Examples projects using Dear ImGui: [Tracy](https://github.com/wolfpld/tracy) (profiler), [ImHex](https://github.com/WerWolv/ImHex) (hex editor/data analysis), [RemedyBG](https://remedybg.itch.io/remedybg) (debugger) and [hundreds of others](https://github.com/ocornut/imgui/wiki/Software-using-Dear-ImGui). + +For more user-submitted screenshots of projects using Dear ImGui, check out the [Gallery Threads](https://github.com/ocornut/imgui/issues/6897)! For a list of third-party widgets and extensions, check out the [Useful Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Extensions) wiki page. @@ -160,7 +162,7 @@ See: [Upcoming Changes](https://github.com/ocornut/imgui/wiki/Upcoming-Changes). See: [Dear ImGui Test Engine + Test Suite](https://github.com/ocornut/imgui_test_engine) for Automation & Testing. -Getting started? For first-time users having issues compiling/linking/running or issues loading fonts, please use [GitHub Discussions](https://github.com/ocornut/imgui/discussions). For other questions, bug reports, requests, feedback, you may post on [GitHub Issues](https://github.com/ocornut/imgui/issues). Please read and fill the New Issue template carefully. +Getting started? For first-time users having issues compiling/linking/running or issues loading fonts, please use [GitHub Discussions](https://github.com/ocornut/imgui/discussions). For ANY other questions, bug reports, requests, feedback, please post on [GitHub Issues](https://github.com/ocornut/imgui/issues). Please read and fill the New Issue template carefully. Private support is available for paying business customers (E-mail: _contact @ dearimgui dot com_). @@ -170,17 +172,17 @@ We occasionally tag [Releases](https://github.com/ocornut/imgui/releases) (with **Who uses Dear ImGui?** -See the [Quotes](https://github.com/ocornut/imgui/wiki/Quotes), [Sponsors](https://github.com/ocornut/imgui/wiki/Sponsors), and [Software using Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui) Wiki pages for an idea of who is using Dear ImGui. Please add your game/software if you can! Also, see the [Gallery Threads](https://github.com/ocornut/imgui/issues/6478)! +See the [Quotes](https://github.com/ocornut/imgui/wiki/Quotes), [Sponsors](https://github.com/ocornut/imgui/wiki/Sponsors), and [Software using Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui) Wiki pages for an idea of who is using Dear ImGui. Please add your game/software if you can! Also, see the [Gallery Threads](https://github.com/ocornut/imgui/issues/6897)! How to help ----------- **How can I help?** -- See [GitHub Forum/Issues](https://github.com/ocornut/imgui/issues) and [GitHub Discussions](https://github.com/ocornut/imgui/discussions). +- See [GitHub Forum/Issues](https://github.com/ocornut/imgui/issues). - You may help with development and submit pull requests! Please understand that by submitting a PR you are also submitting a request for the maintainer to review your code and then take over its maintenance forever. PR should be crafted both in the interest of the end-users and also to ease the maintainer into understanding and accepting it. - See [Help wanted](https://github.com/ocornut/imgui/wiki/Help-Wanted) on the [Wiki](https://github.com/ocornut/imgui/wiki/) for some more ideas. -- Have your company financially support this project with invoiced sponsoring/support contracts or by buying a license for [Dear ImGui Test Engine](https://github.com/ocornut/imgui_test_engine) (please reach out: omar AT dearimgui DOT com). +- Be a [sponsor](https://github.com/ocornut/imgui/wiki/Sponsors)! Have your company financially support this project via invoiced sponsors/maintenance or by buying a license for [Dear ImGui Test Engine](https://github.com/ocornut/imgui_test_engine) (please reach out: omar AT dearimgui DOT com). Sponsors -------- @@ -201,13 +203,13 @@ Credits Developed by [Omar Cornut](https://www.miracleworld.net) and every direct or indirect [contributors](https://github.com/ocornut/imgui/graphs/contributors) to the GitHub. The early version of this library was developed with the support of [Media Molecule](https://www.mediamolecule.com) and first used internally on the game [Tearaway](https://tearaway.mediamolecule.com) (PS Vita). -Recurring contributors (2022): Omar Cornut [@ocornut](https://github.com/ocornut), Rokas Kupstys [@rokups](https://github.com/rokups) (a good portion of work on automation system and regression tests now available in [Dear ImGui Test Engine](https://github.com/ocornut/imgui_test_engine)). +Recurring contributors include Rokas Kupstys [@rokups](https://github.com/rokups) (2020-2022): a good portion of work on automation system and regression tests now available in [Dear ImGui Test Engine](https://github.com/ocornut/imgui_test_engine). -Sponsoring, support contracts and other B2B transactions are hosted and handled by [Disco Hello](https://www.discohello.com). +Sponsoring, maintenance/support contracts and other B2B transactions are hosted and handled by [Disco Hello](https://www.discohello.com). Omar: "I first discovered the IMGUI paradigm at [Q-Games](https://www.q-games.com) where Atman Binstock had dropped his own simple implementation in the codebase, which I spent quite some time improving and thinking about. It turned out that Atman was exposed to the concept directly by working with Casey. When I moved to Media Molecule I rewrote a new library trying to overcome the flaws and limitations of the first one I've worked with. It became this library and since then I have spent an unreasonable amount of time iterating and improving it." -Embeds [ProggyClean.ttf](http://upperbounds.net) font by Tristan Grimmer (MIT license). +Embeds [ProggyClean.ttf](https://www.proggyfonts.net) font by Tristan Grimmer (MIT license).
Embeds [stb_textedit.h, stb_truetype.h, stb_rect_pack.h](https://github.com/nothings/stb/) by Sean Barrett (public domain). Inspiration, feedback, and testing for early versions: Casey Muratori, Atman Binstock, Mikko Mononen, Emmanuel Briney, Stefan Kamoda, Anton Mikhailov, Matt Willis. Also thank you to everyone posting feedback, questions and patches on GitHub. diff --git a/cimgui/imgui/docs/TODO.txt b/cimgui/imgui/docs/TODO.txt index 0174cb0a0..4df57e5aa 100644 --- a/cimgui/imgui/docs/TODO.txt +++ b/cimgui/imgui/docs/TODO.txt @@ -126,7 +126,7 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i - separator: expose flags (#759) - separator: take indent into consideration (optional) - - separator: width, thickness, centering (#1643) + - separator: width, thickness, centering (#1643, #2657) - splitter: formalize the splitter idiom into an official api (we want to handle n-way split) (#319) - docking: B: ordering currently held in tab bar should be implicitly held by windows themselves (also see #2304) @@ -215,7 +215,6 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i - tree node / selectable render mismatch which is visible if you use them both next to each other (e.g. cf. property viewer) - tree node: tweak color scheme to distinguish headers from selected tree node (#581) - tree node: leaf/non-leaf highlight mismatch. - - tree node: flag to disable formatting and/or detect "%s" - tree node/opt: could avoid formatting when clipped (flag assuming we don't care about width/height, assume single line height? format only %s/%c to be able to count height?) - settings: write more decent code to allow saving/loading new fields: columns, selected tree nodes? diff --git a/cimgui/imgui/examples/example_emscripten_wgpu/Makefile b/cimgui/imgui/examples/example_emscripten_wgpu/Makefile.emscripten similarity index 100% rename from cimgui/imgui/examples/example_emscripten_wgpu/Makefile rename to cimgui/imgui/examples/example_emscripten_wgpu/Makefile.emscripten diff --git a/cimgui/imgui/examples/example_emscripten_wgpu/README.md b/cimgui/imgui/examples/example_emscripten_wgpu/README.md index c4c4dec76..e60025da2 100644 --- a/cimgui/imgui/examples/example_emscripten_wgpu/README.md +++ b/cimgui/imgui/examples/example_emscripten_wgpu/README.md @@ -6,7 +6,7 @@ - You may also refer to our [Continuous Integration setup](https://github.com/ocornut/imgui/tree/master/.github/workflows) for Emscripten setup. -- Then build using `make` while in the `example_emscripten_wgpu/` directory. +- Then build using `make -f Makefile.emscripten` while in the `example_emscripten_wgpu/` directory. - Requires recent Emscripten as WGPU is still a work-in-progress API. diff --git a/cimgui/imgui/examples/example_emscripten_wgpu/main.cpp b/cimgui/imgui/examples/example_emscripten_wgpu/main.cpp index a2126bcd1..910da0833 100644 --- a/cimgui/imgui/examples/example_emscripten_wgpu/main.cpp +++ b/cimgui/imgui/examples/example_emscripten_wgpu/main.cpp @@ -11,13 +11,20 @@ #include "imgui_impl_glfw.h" #include "imgui_impl_wgpu.h" #include +#ifdef __EMSCRIPTEN__ #include #include #include +#endif #include #include #include +// This example can also compile and run with Emscripten! See 'Makefile.emscripten' for details. +#ifdef __EMSCRIPTEN__ +#include "../libs/emscripten/emscripten_mainloop_stub.h" +#endif + // Global WebGPU required states static WGPUDevice wgpu_device = nullptr; static WGPUSurface wgpu_surface = nullptr; @@ -27,15 +34,32 @@ static int wgpu_swap_chain_width = 0; static int wgpu_swap_chain_height = 0; // Forward declarations -static void MainLoopStep(void* window); static bool InitWGPU(); -static void print_glfw_error(int error, const char* description); -static void print_wgpu_error(WGPUErrorType error_type, const char* message, void*); +static void CreateSwapChain(int width, int height); + +static void glfw_error_callback(int error, const char* description) +{ + printf("GLFW Error %d: %s\n", error, description); +} + +static void wgpu_error_callback(WGPUErrorType error_type, const char* message, void*) +{ + const char* error_type_lbl = ""; + switch (error_type) + { + case WGPUErrorType_Validation: error_type_lbl = "Validation"; break; + case WGPUErrorType_OutOfMemory: error_type_lbl = "Out of memory"; break; + case WGPUErrorType_Unknown: error_type_lbl = "Unknown"; break; + case WGPUErrorType_DeviceLost: error_type_lbl = "Device lost"; break; + default: error_type_lbl = "Unknown"; + } + printf("%s error: %s\n", error_type_lbl, message); +} // Main code int main(int, char**) { - glfwSetErrorCallback(print_glfw_error); + glfwSetErrorCallback(glfw_error_callback); if (!glfwInit()) return 1; @@ -43,11 +67,8 @@ int main(int, char**) // This needs to be done explicitly later. glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API); GLFWwindow* window = glfwCreateWindow(1280, 720, "Dear ImGui GLFW+WebGPU example", nullptr, nullptr); - if (!window) - { - glfwTerminate(); + if (window == nullptr) return 1; - } // Initialize the WebGPU environment if (!InitWGPU()) @@ -66,17 +87,21 @@ int main(int, char**) io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls - // For an Emscripten build we are disabling file-system access, so let's not attempt to do a fopen() of the imgui.ini file. - // You may manually call LoadIniSettingsFromMemory() to load settings from your own storage. - io.IniFilename = nullptr; - // Setup Dear ImGui style ImGui::StyleColorsDark(); //ImGui::StyleColorsLight(); // Setup Platform/Renderer backends ImGui_ImplGlfw_InitForOther(window, true); - ImGui_ImplWGPU_Init(wgpu_device, 3, wgpu_preferred_fmt, WGPUTextureFormat_Undefined); +#ifdef __EMSCRIPTEN__ + ImGui_ImplGlfw_InstallEmscriptenCanvasResizeCallback("#canvas"); +#endif + ImGui_ImplWGPU_InitInfo init_info; + init_info.Device = wgpu_device; + init_info.NumFramesInFlight = 3; + init_info.RenderTargetFormat = wgpu_preferred_fmt; + init_info.DepthStencilFormat = WGPUTextureFormat_Undefined; + ImGui_ImplWGPU_Init(&init_info); // Load Fonts // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them. @@ -98,10 +123,117 @@ int main(int, char**) //IM_ASSERT(font != nullptr); #endif - // This function will directly return and exit the main function. - // Make sure that no required objects get cleaned up. - // This way we can use the browsers 'requestAnimationFrame' to control the rendering. - emscripten_set_main_loop_arg(MainLoopStep, window, 0, false); + // Our state + bool show_demo_window = true; + bool show_another_window = false; + ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f); + + // Main loop +#ifdef __EMSCRIPTEN__ + // For an Emscripten build we are disabling file-system access, so let's not attempt to do a fopen() of the imgui.ini file. + // You may manually call LoadIniSettingsFromMemory() to load settings from your own storage. + io.IniFilename = nullptr; + EMSCRIPTEN_MAINLOOP_BEGIN +#else + while (!glfwWindowShouldClose(window)) +#endif + { + // Poll and handle events (inputs, window resize, etc.) + // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs. + // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data. + // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data. + // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags. + glfwPollEvents(); + + // React to changes in screen size + int width, height; + glfwGetFramebufferSize((GLFWwindow*)window, &width, &height); + if (width != wgpu_swap_chain_width && height != wgpu_swap_chain_height) + { + ImGui_ImplWGPU_InvalidateDeviceObjects(); + CreateSwapChain(width, height); + ImGui_ImplWGPU_CreateDeviceObjects(); + } + + // Start the Dear ImGui frame + ImGui_ImplWGPU_NewFrame(); + ImGui_ImplGlfw_NewFrame(); + ImGui::NewFrame(); + + // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!). + if (show_demo_window) + ImGui::ShowDemoWindow(&show_demo_window); + + // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window. + { + static float f = 0.0f; + static int counter = 0; + + ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it. + + ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too) + ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state + ImGui::Checkbox("Another Window", &show_another_window); + + ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f + ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color + + if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated) + counter++; + ImGui::SameLine(); + ImGui::Text("counter = %d", counter); + + ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate); + ImGui::End(); + } + + // 3. Show another simple window. + if (show_another_window) + { + ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked) + ImGui::Text("Hello from another window!"); + if (ImGui::Button("Close Me")) + show_another_window = false; + ImGui::End(); + } + + // Rendering + ImGui::Render(); + + WGPURenderPassColorAttachment color_attachments = {}; + color_attachments.loadOp = WGPULoadOp_Clear; + color_attachments.storeOp = WGPUStoreOp_Store; + color_attachments.clearValue = { clear_color.x * clear_color.w, clear_color.y * clear_color.w, clear_color.z * clear_color.w, clear_color.w }; + color_attachments.view = wgpuSwapChainGetCurrentTextureView(wgpu_swap_chain); + + WGPURenderPassDescriptor render_pass_desc = {}; + render_pass_desc.colorAttachmentCount = 1; + render_pass_desc.colorAttachments = &color_attachments; + render_pass_desc.depthStencilAttachment = nullptr; + + WGPUCommandEncoderDescriptor enc_desc = {}; + WGPUCommandEncoder encoder = wgpuDeviceCreateCommandEncoder(wgpu_device, &enc_desc); + + WGPURenderPassEncoder pass = wgpuCommandEncoderBeginRenderPass(encoder, &render_pass_desc); + ImGui_ImplWGPU_RenderDrawData(ImGui::GetDrawData(), pass); + wgpuRenderPassEncoderEnd(pass); + + WGPUCommandBufferDescriptor cmd_buffer_desc = {}; + WGPUCommandBuffer cmd_buffer = wgpuCommandEncoderFinish(encoder, &cmd_buffer_desc); + WGPUQueue queue = wgpuDeviceGetQueue(wgpu_device); + wgpuQueueSubmit(queue, 1, &cmd_buffer); + } +#ifdef __EMSCRIPTEN__ + EMSCRIPTEN_MAINLOOP_END; +#endif + + // Cleanup + ImGui_ImplWGPU_Shutdown(); + ImGui_ImplGlfw_Shutdown(); + ImGui::DestroyContext(); + + glfwDestroyWindow(window); + glfwTerminate(); return 0; } @@ -112,7 +244,7 @@ static bool InitWGPU() if (!wgpu_device) return false; - wgpuDeviceSetUncapturedErrorCallback(wgpu_device, print_wgpu_error, nullptr); + wgpuDeviceSetUncapturedErrorCallback(wgpu_device, wgpu_error_callback, nullptr); // Use C++ wrapper due to misbehavior in Emscripten. // Some offset computation for wgpuInstanceCreateSurface in JavaScript @@ -127,127 +259,22 @@ static bool InitWGPU() wgpu::Surface surface = instance.CreateSurface(&surface_desc); wgpu::Adapter adapter = {}; wgpu_preferred_fmt = (WGPUTextureFormat)surface.GetPreferredFormat(adapter); - wgpu_surface = surface.Release(); + wgpu_surface = surface.MoveToCHandle(); return true; } -static void MainLoopStep(void* window) +static void CreateSwapChain(int width, int height) { - ImGuiIO& io = ImGui::GetIO(); - - glfwPollEvents(); - - int width, height; - glfwGetFramebufferSize((GLFWwindow*)window, &width, &height); - - // React to changes in screen size - if (width != wgpu_swap_chain_width && height != wgpu_swap_chain_height) - { - ImGui_ImplWGPU_InvalidateDeviceObjects(); - if (wgpu_swap_chain) - wgpuSwapChainRelease(wgpu_swap_chain); - wgpu_swap_chain_width = width; - wgpu_swap_chain_height = height; - WGPUSwapChainDescriptor swap_chain_desc = {}; - swap_chain_desc.usage = WGPUTextureUsage_RenderAttachment; - swap_chain_desc.format = wgpu_preferred_fmt; - swap_chain_desc.width = width; - swap_chain_desc.height = height; - swap_chain_desc.presentMode = WGPUPresentMode_Fifo; - wgpu_swap_chain = wgpuDeviceCreateSwapChain(wgpu_device, wgpu_surface, &swap_chain_desc); - ImGui_ImplWGPU_CreateDeviceObjects(); - } - - // Start the Dear ImGui frame - ImGui_ImplWGPU_NewFrame(); - ImGui_ImplGlfw_NewFrame(); - ImGui::NewFrame(); - - // Our state - // (we use static, which essentially makes the variable globals, as a convenience to keep the example code easy to follow) - static bool show_demo_window = true; - static bool show_another_window = false; - static ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f); - - // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!). - if (show_demo_window) - ImGui::ShowDemoWindow(&show_demo_window); - - // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window. - { - static float f = 0.0f; - static int counter = 0; - - ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it. - - ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too) - ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state - ImGui::Checkbox("Another Window", &show_another_window); - - ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f - ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color - - if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated) - counter++; - ImGui::SameLine(); - ImGui::Text("counter = %d", counter); - - ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate); - ImGui::End(); - } - - // 3. Show another simple window. - if (show_another_window) - { - ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked) - ImGui::Text("Hello from another window!"); - if (ImGui::Button("Close Me")) - show_another_window = false; - ImGui::End(); - } - - // Rendering - ImGui::Render(); - - WGPURenderPassColorAttachment color_attachments = {}; - color_attachments.loadOp = WGPULoadOp_Clear; - color_attachments.storeOp = WGPUStoreOp_Store; - color_attachments.clearValue = { clear_color.x * clear_color.w, clear_color.y * clear_color.w, clear_color.z * clear_color.w, clear_color.w }; - color_attachments.view = wgpuSwapChainGetCurrentTextureView(wgpu_swap_chain); - WGPURenderPassDescriptor render_pass_desc = {}; - render_pass_desc.colorAttachmentCount = 1; - render_pass_desc.colorAttachments = &color_attachments; - render_pass_desc.depthStencilAttachment = nullptr; - - WGPUCommandEncoderDescriptor enc_desc = {}; - WGPUCommandEncoder encoder = wgpuDeviceCreateCommandEncoder(wgpu_device, &enc_desc); - - WGPURenderPassEncoder pass = wgpuCommandEncoderBeginRenderPass(encoder, &render_pass_desc); - ImGui_ImplWGPU_RenderDrawData(ImGui::GetDrawData(), pass); - wgpuRenderPassEncoderEnd(pass); - - WGPUCommandBufferDescriptor cmd_buffer_desc = {}; - WGPUCommandBuffer cmd_buffer = wgpuCommandEncoderFinish(encoder, &cmd_buffer_desc); - WGPUQueue queue = wgpuDeviceGetQueue(wgpu_device); - wgpuQueueSubmit(queue, 1, &cmd_buffer); -} - -static void print_glfw_error(int error, const char* description) -{ - printf("GLFW Error %d: %s\n", error, description); -} - -static void print_wgpu_error(WGPUErrorType error_type, const char* message, void*) -{ - const char* error_type_lbl = ""; - switch (error_type) - { - case WGPUErrorType_Validation: error_type_lbl = "Validation"; break; - case WGPUErrorType_OutOfMemory: error_type_lbl = "Out of memory"; break; - case WGPUErrorType_Unknown: error_type_lbl = "Unknown"; break; - case WGPUErrorType_DeviceLost: error_type_lbl = "Device lost"; break; - default: error_type_lbl = "Unknown"; - } - printf("%s error: %s\n", error_type_lbl, message); + if (wgpu_swap_chain) + wgpuSwapChainRelease(wgpu_swap_chain); + wgpu_swap_chain_width = width; + wgpu_swap_chain_height = height; + WGPUSwapChainDescriptor swap_chain_desc = {}; + swap_chain_desc.usage = WGPUTextureUsage_RenderAttachment; + swap_chain_desc.format = wgpu_preferred_fmt; + swap_chain_desc.width = width; + swap_chain_desc.height = height; + swap_chain_desc.presentMode = WGPUPresentMode_Fifo; + wgpu_swap_chain = wgpuDeviceCreateSwapChain(wgpu_device, wgpu_surface, &swap_chain_desc); } diff --git a/cimgui/imgui/examples/example_glfw_metal/Makefile b/cimgui/imgui/examples/example_glfw_metal/Makefile index 82d5ac962..32a7aeca2 100644 --- a/cimgui/imgui/examples/example_glfw_metal/Makefile +++ b/cimgui/imgui/examples/example_glfw_metal/Makefile @@ -14,10 +14,10 @@ SOURCES += $(IMGUI_DIR)/backends/imgui_impl_glfw.cpp $(IMGUI_DIR)/backends/imgui OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES)))) LIBS = -framework Metal -framework MetalKit -framework Cocoa -framework IOKit -framework CoreVideo -framework QuartzCore -LIBS += -L/usr/local/lib -L/opt/homebrew/lib +LIBS += -L/usr/local/lib -L/opt/homebrew/lib -L/opt/local/lib LIBS += -lglfw -CXXFLAGS = -std=c++11 -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends -I/usr/local/include -I/opt/homebrew/include +CXXFLAGS = -std=c++11 -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends -I/usr/local/include -I/opt/homebrew/include -I/opt/local/include CXXFLAGS += -Wall -Wformat CFLAGS = $(CXXFLAGS) diff --git a/cimgui/imgui/examples/example_glfw_opengl3/Makefile.emscripten b/cimgui/imgui/examples/example_glfw_opengl3/Makefile.emscripten index 8ea4eacfc..bd972abff 100644 --- a/cimgui/imgui/examples/example_glfw_opengl3/Makefile.emscripten +++ b/cimgui/imgui/examples/example_glfw_opengl3/Makefile.emscripten @@ -59,7 +59,7 @@ endif CPPFLAGS += -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends #CPPFLAGS += -g CPPFLAGS += -Wall -Wformat -Os $(EMS) -# LDFLAGS += --shell-file ../libs/emscripten/shell_minimal.html +LDFLAGS += --shell-file ../libs/emscripten/shell_minimal.html LDFLAGS += $(EMS) ##--------------------------------------------------------------------- diff --git a/cimgui/imgui/examples/example_glfw_opengl3/main.cpp b/cimgui/imgui/examples/example_glfw_opengl3/main.cpp index 2e369fbfe..4aaf40646 100644 --- a/cimgui/imgui/examples/example_glfw_opengl3/main.cpp +++ b/cimgui/imgui/examples/example_glfw_opengl3/main.cpp @@ -96,6 +96,9 @@ int main(int, char**) // Setup Platform/Renderer backends ImGui_ImplGlfw_InitForOpenGL(window, true); +#ifdef __EMSCRIPTEN__ + ImGui_ImplGlfw_InstallEmscriptenCanvasResizeCallback("#canvas"); +#endif ImGui_ImplOpenGL3_Init(glsl_version); // Load Fonts diff --git a/cimgui/imgui/examples/example_glfw_vulkan/main.cpp b/cimgui/imgui/examples/example_glfw_vulkan/main.cpp index 7d0a05fb2..c852e5f4d 100644 --- a/cimgui/imgui/examples/example_glfw_vulkan/main.cpp +++ b/cimgui/imgui/examples/example_glfw_vulkan/main.cpp @@ -31,9 +31,9 @@ #pragma comment(lib, "legacy_stdio_definitions") #endif -//#define IMGUI_UNLIMITED_FRAME_RATE +//#define APP_USE_UNLIMITED_FRAME_RATE #ifdef _DEBUG -#define IMGUI_VULKAN_DEBUG_REPORT +#define APP_USE_VULKAN_DEBUG_REPORT #endif // Data @@ -64,14 +64,14 @@ static void check_vk_result(VkResult err) abort(); } -#ifdef IMGUI_VULKAN_DEBUG_REPORT +#ifdef APP_USE_VULKAN_DEBUG_REPORT static VKAPI_ATTR VkBool32 VKAPI_CALL debug_report(VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage, void* pUserData) { (void)flags; (void)object; (void)location; (void)messageCode; (void)pUserData; (void)pLayerPrefix; // Unused arguments fprintf(stderr, "[vulkan] Debug report from ObjectType: %i\nMessage: %s\n\n", objectType, pMessage); return VK_FALSE; } -#endif // IMGUI_VULKAN_DEBUG_REPORT +#endif // APP_USE_VULKAN_DEBUG_REPORT static bool IsExtensionAvailable(const ImVector& properties, const char* extension) { @@ -139,7 +139,7 @@ static void SetupVulkan(ImVector instance_extensions) #endif // Enabling validation layers -#ifdef IMGUI_VULKAN_DEBUG_REPORT +#ifdef APP_USE_VULKAN_DEBUG_REPORT const char* layers[] = { "VK_LAYER_KHRONOS_validation" }; create_info.enabledLayerCount = 1; create_info.ppEnabledLayerNames = layers; @@ -153,7 +153,7 @@ static void SetupVulkan(ImVector instance_extensions) check_vk_result(err); // Setup the debug report callback -#ifdef IMGUI_VULKAN_DEBUG_REPORT +#ifdef APP_USE_VULKAN_DEBUG_REPORT auto vkCreateDebugReportCallbackEXT = (PFN_vkCreateDebugReportCallbackEXT)vkGetInstanceProcAddr(g_Instance, "vkCreateDebugReportCallbackEXT"); IM_ASSERT(vkCreateDebugReportCallbackEXT != nullptr); VkDebugReportCallbackCreateInfoEXT debug_report_ci = {}; @@ -258,7 +258,7 @@ static void SetupVulkanWindow(ImGui_ImplVulkanH_Window* wd, VkSurfaceKHR surface wd->SurfaceFormat = ImGui_ImplVulkanH_SelectSurfaceFormat(g_PhysicalDevice, wd->Surface, requestSurfaceImageFormat, (size_t)IM_ARRAYSIZE(requestSurfaceImageFormat), requestSurfaceColorSpace); // Select Present Mode -#ifdef IMGUI_UNLIMITED_FRAME_RATE +#ifdef APP_USE_UNLIMITED_FRAME_RATE VkPresentModeKHR present_modes[] = { VK_PRESENT_MODE_MAILBOX_KHR, VK_PRESENT_MODE_IMMEDIATE_KHR, VK_PRESENT_MODE_FIFO_KHR }; #else VkPresentModeKHR present_modes[] = { VK_PRESENT_MODE_FIFO_KHR }; @@ -275,11 +275,11 @@ static void CleanupVulkan() { vkDestroyDescriptorPool(g_Device, g_DescriptorPool, g_Allocator); -#ifdef IMGUI_VULKAN_DEBUG_REPORT +#ifdef APP_USE_VULKAN_DEBUG_REPORT // Remove the debug report callback auto vkDestroyDebugReportCallbackEXT = (PFN_vkDestroyDebugReportCallbackEXT)vkGetInstanceProcAddr(g_Instance, "vkDestroyDebugReportCallbackEXT"); vkDestroyDebugReportCallbackEXT(g_Instance, g_DebugReport, g_Allocator); -#endif // IMGUI_VULKAN_DEBUG_REPORT +#endif // APP_USE_VULKAN_DEBUG_REPORT vkDestroyDevice(g_Device, g_Allocator); vkDestroyInstance(g_Instance, g_Allocator); @@ -376,7 +376,7 @@ static void FramePresent(ImGui_ImplVulkanH_Window* wd) return; } check_vk_result(err); - wd->SemaphoreIndex = (wd->SemaphoreIndex + 1) % wd->ImageCount; // Now we can use the next set of semaphores + wd->SemaphoreIndex = (wd->SemaphoreIndex + 1) % wd->SemaphoreCount; // Now we can use the next set of semaphores } // Main code @@ -446,13 +446,14 @@ int main(int, char**) init_info.Queue = g_Queue; init_info.PipelineCache = g_PipelineCache; init_info.DescriptorPool = g_DescriptorPool; + init_info.RenderPass = wd->RenderPass; init_info.Subpass = 0; init_info.MinImageCount = g_MinImageCount; init_info.ImageCount = wd->ImageCount; init_info.MSAASamples = VK_SAMPLE_COUNT_1_BIT; init_info.Allocator = g_Allocator; init_info.CheckVkResultFn = check_vk_result; - ImGui_ImplVulkan_Init(&init_info, wd->RenderPass); + ImGui_ImplVulkan_Init(&init_info); // Load Fonts // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them. @@ -470,36 +471,6 @@ int main(int, char**) //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, nullptr, io.Fonts->GetGlyphRangesJapanese()); //IM_ASSERT(font != nullptr); - // Upload Fonts - { - // Use any command queue - VkCommandPool command_pool = wd->Frames[wd->FrameIndex].CommandPool; - VkCommandBuffer command_buffer = wd->Frames[wd->FrameIndex].CommandBuffer; - - err = vkResetCommandPool(g_Device, command_pool, 0); - check_vk_result(err); - VkCommandBufferBeginInfo begin_info = {}; - begin_info.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO; - begin_info.flags |= VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT; - err = vkBeginCommandBuffer(command_buffer, &begin_info); - check_vk_result(err); - - ImGui_ImplVulkan_CreateFontsTexture(command_buffer); - - VkSubmitInfo end_info = {}; - end_info.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO; - end_info.commandBufferCount = 1; - end_info.pCommandBuffers = &command_buffer; - err = vkEndCommandBuffer(command_buffer); - check_vk_result(err); - err = vkQueueSubmit(g_Queue, 1, &end_info, VK_NULL_HANDLE); - check_vk_result(err); - - err = vkDeviceWaitIdle(g_Device); - check_vk_result(err); - ImGui_ImplVulkan_DestroyFontUploadObjects(); - } - // Our state bool show_demo_window = true; bool show_another_window = false; diff --git a/cimgui/imgui/examples/example_sdl2_directx11/main.cpp b/cimgui/imgui/examples/example_sdl2_directx11/main.cpp index 69d4da11c..70fc5f849 100644 --- a/cimgui/imgui/examples/example_sdl2_directx11/main.cpp +++ b/cimgui/imgui/examples/example_sdl2_directx11/main.cpp @@ -47,6 +47,12 @@ int main(int, char**) // Setup window SDL_WindowFlags window_flags = (SDL_WindowFlags)(SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI); SDL_Window* window = SDL_CreateWindow("Dear ImGui SDL2+DirectX11 example", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 1280, 720, window_flags); + if (window == nullptr) + { + printf("Error: SDL_CreateWindow(): %s\n", SDL_GetError()); + return -1; + } + SDL_SysWMinfo wmInfo; SDL_VERSION(&wmInfo.version); SDL_GetWindowWMInfo(window, &wmInfo); diff --git a/cimgui/imgui/examples/example_sdl2_opengl2/main.cpp b/cimgui/imgui/examples/example_sdl2_opengl2/main.cpp index f4f1f2138..f92c54ebd 100644 --- a/cimgui/imgui/examples/example_sdl2_opengl2/main.cpp +++ b/cimgui/imgui/examples/example_sdl2_opengl2/main.cpp @@ -41,6 +41,12 @@ int main(int, char**) SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2); SDL_WindowFlags window_flags = (SDL_WindowFlags)(SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI); SDL_Window* window = SDL_CreateWindow("Dear ImGui SDL2+OpenGL example", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 1280, 720, window_flags); + if (window == nullptr) + { + printf("Error: SDL_CreateWindow(): %s\n", SDL_GetError()); + return -1; + } + SDL_GLContext gl_context = SDL_GL_CreateContext(window); SDL_GL_MakeCurrent(window, gl_context); SDL_GL_SetSwapInterval(1); // Enable vsync diff --git a/cimgui/imgui/examples/example_sdl2_opengl3/main.cpp b/cimgui/imgui/examples/example_sdl2_opengl3/main.cpp index e298e0a41..9f983d956 100644 --- a/cimgui/imgui/examples/example_sdl2_opengl3/main.cpp +++ b/cimgui/imgui/examples/example_sdl2_opengl3/main.cpp @@ -68,6 +68,12 @@ int main(int, char**) SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 8); SDL_WindowFlags window_flags = (SDL_WindowFlags)(SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI); SDL_Window* window = SDL_CreateWindow("Dear ImGui SDL2+OpenGL3 example", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 1280, 720, window_flags); + if (window == nullptr) + { + printf("Error: SDL_CreateWindow(): %s\n", SDL_GetError()); + return -1; + } + SDL_GLContext gl_context = SDL_GL_CreateContext(window); SDL_GL_MakeCurrent(window, gl_context); SDL_GL_SetSwapInterval(1); // Enable vsync diff --git a/cimgui/imgui/examples/example_sdl2_sdlrenderer2/main.cpp b/cimgui/imgui/examples/example_sdl2_sdlrenderer2/main.cpp index bc7603eeb..bfba8fa6a 100644 --- a/cimgui/imgui/examples/example_sdl2_sdlrenderer2/main.cpp +++ b/cimgui/imgui/examples/example_sdl2_sdlrenderer2/main.cpp @@ -38,6 +38,11 @@ int main(int, char**) // Create window with SDL_Renderer graphics context SDL_WindowFlags window_flags = (SDL_WindowFlags)(SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI); SDL_Window* window = SDL_CreateWindow("Dear ImGui SDL2+SDL_Renderer example", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 1280, 720, window_flags); + if (window == nullptr) + { + printf("Error: SDL_CreateWindow(): %s\n", SDL_GetError()); + return -1; + } SDL_Renderer* renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_ACCELERATED); if (renderer == nullptr) { diff --git a/cimgui/imgui/examples/example_sdl2_vulkan/main.cpp b/cimgui/imgui/examples/example_sdl2_vulkan/main.cpp index 7d353d46d..3fdba88b3 100644 --- a/cimgui/imgui/examples/example_sdl2_vulkan/main.cpp +++ b/cimgui/imgui/examples/example_sdl2_vulkan/main.cpp @@ -23,9 +23,9 @@ #include //#include -//#define IMGUI_UNLIMITED_FRAME_RATE +//#define APP_USE_UNLIMITED_FRAME_RATE #ifdef _DEBUG -#define IMGUI_VULKAN_DEBUG_REPORT +#define APP_USE_VULKAN_DEBUG_REPORT #endif // Data @@ -52,14 +52,14 @@ static void check_vk_result(VkResult err) abort(); } -#ifdef IMGUI_VULKAN_DEBUG_REPORT +#ifdef APP_USE_VULKAN_DEBUG_REPORT static VKAPI_ATTR VkBool32 VKAPI_CALL debug_report(VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage, void* pUserData) { (void)flags; (void)object; (void)location; (void)messageCode; (void)pUserData; (void)pLayerPrefix; // Unused arguments fprintf(stderr, "[vulkan] Debug report from ObjectType: %i\nMessage: %s\n\n", objectType, pMessage); return VK_FALSE; } -#endif // IMGUI_VULKAN_DEBUG_REPORT +#endif // APP_USE_VULKAN_DEBUG_REPORT static bool IsExtensionAvailable(const ImVector& properties, const char* extension) { @@ -127,7 +127,7 @@ static void SetupVulkan(ImVector instance_extensions) #endif // Enabling validation layers -#ifdef IMGUI_VULKAN_DEBUG_REPORT +#ifdef APP_USE_VULKAN_DEBUG_REPORT const char* layers[] = { "VK_LAYER_KHRONOS_validation" }; create_info.enabledLayerCount = 1; create_info.ppEnabledLayerNames = layers; @@ -141,7 +141,7 @@ static void SetupVulkan(ImVector instance_extensions) check_vk_result(err); // Setup the debug report callback -#ifdef IMGUI_VULKAN_DEBUG_REPORT +#ifdef APP_USE_VULKAN_DEBUG_REPORT auto vkCreateDebugReportCallbackEXT = (PFN_vkCreateDebugReportCallbackEXT)vkGetInstanceProcAddr(g_Instance, "vkCreateDebugReportCallbackEXT"); IM_ASSERT(vkCreateDebugReportCallbackEXT != nullptr); VkDebugReportCallbackCreateInfoEXT debug_report_ci = {}; @@ -246,7 +246,7 @@ static void SetupVulkanWindow(ImGui_ImplVulkanH_Window* wd, VkSurfaceKHR surface wd->SurfaceFormat = ImGui_ImplVulkanH_SelectSurfaceFormat(g_PhysicalDevice, wd->Surface, requestSurfaceImageFormat, (size_t)IM_ARRAYSIZE(requestSurfaceImageFormat), requestSurfaceColorSpace); // Select Present Mode -#ifdef IMGUI_UNLIMITED_FRAME_RATE +#ifdef APP_UNLIMITED_FRAME_RATE VkPresentModeKHR present_modes[] = { VK_PRESENT_MODE_MAILBOX_KHR, VK_PRESENT_MODE_IMMEDIATE_KHR, VK_PRESENT_MODE_FIFO_KHR }; #else VkPresentModeKHR present_modes[] = { VK_PRESENT_MODE_FIFO_KHR }; @@ -263,11 +263,11 @@ static void CleanupVulkan() { vkDestroyDescriptorPool(g_Device, g_DescriptorPool, g_Allocator); -#ifdef IMGUI_VULKAN_DEBUG_REPORT +#ifdef APP_USE_VULKAN_DEBUG_REPORT // Remove the debug report callback auto vkDestroyDebugReportCallbackEXT = (PFN_vkDestroyDebugReportCallbackEXT)vkGetInstanceProcAddr(g_Instance, "vkDestroyDebugReportCallbackEXT"); vkDestroyDebugReportCallbackEXT(g_Instance, g_DebugReport, g_Allocator); -#endif // IMGUI_VULKAN_DEBUG_REPORT +#endif // APP_USE_VULKAN_DEBUG_REPORT vkDestroyDevice(g_Device, g_Allocator); vkDestroyInstance(g_Instance, g_Allocator); @@ -364,7 +364,7 @@ static void FramePresent(ImGui_ImplVulkanH_Window* wd) return; } check_vk_result(err); - wd->SemaphoreIndex = (wd->SemaphoreIndex + 1) % wd->ImageCount; // Now we can use the next set of semaphores + wd->SemaphoreIndex = (wd->SemaphoreIndex + 1) % wd->SemaphoreCount; // Now we can use the next set of semaphores } // Main code @@ -385,6 +385,11 @@ int main(int, char**) // Create window with Vulkan graphics context SDL_WindowFlags window_flags = (SDL_WindowFlags)(SDL_WINDOW_VULKAN | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI); SDL_Window* window = SDL_CreateWindow("Dear ImGui SDL2+Vulkan example", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 1280, 720, window_flags); + if (window == nullptr) + { + printf("Error: SDL_CreateWindow(): %s\n", SDL_GetError()); + return -1; + } ImVector extensions; uint32_t extensions_count = 0; @@ -441,13 +446,14 @@ int main(int, char**) init_info.Queue = g_Queue; init_info.PipelineCache = g_PipelineCache; init_info.DescriptorPool = g_DescriptorPool; + init_info.RenderPass = wd->RenderPass; init_info.Subpass = 0; init_info.MinImageCount = g_MinImageCount; init_info.ImageCount = wd->ImageCount; init_info.MSAASamples = VK_SAMPLE_COUNT_1_BIT; init_info.Allocator = g_Allocator; init_info.CheckVkResultFn = check_vk_result; - ImGui_ImplVulkan_Init(&init_info, wd->RenderPass); + ImGui_ImplVulkan_Init(&init_info); // Load Fonts // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them. @@ -465,36 +471,6 @@ int main(int, char**) //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, nullptr, io.Fonts->GetGlyphRangesJapanese()); //IM_ASSERT(font != nullptr); - // Upload Fonts - { - // Use any command queue - VkCommandPool command_pool = wd->Frames[wd->FrameIndex].CommandPool; - VkCommandBuffer command_buffer = wd->Frames[wd->FrameIndex].CommandBuffer; - - err = vkResetCommandPool(g_Device, command_pool, 0); - check_vk_result(err); - VkCommandBufferBeginInfo begin_info = {}; - begin_info.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO; - begin_info.flags |= VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT; - err = vkBeginCommandBuffer(command_buffer, &begin_info); - check_vk_result(err); - - ImGui_ImplVulkan_CreateFontsTexture(command_buffer); - - VkSubmitInfo end_info = {}; - end_info.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO; - end_info.commandBufferCount = 1; - end_info.pCommandBuffers = &command_buffer; - err = vkEndCommandBuffer(command_buffer); - check_vk_result(err); - err = vkQueueSubmit(g_Queue, 1, &end_info, VK_NULL_HANDLE); - check_vk_result(err); - - err = vkDeviceWaitIdle(g_Device); - check_vk_result(err); - ImGui_ImplVulkan_DestroyFontUploadObjects(); - } - // Our state bool show_demo_window = true; bool show_another_window = false; diff --git a/cimgui/imgui/examples/example_sdl3_opengl3/main.cpp b/cimgui/imgui/examples/example_sdl3_opengl3/main.cpp index 8d1ff954c..da88b7f34 100644 --- a/cimgui/imgui/examples/example_sdl3_opengl3/main.cpp +++ b/cimgui/imgui/examples/example_sdl3_opengl3/main.cpp @@ -64,7 +64,7 @@ int main(int, char**) SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24); SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 8); - SDL_WindowFlags window_flags = (SDL_WindowFlags)(SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE | SDL_WINDOW_HIDDEN); + Uint32 window_flags = SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE | SDL_WINDOW_HIDDEN; SDL_Window* window = SDL_CreateWindow("Dear ImGui SDL3+OpenGL3 example", 1280, 720, window_flags); if (window == nullptr) { diff --git a/cimgui/imgui/examples/example_sdl3_sdlrenderer3/main.cpp b/cimgui/imgui/examples/example_sdl3_sdlrenderer3/main.cpp index 3b8e78917..9740054e5 100644 --- a/cimgui/imgui/examples/example_sdl3_sdlrenderer3/main.cpp +++ b/cimgui/imgui/examples/example_sdl3_sdlrenderer3/main.cpp @@ -35,19 +35,19 @@ int main(int, char**) SDL_SetHint(SDL_HINT_IME_SHOW_UI, "1"); // Create window with SDL_Renderer graphics context - SDL_WindowFlags window_flags = (SDL_WindowFlags)(SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE | SDL_WINDOW_HIDDEN); + Uint32 window_flags = SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE | SDL_WINDOW_HIDDEN; SDL_Window* window = SDL_CreateWindow("Dear ImGui SDL3+SDL_Renderer example", 1280, 720, window_flags); if (window == nullptr) { printf("Error: SDL_CreateWindow(): %s\n", SDL_GetError()); return -1; } - SDL_Renderer* renderer = SDL_CreateRenderer(window, NULL, SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_ACCELERATED); + SDL_Renderer* renderer = SDL_CreateRenderer(window, nullptr, SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_ACCELERATED); if (renderer == nullptr) { SDL_Log("Error: SDL_CreateRenderer(): %s\n", SDL_GetError()); return -1; -} + } SDL_SetWindowPosition(window, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED); SDL_ShowWindow(window); diff --git a/cimgui/imgui/examples/example_win32_opengl3/main.cpp b/cimgui/imgui/examples/example_win32_opengl3/main.cpp index 3dc71deb0..a6af3fdb0 100644 --- a/cimgui/imgui/examples/example_win32_opengl3/main.cpp +++ b/cimgui/imgui/examples/example_win32_opengl3/main.cpp @@ -74,9 +74,9 @@ int main(int, char**) { // Create application window //ImGui_ImplWin32_EnableDpiAwareness(); - WNDCLASSEXW wc = { sizeof(wc), CS_OWNDC, WndProc, 0L, 0L, GetModuleHandle(NULL), NULL, NULL, NULL, NULL, L"ImGui Example", NULL }; + WNDCLASSEXW wc = { sizeof(wc), CS_OWNDC, WndProc, 0L, 0L, GetModuleHandle(nullptr), nullptr, nullptr, nullptr, nullptr, L"ImGui Example", nullptr }; ::RegisterClassExW(&wc); - HWND hwnd = ::CreateWindowW(wc.lpszClassName, L"Dear ImGui Win32+OpenGL3 Example", WS_OVERLAPPEDWINDOW, 100, 100, 1280, 800, NULL, NULL, wc.hInstance, NULL); + HWND hwnd = ::CreateWindowW(wc.lpszClassName, L"Dear ImGui Win32+OpenGL3 Example", WS_OVERLAPPEDWINDOW, 100, 100, 1280, 800, nullptr, nullptr, wc.hInstance, nullptr); // Initialize OpenGL if (!CreateDeviceWGL(hwnd, &g_MainWindow)) @@ -134,7 +134,7 @@ int main(int, char**) // Load Fonts // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them. // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple. - // - If the file cannot be loaded, the function will return NULL. Please handle those errors in your application (e.g. use an assertion, or display an error and quit). + // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit). // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call. // - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering. // - Read 'docs/FONTS.md' for more instructions and details. @@ -144,8 +144,8 @@ int main(int, char**) //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f); //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f); //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f); - //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese()); - //IM_ASSERT(font != NULL); + //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, nullptr, io.Fonts->GetGlyphRangesJapanese()); + //IM_ASSERT(font != nullptr); // Our state bool show_demo_window = true; @@ -159,7 +159,7 @@ int main(int, char**) // Poll and handle messages (inputs, window resize, etc.) // See the WndProc() function below for our to dispatch events to the Win32 backend. MSG msg; - while (::PeekMessage(&msg, NULL, 0U, 0U, PM_REMOVE)) + while (::PeekMessage(&msg, nullptr, 0U, 0U, PM_REMOVE)) { ::TranslateMessage(&msg); ::DispatchMessage(&msg); @@ -270,7 +270,7 @@ bool CreateDeviceWGL(HWND hWnd, WGL_WindowData* data) void CleanupDeviceWGL(HWND hWnd, WGL_WindowData* data) { - wglMakeCurrent(NULL, NULL); + wglMakeCurrent(nullptr, nullptr); ::ReleaseDC(hWnd, data->hDC); } diff --git a/cimgui/imgui/imconfig.h b/cimgui/imgui/imconfig.h index fcc47a890..62d1c8832 100644 --- a/cimgui/imgui/imconfig.h +++ b/cimgui/imgui/imconfig.h @@ -28,13 +28,13 @@ //---- Don't define obsolete functions/enums/behaviors. Consider enabling from time to time after updating to clean your code of obsolete function/names. //#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS -//#define IMGUI_DISABLE_OBSOLETE_KEYIO // 1.87: disable legacy io.KeyMap[]+io.KeysDown[] in favor io.AddKeyEvent(). This will be folded into IMGUI_DISABLE_OBSOLETE_FUNCTIONS in a few versions. +//#define IMGUI_DISABLE_OBSOLETE_KEYIO // 1.87+ disable legacy io.KeyMap[]+io.KeysDown[] in favor io.AddKeyEvent(). This is automatically done by IMGUI_DISABLE_OBSOLETE_FUNCTIONS. //---- Disable all of Dear ImGui or don't implement standard windows/tools. // It is very strongly recommended to NOT disable the demo windows and debug tool during development. They are extremely useful in day to day work. Please read comments in imgui_demo.cpp. //#define IMGUI_DISABLE // Disable everything: all headers and source files will be empty. //#define IMGUI_DISABLE_DEMO_WINDOWS // Disable demo windows: ShowDemoWindow()/ShowStyleEditor() will be empty. -//#define IMGUI_DISABLE_DEBUG_TOOLS // Disable metrics/debugger and other debug tools: ShowMetricsWindow(), ShowDebugLogWindow() and ShowStackToolWindow() will be empty (this was called IMGUI_DISABLE_METRICS_WINDOW before 1.88). +//#define IMGUI_DISABLE_DEBUG_TOOLS // Disable metrics/debugger and other debug tools: ShowMetricsWindow(), ShowDebugLogWindow() and ShowIDStackToolWindow() will be empty. //---- Don't implement some functions to reduce linkage requirements. //#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS // [Win32] Don't implement default clipboard handler. Won't use and link with OpenClipboard/GetClipboardData/CloseClipboard etc. (user32.lib/.a, kernel32.lib/.a) @@ -50,12 +50,14 @@ //#define IMGUI_DISABLE_SSE // Disable use of SSE intrinsics even if available //---- Include imgui_user.h at the end of imgui.h as a convenience +// May be convenient for some users to only explicitly include vanilla imgui.h and have extra stuff included. //#define IMGUI_INCLUDE_IMGUI_USER_H +//#define IMGUI_USER_H_FILENAME "my_folder/my_imgui_user.h" //---- Pack colors to BGRA8 instead of RGBA8 (to avoid converting from one to another) //#define IMGUI_USE_BGRA_PACKED_COLOR -//---- Use 32-bit for ImWchar (default is 16-bit) to support unicode planes 1-16. (e.g. point beyond 0xFFFF like emoticons, dingbats, symbols, shapes, ancient languages, etc...) +//---- Use 32-bit for ImWchar (default is 16-bit) to support Unicode planes 1-16. (e.g. point beyond 0xFFFF like emoticons, dingbats, symbols, shapes, ancient languages, etc...) //#define IMGUI_USE_WCHAR32 //---- Avoid multiple STB libraries implementations, or redefine path/filenames to prioritize another version diff --git a/cimgui/imgui/imgui.cpp b/cimgui/imgui/imgui.cpp index 73dd9ebab..602fde610 100644 --- a/cimgui/imgui/imgui.cpp +++ b/cimgui/imgui/imgui.cpp @@ -1,4 +1,4 @@ -// dear imgui, v1.90 WIP +// dear imgui, v1.90.4 // (main code and documentation) // Help: @@ -11,7 +11,7 @@ // - Getting Started https://dearimgui.com/getting-started // - Homepage https://github.com/ocornut/imgui // - Releases & changelog https://github.com/ocornut/imgui/releases -// - Gallery https://github.com/ocornut/imgui/issues/6478 (please post your screenshots/video there!) +// - Gallery https://github.com/ocornut/imgui/issues/6897 (please post your screenshots/video there!) // - Wiki https://github.com/ocornut/imgui/wiki (lots of good stuff there) // - Glossary https://github.com/ocornut/imgui/wiki/Glossary // - Issues & support https://github.com/ocornut/imgui/issues @@ -21,7 +21,7 @@ // please post in https://github.com/ocornut/imgui/discussions if you cannot find a solution in resources above. // Everything else should be asked in 'Issues'! We are building a database of cross-linked knowledge there. -// Copyright (c) 2014-2023 Omar Cornut +// Copyright (c) 2014-2024 Omar Cornut // Developed by Omar Cornut and every direct or indirect contributors to the GitHub. // See LICENSE.txt for copyright and licensing details (standard MIT License). // This library is free but needs your support to sustain development and maintenance. @@ -75,6 +75,7 @@ CODE // [SECTION] MAIN CODE (most of the code! lots of stuff, needs tidying up!) // [SECTION] INPUTS // [SECTION] ERROR CHECKING +// [SECTION] ITEM SUBMISSION // [SECTION] LAYOUT // [SECTION] SCROLLING // [SECTION] TOOLTIPS @@ -89,7 +90,7 @@ CODE // [SECTION] PLATFORM DEPENDENT HELPERS // [SECTION] METRICS/DEBUGGER WINDOW // [SECTION] DEBUG LOG WINDOW -// [SECTION] OTHER DEBUG TOOLS (ITEM PICKER, STACK TOOL) +// [SECTION] OTHER DEBUG TOOLS (ITEM PICKER, ID STACK TOOL) */ @@ -358,7 +359,7 @@ CODE To decide whether to dispatch mouse/keyboard inputs to Dear ImGui to the rest of your application, you should read the 'io.WantCaptureMouse', 'io.WantCaptureKeyboard' and 'io.WantTextInput' flags! - Please read the FAQ and example applications for details about this! + Please read the FAQ entry "How can I tell whether to dispatch mouse/keyboard to Dear ImGui or my application?" about this. HOW A SIMPLE RENDERING FUNCTION MAY LOOK LIKE @@ -426,12 +427,30 @@ CODE You can read releases logs https://github.com/ocornut/imgui/releases for more details. (Docking/Viewport Branch) - - 2023/XX/XX (1.XXXX) - when multi-viewports are enabled, all positions will be in your natural OS coordinates space. It means that: + - 2024/XX/XX (1.XXXX) - when multi-viewports are enabled, all positions will be in your natural OS coordinates space. It means that: - reference to hard-coded positions such as in SetNextWindowPos(ImVec2(0,0)) are probably not what you want anymore. you may use GetMainViewport()->Pos to offset hard-coded positions, e.g. SetNextWindowPos(GetMainViewport()->Pos) - likewise io.MousePos and GetMousePos() will use OS coordinates. If you query mouse positions to interact with non-imgui coordinates you will need to offset them, e.g. subtract GetWindowViewport()->Pos. + - 2024/01/15 (1.90.2) - commented out obsolete ImGuiIO::ImeWindowHandle marked obsolete in 1.87, favor of writing to 'void* ImGuiViewport::PlatformHandleRaw'. + - 2023/12/19 (1.90.1) - commented out obsolete ImGuiKey_KeyPadEnter redirection to ImGuiKey_KeypadEnter. + - 2023/11/06 (1.90.1) - removed CalcListClipping() marked obsolete in 1.86. Prefer using ImGuiListClipper which can return non-contiguous ranges. + - 2023/11/05 (1.90.1) - imgui_freetype: commented out ImGuiFreeType::BuildFontAtlas() obsoleted in 1.81. prefer using #define IMGUI_ENABLE_FREETYPE or see commented code for manual calls. + - 2023/11/05 (1.90.1) - internals,columns: commented out legacy ImGuiColumnsFlags_XXX symbols redirecting to ImGuiOldColumnsFlags_XXX, obsoleted from imgui_internal.h in 1.80. + - 2023/11/09 (1.90.0) - removed IM_OFFSETOF() macro in favor of using offsetof() available in C++11. Kept redirection define (will obsolete). + - 2023/11/07 (1.90.0) - removed BeginChildFrame()/EndChildFrame() in favor of using BeginChild() with the ImGuiChildFlags_FrameStyle flag. kept inline redirection function (will obsolete). + those functions were merely PushStyle/PopStyle helpers, the removal isn't so much motivated by needing to add the feature in BeginChild(), but by the necessity to avoid BeginChildFrame() signature mismatching BeginChild() signature and features. + - 2023/11/02 (1.90.0) - BeginChild: upgraded 'bool border = true' parameter to 'ImGuiChildFlags flags' type, added ImGuiChildFlags_Border equivalent. As with our prior "bool-to-flags" API updates, the ImGuiChildFlags_Border value is guaranteed to be == true forever to ensure a smoother transition, meaning all existing calls will still work. + - old: BeginChild("Name", size, true) + - new: BeginChild("Name", size, ImGuiChildFlags_Border) + - old: BeginChild("Name", size, false) + - new: BeginChild("Name", size) or BeginChild("Name", 0) or BeginChild("Name", size, ImGuiChildFlags_None) + - 2023/11/02 (1.90.0) - BeginChild: added child-flag ImGuiChildFlags_AlwaysUseWindowPadding as a replacement for the window-flag ImGuiWindowFlags_AlwaysUseWindowPadding: the feature only ever made sense for BeginChild() anyhow. + - old: BeginChild("Name", size, 0, ImGuiWindowFlags_AlwaysUseWindowPadding); + - new: BeginChild("Name", size, ImGuiChildFlags_AlwaysUseWindowPadding, 0); + - 2023/09/27 (1.90.0) - io: removed io.MetricsActiveAllocations introduced in 1.63. Same as 'g.DebugMemAllocCount - g.DebugMemFreeCount' (still displayed in Metrics, unlikely to be accessed by end-user). + - 2023/09/26 (1.90.0) - debug tools: Renamed ShowStackToolWindow() ("Stack Tool") to ShowIDStackToolWindow() ("ID Stack Tool"), as earlier name was misleading. Kept inline redirection function. (#4631) - 2023/09/15 (1.90.0) - ListBox, Combo: changed signature of "name getter" callback in old one-liner ListBox()/Combo() apis. kept inline redirection function (will obsolete). - old: bool Combo(const char* label, int* current_item, bool (*getter)(void* user_data, int idx, const char** out_text), ...) - new: bool Combo(const char* label, int* current_item, const char* (*getter)(void* user_data, int idx), ...); @@ -906,7 +925,7 @@ CODE Q: How can I easily use icons in my application? Q: How can I load multiple fonts? Q: How can I display and input non-Latin characters such as Chinese, Japanese, Korean, Cyrillic? - >> See https://www.dearimgui.com/faq and https://github.com/ocornut/imgui/edit/master/docs/FONTS.md + >> See https://www.dearimgui.com/faq and https://github.com/ocornut/imgui/blob/master/docs/FONTS.md Q&A: Concerns ============= @@ -1036,6 +1055,8 @@ CODE static const float NAV_WINDOWING_HIGHLIGHT_DELAY = 0.20f; // Time before the highlight and screen dimming starts fading in static const float NAV_WINDOWING_LIST_APPEAR_DELAY = 0.15f; // Time before the window list starts to appear +static const float NAV_ACTIVATE_HIGHLIGHT_TIMER = 0.10f; // Time to highlight an item activated by a shortcut. + // Window resizing from edges (when io.ConfigWindowsResizeFromEdges = true and ImGuiBackendFlags_HasMouseCursors is set in io.BackendFlags by backend) static const float WINDOWS_HOVER_PADDING = 4.0f; // Extend outside window for hovering/resizing (maxxed with TouchPadding) and inside windows for borders. Affect FindHoveredWindow(). static const float WINDOWS_RESIZE_FROM_EDGES_FEEDBACK_TIMER = 0.04f; // Reduce visual noise by only highlighting the border after a certain time. @@ -1098,6 +1119,7 @@ static void ErrorCheckNewFrameSanityChecks(); static void ErrorCheckEndFrameSanityChecks(); static void UpdateDebugToolItemPicker(); static void UpdateDebugToolStackQueries(); +static void UpdateDebugToolFlashStyleColor(); // Inputs static void UpdateKeyboardInputs(); @@ -1107,7 +1129,7 @@ static void UpdateKeyRoutingTable(ImGuiKeyRoutingTable* rt); // Misc static void UpdateSettings(); -static bool UpdateWindowManualResize(ImGuiWindow* window, const ImVec2& size_auto_fit, int* border_held, int resize_grip_count, ImU32 resize_grip_col[4], const ImRect& visibility_rect); +static int UpdateWindowManualResize(ImGuiWindow* window, const ImVec2& size_auto_fit, int* border_hovered, int* border_held, int resize_grip_count, ImU32 resize_grip_col[4], const ImRect& visibility_rect); static void RenderWindowOuterBorders(ImGuiWindow* window); static void RenderWindowDecorations(ImGuiWindow* window, const ImRect& title_bar_rect, bool title_bar_is_highlight, bool handle_borders_and_resize_grips, int resize_grip_count, const ImU32 resize_grip_col[4], float resize_grip_draw_size); static void RenderWindowTitleBarContents(ImGuiWindow* window, const ImRect& title_bar_rect, const char* name, bool* p_open); @@ -1209,6 +1231,7 @@ ImGuiStyle::ImGuiStyle() TabBorderSize = 0.0f; // Thickness of border around tabs. TabMinWidthForCloseButton = 0.0f; // 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. TabBarBorderSize = 1.0f; // Thickness of tab-bar separator, which takes on the tab active color to denote focus. + TableAngledHeadersAngle = 35.0f * (IM_PI / 180.0f); // Angle of angled headers (supported values range from -50 degrees to +50 degrees). ColorButtonPosition = ImGuiDir_Right; // Side of the color button in the ColorEdit4 widget (left/right). Defaults to ImGuiDir_Right. ButtonTextAlign = ImVec2(0.5f,0.5f);// Alignment of button text when button is larger than text. SelectableTextAlign = ImVec2(0.0f,0.0f);// 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. @@ -1240,31 +1263,31 @@ ImGuiStyle::ImGuiStyle() // Important: This operation is lossy because we round all sizes to integer. If you need to change your scale multiples, call this over a freshly initialized ImGuiStyle structure rather than scaling multiple times. void ImGuiStyle::ScaleAllSizes(float scale_factor) { - WindowPadding = ImFloor(WindowPadding * scale_factor); - WindowRounding = ImFloor(WindowRounding * scale_factor); - WindowMinSize = ImFloor(WindowMinSize * scale_factor); - ChildRounding = ImFloor(ChildRounding * scale_factor); - PopupRounding = ImFloor(PopupRounding * scale_factor); - FramePadding = ImFloor(FramePadding * scale_factor); - FrameRounding = ImFloor(FrameRounding * scale_factor); - ItemSpacing = ImFloor(ItemSpacing * scale_factor); - ItemInnerSpacing = ImFloor(ItemInnerSpacing * scale_factor); - CellPadding = ImFloor(CellPadding * scale_factor); - TouchExtraPadding = ImFloor(TouchExtraPadding * scale_factor); - IndentSpacing = ImFloor(IndentSpacing * scale_factor); - ColumnsMinSpacing = ImFloor(ColumnsMinSpacing * scale_factor); - ScrollbarSize = ImFloor(ScrollbarSize * scale_factor); - ScrollbarRounding = ImFloor(ScrollbarRounding * scale_factor); - GrabMinSize = ImFloor(GrabMinSize * scale_factor); - GrabRounding = ImFloor(GrabRounding * scale_factor); - LogSliderDeadzone = ImFloor(LogSliderDeadzone * scale_factor); - TabRounding = ImFloor(TabRounding * scale_factor); - TabMinWidthForCloseButton = (TabMinWidthForCloseButton != FLT_MAX) ? ImFloor(TabMinWidthForCloseButton * scale_factor) : FLT_MAX; - SeparatorTextPadding = ImFloor(SeparatorTextPadding * scale_factor); - DockingSeparatorSize = ImFloor(DockingSeparatorSize * scale_factor); - DisplayWindowPadding = ImFloor(DisplayWindowPadding * scale_factor); - DisplaySafeAreaPadding = ImFloor(DisplaySafeAreaPadding * scale_factor); - MouseCursorScale = ImFloor(MouseCursorScale * scale_factor); + WindowPadding = ImTrunc(WindowPadding * scale_factor); + WindowRounding = ImTrunc(WindowRounding * scale_factor); + WindowMinSize = ImTrunc(WindowMinSize * scale_factor); + ChildRounding = ImTrunc(ChildRounding * scale_factor); + PopupRounding = ImTrunc(PopupRounding * scale_factor); + FramePadding = ImTrunc(FramePadding * scale_factor); + FrameRounding = ImTrunc(FrameRounding * scale_factor); + ItemSpacing = ImTrunc(ItemSpacing * scale_factor); + ItemInnerSpacing = ImTrunc(ItemInnerSpacing * scale_factor); + CellPadding = ImTrunc(CellPadding * scale_factor); + TouchExtraPadding = ImTrunc(TouchExtraPadding * scale_factor); + IndentSpacing = ImTrunc(IndentSpacing * scale_factor); + ColumnsMinSpacing = ImTrunc(ColumnsMinSpacing * scale_factor); + ScrollbarSize = ImTrunc(ScrollbarSize * scale_factor); + ScrollbarRounding = ImTrunc(ScrollbarRounding * scale_factor); + GrabMinSize = ImTrunc(GrabMinSize * scale_factor); + GrabRounding = ImTrunc(GrabRounding * scale_factor); + LogSliderDeadzone = ImTrunc(LogSliderDeadzone * scale_factor); + TabRounding = ImTrunc(TabRounding * scale_factor); + TabMinWidthForCloseButton = (TabMinWidthForCloseButton != FLT_MAX) ? ImTrunc(TabMinWidthForCloseButton * scale_factor) : FLT_MAX; + SeparatorTextPadding = ImTrunc(SeparatorTextPadding * scale_factor); + DockingSeparatorSize = ImTrunc(DockingSeparatorSize * scale_factor); + DisplayWindowPadding = ImTrunc(DisplayWindowPadding * scale_factor); + DisplaySafeAreaPadding = ImTrunc(DisplaySafeAreaPadding * scale_factor); + MouseCursorScale = ImTrunc(MouseCursorScale * scale_factor); } ImGuiIO::ImGuiIO() @@ -1565,7 +1588,7 @@ void ImGuiIO::AddMousePosEvent(float x, float y) return; // Apply same flooring as UpdateMouseInputs() - ImVec2 pos((x > -FLT_MAX) ? ImFloorSigned(x) : x, (y > -FLT_MAX) ? ImFloorSigned(y) : y); + ImVec2 pos((x > -FLT_MAX) ? ImFloor(x) : x, (y > -FLT_MAX) ? ImFloor(y) : y); // Filter duplicate const ImGuiInputEvent* latest_event = FindLatestInputEvent(&g, ImGuiInputEventType_MousePos); @@ -1977,21 +2000,9 @@ int ImFormatStringV(char* buf, size_t buf_size, const char* fmt, va_list args) void ImFormatStringToTempBuffer(const char** out_buf, const char** out_buf_end, const char* fmt, ...) { - ImGuiContext& g = *GImGui; va_list args; va_start(args, fmt); - if (fmt[0] == '%' && fmt[1] == 's' && fmt[2] == 0) - { - const char* buf = va_arg(args, const char*); // Skip formatting when using "%s" - *out_buf = buf; - if (out_buf_end) { *out_buf_end = buf + strlen(buf); } - } - else - { - int buf_len = ImFormatStringV(g.TempBuffer.Data, g.TempBuffer.Size, fmt, args); - *out_buf = g.TempBuffer.Data; - if (out_buf_end) { *out_buf_end = g.TempBuffer.Data + buf_len; } - } + ImFormatStringToTempBufferV(out_buf, out_buf_end, fmt, args); va_end(args); } @@ -2001,9 +2012,23 @@ void ImFormatStringToTempBufferV(const char** out_buf, const char** out_buf_end, if (fmt[0] == '%' && fmt[1] == 's' && fmt[2] == 0) { const char* buf = va_arg(args, const char*); // Skip formatting when using "%s" + if (buf == NULL) + buf = "(null)"; *out_buf = buf; if (out_buf_end) { *out_buf_end = buf + strlen(buf); } } + else if (fmt[0] == '%' && fmt[1] == '.' && fmt[2] == '*' && fmt[3] == 's' && fmt[4] == 0) + { + int buf_len = va_arg(args, int); // Skip formatting when using "%.*s" + const char* buf = va_arg(args, const char*); + if (buf == NULL) + { + buf = "(null)"; + buf_len = ImMin(buf_len, 6); + } + *out_buf = buf; + *out_buf_end = buf + buf_len; // Disallow not passing 'out_buf_end' here. User is expected to use it. + } else { int buf_len = ImFormatStringV(g.TempBuffer.Data, g.TempBuffer.Size, fmt, args); @@ -2096,11 +2121,18 @@ ImFileHandle ImFileOpen(const char* filename, const char* mode) // Previously we used ImTextCountCharsFromUtf8/ImTextStrFromUtf8 here but we now need to support ImWchar16 and ImWchar32! const int filename_wsize = ::MultiByteToWideChar(CP_UTF8, 0, filename, -1, NULL, 0); const int mode_wsize = ::MultiByteToWideChar(CP_UTF8, 0, mode, -1, NULL, 0); - ImVector buf; - buf.resize(filename_wsize + mode_wsize); - ::MultiByteToWideChar(CP_UTF8, 0, filename, -1, (wchar_t*)&buf[0], filename_wsize); - ::MultiByteToWideChar(CP_UTF8, 0, mode, -1, (wchar_t*)&buf[filename_wsize], mode_wsize); - return ::_wfopen((const wchar_t*)&buf[0], (const wchar_t*)&buf[filename_wsize]); + + // Use stack buffer if possible, otherwise heap buffer. Sizes include zero terminator. + // We don't rely on current ImGuiContext as this is implied to be a helper function which doesn't depend on it (see #7314). + wchar_t local_temp_stack[FILENAME_MAX]; + ImVector local_temp_heap; + if (filename_wsize + mode_wsize > IM_ARRAYSIZE(local_temp_stack)) + local_temp_heap.resize(filename_wsize + mode_wsize); + wchar_t* filename_wbuf = local_temp_heap.Data ? local_temp_heap.Data : local_temp_stack; + wchar_t* mode_wbuf = filename_wbuf + filename_wsize; + ::MultiByteToWideChar(CP_UTF8, 0, filename, -1, filename_wbuf, filename_wsize); + ::MultiByteToWideChar(CP_UTF8, 0, mode, -1, mode_wbuf, mode_wsize); + return ::_wfopen(filename_wbuf, mode_wbuf); #else return fopen(filename, mode); #endif @@ -2539,11 +2571,9 @@ void ImGuiStorage::SetInt(ImGuiID key, int val) { ImGuiStoragePair* it = LowerBound(Data, key); if (it == Data.end() || it->key != key) - { Data.insert(it, ImGuiStoragePair(key, val)); - return; - } - it->val_i = val; + else + it->val_i = val; } void ImGuiStorage::SetBool(ImGuiID key, bool val) @@ -2555,22 +2585,18 @@ void ImGuiStorage::SetFloat(ImGuiID key, float val) { ImGuiStoragePair* it = LowerBound(Data, key); if (it == Data.end() || it->key != key) - { Data.insert(it, ImGuiStoragePair(key, val)); - return; - } - it->val_f = val; + else + it->val_f = val; } void ImGuiStorage::SetVoidPtr(ImGuiID key, void* val) { ImGuiStoragePair* it = LowerBound(Data, key); if (it == Data.end() || it->key != key) - { Data.insert(it, ImGuiStoragePair(key, val)); - return; - } - it->val_p = val; + else + it->val_p = val; } void ImGuiStorage::SetAllInt(int v) @@ -2771,54 +2797,6 @@ static bool GetSkipItemForListClipping() return (g.CurrentTable ? g.CurrentTable->HostSkipItems : g.CurrentWindow->SkipItems); } -#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS -// Legacy helper to calculate coarse clipping of large list of evenly sized items. -// This legacy API is not ideal because it assumes we will return a single contiguous rectangle. -// Prefer using ImGuiListClipper which can returns non-contiguous ranges. -void ImGui::CalcListClipping(int items_count, float items_height, int* out_items_display_start, int* out_items_display_end) -{ - ImGuiContext& g = *GImGui; - ImGuiWindow* window = g.CurrentWindow; - if (g.LogEnabled) - { - // If logging is active, do not perform any clipping - *out_items_display_start = 0; - *out_items_display_end = items_count; - return; - } - if (GetSkipItemForListClipping()) - { - *out_items_display_start = *out_items_display_end = 0; - return; - } - - // We create the union of the ClipRect and the scoring rect which at worst should be 1 page away from ClipRect - // We don't include g.NavId's rectangle in there (unless g.NavJustMovedToId is set) because the rectangle enlargement can get costly. - ImRect rect = window->ClipRect; - if (g.NavMoveScoringItems) - rect.Add(g.NavScoringNoClipRect); - if (g.NavJustMovedToId && window->NavLastIds[0] == g.NavJustMovedToId) - rect.Add(WindowRectRelToAbs(window, window->NavRectRel[0])); // Could store and use NavJustMovedToRectRel - - const ImVec2 pos = window->DC.CursorPos; - int start = (int)((rect.Min.y - pos.y) / items_height); - int end = (int)((rect.Max.y - pos.y) / items_height); - - // When performing a navigation request, ensure we have one item extra in the direction we are moving to - // FIXME: Verify this works with tabbing - const bool is_nav_request = (g.NavMoveScoringItems && g.NavWindow && g.NavWindow->RootWindowForNav == window->RootWindowForNav); - if (is_nav_request && g.NavMoveClipDir == ImGuiDir_Up) - start--; - if (is_nav_request && g.NavMoveClipDir == ImGuiDir_Down) - end++; - - start = ImClamp(start, 0, items_count); - end = ImClamp(end + 1, start, items_count); - *out_items_display_start = start; - *out_items_display_end = end; -} -#endif - static void ImGuiListClipper_SortAndFuseRanges(ImVector& ranges, int offset = 0) { if (ranges.Size - offset <= 1) @@ -3127,13 +3105,14 @@ const ImVec4& ImGui::GetStyleColorVec4(ImGuiCol idx) return style.Colors[idx]; } -ImU32 ImGui::GetColorU32(ImU32 col) +ImU32 ImGui::GetColorU32(ImU32 col, float alpha_mul) { ImGuiStyle& style = GImGui->Style; - if (style.Alpha >= 1.0f) + alpha_mul *= style.Alpha; + if (alpha_mul >= 1.0f) return col; ImU32 a = (col & IM_COL32_A_MASK) >> IM_COL32_A_SHIFT; - a = (ImU32)(a * style.Alpha); // We don't need to clamp 0..255 because Style.Alpha is in 0..1 range. + a = (ImU32)(a * alpha_mul); // We don't need to clamp 0..255 because alpha is in 0..1 range. return (col & ~IM_COL32_A_MASK) | (a << IM_COL32_A_SHIFT); } @@ -3145,7 +3124,8 @@ void ImGui::PushStyleColor(ImGuiCol idx, ImU32 col) backup.Col = idx; backup.BackupValue = g.Style.Colors[idx]; g.ColorStack.push_back(backup); - g.Style.Colors[idx] = ColorConvertU32ToFloat4(col); + if (g.DebugFlashStyleColorIdx != idx) + g.Style.Colors[idx] = ColorConvertU32ToFloat4(col); } void ImGui::PushStyleColor(ImGuiCol idx, const ImVec4& col) @@ -3155,7 +3135,8 @@ void ImGui::PushStyleColor(ImGuiCol idx, const ImVec4& col) backup.Col = idx; backup.BackupValue = g.Style.Colors[idx]; g.ColorStack.push_back(backup); - g.Style.Colors[idx] = col; + if (g.DebugFlashStyleColorIdx != idx) + g.Style.Colors[idx] = col; } void ImGui::PopStyleColor(int count) @@ -3163,7 +3144,7 @@ void ImGui::PopStyleColor(int count) ImGuiContext& g = *GImGui; if (g.ColorStack.Size < count) { - IM_ASSERT_USER_ERROR(g.ColorStack.Size > count, "Calling PopStyleColor() too many times: stack underflow."); + IM_ASSERT_USER_ERROR(g.ColorStack.Size > count, "Calling PopStyleColor() too many times!"); count = g.ColorStack.Size; } while (count > 0) @@ -3182,36 +3163,36 @@ static const ImGuiCol GWindowDockStyleColors[ImGuiWindowDockStyleCol_COUNT] = static const ImGuiDataVarInfo GStyleVarInfo[] = { - { ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImGuiStyle, Alpha) }, // ImGuiStyleVar_Alpha - { ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImGuiStyle, DisabledAlpha) }, // ImGuiStyleVar_DisabledAlpha - { ImGuiDataType_Float, 2, (ImU32)IM_OFFSETOF(ImGuiStyle, WindowPadding) }, // ImGuiStyleVar_WindowPadding - { ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImGuiStyle, WindowRounding) }, // ImGuiStyleVar_WindowRounding - { ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImGuiStyle, WindowBorderSize) }, // ImGuiStyleVar_WindowBorderSize - { ImGuiDataType_Float, 2, (ImU32)IM_OFFSETOF(ImGuiStyle, WindowMinSize) }, // ImGuiStyleVar_WindowMinSize - { ImGuiDataType_Float, 2, (ImU32)IM_OFFSETOF(ImGuiStyle, WindowTitleAlign) }, // ImGuiStyleVar_WindowTitleAlign - { ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImGuiStyle, ChildRounding) }, // ImGuiStyleVar_ChildRounding - { ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImGuiStyle, ChildBorderSize) }, // ImGuiStyleVar_ChildBorderSize - { ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImGuiStyle, PopupRounding) }, // ImGuiStyleVar_PopupRounding - { ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImGuiStyle, PopupBorderSize) }, // ImGuiStyleVar_PopupBorderSize - { ImGuiDataType_Float, 2, (ImU32)IM_OFFSETOF(ImGuiStyle, FramePadding) }, // ImGuiStyleVar_FramePadding - { ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImGuiStyle, FrameRounding) }, // ImGuiStyleVar_FrameRounding - { ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImGuiStyle, FrameBorderSize) }, // ImGuiStyleVar_FrameBorderSize - { ImGuiDataType_Float, 2, (ImU32)IM_OFFSETOF(ImGuiStyle, ItemSpacing) }, // ImGuiStyleVar_ItemSpacing - { ImGuiDataType_Float, 2, (ImU32)IM_OFFSETOF(ImGuiStyle, ItemInnerSpacing) }, // ImGuiStyleVar_ItemInnerSpacing - { ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImGuiStyle, IndentSpacing) }, // ImGuiStyleVar_IndentSpacing - { ImGuiDataType_Float, 2, (ImU32)IM_OFFSETOF(ImGuiStyle, CellPadding) }, // ImGuiStyleVar_CellPadding - { ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImGuiStyle, ScrollbarSize) }, // ImGuiStyleVar_ScrollbarSize - { ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImGuiStyle, ScrollbarRounding) }, // ImGuiStyleVar_ScrollbarRounding - { ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImGuiStyle, GrabMinSize) }, // ImGuiStyleVar_GrabMinSize - { ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImGuiStyle, GrabRounding) }, // ImGuiStyleVar_GrabRounding - { ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImGuiStyle, TabRounding) }, // ImGuiStyleVar_TabRounding - { ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImGuiStyle, TabBarBorderSize) }, // ImGuiStyleVar_TabBarBorderSize - { ImGuiDataType_Float, 2, (ImU32)IM_OFFSETOF(ImGuiStyle, ButtonTextAlign) }, // ImGuiStyleVar_ButtonTextAlign - { ImGuiDataType_Float, 2, (ImU32)IM_OFFSETOF(ImGuiStyle, SelectableTextAlign) }, // ImGuiStyleVar_SelectableTextAlign - { ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImGuiStyle, SeparatorTextBorderSize) },// ImGuiStyleVar_SeparatorTextBorderSize - { ImGuiDataType_Float, 2, (ImU32)IM_OFFSETOF(ImGuiStyle, SeparatorTextAlign) }, // ImGuiStyleVar_SeparatorTextAlign - { ImGuiDataType_Float, 2, (ImU32)IM_OFFSETOF(ImGuiStyle, SeparatorTextPadding) }, // ImGuiStyleVar_SeparatorTextPadding - { ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImGuiStyle, DockingSeparatorSize) }, // ImGuiStyleVar_DockingSeparatorSize + { ImGuiDataType_Float, 1, (ImU32)offsetof(ImGuiStyle, Alpha) }, // ImGuiStyleVar_Alpha + { ImGuiDataType_Float, 1, (ImU32)offsetof(ImGuiStyle, DisabledAlpha) }, // ImGuiStyleVar_DisabledAlpha + { ImGuiDataType_Float, 2, (ImU32)offsetof(ImGuiStyle, WindowPadding) }, // ImGuiStyleVar_WindowPadding + { ImGuiDataType_Float, 1, (ImU32)offsetof(ImGuiStyle, WindowRounding) }, // ImGuiStyleVar_WindowRounding + { ImGuiDataType_Float, 1, (ImU32)offsetof(ImGuiStyle, WindowBorderSize) }, // ImGuiStyleVar_WindowBorderSize + { ImGuiDataType_Float, 2, (ImU32)offsetof(ImGuiStyle, WindowMinSize) }, // ImGuiStyleVar_WindowMinSize + { ImGuiDataType_Float, 2, (ImU32)offsetof(ImGuiStyle, WindowTitleAlign) }, // ImGuiStyleVar_WindowTitleAlign + { ImGuiDataType_Float, 1, (ImU32)offsetof(ImGuiStyle, ChildRounding) }, // ImGuiStyleVar_ChildRounding + { ImGuiDataType_Float, 1, (ImU32)offsetof(ImGuiStyle, ChildBorderSize) }, // ImGuiStyleVar_ChildBorderSize + { ImGuiDataType_Float, 1, (ImU32)offsetof(ImGuiStyle, PopupRounding) }, // ImGuiStyleVar_PopupRounding + { ImGuiDataType_Float, 1, (ImU32)offsetof(ImGuiStyle, PopupBorderSize) }, // ImGuiStyleVar_PopupBorderSize + { ImGuiDataType_Float, 2, (ImU32)offsetof(ImGuiStyle, FramePadding) }, // ImGuiStyleVar_FramePadding + { ImGuiDataType_Float, 1, (ImU32)offsetof(ImGuiStyle, FrameRounding) }, // ImGuiStyleVar_FrameRounding + { ImGuiDataType_Float, 1, (ImU32)offsetof(ImGuiStyle, FrameBorderSize) }, // ImGuiStyleVar_FrameBorderSize + { ImGuiDataType_Float, 2, (ImU32)offsetof(ImGuiStyle, ItemSpacing) }, // ImGuiStyleVar_ItemSpacing + { ImGuiDataType_Float, 2, (ImU32)offsetof(ImGuiStyle, ItemInnerSpacing) }, // ImGuiStyleVar_ItemInnerSpacing + { ImGuiDataType_Float, 1, (ImU32)offsetof(ImGuiStyle, IndentSpacing) }, // ImGuiStyleVar_IndentSpacing + { ImGuiDataType_Float, 2, (ImU32)offsetof(ImGuiStyle, CellPadding) }, // ImGuiStyleVar_CellPadding + { ImGuiDataType_Float, 1, (ImU32)offsetof(ImGuiStyle, ScrollbarSize) }, // ImGuiStyleVar_ScrollbarSize + { ImGuiDataType_Float, 1, (ImU32)offsetof(ImGuiStyle, ScrollbarRounding) }, // ImGuiStyleVar_ScrollbarRounding + { ImGuiDataType_Float, 1, (ImU32)offsetof(ImGuiStyle, GrabMinSize) }, // ImGuiStyleVar_GrabMinSize + { ImGuiDataType_Float, 1, (ImU32)offsetof(ImGuiStyle, GrabRounding) }, // ImGuiStyleVar_GrabRounding + { ImGuiDataType_Float, 1, (ImU32)offsetof(ImGuiStyle, TabRounding) }, // ImGuiStyleVar_TabRounding + { ImGuiDataType_Float, 1, (ImU32)offsetof(ImGuiStyle, TabBarBorderSize) }, // ImGuiStyleVar_TabBarBorderSize + { ImGuiDataType_Float, 2, (ImU32)offsetof(ImGuiStyle, ButtonTextAlign) }, // ImGuiStyleVar_ButtonTextAlign + { ImGuiDataType_Float, 2, (ImU32)offsetof(ImGuiStyle, SelectableTextAlign) }, // ImGuiStyleVar_SelectableTextAlign + { ImGuiDataType_Float, 1, (ImU32)offsetof(ImGuiStyle, SeparatorTextBorderSize) },// ImGuiStyleVar_SeparatorTextBorderSize + { ImGuiDataType_Float, 2, (ImU32)offsetof(ImGuiStyle, SeparatorTextAlign) }, // ImGuiStyleVar_SeparatorTextAlign + { ImGuiDataType_Float, 2, (ImU32)offsetof(ImGuiStyle, SeparatorTextPadding) }, // ImGuiStyleVar_SeparatorTextPadding + { ImGuiDataType_Float, 1, (ImU32)offsetof(ImGuiStyle, DockingSeparatorSize) }, // ImGuiStyleVar_DockingSeparatorSize }; const ImGuiDataVarInfo* ImGui::GetStyleVarInfo(ImGuiStyleVar idx) @@ -3232,7 +3213,7 @@ void ImGui::PushStyleVar(ImGuiStyleVar idx, float val) *pvar = val; return; } - IM_ASSERT_USER_ERROR(0, "Called PushStyleVar() variant with wrong type!"); + IM_ASSERT_USER_ERROR(0, "Calling PushStyleVar() variant with wrong type!"); } void ImGui::PushStyleVar(ImGuiStyleVar idx, const ImVec2& val) @@ -3246,7 +3227,7 @@ void ImGui::PushStyleVar(ImGuiStyleVar idx, const ImVec2& val) *pvar = val; return; } - IM_ASSERT_USER_ERROR(0, "Called PushStyleVar() variant with wrong type!"); + IM_ASSERT_USER_ERROR(0, "Calling PushStyleVar() variant with wrong type!"); } void ImGui::PopStyleVar(int count) @@ -3254,7 +3235,7 @@ void ImGui::PopStyleVar(int count) ImGuiContext& g = *GImGui; if (g.StyleVarStack.Size < count) { - IM_ASSERT_USER_ERROR(g.StyleVarStack.Size > count, "Calling PopStyleVar() too many times: stack underflow."); + IM_ASSERT_USER_ERROR(g.StyleVarStack.Size > count, "Calling PopStyleVar() too many times!"); count = g.StyleVarStack.Size; } while (count > 0) @@ -3491,7 +3472,7 @@ void ImGui::RenderTextEllipsis(ImDrawList* draw_list, const ImVec2& pos_min, con // Render text, render ellipsis RenderTextClippedEx(draw_list, pos_min, ImVec2(clip_max_x, pos_max.y), text, text_end_ellipsis, &text_size, ImVec2(0.0f, 0.0f)); - ImVec2 ellipsis_pos = ImFloor(ImVec2(pos_min.x + text_size_clipped_x, pos_min.y)); + ImVec2 ellipsis_pos = ImTrunc(ImVec2(pos_min.x + text_size_clipped_x, pos_min.y)); if (ellipsis_pos.x + ellipsis_width <= ellipsis_max_x) for (int i = 0; i < font->EllipsisCharCount; i++, ellipsis_pos.x += font->EllipsisCharStep * font_scale) font->RenderChar(draw_list, font_size, ellipsis_pos, GetColorU32(ImGuiCol_Text), font->EllipsisChar); @@ -3545,22 +3526,22 @@ void ImGui::RenderNavHighlight(const ImRect& bb, ImGuiID id, ImGuiNavHighlightFl float rounding = (flags & ImGuiNavHighlightFlags_NoRounding) ? 0.0f : g.Style.FrameRounding; ImRect display_rect = bb; display_rect.ClipWith(window->ClipRect); - if (flags & ImGuiNavHighlightFlags_TypeDefault) + const float thickness = 2.0f; + if (flags & ImGuiNavHighlightFlags_Compact) + { + window->DrawList->AddRect(display_rect.Min, display_rect.Max, GetColorU32(ImGuiCol_NavHighlight), rounding, 0, thickness); + } + else { - const float THICKNESS = 2.0f; - const float DISTANCE = 3.0f + THICKNESS * 0.5f; - display_rect.Expand(ImVec2(DISTANCE, DISTANCE)); + const float distance = 3.0f + thickness * 0.5f; + display_rect.Expand(ImVec2(distance, distance)); bool fully_visible = window->ClipRect.Contains(display_rect); if (!fully_visible) window->DrawList->PushClipRect(display_rect.Min, display_rect.Max); - window->DrawList->AddRect(display_rect.Min + ImVec2(THICKNESS * 0.5f, THICKNESS * 0.5f), display_rect.Max - ImVec2(THICKNESS * 0.5f, THICKNESS * 0.5f), GetColorU32(ImGuiCol_NavHighlight), rounding, 0, THICKNESS); + window->DrawList->AddRect(display_rect.Min, display_rect.Max, GetColorU32(ImGuiCol_NavHighlight), rounding, 0, thickness); if (!fully_visible) window->DrawList->PopClipRect(); } - if (flags & ImGuiNavHighlightFlags_TypeThin) - { - window->DrawList->AddRect(display_rect.Min, display_rect.Max, GetColorU32(ImGuiCol_NavHighlight), rounding, 0, 1.0f); - } } void ImGui::RenderMouseCursor(ImVec2 base_pos, float base_scale, ImGuiMouseCursor mouse_cursor, ImU32 col_fill, ImU32 col_border, ImU32 col_shadow) @@ -3658,7 +3639,8 @@ static const ImGuiLocEntry GLocalizationEntriesEnUS[] = { ImGuiLocKey_WindowingPopup, "(Popup)" }, { ImGuiLocKey_WindowingUntitled, "(Untitled)" }, { ImGuiLocKey_DockingHideTabBar, "Hide tab bar###HideTabBar" }, - { ImGuiLocKey_DockingHoldShiftToDock, "Hold SHIFT to enable Docking window."}, + { ImGuiLocKey_DockingHoldShiftToDock, "Hold SHIFT to enable Docking window." }, + { ImGuiLocKey_DockingDragToUndockOrMoveNode,"Click and drag to move or undock whole node." }, }; void ImGui::Initialize() @@ -3700,6 +3682,14 @@ void ImGui::Initialize() g.ViewportCreatedCount++; g.PlatformIO.Viewports.push_back(g.Viewports[0]); + // Build KeysMayBeCharInput[] lookup table (1 bool per named key) + for (ImGuiKey key = ImGuiKey_NamedKey_BEGIN; key < ImGuiKey_NamedKey_END; key = (ImGuiKey)(key + 1)) + if ((key >= ImGuiKey_0 && key <= ImGuiKey_9) || (key >= ImGuiKey_A && key <= ImGuiKey_Z) || (key >= ImGuiKey_Keypad0 && key <= ImGuiKey_Keypad9) + || key == ImGuiKey_Tab || key == ImGuiKey_Space || key == ImGuiKey_Apostrophe || key == ImGuiKey_Comma || key == ImGuiKey_Minus || key == ImGuiKey_Period + || key == ImGuiKey_Slash || key == ImGuiKey_Semicolon || key == ImGuiKey_Equal || key == ImGuiKey_LeftBracket || key == ImGuiKey_RightBracket || key == ImGuiKey_GraveAccent + || key == ImGuiKey_KeypadDecimal || key == ImGuiKey_KeypadDivide || key == ImGuiKey_KeypadMultiply || key == ImGuiKey_KeypadSubtract || key == ImGuiKey_KeypadAdd || key == ImGuiKey_KeypadEqual) + g.KeysMayBeCharInput.SetBit(key); + #ifdef IMGUI_HAS_DOCK // Initialize Docking DockContextInitialize(&g); @@ -3711,8 +3701,11 @@ void ImGui::Initialize() // This function is merely here to free heap allocations. void ImGui::Shutdown() { - // The fonts atlas can be used prior to calling NewFrame(), so we clear it even if g.Initialized is FALSE (which would happen if we never called NewFrame) ImGuiContext& g = *GImGui; + IM_ASSERT_USER_ERROR(g.IO.BackendPlatformUserData == NULL, "Forgot to shutdown Platform backend?"); + IM_ASSERT_USER_ERROR(g.IO.BackendRendererUserData == NULL, "Forgot to shutdown Renderer backend?"); + + // The fonts atlas can be used prior to calling NewFrame(), so we clear it even if g.Initialized is FALSE (which would happen if we never called NewFrame) if (g.IO.Fonts && g.FontAtlasOwnedByContext) { g.IO.Fonts->Locked = false; @@ -3996,6 +3989,7 @@ void ImGui::SetActiveID(ImGuiID id, ImGuiWindow* window) g.ActiveIdNoClearOnFocusLoss = false; g.ActiveIdWindow = window; g.ActiveIdHasBeenEditedThisFrame = false; + g.ActiveIdFromShortcut = false; if (id) { g.ActiveIdIsAlive = id; @@ -4032,17 +4026,6 @@ ImGuiID ImGui::GetHoveredID() return g.HoveredId ? g.HoveredId : g.HoveredIdPreviousFrame; } -// This is called by ItemAdd(). -// Code not using ItemAdd() may need to call this manually otherwise ActiveId will be cleared. In IMGUI_VERSION_NUM < 18717 this was called by GetID(). -void ImGui::KeepAliveID(ImGuiID id) -{ - ImGuiContext& g = *GImGui; - if (g.ActiveId == id) - g.ActiveIdIsAlive = id; - if (g.ActiveIdPreviousFrame == id) - g.ActiveIdPreviousFrameIsAlive = true; -} - void ImGui::MarkItemEdited(ImGuiID id) { // This marking is solely to be able to provide info for IsItemDeactivatedAfterEdit(). @@ -4098,13 +4081,21 @@ bool ImGui::IsWindowContentHoverable(ImGuiWindow* window, ImGuiHoveredFlags flag static inline float CalcDelayFromHoveredFlags(ImGuiHoveredFlags flags) { ImGuiContext& g = *GImGui; - if (flags & ImGuiHoveredFlags_DelayShort) - return g.Style.HoverDelayShort; if (flags & ImGuiHoveredFlags_DelayNormal) return g.Style.HoverDelayNormal; + if (flags & ImGuiHoveredFlags_DelayShort) + return g.Style.HoverDelayShort; return 0.0f; } +static ImGuiHoveredFlags ApplyHoverFlagsForTooltip(ImGuiHoveredFlags user_flags, ImGuiHoveredFlags shared_flags) +{ + // Allow instance flags to override shared flags + if (user_flags & (ImGuiHoveredFlags_DelayNone | ImGuiHoveredFlags_DelayShort | ImGuiHoveredFlags_DelayNormal)) + shared_flags &= ~(ImGuiHoveredFlags_DelayNone | ImGuiHoveredFlags_DelayShort | ImGuiHoveredFlags_DelayNormal); + return user_flags | shared_flags; +} + // This is roughly matching the behavior of internal-facing ItemHoverable() // - we allow hovering to be true when ActiveId==window->MoveID, so that clicking on non-interactive items such as a Text() item still returns true with IsItemHovered() // - this should work even for non-interactive items that have no ID, so we cannot use LastItemId @@ -4122,7 +4113,7 @@ bool ImGui::IsItemHovered(ImGuiHoveredFlags flags) return false; if (flags & ImGuiHoveredFlags_ForTooltip) - flags |= g.Style.HoverFlagsForTooltipNav; + flags = ApplyHoverFlagsForTooltip(flags, g.Style.HoverFlagsForTooltipNav); } else { @@ -4132,7 +4123,7 @@ bool ImGui::IsItemHovered(ImGuiHoveredFlags flags) return false; if (flags & ImGuiHoveredFlags_ForTooltip) - flags |= g.Style.HoverFlagsForTooltipMouse; + flags = ApplyHoverFlagsForTooltip(flags, g.Style.HoverFlagsForTooltipMouse); IM_ASSERT((flags & (ImGuiHoveredFlags_AnyWindow | ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_ChildWindows | ImGuiHoveredFlags_NoPopupHierarchy | ImGuiHoveredFlags_DockHierarchy)) == 0); // Flags not supported by this function @@ -4216,7 +4207,8 @@ bool ImGui::ItemHoverable(const ImRect& bb, ImGuiID id, ImGuiItemFlags item_flag if (g.HoveredId != 0 && g.HoveredId != id && !g.HoveredIdAllowOverlap) return false; if (g.ActiveId != 0 && g.ActiveId != id && !g.ActiveIdAllowOverlap) - return false; + if (!g.ActiveIdFromShortcut) + return false; // Done with rectangle culling so we can perform heavier checks now. if (!(item_flags & ImGuiItemFlags_NoWindowHoverableCheck) && !IsWindowContentHoverable(window, ImGuiHoveredFlags_None)) @@ -4255,17 +4247,19 @@ bool ImGui::ItemHoverable(const ImRect& bb, ImGuiID id, ImGuiItemFlags item_flag return false; } +#ifndef IMGUI_DISABLE_DEBUG_TOOLS if (id != 0) { // [DEBUG] Item Picker tool! - // We perform the check here because SetHoveredID() is not frequently called (1~ time a frame), making - // the cost of this tool near-zero. We can get slightly better call-stack and support picking non-hovered - // items if we performed the test in ItemAdd(), but that would incur a small runtime cost. + // We perform the check here because reaching is path is rare (1~ time a frame), + // making the cost of this tool near-zero! We could get better call-stack and support picking non-hovered + // items if we performed the test in ItemAdd(), but that would incur a bigger runtime cost. if (g.DebugItemPickerActive && g.HoveredIdPreviousFrame == id) GetForegroundDrawList()->AddRect(bb.Min, bb.Max, IM_COL32(255, 255, 0, 255)); if (g.DebugItemPickerBreakId == id) IM_DEBUG_BREAK(); } +#endif if (g.NavDisableMouseHover) return false; @@ -4274,12 +4268,13 @@ bool ImGui::ItemHoverable(const ImRect& bb, ImGuiID id, ImGuiItemFlags item_flag } // FIXME: This is inlined/duplicated in ItemAdd() +// FIXME: The id != 0 path is not used by our codebase, may get rid of it? bool ImGui::IsClippedEx(const ImRect& bb, ImGuiID id) { ImGuiContext& g = *GImGui; ImGuiWindow* window = g.CurrentWindow; if (!bb.Overlaps(window->ClipRect)) - if (id == 0 || (id != g.ActiveId && id != g.NavId)) + if (id == 0 || (id != g.ActiveId && id != g.ActiveIdPreviousFrame && id != g.NavId && id != g.NavActivateId)) if (!g.LogEnabled) return true; return false; @@ -4323,20 +4318,51 @@ float ImGui::CalcWrapWidthForPos(const ImVec2& pos, float wrap_pos_x) // IM_ALLOC() == ImGui::MemAlloc() void* ImGui::MemAlloc(size_t size) { + void* ptr = (*GImAllocatorAllocFunc)(size, GImAllocatorUserData); +#ifndef IMGUI_DISABLE_DEBUG_TOOLS if (ImGuiContext* ctx = GImGui) - ctx->IO.MetricsActiveAllocations++; - return (*GImAllocatorAllocFunc)(size, GImAllocatorUserData); + DebugAllocHook(&ctx->DebugAllocInfo, ctx->FrameCount, ptr, size); +#endif + return ptr; } // IM_FREE() == ImGui::MemFree() void ImGui::MemFree(void* ptr) { - if (ptr) +#ifndef IMGUI_DISABLE_DEBUG_TOOLS + if (ptr != NULL) if (ImGuiContext* ctx = GImGui) - ctx->IO.MetricsActiveAllocations--; + DebugAllocHook(&ctx->DebugAllocInfo, ctx->FrameCount, ptr, (size_t)-1); +#endif return (*GImAllocatorFreeFunc)(ptr, GImAllocatorUserData); } +// We record the number of allocation in recent frames, as a way to audit/sanitize our guiding principles of "no allocations on idle/repeating frames" +void ImGui::DebugAllocHook(ImGuiDebugAllocInfo* info, int frame_count, void* ptr, size_t size) +{ + ImGuiDebugAllocEntry* entry = &info->LastEntriesBuf[info->LastEntriesIdx]; + IM_UNUSED(ptr); + if (entry->FrameCount != frame_count) + { + info->LastEntriesIdx = (info->LastEntriesIdx + 1) % IM_ARRAYSIZE(info->LastEntriesBuf); + entry = &info->LastEntriesBuf[info->LastEntriesIdx]; + entry->FrameCount = frame_count; + entry->AllocCount = entry->FreeCount = 0; + } + if (size != (size_t)-1) + { + entry->AllocCount++; + info->TotalAllocCount++; + //printf("[%05d] MemAlloc(%d) -> 0x%p\n", frame_count, size, ptr); + } + else + { + entry->FreeCount++; + info->TotalFreeCount++; + //printf("[%05d] MemFree(0x%p)\n", frame_count, ptr); + } +} + const char* ImGui::GetClipboardText() { ImGuiContext& g = *GImGui; @@ -4459,26 +4485,23 @@ void ImGui::StartMouseMovingWindow(ImGuiWindow* window) g.MovingWindow = window; } -// We use 'undock_floating_node == false' when dragging from title bar to allow moving groups of floating nodes without undocking them. -// - undock_floating_node == true: when dragging from a floating node within a hierarchy, always undock the node. -// - undock_floating_node == false: when dragging from a floating node within a hierarchy, move root window. -void ImGui::StartMouseMovingWindowOrNode(ImGuiWindow* window, ImGuiDockNode* node, bool undock_floating_node) +// We use 'undock == false' when dragging from title bar to allow moving groups of floating nodes without undocking them. +void ImGui::StartMouseMovingWindowOrNode(ImGuiWindow* window, ImGuiDockNode* node, bool undock) { ImGuiContext& g = *GImGui; bool can_undock_node = false; - if (node != NULL && node->VisibleWindow && (node->VisibleWindow->Flags & ImGuiWindowFlags_NoMove) == 0 && (node->MergedFlags & ImGuiDockNodeFlags_NoUndocking) == 0) + if (undock && node != NULL && node->VisibleWindow && (node->VisibleWindow->Flags & ImGuiWindowFlags_NoMove) == 0 && (node->MergedFlags & ImGuiDockNodeFlags_NoUndocking) == 0) { // Can undock if: - // - part of a floating node hierarchy with more than one visible node (if only one is visible, we'll just move the whole hierarchy) - // - part of a dockspace node hierarchy (trivia: undocking from a fixed/central node will create a new node and copy windows) + // - part of a hierarchy with more than one visible node (if only one is visible, we'll just move the root window) + // - part of a dockspace node hierarchy: so we can undock the last single visible node too (trivia: undocking from a fixed/central node will create a new node and copy windows) ImGuiDockNode* root_node = DockNodeGetRootNode(node); if (root_node->OnlyNodeWithWindows != node || root_node->CentralNode != NULL) // -V1051 PVS-Studio thinks node should be root_node and is wrong about that. - if (undock_floating_node || root_node->IsDockSpace()) - can_undock_node = true; + can_undock_node = true; } const bool clicked = IsMouseClicked(0); - const bool dragging = IsMouseDragging(0, g.IO.MouseDragThreshold * 1.70f); + const bool dragging = IsMouseDragging(0); if (can_undock_node && dragging) DockContextQueueUndockNode(&g, node); // Will lead to DockNodeStartMouseMovingWindow() -> StartMouseMovingWindow() being called next frame else if (!can_undock_node && (clicked || dragging) && g.MovingWindow != window) @@ -4624,9 +4647,9 @@ static void ScaleWindow(ImGuiWindow* window, float scale) { ImVec2 origin = window->Viewport->Pos; window->Pos = ImFloor((window->Pos - origin) * scale + origin); - window->Size = ImFloor(window->Size * scale); - window->SizeFull = ImFloor(window->SizeFull * scale); - window->ContentSize = ImFloor(window->ContentSize * scale); + window->Size = ImTrunc(window->Size * scale); + window->SizeFull = ImTrunc(window->SizeFull * scale); + window->ContentSize = ImTrunc(window->ContentSize * scale); } static bool IsWindowActiveAndVisible(ImGuiWindow* window) @@ -4701,12 +4724,11 @@ void ImGui::UpdateHoveredWindowAndCaptureFlags() } // Update io.WantCaptureKeyboard for the user application (true = dispatch keyboard info to Dear ImGui only, false = dispatch keyboard info to Dear ImGui + underlying app) - if (g.WantCaptureKeyboardNextFrame != -1) - io.WantCaptureKeyboard = (g.WantCaptureKeyboardNextFrame != 0); - else - io.WantCaptureKeyboard = (g.ActiveId != 0) || (modal_window != NULL); + io.WantCaptureKeyboard = (g.ActiveId != 0) || (modal_window != NULL); if (io.NavActive && (io.ConfigFlags & ImGuiConfigFlags_NavEnableKeyboard) && !(io.ConfigFlags & ImGuiConfigFlags_NavNoCaptureKeyboard)) io.WantCaptureKeyboard = true; + if (g.WantCaptureKeyboardNextFrame != -1) // Manual override + io.WantCaptureKeyboard = (g.WantCaptureKeyboardNextFrame != 0); // Update io.WantTextInput flag, this is to allow systems without a keyboard (e.g. mobile, hand-held) to show a software keyboard if possible io.WantTextInput = (g.WantTextInputNextFrame != -1) ? (g.WantTextInputNextFrame != 0) : false; @@ -4970,15 +4992,22 @@ void ImGui::NewFrame() DockContextNewFrameUpdateDocking(&g); // [DEBUG] Update debug features +#ifndef IMGUI_DISABLE_DEBUG_TOOLS UpdateDebugToolItemPicker(); UpdateDebugToolStackQueries(); + UpdateDebugToolFlashStyleColor(); if (g.DebugLocateFrames > 0 && --g.DebugLocateFrames == 0) + { g.DebugLocateId = 0; - if (g.DebugLogClipperAutoDisableFrames > 0 && --g.DebugLogClipperAutoDisableFrames == 0) + g.DebugBreakInLocateId = false; + } + if (g.DebugLogAutoDisableFrames > 0 && --g.DebugLogAutoDisableFrames == 0) { - DebugLog("(Auto-disabled ImGuiDebugLogFlags_EventClipper to avoid spamming)\n"); - g.DebugLogFlags &= ~ImGuiDebugLogFlags_EventClipper; + DebugLog("(Debug Log: Auto-disabled some ImGuiDebugLogFlags after 2 frames)\n"); + g.DebugLogFlags &= ~g.DebugLogAutoDisableFlags; + g.DebugLogAutoDisableFlags = ImGuiDebugLogFlags_None; } +#endif // Create implicit/fallback window - which we will only render it if the user has added something to it. // We don't use "Debug" to avoid colliding with user trying to create a "Debug" window with custom flags. @@ -4990,10 +5019,12 @@ void ImGui::NewFrame() // [DEBUG] When io.ConfigDebugBeginReturnValue is set, we make Begin()/BeginChild() return false at different level of the window-stack, // allowing to validate correct Begin/End behavior in user code. +#ifndef IMGUI_DISABLE_DEBUG_TOOLS if (g.IO.ConfigDebugBeginReturnValueLoop) g.DebugBeginReturnValueCullDepth = (g.DebugBeginReturnValueCullDepth == -1) ? 0 : ((g.DebugBeginReturnValueCullDepth + ((g.FrameCount % 4) == 0 ? 1 : 0)) % 10); else g.DebugBeginReturnValueCullDepth = -1; +#endif CallContextHooks(&g, ImGuiContextHookType_NewFramePost); } @@ -5198,7 +5229,7 @@ static void ImGui::RenderDimmedBackgrounds() { // Draw dimming behind modal or a begin stack child, whichever comes first in draw order. ImGuiWindow* dim_behind_window = FindBottomMostVisibleWindowWithinBeginStack(modal_window); - RenderDimmedBackgroundBehindWindow(dim_behind_window, GetColorU32(ImGuiCol_ModalWindowDimBg, g.DimBgRatio)); + RenderDimmedBackgroundBehindWindow(dim_behind_window, GetColorU32(modal_window->DC.ModalDimBgColor, g.DimBgRatio)); viewports_already_dimmed[0] = modal_window->Viewport; } else if (dim_bg_for_window_list) @@ -5262,18 +5293,7 @@ void ImGui::EndFrame() IMGUI_DEBUG_LOG_IO("[io] Calling io.SetPlatformImeDataFn(): WantVisible: %d, InputPos (%.2f,%.2f)\n", ime_data->WantVisible, ime_data->InputPos.x, ime_data->InputPos.y); if (viewport == NULL) viewport = GetMainViewport(); -#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS - if (viewport->PlatformHandleRaw == NULL && g.IO.ImeWindowHandle != NULL) - { - viewport->PlatformHandleRaw = g.IO.ImeWindowHandle; - g.IO.SetPlatformImeDataFn(viewport, ime_data); - viewport->PlatformHandleRaw = NULL; - } - else -#endif - { - g.IO.SetPlatformImeDataFn(viewport, ime_data); - } + g.IO.SetPlatformImeDataFn(viewport, ime_data); } // Hide implicit/fallback "Debug" window if it hasn't been used @@ -5337,6 +5357,7 @@ void ImGui::EndFrame() g.IO.Fonts->Locked = false; // Clear Input data for next frame + g.IO.MousePosPrev = g.IO.MousePos; g.IO.AppFocusLost = false; g.IO.MouseWheel = g.IO.MouseWheelH = 0.0f; g.IO.InputQueueCharacters.resize(0); @@ -5436,7 +5457,7 @@ ImVec2 ImGui::CalcTextSize(const char* text, const char* text_end, bool hide_tex // FIXME: Investigate using ceilf or e.g. // - https://git.musl-libc.org/cgit/musl/tree/src/math/ceilf.c // - https://embarkstudios.github.io/rust-gpu/api/src/libm/math/ceilf.rs.html - text_size.x = IM_FLOOR(text_size.x + 0.99999f); + text_size.x = IM_TRUNC(text_size.x + 0.99999f); return text_size; } @@ -5474,12 +5495,8 @@ static void FindHoveredWindow() continue; // Using the clipped AABB, a child window will typically be clipped by its parent (not always) - ImRect bb(window->OuterRectClipped); - if (window->Flags & (ImGuiWindowFlags_ChildWindow | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize)) - bb.Expand(padding_regular); - else - bb.Expand(padding_for_resize); - if (!bb.Contains(g.IO.MousePos)) + ImVec2 hit_padding = (window->Flags & (ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize)) ? padding_regular : padding_for_resize; + if (!window->OuterRectClipped.ContainsWithPad(g.IO.MousePos, hit_padding)) continue; // Support for one rectangular hole in any given window @@ -5574,6 +5591,9 @@ bool ImGui::IsItemToggledSelection() return (g.LastItemData.StatusFlags & ImGuiItemStatusFlags_ToggledSelection) ? true : false; } +// 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. bool ImGui::IsAnyItemHovered() { ImGuiContext& g = *GImGui; @@ -5661,40 +5681,105 @@ ImVec2 ImGui::GetItemRectSize() return g.LastItemData.Rect.GetSize(); } -bool ImGui::BeginChildEx(const char* name, ImGuiID id, const ImVec2& size_arg, bool border, ImGuiWindowFlags flags) +// Prior to v1.90 2023/10/16, the BeginChild() function took a 'bool border = false' parameter instead of 'ImGuiChildFlags child_flags = 0'. +// ImGuiChildFlags_Border is defined as always == 1 in order to allow old code passing 'true'. Read comments in imgui.h for details! +bool ImGui::BeginChild(const char* str_id, const ImVec2& size_arg, ImGuiChildFlags child_flags, ImGuiWindowFlags window_flags) +{ + ImGuiID id = GetCurrentWindow()->GetID(str_id); + return BeginChildEx(str_id, id, size_arg, child_flags, window_flags); +} + +bool ImGui::BeginChild(ImGuiID id, const ImVec2& size_arg, ImGuiChildFlags child_flags, ImGuiWindowFlags window_flags) +{ + return BeginChildEx(NULL, id, size_arg, child_flags, window_flags); +} + +bool ImGui::BeginChildEx(const char* name, ImGuiID id, const ImVec2& size_arg, ImGuiChildFlags child_flags, ImGuiWindowFlags window_flags) { ImGuiContext& g = *GImGui; ImGuiWindow* parent_window = g.CurrentWindow; + IM_ASSERT(id != 0); - flags |= ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_ChildWindow | ImGuiWindowFlags_NoDocking; - flags |= (parent_window->Flags & ImGuiWindowFlags_NoMove); // Inherit the NoMove flag - - // Size - const ImVec2 content_avail = GetContentRegionAvail(); - ImVec2 size = ImFloor(size_arg); - const int auto_fit_axises = ((size.x == 0.0f) ? (1 << ImGuiAxis_X) : 0x00) | ((size.y == 0.0f) ? (1 << ImGuiAxis_Y) : 0x00); - if (size.x <= 0.0f) - size.x = ImMax(content_avail.x + size.x, 4.0f); // Arbitrary minimum child size (0.0f causing too many issues) - if (size.y <= 0.0f) - size.y = ImMax(content_avail.y + size.y, 4.0f); + // Sanity check as it is likely that some user will accidentally pass ImGuiWindowFlags into the ImGuiChildFlags argument. + const ImGuiChildFlags ImGuiChildFlags_SupportedMask_ = ImGuiChildFlags_Border | ImGuiChildFlags_AlwaysUseWindowPadding | ImGuiChildFlags_ResizeX | ImGuiChildFlags_ResizeY | ImGuiChildFlags_AutoResizeX | ImGuiChildFlags_AutoResizeY | ImGuiChildFlags_AlwaysAutoResize | ImGuiChildFlags_FrameStyle; + IM_UNUSED(ImGuiChildFlags_SupportedMask_); + IM_ASSERT((child_flags & ~ImGuiChildFlags_SupportedMask_) == 0 && "Illegal ImGuiChildFlags value. Did you pass ImGuiWindowFlags values instead of ImGuiChildFlags?"); + IM_ASSERT((window_flags & ImGuiWindowFlags_AlwaysAutoResize) == 0 && "Cannot specify ImGuiWindowFlags_AlwaysAutoResize for BeginChild(). Use ImGuiChildFlags_AlwaysAutoResize!"); + if (child_flags & ImGuiChildFlags_AlwaysAutoResize) + { + IM_ASSERT((child_flags & (ImGuiChildFlags_ResizeX | ImGuiChildFlags_ResizeY)) == 0 && "Cannot use ImGuiChildFlags_ResizeX or ImGuiChildFlags_ResizeY with ImGuiChildFlags_AlwaysAutoResize!"); + IM_ASSERT((child_flags & (ImGuiChildFlags_AutoResizeX | ImGuiChildFlags_AutoResizeY)) != 0 && "Must use ImGuiChildFlags_AutoResizeX or ImGuiChildFlags_AutoResizeY with ImGuiChildFlags_AlwaysAutoResize!"); + } +#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS + if (window_flags & ImGuiWindowFlags_AlwaysUseWindowPadding) + child_flags |= ImGuiChildFlags_AlwaysUseWindowPadding; +#endif + if (child_flags & ImGuiChildFlags_AutoResizeX) + child_flags &= ~ImGuiChildFlags_ResizeX; + if (child_flags & ImGuiChildFlags_AutoResizeY) + child_flags &= ~ImGuiChildFlags_ResizeY; + + // Set window flags + window_flags |= ImGuiWindowFlags_ChildWindow | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoDocking; + window_flags |= (parent_window->Flags & ImGuiWindowFlags_NoMove); // Inherit the NoMove flag + if (child_flags & (ImGuiChildFlags_AutoResizeX | ImGuiChildFlags_AutoResizeY | ImGuiChildFlags_AlwaysAutoResize)) + window_flags |= ImGuiWindowFlags_AlwaysAutoResize; + if ((child_flags & (ImGuiChildFlags_ResizeX | ImGuiChildFlags_ResizeY)) == 0) + window_flags |= ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoSavedSettings; + + // Special framed style + if (child_flags & ImGuiChildFlags_FrameStyle) + { + PushStyleColor(ImGuiCol_ChildBg, g.Style.Colors[ImGuiCol_FrameBg]); + PushStyleVar(ImGuiStyleVar_ChildRounding, g.Style.FrameRounding); + PushStyleVar(ImGuiStyleVar_ChildBorderSize, g.Style.FrameBorderSize); + PushStyleVar(ImGuiStyleVar_WindowPadding, g.Style.FramePadding); + child_flags |= ImGuiChildFlags_Border | ImGuiChildFlags_AlwaysUseWindowPadding; + window_flags |= ImGuiWindowFlags_NoMove; + } + + // Forward child flags + g.NextWindowData.Flags |= ImGuiNextWindowDataFlags_HasChildFlags; + g.NextWindowData.ChildFlags = child_flags; + + // Forward size + // Important: Begin() has special processing to switch condition to ImGuiCond_FirstUseEver for a given axis when ImGuiChildFlags_ResizeXXX is set. + // (the alternative would to store conditional flags per axis, which is possible but more code) + const ImVec2 size_avail = GetContentRegionAvail(); + const ImVec2 size_default((child_flags & ImGuiChildFlags_AutoResizeX) ? 0.0f : size_avail.x, (child_flags & ImGuiChildFlags_AutoResizeY) ? 0.0f : size_avail.y); + const ImVec2 size = CalcItemSize(size_arg, size_default.x, size_default.y); SetNextWindowSize(size); // Build up name. If you need to append to a same child from multiple location in the ID stack, use BeginChild(ImGuiID id) with a stable value. + // FIXME: 2023/11/14: commented out shorted version. We had an issue with multiple ### in child window path names, which the trailing hash helped workaround. + // e.g. "ParentName###ParentIdentifier/ChildName###ChildIdentifier" would get hashed incorrectly by ImHashStr(), trailing _%08X somehow fixes it. const char* temp_window_name; + /*if (name && parent_window->IDStack.back() == parent_window->ID) + ImFormatStringToTempBuffer(&temp_window_name, NULL, "%s/%s", parent_window->Name, name); // May omit ID if in root of ID stack + else*/ if (name) ImFormatStringToTempBuffer(&temp_window_name, NULL, "%s/%s_%08X", parent_window->Name, name, id); else ImFormatStringToTempBuffer(&temp_window_name, NULL, "%s/%08X", parent_window->Name, id); + // Set style const float backup_border_size = g.Style.ChildBorderSize; - if (!border) + if ((child_flags & ImGuiChildFlags_Border) == 0) g.Style.ChildBorderSize = 0.0f; - bool ret = Begin(temp_window_name, NULL, flags); + + // Begin into window + const bool ret = Begin(temp_window_name, NULL, window_flags); + + // Restore style g.Style.ChildBorderSize = backup_border_size; + if (child_flags & ImGuiChildFlags_FrameStyle) + { + PopStyleVar(3); + PopStyleColor(); + } ImGuiWindow* child_window = g.CurrentWindow; child_window->ChildId = id; - child_window->AutoFitChildAxises = (ImS8)auto_fit_axises; // Set the cursor to handle case where the user called SetNextWindowPos()+BeginChild() manually. // While this is not really documented/defined, it seems that the expected thing to do. @@ -5702,11 +5787,11 @@ bool ImGui::BeginChildEx(const char* name, ImGuiID id, const ImVec2& size_arg, b parent_window->DC.CursorPos = child_window->Pos; // Process navigation-in immediately so NavInit can run on first frame - // Can enter a child if (A) it has navigatable items or (B) it can be scrolled. + // Can enter a child if (A) it has navigable items or (B) it can be scrolled. const ImGuiID temp_id_for_activation = ImHashStr("##Child", 0, id); if (g.ActiveId == temp_id_for_activation) ClearActiveID(); - if (g.NavActivateId == id && !(flags & ImGuiWindowFlags_NavFlattened) && (child_window->DC.NavLayersActiveMask != 0 || child_window->DC.NavWindowHasScrollY)) + if (g.NavActivateId == id && !(window_flags & ImGuiWindowFlags_NavFlattened) && (child_window->DC.NavLayersActiveMask != 0 || child_window->DC.NavWindowHasScrollY)) { FocusWindow(child_window); NavInitWindow(child_window, false); @@ -5716,51 +5801,30 @@ bool ImGui::BeginChildEx(const char* name, ImGuiID id, const ImVec2& size_arg, b return ret; } -bool ImGui::BeginChild(const char* str_id, const ImVec2& size_arg, bool border, ImGuiWindowFlags extra_flags) -{ - ImGuiWindow* window = GetCurrentWindow(); - return BeginChildEx(str_id, window->GetID(str_id), size_arg, border, extra_flags); -} - -bool ImGui::BeginChild(ImGuiID id, const ImVec2& size_arg, bool border, ImGuiWindowFlags extra_flags) -{ - IM_ASSERT(id != 0); - return BeginChildEx(NULL, id, size_arg, border, extra_flags); -} - void ImGui::EndChild() { ImGuiContext& g = *GImGui; - ImGuiWindow* window = g.CurrentWindow; + ImGuiWindow* child_window = g.CurrentWindow; IM_ASSERT(g.WithinEndChild == false); - IM_ASSERT(window->Flags & ImGuiWindowFlags_ChildWindow); // Mismatched BeginChild()/EndChild() calls + IM_ASSERT(child_window->Flags & ImGuiWindowFlags_ChildWindow); // Mismatched BeginChild()/EndChild() calls g.WithinEndChild = true; - if (window->BeginCount > 1) - { - End(); - } - else + ImVec2 child_size = child_window->Size; + End(); + if (child_window->BeginCount == 1) { - ImVec2 sz = window->Size; - if (window->AutoFitChildAxises & (1 << ImGuiAxis_X)) // Arbitrary minimum zero-ish child size of 4.0f causes less trouble than a 0.0f - sz.x = ImMax(4.0f, sz.x); - if (window->AutoFitChildAxises & (1 << ImGuiAxis_Y)) - sz.y = ImMax(4.0f, sz.y); - End(); - ImGuiWindow* parent_window = g.CurrentWindow; - ImRect bb(parent_window->DC.CursorPos, parent_window->DC.CursorPos + sz); - ItemSize(sz); - if ((window->DC.NavLayersActiveMask != 0 || window->DC.NavWindowHasScrollY) && !(window->Flags & ImGuiWindowFlags_NavFlattened)) + ImRect bb(parent_window->DC.CursorPos, parent_window->DC.CursorPos + child_size); + ItemSize(child_size); + if ((child_window->DC.NavLayersActiveMask != 0 || child_window->DC.NavWindowHasScrollY) && !(child_window->Flags & ImGuiWindowFlags_NavFlattened)) { - ItemAdd(bb, window->ChildId); - RenderNavHighlight(bb, window->ChildId); + ItemAdd(bb, child_window->ChildId); + RenderNavHighlight(bb, child_window->ChildId); // When browsing a window that has no activable items (scroll only) we keep a highlight on the child (pass g.NavId to trick into always displaying) - if (window->DC.NavLayersActiveMask == 0 && window == g.NavWindow) - RenderNavHighlight(ImRect(bb.Min - ImVec2(2, 2), bb.Max + ImVec2(2, 2)), g.NavId, ImGuiNavHighlightFlags_TypeThin); + if (child_window->DC.NavLayersActiveMask == 0 && child_window == g.NavWindow) + RenderNavHighlight(ImRect(bb.Min - ImVec2(2, 2), bb.Max + ImVec2(2, 2)), g.NavId, ImGuiNavHighlightFlags_Compact); } else { @@ -5768,36 +5832,16 @@ void ImGui::EndChild() ItemAdd(bb, 0); // But when flattened we directly reach items, adjust active layer mask accordingly - if (window->Flags & ImGuiWindowFlags_NavFlattened) - parent_window->DC.NavLayersActiveMaskNext |= window->DC.NavLayersActiveMaskNext; + if (child_window->Flags & ImGuiWindowFlags_NavFlattened) + parent_window->DC.NavLayersActiveMaskNext |= child_window->DC.NavLayersActiveMaskNext; } - if (g.HoveredWindow == window) + if (g.HoveredWindow == child_window) g.LastItemData.StatusFlags |= ImGuiItemStatusFlags_HoveredWindow; } g.WithinEndChild = false; g.LogLinePosY = -FLT_MAX; // To enforce a carriage return } -// Helper to create a child window / scrolling region that looks like a normal widget frame. -bool ImGui::BeginChildFrame(ImGuiID id, const ImVec2& size, ImGuiWindowFlags extra_flags) -{ - ImGuiContext& g = *GImGui; - const ImGuiStyle& style = g.Style; - PushStyleColor(ImGuiCol_ChildBg, style.Colors[ImGuiCol_FrameBg]); - PushStyleVar(ImGuiStyleVar_ChildRounding, style.FrameRounding); - PushStyleVar(ImGuiStyleVar_ChildBorderSize, style.FrameBorderSize); - PushStyleVar(ImGuiStyleVar_WindowPadding, style.FramePadding); - bool ret = BeginChild(id, size, true, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_AlwaysUseWindowPadding | extra_flags); - PopStyleVar(3); - PopStyleColor(); - return ret; -} - -void ImGui::EndChildFrame() -{ - EndChild(); -} - static void SetWindowConditionAllowFlags(ImGuiWindow* window, ImGuiCond flags, bool enabled) { window->SetWindowPosAllowFlags = enabled ? (window->SetWindowPosAllowFlags | flags) : (window->SetWindowPosAllowFlags & ~flags); @@ -5827,9 +5871,9 @@ static void ApplyWindowSettings(ImGuiWindow* window, ImGuiWindowSettings* settin window->ViewportId = settings->ViewportId; window->ViewportPos = ImVec2(settings->ViewportPos.x, settings->ViewportPos.y); } - window->Pos = ImFloor(ImVec2(settings->Pos.x + window->ViewportPos.x, settings->Pos.y + window->ViewportPos.y)); + window->Pos = ImTrunc(ImVec2(settings->Pos.x + window->ViewportPos.x, settings->Pos.y + window->ViewportPos.y)); if (settings->Size.x > 0 && settings->Size.y > 0) - window->Size = window->SizeFull = ImFloor(ImVec2(settings->Size.x, settings->Size.y)); + window->Size = window->SizeFull = ImTrunc(ImVec2(settings->Size.x, settings->Size.y)); window->Collapsed = settings->Collapsed; window->DockId = settings->DockId; window->DockOrder = settings->DockOrder; @@ -5924,13 +5968,37 @@ static ImGuiWindow* GetWindowForTitleAndMenuHeight(ImGuiWindow* window) return (window->DockNodeAsHost && window->DockNodeAsHost->VisibleWindow) ? window->DockNodeAsHost->VisibleWindow : window; } +static inline ImVec2 CalcWindowMinSize(ImGuiWindow* window) +{ + // We give windows non-zero minimum size to facilitate understanding problematic cases (e.g. empty popups) + // FIXME: Essentially we want to restrict manual resizing to WindowMinSize+Decoration, and allow api resizing to be smaller. + // Perhaps should tend further a neater test for this. + ImGuiContext& g = *GImGui; + ImVec2 size_min; + if ((window->Flags & ImGuiWindowFlags_ChildWindow) && !(window->Flags & ImGuiWindowFlags_Popup)) + { + size_min.x = (window->ChildFlags & ImGuiChildFlags_ResizeX) ? g.Style.WindowMinSize.x : 4.0f; + size_min.y = (window->ChildFlags & ImGuiChildFlags_ResizeY) ? g.Style.WindowMinSize.y : 4.0f; + } + else + { + size_min.x = ((window->Flags & ImGuiWindowFlags_AlwaysAutoResize) == 0) ? g.Style.WindowMinSize.x : 4.0f; + size_min.y = ((window->Flags & ImGuiWindowFlags_AlwaysAutoResize) == 0) ? g.Style.WindowMinSize.y : 4.0f; + } + + // Reduce artifacts with very small windows + ImGuiWindow* window_for_height = GetWindowForTitleAndMenuHeight(window); + size_min.y = ImMax(size_min.y, window_for_height->TitleBarHeight() + window_for_height->MenuBarHeight() + ImMax(0.0f, g.Style.WindowRounding - 1.0f)); + return size_min; +} + static ImVec2 CalcWindowSizeAfterConstraint(ImGuiWindow* window, const ImVec2& size_desired) { ImGuiContext& g = *GImGui; ImVec2 new_size = size_desired; if (g.NextWindowData.Flags & ImGuiNextWindowDataFlags_HasSizeConstraint) { - // Using -1,-1 on either X/Y axis to preserve the current size. + // See comments in SetNextWindowSizeConstraints() for details about setting size_min an size_max. ImRect cr = g.NextWindowData.SizeConstraintRect; new_size.x = (cr.Min.x >= 0 && cr.Max.x >= 0) ? ImClamp(new_size.x, cr.Min.x, cr.Max.x) : window->SizeFull.x; new_size.y = (cr.Min.y >= 0 && cr.Max.y >= 0) ? ImClamp(new_size.y, cr.Min.y, cr.Max.y) : window->SizeFull.y; @@ -5944,19 +6012,13 @@ static ImVec2 CalcWindowSizeAfterConstraint(ImGuiWindow* window, const ImVec2& s g.NextWindowData.SizeCallback(&data); new_size = data.DesiredSize; } - new_size.x = IM_FLOOR(new_size.x); - new_size.y = IM_FLOOR(new_size.y); + new_size.x = IM_TRUNC(new_size.x); + new_size.y = IM_TRUNC(new_size.y); } // Minimum size - if (!(window->Flags & (ImGuiWindowFlags_ChildWindow | ImGuiWindowFlags_AlwaysAutoResize))) - { - ImGuiWindow* window_for_height = GetWindowForTitleAndMenuHeight(window); - new_size = ImMax(new_size, g.Style.WindowMinSize); - const float minimum_height = window_for_height->TitleBarHeight() + window_for_height->MenuBarHeight() + ImMax(0.0f, g.Style.WindowRounding - 1.0f); - new_size.y = ImMax(new_size.y, minimum_height); // Reduce artifacts with very small windows - } - return new_size; + ImVec2 size_min = CalcWindowMinSize(window); + return ImMax(new_size, size_min); } static void CalcWindowContentSizes(ImGuiWindow* window, ImVec2* content_size_current, ImVec2* content_size_ideal) @@ -5973,10 +6035,10 @@ static void CalcWindowContentSizes(ImGuiWindow* window, ImVec2* content_size_cur return; } - content_size_current->x = (window->ContentSizeExplicit.x != 0.0f) ? window->ContentSizeExplicit.x : IM_FLOOR(window->DC.CursorMaxPos.x - window->DC.CursorStartPos.x); - content_size_current->y = (window->ContentSizeExplicit.y != 0.0f) ? window->ContentSizeExplicit.y : IM_FLOOR(window->DC.CursorMaxPos.y - window->DC.CursorStartPos.y); - content_size_ideal->x = (window->ContentSizeExplicit.x != 0.0f) ? window->ContentSizeExplicit.x : IM_FLOOR(ImMax(window->DC.CursorMaxPos.x, window->DC.IdealMaxPos.x) - window->DC.CursorStartPos.x); - content_size_ideal->y = (window->ContentSizeExplicit.y != 0.0f) ? window->ContentSizeExplicit.y : IM_FLOOR(ImMax(window->DC.CursorMaxPos.y, window->DC.IdealMaxPos.y) - window->DC.CursorStartPos.y); + content_size_current->x = (window->ContentSizeExplicit.x != 0.0f) ? window->ContentSizeExplicit.x : IM_TRUNC(window->DC.CursorMaxPos.x - window->DC.CursorStartPos.x); + content_size_current->y = (window->ContentSizeExplicit.y != 0.0f) ? window->ContentSizeExplicit.y : IM_TRUNC(window->DC.CursorMaxPos.y - window->DC.CursorStartPos.y); + content_size_ideal->x = (window->ContentSizeExplicit.x != 0.0f) ? window->ContentSizeExplicit.x : IM_TRUNC(ImMax(window->DC.CursorMaxPos.x, window->DC.IdealMaxPos.x) - window->DC.CursorStartPos.x); + content_size_ideal->y = (window->ContentSizeExplicit.y != 0.0f) ? window->ContentSizeExplicit.y : IM_TRUNC(ImMax(window->DC.CursorMaxPos.y, window->DC.IdealMaxPos.y) - window->DC.CursorStartPos.y); } static ImVec2 CalcWindowAutoFitSize(ImGuiWindow* window, const ImVec2& size_contents) @@ -5995,19 +6057,12 @@ static ImVec2 CalcWindowAutoFitSize(ImGuiWindow* window, const ImVec2& size_cont else { // Maximum window size is determined by the viewport size or monitor size - const bool is_popup = (window->Flags & ImGuiWindowFlags_Popup) != 0; - const bool is_menu = (window->Flags & ImGuiWindowFlags_ChildMenu) != 0; - ImVec2 size_min = style.WindowMinSize; - if (is_popup || is_menu) // Popups and menus bypass style.WindowMinSize by default, but we give then a non-zero minimum size to facilitate understanding problematic cases (e.g. empty popups) - size_min = ImMin(size_min, ImVec2(4.0f, 4.0f)); - - ImVec2 avail_size = window->Viewport->WorkSize; - if (window->ViewportOwned) - avail_size = ImVec2(FLT_MAX, FLT_MAX); + ImVec2 size_min = CalcWindowMinSize(window); + ImVec2 size_max = (window->ViewportOwned || ((window->Flags & ImGuiWindowFlags_ChildWindow) && !(window->Flags & ImGuiWindowFlags_Popup))) ? ImVec2(FLT_MAX, FLT_MAX) : ImGui::GetMainViewport()->WorkSize - style.DisplaySafeAreaPadding * 2.0f; const int monitor_idx = window->ViewportAllowPlatformMonitorExtend; - if (monitor_idx >= 0 && monitor_idx < g.PlatformIO.Monitors.Size) - avail_size = g.PlatformIO.Monitors[monitor_idx].WorkSize; - ImVec2 size_auto_fit = ImClamp(size_desired, size_min, ImMax(size_min, avail_size - style.DisplaySafeAreaPadding * 2.0f)); + if (monitor_idx >= 0 && monitor_idx < g.PlatformIO.Monitors.Size && (window->Flags & ImGuiWindowFlags_ChildWindow) == 0) + size_max = g.PlatformIO.Monitors[monitor_idx].WorkSize - style.DisplaySafeAreaPadding * 2.0f; + ImVec2 size_auto_fit = ImClamp(size_desired, size_min, ImMax(size_min, size_max)); // When the window cannot fit all contents (either because of constraints, either because screen is too small), // we are growing the size on the other axis to compensate for expected scrollbar. FIXME: Might turn bigger than ViewportSize-WindowPadding. @@ -6055,7 +6110,7 @@ static void CalcResizePosSizeFromAnyCorner(ImGuiWindow* window, const ImVec2& co *out_size = size_constrained; } -// Data for resizing from corner +// Data for resizing from resize grip / corner struct ImGuiResizeGripDef { ImVec2 CornerPosN; @@ -6073,9 +6128,9 @@ static const ImGuiResizeGripDef resize_grip_def[4] = // Data for resizing from borders struct ImGuiResizeBorderDef { - ImVec2 InnerDir; - ImVec2 SegmentN1, SegmentN2; - float OuterAngle; + ImVec2 InnerDir; // Normal toward inside + ImVec2 SegmentN1, SegmentN2; // End positions, normalized (0,0: upper left) + float OuterAngle; // Angle toward outside }; static const ImGuiResizeBorderDef resize_border_def[4] = { @@ -6121,7 +6176,7 @@ ImGuiID ImGui::GetWindowResizeBorderID(ImGuiWindow* window, ImGuiDir dir) // Handle resize for: Resize Grips, Borders, Gamepad // Return true when using auto-fit (double-click on resize grip) -static bool ImGui::UpdateWindowManualResize(ImGuiWindow* window, const ImVec2& size_auto_fit, int* border_held, int resize_grip_count, ImU32 resize_grip_col[4], const ImRect& visibility_rect) +static int ImGui::UpdateWindowManualResize(ImGuiWindow* window, const ImVec2& size_auto_fit, int* border_hovered, int* border_held, int resize_grip_count, ImU32 resize_grip_col[4], const ImRect& visibility_rect) { ImGuiContext& g = *GImGui; ImGuiWindowFlags flags = window->Flags; @@ -6131,10 +6186,9 @@ static bool ImGui::UpdateWindowManualResize(ImGuiWindow* window, const ImVec2& s if (window->WasActive == false) // Early out to avoid running this code for e.g. a hidden implicit/fallback Debug window. return false; - bool ret_auto_fit = false; - const int resize_border_count = g.IO.ConfigWindowsResizeFromEdges ? 4 : 0; - const float grip_draw_size = IM_FLOOR(ImMax(g.FontSize * 1.35f, window->WindowRounding + 1.0f + g.FontSize * 0.2f)); - const float grip_hover_inner_size = IM_FLOOR(grip_draw_size * 0.75f); + int ret_auto_fit_mask = 0x00; + const float grip_draw_size = IM_TRUNC(ImMax(g.FontSize * 1.35f, window->WindowRounding + 1.0f + g.FontSize * 0.2f)); + const float grip_hover_inner_size = IM_TRUNC(grip_draw_size * 0.75f); const float grip_hover_outer_size = g.IO.ConfigWindowsResizeFromEdges ? WINDOWS_HOVER_PADDING : 0.0f; ImRect clamp_rect = visibility_rect; @@ -6177,11 +6231,11 @@ static bool ImGui::UpdateWindowManualResize(ImGuiWindow* window, const ImVec2& s if (hovered || held) g.MouseCursor = (resize_grip_n & 1) ? ImGuiMouseCursor_ResizeNESW : ImGuiMouseCursor_ResizeNWSE; - if (held && g.IO.MouseClickedCount[0] == 2 && resize_grip_n == 0) + if (held && g.IO.MouseDoubleClicked[0]) { - // Manual auto-fit when double-clicking + // Auto-fit when double-clicking size_target = CalcWindowSizeAfterConstraint(window, size_auto_fit); - ret_auto_fit = true; + ret_auto_fit_mask = 0x03; // Both axises ClearActiveID(); } else if (held) @@ -6199,8 +6253,16 @@ static bool ImGui::UpdateWindowManualResize(ImGuiWindow* window, const ImVec2& s if (resize_grip_n == 0 || held || hovered) resize_grip_col[resize_grip_n] = GetColorU32(held ? ImGuiCol_ResizeGripActive : hovered ? ImGuiCol_ResizeGripHovered : ImGuiCol_ResizeGrip); } - for (int border_n = 0; border_n < resize_border_count; border_n++) + + int resize_border_mask = 0x00; + if (window->Flags & ImGuiWindowFlags_ChildWindow) + resize_border_mask |= ((window->ChildFlags & ImGuiChildFlags_ResizeX) ? 0x02 : 0) | ((window->ChildFlags & ImGuiChildFlags_ResizeY) ? 0x08 : 0); + else + resize_border_mask = g.IO.ConfigWindowsResizeFromEdges ? 0x0F : 0x00; + for (int border_n = 0; border_n < 4; border_n++) { + if ((resize_border_mask & (1 << border_n)) == 0) + continue; const ImGuiResizeBorderDef& def = resize_border_def[border_n]; const ImGuiAxis axis = (border_n == ImGuiDir_Left || border_n == ImGuiDir_Right) ? ImGuiAxis_X : ImGuiAxis_Y; @@ -6209,22 +6271,73 @@ static bool ImGui::UpdateWindowManualResize(ImGuiWindow* window, const ImVec2& s ImGuiID border_id = window->GetID(border_n + 4); // == GetWindowResizeBorderID() ItemAdd(border_rect, border_id, NULL, ImGuiItemFlags_NoNav); ButtonBehavior(border_rect, border_id, &hovered, &held, ImGuiButtonFlags_FlattenChildren | ImGuiButtonFlags_NoNavFocus); - //GetForegroundDrawLists(window)->AddRect(border_rect.Min, border_rect.Max, IM_COL32(255, 255, 0, 255)); - if ((hovered && g.HoveredIdTimer > WINDOWS_RESIZE_FROM_EDGES_FEEDBACK_TIMER) || held) - { + //GetForegroundDrawList(window)->AddRect(border_rect.Min, border_rect.Max, IM_COL32(255, 255, 0, 255)); + if (hovered && g.HoveredIdTimer <= WINDOWS_RESIZE_FROM_EDGES_FEEDBACK_TIMER) + hovered = false; + if (hovered || held) g.MouseCursor = (axis == ImGuiAxis_X) ? ImGuiMouseCursor_ResizeEW : ImGuiMouseCursor_ResizeNS; - if (held) - *border_held = border_n; + if (held && g.IO.MouseDoubleClicked[0]) + { + // Double-clicking bottom or right border auto-fit on this axis + // FIXME: Support top and right borders: rework CalcResizePosSizeFromAnyCorner() to be reusable in both cases. + if (border_n == 1 || border_n == 3) // Right and bottom border + { + size_target[axis] = CalcWindowSizeAfterConstraint(window, size_auto_fit)[axis]; + ret_auto_fit_mask |= (1 << axis); + hovered = held = false; // So border doesn't show highlighted at new position + } + ClearActiveID(); } - if (held) + else if (held) { + // Switch to relative resizing mode when border geometry moved (e.g. resizing a child altering parent scroll), in order to avoid resizing feedback loop. + // Currently only using relative mode on resizable child windows, as the problem to solve is more likely noticeable for them, but could apply for all windows eventually. + // FIXME: May want to generalize this idiom at lower-level, so more widgets can use it! + const bool just_scrolled_manually_while_resizing = (g.WheelingWindow != NULL && g.WheelingWindowScrolledFrame == g.FrameCount && IsWindowChildOf(window, g.WheelingWindow, false, true)); + if (g.ActiveIdIsJustActivated || just_scrolled_manually_while_resizing) + { + g.WindowResizeBorderExpectedRect = border_rect; + g.WindowResizeRelativeMode = false; + } + if ((window->Flags & ImGuiWindowFlags_ChildWindow) && memcmp(&g.WindowResizeBorderExpectedRect, &border_rect, sizeof(ImRect)) != 0) + g.WindowResizeRelativeMode = true; + + const ImVec2 border_curr = (window->Pos + ImMin(def.SegmentN1, def.SegmentN2) * window->Size); + const float border_target_rel_mode_for_axis = border_curr[axis] + g.IO.MouseDelta[axis]; + const float border_target_abs_mode_for_axis = g.IO.MousePos[axis] - g.ActiveIdClickOffset[axis] + WINDOWS_HOVER_PADDING; // Match ButtonBehavior() padding above. + + // Use absolute mode position + ImVec2 border_target = window->Pos; + border_target[axis] = border_target_abs_mode_for_axis; + + // Use relative mode target for child window, ignore resize when moving back toward the ideal absolute position. + bool ignore_resize = false; + if (g.WindowResizeRelativeMode) + { + //GetForegroundDrawList()->AddText(GetMainViewport()->WorkPos, IM_COL32_WHITE, "Relative Mode"); + border_target[axis] = border_target_rel_mode_for_axis; + if (g.IO.MouseDelta[axis] == 0.0f || (g.IO.MouseDelta[axis] > 0.0f) == (border_target_rel_mode_for_axis > border_target_abs_mode_for_axis)) + ignore_resize = true; + } + + // Clamp, apply ImVec2 clamp_min(border_n == ImGuiDir_Right ? clamp_rect.Min.x : -FLT_MAX, border_n == ImGuiDir_Down || (border_n == ImGuiDir_Up && window_move_from_title_bar) ? clamp_rect.Min.y : -FLT_MAX); ImVec2 clamp_max(border_n == ImGuiDir_Left ? clamp_rect.Max.x : +FLT_MAX, border_n == ImGuiDir_Up ? clamp_rect.Max.y : +FLT_MAX); - ImVec2 border_target = window->Pos; - border_target[axis] = g.IO.MousePos[axis] - g.ActiveIdClickOffset[axis] + WINDOWS_HOVER_PADDING; border_target = ImClamp(border_target, clamp_min, clamp_max); - CalcResizePosSizeFromAnyCorner(window, border_target, ImMin(def.SegmentN1, def.SegmentN2), &pos_target, &size_target); + if (flags & ImGuiWindowFlags_ChildWindow) // Clamp resizing of childs within parent + { + if ((flags & (ImGuiWindowFlags_HorizontalScrollbar | ImGuiWindowFlags_AlwaysHorizontalScrollbar)) == 0 || (flags & ImGuiWindowFlags_NoScrollbar)) + border_target.x = ImClamp(border_target.x, window->ParentWindow->InnerClipRect.Min.x, window->ParentWindow->InnerClipRect.Max.x); + if (flags & ImGuiWindowFlags_NoScrollbar) + border_target.y = ImClamp(border_target.y, window->ParentWindow->InnerClipRect.Min.y, window->ParentWindow->InnerClipRect.Max.y); + } + if (!ignore_resize) + CalcResizePosSizeFromAnyCorner(window, border_target, ImMin(def.SegmentN1, def.SegmentN2), &pos_target, &size_target); } + if (hovered) + *border_hovered = border_n; + if (held) + *border_held = border_n; } PopID(); @@ -6250,7 +6363,7 @@ static bool ImGui::UpdateWindowManualResize(ImGuiWindow* window, const ImVec2& s g.NavWindowingToggleLayer = false; g.NavDisableMouseHover = true; resize_grip_col[0] = GetColorU32(ImGuiCol_ResizeGripActive); - ImVec2 accum_floored = ImFloor(g.NavWindowingAccumDeltaSize); + ImVec2 accum_floored = ImTrunc(g.NavWindowingAccumDeltaSize); if (accum_floored.x != 0.0f || accum_floored.y != 0.0f) { // FIXME-NAV: Should store and accumulate into a separate size buffer to handle sizing constraints properly, right now a constraint will make us stuck. @@ -6261,19 +6374,24 @@ static bool ImGui::UpdateWindowManualResize(ImGuiWindow* window, const ImVec2& s } // Apply back modified position/size to window - if (size_target.x != FLT_MAX) - { - window->SizeFull = size_target; - MarkIniSettingsDirty(window); - } - if (pos_target.x != FLT_MAX) - { - window->Pos = ImFloor(pos_target); + const ImVec2 curr_pos = window->Pos; + const ImVec2 curr_size = window->SizeFull; + if (size_target.x != FLT_MAX && (window->Size.x != size_target.x || window->SizeFull.x != size_target.x)) + window->Size.x = window->SizeFull.x = size_target.x; + if (size_target.y != FLT_MAX && (window->Size.y != size_target.y || window->SizeFull.y != size_target.y)) + window->Size.y = window->SizeFull.y = size_target.y; + if (pos_target.x != FLT_MAX && window->Pos.x != ImTrunc(pos_target.x)) + window->Pos.x = ImTrunc(pos_target.x); + if (pos_target.y != FLT_MAX && window->Pos.y != ImTrunc(pos_target.y)) + window->Pos.y = ImTrunc(pos_target.y); + if (curr_pos.x != window->Pos.x || curr_pos.y != window->Pos.y || curr_size.x != window->SizeFull.x || curr_size.y != window->SizeFull.y) MarkIniSettingsDirty(window); - } - window->Size = window->SizeFull; - return ret_auto_fit; + // Recalculate next expected border expected coordinates + if (*border_held != -1) + g.WindowResizeBorderExpectedRect = GetResizeBorderRect(window, *border_held, grip_hover_inner_size, WINDOWS_HOVER_PADDING); + + return ret_auto_fit_mask; } static inline void ClampWindowPos(ImGuiWindow* window, const ImRect& visibility_rect) @@ -6285,27 +6403,40 @@ static inline void ClampWindowPos(ImGuiWindow* window, const ImRect& visibility_ window->Pos = ImClamp(window->Pos, visibility_rect.Min - size_for_clamping, visibility_rect.Max); } +static void RenderWindowOuterSingleBorder(ImGuiWindow* window, int border_n, ImU32 border_col, float border_size) +{ + const ImGuiResizeBorderDef& def = resize_border_def[border_n]; + const float rounding = window->WindowRounding; + const ImRect border_r = GetResizeBorderRect(window, border_n, rounding, 0.0f); + window->DrawList->PathArcTo(ImLerp(border_r.Min, border_r.Max, def.SegmentN1) + ImVec2(0.5f, 0.5f) + def.InnerDir * rounding, rounding, def.OuterAngle - IM_PI * 0.25f, def.OuterAngle); + window->DrawList->PathArcTo(ImLerp(border_r.Min, border_r.Max, def.SegmentN2) + ImVec2(0.5f, 0.5f) + def.InnerDir * rounding, rounding, def.OuterAngle, def.OuterAngle + IM_PI * 0.25f); + window->DrawList->PathStroke(border_col, ImDrawFlags_None, border_size); +} + static void ImGui::RenderWindowOuterBorders(ImGuiWindow* window) { ImGuiContext& g = *GImGui; - float rounding = window->WindowRounding; - float border_size = window->WindowBorderSize; - if (border_size > 0.0f && !(window->Flags & ImGuiWindowFlags_NoBackground)) - window->DrawList->AddRect(window->Pos, window->Pos + window->Size, GetColorU32(ImGuiCol_Border), rounding, 0, border_size); - - int border_held = window->ResizeBorderHeld; - if (border_held != -1) + const float border_size = window->WindowBorderSize; + const ImU32 border_col = GetColorU32(ImGuiCol_Border); + if (border_size > 0.0f && (window->Flags & ImGuiWindowFlags_NoBackground) == 0) + window->DrawList->AddRect(window->Pos, window->Pos + window->Size, border_col, window->WindowRounding, 0, window->WindowBorderSize); + else if (border_size > 0.0f) + { + if (window->ChildFlags & ImGuiChildFlags_ResizeX) // Similar code as 'resize_border_mask' computation in UpdateWindowManualResize() but we specifically only always draw explicit child resize border. + RenderWindowOuterSingleBorder(window, 1, border_col, border_size); + if (window->ChildFlags & ImGuiChildFlags_ResizeY) + RenderWindowOuterSingleBorder(window, 3, border_col, border_size); + } + if (window->ResizeBorderHovered != -1 || window->ResizeBorderHeld != -1) { - const ImGuiResizeBorderDef& def = resize_border_def[border_held]; - ImRect border_r = GetResizeBorderRect(window, border_held, rounding, 0.0f); - window->DrawList->PathArcTo(ImLerp(border_r.Min, border_r.Max, def.SegmentN1) + ImVec2(0.5f, 0.5f) + def.InnerDir * rounding, rounding, def.OuterAngle - IM_PI * 0.25f, def.OuterAngle); - window->DrawList->PathArcTo(ImLerp(border_r.Min, border_r.Max, def.SegmentN2) + ImVec2(0.5f, 0.5f) + def.InnerDir * rounding, rounding, def.OuterAngle, def.OuterAngle + IM_PI * 0.25f); - window->DrawList->PathStroke(GetColorU32(ImGuiCol_SeparatorActive), 0, ImMax(2.0f, border_size)); // Thicker than usual + const int border_n = (window->ResizeBorderHeld != -1) ? window->ResizeBorderHeld : window->ResizeBorderHovered; + const ImU32 border_col_resizing = GetColorU32((window->ResizeBorderHeld != -1) ? ImGuiCol_SeparatorActive : ImGuiCol_SeparatorHovered); + RenderWindowOuterSingleBorder(window, border_n, border_col_resizing, ImMax(2.0f, window->WindowBorderSize)); // Thicker than usual } if (g.Style.FrameBorderSize > 0 && !(window->Flags & ImGuiWindowFlags_NoTitleBar) && !window->DockIsActive) { float y = window->Pos.y + window->TitleBarHeight() - 1; - window->DrawList->AddLine(ImVec2(window->Pos.x + border_size, y), ImVec2(window->Pos.x + window->Size.x - border_size, y), GetColorU32(ImGuiCol_Border), g.Style.FrameBorderSize); + window->DrawList->AddLine(ImVec2(window->Pos.x + border_size, y), ImVec2(window->Pos.x + window->Size.x - border_size, y), border_col, g.Style.FrameBorderSize); } } @@ -6391,6 +6522,8 @@ void ImGui::RenderWindowDecorations(ImGuiWindow* window, const ImRect& title_bar if (!(flags & ImGuiWindowFlags_NoTitleBar) && !window->DockIsActive) { ImU32 title_bar_col = GetColorU32(title_bar_is_highlight ? ImGuiCol_TitleBgActive : ImGuiCol_TitleBg); + if (window->ViewportOwned) + title_bar_col |= IM_COL32_A_MASK; // No alpha window->DrawList->AddRectFilled(title_bar_rect.Min, title_bar_rect.Max, title_bar_col, window_rounding, ImDrawFlags_RoundCornersTop); } @@ -6408,8 +6541,8 @@ void ImGui::RenderWindowDecorations(ImGuiWindow* window, const ImRect& title_bar ImGuiDockNode* node = window->DockNode; if (window->DockIsActive && node->IsHiddenTabBar() && !node->IsNoTabBar()) { - float unhide_sz_draw = ImFloor(g.FontSize * 0.70f); - float unhide_sz_hit = ImFloor(g.FontSize * 0.55f); + float unhide_sz_draw = ImTrunc(g.FontSize * 0.70f); + float unhide_sz_hit = ImTrunc(g.FontSize * 0.55f); ImVec2 p = node->Pos; ImRect r(p, p + ImVec2(unhide_sz_hit, unhide_sz_hit)); ImGuiID unhide_id = window->GetID("#UNHIDE"); @@ -6418,7 +6551,7 @@ void ImGui::RenderWindowDecorations(ImGuiWindow* window, const ImRect& title_bar if (ButtonBehavior(r, unhide_id, &hovered, &held, ImGuiButtonFlags_FlattenChildren)) node->WantHiddenTabBarToggle = true; else if (held && IsMouseDragging(0)) - StartMouseMovingWindowOrNode(window, node, true); + StartMouseMovingWindowOrNode(window, node, true); // Undock from tab-bar triangle = same as window/collapse menu button // FIXME-DOCK: Ideally we'd use ImGuiCol_TitleBgActive/ImGuiCol_TitleBg here, but neither is guaranteed to be visible enough at this sort of size.. ImU32 col = GetColorU32(((held && hovered) || (node->IsFocused && !hovered)) ? ImGuiCol_ButtonActive : hovered ? ImGuiCol_ButtonHovered : ImGuiCol_Button); @@ -6622,6 +6755,10 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags) if (window_just_created) window = CreateNewWindow(name, flags); + // [DEBUG] Debug break requested by user + if (g.DebugBreakInWindow == window->ID) + IM_DEBUG_BREAK(); + // Automatically disable manual moving/resizing when NoInputs is set if ((flags & ImGuiWindowFlags_NoInputs) == ImGuiWindowFlags_NoInputs) flags |= ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoResize; @@ -6652,6 +6789,7 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags) SetWindowConditionAllowFlags(window, ImGuiCond_Appearing, true); window->FlagsPreviousFrame = window->Flags; window->Flags = (ImGuiWindowFlags)flags; + window->ChildFlags = (g.NextWindowData.Flags & ImGuiNextWindowDataFlags_HasChildFlags) ? g.NextWindowData.ChildFlags : 0; window->LastFrameActive = current_frame; window->LastTimeActive = (float)g.Time; window->BeginOrderWithinParent = 0; @@ -6706,7 +6844,6 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags) window->IDStack.push_back(window->ID); // Add to stack - // We intentionally set g.CurrentWindow to NULL to prevent usage until when the viewport is set, then will call SetCurrentWindow() g.CurrentWindow = window; ImGuiWindowStackData window_stack_data; window_stack_data.Window = window; @@ -6714,19 +6851,33 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags) window_stack_data.StackSizesOnBegin.SetToContextState(&g); g.CurrentWindowStack.push_back(window_stack_data); if (flags & ImGuiWindowFlags_ChildMenu) - g.BeginMenuCount++; + g.BeginMenuDepth++; // Update ->RootWindow and others pointers (before any possible call to FocusWindow) if (first_begin_of_the_frame) { UpdateWindowParentAndRootLinks(window, flags, parent_window); window->ParentWindowInBeginStack = parent_window_in_stack; + + // Focus route + // There's little point to expose a flag to set this: because the interesting cases won't be using parent_window_in_stack, + // Use for e.g. linking a tool window in a standalone viewport to a document window, regardless of their Begin() stack parenting. (#6798) + window->ParentWindowForFocusRoute = (window->RootWindow != window) ? parent_window_in_stack : NULL; + if (window->ParentWindowForFocusRoute == NULL && window->DockNode != NULL) + if (window->DockNode->MergedFlags & ImGuiDockNodeFlags_DockedWindowsInFocusRoute) + window->ParentWindowForFocusRoute = window->DockNode->HostWindow; + + // Override with SetNextWindowClass() field or direct call to SetWindowParentWindowForFocusRoute() + if (window->WindowClass.FocusRouteParentWindowId != 0) + { + window->ParentWindowForFocusRoute = FindWindowByID(window->WindowClass.FocusRouteParentWindowId); + IM_ASSERT(window->ParentWindowForFocusRoute != 0); // Invalid value for FocusRouteParentWindowId. + } } // Add to focus scope stack - PushFocusScope(window->ID); + PushFocusScope((flags & ImGuiWindowFlags_NavFlattened) ? g.CurrentFocusScopeId : window->ID); window->NavRootFocusScopeId = g.CurrentFocusScopeId; - g.CurrentWindow = NULL; // Add to popup stack if (flags & ImGuiWindowFlags_Popup) @@ -6762,6 +6913,10 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags) { window_size_x_set_by_api = (window->SetWindowSizeAllowFlags & g.NextWindowData.SizeCond) != 0 && (g.NextWindowData.SizeVal.x > 0.0f); window_size_y_set_by_api = (window->SetWindowSizeAllowFlags & g.NextWindowData.SizeCond) != 0 && (g.NextWindowData.SizeVal.y > 0.0f); + if ((window->ChildFlags & ImGuiChildFlags_ResizeX) && (window->SetWindowSizeAllowFlags & ImGuiCond_FirstUseEver) == 0) // Axis-specific conditions for BeginChild() + g.NextWindowData.SizeVal.x = window->SizeFull.x; + if ((window->ChildFlags & ImGuiChildFlags_ResizeY) && (window->SetWindowSizeAllowFlags & ImGuiCond_FirstUseEver) == 0) + g.NextWindowData.SizeVal.y = window->SizeFull.y; SetWindowSize(window, g.NextWindowData.SizeVal, g.NextWindowData.SizeCond); } if (g.NextWindowData.Flags & ImGuiNextWindowDataFlags_HasScroll) @@ -6790,6 +6945,9 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags) if (window->Appearing) SetWindowConditionAllowFlags(window, ImGuiCond_Appearing, false); + // We intentionally set g.CurrentWindow to NULL to prevent usage until when the viewport is set, then will call SetCurrentWindow() + g.CurrentWindow = NULL; + // When reusing window again multiple times a frame, just append content (don't need to setup again) if (first_begin_of_the_frame) { @@ -6876,10 +7034,9 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags) window->WindowBorderSize = style.ChildBorderSize; else window->WindowBorderSize = ((flags & (ImGuiWindowFlags_Popup | ImGuiWindowFlags_Tooltip)) && !(flags & ImGuiWindowFlags_Modal)) ? style.PopupBorderSize : style.WindowBorderSize; - if (!window->DockIsActive && (flags & ImGuiWindowFlags_ChildWindow) && !(flags & (ImGuiWindowFlags_AlwaysUseWindowPadding | ImGuiWindowFlags_Popup)) && window->WindowBorderSize == 0.0f) + window->WindowPadding = style.WindowPadding; + if (!window->DockIsActive && (flags & ImGuiWindowFlags_ChildWindow) && !(flags & ImGuiWindowFlags_Popup) && !(window->ChildFlags & ImGuiChildFlags_AlwaysUseWindowPadding) && window->WindowBorderSize == 0.0f) window->WindowPadding = ImVec2(0.0f, (flags & ImGuiWindowFlags_MenuBar) ? style.WindowPadding.y : 0.0f); - else - window->WindowPadding = style.WindowPadding; // Lock menu offset so size calculation can use it as menu-bar windows need a minimum size. window->DC.MenuBarOffset.x = ImMax(ImMax(window->WindowPadding.x, style.ItemSpacing.x), g.NextWindowData.MenuBarOffsetMinVal.x); @@ -7025,14 +7182,23 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags) } else if (window->ViewportOwned && g.PlatformIO.Monitors.Size > 0) { - // Lost windows (e.g. a monitor disconnected) will naturally moved to the fallback/dummy monitor aka the main viewport. - const ImGuiPlatformMonitor* monitor = GetViewportPlatformMonitor(window->Viewport); - visibility_rect.Min = monitor->WorkPos + visibility_padding; - visibility_rect.Max = monitor->WorkPos + monitor->WorkSize - visibility_padding; + if (g.MovingWindow != NULL && window->RootWindowDockTree == g.MovingWindow->RootWindowDockTree) + { + // While moving windows we allow them to straddle monitors (#7299, #3071) + visibility_rect = g.PlatformMonitorsFullWorkRect; + } + else + { + // When not moving ensure visible in its monitor + // Lost windows (e.g. a monitor disconnected) will naturally moved to the fallback/dummy monitor aka the main viewport. + const ImGuiPlatformMonitor* monitor = GetViewportPlatformMonitor(window->Viewport); + visibility_rect = ImRect(monitor->WorkPos, monitor->WorkPos + monitor->WorkSize); + } + visibility_rect.Expand(-visibility_padding); ClampWindowPos(window, visibility_rect); } } - window->Pos = ImFloor(window->Pos); + window->Pos = ImTrunc(window->Pos); // Lock window rounding for the frame (so that altering them doesn't cause inconsistencies) // Large values tend to lead to variety of artifacts and are not recommended. @@ -7071,13 +7237,19 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags) const bool handle_borders_and_resize_grips = (window->DockNodeAsHost || !window->DockIsActive); // Handle manual resize: Resize Grips, Borders, Gamepad - int border_held = -1; + int border_hovered = -1, border_held = -1; ImU32 resize_grip_col[4] = {}; - const int resize_grip_count = g.IO.ConfigWindowsResizeFromEdges ? 2 : 1; // Allow resize from lower-left if we have the mouse cursor feedback for it. - const float resize_grip_draw_size = IM_FLOOR(ImMax(g.FontSize * 1.10f, window->WindowRounding + 1.0f + g.FontSize * 0.2f)); + const int resize_grip_count = ((flags & ImGuiWindowFlags_ChildWindow) && !(flags & ImGuiWindowFlags_Popup)) ? 0 : g.IO.ConfigWindowsResizeFromEdges ? 2 : 1; // Allow resize from lower-left if we have the mouse cursor feedback for it. + const float resize_grip_draw_size = IM_TRUNC(ImMax(g.FontSize * 1.10f, window->WindowRounding + 1.0f + g.FontSize * 0.2f)); if (handle_borders_and_resize_grips && !window->Collapsed) - if (UpdateWindowManualResize(window, size_auto_fit, &border_held, resize_grip_count, &resize_grip_col[0], visibility_rect)) - use_current_size_for_scrollbar_x = use_current_size_for_scrollbar_y = true; + if (int auto_fit_mask = UpdateWindowManualResize(window, size_auto_fit, &border_hovered, &border_held, resize_grip_count, &resize_grip_col[0], visibility_rect)) + { + if (auto_fit_mask & (1 << ImGuiAxis_X)) + use_current_size_for_scrollbar_x = true; + if (auto_fit_mask & (1 << ImGuiAxis_Y)) + use_current_size_for_scrollbar_y = true; + } + window->ResizeBorderHovered = (signed char)border_hovered; window->ResizeBorderHeld = (signed char)border_held; // Synchronize window --> viewport again and one last time (clamping and manual resize may have affected either) @@ -7155,17 +7327,17 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags) // Affected by window/frame border size. Used by: // - Begin() initial clip rect float top_border_size = (((flags & ImGuiWindowFlags_MenuBar) || !(flags & ImGuiWindowFlags_NoTitleBar)) ? style.FrameBorderSize : window->WindowBorderSize); - window->InnerClipRect.Min.x = ImFloorSigned(0.5f + window->InnerRect.Min.x + ImMax(ImFloor(window->WindowPadding.x * 0.5f), window->WindowBorderSize)); - window->InnerClipRect.Min.y = ImFloorSigned(0.5f + window->InnerRect.Min.y + top_border_size); - window->InnerClipRect.Max.x = ImFloorSigned(0.5f + window->InnerRect.Max.x - ImMax(ImFloor(window->WindowPadding.x * 0.5f), window->WindowBorderSize)); - window->InnerClipRect.Max.y = ImFloorSigned(0.5f + window->InnerRect.Max.y - window->WindowBorderSize); + window->InnerClipRect.Min.x = ImFloor(0.5f + window->InnerRect.Min.x + ImMax(ImTrunc(window->WindowPadding.x * 0.5f), window->WindowBorderSize)); + window->InnerClipRect.Min.y = ImFloor(0.5f + window->InnerRect.Min.y + top_border_size); + window->InnerClipRect.Max.x = ImFloor(0.5f + window->InnerRect.Max.x - ImMax(ImTrunc(window->WindowPadding.x * 0.5f), window->WindowBorderSize)); + window->InnerClipRect.Max.y = ImFloor(0.5f + window->InnerRect.Max.y - window->WindowBorderSize); window->InnerClipRect.ClipWithFull(host_rect); // Default item width. Make it proportional to window size if window manually resizes if (window->Size.x > 0.0f && !(flags & ImGuiWindowFlags_Tooltip) && !(flags & ImGuiWindowFlags_AlwaysAutoResize)) - window->ItemWidthDefault = ImFloor(window->Size.x * 0.65f); + window->ItemWidthDefault = ImTrunc(window->Size.x * 0.65f); else - window->ItemWidthDefault = ImFloor(g.FontSize * 16.0f); + window->ItemWidthDefault = ImTrunc(g.FontSize * 16.0f); // SCROLLING @@ -7227,8 +7399,8 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags) const bool allow_scrollbar_y = !(flags & ImGuiWindowFlags_NoScrollbar); const float work_rect_size_x = (window->ContentSizeExplicit.x != 0.0f ? window->ContentSizeExplicit.x : ImMax(allow_scrollbar_x ? window->ContentSize.x : 0.0f, window->Size.x - window->WindowPadding.x * 2.0f - (window->DecoOuterSizeX1 + window->DecoOuterSizeX2))); const float work_rect_size_y = (window->ContentSizeExplicit.y != 0.0f ? window->ContentSizeExplicit.y : ImMax(allow_scrollbar_y ? window->ContentSize.y : 0.0f, window->Size.y - window->WindowPadding.y * 2.0f - (window->DecoOuterSizeY1 + window->DecoOuterSizeY2))); - window->WorkRect.Min.x = ImFloor(window->InnerRect.Min.x - window->Scroll.x + ImMax(window->WindowPadding.x, window->WindowBorderSize)); - window->WorkRect.Min.y = ImFloor(window->InnerRect.Min.y - window->Scroll.y + ImMax(window->WindowPadding.y, window->WindowBorderSize)); + window->WorkRect.Min.x = ImTrunc(window->InnerRect.Min.x - window->Scroll.x + ImMax(window->WindowPadding.x, window->WindowBorderSize)); + window->WorkRect.Min.y = ImTrunc(window->InnerRect.Min.y - window->Scroll.y + ImMax(window->WindowPadding.y, window->WindowBorderSize)); window->WorkRect.Max.x = window->WorkRect.Min.x + work_rect_size_x; window->WorkRect.Max.y = window->WorkRect.Min.y + work_rect_size_y; window->ParentWorkRect = window->WorkRect; @@ -7284,6 +7456,8 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags) window->DC.TextWrapPos = -1.0f; // disabled window->DC.ItemWidthStack.resize(0); window->DC.TextWrapPosStack.resize(0); + if (flags & ImGuiWindowFlags_Modal) + window->DC.ModalDimBgColor = ColorConvertFloat4ToU32(GetStyleColorVec4(ImGuiCol_ModalWindowDimBg)); if (window->AutoFitFramesX > 0) window->AutoFitFramesX--; @@ -7387,18 +7561,20 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags) window->HiddenFramesCanSkipItems = 1; } - if (flags & ImGuiWindowFlags_ChildWindow) + if ((flags & ImGuiWindowFlags_ChildWindow) && !(flags & ImGuiWindowFlags_ChildMenu)) { // Child window can be out of sight and have "negative" clip windows. // Mark them as collapsed so commands are skipped earlier (we can't manually collapse them because they have no title bar). - IM_ASSERT((flags& ImGuiWindowFlags_NoTitleBar) != 0 || (window->DockIsActive)); - if (!(flags & ImGuiWindowFlags_AlwaysAutoResize) && window->AutoFitFramesX <= 0 && window->AutoFitFramesY <= 0) // FIXME: Doesn't make sense for ChildWindow?? - { - const bool nav_request = (flags & ImGuiWindowFlags_NavFlattened) && (g.NavAnyRequest && g.NavWindow && g.NavWindow->RootWindowForNav == window->RootWindowForNav); - if (!g.LogEnabled && !nav_request) - if (window->OuterRectClipped.Min.x >= window->OuterRectClipped.Max.x || window->OuterRectClipped.Min.y >= window->OuterRectClipped.Max.y) + IM_ASSERT((flags& ImGuiWindowFlags_NoTitleBar) != 0 || window->DockIsActive); + const bool nav_request = (flags & ImGuiWindowFlags_NavFlattened) && (g.NavAnyRequest && g.NavWindow && g.NavWindow->RootWindowForNav == window->RootWindowForNav); + if (!g.LogEnabled && !nav_request) + if (window->OuterRectClipped.Min.x >= window->OuterRectClipped.Max.x || window->OuterRectClipped.Min.y >= window->OuterRectClipped.Max.y) + { + if (window->AutoFitFramesX > 0 || window->AutoFitFramesY > 0) + window->HiddenFramesCannotSkipItems = 1; + else window->HiddenFramesCanSkipItems = 1; - } + } // Hide along with parent or if parent is collapsed if (parent_window && (parent_window->Collapsed || parent_window->HiddenFramesCanSkipItems > 0)) @@ -7442,12 +7618,15 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags) // [DEBUG] io.ConfigDebugBeginReturnValue override return value to test Begin/End and BeginChild/EndChild behaviors. // (The implicit fallback window is NOT automatically ended allowing it to always be able to receive commands without crashing) - if (!window->IsFallbackWindow && ((g.IO.ConfigDebugBeginReturnValueOnce && window_just_created) || (g.IO.ConfigDebugBeginReturnValueLoop && g.DebugBeginReturnValueCullDepth == g.CurrentWindowStack.Size))) - { - if (window->AutoFitFramesX > 0) { window->AutoFitFramesX++; } - if (window->AutoFitFramesY > 0) { window->AutoFitFramesY++; } - return false; - } +#ifndef IMGUI_DISABLE_DEBUG_TOOLS + if (!window->IsFallbackWindow) + if ((g.IO.ConfigDebugBeginReturnValueOnce && window_just_created) || (g.IO.ConfigDebugBeginReturnValueLoop && g.DebugBeginReturnValueCullDepth == g.CurrentWindowStack.Size)) + { + if (window->AutoFitFramesX > 0) { window->AutoFitFramesX++; } + if (window->AutoFitFramesY > 0) { window->AutoFitFramesY++; } + return false; + } +#endif return !window->SkipItems; } @@ -7491,7 +7670,7 @@ void ImGui::End() // Pop from window stack g.LastItemData = g.CurrentWindowStack.back().ParentLastItemDataBackup; if (window->Flags & ImGuiWindowFlags_ChildMenu) - g.BeginMenuCount--; + g.BeginMenuDepth--; if (window->Flags & ImGuiWindowFlags_Popup) g.BeginPopupStack.pop_back(); g.CurrentWindowStack.back().StackSizesOnBegin.CompareWithContextState(&g); @@ -7606,7 +7785,7 @@ void ImGui::FocusWindow(ImGuiWindow* window, ImGuiFocusRequestFlags flags) g.NavMousePosDirty = true; g.NavId = window ? window->NavLastIds[0] : 0; // Restore NavId g.NavLayer = ImGuiNavLayer_Main; - g.NavFocusScopeId = window ? window->NavRootFocusScopeId : 0; + SetNavFocusScope(window ? window->NavRootFocusScopeId : 0); g.NavIdIsAlive = false; g.NavLastValidSelectionUserData = ImGuiSelectionUserData_Invalid; @@ -7664,7 +7843,6 @@ void ImGui::FocusTopMostWindowUnderOne(ImGuiWindow* under_this_window, ImGuiWind { // We may later decide to test for different NoXXXInputs based on the active navigation input (mouse vs nav) but that may feel more confusing to the user. ImGuiWindow* window = g.WindowsFocusOrder[i]; - IM_ASSERT(window == window->RootWindow); if (window == ignore_window || !window->WasActive) continue; if (filter_viewport != NULL && window->Viewport != filter_viewport) @@ -7871,6 +8049,10 @@ bool ImGui::IsWindowAbove(ImGuiWindow* potential_above, ImGuiWindow* potential_b return false; } +// 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. bool ImGui::IsWindowHovered(ImGuiHoveredFlags flags) { IM_ASSERT((flags & ~ImGuiHoveredFlags_AllowedMaskForIsWindowHovered) == 0 && "Invalid flags for IsWindowHovered()!"); @@ -7910,7 +8092,7 @@ bool ImGui::IsWindowHovered(ImGuiHoveredFlags flags) // for different windows of the hierarchy. Possibly need a Hash(Current+Flags) ==> (Timer) cache. // We can implement this for _Stationary because the data is linked to HoveredWindow rather than CurrentWindow. if (flags & ImGuiHoveredFlags_ForTooltip) - flags |= g.Style.HoverFlagsForTooltipMouse; + flags = ApplyHoverFlagsForTooltip(flags, g.Style.HoverFlagsForTooltipMouse); if ((flags & ImGuiHoveredFlags_Stationary) != 0 && g.HoverWindowUnlockedStationaryId != ref_window->ID) return false; @@ -7991,7 +8173,7 @@ void ImGui::SetWindowPos(ImGuiWindow* window, const ImVec2& pos, ImGuiCond cond) // Set const ImVec2 old_pos = window->Pos; - window->Pos = ImFloor(pos); + window->Pos = ImTrunc(pos); ImVec2 offset = window->Pos - old_pos; if (offset.x == 0.0f && offset.y == 0.0f) return; @@ -8030,18 +8212,22 @@ void ImGui::SetWindowSize(ImGuiWindow* window, const ImVec2& size, ImGuiCond con IM_ASSERT(cond == 0 || ImIsPowerOfTwo(cond)); // Make sure the user doesn't attempt to combine multiple condition flags. window->SetWindowSizeAllowFlags &= ~(ImGuiCond_Once | ImGuiCond_FirstUseEver | ImGuiCond_Appearing); + // Enable auto-fit (not done in BeginChild() path unless appearing or combined with ImGuiChildFlags_AlwaysAutoResize) + if ((window->Flags & ImGuiWindowFlags_ChildWindow) == 0 || window->Appearing || (window->ChildFlags & ImGuiChildFlags_AlwaysAutoResize) != 0) + window->AutoFitFramesX = (size.x <= 0.0f) ? 2 : 0; + if ((window->Flags & ImGuiWindowFlags_ChildWindow) == 0 || window->Appearing || (window->ChildFlags & ImGuiChildFlags_AlwaysAutoResize) != 0) + window->AutoFitFramesY = (size.y <= 0.0f) ? 2 : 0; + // Set ImVec2 old_size = window->SizeFull; - window->AutoFitFramesX = (size.x <= 0.0f) ? 2 : 0; - window->AutoFitFramesY = (size.y <= 0.0f) ? 2 : 0; if (size.x <= 0.0f) window->AutoFitOnlyGrows = false; else - window->SizeFull.x = IM_FLOOR(size.x); + window->SizeFull.x = IM_TRUNC(size.x); if (size.y <= 0.0f) window->AutoFitOnlyGrows = false; else - window->SizeFull.y = IM_FLOOR(size.y); + window->SizeFull.y = IM_TRUNC(size.y); if (old_size.x != window->SizeFull.x || old_size.y != window->SizeFull.y) MarkIniSettingsDirty(window); } @@ -8075,7 +8261,7 @@ void ImGui::SetWindowHitTestHole(ImGuiWindow* window, const ImVec2& pos, const I window->HitTestHoleOffset = ImVec2ih(pos - window->Pos); } -void ImGui::SetWindowHiddendAndSkipItemsForCurrentFrame(ImGuiWindow* window) +void ImGui::SetWindowHiddenAndSkipItemsForCurrentFrame(ImGuiWindow* window) { window->Hidden = window->SkipItems = true; window->HiddenFramesCanSkipItems = 1; @@ -8142,6 +8328,10 @@ void ImGui::SetNextWindowSize(const ImVec2& size, ImGuiCond cond) g.NextWindowData.SizeCond = cond ? cond : ImGuiCond_Always; } +// For each axis: +// - Use 0.0f as min or FLT_MAX as max if you don't want limits, e.g. size_min = (500.0f, 0.0f), size_max = (FLT_MAX, FLT_MAX) sets a minimum width. +// - Use -1 for both min and max of same axis to preserve current size which itself is a constraint. +// - See "Demo->Examples->Constrained-resizing window" for examples. void ImGui::SetNextWindowSizeConstraints(const ImVec2& size_min, const ImVec2& size_max, ImGuiSizeCallback custom_callback, void* custom_callback_user_data) { ImGuiContext& g = *GImGui; @@ -8157,7 +8347,7 @@ void ImGui::SetNextWindowContentSize(const ImVec2& size) { ImGuiContext& g = *GImGui; g.NextWindowData.Flags |= ImGuiNextWindowDataFlags_HasContentSize; - g.NextWindowData.ContentSizeVal = ImFloor(size); + g.NextWindowData.ContentSizeVal = ImTrunc(size); } void ImGui::SetNextWindowScroll(const ImVec2& scroll) @@ -8258,16 +8448,50 @@ void ImGui::SetWindowFontScale(float scale) void ImGui::PushFocusScope(ImGuiID id) { ImGuiContext& g = *GImGui; - g.FocusScopeStack.push_back(id); + ImGuiFocusScopeData data; + data.ID = id; + data.WindowID = g.CurrentWindow->ID; + g.FocusScopeStack.push_back(data); g.CurrentFocusScopeId = id; } void ImGui::PopFocusScope() { ImGuiContext& g = *GImGui; - IM_ASSERT(g.FocusScopeStack.Size > 0); // Too many PopFocusScope() ? + if (g.FocusScopeStack.Size == 0) + { + IM_ASSERT_USER_ERROR(g.FocusScopeStack.Size > 0, "Calling PopFocusScope() too many times!"); + return; + } g.FocusScopeStack.pop_back(); - g.CurrentFocusScopeId = g.FocusScopeStack.Size ? g.FocusScopeStack.back() : 0; + g.CurrentFocusScopeId = g.FocusScopeStack.Size ? g.FocusScopeStack.back().ID : 0; +} + +void ImGui::SetNavFocusScope(ImGuiID focus_scope_id) +{ + ImGuiContext& g = *GImGui; + g.NavFocusScopeId = focus_scope_id; + g.NavFocusRoute.resize(0); // Invalidate + if (focus_scope_id == 0) + return; + IM_ASSERT(g.NavWindow != NULL); + + // Store current path (in reverse order) + if (focus_scope_id == g.CurrentFocusScopeId) + { + // Top of focus stack contains local focus scopes inside current window + for (int n = g.FocusScopeStack.Size - 1; n >= 0 && g.FocusScopeStack.Data[n].WindowID == g.CurrentWindow->ID; n--) + g.NavFocusRoute.push_back(g.FocusScopeStack.Data[n]); + } + else if (focus_scope_id == g.NavWindow->NavRootFocusScopeId) + g.NavFocusRoute.push_back({ focus_scope_id, g.NavWindow->ID }); + else + return; + + // Then follow on manually set ParentWindowForFocusRoute field (#6798) + for (ImGuiWindow* window = g.NavWindow->ParentWindowForFocusRoute; window != NULL; window = window->ParentWindowForFocusRoute) + g.NavFocusRoute.push_back({ window->NavRootFocusScopeId, window->ID }); + IM_ASSERT(g.NavFocusRoute.Size < 100); // Maximum depth is technically 251 as per CalcRoutingScore(): 254 - 3 } // Focus = move navigation cursor, set scrolling, set focus window. @@ -8404,7 +8628,7 @@ void ImGui::PushOverrideID(ImGuiID id) } // Helper to avoid a common series of PushOverrideID -> GetID() -> PopID() call -// (note that when using this pattern, TestEngine's "Stack Tool" will tend to not display the intermediate stack level. +// (note that when using this pattern, ID Stack Tool will tend to not display the intermediate stack level. // for that to work we would need to do PushOverrideID() -> ItemAdd() -> PopID() which would alter widget code a little more) ImGuiID ImGui::GetIDWithSeed(const char* str, const char* str_end, ImGuiID seed) { @@ -8526,6 +8750,26 @@ bool ImGui::IsRectVisible(const ImVec2& rect_min, const ImVec2& rect_max) // - Shortcut() [Internal] //----------------------------------------------------------------------------- +ImGuiKeyChord ImGui::FixupKeyChord(ImGuiContext* ctx, ImGuiKeyChord key_chord) +{ + // Convert ImGuiMod_Shortcut and add ImGuiMod_XXXX when a corresponding ImGuiKey_LeftXXX/ImGuiKey_RightXXX is specified. + ImGuiKey key = (ImGuiKey)(key_chord & ~ImGuiMod_Mask_); + if (IsModKey(key)) + { + if (key == ImGuiKey_LeftCtrl || key == ImGuiKey_RightCtrl) + key_chord |= ImGuiMod_Ctrl; + if (key == ImGuiKey_LeftShift || key == ImGuiKey_RightShift) + key_chord |= ImGuiMod_Shift; + if (key == ImGuiKey_LeftAlt || key == ImGuiKey_RightAlt) + key_chord |= ImGuiMod_Alt; + if (key == ImGuiKey_LeftSuper || key == ImGuiKey_RightSuper) + key_chord |= ImGuiMod_Super; + } + if (key_chord & ImGuiMod_Shortcut) + return (key_chord & ~ImGuiMod_Shortcut) | (ctx->IO.ConfigMacOSXBehaviors ? ImGuiMod_Super : ImGuiMod_Ctrl); + return key_chord; +} + ImGuiKeyData* ImGui::GetKeyData(ImGuiContext* ctx, ImGuiKey key) { ImGuiContext& g = *ctx; @@ -8563,11 +8807,13 @@ static const char* const GKeyNames[] = "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12", + "F13", "F14", "F15", "F16", "F17", "F18", "F19", "F20", "F21", "F22", "F23", "F24", "Apostrophe", "Comma", "Minus", "Period", "Slash", "Semicolon", "Equal", "LeftBracket", "Backslash", "RightBracket", "GraveAccent", "CapsLock", "ScrollLock", "NumLock", "PrintScreen", "Pause", "Keypad0", "Keypad1", "Keypad2", "Keypad3", "Keypad4", "Keypad5", "Keypad6", "Keypad7", "Keypad8", "Keypad9", "KeypadDecimal", "KeypadDivide", "KeypadMultiply", "KeypadSubtract", "KeypadAdd", "KeypadEnter", "KeypadEqual", + "AppBack", "AppForward", "GamepadStart", "GamepadBack", "GamepadFaceLeft", "GamepadFaceRight", "GamepadFaceUp", "GamepadFaceDown", "GamepadDpadLeft", "GamepadDpadRight", "GamepadDpadUp", "GamepadDpadDown", @@ -8604,17 +8850,17 @@ const char* ImGui::GetKeyName(ImGuiKey key) } // ImGuiMod_Shortcut is translated to either Ctrl or Super. -void ImGui::GetKeyChordName(ImGuiKeyChord key_chord, char* out_buf, int out_buf_size) +const char* ImGui::GetKeyChordName(ImGuiKeyChord key_chord) { ImGuiContext& g = *GImGui; - if (key_chord & ImGuiMod_Shortcut) - key_chord = ConvertShortcutMod(key_chord); - ImFormatString(out_buf, (size_t)out_buf_size, "%s%s%s%s%s", + key_chord = FixupKeyChord(&g, key_chord); + ImFormatString(g.TempKeychordName, IM_ARRAYSIZE(g.TempKeychordName), "%s%s%s%s%s", (key_chord & ImGuiMod_Ctrl) ? "Ctrl+" : "", (key_chord & ImGuiMod_Shift) ? "Shift+" : "", (key_chord & ImGuiMod_Alt) ? "Alt+" : "", (key_chord & ImGuiMod_Super) ? (g.IO.ConfigMacOSXBehaviors ? "Cmd+" : "Super+") : "", GetKeyName((ImGuiKey)(key_chord & ~ImGuiMod_Mask_))); + return g.TempKeychordName; } // t0 = previous time (e.g.: g.Time - g.IO.DeltaTime) @@ -8681,6 +8927,7 @@ static void ImGui::UpdateKeyRoutingTable(ImGuiKeyRoutingTable* rt) for (int old_routing_idx = rt->Index[key - ImGuiKey_NamedKey_BEGIN]; old_routing_idx != -1; old_routing_idx = routing_entry->NextEntryIndex) { routing_entry = &rt->Entries[old_routing_idx]; + routing_entry->RoutingCurrScore = routing_entry->RoutingNextScore; routing_entry->RoutingCurr = routing_entry->RoutingNext; // Update entry routing_entry->RoutingNext = ImGuiKeyOwner_None; routing_entry->RoutingNextScore = 255; @@ -8689,11 +8936,15 @@ static void ImGui::UpdateKeyRoutingTable(ImGuiKeyRoutingTable* rt) rt->EntriesNext.push_back(*routing_entry); // Write alive ones into new buffer // Apply routing to owner if there's no owner already (RoutingCurr == None at this point) + // This is the result of previous frame's SetShortcutRouting() call. if (routing_entry->Mods == g.IO.KeyMods) { ImGuiKeyOwnerData* owner_data = GetKeyOwnerData(&g, key); if (owner_data->OwnerCurr == ImGuiKeyOwner_None) + { owner_data->OwnerCurr = routing_entry->RoutingCurr; + //IMGUI_DEBUG_LOG("SetKeyOwner(%s, owner_id=0x%08X) via Routing\n", GetKeyName(key), routing_entry->RoutingCurr); + } } } @@ -8723,13 +8974,11 @@ ImGuiKeyRoutingData* ImGui::GetShortcutRoutingData(ImGuiKeyChord key_chord) ImGuiContext& g = *GImGui; ImGuiKeyRoutingTable* rt = &g.KeysRoutingTable; ImGuiKeyRoutingData* routing_data; - if (key_chord & ImGuiMod_Shortcut) - key_chord = ConvertShortcutMod(key_chord); ImGuiKey key = (ImGuiKey)(key_chord & ~ImGuiMod_Mask_); ImGuiKey mods = (ImGuiKey)(key_chord & ImGuiMod_Mask_); if (key == ImGuiKey_None) key = ConvertSingleModFlagToKey(&g, mods); - IM_ASSERT(IsNamedKey(key)); + IM_ASSERT(IsNamedKey(key) && (key_chord & ImGuiMod_Shortcut) == 0); // Please call ConvertShortcutMod() in calling function. // Get (in the majority of case, the linked list will have one element so this should be 2 reads. // Subsequent elements will be contiguous in memory as list is sorted/rebuilt in NewFrame). @@ -8758,12 +9007,11 @@ ImGuiKeyRoutingData* ImGui::GetShortcutRoutingData(ImGuiKeyChord key_chord) // - 254: ImGuiInputFlags_RouteGlobalLow // - 255: never route // 'flags' should include an explicit routing policy -static int CalcRoutingScore(ImGuiWindow* location, ImGuiID owner_id, ImGuiInputFlags flags) +static int CalcRoutingScore(ImGuiID focus_scope_id, ImGuiID owner_id, ImGuiInputFlags flags) { if (flags & ImGuiInputFlags_RouteFocused) { ImGuiContext& g = *GImGui; - ImGuiWindow* focused = g.NavWindow; // ActiveID gets top priority // (we don't check g.ActiveIdUsingAllKeys here. Routing is applied but if input ownership is tested later it may discard it) @@ -8776,16 +9024,13 @@ static int CalcRoutingScore(ImGuiWindow* location, ImGuiID owner_id, ImGuiInputF // - When Window/ChildB is focused -> Window scores 4, Window/ChildB scores 3 (best) // Assuming only WindowA is submitting a routing request, // - When Window/ChildB is focused -> Window scores 4 (best), Window/ChildB doesn't have a score. - if (focused != NULL && focused->RootWindow == location->RootWindow) - for (int next_score = 3; focused != NULL; next_score++) - { - if (focused == location) - { - IM_ASSERT(next_score < 255); - return next_score; - } - focused = (focused->RootWindow != focused) ? focused->ParentWindow : NULL; // FIXME: This could be later abstracted as a focus path - } + // This essentially follow the window->ParentWindowForFocusRoute chain. + if (focus_scope_id == 0) + return 255; + for (int index_in_focus_path = 0; index_in_focus_path < g.NavFocusRoute.Size; index_in_focus_path++) + if (g.NavFocusRoute.Data[index_in_focus_path].ID == focus_scope_id) + return 3 + index_in_focus_path; + return 255; } @@ -8797,13 +9042,29 @@ static int CalcRoutingScore(ImGuiWindow* location, ImGuiID owner_id, ImGuiInputF return 0; } +// We need this to filter some Shortcut() routes when an item e.g. an InputText() is active +// e.g. ImGuiKey_G won't be considered a shortcut when item is active, but ImGuiMod|ImGuiKey_G can be. +static bool IsKeyChordPotentiallyCharInput(ImGuiKeyChord key_chord) +{ + // Mimic 'ignore_char_inputs' logic in InputText() + ImGuiContext& g = *GImGui; + + // When the right mods are pressed it cannot be a char input so we won't filter the shortcut out. + ImGuiKey mods = (ImGuiKey)(key_chord & ImGuiMod_Mask_); + const bool ignore_char_inputs = ((mods & ImGuiMod_Ctrl) && !(mods & ImGuiMod_Alt)) || (g.IO.ConfigMacOSXBehaviors && (mods & ImGuiMod_Super)); + if (ignore_char_inputs) + return false; + + // Return true for A-Z, 0-9 and other keys associated to char inputs. Other keys such as F1-F12 won't be filtered. + ImGuiKey key = (ImGuiKey)(key_chord & ~ImGuiMod_Mask_); + return g.KeysMayBeCharInput.TestBit(key); +} + // Request a desired route for an input chord (key + mods). // Return true if the route is available this frame. // - Routes and key ownership are attributed at the beginning of next frame based on best score and mod state. // (Conceptually this does a "Submit for next frame" + "Test for current frame". // As such, it could be called TrySetXXX or SubmitXXX, or the Submit and Test operations should be separate.) -// - Using 'owner_id == ImGuiKeyOwner_Any/0': auto-assign an owner based on current focus scope (each window has its focus scope by default) -// - Using 'owner_id == ImGuiKeyOwner_None': allows disabling/locking a shortcut. bool ImGui::SetShortcutRouting(ImGuiKeyChord key_chord, ImGuiID owner_id, ImGuiInputFlags flags) { ImGuiContext& g = *GImGui; @@ -8811,37 +9072,80 @@ bool ImGui::SetShortcutRouting(ImGuiKeyChord key_chord, ImGuiID owner_id, ImGuiI flags |= ImGuiInputFlags_RouteGlobalHigh; // IMPORTANT: This is the default for SetShortcutRouting() but NOT Shortcut() else IM_ASSERT(ImIsPowerOfTwo(flags & ImGuiInputFlags_RouteMask_)); // Check that only 1 routing flag is used + IM_ASSERT(owner_id != ImGuiKeyOwner_Any && owner_id != ImGuiKeyOwner_None); + + // Convert ImGuiMod_Shortcut and add ImGuiMod_XXXX when a corresponding ImGuiKey_LeftXXX/ImGuiKey_RightXXX is specified. + key_chord = FixupKeyChord(&g, key_chord); + + // [DEBUG] Debug break requested by user + if (g.DebugBreakInShortcutRouting == key_chord) + IM_DEBUG_BREAK(); if (flags & ImGuiInputFlags_RouteUnlessBgFocused) if (g.NavWindow == NULL) return false; + + // Note how ImGuiInputFlags_RouteAlways won't set routing and thus won't set owner. May want to rework this? if (flags & ImGuiInputFlags_RouteAlways) + { + IMGUI_DEBUG_LOG_INPUTROUTING("SetShortcutRouting(%s, owner_id=0x%08X, flags=%04X) -> always\n", GetKeyChordName(key_chord), owner_id, flags); return true; + } + + // Specific culling when there's an active. + if (g.ActiveId != 0 && g.ActiveId != owner_id) + { + // Cull shortcuts with no modifiers when it could generate a character. + // e.g. Shortcut(ImGuiKey_G) also generates 'g' character, should not trigger when InputText() is active. + // but Shortcut(Ctrl+G) should generally trigger when InputText() is active. + // TL;DR: lettered shortcut with no mods or with only Alt mod will not trigger while an item reading text input is active. + // (We cannot filter based on io.InputQueueCharacters[] contents because of trickling and key<>chars submission order are undefined) + if ((flags & ImGuiInputFlags_RouteFocused) && g.IO.WantTextInput && IsKeyChordPotentiallyCharInput(key_chord)) + { + IMGUI_DEBUG_LOG_INPUTROUTING("SetShortcutRouting(%s, owner_id=0x%08X, flags=%04X) -> filtered as potential char input\n", GetKeyChordName(key_chord), owner_id, flags); + return false; + } + + // ActiveIdUsingAllKeyboardKeys trumps all for ActiveId + if ((flags & ImGuiInputFlags_RouteGlobalHigh) == 0 && g.ActiveIdUsingAllKeyboardKeys) + { + ImGuiKey key = (ImGuiKey)(key_chord & ~ImGuiMod_Mask_); + if (key == ImGuiKey_None) + key = ConvertSingleModFlagToKey(&g, (ImGuiKey)(key_chord & ImGuiMod_Mask_)); + if (key >= ImGuiKey_Keyboard_BEGIN && key < ImGuiKey_Keyboard_END) + return false; + } + } - const int score = CalcRoutingScore(g.CurrentWindow, owner_id, flags); + // FIXME-SHORTCUT: A way to configure the location/focus-scope to test would render this more flexible. + const int score = CalcRoutingScore(g.CurrentFocusScopeId, owner_id, flags); + IMGUI_DEBUG_LOG_INPUTROUTING("SetShortcutRouting(%s, owner_id=0x%08X, flags=%04X) -> score %d\n", GetKeyChordName(key_chord), owner_id, flags, score); if (score == 255) return false; // Submit routing for NEXT frame (assuming score is sufficient) // FIXME: Could expose a way to use a "serve last" policy for same score resolution (using <= instead of <). ImGuiKeyRoutingData* routing_data = GetShortcutRoutingData(key_chord); - const ImGuiID routing_id = GetRoutingIdFromOwnerId(owner_id); //const bool set_route = (flags & ImGuiInputFlags_ServeLast) ? (score <= routing_data->RoutingNextScore) : (score < routing_data->RoutingNextScore); if (score < routing_data->RoutingNextScore) { - routing_data->RoutingNext = routing_id; + routing_data->RoutingNext = owner_id; routing_data->RoutingNextScore = (ImU8)score; } // Return routing state for CURRENT frame - return routing_data->RoutingCurr == routing_id; + if (routing_data->RoutingCurr == owner_id) + IMGUI_DEBUG_LOG_INPUTROUTING("--> granting current route\n"); + return routing_data->RoutingCurr == owner_id; } // Currently unused by core (but used by tests) // Note: this cannot be turned into GetShortcutRouting() because we do the owner_id->routing_id translation, name would be more misleading. bool ImGui::TestShortcutRouting(ImGuiKeyChord key_chord, ImGuiID owner_id) { + ImGuiContext& g = *GImGui; const ImGuiID routing_id = GetRoutingIdFromOwnerId(owner_id); + key_chord = FixupKeyChord(&g, key_chord); ImGuiKeyRoutingData* routing_data = GetShortcutRoutingData(key_chord); // FIXME: Could avoid creating entry. return routing_data->RoutingCurr == routing_id; } @@ -8878,13 +9182,28 @@ bool ImGui::IsKeyPressed(ImGuiKey key, ImGuiID owner_id, ImGuiInputFlags flags) if (t < 0.0f) return false; IM_ASSERT((flags & ~ImGuiInputFlags_SupportedByIsKeyPressed) == 0); // Passing flags not supported by this function! + if (flags & (ImGuiInputFlags_RepeatRateMask_ | ImGuiInputFlags_RepeatUntilMask_)) // Setting any _RepeatXXX option enables _Repeat + flags |= ImGuiInputFlags_Repeat; bool pressed = (t == 0.0f); - if (!pressed && ((flags & ImGuiInputFlags_Repeat) != 0)) + if (!pressed && (flags & ImGuiInputFlags_Repeat) != 0) { float repeat_delay, repeat_rate; GetTypematicRepeatRate(flags, &repeat_delay, &repeat_rate); pressed = (t > repeat_delay) && GetKeyPressedAmount(key, repeat_delay, repeat_rate) > 0; + if (pressed && (flags & ImGuiInputFlags_RepeatUntilMask_)) + { + // Slightly bias 'key_pressed_time' as DownDuration is an accumulation of DeltaTime which we compare to an absolute time value. + // Ideally we'd replace DownDuration with KeyPressedTime but it would break user's code. + ImGuiContext& g = *GImGui; + double key_pressed_time = g.Time - t + 0.00001f; + if ((flags & ImGuiInputFlags_RepeatUntilKeyModsChange) && (g.LastKeyModsChangeTime > key_pressed_time)) + pressed = false; + if ((flags & ImGuiInputFlags_RepeatUntilKeyModsChangeFromNone) && (g.LastKeyModsChangeFromNoneTime > key_pressed_time)) + pressed = false; + if ((flags & ImGuiInputFlags_RepeatUntilOtherKeyPress) && (g.LastKeyboardKeyPressTime > key_pressed_time)) + pressed = false; + } } if (!pressed) return false; @@ -8936,7 +9255,7 @@ bool ImGui::IsMouseClicked(ImGuiMouseButton button, ImGuiID owner_id, ImGuiInput const float t = g.IO.MouseDownDuration[button]; if (t < 0.0f) return false; - IM_ASSERT((flags & ~ImGuiInputFlags_SupportedByIsKeyPressed) == 0); // Passing flags not supported by this function! + IM_ASSERT((flags & ~ImGuiInputFlags_SupportedByIsMouseClicked) == 0); // Passing flags not supported by this function! // FIXME: Could support RepeatRate and RepeatUntil flags here. const bool repeat = (flags & ImGuiInputFlags_Repeat) != 0; const bool pressed = (t == 0.0f) || (repeat && t > g.IO.KeyRepeatDelay && CalcTypematicRepeatAmount(t - g.IO.DeltaTime, t, g.IO.KeyRepeatDelay, g.IO.KeyRepeatRate) > 0); @@ -8970,6 +9289,13 @@ bool ImGui::IsMouseDoubleClicked(ImGuiMouseButton button) return g.IO.MouseClickedCount[button] == 2 && TestKeyOwner(MouseButtonToKey(button), ImGuiKeyOwner_Any); } +bool ImGui::IsMouseDoubleClicked(ImGuiMouseButton button, ImGuiID owner_id) +{ + ImGuiContext& g = *GImGui; + IM_ASSERT(button >= 0 && button < IM_ARRAYSIZE(g.IO.MouseDown)); + return g.IO.MouseClickedCount[button] == 2 && TestKeyOwner(MouseButtonToKey(button), owner_id); +} + int ImGui::GetMouseClickedCount(ImGuiMouseButton button) { ImGuiContext& g = *GImGui; @@ -8989,9 +9315,8 @@ bool ImGui::IsMouseHoveringRect(const ImVec2& r_min, const ImVec2& r_max, bool c if (clip) rect_clipped.ClipWith(g.CurrentWindow->ClipRect); - // Expand for touch input - const ImRect rect_for_touch(rect_clipped.Min - g.Style.TouchExtraPadding, rect_clipped.Max + g.Style.TouchExtraPadding); - if (!rect_for_touch.Contains(g.IO.MousePos)) + // Hit testing, expanded for touch input + if (!rect_clipped.ContainsWithPad(g.IO.MousePos, g.Style.TouchExtraPadding)) return false; if (!g.MouseViewport->GetMainRect().Overlaps(rect_clipped)) return false; @@ -9170,7 +9495,9 @@ static void ImGui::UpdateKeyboardInputs() GetKeyData(ImGuiMod_Super)->Down = io.KeySuper; } } +#endif + // Import legacy ImGuiNavInput_ io inputs and convert to gamepad keys #ifndef IMGUI_DISABLE_OBSOLETE_KEYIO const bool nav_gamepad_active = (io.ConfigFlags & ImGuiConfigFlags_NavEnableGamepad) != 0 && (io.BackendFlags & ImGuiBackendFlags_HasGamepad) != 0; if (io.BackendUsingLegacyNavInputArray && nav_gamepad_active) @@ -9193,7 +9520,6 @@ static void ImGui::UpdateKeyboardInputs() MAP_LEGACY_NAV_INPUT_TO_KEY1(ImGuiKey_GamepadLStickDown, ImGuiNavInput_LStickDown); #undef NAV_MAP_KEY } -#endif #endif // Update aliases @@ -9202,15 +9528,20 @@ static void ImGui::UpdateKeyboardInputs() UpdateAliasKey(ImGuiKey_MouseWheelX, io.MouseWheelH != 0.0f, io.MouseWheelH); UpdateAliasKey(ImGuiKey_MouseWheelY, io.MouseWheel != 0.0f, io.MouseWheel); - // Synchronize io.KeyMods and io.KeyXXX values. + // Synchronize io.KeyMods and io.KeyCtrl/io.KeyShift/etc. values. // - New backends (1.87+): send io.AddKeyEvent(ImGuiMod_XXX) -> -> (here) deriving io.KeyMods + io.KeyXXX from key array. // - Legacy backends: set io.KeyXXX bools -> (above) set key array from io.KeyXXX -> (here) deriving io.KeyMods + io.KeyXXX from key array. // So with legacy backends the 4 values will do a unnecessary back-and-forth but it makes the code simpler and future facing. + const ImGuiKeyChord prev_key_mods = io.KeyMods; io.KeyMods = GetMergedModsFromKeys(); io.KeyCtrl = (io.KeyMods & ImGuiMod_Ctrl) != 0; io.KeyShift = (io.KeyMods & ImGuiMod_Shift) != 0; io.KeyAlt = (io.KeyMods & ImGuiMod_Alt) != 0; io.KeySuper = (io.KeyMods & ImGuiMod_Super) != 0; + if (prev_key_mods != io.KeyMods) + g.LastKeyModsChangeTime = g.Time; + if (prev_key_mods != io.KeyMods && prev_key_mods == 0) + g.LastKeyModsChangeFromNoneTime = g.Time; // Clear gamepad data if disabled if ((io.BackendFlags & ImGuiBackendFlags_HasGamepad) == 0) @@ -9226,6 +9557,14 @@ static void ImGui::UpdateKeyboardInputs() ImGuiKeyData* key_data = &io.KeysData[i]; key_data->DownDurationPrev = key_data->DownDuration; key_data->DownDuration = key_data->Down ? (key_data->DownDuration < 0.0f ? 0.0f : key_data->DownDuration + io.DeltaTime) : -1.0f; + if (key_data->DownDuration == 0.0f) + { + ImGuiKey key = (ImGuiKey)(ImGuiKey_KeysData_OFFSET + i); + if (IsKeyboardKey(key)) + g.LastKeyboardKeyPressTime = g.Time; + else if (key == ImGuiKey_ReservedForModCtrl || key == ImGuiKey_ReservedForModShift || key == ImGuiKey_ReservedForModAlt || key == ImGuiKey_ReservedForModSuper) + g.LastKeyboardKeyPressTime = g.Time; + } } // Update keys/input owner (named keys only): one entry per key @@ -9239,6 +9578,7 @@ static void ImGui::UpdateKeyboardInputs() owner_data->LockThisFrame = owner_data->LockUntilRelease = owner_data->LockUntilRelease && key_data->Down; // Clear LockUntilRelease when key is not Down anymore } + // Update key routing (for e.g. shortcuts) UpdateKeyRoutingTable(&g.KeysRoutingTable); } @@ -9256,7 +9596,7 @@ static void ImGui::UpdateMouseInputs() // Round mouse position to avoid spreading non-rounded position (e.g. UpdateManualResize doesn't support them well) if (IsMousePosValid(&io.MousePos)) - io.MousePos = g.MouseLastValidPos = ImFloorSigned(io.MousePos); + io.MousePos = g.MouseLastValidPos = ImFloor(io.MousePos); // If mouse just appeared or disappeared (usually denoted by -FLT_MAX components) we cancel out movement in MouseDelta if (IsMousePosValid(&io.MousePos) && IsMousePosValid(&io.MousePosPrev)) @@ -9275,7 +9615,6 @@ static void ImGui::UpdateMouseInputs() if (io.MouseDelta.x != 0.0f || io.MouseDelta.y != 0.0f) g.NavDisableMouseHover = false; - io.MousePosPrev = io.MousePos; for (int i = 0; i < IM_ARRAYSIZE(io.MouseDown); i++) { io.MouseClicked[i] = io.MouseDown[i] && io.MouseDownDuration[i] < 0.0f; @@ -9415,8 +9754,8 @@ void ImGui::UpdateMouseWheel() { const ImVec2 offset = window->Size * (1.0f - scale) * (g.IO.MousePos - window->Pos) / window->Size; SetWindowPos(window, window->Pos + offset, 0); - window->Size = ImFloor(window->Size * scale); - window->SizeFull = ImFloor(window->SizeFull * scale); + window->Size = ImTrunc(window->Size * scale); + window->SizeFull = ImTrunc(window->SizeFull * scale); } return; } @@ -9452,15 +9791,17 @@ void ImGui::UpdateMouseWheel() { LockWheelingWindow(window, wheel.x); float max_step = window->InnerRect.GetWidth() * 0.67f; - float scroll_step = ImFloor(ImMin(2 * window->CalcFontSize(), max_step)); + float scroll_step = ImTrunc(ImMin(2 * window->CalcFontSize(), max_step)); SetScrollX(window, window->Scroll.x - wheel.x * scroll_step); + g.WheelingWindowScrolledFrame = g.FrameCount; } if (do_scroll[ImGuiAxis_Y]) { LockWheelingWindow(window, wheel.y); float max_step = window->InnerRect.GetHeight() * 0.67f; - float scroll_step = ImFloor(ImMin(5 * window->CalcFontSize(), max_step)); + float scroll_step = ImTrunc(ImMin(5 * window->CalcFontSize(), max_step)); SetScrollY(window, window->Scroll.y - wheel.y * scroll_step); + g.WheelingWindowScrolledFrame = g.FrameCount; } } } @@ -9689,10 +10030,11 @@ bool ImGui::TestKeyOwner(ImGuiKey key, ImGuiID owner_id) // - SetKeyOwner(..., Any or None, Lock) : set lock void ImGui::SetKeyOwner(ImGuiKey key, ImGuiID owner_id, ImGuiInputFlags flags) { + ImGuiContext& g = *GImGui; IM_ASSERT(IsNamedKeyOrModKey(key) && (owner_id != ImGuiKeyOwner_Any || (flags & (ImGuiInputFlags_LockThisFrame | ImGuiInputFlags_LockUntilRelease)))); // Can only use _Any with _LockXXX flags (to eat a key away without an ID to retrieve it) IM_ASSERT((flags & ~ImGuiInputFlags_SupportedBySetKeyOwner) == 0); // Passing flags not supported by this function! + //IMGUI_DEBUG_LOG("SetKeyOwner(%s, owner_id=0x%08X, flags=%08X)\n", GetKeyName(key), owner_id, flags); - ImGuiContext& g = *GImGui; ImGuiKeyOwnerData* owner_data = GetKeyOwnerData(&g, key); owner_data->OwnerCurr = owner_data->OwnerNext = owner_id; @@ -9734,18 +10076,17 @@ void ImGui::SetItemKeyOwner(ImGuiKey key, ImGuiInputFlags flags) } } -bool ImGui::Shortcut(ImGuiKeyChord key_chord, ImGuiID owner_id, ImGuiInputFlags flags) +// This is the only public API until we expose owner_id versions of the API as replacements. +bool ImGui::IsKeyChordPressed(ImGuiKeyChord key_chord) { - ImGuiContext& g = *GImGui; - - // When using (owner_id == 0/Any): SetShortcutRouting() will use CurrentFocusScopeId and filter with this, so IsKeyPressed() is fine with he 0/Any. - if ((flags & ImGuiInputFlags_RouteMask_) == 0) - flags |= ImGuiInputFlags_RouteFocused; - if (!SetShortcutRouting(key_chord, owner_id, flags)) - return false; + return IsKeyChordPressed(key_chord, 0, ImGuiInputFlags_None); +} - if (key_chord & ImGuiMod_Shortcut) - key_chord = ConvertShortcutMod(key_chord); +// This is equivalent to comparing KeyMods + doing a IsKeyPressed() +bool ImGui::IsKeyChordPressed(ImGuiKeyChord key_chord, ImGuiID owner_id, ImGuiInputFlags flags) +{ + ImGuiContext& g = *GImGui; + key_chord = FixupKeyChord(&g, key_chord); ImGuiKey mods = (ImGuiKey)(key_chord & ImGuiMod_Mask_); if (g.IO.KeyMods != mods) return false; @@ -9754,11 +10095,44 @@ bool ImGui::Shortcut(ImGuiKeyChord key_chord, ImGuiID owner_id, ImGuiInputFlags ImGuiKey key = (ImGuiKey)(key_chord & ~ImGuiMod_Mask_); if (key == ImGuiKey_None) key = ConvertSingleModFlagToKey(&g, mods); + if (!IsKeyPressed(key, owner_id, (flags & ImGuiInputFlags_RepeatMask_))) + return false; + return true; +} + +void ImGui::SetNextItemShortcut(ImGuiKeyChord key_chord) +{ + ImGuiContext& g = *GImGui; + g.NextItemData.Flags |= ImGuiNextItemDataFlags_HasShortcut; + g.NextItemData.Shortcut = key_chord; +} + +bool ImGui::Shortcut(ImGuiKeyChord key_chord, ImGuiID owner_id, ImGuiInputFlags flags) +{ + //ImGuiContext& g = *GImGui; + //IMGUI_DEBUG_LOG("Shortcut(%s, owner_id=0x%08X, flags=%X)\n", GetKeyChordName(key_chord, g.TempBuffer.Data, g.TempBuffer.Size), owner_id, flags); + + // When using (owner_id == 0/Any): SetShortcutRouting() will use CurrentFocusScopeId and filter with this, so IsKeyPressed() is fine with he 0/Any. + if ((flags & ImGuiInputFlags_RouteMask_) == 0) + flags |= ImGuiInputFlags_RouteFocused; + + // Using 'owner_id == ImGuiKeyOwner_Any/0': auto-assign an owner based on current focus scope (each window has its focus scope by default) + // Effectively makes Shortcut() always input-owner aware. + if (owner_id == ImGuiKeyOwner_Any || owner_id == ImGuiKeyOwner_None) + owner_id = GetRoutingIdFromOwnerId(owner_id); - if (!IsKeyPressed(key, owner_id, (flags & (ImGuiInputFlags_Repeat | (ImGuiInputFlags)ImGuiInputFlags_RepeatRateMask_)))) + // Submit route + if (!SetShortcutRouting(key_chord, owner_id, flags)) return false; - IM_ASSERT((flags & ~ImGuiInputFlags_SupportedByShortcut) == 0); // Passing flags not supported by this function! + // Default repeat behavior for Shortcut() + // So e.g. pressing Ctrl+W and releasing Ctrl while holding W will not trigger the W shortcut. + if ((flags & ImGuiInputFlags_Repeat) != 0 && (flags & ImGuiInputFlags_RepeatUntilMask_) == 0) + flags |= ImGuiInputFlags_RepeatUntilKeyModsChange; + + if (!IsKeyChordPressed(key_chord, owner_id, flags)) + return false; + IM_ASSERT((flags & ~ImGuiInputFlags_SupportedByShortcut) == 0); // Passing flags not supported by this function! return true; } @@ -10078,81 +10452,42 @@ void ImGuiStackSizes::CompareWithContextState(ImGuiContext* ctx) IM_ASSERT(SizeOfFocusScopeStack == g.FocusScopeStack.Size && "PushFocusScope/PopFocusScope Mismatch!"); } - //----------------------------------------------------------------------------- -// [SECTION] LAYOUT +// [SECTION] ITEM SUBMISSION //----------------------------------------------------------------------------- -// - ItemSize() +// - KeepAliveID() +// - ItemHandleShortcut() [Internal] // - ItemAdd() -// - SameLine() -// - GetCursorScreenPos() -// - SetCursorScreenPos() -// - GetCursorPos(), GetCursorPosX(), GetCursorPosY() -// - SetCursorPos(), SetCursorPosX(), SetCursorPosY() -// - GetCursorStartPos() -// - Indent() -// - Unindent() -// - SetNextItemWidth() -// - PushItemWidth() -// - PushMultiItemsWidths() -// - PopItemWidth() -// - CalcItemWidth() -// - CalcItemSize() -// - GetTextLineHeight() -// - GetTextLineHeightWithSpacing() -// - GetFrameHeight() -// - GetFrameHeightWithSpacing() -// - GetContentRegionMax() -// - GetContentRegionMaxAbs() [Internal] -// - GetContentRegionAvail(), -// - GetWindowContentRegionMin(), GetWindowContentRegionMax() -// - BeginGroup() -// - EndGroup() -// Also see in imgui_widgets: tab bars, and in imgui_tables: tables, columns. //----------------------------------------------------------------------------- -// Advance cursor given item size for layout. -// Register minimum needed size so it can extend the bounding box used for auto-fit calculation. -// See comments in ItemAdd() about how/why the size provided to ItemSize() vs ItemAdd() may often different. -void ImGui::ItemSize(const ImVec2& size, float text_baseline_y) +// Code not using ItemAdd() may need to call this manually otherwise ActiveId will be cleared. In IMGUI_VERSION_NUM < 18717 this was called by GetID(). +void ImGui::KeepAliveID(ImGuiID id) { ImGuiContext& g = *GImGui; - ImGuiWindow* window = g.CurrentWindow; - if (window->SkipItems) - return; - - // We increase the height in this function to accommodate for baseline offset. - // In theory we should be offsetting the starting position (window->DC.CursorPos), that will be the topic of a larger refactor, - // but since ItemSize() is not yet an API that moves the cursor (to handle e.g. wrapping) enlarging the height has the same effect. - const float offset_to_match_baseline_y = (text_baseline_y >= 0) ? ImMax(0.0f, window->DC.CurrLineTextBaseOffset - text_baseline_y) : 0.0f; - - const float line_y1 = window->DC.IsSameLine ? window->DC.CursorPosPrevLine.y : window->DC.CursorPos.y; - const float line_height = ImMax(window->DC.CurrLineSize.y, /*ImMax(*/window->DC.CursorPos.y - line_y1/*, 0.0f)*/ + size.y + offset_to_match_baseline_y); - - // Always align ourselves on pixel boundaries - //if (g.IO.KeyAlt) window->DrawList->AddRect(window->DC.CursorPos, window->DC.CursorPos + ImVec2(size.x, line_height), IM_COL32(255,0,0,200)); // [DEBUG] - window->DC.CursorPosPrevLine.x = window->DC.CursorPos.x + size.x; - window->DC.CursorPosPrevLine.y = line_y1; - window->DC.CursorPos.x = IM_FLOOR(window->Pos.x + window->DC.Indent.x + window->DC.ColumnsOffset.x); // Next line - window->DC.CursorPos.y = IM_FLOOR(line_y1 + line_height + g.Style.ItemSpacing.y); // Next line - window->DC.CursorMaxPos.x = ImMax(window->DC.CursorMaxPos.x, window->DC.CursorPosPrevLine.x); - window->DC.CursorMaxPos.y = ImMax(window->DC.CursorMaxPos.y, window->DC.CursorPos.y - g.Style.ItemSpacing.y); - //if (g.IO.KeyAlt) window->DrawList->AddCircle(window->DC.CursorMaxPos, 3.0f, IM_COL32(255,0,0,255), 4); // [DEBUG] - - window->DC.PrevLineSize.y = line_height; - window->DC.CurrLineSize.y = 0.0f; - window->DC.PrevLineTextBaseOffset = ImMax(window->DC.CurrLineTextBaseOffset, text_baseline_y); - window->DC.CurrLineTextBaseOffset = 0.0f; - window->DC.IsSameLine = window->DC.IsSetPos = false; + if (g.ActiveId == id) + g.ActiveIdIsAlive = id; + if (g.ActiveIdPreviousFrame == id) + g.ActiveIdPreviousFrameIsAlive = true; +} - // Horizontal layout mode - if (window->DC.LayoutType == ImGuiLayoutType_Horizontal) - SameLine(); +static void ItemHandleShortcut(ImGuiID id) +{ + // FIXME: Generalize Activation queue? + ImGuiContext& g = *GImGui; + if (ImGui::Shortcut(g.NextItemData.Shortcut, id, ImGuiInputFlags_None) && g.NavActivateId == 0) + { + g.NavActivateId = id; // Will effectively disable clipping. + g.NavActivateFlags = ImGuiActivateFlags_PreferInput | ImGuiActivateFlags_FromShortcut; + if (g.ActiveId == 0 || g.ActiveId == id) + g.NavActivateDownId = g.NavActivatePressedId = id; + ImGui::NavHighlightActivated(id); + } } // Declare item bounding box for clipping and interaction. // Note that the size can be different than the one provided to ItemSize(). Typically, widgets that spread over available surface // declare their minimum size requirement to ItemSize() and provide a larger region to ItemAdd() which is used drawing/interaction. +// THIS IS IN THE PERFORMANCE CRITICAL PATH (UNTIL THE CLIPPING TEST AND EARLY-RETURN) bool ImGui::ItemAdd(const ImRect& bb, ImGuiID id, const ImRect* nav_bb_arg, ImGuiItemFlags extra_flags) { ImGuiContext& g = *GImGui; @@ -10167,11 +10502,11 @@ bool ImGui::ItemAdd(const ImRect& bb, ImGuiID id, const ImRect* nav_bb_arg, ImGu g.LastItemData.StatusFlags = ImGuiItemStatusFlags_None; // Note: we don't copy 'g.NextItemData.SelectionUserData' to an hypothetical g.LastItemData.SelectionUserData: since the former is not cleared. - // Directional navigation processing if (id != 0) { KeepAliveID(id); + // Directional navigation processing // Runs prior to clipping early-out // (a) So that NavInitRequest can be honored, for newly opened windows to select a default widget // (b) So that we can scroll up/down past clipped items. This adds a small O(N) cost to regular navigation requests @@ -10183,6 +10518,7 @@ bool ImGui::ItemAdd(const ImRect& bb, ImGuiID id, const ImRect* nav_bb_arg, ImGu // If we crash on a NULL g.NavWindow we need to fix the bug elsewhere. if (!(g.LastItemData.InFlags & ImGuiItemFlags_NoNav)) { + // FIMXE-NAV: investigate changing the window tests into a simple 'if (g.NavFocusScopeId == g.CurrentFocusScopeId)' test. window->DC.NavLayersActiveMaskNext |= (1 << window->DC.NavLayerCurrent); if (g.NavId == id || g.NavAnyRequest) if (g.NavWindow->RootWindowForNav == window->RootWindowForNav) @@ -10190,45 +10526,126 @@ bool ImGui::ItemAdd(const ImRect& bb, ImGuiID id, const ImRect* nav_bb_arg, ImGu NavProcessItem(); } + if (g.NextItemData.Flags & ImGuiNextItemDataFlags_HasShortcut) + ItemHandleShortcut(id); + } + + // Lightweight clear of SetNextItemXXX data. + g.NextItemData.Flags = ImGuiNextItemDataFlags_None; + g.NextItemData.ItemFlags = ImGuiItemFlags_None; + +#ifdef IMGUI_ENABLE_TEST_ENGINE + if (id != 0) + IMGUI_TEST_ENGINE_ITEM_ADD(id, g.LastItemData.NavRect, &g.LastItemData); +#endif + + // Clipping test + // (this is a modified copy of IsClippedEx() so we can reuse the is_rect_visible value) + //const bool is_clipped = IsClippedEx(bb, id); + //if (is_clipped) + // return false; + // g.NavActivateId is not necessarily == g.NavId, in the case of remote activation (e.g. shortcuts) + const bool is_rect_visible = bb.Overlaps(window->ClipRect); + if (!is_rect_visible) + if (id == 0 || (id != g.ActiveId && id != g.ActiveIdPreviousFrame && id != g.NavId && id != g.NavActivateId)) + if (!g.LogEnabled) + return false; + + // [DEBUG] +#ifndef IMGUI_DISABLE_DEBUG_TOOLS + if (id != 0) + { + if (id == g.DebugLocateId) + DebugLocateItemResolveWithLastItem(); + // [DEBUG] People keep stumbling on this problem and using "" as identifier in the root of a window instead of "##something". // Empty identifier are valid and useful in a small amount of cases, but 99.9% of the time you want to use "##something". // READ THE FAQ: https://dearimgui.com/faq IM_ASSERT(id != window->ID && "Cannot have an empty ID at the root of a window. If you need an empty label, use ## and read the FAQ about how the ID Stack works!"); } - g.NextItemData.Flags = ImGuiNextItemDataFlags_None; - g.NextItemData.ItemFlags = ImGuiItemFlags_None; + //if (g.IO.KeyAlt) window->DrawList->AddRect(bb.Min, bb.Max, IM_COL32(255,255,0,120)); // [DEBUG] + //if ((g.LastItemData.InFlags & ImGuiItemFlags_NoNav) == 0) + // window->DrawList->AddRect(g.LastItemData.NavRect.Min, g.LastItemData.NavRect.Max, IM_COL32(255,255,0,255)); // [DEBUG] +#endif + + // We need to calculate this now to take account of the current clipping rectangle (as items like Selectable may change them) + if (is_rect_visible) + g.LastItemData.StatusFlags |= ImGuiItemStatusFlags_Visible; + if (IsMouseHoveringRect(bb.Min, bb.Max)) + g.LastItemData.StatusFlags |= ImGuiItemStatusFlags_HoveredRect; + return true; +} + + +//----------------------------------------------------------------------------- +// [SECTION] LAYOUT +//----------------------------------------------------------------------------- +// - ItemSize() +// - SameLine() +// - GetCursorScreenPos() +// - SetCursorScreenPos() +// - GetCursorPos(), GetCursorPosX(), GetCursorPosY() +// - SetCursorPos(), SetCursorPosX(), SetCursorPosY() +// - GetCursorStartPos() +// - Indent() +// - Unindent() +// - SetNextItemWidth() +// - PushItemWidth() +// - PushMultiItemsWidths() +// - PopItemWidth() +// - CalcItemWidth() +// - CalcItemSize() +// - GetTextLineHeight() +// - GetTextLineHeightWithSpacing() +// - GetFrameHeight() +// - GetFrameHeightWithSpacing() +// - GetContentRegionMax() +// - GetContentRegionMaxAbs() [Internal] +// - GetContentRegionAvail(), +// - GetWindowContentRegionMin(), GetWindowContentRegionMax() +// - BeginGroup() +// - EndGroup() +// Also see in imgui_widgets: tab bars, and in imgui_tables: tables, columns. +//----------------------------------------------------------------------------- + +// Advance cursor given item size for layout. +// Register minimum needed size so it can extend the bounding box used for auto-fit calculation. +// See comments in ItemAdd() about how/why the size provided to ItemSize() vs ItemAdd() may often different. +// THIS IS IN THE PERFORMANCE CRITICAL PATH. +void ImGui::ItemSize(const ImVec2& size, float text_baseline_y) +{ + ImGuiContext& g = *GImGui; + ImGuiWindow* window = g.CurrentWindow; + if (window->SkipItems) + return; + + // We increase the height in this function to accommodate for baseline offset. + // In theory we should be offsetting the starting position (window->DC.CursorPos), that will be the topic of a larger refactor, + // but since ItemSize() is not yet an API that moves the cursor (to handle e.g. wrapping) enlarging the height has the same effect. + const float offset_to_match_baseline_y = (text_baseline_y >= 0) ? ImMax(0.0f, window->DC.CurrLineTextBaseOffset - text_baseline_y) : 0.0f; -#ifdef IMGUI_ENABLE_TEST_ENGINE - if (id != 0) - IMGUI_TEST_ENGINE_ITEM_ADD(id, g.LastItemData.NavRect, &g.LastItemData); -#endif + const float line_y1 = window->DC.IsSameLine ? window->DC.CursorPosPrevLine.y : window->DC.CursorPos.y; + const float line_height = ImMax(window->DC.CurrLineSize.y, /*ImMax(*/window->DC.CursorPos.y - line_y1/*, 0.0f)*/ + size.y + offset_to_match_baseline_y); - // Clipping test - // (FIXME: This is a modified copy of IsClippedEx() so we can reuse the is_rect_visible value) - //const bool is_clipped = IsClippedEx(bb, id); - //if (is_clipped) - // return false; - const bool is_rect_visible = bb.Overlaps(window->ClipRect); - if (!is_rect_visible) - if (id == 0 || (id != g.ActiveId && id != g.ActiveIdPreviousFrame && id != g.NavId)) - if (!g.LogEnabled) - return false; + // Always align ourselves on pixel boundaries + //if (g.IO.KeyAlt) window->DrawList->AddRect(window->DC.CursorPos, window->DC.CursorPos + ImVec2(size.x, line_height), IM_COL32(255,0,0,200)); // [DEBUG] + window->DC.CursorPosPrevLine.x = window->DC.CursorPos.x + size.x; + window->DC.CursorPosPrevLine.y = line_y1; + window->DC.CursorPos.x = IM_TRUNC(window->Pos.x + window->DC.Indent.x + window->DC.ColumnsOffset.x); // Next line + window->DC.CursorPos.y = IM_TRUNC(line_y1 + line_height + g.Style.ItemSpacing.y); // Next line + window->DC.CursorMaxPos.x = ImMax(window->DC.CursorMaxPos.x, window->DC.CursorPosPrevLine.x); + window->DC.CursorMaxPos.y = ImMax(window->DC.CursorMaxPos.y, window->DC.CursorPos.y - g.Style.ItemSpacing.y); + //if (g.IO.KeyAlt) window->DrawList->AddCircle(window->DC.CursorMaxPos, 3.0f, IM_COL32(255,0,0,255), 4); // [DEBUG] - // [DEBUG] -#ifndef IMGUI_DISABLE_DEBUG_TOOLS - if (id != 0 && id == g.DebugLocateId) - DebugLocateItemResolveWithLastItem(); -#endif - //if (g.IO.KeyAlt) window->DrawList->AddRect(bb.Min, bb.Max, IM_COL32(255,255,0,120)); // [DEBUG] - //if ((g.LastItemData.InFlags & ImGuiItemFlags_NoNav) == 0) - // window->DrawList->AddRect(g.LastItemData.NavRect.Min, g.LastItemData.NavRect.Max, IM_COL32(255,255,0,255)); // [DEBUG] + window->DC.PrevLineSize.y = line_height; + window->DC.CurrLineSize.y = 0.0f; + window->DC.PrevLineTextBaseOffset = ImMax(window->DC.CurrLineTextBaseOffset, text_baseline_y); + window->DC.CurrLineTextBaseOffset = 0.0f; + window->DC.IsSameLine = window->DC.IsSetPos = false; - // We need to calculate this now to take account of the current clipping rectangle (as items like Selectable may change them) - if (is_rect_visible) - g.LastItemData.StatusFlags |= ImGuiItemStatusFlags_Visible; - if (IsMouseHoveringRect(bb.Min, bb.Max)) - g.LastItemData.StatusFlags |= ImGuiItemStatusFlags_HoveredRect; - return true; + // Horizontal layout mode + if (window->DC.LayoutType == ImGuiLayoutType_Horizontal) + SameLine(); } // Gets back to previous line and continue with horizontal layout @@ -10364,14 +10781,18 @@ void ImGui::PushMultiItemsWidths(int components, float w_full) { ImGuiContext& g = *GImGui; ImGuiWindow* window = g.CurrentWindow; + IM_ASSERT(components > 0); const ImGuiStyle& style = g.Style; - const float w_item_one = ImMax(1.0f, IM_FLOOR((w_full - (style.ItemInnerSpacing.x) * (components - 1)) / (float)components)); - const float w_item_last = ImMax(1.0f, IM_FLOOR(w_full - (w_item_one + style.ItemInnerSpacing.x) * (components - 1))); window->DC.ItemWidthStack.push_back(window->DC.ItemWidth); // Backup current width - window->DC.ItemWidthStack.push_back(w_item_last); - for (int i = 0; i < components - 2; i++) - window->DC.ItemWidthStack.push_back(w_item_one); - window->DC.ItemWidth = (components == 1) ? w_item_last : w_item_one; + float w_items = w_full - style.ItemInnerSpacing.x * (components - 1); + float prev_split = w_items; + for (int i = components - 1; i > 0; i--) + { + float next_split = IM_TRUNC(w_items * i / components); + window->DC.ItemWidthStack.push_back(ImMax(prev_split - next_split, 1.0f)); + prev_split = next_split; + } + window->DC.ItemWidth = ImMax(prev_split, 1.0f); g.NextItemData.Flags &= ~ImGuiNextItemDataFlags_HasWidth; } @@ -10398,7 +10819,7 @@ float ImGui::CalcItemWidth() float region_max_x = GetContentRegionMaxAbs().x; w = ImMax(1.0f, region_max_x - window->DC.CursorPos.x + w); } - w = IM_FLOOR(w); + w = IM_TRUNC(w); return w; } @@ -10503,6 +10924,7 @@ void ImGui::BeginGroup() ImGuiGroupData& group_data = g.GroupStack.back(); group_data.WindowID = window->ID; group_data.BackupCursorPos = window->DC.CursorPos; + group_data.BackupCursorPosPrevLine = window->DC.CursorPosPrevLine; group_data.BackupCursorMaxPos = window->DC.CursorMaxPos; group_data.BackupIndent = window->DC.Indent; group_data.BackupGroupOffset = window->DC.GroupOffset; @@ -10510,6 +10932,7 @@ void ImGui::BeginGroup() group_data.BackupCurrLineTextBaseOffset = window->DC.CurrLineTextBaseOffset; group_data.BackupActiveIdIsAlive = g.ActiveIdIsAlive; group_data.BackupHoveredIdIsAlive = g.HoveredId != 0; + group_data.BackupIsSameLine = window->DC.IsSameLine; group_data.BackupActiveIdPreviousFrameIsAlive = g.ActiveIdPreviousFrameIsAlive; group_data.EmitItem = true; @@ -10536,11 +10959,13 @@ void ImGui::EndGroup() ImRect group_bb(group_data.BackupCursorPos, ImMax(window->DC.CursorMaxPos, group_data.BackupCursorPos)); window->DC.CursorPos = group_data.BackupCursorPos; + window->DC.CursorPosPrevLine = group_data.BackupCursorPosPrevLine; window->DC.CursorMaxPos = ImMax(group_data.BackupCursorMaxPos, window->DC.CursorMaxPos); window->DC.Indent = group_data.BackupIndent; window->DC.GroupOffset = group_data.BackupGroupOffset; window->DC.CurrLineSize = group_data.BackupCurrLineSize; window->DC.CurrLineTextBaseOffset = group_data.BackupCurrLineTextBaseOffset; + window->DC.IsSameLine = group_data.BackupIsSameLine; if (g.LogEnabled) g.LogLinePosY = -FLT_MAX; // To enforce a carriage return @@ -10581,7 +11006,8 @@ void ImGui::EndGroup() g.LastItemData.StatusFlags |= ImGuiItemStatusFlags_Deactivated; g.GroupStack.pop_back(); - //window->DrawList->AddRect(group_bb.Min, group_bb.Max, IM_COL32(255,0,255,255)); // [Debug] + if (g.DebugShowGroupRects) + window->DrawList->AddRect(group_bb.Min, group_bb.Max, IM_COL32(255,0,255,255)); // [Debug] } @@ -10620,7 +11046,7 @@ static ImVec2 CalcNextScrollFromScrollTargetAndClamp(ImGuiWindow* window) } scroll[axis] = scroll_target - center_ratio * (window->SizeFull[axis] - decoration_size[axis]); } - scroll[axis] = IM_FLOOR(ImMax(scroll[axis], 0.0f)); + scroll[axis] = IM_ROUND(ImMax(scroll[axis], 0.0f)); if (!window->Collapsed && !window->SkipItems) scroll[axis] = ImMin(scroll[axis], window->ScrollMax[axis]); } @@ -10675,7 +11101,7 @@ ImVec2 ImGui::ScrollToRectEx(ImGuiWindow* window, const ImRect& item_rect, ImGui else if (((flags & ImGuiScrollFlags_KeepVisibleCenterX) && !fully_visible_x) || (flags & ImGuiScrollFlags_AlwaysCenterX)) { if (can_be_fully_visible_x) - SetScrollFromPosX(window, ImFloor((item_rect.Min.x + item_rect.Max.x) * 0.5f) - window->Pos.x, 0.5f); + SetScrollFromPosX(window, ImTrunc((item_rect.Min.x + item_rect.Max.x) * 0.5f) - window->Pos.x, 0.5f); else SetScrollFromPosX(window, item_rect.Min.x - window->Pos.x, 0.0f); } @@ -10690,7 +11116,7 @@ ImVec2 ImGui::ScrollToRectEx(ImGuiWindow* window, const ImRect& item_rect, ImGui else if (((flags & ImGuiScrollFlags_KeepVisibleCenterY) && !fully_visible_y) || (flags & ImGuiScrollFlags_AlwaysCenterY)) { if (can_be_fully_visible_y) - SetScrollFromPosY(window, ImFloor((item_rect.Min.y + item_rect.Max.y) * 0.5f) - window->Pos.y, 0.5f); + SetScrollFromPosY(window, ImTrunc((item_rect.Min.y + item_rect.Max.y) * 0.5f) - window->Pos.y, 0.5f); else SetScrollFromPosY(window, item_rect.Min.y - window->Pos.y, 0.0f); } @@ -10775,7 +11201,7 @@ void ImGui::SetScrollY(float scroll_y) void ImGui::SetScrollFromPosX(ImGuiWindow* window, float local_x, float center_x_ratio) { IM_ASSERT(center_x_ratio >= 0.0f && center_x_ratio <= 1.0f); - window->ScrollTarget.x = IM_FLOOR(local_x - window->DecoOuterSizeX1 - window->DecoInnerSizeX1 + window->Scroll.x); // Convert local position to scroll offset + window->ScrollTarget.x = IM_TRUNC(local_x - window->DecoOuterSizeX1 - window->DecoInnerSizeX1 + window->Scroll.x); // Convert local position to scroll offset window->ScrollTargetCenterRatio.x = center_x_ratio; window->ScrollTargetEdgeSnapDist.x = 0.0f; } @@ -10783,7 +11209,7 @@ void ImGui::SetScrollFromPosX(ImGuiWindow* window, float local_x, float center_x void ImGui::SetScrollFromPosY(ImGuiWindow* window, float local_y, float center_y_ratio) { IM_ASSERT(center_y_ratio >= 0.0f && center_y_ratio <= 1.0f); - window->ScrollTarget.y = IM_FLOOR(local_y - window->DecoOuterSizeY1 - window->DecoInnerSizeY1 + window->Scroll.y); // Convert local position to scroll offset + window->ScrollTarget.y = IM_TRUNC(local_y - window->DecoOuterSizeY1 - window->DecoInnerSizeY1 + window->Scroll.y); // Convert local position to scroll offset window->ScrollTargetCenterRatio.y = center_y_ratio; window->ScrollTargetEdgeSnapDist.y = 0.0f; } @@ -10868,7 +11294,7 @@ bool ImGui::BeginTooltipEx(ImGuiTooltipFlags tooltip_flags, ImGuiWindowFlags ext if (window->Active) { // Hide previous tooltip from being displayed. We can't easily "reset" the content of a window so we create a new one. - SetWindowHiddendAndSkipItemsForCurrentFrame(window); + SetWindowHiddenAndSkipItemsForCurrentFrame(window); ImFormatString(window_name, IM_ARRAYSIZE(window_name), "##Tooltip_%02d", ++g.TooltipOverrideCount); } ImGuiWindowFlags flags = ImGuiWindowFlags_Tooltip | ImGuiWindowFlags_NoInputs | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoDocking; @@ -11031,17 +11457,23 @@ void ImGui::OpenPopupEx(ImGuiID id, ImGuiPopupFlags popup_flags) } else { - // Gently handle the user mistakenly calling OpenPopup() every frame. It is a programming mistake! However, if we were to run the regular code path, the ui - // would become completely unusable because the popup will always be in hidden-while-calculating-size state _while_ claiming focus. Which would be a very confusing - // situation for the programmer. Instead, we silently allow the popup to proceed, it will keep reappearing and the programming error will be more obvious to understand. - if (g.OpenPopupStack[current_stack_size].PopupId == id && g.OpenPopupStack[current_stack_size].OpenFrameCount == g.FrameCount - 1) - { + // Gently handle the user mistakenly calling OpenPopup() every frames: it is likely a programming mistake! + // However, if we were to run the regular code path, the ui would become completely unusable because the popup will always be + // in hidden-while-calculating-size state _while_ claiming focus. Which is extremely confusing situation for the programmer. + // Instead, for successive frames calls to OpenPopup(), we silently avoid reopening even if ImGuiPopupFlags_NoReopen is not specified. + bool keep_existing = false; + if (g.OpenPopupStack[current_stack_size].PopupId == id) + if ((g.OpenPopupStack[current_stack_size].OpenFrameCount == g.FrameCount - 1) || (popup_flags & ImGuiPopupFlags_NoReopen)) + keep_existing = true; + if (keep_existing) + { + // No reopen g.OpenPopupStack[current_stack_size].OpenFrameCount = popup_ref.OpenFrameCount; } else { - // Close child popups if any, then flag popup for open/reopen - ClosePopupToLevel(current_stack_size, false); + // Reopen: close child popups if any, then flag popup for open/reopen (set position, focus, init navigation) + ClosePopupToLevel(current_stack_size, true); g.OpenPopupStack.push_back(popup_ref); } @@ -11071,14 +11503,15 @@ void ImGui::ClosePopupsOverWindow(ImGuiWindow* ref_window, bool restore_focus_to if (!popup.Window) continue; IM_ASSERT((popup.Window->Flags & ImGuiWindowFlags_Popup) != 0); - if (popup.Window->Flags & ImGuiWindowFlags_ChildWindow) - continue; // Trim the stack unless the popup is a direct parent of the reference window (the reference window is often the NavWindow) - // - With this stack of window, clicking/focusing Popup1 will close Popup2 and Popup3: - // Window -> Popup1 -> Popup2 -> Popup3 + // - Clicking/Focusing Window2 won't close Popup1: + // Window -> Popup1 -> Window2(Ref) + // - Clicking/focusing Popup1 will close Popup2 and Popup3: + // Window -> Popup1(Ref) -> Popup2 -> Popup3 // - Each popups may contain child windows, which is why we compare ->RootWindowDockTree! // Window -> Popup1 -> Popup1_Child -> Popup2 -> Popup2_Child + // We step through every popup from bottom to top to validate their position relative to reference window. bool ref_window_is_descendent_of_popup = false; for (int n = popup_count_to_keep; n < g.OpenPopupStack.Size; n++) if (ImGuiWindow* popup_window = g.OpenPopupStack[n].Window) @@ -11178,7 +11611,7 @@ bool ImGui::BeginPopupEx(ImGuiID id, ImGuiWindowFlags flags) char name[20]; if (flags & ImGuiWindowFlags_ChildMenu) - ImFormatString(name, IM_ARRAYSIZE(name), "##Menu_%02d", g.BeginMenuCount); // Recycle windows based on depth + ImFormatString(name, IM_ARRAYSIZE(name), "##Menu_%02d", g.BeginMenuDepth); // Recycle windows based on depth else ImFormatString(name, IM_ARRAYSIZE(name), "##Popup_%08x", id); // Not recycling, so we can close/open during the same frame @@ -11187,6 +11620,8 @@ bool ImGui::BeginPopupEx(ImGuiID id, ImGuiWindowFlags flags) if (!is_open) // NB: Begin can return false when the popup is completely clipped (e.g. zero size display) EndPopup(); + //g.CurrentWindow->FocusRouteParentWindow = g.CurrentWindow->ParentWindowInBeginStack; + return is_open; } @@ -11204,7 +11639,9 @@ bool ImGui::BeginPopup(const char* str_id, ImGuiWindowFlags flags) } // If 'p_open' is specified for a modal popup window, the popup will have a regular close button which will close the popup. -// Note that popup visibility status is owned by Dear ImGui (and manipulated with e.g. OpenPopup) so the actual value of *p_open is meaningless here. +// Note that popup visibility status is owned by Dear ImGui (and manipulated with e.g. OpenPopup). +// - *p_open set back to false in BeginPopupModal() when popup is not open. +// - if you set *p_open to false before calling BeginPopupModal(), it will close the popup. bool ImGui::BeginPopupModal(const char* name, bool* p_open, ImGuiWindowFlags flags) { ImGuiContext& g = *GImGui; @@ -11213,6 +11650,8 @@ bool ImGui::BeginPopupModal(const char* name, bool* p_open, ImGuiWindowFlags fla if (!IsPopupOpen(id, ImGuiPopupFlags_None)) { g.NextWindowData.ClearFlags(); // We behave like Begin() and need to consume those values + if (p_open && *p_open) + *p_open = false; return false; } @@ -11494,6 +11933,13 @@ void ImGui::SetNavWindow(ImGuiWindow* window) NavUpdateAnyRequestFlag(); } +void ImGui::NavHighlightActivated(ImGuiID id) +{ + ImGuiContext& g = *GImGui; + g.NavHighlightActivatedId = id; + g.NavHighlightActivatedTimer = NAV_ACTIVATE_HIGHLIGHT_TIMER; +} + void ImGui::NavClearPreferredPosForAxis(ImGuiAxis axis) { ImGuiContext& g = *GImGui; @@ -11507,7 +11953,7 @@ void ImGui::SetNavID(ImGuiID id, ImGuiNavLayer nav_layer, ImGuiID focus_scope_id IM_ASSERT(nav_layer == ImGuiNavLayer_Main || nav_layer == ImGuiNavLayer_Menu); g.NavId = id; g.NavLayer = nav_layer; - g.NavFocusScopeId = focus_scope_id; + SetNavFocusScope(focus_scope_id); g.NavWindow->NavLastIds[nav_layer] = id; g.NavWindow->NavRectRel[nav_layer] = rect_rel; @@ -11529,7 +11975,7 @@ void ImGui::SetFocusID(ImGuiID id, ImGuiWindow* window) const ImGuiNavLayer nav_layer = window->DC.NavLayerCurrent; g.NavId = id; g.NavLayer = nav_layer; - g.NavFocusScopeId = g.CurrentFocusScopeId; + SetNavFocusScope(g.CurrentFocusScopeId); window->NavLastIds[nav_layer] = id; if (g.LastItemData.ID == id) window->NavRectRel[nav_layer] = WindowRectAbsToRel(window, g.LastItemData.NavRect); @@ -11761,23 +12207,26 @@ static void ImGui::NavProcessItem() // FIXME-NAV: Consider policy for double scoring (scoring from NavScoringRect + scoring from a rect wrapped according to current wrapping policy) if (g.NavMoveScoringItems && (item_flags & ImGuiItemFlags_Disabled) == 0) { - const bool is_tabbing = (g.NavMoveFlags & ImGuiNavMoveFlags_IsTabbing) != 0; - if (is_tabbing) - { - NavProcessItemForTabbingRequest(id, item_flags, g.NavMoveFlags); - } - else if (g.NavId != id || (g.NavMoveFlags & ImGuiNavMoveFlags_AllowCurrentNavId)) + if ((g.NavMoveFlags & ImGuiNavMoveFlags_FocusApi) || (window->Flags & ImGuiWindowFlags_NoNavInputs) == 0) { - ImGuiNavItemData* result = (window == g.NavWindow) ? &g.NavMoveResultLocal : &g.NavMoveResultOther; - if (NavScoreItem(result)) - NavApplyItemToResult(result); - - // Features like PageUp/PageDown need to maintain a separate score for the visible set of items. - const float VISIBLE_RATIO = 0.70f; - if ((g.NavMoveFlags & ImGuiNavMoveFlags_AlsoScoreVisibleSet) && window->ClipRect.Overlaps(nav_bb)) - if (ImClamp(nav_bb.Max.y, window->ClipRect.Min.y, window->ClipRect.Max.y) - ImClamp(nav_bb.Min.y, window->ClipRect.Min.y, window->ClipRect.Max.y) >= (nav_bb.Max.y - nav_bb.Min.y) * VISIBLE_RATIO) - if (NavScoreItem(&g.NavMoveResultLocalVisible)) - NavApplyItemToResult(&g.NavMoveResultLocalVisible); + const bool is_tabbing = (g.NavMoveFlags & ImGuiNavMoveFlags_IsTabbing) != 0; + if (is_tabbing) + { + NavProcessItemForTabbingRequest(id, item_flags, g.NavMoveFlags); + } + else if (g.NavId != id || (g.NavMoveFlags & ImGuiNavMoveFlags_AllowCurrentNavId)) + { + ImGuiNavItemData* result = (window == g.NavWindow) ? &g.NavMoveResultLocal : &g.NavMoveResultOther; + if (NavScoreItem(result)) + NavApplyItemToResult(result); + + // Features like PageUp/PageDown need to maintain a separate score for the visible set of items. + const float VISIBLE_RATIO = 0.70f; + if ((g.NavMoveFlags & ImGuiNavMoveFlags_AlsoScoreVisibleSet) && window->ClipRect.Overlaps(nav_bb)) + if (ImClamp(nav_bb.Max.y, window->ClipRect.Min.y, window->ClipRect.Max.y) - ImClamp(nav_bb.Min.y, window->ClipRect.Min.y, window->ClipRect.Max.y) >= (nav_bb.Max.y - nav_bb.Min.y) * VISIBLE_RATIO) + if (NavScoreItem(&g.NavMoveResultLocalVisible)) + NavApplyItemToResult(&g.NavMoveResultLocalVisible); + } } } @@ -11787,6 +12236,7 @@ static void ImGui::NavProcessItem() if (g.NavWindow != window) SetNavWindow(window); // Always refresh g.NavWindow, because some operations such as FocusItem() may not have a window. g.NavLayer = window->DC.NavLayerCurrent; + SetNavFocusScope(g.CurrentFocusScopeId); // Will set g.NavFocusScopeId AND store g.NavFocusScopePath g.NavFocusScopeId = g.CurrentFocusScopeId; g.NavIdIsAlive = true; if (g.LastItemData.InFlags & ImGuiItemFlags_HasSelectionUserData) @@ -11810,8 +12260,12 @@ void ImGui::NavProcessItemForTabbingRequest(ImGuiID id, ImGuiItemFlags item_flag ImGuiContext& g = *GImGui; if ((move_flags & ImGuiNavMoveFlags_FocusApi) == 0) + { if (g.NavLayer != g.CurrentWindow->DC.NavLayerCurrent) return; + if (g.NavFocusScopeId != g.CurrentFocusScopeId) + return; + } // - Can always land on an item when using API call. // - Tabbing with _NavEnableKeyboard (space/enter/arrows): goes through every item. @@ -11882,7 +12336,7 @@ void ImGui::NavMoveRequestSubmit(ImGuiDir move_dir, ImGuiDir clip_dir, ImGuiNavM g.NavMoveFlags = move_flags; g.NavMoveScrollFlags = scroll_flags; g.NavMoveForwardToNextFrame = false; - g.NavMoveKeyMods = g.IO.KeyMods; + g.NavMoveKeyMods = (move_flags & ImGuiNavMoveFlags_FocusApi) ? 0 : g.IO.KeyMods; g.NavMoveResultLocal.Clear(); g.NavMoveResultLocalVisible.Clear(); g.NavMoveResultOther.Clear(); @@ -12016,7 +12470,7 @@ void ImGui::NavInitWindow(ImGuiWindow* window, bool force_reinit) if (window->Flags & ImGuiWindowFlags_NoNavInputs) { g.NavId = 0; - g.NavFocusScopeId = window->NavRootFocusScopeId; + SetNavFocusScope(window->NavRootFocusScopeId); return; } @@ -12035,7 +12489,7 @@ void ImGui::NavInitWindow(ImGuiWindow* window, bool force_reinit) else { g.NavId = window->NavLastIds[0]; - g.NavFocusScopeId = window->NavRootFocusScopeId; + SetNavFocusScope(window->NavRootFocusScopeId); } } @@ -12063,7 +12517,7 @@ static ImVec2 ImGui::NavCalcPreferredRefPos() } ImVec2 pos = ImVec2(rect_rel.Min.x + ImMin(g.Style.FramePadding.x * 4, rect_rel.GetWidth()), rect_rel.Max.y - ImMin(g.Style.FramePadding.y, rect_rel.GetHeight())); ImGuiViewport* viewport = window->Viewport; - return ImFloor(ImClamp(pos, viewport->Pos, viewport->Pos + viewport->Size)); // ImFloor() is important because non-integer mouse position application in backend might be lossy and result in undesirable non-zero delta. + return ImTrunc(ImClamp(pos, viewport->Pos, viewport->Pos + viewport->Size)); // ImTrunc() is important because non-integer mouse position application in backend might be lossy and result in undesirable non-zero delta. } } @@ -12156,10 +12610,10 @@ static void ImGui::NavUpdate() g.NavActivateFlags = ImGuiActivateFlags_None; if (g.NavId != 0 && !g.NavDisableHighlight && !g.NavWindowingTarget && g.NavWindow && !(g.NavWindow->Flags & ImGuiWindowFlags_NoNavInputs)) { - const bool activate_down = (nav_keyboard_active && IsKeyDown(ImGuiKey_Space)) || (nav_gamepad_active && IsKeyDown(ImGuiKey_NavGamepadActivate)); - const bool activate_pressed = activate_down && ((nav_keyboard_active && IsKeyPressed(ImGuiKey_Space, false)) || (nav_gamepad_active && IsKeyPressed(ImGuiKey_NavGamepadActivate, false))); - const bool input_down = (nav_keyboard_active && IsKeyDown(ImGuiKey_Enter)) || (nav_gamepad_active && IsKeyDown(ImGuiKey_NavGamepadInput)); - const bool input_pressed = input_down && ((nav_keyboard_active && IsKeyPressed(ImGuiKey_Enter, false)) || (nav_gamepad_active && IsKeyPressed(ImGuiKey_NavGamepadInput, false))); + const bool activate_down = (nav_keyboard_active && IsKeyDown(ImGuiKey_Space, ImGuiKeyOwner_None)) || (nav_gamepad_active && IsKeyDown(ImGuiKey_NavGamepadActivate, ImGuiKeyOwner_None)); + const bool activate_pressed = activate_down && ((nav_keyboard_active && IsKeyPressed(ImGuiKey_Space, ImGuiKeyOwner_None)) || (nav_gamepad_active && IsKeyPressed(ImGuiKey_NavGamepadActivate, ImGuiKeyOwner_None))); + const bool input_down = (nav_keyboard_active && (IsKeyDown(ImGuiKey_Enter, ImGuiKeyOwner_None) || IsKeyDown(ImGuiKey_KeypadEnter, ImGuiKeyOwner_None))) || (nav_gamepad_active && IsKeyDown(ImGuiKey_NavGamepadInput, ImGuiKeyOwner_None)); + const bool input_pressed = input_down && ((nav_keyboard_active && (IsKeyPressed(ImGuiKey_Enter, ImGuiKeyOwner_None) || IsKeyPressed(ImGuiKey_KeypadEnter, ImGuiKeyOwner_None))) || (nav_gamepad_active && IsKeyPressed(ImGuiKey_NavGamepadInput, ImGuiKeyOwner_None))); if (g.ActiveId == 0 && activate_pressed) { g.NavActivateId = g.NavId; @@ -12173,13 +12627,22 @@ static void ImGui::NavUpdate() if ((g.ActiveId == 0 || g.ActiveId == g.NavId) && (activate_down || input_down)) g.NavActivateDownId = g.NavId; if ((g.ActiveId == 0 || g.ActiveId == g.NavId) && (activate_pressed || input_pressed)) + { g.NavActivatePressedId = g.NavId; + NavHighlightActivated(g.NavId); + } } if (g.NavWindow && (g.NavWindow->Flags & ImGuiWindowFlags_NoNavInputs)) g.NavDisableHighlight = true; if (g.NavActivateId != 0) IM_ASSERT(g.NavActivateDownId == g.NavActivateId); + // Highlight + if (g.NavHighlightActivatedTimer > 0.0f) + g.NavHighlightActivatedTimer = ImMax(0.0f, g.NavHighlightActivatedTimer - io.DeltaTime); + if (g.NavHighlightActivatedTimer == 0.0f) + g.NavHighlightActivatedId = 0; + // Process programmatic activation request // FIXME-NAV: Those should eventually be queued (unlike focus they don't cancel each others) if (g.NavNextActivateId != 0) @@ -12206,9 +12669,9 @@ static void ImGui::NavUpdate() if (window->DC.NavLayersActiveMask == 0x00 && window->DC.NavWindowHasScrollY && move_dir != ImGuiDir_None) { if (move_dir == ImGuiDir_Left || move_dir == ImGuiDir_Right) - SetScrollX(window, ImFloor(window->Scroll.x + ((move_dir == ImGuiDir_Left) ? -1.0f : +1.0f) * scroll_speed)); + SetScrollX(window, ImTrunc(window->Scroll.x + ((move_dir == ImGuiDir_Left) ? -1.0f : +1.0f) * scroll_speed)); if (move_dir == ImGuiDir_Up || move_dir == ImGuiDir_Down) - SetScrollY(window, ImFloor(window->Scroll.y + ((move_dir == ImGuiDir_Up) ? -1.0f : +1.0f) * scroll_speed)); + SetScrollY(window, ImTrunc(window->Scroll.y + ((move_dir == ImGuiDir_Up) ? -1.0f : +1.0f) * scroll_speed)); } // *Normal* Manual scroll with LStick @@ -12218,9 +12681,9 @@ static void ImGui::NavUpdate() const ImVec2 scroll_dir = GetKeyMagnitude2d(ImGuiKey_GamepadLStickLeft, ImGuiKey_GamepadLStickRight, ImGuiKey_GamepadLStickUp, ImGuiKey_GamepadLStickDown); const float tweak_factor = IsKeyDown(ImGuiKey_NavGamepadTweakSlow) ? 1.0f / 10.0f : IsKeyDown(ImGuiKey_NavGamepadTweakFast) ? 10.0f : 1.0f; if (scroll_dir.x != 0.0f && window->ScrollbarX) - SetScrollX(window, ImFloor(window->Scroll.x + scroll_dir.x * scroll_speed * tweak_factor)); + SetScrollX(window, ImTrunc(window->Scroll.x + scroll_dir.x * scroll_speed * tweak_factor)); if (scroll_dir.y != 0.0f) - SetScrollY(window, ImFloor(window->Scroll.y + scroll_dir.y * scroll_speed * tweak_factor)); + SetScrollY(window, ImTrunc(window->Scroll.y + scroll_dir.y * scroll_speed * tweak_factor)); } } @@ -12323,7 +12786,7 @@ void ImGui::NavUpdateCreateMoveRequest() g.NavMoveScrollFlags = ImGuiScrollFlags_None; if (window && !g.NavWindowingTarget && !(window->Flags & ImGuiWindowFlags_NoNavInputs)) { - const ImGuiInputFlags repeat_mode = ImGuiInputFlags_Repeat | (ImGuiInputFlags)ImGuiInputFlags_RepeatRateNavMove; + const ImGuiInputFlags repeat_mode = ImGuiInputFlags_Repeat | ImGuiInputFlags_RepeatRateNavMove; if (!IsActiveIdUsingNavDir(ImGuiDir_Left) && ((nav_gamepad_active && IsKeyPressed(ImGuiKey_GamepadDpadLeft, ImGuiKeyOwner_None, repeat_mode)) || (nav_keyboard_active && IsKeyPressed(ImGuiKey_LeftArrow, ImGuiKeyOwner_None, repeat_mode)))) { g.NavMoveDir = ImGuiDir_Left; } if (!IsActiveIdUsingNavDir(ImGuiDir_Right) && ((nav_gamepad_active && IsKeyPressed(ImGuiKey_GamepadDpadRight, ImGuiKeyOwner_None, repeat_mode)) || (nav_keyboard_active && IsKeyPressed(ImGuiKey_RightArrow, ImGuiKeyOwner_None, repeat_mode)))) { g.NavMoveDir = ImGuiDir_Right; } if (!IsActiveIdUsingNavDir(ImGuiDir_Up) && ((nav_gamepad_active && IsKeyPressed(ImGuiKey_GamepadDpadUp, ImGuiKeyOwner_None, repeat_mode)) || (nav_keyboard_active && IsKeyPressed(ImGuiKey_UpArrow, ImGuiKeyOwner_None, repeat_mode)))) { g.NavMoveDir = ImGuiDir_Up; } @@ -12503,6 +12966,8 @@ void ImGui::NavMoveRequestApplyResult() g.NavWindow = result->Window; g.NavLastValidSelectionUserData = ImGuiSelectionUserData_Invalid; } + + // FIXME: Could become optional e.g. ImGuiNavMoveFlags_NoClearActiveId if we later want to apply navigation requests without altering active input. if (g.ActiveId != result->ID) ClearActiveID(); @@ -12540,7 +13005,7 @@ void ImGui::NavMoveRequestApplyResult() g.NavNextActivateId = result->ID; g.NavNextActivateFlags = ImGuiActivateFlags_None; if (g.NavMoveFlags & ImGuiNavMoveFlags_IsTabbing) - g.NavNextActivateFlags |= ImGuiActivateFlags_PreferInput | ImGuiActivateFlags_TryToPreserveState; + g.NavNextActivateFlags |= ImGuiActivateFlags_PreferInput | ImGuiActivateFlags_TryToPreserveState | ImGuiActivateFlags_FromTabbing; } // Enable nav highlight @@ -12571,15 +13036,14 @@ static void ImGui::NavUpdateCancelRequest() NavRestoreLayer(ImGuiNavLayer_Main); NavRestoreHighlightAfterMove(); } - else if (g.NavWindow && g.NavWindow != g.NavWindow->RootWindow && !(g.NavWindow->Flags & ImGuiWindowFlags_Popup) && g.NavWindow->ParentWindow) + else if (g.NavWindow && g.NavWindow != g.NavWindow->RootWindow && !(g.NavWindow->RootWindowForNav->Flags & ImGuiWindowFlags_Popup) && g.NavWindow->RootWindowForNav->ParentWindow) { // Exit child window - ImGuiWindow* child_window = g.NavWindow; - ImGuiWindow* parent_window = g.NavWindow->ParentWindow; + ImGuiWindow* child_window = g.NavWindow->RootWindowForNav; + ImGuiWindow* parent_window = child_window->ParentWindow; IM_ASSERT(child_window->ChildId != 0); - ImRect child_rect = child_window->Rect(); FocusWindow(parent_window); - SetNavID(child_window->ChildId, ImGuiNavLayer_Main, 0, WindowRectAbsToRel(parent_window, child_rect)); + SetNavID(child_window->ChildId, ImGuiNavLayer_Main, 0, WindowRectAbsToRel(parent_window, child_window->Rect())); NavRestoreHighlightAfterMove(); } else if (g.OpenPopupStack.Size > 0 && g.OpenPopupStack.back().Window != NULL && !(g.OpenPopupStack.back().Window->Flags & ImGuiWindowFlags_Modal)) @@ -12811,6 +13275,7 @@ static void ImGui::NavUpdateWindowing() } // Start CTRL+Tab or Square+L/R window selection + // (g.ConfigNavWindowingKeyNext/g.ConfigNavWindowingKeyPrev defaults are ImGuiMod_Ctrl|ImGuiKey_Tab and ImGuiMod_Ctrl|ImGuiMod_Shift|ImGuiKey_Tab) const ImGuiID owner_id = ImHashStr("###NavUpdateWindowing"); const bool nav_gamepad_active = (io.ConfigFlags & ImGuiConfigFlags_NavEnableGamepad) != 0 && (io.BackendFlags & ImGuiBackendFlags_HasGamepad) != 0; const bool nav_keyboard_active = (io.ConfigFlags & ImGuiConfigFlags_NavEnableKeyboard) != 0; @@ -12873,28 +13338,33 @@ static void ImGui::NavUpdateWindowing() } // Keyboard: Press and Release ALT to toggle menu layer - // - Testing that only Alt is tested prevents Alt+Shift or AltGR from toggling menu layer. - // - AltGR is normally Alt+Ctrl but we can't reliably detect it (not all backends/systems/layout emit it as Alt+Ctrl). But even on keyboards without AltGR we don't want Alt+Ctrl to open menu anyway. - if (nav_keyboard_active && IsKeyPressed(ImGuiMod_Alt, ImGuiKeyOwner_None)) - { - g.NavWindowingToggleLayer = true; - g.NavInputSource = ImGuiInputSource_Keyboard; - } + const ImGuiKey windowing_toggle_keys[] = { ImGuiKey_LeftAlt, ImGuiKey_RightAlt }; + for (ImGuiKey windowing_toggle_key : windowing_toggle_keys) + if (nav_keyboard_active && IsKeyPressed(windowing_toggle_key, ImGuiKeyOwner_None)) + { + g.NavWindowingToggleLayer = true; + g.NavWindowingToggleKey = windowing_toggle_key; + g.NavInputSource = ImGuiInputSource_Keyboard; + break; + } if (g.NavWindowingToggleLayer && g.NavInputSource == ImGuiInputSource_Keyboard) { // We cancel toggling nav layer when any text has been typed (generally while holding Alt). (See #370) // We cancel toggling nav layer when other modifiers are pressed. (See #4439) + // - AltGR is Alt+Ctrl on some layout but we can't reliably detect it (not all backends/systems/layout emit it as Alt+Ctrl). // We cancel toggling nav layer if an owner has claimed the key. - if (io.InputQueueCharacters.Size > 0 || io.KeyCtrl || io.KeyShift || io.KeySuper || TestKeyOwner(ImGuiMod_Alt, ImGuiKeyOwner_None) == false) + if (io.InputQueueCharacters.Size > 0 || io.KeyCtrl || io.KeyShift || io.KeySuper) + g.NavWindowingToggleLayer = false; + if (TestKeyOwner(g.NavWindowingToggleKey, ImGuiKeyOwner_None) == false || TestKeyOwner(ImGuiMod_Alt, ImGuiKeyOwner_None) == false) g.NavWindowingToggleLayer = false; - // Apply layer toggle on release + // Apply layer toggle on Alt release // Important: as before version <18314 we lacked an explicit IO event for focus gain/loss, we also compare mouse validity to detect old backends clearing mouse pos on focus loss. - if (IsKeyReleased(ImGuiMod_Alt) && g.NavWindowingToggleLayer) + if (IsKeyReleased(g.NavWindowingToggleKey) && g.NavWindowingToggleLayer) if (g.ActiveId == 0 || g.ActiveIdAllowOverlap) if (IsMousePosValid(&io.MousePos) == IsMousePosValid(&io.MousePosPrev)) apply_toggle_layer = true; - if (!IsKeyDown(ImGuiMod_Alt)) + if (!IsKeyDown(g.NavWindowingToggleKey)) g.NavWindowingToggleLayer = false; } @@ -12912,7 +13382,7 @@ static void ImGui::NavUpdateWindowing() const float move_step = NAV_MOVE_SPEED * io.DeltaTime * ImMin(io.DisplayFramebufferScale.x, io.DisplayFramebufferScale.y); g.NavWindowingAccumDeltaPos += nav_move_dir * move_step; g.NavDisableMouseHover = true; - ImVec2 accum_floored = ImFloor(g.NavWindowingAccumDeltaPos); + ImVec2 accum_floored = ImTrunc(g.NavWindowingAccumDeltaPos); if (accum_floored.x != 0.0f || accum_floored.y != 0.0f) { ImGuiWindow* moving_window = g.NavWindowingTarget->RootWindowDockTree; @@ -13054,6 +13524,14 @@ void ImGui::ClearDragDrop() memset(&g.DragDropPayloadBufLocal, 0, sizeof(g.DragDropPayloadBufLocal)); } +bool ImGui::BeginTooltipHidden() +{ + ImGuiContext& g = *GImGui; + bool ret = Begin("##Tooltip_Hidden", NULL, ImGuiWindowFlags_Tooltip | ImGuiWindowFlags_NoInputs | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_AlwaysAutoResize); + SetWindowHiddenAndSkipItemsForCurrentFrame(g.CurrentWindow); + return ret; +} + // When this returns true you need to: a) call SetDragDropPayload() exactly once, b) you may render the payload visual/description, c) call EndDragDropSource() // If the item has an identifier: // - This assume/require the item to be activated (typically via ButtonBehavior). @@ -13156,12 +13634,13 @@ bool ImGui::BeginDragDropSource(ImGuiDragDropFlags flags) { // Target can request the Source to not display its tooltip (we use a dedicated flag to make this request explicit) // We unfortunately can't just modify the source flags and skip the call to BeginTooltip, as caller may be emitting contents. - bool ret = BeginTooltip(); + bool ret; + if (g.DragDropAcceptIdPrev && (g.DragDropAcceptFlags & ImGuiDragDropFlags_AcceptNoPreviewTooltip)) + ret = BeginTooltipHidden(); + else + ret = BeginTooltip(); IM_ASSERT(ret); // FIXME-NEWBEGIN: If this ever becomes false, we need to Begin("##Hidden", NULL, ImGuiWindowFlags_NoSavedSettings) + SetWindowHiddendAndSkipItemsForCurrentFrame(). IM_UNUSED(ret); - - if (g.DragDropAcceptIdPrev && (g.DragDropAcceptFlags & ImGuiDragDropFlags_AcceptNoPreviewTooltip)) - SetWindowHiddendAndSkipItemsForCurrentFrame(g.CurrentWindow); } if (!(flags & ImGuiDragDropFlags_SourceNoDisableHover) && !(flags & ImGuiDragDropFlags_SourceExtern)) @@ -13250,13 +13729,14 @@ bool ImGui::BeginDragDropTargetCustom(const ImRect& bb, ImGuiID id) IM_ASSERT(g.DragDropWithinTarget == false); g.DragDropTargetRect = bb; + g.DragDropTargetClipRect = window->ClipRect; // May want to be overriden by user depending on use case? g.DragDropTargetId = id; g.DragDropWithinTarget = true; return true; } // We don't use BeginDragDropTargetCustom() and duplicate its code because: -// 1) we use LastItemRectHoveredRect which handles items that push a temporarily clip rectangle in their code. Calling BeginDragDropTargetCustom(LastItemRect) would not handle them. +// 1) we use LastItemData's ImGuiItemStatusFlags_HoveredRect which handles items that push a temporarily clip rectangle in their code. Calling BeginDragDropTargetCustom(LastItemRect) would not handle them. // 2) and it's faster. as this code may be very frequently called, we want to early out as fast as we can. // Also note how the HoveredWindow test is positioned differently in both functions (in both functions we optimize for the cheapest early out case) bool ImGui::BeginDragDropTarget() @@ -13284,6 +13764,7 @@ bool ImGui::BeginDragDropTarget() IM_ASSERT(g.DragDropWithinTarget == false); g.DragDropTargetRect = display_rect; + g.DragDropTargetClipRect = (g.LastItemData.StatusFlags & ImGuiItemStatusFlags_HasClipRect) ? g.LastItemData.ClipRect : window->ClipRect; g.DragDropTargetId = id; g.DragDropWithinTarget = true; return true; @@ -13298,7 +13779,6 @@ bool ImGui::IsDragDropPayloadBeingAccepted() const ImGuiPayload* ImGui::AcceptDragDropPayload(const char* type, ImGuiDragDropFlags flags) { ImGuiContext& g = *GImGui; - ImGuiWindow* window = g.CurrentWindow; ImGuiPayload& payload = g.DragDropPayload; IM_ASSERT(g.DragDropActive); // Not called between BeginDragDropTarget() and EndDragDropTarget() ? IM_ASSERT(payload.DataFrameCount != -1); // Forgot to call EndDragDropTarget() ? @@ -13322,7 +13802,7 @@ const ImGuiPayload* ImGui::AcceptDragDropPayload(const char* type, ImGuiDragDrop payload.Preview = was_accepted_previously; flags |= (g.DragDropSourceFlags & ImGuiDragDropFlags_AcceptNoDrawDefaultRect); // Source can also inhibit the preview (useful for external sources that live for 1 frame) if (!(flags & ImGuiDragDropFlags_AcceptNoDrawDefaultRect) && payload.Preview) - window->DrawList->AddRect(r.Min - ImVec2(3.5f,3.5f), r.Max + ImVec2(3.5f, 3.5f), GetColorU32(ImGuiCol_DragDropTarget), 0.0f, 0, 2.0f); + RenderDragDropTargetRect(r, g.DragDropTargetClipRect); g.DragDropAcceptFrameCount = g.FrameCount; payload.Delivery = was_accepted_previously && !IsMouseDown(g.DragDropMouseButton); // For extern drag sources affecting OS window focus, it's easier to just test !IsMouseDown() instead of IsMouseReleased() @@ -13333,10 +13813,20 @@ const ImGuiPayload* ImGui::AcceptDragDropPayload(const char* type, ImGuiDragDrop return &payload; } -// FIXME-DRAGDROP: Settle on a proper default visuals for drop target. -void ImGui::RenderDragDropTargetRect(const ImRect& bb) +// FIXME-STYLE FIXME-DRAGDROP: Settle on a proper default visuals for drop target. +void ImGui::RenderDragDropTargetRect(const ImRect& bb, const ImRect& item_clip_rect) { - GetWindowDrawList()->AddRect(bb.Min - ImVec2(3.5f, 3.5f), bb.Max + ImVec2(3.5f, 3.5f), GetColorU32(ImGuiCol_DragDropTarget), 0.0f, 0, 2.0f); + ImGuiContext& g = *GImGui; + ImGuiWindow* window = g.CurrentWindow; + ImRect bb_display = bb; + bb_display.ClipWith(item_clip_rect); // Clip THEN expand so we have a way to visualize that target is not entirely visible. + bb_display.Expand(3.5f); + bool push_clip_rect = !window->ClipRect.Contains(bb_display); + if (push_clip_rect) + window->DrawList->PushClipRectFullScreen(); + window->DrawList->AddRect(bb_display.Min, bb_display.Max, GetColorU32(ImGuiCol_DragDropTarget), 0.0f, 0, 2.0f); + if (push_clip_rect) + window->DrawList->PopClipRect(); } const ImGuiPayload* ImGui::GetDragDropPayload() @@ -13905,6 +14395,7 @@ static void WindowSettingsHandler_ReadLine(ImGuiContext*, ImGuiSettingsHandler*, else if (sscanf(line, "ViewportId=0x%08X", &u1) == 1) { settings->ViewportId = u1; } else if (sscanf(line, "ViewportPos=%i,%i", &x, &y) == 2){ settings->ViewportPos = ImVec2ih((short)x, (short)y); } else if (sscanf(line, "Collapsed=%d", &i) == 1) { settings->Collapsed = (i != 0); } + else if (sscanf(line, "IsChild=%d", &i) == 1) { settings->IsChild = (i != 0); } else if (sscanf(line, "DockId=0x%X,%d", &u1, &i) == 2) { settings->DockId = u1; settings->DockOrder = (short)i; } else if (sscanf(line, "DockId=0x%X", &u1) == 1) { settings->DockId = u1; settings->DockOrder = -1; } else if (sscanf(line, "ClassId=0x%X", &u1) == 1) { settings->ClassId = u1; } @@ -13949,6 +14440,7 @@ static void WindowSettingsHandler_WriteAll(ImGuiContext* ctx, ImGuiSettingsHandl settings->ClassId = window->WindowClass.ClassId; settings->DockOrder = window->DockOrder; settings->Collapsed = window->Collapsed; + settings->IsChild = (window->RootWindow != window); // Cannot rely on ImGuiWindowFlags_ChildWindow here as docked windows have this set. settings->WantDelete = false; } @@ -13960,25 +14452,33 @@ static void WindowSettingsHandler_WriteAll(ImGuiContext* ctx, ImGuiSettingsHandl continue; const char* settings_name = settings->GetName(); buf->appendf("[%s][%s]\n", handler->TypeName, settings_name); - if (settings->ViewportId != 0 && settings->ViewportId != ImGui::IMGUI_VIEWPORT_DEFAULT_ID) + if (settings->IsChild) { - buf->appendf("ViewportPos=%d,%d\n", settings->ViewportPos.x, settings->ViewportPos.y); - buf->appendf("ViewportId=0x%08X\n", settings->ViewportId); - } - if (settings->Pos.x != 0 || settings->Pos.y != 0 || settings->ViewportId == ImGui::IMGUI_VIEWPORT_DEFAULT_ID) - buf->appendf("Pos=%d,%d\n", settings->Pos.x, settings->Pos.y); - if (settings->Size.x != 0 || settings->Size.y != 0) + buf->appendf("IsChild=1\n"); buf->appendf("Size=%d,%d\n", settings->Size.x, settings->Size.y); - buf->appendf("Collapsed=%d\n", settings->Collapsed); - if (settings->DockId != 0) + } + else { - //buf->appendf("TabId=0x%08X\n", ImHashStr("#TAB", 4, settings->ID)); // window->TabId: this is not read back but writing it makes "debugging" the .ini data easier. - if (settings->DockOrder == -1) - buf->appendf("DockId=0x%08X\n", settings->DockId); - else - buf->appendf("DockId=0x%08X,%d\n", settings->DockId, settings->DockOrder); - if (settings->ClassId != 0) - buf->appendf("ClassId=0x%08X\n", settings->ClassId); + if (settings->ViewportId != 0 && settings->ViewportId != ImGui::IMGUI_VIEWPORT_DEFAULT_ID) + { + buf->appendf("ViewportPos=%d,%d\n", settings->ViewportPos.x, settings->ViewportPos.y); + buf->appendf("ViewportId=0x%08X\n", settings->ViewportId); + } + if (settings->Pos.x != 0 || settings->Pos.y != 0 || settings->ViewportId == ImGui::IMGUI_VIEWPORT_DEFAULT_ID) + buf->appendf("Pos=%d,%d\n", settings->Pos.x, settings->Pos.y); + if (settings->Size.x != 0 || settings->Size.y != 0) + buf->appendf("Size=%d,%d\n", settings->Size.x, settings->Size.y); + buf->appendf("Collapsed=%d\n", settings->Collapsed); + if (settings->DockId != 0) + { + //buf->appendf("TabId=0x%08X\n", ImHashStr("#TAB", 4, settings->ID)); // window->TabId: this is not read back but writing it makes "debugging" the .ini data easier. + if (settings->DockOrder == -1) + buf->appendf("DockId=0x%08X\n", settings->DockId); + else + buf->appendf("DockId=0x%08X,%d\n", settings->DockId, settings->DockOrder); + if (settings->ClassId != 0) + buf->appendf("ClassId=0x%08X\n", settings->ClassId); + } } buf->append("\n"); } @@ -14343,12 +14843,13 @@ static void ImGui::UpdateViewportsNewFrame() // FIXME-VIEWPORT: This currently creates a resizing feedback loop when a window is straddling a DPI transition border. // (Minor: since our sizes do not perfectly linearly scale, deferring the click offset scale until we know the actual window scale ratio may get us slightly more precise mouse positioning.) //if (g.MovingWindow != NULL && g.MovingWindow->Viewport == viewport) - // g.ActiveIdClickOffset = ImFloor(g.ActiveIdClickOffset * scale_factor); + // g.ActiveIdClickOffset = ImTrunc(g.ActiveIdClickOffset * scale_factor); } viewport->DpiScale = new_dpi_scale; } // Update fallback monitor + g.PlatformMonitorsFullWorkRect = ImRect(+FLT_MAX, +FLT_MAX, -FLT_MAX, -FLT_MAX); if (g.PlatformIO.Monitors.Size == 0) { ImGuiPlatformMonitor* monitor = &g.FallbackMonitor; @@ -14357,6 +14858,13 @@ static void ImGui::UpdateViewportsNewFrame() monitor->WorkPos = main_viewport->WorkPos; monitor->WorkSize = main_viewport->WorkSize; monitor->DpiScale = main_viewport->DpiScale; + g.PlatformMonitorsFullWorkRect.Add(monitor->WorkPos); + g.PlatformMonitorsFullWorkRect.Add(monitor->WorkPos + monitor->WorkSize); + } + for (ImGuiPlatformMonitor& monitor : g.PlatformIO.Monitors) + { + g.PlatformMonitorsFullWorkRect.Add(monitor.WorkPos); + g.PlatformMonitorsFullWorkRect.Add(monitor.WorkPos + monitor.WorkSize); } if (!viewports_enabled) @@ -15022,7 +15530,7 @@ void ImGui::DestroyPlatformWindows() // | - draw node background // | - DockNodeUpdateTabBar() - create/update tab bar for a docking node // | - DockNodeAddTabBar() -// | - DockNodeUpdateWindowMenu() +// | - DockNodeWindowMenuUpdate() // | - DockNodeCalcTabBarLayout() // | - BeginTabBarEx() // | - TabItemEx() calls @@ -15229,7 +15737,7 @@ void ImGui::DockContextInitialize(ImGuiContext* ctx) void ImGui::DockContextShutdown(ImGuiContext* ctx) { - ImGuiDockContext* dc = &ctx->DockContext; + ImGuiDockContext* dc = &ctx->DockContext; for (int n = 0; n < dc->Nodes.Data.Size; n++) if (ImGuiDockNode* node = (ImGuiDockNode*)dc->Nodes.Data[n].val_p) IM_DELETE(node); @@ -15304,7 +15812,7 @@ void ImGui::DockContextNewFrameUpdateUndocking(ImGuiContext* ctx) void ImGui::DockContextNewFrameUpdateDocking(ImGuiContext* ctx) { ImGuiContext& g = *ctx; - ImGuiDockContext* dc = &ctx->DockContext; + ImGuiDockContext* dc = &ctx->DockContext; if (!(g.IO.ConfigFlags & ImGuiConfigFlags_DockingEnable)) return; @@ -15385,7 +15893,7 @@ static ImGuiDockNode* ImGui::DockContextAddNode(ImGuiContext* ctx, ImGuiID id) static void ImGui::DockContextRemoveNode(ImGuiContext* ctx, ImGuiDockNode* node, bool merge_sibling_into_parent_node) { ImGuiContext& g = *ctx; - ImGuiDockContext* dc = &ctx->DockContext; + ImGuiDockContext* dc = &ctx->DockContext; IMGUI_DEBUG_LOG_DOCKING("[docking] DockContextRemoveNode 0x%08X\n", node->ID); IM_ASSERT(DockContextFindNodeByID(ctx, node->ID) == node); @@ -15432,7 +15940,7 @@ struct ImGuiDockContextPruneNodeData static void ImGui::DockContextPruneUnusedSettingsNodes(ImGuiContext* ctx) { ImGuiContext& g = *ctx; - ImGuiDockContext* dc = &ctx->DockContext; + ImGuiDockContext* dc = &ctx->DockContext; IM_ASSERT(g.Windows.Size == 0); ImPool pool; @@ -15586,7 +16094,7 @@ void ImGui::DockContextQueueUndockNode(ImGuiContext* ctx, ImGuiDockNode* node) void ImGui::DockContextQueueNotifyRemovedNode(ImGuiContext* ctx, ImGuiDockNode* node) { - ImGuiDockContext* dc = &ctx->DockContext; + ImGuiDockContext* dc = &ctx->DockContext; for (ImGuiDockRequest& req : dc->Requests) if (req.DockTargetNode == node) req.Type = ImGuiDockRequestType_None; @@ -15744,11 +16252,11 @@ static ImVec2 FixLargeWindowsWhenUndocking(const ImVec2& size, ImGuiViewport* re return size; ImGuiContext& g = *GImGui; - ImVec2 max_size = ImFloor(ref_viewport->WorkSize * 0.90f); + ImVec2 max_size = ImTrunc(ref_viewport->WorkSize * 0.90f); if (g.ConfigFlagsCurrFrame & ImGuiConfigFlags_ViewportsEnable) { const ImGuiPlatformMonitor* monitor = ImGui::GetViewportPlatformMonitor(ref_viewport); - max_size = ImFloor(monitor->WorkSize * 0.90f); + max_size = ImTrunc(monitor->WorkSize * 0.90f); } return ImMin(size, max_size); } @@ -16644,6 +17152,7 @@ static int IMGUI_CDECL TabItemComparerByDockOrder(const void* lhs, const void* r // This is exceptionally stored in a function pointer to also user applications to tweak this menu (undocumented) // Custom overrides may want to decorate, group, sort entries. // Please note those are internal structures: if you copy this expect occasional breakage. +// (if you don't need to modify the "Tabs.Size == 1" behavior/path it is recommend you call this function in your handler) void ImGui::DockNodeWindowMenuHandler_Default(ImGuiContext* ctx, ImGuiDockNode* node, ImGuiTabBar* tab_bar) { IM_UNUSED(ctx); @@ -16692,6 +17201,8 @@ bool ImGui::DockNodeBeginAmendTabBar(ImGuiDockNode* node) return false; if (node->MergedFlags & ImGuiDockNodeFlags_KeepAliveOnly) return false; + if (node->TabBar->ID == 0) + return false; Begin(node->HostWindow->Name); PushOverrideID(node->ID); bool ret = BeginTabBarEx(node->TabBar, node->TabBar->BarRect, node->TabBar->Flags); @@ -16831,6 +17342,8 @@ static void ImGui::DockNodeUpdateTabBar(ImGuiDockNode* node, ImGuiWindow* host_w OpenPopup("#WindowMenu"); if (IsItemActive()) focus_tab_id = tab_bar->SelectedTabId; + if (IsItemHovered(ImGuiHoveredFlags_ForTooltip | ImGuiHoveredFlags_DelayNormal) && g.HoveredIdTimer > 0.5f) + SetTooltip("%s", LocalizeGetMsg(ImGuiLocKey_DockingDragToUndockOrMoveNode)); } // If multiple tabs are appearing on the same frame, sort them based on their persistent DockOrder value @@ -16959,7 +17472,7 @@ static void ImGui::DockNodeUpdateTabBar(ImGuiDockNode* node, ImGuiWindow* host_w ImGuiID title_bar_id = host_window->GetID("#TITLEBAR"); if (g.HoveredId == 0 || g.HoveredId == title_bar_id || g.ActiveId == title_bar_id) { - // AllowItem mode required for appending into dock node tab bar, + // AllowOverlap mode required for appending into dock node tab bar, // otherwise dragging window will steal HoveredId and amended tabs cannot get them. bool held; KeepAliveID(title_bar_id); @@ -16975,7 +17488,7 @@ static void ImGui::DockNodeUpdateTabBar(ImGuiDockNode* node, ImGuiWindow* host_w // Forward moving request to selected window if (ImGuiTabItem* tab = TabBarFindTabByID(tab_bar, tab_bar->SelectedTabId)) - StartMouseMovingWindowOrNode(tab->Window ? tab->Window : node->HostWindow, node, false); + StartMouseMovingWindowOrNode(tab->Window ? tab->Window : node->HostWindow, node, false); // Undock from tab bar empty space } } @@ -17031,11 +17544,13 @@ static bool DockNodeIsDropAllowedOne(ImGuiWindow* payload, ImGuiWindow* host_win ImGuiWindowClass* payload_class = &payload->WindowClass; if (host_class->ClassId != payload_class->ClassId) { + bool pass = false; if (host_class->ClassId != 0 && host_class->DockingAllowUnclassed && payload_class->ClassId == 0) - return true; + pass = true; if (payload_class->ClassId != 0 && payload_class->DockingAllowUnclassed && host_class->ClassId == 0) - return true; - return false; + pass = true; + if (!pass) + return false; } // Prevent docking any window created above a popup @@ -17115,12 +17630,12 @@ void ImGui::DockNodeCalcSplitRects(ImVec2& pos_old, ImVec2& size_old, ImVec2& po if (size_new_desired[axis] > 0.0f && size_new_desired[axis] <= w_avail * 0.5f) { size_new[axis] = size_new_desired[axis]; - size_old[axis] = IM_FLOOR(w_avail - size_new[axis]); + size_old[axis] = IM_TRUNC(w_avail - size_new[axis]); } else { - size_new[axis] = IM_FLOOR(w_avail * 0.5f); - size_old[axis] = IM_FLOOR(w_avail - size_new[axis]); + size_new[axis] = IM_TRUNC(w_avail * 0.5f); + size_old[axis] = IM_TRUNC(w_avail - size_new[axis]); } // Position each node @@ -17147,21 +17662,21 @@ bool ImGui::DockNodeCalcDropRectsAndTestMousePos(const ImRect& parent, ImGuiDir ImVec2 off; // Distance from edge or center if (outer_docking) { - //hs_w = ImFloor(ImClamp(parent_smaller_axis - hs_for_central_nodes * 4.0f, g.FontSize * 0.5f, g.FontSize * 8.0f)); - //hs_h = ImFloor(hs_w * 0.15f); - //off = ImVec2(ImFloor(parent.GetWidth() * 0.5f - GetFrameHeightWithSpacing() * 1.4f - hs_h), ImFloor(parent.GetHeight() * 0.5f - GetFrameHeightWithSpacing() * 1.4f - hs_h)); - hs_w = ImFloor(hs_for_central_nodes * 1.50f); - hs_h = ImFloor(hs_for_central_nodes * 0.80f); - off = ImVec2(ImFloor(parent.GetWidth() * 0.5f - hs_h), ImFloor(parent.GetHeight() * 0.5f - hs_h)); + //hs_w = ImTrunc(ImClamp(parent_smaller_axis - hs_for_central_nodes * 4.0f, g.FontSize * 0.5f, g.FontSize * 8.0f)); + //hs_h = ImTrunc(hs_w * 0.15f); + //off = ImVec2(ImTrunc(parent.GetWidth() * 0.5f - GetFrameHeightWithSpacing() * 1.4f - hs_h), ImTrunc(parent.GetHeight() * 0.5f - GetFrameHeightWithSpacing() * 1.4f - hs_h)); + hs_w = ImTrunc(hs_for_central_nodes * 1.50f); + hs_h = ImTrunc(hs_for_central_nodes * 0.80f); + off = ImTrunc(ImVec2(parent.GetWidth() * 0.5f - hs_h, parent.GetHeight() * 0.5f - hs_h)); } else { - hs_w = ImFloor(hs_for_central_nodes); - hs_h = ImFloor(hs_for_central_nodes * 0.90f); - off = ImVec2(ImFloor(hs_w * 2.40f), ImFloor(hs_w * 2.40f)); + hs_w = ImTrunc(hs_for_central_nodes); + hs_h = ImTrunc(hs_for_central_nodes * 0.90f); + off = ImTrunc(ImVec2(hs_w * 2.40f, hs_w * 2.40f)); } - ImVec2 c = ImFloor(parent.GetCenter()); + ImVec2 c = ImTrunc(parent.GetCenter()); if (dir == ImGuiDir_None) { out_r = ImRect(c.x - hs_w, c.y - hs_w, c.x + hs_w, c.y + hs_w); } else if (dir == ImGuiDir_Up) { out_r = ImRect(c.x - hs_w, c.y - off.y - hs_h, c.x + hs_w, c.y - off.y + hs_h); } else if (dir == ImGuiDir_Down) { out_r = ImRect(c.x - hs_w, c.y + off.y - hs_h, c.x + hs_w, c.y + off.y + hs_h); } @@ -17175,7 +17690,7 @@ bool ImGui::DockNodeCalcDropRectsAndTestMousePos(const ImRect& parent, ImGuiDir if (!outer_docking) { // Custom hit testing for the 5-way selection, designed to reduce flickering when moving diagonally between sides - hit_r.Expand(ImFloor(hs_w * 0.30f)); + hit_r.Expand(ImTrunc(hs_w * 0.30f)); ImVec2 mouse_delta = (*test_mouse_pos - c); float mouse_delta_len2 = ImLengthSqr(mouse_delta); float r_threshold_center = hs_w * 1.4f; @@ -17428,8 +17943,8 @@ void ImGui::DockNodeTreeSplit(ImGuiContext* ctx, ImGuiDockNode* parent_node, ImG size_avail = ImMax(size_avail, g.Style.WindowMinSize[split_axis] * 2.0f); IM_ASSERT(size_avail > 0.0f); // If you created a node manually with DockBuilderAddNode(), you need to also call DockBuilderSetNodeSize() before splitting. child_0->SizeRef = child_1->SizeRef = parent_node->Size; - child_0->SizeRef[split_axis] = ImFloor(size_avail * split_ratio); - child_1->SizeRef[split_axis] = ImFloor(size_avail - child_0->SizeRef[split_axis]); + child_0->SizeRef[split_axis] = ImTrunc(size_avail * split_ratio); + child_1->SizeRef[split_axis] = ImTrunc(size_avail - child_0->SizeRef[split_axis]); DockNodeMoveWindows(parent_node->ChildNodes[split_inheritor_child_idx], parent_node); DockSettingsRenameNodeReferences(parent_node->ID, parent_node->ChildNodes[split_inheritor_child_idx]->ID); @@ -17534,10 +18049,10 @@ void ImGui::DockNodeTreeUpdatePosSize(ImGuiDockNode* node, ImVec2 pos, ImVec2 si // Size allocation policy // 1) The first 0..WindowMinSize[axis]*2 are allocated evenly to both windows. - const float size_min_each = ImFloor(ImMin(size_avail, g.Style.WindowMinSize[axis] * 2.0f) * 0.5f); + const float size_min_each = ImTrunc(ImMin(size_avail, g.Style.WindowMinSize[axis] * 2.0f) * 0.5f); // FIXME: Blocks 2) and 3) are essentially doing nearly the same thing. - // Difference are: write-back to SizeRef; application of a minimum size; rounding before ImFloor() + // Difference are: write-back to SizeRef; application of a minimum size; rounding before ImTrunc() // Clarify and rework differences between Size & SizeRef and purpose of WantLockSizeOnce // 2) Process locked absolute size (during a splitter resize we preserve the child of nodes not touching the splitter edge) @@ -17558,7 +18073,7 @@ void ImGui::DockNodeTreeUpdatePosSize(ImGuiDockNode* node, ImVec2 pos, ImVec2 si // FIXME-DOCK: We cannot honor the requested size, so apply ratio. // Currently this path will only be taken if code programmatically sets WantLockSizeOnce float split_ratio = child_0_size[axis] / (child_0_size[axis] + child_1_size[axis]); - child_0_size[axis] = child_0->SizeRef[axis] = ImFloor(size_avail * split_ratio); + child_0_size[axis] = child_0->SizeRef[axis] = ImTrunc(size_avail * split_ratio); child_1_size[axis] = child_1->SizeRef[axis] = (size_avail - child_0_size[axis]); IM_ASSERT(child_0->SizeRef[axis] > 0.0f && child_1->SizeRef[axis] > 0.0f); } @@ -17578,7 +18093,7 @@ void ImGui::DockNodeTreeUpdatePosSize(ImGuiDockNode* node, ImVec2 pos, ImVec2 si { // 4) Otherwise distribute according to the relative ratio of each SizeRef value float split_ratio = child_0->SizeRef[axis] / (child_0->SizeRef[axis] + child_1->SizeRef[axis]); - child_0_size[axis] = ImMax(size_min_each, ImFloor(size_avail * split_ratio + 0.5f)); + child_0_size[axis] = ImMax(size_min_each, ImTrunc(size_avail * split_ratio + 0.5f)); child_1_size[axis] = (size_avail - child_0_size[axis]); } @@ -17783,8 +18298,8 @@ void ImGui::SetWindowDock(ImGuiWindow* window, ImGuiID dock_id, ImGuiCond cond) return; // If the user attempt to set a dock id that is a split node, we'll dig within to find a suitable docking spot - ImGuiContext* ctx = GImGui; - if (ImGuiDockNode* new_node = DockContextFindNodeByID(ctx, dock_id)) + ImGuiContext& g = *GImGui; + if (ImGuiDockNode* new_node = DockContextFindNodeByID(&g, dock_id)) if (new_node->IsSplitNode()) { // Policy: Find central node or latest focused node. We first move back to our root node. @@ -17814,8 +18329,7 @@ void ImGui::SetWindowDock(ImGuiWindow* window, ImGuiID dock_id, ImGuiCond cond) // When ImGuiDockNodeFlags_KeepAliveOnly is set, nothing is submitted in the current window (function may be called from any location). ImGuiID ImGui::DockSpace(ImGuiID id, const ImVec2& size_arg, ImGuiDockNodeFlags flags, const ImGuiWindowClass* window_class) { - ImGuiContext* ctx = GImGui; - ImGuiContext& g = *ctx; + ImGuiContext& g = *GImGui; ImGuiWindow* window = GetCurrentWindowRead(); if (!(g.IO.ConfigFlags & ImGuiConfigFlags_DockingEnable)) return 0; @@ -17830,11 +18344,11 @@ ImGuiID ImGui::DockSpace(ImGuiID id, const ImVec2& size_arg, ImGuiDockNodeFlags IM_ASSERT((flags & ImGuiDockNodeFlags_DockSpace) == 0); IM_ASSERT(id != 0); - ImGuiDockNode* node = DockContextFindNodeByID(ctx, id); + ImGuiDockNode* node = DockContextFindNodeByID(&g, id); if (!node) { IMGUI_DEBUG_LOG_DOCKING("[docking] DockSpace: dockspace node 0x%08X created\n", id); - node = DockContextAddNode(ctx, id); + node = DockContextAddNode(&g, id); node->SetLocalFlags(ImGuiDockNodeFlags_CentralNode); } if (window_class && window_class->ClassId != node->WindowClass.ClassId) @@ -17860,7 +18374,7 @@ ImGuiID ImGui::DockSpace(ImGuiID id, const ImVec2& size_arg, ImGuiDockNodeFlags } const ImVec2 content_avail = GetContentRegionAvail(); - ImVec2 size = ImFloor(size_arg); + ImVec2 size = ImTrunc(size_arg); if (size.x <= 0.0f) size.x = ImMax(content_avail.x + size.x, 4.0f); // Arbitrary minimum child size (0.0f causing too much issues) if (size.y <= 0.0f) @@ -18003,14 +18517,14 @@ void ImGui::DockBuilderDockWindow(const char* window_name, ImGuiID node_id) ImGuiDockNode* ImGui::DockBuilderGetNode(ImGuiID node_id) { - ImGuiContext* ctx = GImGui; - return DockContextFindNodeByID(ctx, node_id); + ImGuiContext& g = *GImGui; + return DockContextFindNodeByID(&g, node_id); } void ImGui::DockBuilderSetNodePos(ImGuiID node_id, ImVec2 pos) { - ImGuiContext* ctx = GImGui; - ImGuiDockNode* node = DockContextFindNodeByID(ctx, node_id); + ImGuiContext& g = *GImGui; + ImGuiDockNode* node = DockContextFindNodeByID(&g, node_id); if (node == NULL) return; node->Pos = pos; @@ -18019,8 +18533,8 @@ void ImGui::DockBuilderSetNodePos(ImGuiID node_id, ImVec2 pos) void ImGui::DockBuilderSetNodeSize(ImGuiID node_id, ImVec2 size) { - ImGuiContext* ctx = GImGui; - ImGuiDockNode* node = DockContextFindNodeByID(ctx, node_id); + ImGuiContext& g = *GImGui; + ImGuiDockNode* node = DockContextFindNodeByID(&g, node_id); if (node == NULL) return; IM_ASSERT(size.x > 0.0f && size.y > 0.0f); @@ -18037,8 +18551,7 @@ void ImGui::DockBuilderSetNodeSize(ImGuiID node_id, ImVec2 size) // - Existing node with a same id will be removed. ImGuiID ImGui::DockBuilderAddNode(ImGuiID node_id, ImGuiDockNodeFlags flags) { - ImGuiContext* ctx = GImGui; - ImGuiContext& g = *ctx; IM_UNUSED(g); + ImGuiContext& g = *GImGui; IM_UNUSED(g); IMGUI_DEBUG_LOG_DOCKING("[docking] DockBuilderAddNode 0x%08X flags=%08X\n", node_id, flags); if (node_id != 0) @@ -18048,44 +18561,43 @@ ImGuiID ImGui::DockBuilderAddNode(ImGuiID node_id, ImGuiDockNodeFlags flags) if (flags & ImGuiDockNodeFlags_DockSpace) { DockSpace(node_id, ImVec2(0, 0), (flags & ~ImGuiDockNodeFlags_DockSpace) | ImGuiDockNodeFlags_KeepAliveOnly); - node = DockContextFindNodeByID(ctx, node_id); + node = DockContextFindNodeByID(&g, node_id); } else { - node = DockContextAddNode(ctx, node_id); + node = DockContextAddNode(&g, node_id); node->SetLocalFlags(flags); } - node->LastFrameAlive = ctx->FrameCount; // Set this otherwise BeginDocked will undock during the same frame. + node->LastFrameAlive = g.FrameCount; // Set this otherwise BeginDocked will undock during the same frame. return node->ID; } void ImGui::DockBuilderRemoveNode(ImGuiID node_id) { - ImGuiContext* ctx = GImGui; - ImGuiContext& g = *ctx; IM_UNUSED(g); + ImGuiContext& g = *GImGui; IM_UNUSED(g); IMGUI_DEBUG_LOG_DOCKING("[docking] DockBuilderRemoveNode 0x%08X\n", node_id); - ImGuiDockNode* node = DockContextFindNodeByID(ctx, node_id); + ImGuiDockNode* node = DockContextFindNodeByID(&g, node_id); if (node == NULL) return; DockBuilderRemoveNodeDockedWindows(node_id, true); DockBuilderRemoveNodeChildNodes(node_id); // Node may have moved or deleted if e.g. any merge happened - node = DockContextFindNodeByID(ctx, node_id); + node = DockContextFindNodeByID(&g, node_id); if (node == NULL) return; if (node->IsCentralNode() && node->ParentNode) node->ParentNode->SetLocalFlags(node->ParentNode->LocalFlags | ImGuiDockNodeFlags_CentralNode); - DockContextRemoveNode(ctx, node, true); + DockContextRemoveNode(&g, node, true); } // root_id = 0 to remove all, root_id != 0 to remove child of given node. void ImGui::DockBuilderRemoveNodeChildNodes(ImGuiID root_id) { - ImGuiContext* ctx = GImGui; - ImGuiDockContext* dc = &ctx->DockContext; + ImGuiContext& g = *GImGui; + ImGuiDockContext* dc = &g.DockContext; - ImGuiDockNode* root_node = root_id ? DockContextFindNodeByID(ctx, root_id) : NULL; + ImGuiDockNode* root_node = root_id ? DockContextFindNodeByID(&g, root_id) : NULL; if (root_id && root_node == NULL) return; bool has_central_node = false; @@ -18104,7 +18616,7 @@ void ImGui::DockBuilderRemoveNodeChildNodes(ImGuiID root_id) if (node->IsCentralNode()) has_central_node = true; if (root_id != 0) - DockContextQueueNotifyRemovedNode(ctx, node); + DockContextQueueNotifyRemovedNode(&g, node); if (root_node) { DockNodeMoveWindows(root_node, node); @@ -18123,7 +18635,7 @@ void ImGui::DockBuilderRemoveNodeChildNodes(ImGuiID root_id) } // Apply to settings - for (ImGuiWindowSettings* settings = ctx->SettingsWindows.begin(); settings != NULL; settings = ctx->SettingsWindows.next_chunk(settings)) + for (ImGuiWindowSettings* settings = g.SettingsWindows.begin(); settings != NULL; settings = g.SettingsWindows.next_chunk(settings)) if (ImGuiID window_settings_dock_id = settings->DockId) for (int n = 0; n < nodes_to_remove.Size; n++) if (nodes_to_remove[n]->ID == window_settings_dock_id) @@ -18136,7 +18648,7 @@ void ImGui::DockBuilderRemoveNodeChildNodes(ImGuiID root_id) if (nodes_to_remove.Size > 1) ImQsort(nodes_to_remove.Data, nodes_to_remove.Size, sizeof(ImGuiDockNode*), DockNodeComparerDepthMostFirst); for (int n = 0; n < nodes_to_remove.Size; n++) - DockContextRemoveNode(ctx, nodes_to_remove[n], false); + DockContextRemoveNode(&g, nodes_to_remove[n], false); if (root_id == 0) { @@ -18153,15 +18665,14 @@ void ImGui::DockBuilderRemoveNodeChildNodes(ImGuiID root_id) void ImGui::DockBuilderRemoveNodeDockedWindows(ImGuiID root_id, bool clear_settings_refs) { // Clear references in settings - ImGuiContext* ctx = GImGui; - ImGuiContext& g = *ctx; + ImGuiContext& g = *GImGui; if (clear_settings_refs) { for (ImGuiWindowSettings* settings = g.SettingsWindows.begin(); settings != NULL; settings = g.SettingsWindows.next_chunk(settings)) { bool want_removal = (root_id == 0) || (settings->DockId == root_id); if (!want_removal && settings->DockId != 0) - if (ImGuiDockNode* node = DockContextFindNodeByID(ctx, settings->DockId)) + if (ImGuiDockNode* node = DockContextFindNodeByID(&g, settings->DockId)) if (DockNodeGetRootNode(node)->ID == root_id) want_removal = true; if (want_removal) @@ -18178,7 +18689,7 @@ void ImGui::DockBuilderRemoveNodeDockedWindows(ImGuiID root_id, bool clear_setti { const ImGuiID backup_dock_id = window->DockId; IM_UNUSED(backup_dock_id); - DockContextProcessUndockWindow(ctx, window, clear_settings_refs); + DockContextProcessUndockWindow(&g, window, clear_settings_refs); if (!clear_settings_refs) IM_ASSERT(window->DockId == backup_dock_id); } @@ -18251,14 +18762,14 @@ static ImGuiDockNode* DockBuilderCopyNodeRec(ImGuiDockNode* src_node, ImGuiID ds void ImGui::DockBuilderCopyNode(ImGuiID src_node_id, ImGuiID dst_node_id, ImVector* out_node_remap_pairs) { - ImGuiContext* ctx = GImGui; + ImGuiContext& g = *GImGui; IM_ASSERT(src_node_id != 0); IM_ASSERT(dst_node_id != 0); IM_ASSERT(out_node_remap_pairs != NULL); DockBuilderRemoveNode(dst_node_id); - ImGuiDockNode* src_node = DockContextFindNodeByID(ctx, src_node_id); + ImGuiDockNode* src_node = DockContextFindNodeByID(&g, src_node_id); IM_ASSERT(src_node != NULL); out_node_remap_pairs->clear(); @@ -18383,9 +18894,9 @@ void ImGui::DockBuilderCopyDockSpace(ImGuiID src_dockspace_id, ImGuiID dst_docks // FIXME-DOCK: This is awkward because in series of split user is likely to loose access to its root node. void ImGui::DockBuilderFinish(ImGuiID root_id) { - ImGuiContext* ctx = GImGui; - //DockContextRebuild(ctx); - DockContextBuildAddWindowsToNodes(ctx, root_id); + ImGuiContext& g = *GImGui; + //DockContextRebuild(&g); + DockContextBuildAddWindowsToNodes(&g, root_id); } //----------------------------------------------------------------------------- @@ -18453,8 +18964,7 @@ static ImGuiDockNode* ImGui::DockContextBindNodeToWindow(ImGuiContext* ctx, ImGu void ImGui::BeginDocked(ImGuiWindow* window, bool* p_open) { - ImGuiContext* ctx = GImGui; - ImGuiContext& g = *ctx; + ImGuiContext& g = *GImGui; // Clear fields ahead so most early-out paths don't have to do it window->DockIsActive = window->DockNodeIsVisible = window->DockTabIsVisible = false; @@ -18465,7 +18975,7 @@ void ImGui::BeginDocked(ImGuiWindow* window, bool* p_open) if (window->DockId == 0) { IM_ASSERT(window->DockNode == NULL); - window->DockId = DockContextGenNodeID(ctx); + window->DockId = DockContextGenNodeID(&g); } } else @@ -18476,7 +18986,7 @@ void ImGui::BeginDocked(ImGuiWindow* window, bool* p_open) want_undock |= (g.NextWindowData.Flags & ImGuiNextWindowDataFlags_HasPos) && (window->SetWindowPosAllowFlags & g.NextWindowData.PosCond) && g.NextWindowData.PosUndock; if (want_undock) { - DockContextProcessUndockWindow(ctx, window); + DockContextProcessUndockWindow(&g, window); return; } } @@ -18487,7 +18997,7 @@ void ImGui::BeginDocked(ImGuiWindow* window, bool* p_open) IM_ASSERT(window->DockId == node->ID); if (window->DockId != 0 && node == NULL) { - node = DockContextBindNodeToWindow(ctx, window); + node = DockContextBindNodeToWindow(&g, window); if (node == NULL) return; } @@ -18508,7 +19018,7 @@ void ImGui::BeginDocked(ImGuiWindow* window, bool* p_open) // If the window has been orphaned, transition the docknode to an implicit node processed in DockContextNewFrameUpdateDocking() ImGuiDockNode* root_node = DockNodeGetRootNode(node); if (root_node->LastFrameAlive < g.FrameCount) - DockContextProcessUndockWindow(ctx, window); + DockContextProcessUndockWindow(&g, window); else window->DockIsActive = true; return; @@ -18539,7 +19049,7 @@ void ImGui::BeginDocked(ImGuiWindow* window, bool* p_open) // Undock if we are submitted earlier than the host window if (!(node->MergedFlags & ImGuiDockNodeFlags_KeepAliveOnly) && window->BeginOrderWithinContext < node->HostWindow->BeginOrderWithinContext) { - DockContextProcessUndockWindow(ctx, window); + DockContextProcessUndockWindow(&g, window); return; } @@ -18559,7 +19069,8 @@ void ImGui::BeginDocked(ImGuiWindow* window, bool* p_open) // Update window flag IM_ASSERT((window->Flags & ImGuiWindowFlags_ChildWindow) == 0); - window->Flags |= ImGuiWindowFlags_ChildWindow | ImGuiWindowFlags_AlwaysUseWindowPadding | ImGuiWindowFlags_NoResize; + window->Flags |= ImGuiWindowFlags_ChildWindow | ImGuiWindowFlags_NoResize; + window->ChildFlags |= ImGuiChildFlags_AlwaysUseWindowPadding; if (node->IsHiddenTabBar() || node->IsNoTabBar()) window->Flags |= ImGuiWindowFlags_NoTitleBar; else @@ -18613,8 +19124,7 @@ void ImGui::BeginDockableDragDropSource(ImGuiWindow* window) void ImGui::BeginDockableDragDropTarget(ImGuiWindow* window) { - ImGuiContext* ctx = GImGui; - ImGuiContext& g = *ctx; + ImGuiContext& g = *GImGui; //IM_ASSERT(window->RootWindowDockTree == window); // May also be a DockSpace IM_ASSERT((window->Flags & ImGuiWindowFlags_NoDocking) == 0); @@ -18689,7 +19199,7 @@ void ImGui::BeginDockableDragDropTarget(ImGuiWindow* window) // Queue docking request if (split_data->IsDropAllowed && payload->IsDelivery()) - DockContextQueueDock(ctx, window, split_data->SplitNode, payload_window, split_data->SplitDir, split_data->SplitRatio, split_data == &split_outer); + DockContextQueueDock(&g, window, split_data->SplitNode, payload_window, split_data->SplitDir, split_data->SplitRatio, split_data == &split_outer); } } EndDragDropTarget(); @@ -18745,7 +19255,7 @@ static void ImGui::DockSettingsRemoveNodeReferences(ImGuiID* node_ids, int node_ static ImGuiDockNodeSettings* ImGui::DockSettingsFindNodeSettings(ImGuiContext* ctx, ImGuiID id) { // FIXME-OPT - ImGuiDockContext* dc = &ctx->DockContext; + ImGuiDockContext* dc = &ctx->DockContext; for (int n = 0; n < dc->NodesSettings.Size; n++) if (dc->NodesSettings[n].ID == id) return &dc->NodesSettings[n]; @@ -18755,7 +19265,7 @@ static ImGuiDockNodeSettings* ImGui::DockSettingsFindNodeSettings(ImGuiContext* // Clear settings data static void ImGui::DockSettingsHandler_ClearAll(ImGuiContext* ctx, ImGuiSettingsHandler*) { - ImGuiDockContext* dc = &ctx->DockContext; + ImGuiDockContext* dc = &ctx->DockContext; dc->NodesSettings.clear(); DockContextClearNodes(ctx, 0, true); } @@ -18764,7 +19274,7 @@ static void ImGui::DockSettingsHandler_ClearAll(ImGuiContext* ctx, ImGuiSettings static void ImGui::DockSettingsHandler_ApplyAll(ImGuiContext* ctx, ImGuiSettingsHandler*) { // Prune settings at boot time only - ImGuiDockContext* dc = &ctx->DockContext; + ImGuiDockContext* dc = &ctx->DockContext; if (ctx->Windows.Size == 0) DockContextPruneUnusedSettingsNodes(ctx); DockContextBuildNodesFromSettings(ctx, dc->NodesSettings.Data, dc->NodesSettings.Size); @@ -19090,7 +19600,7 @@ static void SetPlatformImeDataFn_DefaultImpl(ImGuiViewport*, ImGuiPlatformImeDat //----------------------------------------------------------------------------- // [SECTION] METRICS/DEBUGGER WINDOW //----------------------------------------------------------------------------- -// - RenderViewportThumbnail() [Internal] +// - DebugRenderViewportThumbnail() [Internal] // - RenderViewportsThumbnails() [Internal] // - DebugTextEncoding() // - MetricsHelpMarker() [Internal] @@ -19131,8 +19641,8 @@ void ImGui::DebugRenderViewportThumbnail(ImDrawList* draw_list, ImGuiViewportP* ImRect thumb_r = thumb_window->Rect(); ImRect title_r = thumb_window->TitleBarRect(); - thumb_r = ImRect(ImFloor(off + thumb_r.Min * scale), ImFloor(off + thumb_r.Max * scale)); - title_r = ImRect(ImFloor(off + title_r.Min * scale), ImFloor(off + ImVec2(title_r.Max.x, title_r.Min.y) * scale) + ImVec2(0,5)); // Exaggerate title bar height + thumb_r = ImRect(ImTrunc(off + thumb_r.Min * scale), ImTrunc(off + thumb_r.Max * scale)); + title_r = ImRect(ImTrunc(off + title_r.Min * scale), ImTrunc(off + ImVec2(title_r.Max.x, title_r.Min.y + title_r.GetHeight() * 3.0f) * scale)); // Exaggerate title bar height thumb_r.ClipWithFull(bb); title_r.ClipWithFull(bb); const bool window_is_focused = (g.NavWindow && thumb_window->RootWindowForTitleBarHighlight == g.NavWindow->RootWindowForTitleBarHighlight); @@ -19142,6 +19652,8 @@ void ImGui::DebugRenderViewportThumbnail(ImDrawList* draw_list, ImGuiViewportP* window->DrawList->AddText(g.Font, g.FontSize * 1.0f, title_r.Min, GetColorU32(ImGuiCol_Text, alpha_mul), thumb_window->Name, FindRenderedTextEnd(thumb_window->Name)); } draw_list->AddRect(bb.Min, bb.Max, GetColorU32(ImGuiCol_Border, alpha_mul)); + if (viewport->ID == g.DebugMetricsConfig.HighlightViewportID) + window->DrawList->AddRect(bb.Min, bb.Max, IM_COL32(255, 255, 0, 255)); } static void RenderViewportsThumbnails() @@ -19149,13 +19661,21 @@ static void RenderViewportsThumbnails() ImGuiContext& g = *GImGui; ImGuiWindow* window = g.CurrentWindow; - // We don't display full monitor bounds (we could, but it often looks awkward), instead we display just enough to cover all of our viewports. + // Draw monitor and calculate their boundaries float SCALE = 1.0f / 8.0f; ImRect bb_full(FLT_MAX, FLT_MAX, -FLT_MAX, -FLT_MAX); - for (ImGuiViewportP* viewport : g.Viewports) - bb_full.Add(viewport->GetMainRect()); + for (ImGuiPlatformMonitor& monitor : g.PlatformIO.Monitors) + bb_full.Add(ImRect(monitor.MainPos, monitor.MainPos + monitor.MainSize)); ImVec2 p = window->DC.CursorPos; ImVec2 off = p - bb_full.Min * SCALE; + for (ImGuiPlatformMonitor& monitor : g.PlatformIO.Monitors) + { + ImRect monitor_draw_bb(off + (monitor.MainPos) * SCALE, off + (monitor.MainPos + monitor.MainSize) * SCALE); + window->DrawList->AddRect(monitor_draw_bb.Min, monitor_draw_bb.Max, (g.DebugMetricsConfig.HighlightMonitorIdx == g.PlatformIO.Monitors.index_from_ptr(&monitor)) ? IM_COL32(255, 255, 0, 255) : ImGui::GetColorU32(ImGuiCol_Border), 4.0f); + window->DrawList->AddRectFilled(monitor_draw_bb.Min, monitor_draw_bb.Max, ImGui::GetColorU32(ImGuiCol_Border, 0.10f), 4.0f); + } + + // Draw viewports for (ImGuiViewportP* viewport : g.Viewports) { ImRect viewport_draw_bb(off + (viewport->Pos) * SCALE, off + (viewport->Pos + viewport->Size) * SCALE); @@ -19174,14 +19694,15 @@ static int IMGUI_CDECL ViewportComparerByLastFocusedStampCount(const void* lhs, // Draw an arbitrary US keyboard layout to visualize translated keys void ImGui::DebugRenderKeyboardPreview(ImDrawList* draw_list) { - const ImVec2 key_size = ImVec2(35.0f, 35.0f); - const float key_rounding = 3.0f; - const ImVec2 key_face_size = ImVec2(25.0f, 25.0f); - const ImVec2 key_face_pos = ImVec2(5.0f, 3.0f); - const float key_face_rounding = 2.0f; - const ImVec2 key_label_pos = ImVec2(7.0f, 4.0f); + const float scale = ImGui::GetFontSize() / 13.0f; + const ImVec2 key_size = ImVec2(35.0f, 35.0f) * scale; + const float key_rounding = 3.0f * scale; + const ImVec2 key_face_size = ImVec2(25.0f, 25.0f) * scale; + const ImVec2 key_face_pos = ImVec2(5.0f, 3.0f) * scale; + const float key_face_rounding = 2.0f * scale; + const ImVec2 key_label_pos = ImVec2(7.0f, 4.0f) * scale; const ImVec2 key_step = ImVec2(key_size.x - 1.0f, key_size.y - 1.0f); - const float key_row_offset = 9.0f; + const float key_row_offset = 9.0f * scale; ImVec2 board_min = GetCursorScreenPos(); ImVec2 board_max = ImVec2(board_min.x + 3 * key_step.x + 2 * key_row_offset + 10.0f, board_min.y + 3 * key_step.y + 10.0f); @@ -19256,6 +19777,35 @@ void ImGui::DebugTextEncoding(const char* str) EndTable(); } +static void DebugFlashStyleColorStop() +{ + ImGuiContext& g = *GImGui; + if (g.DebugFlashStyleColorIdx != ImGuiCol_COUNT) + g.Style.Colors[g.DebugFlashStyleColorIdx] = g.DebugFlashStyleColorBackup; + g.DebugFlashStyleColorIdx = ImGuiCol_COUNT; +} + +// Flash a given style color for some + inhibit modifications of this color via PushStyleColor() calls. +void ImGui::DebugFlashStyleColor(ImGuiCol idx) +{ + ImGuiContext& g = *GImGui; + DebugFlashStyleColorStop(); + g.DebugFlashStyleColorTime = 0.5f; + g.DebugFlashStyleColorIdx = idx; + g.DebugFlashStyleColorBackup = g.Style.Colors[idx]; +} + +void ImGui::UpdateDebugToolFlashStyleColor() +{ + ImGuiContext& g = *GImGui; + if (g.DebugFlashStyleColorTime <= 0.0f) + return; + ColorConvertHSVtoRGB(cosf(g.DebugFlashStyleColorTime * 6.0f) * 0.5f + 0.5f, 0.5f, 0.5f, g.Style.Colors[g.DebugFlashStyleColorIdx].x, g.Style.Colors[g.DebugFlashStyleColorIdx].y, g.Style.Colors[g.DebugFlashStyleColorIdx].z); + g.Style.Colors[g.DebugFlashStyleColorIdx].w = 1.0f; + if ((g.DebugFlashStyleColorTime -= g.IO.DeltaTime) <= 0.0f) + DebugFlashStyleColorStop(); +} + // Avoid naming collision with imgui_demo.cpp's HelpMarker() for unity builds. static void MetricsHelpMarker(const char* desc) { @@ -19297,8 +19847,8 @@ void ImGui::ShowMetricsWindow(bool* p_open) ImGuiMetricsConfig* cfg = &g.DebugMetricsConfig; if (cfg->ShowDebugLog) ShowDebugLogWindow(&cfg->ShowDebugLog); - if (cfg->ShowStackTool) - ShowStackToolWindow(&cfg->ShowStackTool); + if (cfg->ShowIDStackTool) + ShowIDStackToolWindow(&cfg->ShowIDStackTool); if (!Begin("Dear ImGui Metrics/Debugger", p_open) || GetCurrentWindow()->BeginCount > 1) { @@ -19306,11 +19856,14 @@ void ImGui::ShowMetricsWindow(bool* p_open) return; } + // [DEBUG] Clear debug breaks hooks after exactly one cycle. + DebugBreakClearData(); + // Basic info Text("Dear ImGui %s", GetVersion()); Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate); Text("%d vertices, %d indices (%d triangles)", io.MetricsRenderVertices, io.MetricsRenderIndices, io.MetricsRenderIndices / 3); - Text("%d visible windows, %d active allocations", io.MetricsRenderWindows, io.MetricsActiveAllocations); + Text("%d visible windows, %d current allocations", io.MetricsRenderWindows, g.DebugAllocInfo.TotalAllocCount - g.DebugAllocInfo.TotalFreeCount); //SameLine(); if (SmallButton("GC")) { g.GcCompactAll = true; } Separator(); @@ -19339,8 +19892,8 @@ void ImGui::ShowMetricsWindow(bool* p_open) else if (rect_type == TRT_ColumnsRect) { ImGuiTableColumn* c = &table->Columns[n]; return ImRect(c->MinX, table->InnerClipRect.Min.y, c->MaxX, table->InnerClipRect.Min.y + table_instance->LastOuterHeight); } else if (rect_type == TRT_ColumnsWorkRect) { ImGuiTableColumn* c = &table->Columns[n]; return ImRect(c->WorkMinX, table->WorkRect.Min.y, c->WorkMaxX, table->WorkRect.Max.y); } else if (rect_type == TRT_ColumnsClipRect) { ImGuiTableColumn* c = &table->Columns[n]; return c->ClipRect; } - else if (rect_type == TRT_ColumnsContentHeadersUsed){ ImGuiTableColumn* c = &table->Columns[n]; return ImRect(c->WorkMinX, table->InnerClipRect.Min.y, c->ContentMaxXHeadersUsed, table->InnerClipRect.Min.y + table_instance->LastFirstRowHeight); } // Note: y1/y2 not always accurate - else if (rect_type == TRT_ColumnsContentHeadersIdeal){ImGuiTableColumn* c = &table->Columns[n]; return ImRect(c->WorkMinX, table->InnerClipRect.Min.y, c->ContentMaxXHeadersIdeal, table->InnerClipRect.Min.y + table_instance->LastFirstRowHeight); } + else if (rect_type == TRT_ColumnsContentHeadersUsed){ ImGuiTableColumn* c = &table->Columns[n]; return ImRect(c->WorkMinX, table->InnerClipRect.Min.y, c->ContentMaxXHeadersUsed, table->InnerClipRect.Min.y + table_instance->LastTopHeadersRowHeight); } // Note: y1/y2 not always accurate + else if (rect_type == TRT_ColumnsContentHeadersIdeal){ImGuiTableColumn* c = &table->Columns[n]; return ImRect(c->WorkMinX, table->InnerClipRect.Min.y, c->ContentMaxXHeadersIdeal, table->InnerClipRect.Min.y + table_instance->LastTopHeadersRowHeight); } else if (rect_type == TRT_ColumnsContentFrozen) { ImGuiTableColumn* c = &table->Columns[n]; return ImRect(c->WorkMinX, table->InnerClipRect.Min.y, c->ContentMaxXFrozen, table->InnerClipRect.Min.y + table_instance->LastFrozenHeight); } else if (rect_type == TRT_ColumnsContentUnfrozen) { ImGuiTableColumn* c = &table->Columns[n]; return ImRect(c->WorkMinX, table->InnerClipRect.Min.y + table_instance->LastFrozenHeight, c->ContentMaxXUnfrozen, table->InnerClipRect.Max.y); } IM_ASSERT(0); @@ -19365,34 +19918,24 @@ void ImGui::ShowMetricsWindow(bool* p_open) // Tools if (TreeNode("Tools")) { - bool show_encoding_viewer = TreeNode("UTF-8 Encoding viewer"); - SameLine(); - MetricsHelpMarker("You can also call ImGui::DebugTextEncoding() from your code with a given string to test that your UTF-8 encoding settings are correct."); - if (show_encoding_viewer) - { - static char buf[100] = ""; - SetNextItemWidth(-FLT_MIN); - InputText("##Text", buf, IM_ARRAYSIZE(buf)); - if (buf[0] != 0) - DebugTextEncoding(buf); - TreePop(); - } - + // Debug Break features // The Item Picker tool is super useful to visually select an item and break into the call-stack of where it was submitted. - if (Checkbox("Show Item Picker", &g.DebugItemPickerActive) && g.DebugItemPickerActive) - DebugStartItemPicker(); + SeparatorTextEx(0, "Debug breaks", NULL, CalcTextSize("(?)").x + g.Style.SeparatorTextPadding.x); SameLine(); MetricsHelpMarker("Will call the IM_DEBUG_BREAK() macro to break in debugger.\nWarning: If you don't have a debugger attached, this will probably crash."); + if (Checkbox("Show Item Picker", &g.DebugItemPickerActive) && g.DebugItemPickerActive) + DebugStartItemPicker(); + Checkbox("Show \"Debug Break\" buttons in other sections (io.ConfigDebugIsDebuggerPresent)", &g.IO.ConfigDebugIsDebuggerPresent); + + SeparatorText("Visualize"); - // Stack Tool is your best friend! Checkbox("Show Debug Log", &cfg->ShowDebugLog); SameLine(); MetricsHelpMarker("You can also call ImGui::ShowDebugLogWindow() from your code."); - // Stack Tool is your best friend! - Checkbox("Show Stack Tool", &cfg->ShowStackTool); + Checkbox("Show ID Stack Tool", &cfg->ShowIDStackTool); SameLine(); - MetricsHelpMarker("You can also call ImGui::ShowStackToolWindow() from your code."); + MetricsHelpMarker("You can also call ImGui::ShowIDStackToolWindow() from your code."); Checkbox("Show windows begin order", &cfg->ShowWindowsBeginOrder); Checkbox("Show windows rectangles", &cfg->ShowWindowsRects); @@ -19455,11 +19998,26 @@ void ImGui::ShowMetricsWindow(bool* p_open) Unindent(); } } + Checkbox("Show groups rectangles", &g.DebugShowGroupRects); // Storing in context as this is used by group code and prefers to be in hot-data + + SeparatorText("Validate"); Checkbox("Debug Begin/BeginChild return value", &io.ConfigDebugBeginReturnValueLoop); SameLine(); MetricsHelpMarker("Some calls to Begin()/BeginChild() will return false.\n\nWill cycle through window depths then repeat. Windows should be flickering while running."); + Checkbox("UTF-8 Encoding viewer", &cfg->ShowTextEncodingViewer); + SameLine(); + MetricsHelpMarker("You can also call ImGui::DebugTextEncoding() from your code with a given string to test that your UTF-8 encoding settings are correct."); + if (cfg->ShowTextEncodingViewer) + { + static char buf[64] = ""; + SetNextItemWidth(-FLT_MIN); + InputText("##DebugTextEncodingBuf", buf, IM_ARRAYSIZE(buf)); + if (buf[0] != 0) + DebugTextEncoding(buf); + } + TreePop(); } @@ -19511,10 +20069,7 @@ void ImGui::ShowMetricsWindow(bool* p_open) // Viewports if (TreeNode("Viewports", "Viewports (%d)", g.Viewports.Size)) { - Indent(GetTreeNodeToLabelSpacing()); - RenderViewportsThumbnails(); - Unindent(GetTreeNodeToLabelSpacing()); - + cfg->HighlightMonitorIdx = -1; bool open = TreeNode("Monitors", "Monitors (%d)", g.PlatformIO.Monitors.Size); SameLine(); MetricsHelpMarker("Dear ImGui uses monitor data:\n- to query DPI settings on a per monitor basis\n- to position popup/tooltips so they don't straddle monitors."); @@ -19527,10 +20082,20 @@ void ImGui::ShowMetricsWindow(bool* p_open) i, mon.DpiScale * 100.0f, mon.MainPos.x, mon.MainPos.y, mon.MainPos.x + mon.MainSize.x, mon.MainPos.y + mon.MainSize.y, mon.MainSize.x, mon.MainSize.y, mon.WorkPos.x, mon.WorkPos.y, mon.WorkPos.x + mon.WorkSize.x, mon.WorkPos.y + mon.WorkSize.y, mon.WorkSize.x, mon.WorkSize.y); + if (IsItemHovered()) + cfg->HighlightMonitorIdx = i; } TreePop(); } + SetNextItemOpen(true, ImGuiCond_Once); + if (TreeNode("Windows Minimap")) + { + RenderViewportsThumbnails(); + TreePop(); + } + cfg->HighlightViewportID = 0; + BulletText("MouseViewport: 0x%08X (UserHovered 0x%08X, LastHovered 0x%08X)", g.MouseViewport ? g.MouseViewport->ID : 0, g.IO.MouseHoveredViewport, g.MouseLastHoveredViewport ? g.MouseLastHoveredViewport->ID : 0); if (TreeNode("Inferred Z order (front-to-back)")) { @@ -19540,12 +20105,17 @@ void ImGui::ShowMetricsWindow(bool* p_open) if (viewports.Size > 1) ImQsort(viewports.Data, viewports.Size, sizeof(ImGuiViewport*), ViewportComparerByLastFocusedStampCount); for (ImGuiViewportP* viewport : viewports) + { BulletText("Viewport #%d, ID: 0x%08X, LastFocused = %08d, PlatformFocused = %s, Window: \"%s\"", viewport->Idx, viewport->ID, viewport->LastFocusedStampCount, (g.PlatformIO.Platform_GetWindowFocus && viewport->PlatformWindowCreated) ? (g.PlatformIO.Platform_GetWindowFocus(viewport) ? "1" : "0") : "N/A", viewport->Window ? viewport->Window->Name : "N/A"); + if (IsItemHovered()) + cfg->HighlightViewportID = viewport->ID; + } TreePop(); } + for (ImGuiViewportP* viewport : g.Viewports) DebugNodeViewport(viewport); TreePop(); @@ -19700,6 +20270,22 @@ void ImGui::ShowMetricsWindow(bool* p_open) TreePop(); } + // Settings + if (TreeNode("Memory allocations")) + { + ImGuiDebugAllocInfo* info = &g.DebugAllocInfo; + Text("%d current allocations", info->TotalAllocCount - info->TotalFreeCount); + if (SmallButton("GC now")) { g.GcCompactAll = true; } + Text("Recent frames with allocations:"); + int buf_size = IM_ARRAYSIZE(info->LastEntriesBuf); + for (int n = buf_size - 1; n >= 0; n--) + { + ImGuiDebugAllocEntry* entry = &info->LastEntriesBuf[(info->LastEntriesIdx - n + buf_size) % buf_size]; + BulletText("Frame %06d: %+3d ( %2d malloc, %2d free )%s", entry->FrameCount, entry->AllocCount - entry->FreeCount, entry->AllocCount, entry->FreeCount, (n == 0) ? " (most recent)" : ""); + } + TreePop(); + } + if (TreeNode("Inputs")) { Text("KEYBOARD/GAMEPAD/MOUSE KEYS"); @@ -19710,7 +20296,7 @@ void ImGui::ShowMetricsWindow(bool* p_open) #ifdef IMGUI_DISABLE_OBSOLETE_KEYIO struct funcs { static bool IsLegacyNativeDupe(ImGuiKey) { return false; } }; #else - struct funcs { static bool IsLegacyNativeDupe(ImGuiKey key) { return key < 512 && GetIO().KeyMap[key] != -1; } }; // Hide Native<>ImGuiKey duplicates when both exists in the array + struct funcs { static bool IsLegacyNativeDupe(ImGuiKey key) { return key >= 0 && key < 512 && GetIO().KeyMap[key] != -1; } }; // Hide Native<>ImGuiKey duplicates when both exists in the array //Text("Legacy raw:"); for (ImGuiKey key = ImGuiKey_KeysData_OFFSET; key < ImGuiKey_COUNT; key++) { if (io.KeysDown[key]) { SameLine(); Text("\"%s\" %d", GetKeyName(key), key); } } #endif Text("Keys down:"); for (ImGuiKey key = ImGuiKey_KeysData_OFFSET; key < ImGuiKey_COUNT; key = (ImGuiKey)(key + 1)) { if (funcs::IsLegacyNativeDupe(key) || !IsKeyDown(key)) continue; SameLine(); Text(IsNamedKey(key) ? "\"%s\"" : "\"%s\" %d", GetKeyName(key), key); SameLine(); Text("(%.02f)", GetKeyData(key)->DownDuration); } @@ -19753,8 +20339,7 @@ void ImGui::ShowMetricsWindow(bool* p_open) Text("KEY OWNERS"); { Indent(); - if (BeginListBox("##owners", ImVec2(-FLT_MIN, GetTextLineHeightWithSpacing() * 6))) - { + if (BeginChild("##owners", ImVec2(-FLT_MIN, GetTextLineHeightWithSpacing() * 8), ImGuiChildFlags_FrameStyle | ImGuiChildFlags_ResizeY, ImGuiWindowFlags_NoSavedSettings)) for (ImGuiKey key = ImGuiKey_NamedKey_BEGIN; key < ImGuiKey_NamedKey_END; key = (ImGuiKey)(key + 1)) { ImGuiKeyOwnerData* owner_data = GetKeyOwnerData(&g, key); @@ -19764,30 +20349,34 @@ void ImGui::ShowMetricsWindow(bool* p_open) owner_data->LockUntilRelease ? " LockUntilRelease" : owner_data->LockThisFrame ? " LockThisFrame" : ""); DebugLocateItemOnHover(owner_data->OwnerCurr); } - EndListBox(); - } + EndChild(); Unindent(); } Text("SHORTCUT ROUTING"); + SameLine(); + MetricsHelpMarker("Declared shortcut routes automatically set key owner when mods matches."); { Indent(); - if (BeginListBox("##routes", ImVec2(-FLT_MIN, GetTextLineHeightWithSpacing() * 6))) - { + if (BeginChild("##routes", ImVec2(-FLT_MIN, GetTextLineHeightWithSpacing() * 8), ImGuiChildFlags_FrameStyle | ImGuiChildFlags_ResizeY, ImGuiWindowFlags_NoSavedSettings)) for (ImGuiKey key = ImGuiKey_NamedKey_BEGIN; key < ImGuiKey_NamedKey_END; key = (ImGuiKey)(key + 1)) { ImGuiKeyRoutingTable* rt = &g.KeysRoutingTable; for (ImGuiKeyRoutingIndex idx = rt->Index[key - ImGuiKey_NamedKey_BEGIN]; idx != -1; ) { - char key_chord_name[64]; ImGuiKeyRoutingData* routing_data = &rt->Entries[idx]; - GetKeyChordName(key | routing_data->Mods, key_chord_name, IM_ARRAYSIZE(key_chord_name)); - Text("%s: 0x%08X", key_chord_name, routing_data->RoutingCurr); + ImGuiKeyChord key_chord = key | routing_data->Mods; + Text("%s: 0x%08X (scored %d)", GetKeyChordName(key_chord), routing_data->RoutingCurr, routing_data->RoutingCurrScore); DebugLocateItemOnHover(routing_data->RoutingCurr); + if (g.IO.ConfigDebugIsDebuggerPresent) + { + SameLine(); + if (DebugBreakButton("**DebugBreak**", "in SetShortcutRouting() for this KeyChord")) + g.DebugBreakInShortcutRouting = key_chord; + } idx = routing_data->NextEntryIndex; } } - EndListBox(); - } + EndChild(); Text("(ActiveIdUsing: AllKeyboardKeys: %d, NavDirMask: 0x%X)", g.ActiveIdUsingAllKeyboardKeys, g.ActiveIdUsingNavDirMask); Unindent(); } @@ -19830,6 +20419,14 @@ void ImGui::ShowMetricsWindow(bool* p_open) Text("NavActivateFlags: %04X", g.NavActivateFlags); Text("NavDisableHighlight: %d, NavDisableMouseHover: %d", g.NavDisableHighlight, g.NavDisableMouseHover); Text("NavFocusScopeId = 0x%08X", g.NavFocusScopeId); + Text("NavFocusRoute[] = "); + for (int path_n = g.NavFocusRoute.Size - 1; path_n >= 0; path_n--) + { + const ImGuiFocusScopeData& focus_scope = g.NavFocusRoute[path_n]; + SameLine(0.0f, 0.0f); + Text("0x%08X/", focus_scope.ID); + SetItemTooltip("In window \"%s\"", FindWindowByID(focus_scope.WindowID)->Name); + } Text("NavWindowingTarget: '%s'", g.NavWindowingTarget ? g.NavWindowingTarget->Name : "NULL"); Unindent(); @@ -19910,6 +20507,64 @@ void ImGui::ShowMetricsWindow(bool* p_open) End(); } +void ImGui::DebugBreakClearData() +{ + // Those fields are scattered in their respective subsystem to stay in hot-data locations + ImGuiContext& g = *GImGui; + g.DebugBreakInWindow = 0; + g.DebugBreakInTable = 0; + g.DebugBreakInShortcutRouting = ImGuiKey_None; +} + +void ImGui::DebugBreakButtonTooltip(bool keyboard_only, const char* description_of_location) +{ + if (!BeginItemTooltip()) + return; + Text("To call IM_DEBUG_BREAK() %s:", description_of_location); + Separator(); + TextUnformatted(keyboard_only ? "- Press 'Pause/Break' on keyboard." : "- Press 'Pause/Break' on keyboard.\n- or Click (may alter focus/active id).\n- or navigate using keyboard and press space."); + Separator(); + TextUnformatted("Choose one way that doesn't interfere with what you are trying to debug!\nYou need a debugger attached or this will crash!"); + EndTooltip(); +} + +// Special button that doesn't take focus, doesn't take input owner, and can be activated without a click etc. +// In order to reduce interferences with the contents we are trying to debug into. +bool ImGui::DebugBreakButton(const char* label, const char* description_of_location) +{ + ImGuiWindow* window = GetCurrentWindow(); + if (window->SkipItems) + return false; + + ImGuiContext& g = *GImGui; + const ImGuiID id = window->GetID(label); + const ImVec2 label_size = CalcTextSize(label, NULL, true); + ImVec2 pos = window->DC.CursorPos + ImVec2(0.0f, window->DC.CurrLineTextBaseOffset); + ImVec2 size = ImVec2(label_size.x + g.Style.FramePadding.x * 2.0f, label_size.y); + + const ImRect bb(pos, pos + size); + ItemSize(size, 0.0f); + if (!ItemAdd(bb, id)) + return false; + + // WE DO NOT USE ButtonEx() or ButtonBehavior() in order to reduce our side-effects. + bool hovered = ItemHoverable(bb, id, g.CurrentItemFlags); + bool pressed = hovered && (IsKeyChordPressed(g.DebugBreakKeyChord) || IsMouseClicked(0) || g.NavActivateId == id); + DebugBreakButtonTooltip(false, description_of_location); + + ImVec4 col4f = GetStyleColorVec4(hovered ? ImGuiCol_ButtonHovered : ImGuiCol_Button); + ImVec4 hsv; + ColorConvertRGBtoHSV(col4f.x, col4f.y, col4f.z, hsv.x, hsv.y, hsv.z); + ColorConvertHSVtoRGB(hsv.x + 0.20f, hsv.y, hsv.z, col4f.x, col4f.y, col4f.z); + + RenderNavHighlight(bb, id); + RenderFrame(bb.Min, bb.Max, GetColorU32(col4f), true, g.Style.FrameRounding); + RenderTextClipped(bb.Min, bb.Max, label, NULL, &label_size, g.Style.ButtonTextAlign, &bb); + + IMGUI_TEST_ENGINE_ITEM_INFO(id, label, g.LastItemData.StatusFlags); + return pressed; +} + // [DEBUG] Display contents of Columns void ImGui::DebugNodeColumns(ImGuiOldColumns* columns) { @@ -19936,6 +20591,7 @@ static void DebugNodeDockNodeFlags(ImGuiDockNodeFlags* p_flags, const char* labe CheckboxFlags("HiddenTabBar", p_flags, ImGuiDockNodeFlags_HiddenTabBar); CheckboxFlags("NoWindowMenuButton", p_flags, ImGuiDockNodeFlags_NoWindowMenuButton); CheckboxFlags("NoCloseButton", p_flags, ImGuiDockNodeFlags_NoCloseButton); + CheckboxFlags("DockedWindowsInFocusRoute", p_flags, ImGuiDockNodeFlags_DockedWindowsInFocusRoute); CheckboxFlags("NoDocking", p_flags, ImGuiDockNodeFlags_NoDocking); // Multiple flags CheckboxFlags("NoDockingSplit", p_flags, ImGuiDockNodeFlags_NoDockingSplit); CheckboxFlags("NoDockingSplitOther", p_flags, ImGuiDockNodeFlags_NoDockingSplitOther); @@ -20007,6 +20663,16 @@ void ImGui::DebugNodeDockNode(ImGuiDockNode* node, const char* label) } } +static void FormatTextureIDForDebugDisplay(char* buf, int buf_size, ImTextureID tex_id) +{ + union { void* ptr; int integer; } tex_id_opaque; + memcpy(&tex_id_opaque, &tex_id, ImMin(sizeof(void*), sizeof(tex_id))); + if (sizeof(tex_id) >= sizeof(void*)) + ImFormatString(buf, buf_size, "0x%p", tex_id_opaque.ptr); + else + ImFormatString(buf, buf_size, "0x%04X", tex_id_opaque.integer); +} + // [DEBUG] Display contents of ImDrawList // Note that both 'window' and 'viewport' may be NULL here. Viewport is generally null of destroyed popups which previously owned a viewport. void ImGui::DebugNodeDrawList(ImGuiWindow* window, ImGuiViewportP* viewport, const ImDrawList* draw_list, const char* label) @@ -20043,10 +20709,11 @@ void ImGui::DebugNodeDrawList(ImGuiWindow* window, ImGuiViewportP* viewport, con continue; } + char texid_desc[20]; + FormatTextureIDForDebugDisplay(texid_desc, IM_ARRAYSIZE(texid_desc), pcmd->TextureId); char buf[300]; - ImFormatString(buf, IM_ARRAYSIZE(buf), "DrawCmd:%5d tris, Tex 0x%p, ClipRect (%4.0f,%4.0f)-(%4.0f,%4.0f)", - pcmd->ElemCount / 3, (void*)(intptr_t)pcmd->TextureId, - pcmd->ClipRect.x, pcmd->ClipRect.y, pcmd->ClipRect.z, pcmd->ClipRect.w); + ImFormatString(buf, IM_ARRAYSIZE(buf), "DrawCmd:%5d tris, Tex %s, ClipRect (%4.0f,%4.0f)-(%4.0f,%4.0f)", + pcmd->ElemCount / 3, texid_desc, pcmd->ClipRect.x, pcmd->ClipRect.y, pcmd->ClipRect.z, pcmd->ClipRect.w); bool pcmd_node_open = TreeNode((void*)(pcmd - draw_list->CmdBuffer.begin()), "%s", buf); if (IsItemHovered() && (cfg->ShowDrawCmdMesh || cfg->ShowDrawCmdBoundingBoxes) && fg_draw_list) DebugNodeDrawCmdShowMeshAndBoundingBox(fg_draw_list, draw_list, pcmd, cfg->ShowDrawCmdMesh, cfg->ShowDrawCmdBoundingBoxes); @@ -20126,8 +20793,8 @@ void ImGui::DebugNodeDrawCmdShowMeshAndBoundingBox(ImDrawList* out_draw_list, co // Draw bounding boxes if (show_aabb) { - out_draw_list->AddRect(ImFloor(clip_rect.Min), ImFloor(clip_rect.Max), IM_COL32(255, 0, 255, 255)); // In pink: clipping rectangle submitted to GPU - out_draw_list->AddRect(ImFloor(vtxs_rect.Min), ImFloor(vtxs_rect.Max), IM_COL32(0, 255, 255, 255)); // In cyan: bounding box of triangles + out_draw_list->AddRect(ImTrunc(clip_rect.Min), ImTrunc(clip_rect.Max), IM_COL32(255, 0, 255, 255)); // In pink: clipping rectangle submitted to GPU + out_draw_list->AddRect(ImTrunc(vtxs_rect.Min), ImTrunc(vtxs_rect.Max), IM_COL32(0, 255, 255, 255)); // In cyan: bounding box of triangles } out_draw_list->Flags = backup_flags; } @@ -20152,7 +20819,7 @@ void ImGui::DebugNodeFont(ImFont* font) SetNextItemWidth(GetFontSize() * 8); DragFloat("Font scale", &font->Scale, 0.005f, 0.3f, 2.0f, "%.1f"); SameLine(); MetricsHelpMarker( - "Note than the default embedded font is NOT meant to be scaled.\n\n" + "Note that the default embedded font is NOT meant to be scaled.\n\n" "Font are currently rendered into bitmaps at a given size at the time of building the atlas. " "You may oversample them to get some flexibility with scaling. " "You can also render at multiple sizes and select which one to use at runtime.\n\n" @@ -20286,8 +20953,12 @@ void ImGui::DebugNodeTabBar(ImGuiTabBar* tab_bar, const char* label) void ImGui::DebugNodeViewport(ImGuiViewportP* viewport) { + ImGuiContext& g = *GImGui; SetNextItemOpen(true, ImGuiCond_Once); - if (TreeNode((void*)(intptr_t)viewport->ID, "Viewport #%d, ID: 0x%08X, Parent: 0x%08X, Window: \"%s\"", viewport->Idx, viewport->ID, viewport->ParentViewportId, viewport->Window ? viewport->Window->Name : "N/A")) + bool open = TreeNode((void*)(intptr_t)viewport->ID, "Viewport #%d, ID: 0x%08X, Parent: 0x%08X, Window: \"%s\"", viewport->Idx, viewport->ID, viewport->ParentViewportId, viewport->Window ? viewport->Window->Name : "N/A"); + if (IsItemHovered()) + g.DebugMetricsConfig.HighlightViewportID = viewport->ID; + if (open) { ImGuiWindowFlags flags = viewport->Flags; BulletText("Main Pos: (%.0f,%.0f), Size: (%.0f,%.0f)\nWorkArea Offset Left: %.0f Top: %.0f, Right: %.0f, Bottom: %.0f\nMonitor: %d, DpiScale: %.0f%%", @@ -20338,6 +21009,9 @@ void ImGui::DebugNodeWindow(ImGuiWindow* window, const char* label) if (window->MemoryCompacted) TextDisabled("Note: some memory buffers have been compacted/freed."); + if (g.IO.ConfigDebugIsDebuggerPresent && DebugBreakButton("**DebugBreak**", "in Begin()")) + g.DebugBreakInWindow = window->ID; + ImGuiWindowFlags flags = window->Flags; DebugNodeDrawList(window, window->Viewport, window->DrawList, "DrawList"); BulletText("Pos: (%.1f,%.1f), Size: (%.1f,%.1f), ContentSize (%.1f,%.1f) Ideal (%.1f,%.1f)", window->Pos.x, window->Pos.y, window->Size.x, window->Size.y, window->ContentSize.x, window->ContentSize.y, window->ContentSizeIdeal.x, window->ContentSizeIdeal.y); @@ -20369,10 +21043,11 @@ void ImGui::DebugNodeWindow(ImGuiWindow* window, const char* label) if (window->DockNode || window->DockNodeAsHost) DebugNodeDockNode(window->DockNodeAsHost ? window->DockNodeAsHost : window->DockNode, window->DockNodeAsHost ? "DockNodeAsHost" : "DockNode"); - if (window->RootWindow != window) { DebugNodeWindow(window->RootWindow, "RootWindow"); } + if (window->RootWindow != window) { DebugNodeWindow(window->RootWindow, "RootWindow"); } if (window->RootWindowDockTree != window->RootWindow) { DebugNodeWindow(window->RootWindowDockTree, "RootWindowDockTree"); } - if (window->ParentWindow != NULL) { DebugNodeWindow(window->ParentWindow, "ParentWindow"); } - if (window->DC.ChildWindows.Size > 0) { DebugNodeWindowsList(&window->DC.ChildWindows, "ChildWindows"); } + if (window->ParentWindow != NULL) { DebugNodeWindow(window->ParentWindow, "ParentWindow"); } + if (window->ParentWindowForFocusRoute != NULL) { DebugNodeWindow(window->ParentWindowForFocusRoute, "ParentWindowForFocusRoute"); } + if (window->DC.ChildWindows.Size > 0) { DebugNodeWindowsList(&window->DC.ChildWindows, "ChildWindows"); } if (window->ColumnsStorage.Size > 0 && TreeNode("Columns", "Columns sets (%d)", window->ColumnsStorage.Size)) { for (ImGuiOldColumns& columns : window->ColumnsStorage) @@ -20451,6 +21126,29 @@ void ImGui::DebugLogV(const char* fmt, va_list args) #endif } +// FIXME-LAYOUT: To be done automatically via layout mode once we rework ItemSize/ItemAdd into ItemLayout. +static void SameLineOrWrap(const ImVec2& size) +{ + ImGuiContext& g = *GImGui; + ImGuiWindow* window = g.CurrentWindow; + ImVec2 pos(window->DC.CursorPosPrevLine.x + g.Style.ItemSpacing.x, window->DC.CursorPosPrevLine.y); + if (window->ClipRect.Contains(ImRect(pos, pos + size))) + ImGui::SameLine(); +} + +static void ShowDebugLogFlag(const char* name, ImGuiDebugLogFlags flags) +{ + ImGuiContext& g = *GImGui; + ImVec2 size(ImGui::GetFrameHeight() + g.Style.ItemInnerSpacing.x + ImGui::CalcTextSize(name).x, ImGui::GetFrameHeight()); + SameLineOrWrap(size); // FIXME-LAYOUT: To be done automatically once we rework ItemSize/ItemAdd into ItemLayout. + if (ImGui::CheckboxFlags(name, &g.DebugLogFlags, flags) && g.IO.KeyShift && (g.DebugLogFlags & flags) != 0) + { + g.DebugLogAutoDisableFrames = 2; + g.DebugLogAutoDisableFlags |= flags; + } + ImGui::SetItemTooltip("Hold SHIFT when clicking to enable for 2 frames only (useful for spammy log entries)"); +} + void ImGui::ShowDebugLogWindow(bool* p_open) { ImGuiContext& g = *GImGui; @@ -20462,16 +21160,20 @@ void ImGui::ShowDebugLogWindow(bool* p_open) return; } - CheckboxFlags("All", &g.DebugLogFlags, ImGuiDebugLogFlags_EventMask_); - SameLine(); CheckboxFlags("ActiveId", &g.DebugLogFlags, ImGuiDebugLogFlags_EventActiveId); - SameLine(); CheckboxFlags("Focus", &g.DebugLogFlags, ImGuiDebugLogFlags_EventFocus); - SameLine(); CheckboxFlags("Popup", &g.DebugLogFlags, ImGuiDebugLogFlags_EventPopup); - SameLine(); CheckboxFlags("Nav", &g.DebugLogFlags, ImGuiDebugLogFlags_EventNav); - SameLine(); if (CheckboxFlags("Clipper", &g.DebugLogFlags, ImGuiDebugLogFlags_EventClipper)) { g.DebugLogClipperAutoDisableFrames = 2; } if (IsItemHovered()) SetTooltip("Clipper log auto-disabled after 2 frames"); - //SameLine(); CheckboxFlags("Selection", &g.DebugLogFlags, ImGuiDebugLogFlags_EventSelection); - SameLine(); CheckboxFlags("IO", &g.DebugLogFlags, ImGuiDebugLogFlags_EventIO); - SameLine(); CheckboxFlags("Docking", &g.DebugLogFlags, ImGuiDebugLogFlags_EventDocking); - SameLine(); CheckboxFlags("Viewport", &g.DebugLogFlags, ImGuiDebugLogFlags_EventViewport); + ImGuiDebugLogFlags all_enable_flags = ImGuiDebugLogFlags_EventMask_ & ~ImGuiDebugLogFlags_EventInputRouting; + CheckboxFlags("All", &g.DebugLogFlags, all_enable_flags); + SetItemTooltip("(except InputRouting which is spammy)"); + + ShowDebugLogFlag("ActiveId", ImGuiDebugLogFlags_EventActiveId); + ShowDebugLogFlag("Clipper", ImGuiDebugLogFlags_EventClipper); + ShowDebugLogFlag("Docking", ImGuiDebugLogFlags_EventDocking); + ShowDebugLogFlag("Focus", ImGuiDebugLogFlags_EventFocus); + ShowDebugLogFlag("IO", ImGuiDebugLogFlags_EventIO); + ShowDebugLogFlag("Nav", ImGuiDebugLogFlags_EventNav); + ShowDebugLogFlag("Popup", ImGuiDebugLogFlags_EventPopup); + //ShowDebugLogFlag("Selection", ImGuiDebugLogFlags_EventSelection); + ShowDebugLogFlag("Viewport", ImGuiDebugLogFlags_EventViewport); + ShowDebugLogFlag("InputRouting", ImGuiDebugLogFlags_EventInputRouting); if (SmallButton("Clear")) { @@ -20481,7 +21183,10 @@ void ImGui::ShowDebugLogWindow(bool* p_open) SameLine(); if (SmallButton("Copy")) SetClipboardText(g.DebugLogBuf.c_str()); - BeginChild("##log", ImVec2(0.0f, 0.0f), true, ImGuiWindowFlags_AlwaysVerticalScrollbar | ImGuiWindowFlags_AlwaysHorizontalScrollbar); + BeginChild("##log", ImVec2(0.0f, 0.0f), ImGuiChildFlags_Border, ImGuiWindowFlags_AlwaysVerticalScrollbar | ImGuiWindowFlags_AlwaysHorizontalScrollbar); + + const ImGuiDebugLogFlags backup_log_flags = g.DebugLogFlags; + g.DebugLogFlags &= ~ImGuiDebugLogFlags_EventClipper; ImGuiListClipper clipper; clipper.Begin(g.DebugLogIndex.size()); @@ -20490,10 +21195,10 @@ void ImGui::ShowDebugLogWindow(bool* p_open) { const char* line_begin = g.DebugLogIndex.get_line_begin(g.DebugLogBuf.c_str(), line_no); const char* line_end = g.DebugLogIndex.get_line_end(g.DebugLogBuf.c_str(), line_no); - TextUnformatted(line_begin, line_end); + TextUnformatted(line_begin, line_end); // Display line ImRect text_rect = g.LastItemData.Rect; if (IsItemHovered()) - for (const char* p = line_begin; p <= line_end - 10; p++) + for (const char* p = line_begin; p <= line_end - 10; p++) // Search for 0x???????? identifiers { ImGuiID id = 0; if (p[0] != '0' || (p[1] != 'x' && p[1] != 'X') || sscanf(p + 2, "%X", &id) != 1) @@ -20506,6 +21211,7 @@ void ImGui::ShowDebugLogWindow(bool* p_open) p += 10; } } + g.DebugLogFlags = backup_log_flags; if (GetScrollY() >= GetScrollMaxY()) SetScrollHereY(1.0f); EndChild(); @@ -20514,7 +21220,7 @@ void ImGui::ShowDebugLogWindow(bool* p_open) } //----------------------------------------------------------------------------- -// [SECTION] OTHER DEBUG TOOLS (ITEM PICKER, STACK TOOL) +// [SECTION] OTHER DEBUG TOOLS (ITEM PICKER, ID STACK TOOL) //----------------------------------------------------------------------------- // Draw a small cross at current CursorPos in current window's DrawList @@ -20556,8 +21262,10 @@ void ImGui::DebugLocateItem(ImGuiID target_id) ImGuiContext& g = *GImGui; g.DebugLocateId = target_id; g.DebugLocateFrames = 2; + g.DebugBreakInLocateId = false; } +// FIXME: Doesn't work over through a modal window, because they clear HoveredWindow. void ImGui::DebugLocateItemOnHover(ImGuiID target_id) { if (target_id == 0 || !IsItemHovered(ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_AllowWhenBlockedByPopup)) @@ -20565,11 +21273,24 @@ void ImGui::DebugLocateItemOnHover(ImGuiID target_id) ImGuiContext& g = *GImGui; DebugLocateItem(target_id); GetForegroundDrawList(g.CurrentWindow)->AddRect(g.LastItemData.Rect.Min - ImVec2(3.0f, 3.0f), g.LastItemData.Rect.Max + ImVec2(3.0f, 3.0f), DEBUG_LOCATE_ITEM_COLOR); + + // Can't easily use a context menu here because it will mess with focus, active id etc. + if (g.IO.ConfigDebugIsDebuggerPresent && g.MouseStationaryTimer > 1.0f) + { + DebugBreakButtonTooltip(false, "in ItemAdd()"); + if (IsKeyChordPressed(g.DebugBreakKeyChord)) + g.DebugBreakInLocateId = true; + } } void ImGui::DebugLocateItemResolveWithLastItem() { ImGuiContext& g = *GImGui; + + // [DEBUG] Debug break requested by user + if (g.DebugBreakInLocateId) + IM_DEBUG_BREAK(); + ImGuiLastItemData item_data = g.LastItemData; g.DebugLocateId = 0; ImDrawList* draw_list = GetForegroundDrawList(g.CurrentWindow); @@ -20581,6 +21302,12 @@ void ImGui::DebugLocateItemResolveWithLastItem() draw_list->AddLine(p1, p2, DEBUG_LOCATE_ITEM_COLOR); } +void ImGui::DebugStartItemPicker() +{ + ImGuiContext& g = *GImGui; + g.DebugItemPickerActive = true; +} + // [DEBUG] Item picker tool - start with DebugStartItemPicker() - useful to visually select an item and break into its call-stack. void ImGui::UpdateDebugToolItemPicker() { @@ -20615,13 +21342,13 @@ void ImGui::UpdateDebugToolItemPicker() EndTooltip(); } -// [DEBUG] Stack Tool: update queries. Called by NewFrame() +// [DEBUG] ID Stack Tool: update queries. Called by NewFrame() void ImGui::UpdateDebugToolStackQueries() { ImGuiContext& g = *GImGui; - ImGuiStackTool* tool = &g.DebugStackTool; + ImGuiIDStackTool* tool = &g.DebugIDStackTool; - // Clear hook when stack tool is not visible + // Clear hook when id stack tool is not visible g.DebugHookIdInfo = 0; if (g.FrameCount != tool->LastActiveFrame + 1) return; @@ -20655,12 +21382,12 @@ void ImGui::UpdateDebugToolStackQueries() } } -// [DEBUG] Stack tool: hooks called by GetID() family functions +// [DEBUG] ID Stack tool: hooks called by GetID() family functions void ImGui::DebugHookIdInfo(ImGuiID id, ImGuiDataType data_type, const void* data_id, const void* data_id_end) { ImGuiContext& g = *GImGui; ImGuiWindow* window = g.CurrentWindow; - ImGuiStackTool* tool = &g.DebugStackTool; + ImGuiIDStackTool* tool = &g.DebugIDStackTool; // Step 0: stack query // This assumes that the ID was computed with the current ID stack, which tends to be the case for our widget. @@ -20703,7 +21430,7 @@ void ImGui::DebugHookIdInfo(ImGuiID id, ImGuiDataType data_type, const void* dat info->DataType = data_type; } -static int StackToolFormatLevelInfo(ImGuiStackTool* tool, int n, bool format_for_ui, char* buf, size_t buf_size) +static int StackToolFormatLevelInfo(ImGuiIDStackTool* tool, int n, bool format_for_ui, char* buf, size_t buf_size) { ImGuiStackLevelInfo* info = &tool->Results[n]; ImGuiWindow* window = (info->Desc[0] == 0 && n == 0) ? ImGui::FindWindowByID(info->ID) : NULL; @@ -20720,20 +21447,20 @@ static int StackToolFormatLevelInfo(ImGuiStackTool* tool, int n, bool format_for return ImFormatString(buf, buf_size, "???"); } -// Stack Tool: Display UI -void ImGui::ShowStackToolWindow(bool* p_open) +// ID Stack Tool: Display UI +void ImGui::ShowIDStackToolWindow(bool* p_open) { ImGuiContext& g = *GImGui; if (!(g.NextWindowData.Flags & ImGuiNextWindowDataFlags_HasSize)) SetNextWindowSize(ImVec2(0.0f, GetFontSize() * 8.0f), ImGuiCond_FirstUseEver); - if (!Begin("Dear ImGui Stack Tool", p_open) || GetCurrentWindow()->BeginCount > 1) + if (!Begin("Dear ImGui ID Stack Tool", p_open) || GetCurrentWindow()->BeginCount > 1) { End(); return; } // Display hovered/active status - ImGuiStackTool* tool = &g.DebugStackTool; + ImGuiIDStackTool* tool = &g.DebugIDStackTool; const ImGuiID hovered_id = g.HoveredIdPreviousFrame; const ImGuiID active_id = g.ActiveId; #ifdef IMGUI_ENABLE_TEST_ENGINE @@ -20749,7 +21476,7 @@ void ImGui::ShowStackToolWindow(bool* p_open) Checkbox("Ctrl+C: copy path to clipboard", &tool->CopyToClipboardOnCtrlC); SameLine(); TextColored((time_since_copy >= 0.0f && time_since_copy < 0.75f && ImFmod(time_since_copy, 0.25f) < 0.25f * 0.5f) ? ImVec4(1.f, 1.f, 0.3f, 1.f) : ImVec4(), "*COPIED*"); - if (tool->CopyToClipboardOnCtrlC && IsKeyDown(ImGuiMod_Ctrl) && IsKeyPressed(ImGuiKey_C)) + if (tool->CopyToClipboardOnCtrlC && Shortcut(ImGuiMod_Ctrl | ImGuiKey_C, 0, ImGuiInputFlags_RouteGlobal)) { tool->CopyToClipboardLastTime = (float)g.Time; char* p = g.TempBuffer.Data; @@ -20815,10 +21542,9 @@ void ImGui::DebugNodeViewport(ImGuiViewportP*) {} void ImGui::DebugLog(const char*, ...) {} void ImGui::DebugLogV(const char*, va_list) {} void ImGui::ShowDebugLogWindow(bool*) {} -void ImGui::ShowStackToolWindow(bool*) {} +void ImGui::ShowIDStackToolWindow(bool*) {} +void ImGui::DebugStartItemPicker() {} void ImGui::DebugHookIdInfo(ImGuiID, ImGuiDataType, const void*, const void*) {} -void ImGui::UpdateDebugToolItemPicker() {} -void ImGui::UpdateDebugToolStackQueries() {} #endif // #ifndef IMGUI_DISABLE_DEBUG_TOOLS diff --git a/cimgui/imgui/imgui.h b/cimgui/imgui/imgui.h index d39ab3591..c2df6703c 100644 --- a/cimgui/imgui/imgui.h +++ b/cimgui/imgui/imgui.h @@ -1,4 +1,4 @@ -// dear imgui, v1.90 WIP +// dear imgui, v1.90.4 // (headers) // Help: @@ -11,7 +11,7 @@ // - Getting Started https://dearimgui.com/getting-started // - Homepage https://github.com/ocornut/imgui // - Releases & changelog https://github.com/ocornut/imgui/releases -// - Gallery https://github.com/ocornut/imgui/issues/6478 (please post your screenshots/video there!) +// - Gallery https://github.com/ocornut/imgui/issues/6897 (please post your screenshots/video there!) // - Wiki https://github.com/ocornut/imgui/wiki (lots of good stuff there) // - Glossary https://github.com/ocornut/imgui/wiki/Glossary // - Issues & support https://github.com/ocornut/imgui/issues @@ -23,8 +23,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 WIP" -#define IMGUI_VERSION_NUM 18992 +#define IMGUI_VERSION "1.90.4" +#define IMGUI_VERSION_NUM 19040 #define IMGUI_HAS_TABLE #define IMGUI_HAS_VIEWPORT // Viewport WIP branch #define IMGUI_HAS_DOCK // Docking WIP branch @@ -36,10 +36,11 @@ Index of this file: // [SECTION] Forward declarations and basic types // [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] ImGuiStyle // [SECTION] ImGuiIO -// [SECTION] Misc data structures (ImGuiInputTextCallbackData, ImGuiSizeCallbackData, ImGuiWindowClass, ImGuiPayload, ImGuiTableSortSpecs, ImGuiTableColumnSortSpecs) +// [SECTION] Misc data structures (ImGuiInputTextCallbackData, ImGuiSizeCallbackData, ImGuiWindowClass, ImGuiPayload) // [SECTION] Helpers (ImGuiOnceUponAFrame, ImGuiTextFilter, ImGuiTextBuffer, ImGuiStorage, ImGuiListClipper, Math Operators, ImColor) // [SECTION] Drawing API (ImDrawCallback, ImDrawCmd, ImDrawIdx, ImDrawVert, ImDrawChannel, ImDrawListSplitter, ImDrawFlags, ImDrawListFlags, ImDrawList, ImDrawData) // [SECTION] Font API (ImFontConfig, ImFontGlyph, ImFontGlyphRangesBuilder, ImFontAtlasFlags, ImFontAtlas, ImFont) @@ -87,10 +88,11 @@ Index of this file: #endif #define IM_ARRAYSIZE(_ARR) ((int)(sizeof(_ARR) / sizeof(*(_ARR)))) // Size of a static C-style array. Don't use on pointers! #define IM_UNUSED(_VAR) ((void)(_VAR)) // Used to silence "unused variable warnings". Often useful as asserts may be stripped out from final builds. -#define IM_OFFSETOF(_TYPE,_MEMBER) offsetof(_TYPE, _MEMBER) // Offset of _MEMBER within _TYPE. Standardized as offsetof() in C++11 #define IMGUI_CHECKVERSION() ImGui::DebugCheckVersionAndDataLayout(IMGUI_VERSION, sizeof(ImGuiIO), sizeof(ImGuiStyle), sizeof(ImVec2), sizeof(ImVec4), sizeof(ImDrawVert), sizeof(ImDrawIdx)) // Helper Macros - IM_FMTARGS, IM_FMTLIST: Apply printf-style warnings to our formatting functions. +// (MSVC provides an equivalent mechanism via SAL Annotations but it would require the macros in a different +// location. e.g. #include + void myprintf(_Printf_format_string_ const char* format, ...)) #if !defined(IMGUI_USE_STB_SPRINTF) && defined(__MINGW32__) && !defined(__clang__) #define IM_FMTARGS(FMT) __attribute__((format(gnu_printf, FMT, FMT+1))) #define IM_FMTLIST(FMT) __attribute__((format(gnu_printf, FMT, 0))) @@ -123,6 +125,7 @@ Index of this file: #endif #pragma clang diagnostic ignored "-Wunknown-pragmas" // warning: unknown warning group 'xxx' #pragma clang diagnostic ignored "-Wold-style-cast" +#pragma clang diagnostic ignored "-Wfloat-equal" // warning: comparing floating point with == or != is unsafe #pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant" #pragma clang diagnostic ignored "-Wreserved-identifier" // warning: identifier '_Xxx' is reserved because it starts with '_' followed by a capital letter #elif defined(__GNUC__) @@ -187,7 +190,7 @@ typedef int ImGuiSortDirection; // -> enum ImGuiSortDirection_ // Enum: A typedef int ImGuiStyleVar; // -> enum ImGuiStyleVar_ // Enum: A variable identifier for styling typedef int ImGuiTableBgTarget; // -> enum ImGuiTableBgTarget_ // Enum: A color target for TableSetBgColor() -// Flags (declared as int for compatibility with old C++, to allow using as flags without overhead, and to not pollute the top of this file) +// Flags (declared as int to allow using as flags without overhead, and to not pollute the top of this file) // - Tip: Use your programming IDE navigation facilities on the names in the _central column_ below to find the actual flags/enum lists! // In Visual Studio IDE: CTRL+comma ("Edit.GoToAll") can follow symbols in comments, whereas CTRL+F12 ("Edit.GoToImplementation") cannot. // With Visual Assist installed: ALT+G ("VAssistX.GoToImplementation") can also follow symbols in comments. @@ -196,6 +199,7 @@ typedef int ImDrawListFlags; // -> enum ImDrawListFlags_ // Flags: f typedef int ImFontAtlasFlags; // -> enum ImFontAtlasFlags_ // Flags: for ImFontAtlas build typedef int ImGuiBackendFlags; // -> enum ImGuiBackendFlags_ // Flags: for io.BackendFlags typedef int ImGuiButtonFlags; // -> enum ImGuiButtonFlags_ // Flags: for InvisibleButton() +typedef int ImGuiChildFlags; // -> enum ImGuiChildFlags_ // Flags: for BeginChild() typedef int ImGuiColorEditFlags; // -> enum ImGuiColorEditFlags_ // Flags: for ColorEdit4(), ColorPicker4() etc. typedef int ImGuiConfigFlags; // -> enum ImGuiConfigFlags_ // Flags: for io.ConfigFlags typedef int ImGuiComboFlags; // -> enum ImGuiComboFlags_ // Flags: for BeginCombo() @@ -204,7 +208,7 @@ typedef int ImGuiDragDropFlags; // -> enum ImGuiDragDropFlags_ // Flags: f typedef int ImGuiFocusedFlags; // -> enum ImGuiFocusedFlags_ // Flags: for IsWindowFocused() typedef int ImGuiHoveredFlags; // -> enum ImGuiHoveredFlags_ // Flags: for IsItemHovered(), IsWindowHovered() etc. typedef int ImGuiInputTextFlags; // -> enum ImGuiInputTextFlags_ // Flags: for InputText(), InputTextMultiline() -typedef int ImGuiKeyChord; // -> ImGuiKey | ImGuiMod_XXX // Flags: for storage only for now: an ImGuiKey optionally OR-ed with one or more ImGuiMod_XXX values. +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 ImGuiSelectableFlags; // -> enum ImGuiSelectableFlags_ // Flags: for Selectable() typedef int ImGuiSliderFlags; // -> enum ImGuiSliderFlags_ // Flags: for DragFloat(), DragInt(), SliderFloat(), SliderInt() etc. @@ -260,6 +264,7 @@ typedef void (*ImGuiMemFreeFunc)(void* ptr, void* user_data); // ImVec2: 2D vector used to store positions, sizes etc. [Compile-time configurable type] // This is a frequently used type in the API. Consider using IM_VEC2_CLASS_EXTRA to create implicit cast from/to our preferred type. +// Add '#define IMGUI_DEFINE_MATH_OPERATORS' in your imconfig.h file to benefit from courtesy maths operators for those types. IM_MSVC_RUNTIME_CHECKS_OFF struct ImVec2 { @@ -303,7 +308,7 @@ namespace ImGui // Main IMGUI_API ImGuiIO& GetIO(); // access the IO structure (mouse/keyboard/gamepad inputs, time, various configuration options/flags) - IMGUI_API ImGuiStyle& GetStyle(); // access the Style structure (colors, sizes). Always use PushStyleCol(), PushStyleVar() to modify style mid-frame! + IMGUI_API ImGuiStyle& GetStyle(); // access the Style structure (colors, sizes). Always use PushStyleColor(), PushStyleVar() to modify style mid-frame! IMGUI_API void NewFrame(); // start a new Dear ImGui frame, you can submit any command from this point until Render()/EndFrame(). IMGUI_API void EndFrame(); // ends the Dear ImGui frame. automatically called by Render(). If you don't need to render data (skipping rendering) you may call EndFrame() without Render()... but you'll have wasted CPU already! If you don't need to render, better to not create any windows and not call NewFrame() at all! IMGUI_API void Render(); // ends the Dear ImGui frame, finalize the draw data. You can then get call GetDrawData(). @@ -313,7 +318,7 @@ namespace ImGui IMGUI_API void ShowDemoWindow(bool* p_open = NULL); // create Demo window. demonstrate most ImGui features. call this to learn about the library! try to make it always available in your application! IMGUI_API void ShowMetricsWindow(bool* p_open = NULL); // create Metrics/Debugger window. display Dear ImGui internals: windows, draw commands, various internal state, etc. IMGUI_API void ShowDebugLogWindow(bool* p_open = NULL); // create Debug Log window. display a simplified log of important dear imgui events. - IMGUI_API void ShowStackToolWindow(bool* p_open = NULL); // create Stack Tool window. hover items with mouse to query information about the source of their unique ID. + IMGUI_API void ShowIDStackToolWindow(bool* p_open = NULL); // create Stack Tool window. hover items with mouse to query information about the source of their unique ID. IMGUI_API void ShowAboutWindow(bool* p_open = NULL); // create About window. display Dear ImGui version, credits and build/system information. IMGUI_API void ShowStyleEditor(ImGuiStyle* ref = NULL); // add style editor block (not a window). you can pass in a reference ImGuiStyle structure to compare to, revert to and save to (else it uses the default style) IMGUI_API bool ShowStyleSelector(const char* label); // add style selector block (not a window), essentially a combo listing the default styles. @@ -334,23 +339,33 @@ namespace ImGui // Some information such as 'flags' or 'p_open' will only be considered by the first call to Begin(). // - Begin() return false to indicate the window is collapsed or fully clipped, so you may early out and omit submitting // anything to the window. Always call a matching End() for each Begin() call, regardless of its return value! - // [Important: due to legacy reason, this is inconsistent with most other functions such as BeginMenu/EndMenu, - // BeginPopup/EndPopup, etc. where the EndXXX call should only be called if the corresponding BeginXXX function - // returned true. Begin and BeginChild are the only odd ones out. Will be fixed in a future update.] + // [Important: due to legacy reason, Begin/End and BeginChild/EndChild are inconsistent with all other functions + // such as BeginMenu/EndMenu, BeginPopup/EndPopup, etc. where the EndXXX call should only be called if the corresponding + // BeginXXX function returned true. Begin and BeginChild are the only odd ones out. Will be fixed in a future update.] // - Note that the bottom of window stack always contains a window called "Debug". IMGUI_API bool Begin(const char* name, bool* p_open = NULL, ImGuiWindowFlags flags = 0); IMGUI_API void End(); // Child Windows // - Use child windows to begin into a self-contained independent scrolling/clipping regions within a host window. Child windows can embed their own child. - // - For each independent axis of 'size': ==0.0f: use remaining host window size / >0.0f: fixed size / <0.0f: use remaining window size minus abs(size) / Each axis can use a different mode, e.g. ImVec2(0,400). - // - BeginChild() returns false to indicate the window is collapsed or fully clipped, so you may early out and omit submitting anything to the window. - // Always call a matching EndChild() for each BeginChild() call, regardless of its return value. - // [Important: due to legacy reason, this is inconsistent with most other functions such as BeginMenu/EndMenu, - // BeginPopup/EndPopup, etc. where the EndXXX call should only be called if the corresponding BeginXXX function - // returned true. Begin and BeginChild are the only odd ones out. Will be fixed in a future update.] - IMGUI_API bool BeginChild(const char* str_id, const ImVec2& size = ImVec2(0, 0), bool border = false, ImGuiWindowFlags flags = 0); - IMGUI_API bool BeginChild(ImGuiID id, const ImVec2& size = ImVec2(0, 0), bool border = false, ImGuiWindowFlags flags = 0); + // - Before 1.90 (November 2023), the "ImGuiChildFlags child_flags = 0" parameter was "bool border = false". + // This API is backward compatible with old code, as we guarantee that ImGuiChildFlags_Border == true. + // Consider updating your old code: + // BeginChild("Name", size, false) -> Begin("Name", size, 0); or Begin("Name", size, ImGuiChildFlags_None); + // BeginChild("Name", size, true) -> Begin("Name", size, ImGuiChildFlags_Border); + // - Manual sizing (each axis can use a different setting e.g. ImVec2(0.0f, 400.0f)): + // == 0.0f: use remaining parent window size for this axis. + // > 0.0f: use specified size for this axis. + // < 0.0f: right/bottom-align to specified distance from available content boundaries. + // - Specifying ImGuiChildFlags_AutoResizeX or ImGuiChildFlags_AutoResizeY makes the sizing automatic based on child contents. + // Combining both ImGuiChildFlags_AutoResizeX _and_ ImGuiChildFlags_AutoResizeY defeats purpose of a scrolling region and is NOT recommended. + // - BeginChild() returns false to indicate the window is collapsed or fully clipped, so you may early out and omit submitting + // anything to the window. Always call a matching EndChild() for each BeginChild() call, regardless of its return value. + // [Important: due to legacy reason, Begin/End and BeginChild/EndChild are inconsistent with all other functions + // such as BeginMenu/EndMenu, BeginPopup/EndPopup, etc. where the EndXXX call should only be called if the corresponding + // BeginXXX function returned true. Begin and BeginChild are the only odd ones out. Will be fixed in a future update.] + IMGUI_API bool BeginChild(const char* str_id, const ImVec2& size = ImVec2(0, 0), ImGuiChildFlags child_flags = 0, ImGuiWindowFlags window_flags = 0); + IMGUI_API bool BeginChild(ImGuiID id, const ImVec2& size = ImVec2(0, 0), ImGuiChildFlags child_flags = 0, ImGuiWindowFlags window_flags = 0); IMGUI_API void EndChild(); // Windows Utilities @@ -358,11 +373,11 @@ namespace ImGui IMGUI_API bool IsWindowAppearing(); IMGUI_API bool IsWindowCollapsed(); IMGUI_API bool IsWindowFocused(ImGuiFocusedFlags flags=0); // is current window focused? or its root/child, depending on flags. see flags for options. - IMGUI_API bool IsWindowHovered(ImGuiHoveredFlags flags=0); // is current window hovered (and typically: not blocked by a popup/modal)? see flags for options. NB: If you are trying to check whether your mouse should be dispatched to imgui or to your app, you should use the 'io.WantCaptureMouse' boolean for that! Please read the FAQ! + IMGUI_API bool 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. IMGUI_API ImDrawList* GetWindowDrawList(); // get draw list associated to the current window, to append your own drawing primitives IMGUI_API float GetWindowDpiScale(); // get DPI scale currently associated to the current window's viewport. - IMGUI_API ImVec2 GetWindowPos(); // get current window position in screen space (note: it is unlikely you need to use this. Consider using current layout pos instead, GetScreenCursorPos()) - IMGUI_API ImVec2 GetWindowSize(); // get current window size (note: it is unlikely you need to use this. Consider using GetScreenCursorPos() and e.g. GetContentRegionAvail() instead) + IMGUI_API ImVec2 GetWindowPos(); // get current window position in screen space (note: it is unlikely you need to use this. Consider using current layout pos instead, GetCursorScreenPos()) + IMGUI_API ImVec2 GetWindowSize(); // get current window size (note: it is unlikely you need to use this. Consider using GetCursorScreenPos() and e.g. GetContentRegionAvail() instead) IMGUI_API float GetWindowWidth(); // get current window width (shortcut for GetWindowSize().x) IMGUI_API float GetWindowHeight(); // get current window height (shortcut for GetWindowSize().y) IMGUI_API ImGuiViewport*GetWindowViewport(); // get viewport currently associated to the current window. @@ -371,7 +386,7 @@ namespace ImGui // - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin). IMGUI_API void SetNextWindowPos(const ImVec2& pos, ImGuiCond cond = 0, const ImVec2& pivot = ImVec2(0, 0)); // set next window position. call before Begin(). use pivot=(0.5f,0.5f) to center on given point, etc. IMGUI_API void SetNextWindowSize(const ImVec2& size, ImGuiCond cond = 0); // set next window size. set axis to 0.0f to force an auto-fit on this axis. call before Begin() - IMGUI_API void SetNextWindowSizeConstraints(const ImVec2& size_min, const ImVec2& size_max, ImGuiSizeCallback custom_callback = NULL, void* custom_callback_data = NULL); // set next window size limits. use -1,-1 on either X/Y axis to preserve the current size. Sizes will be rounded down. Use callback to apply non-trivial programmatic constraints. + IMGUI_API void SetNextWindowSizeConstraints(const ImVec2& size_min, const ImVec2& size_max, ImGuiSizeCallback custom_callback = NULL, void* custom_callback_data = NULL); // set next window size limits. use 0.0f or FLT_MAX if you don't want limits. Use -1 for both min and max of same axis to preserve current size (which itself is a constraint). Use callback to apply non-trivial programmatic constraints. IMGUI_API void SetNextWindowContentSize(const ImVec2& size); // set next window content size (~ scrollable client area, which enforce the range of scrollbars). Not including window decorations (title bar, menu bar, etc.) nor WindowPadding. set an axis to 0.0f to leave it automatic. call before Begin() IMGUI_API void SetNextWindowCollapsed(bool collapsed, ImGuiCond cond = 0); // set next window collapsed state. call before Begin() IMGUI_API void SetNextWindowFocus(); // set next window to be focused / top-most. call before Begin() @@ -439,16 +454,28 @@ namespace ImGui IMGUI_API ImVec2 GetFontTexUvWhitePixel(); // get UV coordinate for a while pixel, useful to draw custom shapes via the ImDrawList API IMGUI_API ImU32 GetColorU32(ImGuiCol idx, float alpha_mul = 1.0f); // retrieve given style color with style alpha applied and optional extra alpha multiplier, packed as a 32-bit value suitable for ImDrawList IMGUI_API ImU32 GetColorU32(const ImVec4& col); // retrieve given color with style alpha applied, packed as a 32-bit value suitable for ImDrawList - IMGUI_API ImU32 GetColorU32(ImU32 col); // retrieve given color with style alpha applied, packed as a 32-bit value suitable for ImDrawList + IMGUI_API ImU32 GetColorU32(ImU32 col, float alpha_mul = 1.0f); // retrieve given color with style alpha applied, packed as a 32-bit value suitable for ImDrawList IMGUI_API const ImVec4& GetStyleColorVec4(ImGuiCol idx); // retrieve style color as stored in ImGuiStyle structure. use to feed back into PushStyleColor(), otherwise use GetColorU32() to get style color with style alpha baked in. - // Cursor / Layout + // Layout cursor positioning // - 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. // - Attention! We currently have inconsistencies between window-local and absolute positions we will aim to fix with future API: - // Window-local coordinates: SameLine(), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), GetContentRegionMax(), GetWindowContentRegion*(), PushTextWrapPos() - // Absolute coordinate: GetCursorScreenPos(), SetCursorScreenPos(), all ImDrawList:: functions. + // - 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. + IMGUI_API ImVec2 GetCursorScreenPos(); // cursor position in absolute coordinates (prefer using this, also more useful to work with ImDrawList API). + IMGUI_API void SetCursorScreenPos(const ImVec2& pos); // cursor position in absolute coordinates + IMGUI_API ImVec2 GetCursorPos(); // [window-local] cursor position in window coordinates (relative to window position) + IMGUI_API float GetCursorPosX(); // [window-local] " + IMGUI_API float GetCursorPosY(); // [window-local] " + IMGUI_API void SetCursorPos(const ImVec2& local_pos); // [window-local] " + IMGUI_API void SetCursorPosX(float local_x); // [window-local] " + IMGUI_API void SetCursorPosY(float local_y); // [window-local] " + IMGUI_API ImVec2 GetCursorStartPos(); // [window-local] initial cursor position, in window coordinates + + // Other layout functions IMGUI_API void Separator(); // separator, generally horizontal. inside a menu bar or in horizontal layout mode, this becomes a vertical separator. IMGUI_API void SameLine(float offset_from_start_x=0.0f, float spacing=-1.0f); // call between widgets or groups to layout them horizontally. X position given in window coordinates. IMGUI_API void NewLine(); // undo a SameLine() or force a new line when in a horizontal-layout context. @@ -458,15 +485,6 @@ namespace ImGui IMGUI_API void Unindent(float indent_w = 0.0f); // move content position back to the left, by indent_w, or style.IndentSpacing if indent_w <= 0 IMGUI_API void BeginGroup(); // lock horizontal starting position IMGUI_API void EndGroup(); // unlock horizontal starting position + capture the whole group bounding box into one "item" (so you can use IsItemHovered() or layout primitives such as SameLine() on whole group, etc.) - IMGUI_API ImVec2 GetCursorPos(); // cursor position in window coordinates (relative to window position) - IMGUI_API float GetCursorPosX(); // (some functions are using window-relative coordinates, such as: GetCursorPos, GetCursorStartPos, GetContentRegionMax, GetWindowContentRegion* etc. - IMGUI_API float GetCursorPosY(); // other functions such as GetCursorScreenPos or everything in ImDrawList:: - IMGUI_API void SetCursorPos(const ImVec2& local_pos); // are using the main, absolute coordinate system. - IMGUI_API void SetCursorPosX(float local_x); // GetWindowPos() + GetCursorPos() == GetCursorScreenPos() etc.) - IMGUI_API void SetCursorPosY(float local_y); // - IMGUI_API ImVec2 GetCursorStartPos(); // initial cursor position in window coordinates - IMGUI_API ImVec2 GetCursorScreenPos(); // cursor position in absolute coordinates (useful to work with ImDrawList API). generally top-left == GetMainViewport()->Pos == (0,0) in single viewport mode, and bottom-right == GetMainViewport()->Pos+Size == io.DisplaySize in single-viewport mode. - IMGUI_API void SetCursorScreenPos(const ImVec2& pos); // cursor position in absolute coordinates IMGUI_API void AlignTextToFramePadding(); // vertically align upcoming text baseline to FramePadding.y so that it will align properly to regularly framed items (call if you have text on a line before a framed item) IMGUI_API float GetTextLineHeight(); // ~ FontSize IMGUI_API float GetTextLineHeightWithSpacing(); // ~ FontSize + style.ItemSpacing.y (distance in pixels between 2 consecutive lines of text) @@ -513,7 +531,7 @@ namespace ImGui // - Most widgets return true when the value has been changed or when pressed/selected // - You may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state. IMGUI_API bool Button(const char* label, const ImVec2& size = ImVec2(0, 0)); // button - IMGUI_API bool SmallButton(const char* label); // button with FramePadding=(0,0) to easily embed within text + IMGUI_API bool SmallButton(const char* label); // button with (FramePadding.y == 0) to easily embed within text IMGUI_API bool InvisibleButton(const char* str_id, const ImVec2& size, ImGuiButtonFlags flags = 0); // flexible button behavior without the visuals, frequently useful to build custom behaviors using the public api (along with IsItemActive, IsItemHovered, etc.) IMGUI_API bool ArrowButton(const char* str_id, ImGuiDir dir); // square button with an arrow shape IMGUI_API bool Checkbox(const char* label, bool* v); @@ -526,8 +544,10 @@ namespace ImGui // Widgets: Images // - Read about ImTextureID here: https://github.com/ocornut/imgui/wiki/Image-Loading-and-Displaying-Examples - IMGUI_API void Image(ImTextureID user_texture_id, const ImVec2& size, const ImVec2& uv0 = ImVec2(0, 0), const ImVec2& uv1 = ImVec2(1, 1), const ImVec4& tint_col = ImVec4(1, 1, 1, 1), const ImVec4& border_col = ImVec4(0, 0, 0, 0)); - IMGUI_API bool ImageButton(const char* str_id, ImTextureID user_texture_id, const ImVec2& size, const ImVec2& uv0 = ImVec2(0, 0), const ImVec2& uv1 = ImVec2(1, 1), const ImVec4& bg_col = ImVec4(0, 0, 0, 0), const ImVec4& tint_col = ImVec4(1, 1, 1, 1)); + // - 'uv0' and 'uv1' are texture coordinates. Read about them from the same link above. + // - Note that Image() may add +2.0f to provided size if a border is visible, ImageButton() adds style.FramePadding*2.0f to provided size. + IMGUI_API void Image(ImTextureID user_texture_id, const ImVec2& image_size, const ImVec2& uv0 = ImVec2(0, 0), const ImVec2& uv1 = ImVec2(1, 1), const ImVec4& tint_col = ImVec4(1, 1, 1, 1), const ImVec4& border_col = ImVec4(0, 0, 0, 0)); + IMGUI_API bool ImageButton(const char* str_id, ImTextureID user_texture_id, const ImVec2& image_size, const ImVec2& uv0 = ImVec2(0, 0), const ImVec2& uv1 = ImVec2(1, 1), const ImVec4& bg_col = ImVec4(0, 0, 0, 0), const ImVec4& tint_col = ImVec4(1, 1, 1, 1)); // Widgets: Combo Box (Dropdown) // - The BeginCombo()/EndCombo() api allows you to manage your contents and selection state however you want it, by creating e.g. Selectable() items. @@ -624,9 +644,9 @@ namespace ImGui IMGUI_API bool TreeNodeEx(const void* ptr_id, ImGuiTreeNodeFlags flags, const char* fmt, ...) IM_FMTARGS(3); IMGUI_API bool TreeNodeExV(const char* str_id, ImGuiTreeNodeFlags flags, const char* fmt, va_list args) IM_FMTLIST(3); IMGUI_API bool TreeNodeExV(const void* ptr_id, ImGuiTreeNodeFlags flags, const char* fmt, va_list args) IM_FMTLIST(3); - IMGUI_API void TreePush(const char* str_id); // ~ Indent()+PushId(). Already called by TreeNode() when returning true, but you can call TreePush/TreePop yourself if desired. + IMGUI_API void TreePush(const char* str_id); // ~ Indent()+PushID(). Already called by TreeNode() when returning true, but you can call TreePush/TreePop yourself if desired. IMGUI_API void TreePush(const void* ptr_id); // " - IMGUI_API void TreePop(); // ~ Unindent()+PopId() + IMGUI_API void TreePop(); // ~ Unindent()+PopID() IMGUI_API float GetTreeNodeToLabelSpacing(); // horizontal distance preceding label when using TreeNode*() or Bullet() == (g.FontSize + style.FramePadding.x*2) for a regular unframed TreeNode IMGUI_API bool 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(). IMGUI_API bool CollapsingHeader(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. @@ -639,8 +659,8 @@ namespace ImGui IMGUI_API bool Selectable(const char* label, bool* p_selected, ImGuiSelectableFlags flags = 0, const ImVec2& size = ImVec2(0, 0)); // "bool* p_selected" point to the selection state (read-write), as a convenient helper. // Widgets: List Boxes - // - This is essentially a thin wrapper to using BeginChild/EndChild with some stylistic changes. - // - The BeginListBox()/EndListBox() api allows you to manage your contents and selection state however you want it, by creating e.g. Selectable() or any items. + // - 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. // - The simplified/old ListBox() api are helpers over BeginListBox()/EndListBox() which are kept available for convenience purpose. This is analoguous to how Combos are created. // - Choose frame width: size.x > 0.0f: custom / size.x < 0.0f or -FLT_MIN: right-align / size.x = 0.0f (default): use current ItemWidth // - Choose frame height: size.y > 0.0f: custom / size.y < 0.0f or -FLT_MIN: bottom-align / size.y = 0.0f (default): arbitrary default height which can fit ~7 items @@ -686,9 +706,9 @@ namespace ImGui IMGUI_API void SetTooltipV(const char* fmt, va_list args) IM_FMTLIST(1); // Tooltips: helpers for showing a tooltip when hovering an item - // - BeginItemTooltip() is a shortcut for the 'if (IsItemHovered(ImGuiHoveredFlags_Tooltip) && BeginTooltip())' idiom. - // - SetItemTooltip() is a shortcut for the 'if (IsItemHovered(ImGuiHoveredFlags_Tooltip)) { SetTooltip(...); }' idiom. - // - Where 'ImGuiHoveredFlags_Tooltip' itself is a shortcut to use 'style.HoverFlagsForTooltipMouse' or 'style.HoverFlagsForTooltipNav' depending on active input type. For mouse it defaults to 'ImGuiHoveredFlags_Stationary | ImGuiHoveredFlags_DelayShort'. + // - BeginItemTooltip() is a shortcut for the 'if (IsItemHovered(ImGuiHoveredFlags_ForTooltip) && BeginTooltip())' idiom. + // - SetItemTooltip() is a shortcut for the 'if (IsItemHovered(ImGuiHoveredFlags_ForTooltip)) { SetTooltip(...); }' idiom. + // - Where 'ImGuiHoveredFlags_ForTooltip' itself is a shortcut to use 'style.HoverFlagsForTooltipMouse' or 'style.HoverFlagsForTooltipNav' depending on active input type. For mouse it defaults to 'ImGuiHoveredFlags_Stationary | ImGuiHoveredFlags_DelayShort'. IMGUI_API bool BeginItemTooltip(); // begin/append a tooltip window if preceding item was hovered. IMGUI_API void SetItemTooltip(const char* fmt, ...) IM_FMTARGS(1); // set a text-only tooltip if preceeding item was hovered. override any previous call to SetTooltip(). IMGUI_API void SetItemTooltipV(const char* fmt, va_list args) IM_FMTLIST(1); @@ -701,9 +721,7 @@ namespace ImGui // - You can bypass the hovering restriction by using ImGuiHoveredFlags_AllowWhenBlockedByPopup when calling IsItemHovered() or IsWindowHovered(). // - IMPORTANT: Popup identifiers are relative to the current ID stack, so OpenPopup and BeginPopup generally needs to be at the same level of the stack. // This is sometimes leading to confusing mistakes. May rework this in the future. - - // Popups: begin/end functions - // - BeginPopup(): query popup state, if open start appending into the window. Call EndPopup() afterwards. ImGuiWindowFlags are forwarded to the window. + // - BeginPopup(): query popup state, if open start appending into the window. Call EndPopup() afterwards if returned true. ImGuiWindowFlags are forwarded to the window. // - BeginPopupModal(): block every interaction behind the window, cannot be closed by user, add a dimming background, has a title bar. IMGUI_API bool BeginPopup(const char* str_id, ImGuiWindowFlags flags = 0); // return true if the popup is open, and you can start outputting to it. IMGUI_API bool BeginPopupModal(const char* name, bool* p_open = NULL, ImGuiWindowFlags flags = 0); // return true if the modal is open, and you can start outputting to it. @@ -753,12 +771,10 @@ namespace ImGui // TableNextColumn() will automatically wrap-around into the next row if needed. // - IMPORTANT: Comparatively to the old Columns() API, we need to call TableNextColumn() for the first column! // - Summary of possible call flow: - // -------------------------------------------------------------------------------------------------------- - // TableNextRow() -> TableSetColumnIndex(0) -> Text("Hello 0") -> TableSetColumnIndex(1) -> Text("Hello 1") // OK - // TableNextRow() -> TableNextColumn() -> Text("Hello 0") -> TableNextColumn() -> Text("Hello 1") // OK - // TableNextColumn() -> Text("Hello 0") -> TableNextColumn() -> Text("Hello 1") // OK: TableNextColumn() automatically gets to next row! - // TableNextRow() -> Text("Hello 0") // Not OK! Missing TableSetColumnIndex() or TableNextColumn()! Text will not appear! - // -------------------------------------------------------------------------------------------------------- + // - TableNextRow() -> TableSetColumnIndex(0) -> Text("Hello 0") -> TableSetColumnIndex(1) -> Text("Hello 1") // OK + // - TableNextRow() -> TableNextColumn() -> Text("Hello 0") -> TableNextColumn() -> Text("Hello 1") // OK + // - TableNextColumn() -> Text("Hello 0") -> TableNextColumn() -> Text("Hello 1") // OK: TableNextColumn() automatically gets to next row! + // - TableNextRow() -> Text("Hello 0") // Not OK! Missing TableSetColumnIndex() or TableNextColumn()! Text will not appear! // - 5. Call EndTable() IMGUI_API bool BeginTable(const char* str_id, int column, ImGuiTableFlags flags = 0, const ImVec2& outer_size = ImVec2(0.0f, 0.0f), float inner_width = 0.0f); IMGUI_API void EndTable(); // only call EndTable() if BeginTable() returns true! @@ -776,8 +792,9 @@ namespace ImGui // - Use TableSetupScrollFreeze() to lock columns/rows so they stay visible when scrolled. IMGUI_API void TableSetupColumn(const char* label, ImGuiTableColumnFlags flags = 0, float init_width_or_weight = 0.0f, ImGuiID user_id = 0); IMGUI_API void TableSetupScrollFreeze(int cols, int rows); // lock columns/rows so they stay visible when scrolled. - IMGUI_API void TableHeadersRow(); // submit all headers cells based on data provided to TableSetupColumn() + submit context menu IMGUI_API void TableHeader(const char* label); // submit one header cell manually (rarely used) + IMGUI_API void TableHeadersRow(); // submit a row with headers cells based on data provided to TableSetupColumn() + submit context menu + IMGUI_API void TableAngledHeadersRow(); // submit a row with angled headers for every column with the ImGuiTableColumnFlags_AngledHeader flag. MUST BE FIRST ROW. // Tables: Sorting & Miscellaneous functions // - Sorting: call TableGetSortSpecs() to retrieve latest sort specs for the table. NULL when not sorting. @@ -855,7 +872,7 @@ namespace ImGui 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 void EndDragDropTarget(); // only call EndDragDropTarget() if BeginDragDropTarget() returns true! - IMGUI_API const ImGuiPayload* GetDragDropPayload(); // peek directly into the current payload from anywhere. may return NULL. use ImGuiPayload::IsDataType() to test for the payload type. + IMGUI_API const ImGuiPayload* GetDragDropPayload(); // peek directly into the current payload from anywhere. returns NULL when drag and drop is finished or inactive. use ImGuiPayload::IsDataType() to test for the payload type. // Disabling [BETA API] // - Disable all user interactions and dim items visuals (applying style.DisabledAlpha over current colors) @@ -919,8 +936,6 @@ namespace ImGui IMGUI_API const char* GetStyleColorName(ImGuiCol idx); // get a string corresponding to the enum value (for display, saving, etc.). IMGUI_API void SetStateStorage(ImGuiStorage* storage); // replace current window storage with our own (if you want to manipulate it yourself, typically clear subsection of it) IMGUI_API ImGuiStorage* GetStateStorage(); - IMGUI_API bool BeginChildFrame(ImGuiID id, const ImVec2& size, ImGuiWindowFlags flags = 0); // helper to create a child window / scrolling region that looks like a normal widget frame - IMGUI_API void EndChildFrame(); // always call EndChildFrame() regardless of BeginChildFrame() return values (which indicates a collapsed/clipped window) // Text Utilities IMGUI_API ImVec2 CalcTextSize(const char* text, const char* text_end = NULL, bool hide_text_after_double_hash = false, float wrap_width = -1.0f); @@ -939,6 +954,7 @@ namespace ImGui IMGUI_API bool IsKeyDown(ImGuiKey key); // is key being held. IMGUI_API bool IsKeyPressed(ImGuiKey key, bool repeat = true); // was key pressed (went from !Down to Down)? if repeat=true, uses io.KeyRepeatDelay / KeyRepeatRate IMGUI_API bool IsKeyReleased(ImGuiKey key); // was key released (went from Down to !Down)? + IMGUI_API bool IsKeyChordPressed(ImGuiKeyChord key_chord); // was key chord (mods + key) pressed, e.g. you can pass 'ImGuiMod_Ctrl | ImGuiKey_S' as a key-chord. This doesn't do any routing or focus check, please consider using Shortcut() function instead. IMGUI_API int GetKeyPressedAmount(ImGuiKey key, float repeat_delay, float rate); // uses provided repeat rate/delay. return a count, most often 0 or 1 but might be >1 if RepeatRate is small enough that DeltaTime > RepeatRate IMGUI_API const char* GetKeyName(ImGuiKey key); // [DEBUG] returns English name of the key. Those names a provided for debugging purpose and are not meant to be saved persistently not compared. IMGUI_API void SetNextFrameWantCaptureKeyboard(bool want_capture_keyboard); // Override io.WantCaptureKeyboard flag next frame (said flag is left for your application to handle, typically when true it instructs your app to ignore inputs). e.g. force capture keyboard when your widget is being hovered. This is equivalent to setting "io.WantCaptureKeyboard = want_capture_keyboard"; after the next NewFrame() call. @@ -979,7 +995,10 @@ namespace ImGui IMGUI_API const char* SaveIniSettingsToMemory(size_t* out_ini_size = NULL); // return a zero-terminated string with the .ini data which you can save by your own mean. call when io.WantSaveIniSettings is set, then save data by your own mean and clear io.WantSaveIniSettings. // Debug Utilities + // - Your main debugging friend is the ShowMetricsWindow() function, which is also accessible from Demo->Tools->Metrics Debugger IMGUI_API void DebugTextEncoding(const char* text); + IMGUI_API void DebugFlashStyleColor(ImGuiCol idx); + IMGUI_API void DebugStartItemPicker(); IMGUI_API bool 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. // Memory Allocators @@ -1028,24 +1047,49 @@ enum ImGuiWindowFlags_ ImGuiWindowFlags_NoBringToFrontOnFocus = 1 << 13, // Disable bringing window to front when taking focus (e.g. clicking on it or programmatically giving it focus) ImGuiWindowFlags_AlwaysVerticalScrollbar= 1 << 14, // Always show vertical scrollbar (even if ContentSize.y < Size.y) ImGuiWindowFlags_AlwaysHorizontalScrollbar=1<< 15, // Always show horizontal scrollbar (even if ContentSize.x < Size.x) - ImGuiWindowFlags_AlwaysUseWindowPadding = 1 << 16, // Ensure child windows without border uses style.WindowPadding (ignored by default for non-bordered child windows, because more convenient) - ImGuiWindowFlags_NoNavInputs = 1 << 18, // No gamepad/keyboard navigation within the window - ImGuiWindowFlags_NoNavFocus = 1 << 19, // No focusing toward this window with gamepad/keyboard navigation (e.g. skipped by CTRL+TAB) - ImGuiWindowFlags_UnsavedDocument = 1 << 20, // Display a dot next to the title. When used in a tab/docking context, tab is selected when clicking the X + closure is not assumed (will wait for user to stop submitting the tab). Otherwise closure is assumed when pressing the X, so if you keep submitting the tab may reappear at end of tab bar. - ImGuiWindowFlags_NoDocking = 1 << 21, // Disable docking of this window - + ImGuiWindowFlags_NoNavInputs = 1 << 16, // No gamepad/keyboard navigation within the window + ImGuiWindowFlags_NoNavFocus = 1 << 17, // No focusing toward this window with gamepad/keyboard navigation (e.g. skipped by CTRL+TAB) + ImGuiWindowFlags_UnsavedDocument = 1 << 18, // Display a dot next to the title. When used in a tab/docking context, tab is selected when clicking the X + closure is not assumed (will wait for user to stop submitting the tab). Otherwise closure is assumed when pressing the X, so if you keep submitting the tab may reappear at end of tab bar. + ImGuiWindowFlags_NoDocking = 1 << 19, // Disable docking of this window ImGuiWindowFlags_NoNav = ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus, ImGuiWindowFlags_NoDecoration = ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoCollapse, ImGuiWindowFlags_NoInputs = ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus, // [Internal] - ImGuiWindowFlags_NavFlattened = 1 << 23, // [BETA] On child window: allow gamepad/keyboard navigation to cross over parent border to this child or between sibling child windows. + ImGuiWindowFlags_NavFlattened = 1 << 23, // [BETA] On child window: share focus scope, allow gamepad/keyboard navigation to cross over parent border to this child or between sibling child windows. ImGuiWindowFlags_ChildWindow = 1 << 24, // Don't use! For internal use by BeginChild() ImGuiWindowFlags_Tooltip = 1 << 25, // Don't use! For internal use by BeginTooltip() ImGuiWindowFlags_Popup = 1 << 26, // Don't use! For internal use by BeginPopup() 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_DockNodeHost = 1 << 29, // Don't use! For internal use by Begin()/NewFrame() + + // Obsolete names +#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS + ImGuiWindowFlags_AlwaysUseWindowPadding = 1 << 30, // Obsoleted in 1.90: Use ImGuiChildFlags_AlwaysUseWindowPadding in BeginChild() call. +#endif +}; + +// Flags for ImGui::BeginChild() +// (Legacy: bit 0 must always correspond to ImGuiChildFlags_Border to be backward compatible with old API using 'bool border = false'. +// About using AutoResizeX/AutoResizeY flags: +// - May be combined with SetNextWindowSizeConstraints() to set a min/max size for each axis (see "Demo->Child->Auto-resize with Constraints"). +// - Size measurement for a given axis is only performed when the child window is within visible boundaries, or is just appearing. +// - This allows BeginChild() to return false when not within boundaries (e.g. when scrolling), which is more optimal. BUT it won't update its auto-size while clipped. +// While not perfect, it is a better default behavior as the always-on performance gain is more valuable than the occasional "resizing after becoming visible again" glitch. +// - You may also use ImGuiChildFlags_AlwaysAutoResize to force an update even when child window is not in view. +// HOWEVER PLEASE UNDERSTAND THAT DOING SO WILL PREVENT BeginChild() FROM EVER RETURNING FALSE, disabling benefits of coarse clipping. +enum ImGuiChildFlags_ +{ + ImGuiChildFlags_None = 0, + ImGuiChildFlags_Border = 1 << 0, // Show an outer border and enable WindowPadding. (IMPORTANT: this is always == 1 == true for legacy reason) + ImGuiChildFlags_AlwaysUseWindowPadding = 1 << 1, // Pad with style.WindowPadding even if no border are drawn (no padding by default for non-bordered child windows because it makes more sense) + ImGuiChildFlags_ResizeX = 1 << 2, // Allow resize from right border (layout direction). Enable .ini saving (unless ImGuiWindowFlags_NoSavedSettings passed to window flags) + ImGuiChildFlags_ResizeY = 1 << 3, // Allow resize from bottom border (layout direction). " + ImGuiChildFlags_AutoResizeX = 1 << 4, // Enable auto-resizing width. Read "IMPORTANT: Size measurement" details above. + 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. }; // Flags for ImGui::InputText() @@ -1096,8 +1140,9 @@ enum ImGuiTreeNodeFlags_ ImGuiTreeNodeFlags_FramePadding = 1 << 10, // Use FramePadding (even for an unframed text node) to vertically align text baseline to regular widget height. Equivalent to calling AlignTextToFramePadding(). ImGuiTreeNodeFlags_SpanAvailWidth = 1 << 11, // Extend hit box to the right-most edge, even if not framed. This is not the default in order to allow adding other items on the same line. In the future we may refactor the hit system to be front-to-back, allowing natural overlaps and then this can become the default. ImGuiTreeNodeFlags_SpanFullWidth = 1 << 12, // Extend hit box to the left-most and right-most edges (bypass the indented area). - ImGuiTreeNodeFlags_NavLeftJumpsBackHere = 1 << 13, // (WIP) Nav: left direction may move to this TreeNode() from any of its child (items submitted between TreeNode and TreePop) - //ImGuiTreeNodeFlags_NoScrollOnOpen = 1 << 14, // FIXME: TODO: Disable automatic scroll on TreePop() if node got just open and contents is not visible + ImGuiTreeNodeFlags_SpanAllColumns = 1 << 13, // Frame will span all columns of its container table (text will still fit in current column) + ImGuiTreeNodeFlags_NavLeftJumpsBackHere = 1 << 14, // (WIP) Nav: left direction may move to this TreeNode() from any of its child (items submitted between TreeNode and TreePop) + //ImGuiTreeNodeFlags_NoScrollOnOpen = 1 << 15, // FIXME: TODO: Disable automatic scroll on TreePop() if node got just open and contents is not visible ImGuiTreeNodeFlags_CollapsingHeader = ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoTreePushOnOpen | ImGuiTreeNodeFlags_NoAutoOpenOnLog, #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS @@ -1106,8 +1151,8 @@ enum ImGuiTreeNodeFlags_ }; // Flags for OpenPopup*(), BeginPopupContext*(), IsPopupOpen() functions. -// - To be backward compatible with older API which took an 'int mouse_button = 1' argument, we need to treat -// small flags values as a mouse button index, so we encode the mouse button in the first few bits of the flags. +// - To be backward compatible with older API which took an 'int mouse_button = 1' argument instead of 'ImGuiPopupFlags flags', +// we need to treat small flags values as a mouse button index, so we encode the mouse button in the first few bits of the flags. // It is therefore guaranteed to be legal to pass a mouse button index in ImGuiPopupFlags. // - For the same reason, we exceptionally default the ImGuiPopupFlags argument of BeginPopupContextXXX functions to 1 instead of 0. // IMPORTANT: because the default parameter is 1 (==ImGuiPopupFlags_MouseButtonRight), if you rely on the default parameter @@ -1121,10 +1166,12 @@ enum ImGuiPopupFlags_ ImGuiPopupFlags_MouseButtonMiddle = 2, // For BeginPopupContext*(): open on Middle Mouse release. Guaranteed to always be == 2 (same as ImGuiMouseButton_Middle) ImGuiPopupFlags_MouseButtonMask_ = 0x1F, ImGuiPopupFlags_MouseButtonDefault_ = 1, - ImGuiPopupFlags_NoOpenOverExistingPopup = 1 << 5, // For OpenPopup*(), BeginPopupContext*(): don't open if there's already a popup at the same level of the popup stack - ImGuiPopupFlags_NoOpenOverItems = 1 << 6, // For BeginPopupContextWindow(): don't return true when hovering items, only when hovering empty space - ImGuiPopupFlags_AnyPopupId = 1 << 7, // For IsPopupOpen(): ignore the ImGuiID parameter and test for any popup. - ImGuiPopupFlags_AnyPopupLevel = 1 << 8, // For IsPopupOpen(): search/test at any level of the popup stack (default test in the current level) + ImGuiPopupFlags_NoReopen = 1 << 5, // For OpenPopup*(), BeginPopupContext*(): don't reopen same popup if already open (won't reposition, won't reinitialize navigation) + //ImGuiPopupFlags_NoReopenAlwaysNavInit = 1 << 6, // For OpenPopup*(), BeginPopupContext*(): focus and initialize navigation even when not reopening. + ImGuiPopupFlags_NoOpenOverExistingPopup = 1 << 7, // For OpenPopup*(), BeginPopupContext*(): don't open if there's already a popup at the same level of the popup stack + ImGuiPopupFlags_NoOpenOverItems = 1 << 8, // For BeginPopupContextWindow(): don't return true when hovering items, only when hovering empty space + ImGuiPopupFlags_AnyPopupId = 1 << 10, // For IsPopupOpen(): ignore the ImGuiID parameter and test for any popup. + ImGuiPopupFlags_AnyPopupLevel = 1 << 11, // For IsPopupOpen(): search/test at any level of the popup stack (default test in the current level) ImGuiPopupFlags_AnyPopup = ImGuiPopupFlags_AnyPopupId | ImGuiPopupFlags_AnyPopupLevel, }; @@ -1133,7 +1180,7 @@ enum ImGuiSelectableFlags_ { ImGuiSelectableFlags_None = 0, ImGuiSelectableFlags_DontClosePopups = 1 << 0, // Clicking this doesn't close parent popup window - ImGuiSelectableFlags_SpanAllColumns = 1 << 1, // Selectable frame can span all columns (text will still fit in current column) + 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 @@ -1154,6 +1201,7 @@ enum ImGuiComboFlags_ ImGuiComboFlags_HeightLargest = 1 << 4, // As many fitting items as possible ImGuiComboFlags_NoArrowButton = 1 << 5, // Display on the preview box without the square arrow button ImGuiComboFlags_NoPreview = 1 << 6, // Display only a square arrow button + ImGuiComboFlags_WidthFitPreview = 1 << 7, // Width dynamically calculated from preview contents ImGuiComboFlags_HeightMask_ = ImGuiComboFlags_HeightSmall | ImGuiComboFlags_HeightRegular | ImGuiComboFlags_HeightLarge | ImGuiComboFlags_HeightLargest, }; @@ -1164,7 +1212,7 @@ enum ImGuiTabBarFlags_ ImGuiTabBarFlags_Reorderable = 1 << 0, // Allow manually dragging tabs to re-order them + New tabs are appended at the end of list ImGuiTabBarFlags_AutoSelectNewTabs = 1 << 1, // Automatically select new tabs when they appear ImGuiTabBarFlags_TabListPopupButton = 1 << 2, // Disable buttons to open the tab list popup - ImGuiTabBarFlags_NoCloseWithMiddleMouseButton = 1 << 3, // Disable behavior of closing tabs (that are submitted with p_open != NULL) with middle mouse button. You can still repro this behavior on user's side with if (IsItemHovered() && IsMouseClicked(2)) *p_open = false. + ImGuiTabBarFlags_NoCloseWithMiddleMouseButton = 1 << 3, // Disable behavior of closing tabs (that are submitted with p_open != NULL) with middle mouse button. You may handle this behavior manually on user's side with if (IsItemHovered() && IsMouseClicked(2)) *p_open = false. ImGuiTabBarFlags_NoTabListScrollingButtons = 1 << 4, // Disable scrolling buttons (apply when fitting policy is ImGuiTabBarFlags_FittingPolicyScroll) ImGuiTabBarFlags_NoTooltip = 1 << 5, // Disable tooltips when hovering a tab ImGuiTabBarFlags_FittingPolicyResizeDown = 1 << 6, // Resize tabs when they don't fit @@ -1177,147 +1225,15 @@ enum ImGuiTabBarFlags_ enum ImGuiTabItemFlags_ { ImGuiTabItemFlags_None = 0, - ImGuiTabItemFlags_UnsavedDocument = 1 << 0, // Display a dot next to the title + tab is selected when clicking the X + closure is not assumed (will wait for user to stop submitting the tab). Otherwise closure is assumed when pressing the X, so if you keep submitting the tab may reappear at end of tab bar. + ImGuiTabItemFlags_UnsavedDocument = 1 << 0, // Display a dot next to the title + set ImGuiTabItemFlags_NoAssumedClosure. ImGuiTabItemFlags_SetSelected = 1 << 1, // Trigger flag to programmatically make the tab selected when calling BeginTabItem() - ImGuiTabItemFlags_NoCloseWithMiddleMouseButton = 1 << 2, // Disable behavior of closing tabs (that are submitted with p_open != NULL) with middle mouse button. You can still repro this behavior on user's side with if (IsItemHovered() && IsMouseClicked(2)) *p_open = false. - ImGuiTabItemFlags_NoPushId = 1 << 3, // Don't call PushID(tab->ID)/PopID() on BeginTabItem()/EndTabItem() + ImGuiTabItemFlags_NoCloseWithMiddleMouseButton = 1 << 2, // Disable behavior of closing tabs (that are submitted with p_open != NULL) with middle mouse button. You may handle this behavior manually on user's side with if (IsItemHovered() && IsMouseClicked(2)) *p_open = false. + ImGuiTabItemFlags_NoPushId = 1 << 3, // Don't call PushID()/PopID() on BeginTabItem()/EndTabItem() ImGuiTabItemFlags_NoTooltip = 1 << 4, // Disable tooltip for the given tab ImGuiTabItemFlags_NoReorder = 1 << 5, // Disable reordering this tab or having another tab cross over this tab ImGuiTabItemFlags_Leading = 1 << 6, // Enforce the tab position to the left of the tab bar (after the tab list popup button) ImGuiTabItemFlags_Trailing = 1 << 7, // Enforce the tab position to the right of the tab bar (before the scrolling buttons) -}; - -// Flags for ImGui::BeginTable() -// - 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. -// - The DEFAULT sizing policies are: -// - Default to ImGuiTableFlags_SizingFixedFit if ScrollX is on, or if host window has ImGuiWindowFlags_AlwaysAutoResize. -// - Default to ImGuiTableFlags_SizingStretchSame if ScrollX is off. -// - When ScrollX is off: -// - Table defaults to ImGuiTableFlags_SizingStretchSame -> all Columns defaults to ImGuiTableColumnFlags_WidthStretch with same weight. -// - Columns sizing policy allowed: Stretch (default), Fixed/Auto. -// - 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. -// 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). -// - When ScrollX is on: -// - Table defaults to ImGuiTableFlags_SizingFixedFit -> all Columns defaults to ImGuiTableColumnFlags_WidthFixed -// - Columns sizing policy allowed: Fixed/Auto mostly. -// - Fixed Columns can be enlarged as needed. Table will show a horizontal scrollbar if needed. -// - When using auto-resizing (non-resizable) fixed columns, querying the content width to use item right-alignment e.g. SetNextItemWidth(-FLT_MIN) doesn't make sense, would create a feedback loop. -// - Using Stretch columns OFTEN DOES NOT MAKE SENSE if ScrollX is on, UNLESS you have specified a value for 'inner_width' in BeginTable(). -// If you specify a value for 'inner_width' then effectively the scrolling space is known and Stretch or mixed Fixed/Stretch columns become meaningful again. -// - Read on documentation at the top of imgui_tables.cpp for details. -enum ImGuiTableFlags_ -{ - // Features - ImGuiTableFlags_None = 0, - ImGuiTableFlags_Resizable = 1 << 0, // Enable resizing columns. - ImGuiTableFlags_Reorderable = 1 << 1, // Enable reordering columns in header row (need calling TableSetupColumn() + TableHeadersRow() to display headers) - ImGuiTableFlags_Hideable = 1 << 2, // Enable hiding/disabling columns in context menu. - ImGuiTableFlags_Sortable = 1 << 3, // Enable sorting. Call TableGetSortSpecs() to obtain sort specs. Also see ImGuiTableFlags_SortMulti and ImGuiTableFlags_SortTristate. - ImGuiTableFlags_NoSavedSettings = 1 << 4, // Disable persisting columns order, width and sort settings in the .ini file. - ImGuiTableFlags_ContextMenuInBody = 1 << 5, // Right-click on columns body/contents will display table context menu. By default it is available in TableHeadersRow(). - // Decorations - ImGuiTableFlags_RowBg = 1 << 6, // Set each RowBg color with ImGuiCol_TableRowBg or ImGuiCol_TableRowBgAlt (equivalent of calling TableSetBgColor with ImGuiTableBgFlags_RowBg0 on each row manually) - ImGuiTableFlags_BordersInnerH = 1 << 7, // Draw horizontal borders between rows. - ImGuiTableFlags_BordersOuterH = 1 << 8, // Draw horizontal borders at the top and bottom. - ImGuiTableFlags_BordersInnerV = 1 << 9, // Draw vertical borders between columns. - ImGuiTableFlags_BordersOuterV = 1 << 10, // Draw vertical borders on the left and right sides. - ImGuiTableFlags_BordersH = ImGuiTableFlags_BordersInnerH | ImGuiTableFlags_BordersOuterH, // Draw horizontal borders. - ImGuiTableFlags_BordersV = ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersOuterV, // Draw vertical borders. - ImGuiTableFlags_BordersInner = ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersInnerH, // Draw inner borders. - ImGuiTableFlags_BordersOuter = ImGuiTableFlags_BordersOuterV | ImGuiTableFlags_BordersOuterH, // Draw outer borders. - ImGuiTableFlags_Borders = ImGuiTableFlags_BordersInner | ImGuiTableFlags_BordersOuter, // Draw all borders. - ImGuiTableFlags_NoBordersInBody = 1 << 11, // [ALPHA] Disable vertical borders in columns Body (borders will always appear in Headers). -> May move to style - ImGuiTableFlags_NoBordersInBodyUntilResize = 1 << 12, // [ALPHA] Disable vertical borders in columns Body until hovered for resize (borders will always appear in Headers). -> May move to style - // Sizing Policy (read above for defaults) - ImGuiTableFlags_SizingFixedFit = 1 << 13, // Columns default to _WidthFixed or _WidthAuto (if resizable or not resizable), matching contents width. - ImGuiTableFlags_SizingFixedSame = 2 << 13, // Columns default to _WidthFixed or _WidthAuto (if resizable or not resizable), matching the maximum contents width of all columns. Implicitly enable ImGuiTableFlags_NoKeepColumnsVisible. - ImGuiTableFlags_SizingStretchProp = 3 << 13, // Columns default to _WidthStretch with default weights proportional to each columns contents widths. - ImGuiTableFlags_SizingStretchSame = 4 << 13, // Columns default to _WidthStretch with default weights all equal, unless overridden by TableSetupColumn(). - // Sizing Extra Options - ImGuiTableFlags_NoHostExtendX = 1 << 16, // Make outer width auto-fit to columns, overriding outer_size.x value. Only available when ScrollX/ScrollY are disabled and Stretch columns are not used. - ImGuiTableFlags_NoHostExtendY = 1 << 17, // Make outer height stop exactly at outer_size.y (prevent auto-extending table past the limit). Only available when ScrollX/ScrollY are disabled. Data below the limit will be clipped and not visible. - ImGuiTableFlags_NoKeepColumnsVisible = 1 << 18, // Disable keeping column always minimally visible when ScrollX is off and table gets too small. Not recommended if columns are resizable. - ImGuiTableFlags_PreciseWidths = 1 << 19, // Disable distributing remainder width to stretched columns (width allocation on a 100-wide table with 3 columns: Without this flag: 33,33,34. With this flag: 33,33,33). With larger number of columns, resizing will appear to be less smooth. - // Clipping - ImGuiTableFlags_NoClip = 1 << 20, // Disable clipping rectangle for every individual columns (reduce draw command count, items will be able to overflow into other columns). Generally incompatible with TableSetupScrollFreeze(). - // Padding - ImGuiTableFlags_PadOuterX = 1 << 21, // Default if BordersOuterV is on. Enable outermost padding. Generally desirable if you have headers. - ImGuiTableFlags_NoPadOuterX = 1 << 22, // Default if BordersOuterV is off. Disable outermost padding. - ImGuiTableFlags_NoPadInnerX = 1 << 23, // Disable inner padding between columns (double inner padding if BordersOuterV is on, single inner padding if BordersOuterV is off). - // Scrolling - ImGuiTableFlags_ScrollX = 1 << 24, // Enable horizontal scrolling. Require 'outer_size' parameter of BeginTable() to specify the container size. Changes default sizing policy. Because this creates a child window, ScrollY is currently generally recommended when using ScrollX. - ImGuiTableFlags_ScrollY = 1 << 25, // Enable vertical scrolling. Require 'outer_size' parameter of BeginTable() to specify the container size. - // Sorting - ImGuiTableFlags_SortMulti = 1 << 26, // Hold shift when clicking headers to sort on multiple column. TableGetSortSpecs() may return specs where (SpecsCount > 1). - ImGuiTableFlags_SortTristate = 1 << 27, // Allow no sorting, disable default sorting. TableGetSortSpecs() may return specs where (SpecsCount == 0). - - // [Internal] Combinations and masks - ImGuiTableFlags_SizingMask_ = ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_SizingFixedSame | ImGuiTableFlags_SizingStretchProp | ImGuiTableFlags_SizingStretchSame, -}; - -// Flags for ImGui::TableSetupColumn() -enum ImGuiTableColumnFlags_ -{ - // Input configuration flags - ImGuiTableColumnFlags_None = 0, - ImGuiTableColumnFlags_Disabled = 1 << 0, // Overriding/master disable flag: hide column, won't show in context menu (unlike calling TableSetColumnEnabled() which manipulates the user accessible state) - ImGuiTableColumnFlags_DefaultHide = 1 << 1, // Default as a hidden/disabled column. - ImGuiTableColumnFlags_DefaultSort = 1 << 2, // Default as a sorting column. - ImGuiTableColumnFlags_WidthStretch = 1 << 3, // Column will stretch. Preferable with horizontal scrolling disabled (default if table sizing policy is _SizingStretchSame or _SizingStretchProp). - ImGuiTableColumnFlags_WidthFixed = 1 << 4, // Column will not stretch. Preferable with horizontal scrolling enabled (default if table sizing policy is _SizingFixedFit and table is resizable). - ImGuiTableColumnFlags_NoResize = 1 << 5, // Disable manual resizing. - ImGuiTableColumnFlags_NoReorder = 1 << 6, // Disable manual reordering this column, this will also prevent other columns from crossing over this column. - ImGuiTableColumnFlags_NoHide = 1 << 7, // Disable ability to hide/disable this column. - ImGuiTableColumnFlags_NoClip = 1 << 8, // Disable clipping for this column (all NoClip columns will render in a same draw command). - ImGuiTableColumnFlags_NoSort = 1 << 9, // Disable ability to sort on this field (even if ImGuiTableFlags_Sortable is set on the table). - ImGuiTableColumnFlags_NoSortAscending = 1 << 10, // Disable ability to sort in the ascending direction. - ImGuiTableColumnFlags_NoSortDescending = 1 << 11, // Disable ability to sort in the descending direction. - ImGuiTableColumnFlags_NoHeaderLabel = 1 << 12, // TableHeadersRow() will not submit label for this column. Convenient for some small columns. Name will still appear in context menu. - ImGuiTableColumnFlags_NoHeaderWidth = 1 << 13, // Disable header text width contribution to automatic column width. - ImGuiTableColumnFlags_PreferSortAscending = 1 << 14, // Make the initial sort direction Ascending when first sorting on this column (default). - ImGuiTableColumnFlags_PreferSortDescending = 1 << 15, // Make the initial sort direction Descending when first sorting on this column. - ImGuiTableColumnFlags_IndentEnable = 1 << 16, // Use current Indent value when entering cell (default for column 0). - ImGuiTableColumnFlags_IndentDisable = 1 << 17, // Ignore current Indent value when entering cell (default for columns > 0). Indentation changes _within_ the cell will still be honored. - - // Output status flags, read-only via TableGetColumnFlags() - ImGuiTableColumnFlags_IsEnabled = 1 << 24, // Status: is enabled == not hidden by user/api (referred to as "Hide" in _DefaultHide and _NoHide) flags. - ImGuiTableColumnFlags_IsVisible = 1 << 25, // Status: is visible == is enabled AND not clipped by scrolling. - ImGuiTableColumnFlags_IsSorted = 1 << 26, // Status: is currently part of the sort specs - ImGuiTableColumnFlags_IsHovered = 1 << 27, // Status: is hovered by mouse - - // [Internal] Combinations and masks - ImGuiTableColumnFlags_WidthMask_ = ImGuiTableColumnFlags_WidthStretch | ImGuiTableColumnFlags_WidthFixed, - ImGuiTableColumnFlags_IndentMask_ = ImGuiTableColumnFlags_IndentEnable | ImGuiTableColumnFlags_IndentDisable, - ImGuiTableColumnFlags_StatusMask_ = ImGuiTableColumnFlags_IsEnabled | ImGuiTableColumnFlags_IsVisible | ImGuiTableColumnFlags_IsSorted | ImGuiTableColumnFlags_IsHovered, - ImGuiTableColumnFlags_NoDirectResize_ = 1 << 30, // [Internal] Disable user resizing this column directly (it may however we resized indirectly from its left edge) -}; - -// Flags for ImGui::TableNextRow() -enum ImGuiTableRowFlags_ -{ - ImGuiTableRowFlags_None = 0, - 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() -// Background colors are rendering in 3 layers: -// - Layer 0: draw with RowBg0 color if set, otherwise draw with ColumnBg0 if set. -// - Layer 1: draw with RowBg1 color if set, otherwise draw with ColumnBg1 if set. -// - Layer 2: draw with CellBg color if set. -// The purpose of the two row/columns layers is to let you decide if a background color change should override or blend with the existing color. -// When using ImGuiTableFlags_RowBg on the table, each row has the RowBg0 color automatically set for odd/even rows. -// If you set the color of RowBg0 target, your color will override the existing RowBg0 color. -// If you set the color of RowBg1 or ColumnBg1 target, your color will blend over the RowBg0 color. -enum ImGuiTableBgTarget_ -{ - ImGuiTableBgTarget_None = 0, - ImGuiTableBgTarget_RowBg0 = 1, // Set row background color 0 (generally used for background, automatically set when ImGuiTableFlags_RowBg is used) - ImGuiTableBgTarget_RowBg1 = 2, // Set row background color 1 (generally used for selection marking) - ImGuiTableBgTarget_CellBg = 3, // Set cell background color (top-most color) + ImGuiTabItemFlags_NoAssumedClosure = 1 << 8, // Tab is selected when trying to close + closure is not immediately assumed (will wait for user to stop submitting the tab). Otherwise closure is assumed when pressing the X, so if you keep submitting the tab may reappear at end of tab bar. }; // Flags for ImGui::IsWindowFocused() @@ -1450,11 +1366,17 @@ enum ImGuiSortDirection_ ImGuiSortDirection_Descending = 2 // Descending = 9->0, Z->A etc. }; +// Since 1.90, defining IMGUI_DISABLE_OBSOLETE_FUNCTIONS automatically defines IMGUI_DISABLE_OBSOLETE_KEYIO as well. +#if defined(IMGUI_DISABLE_OBSOLETE_FUNCTIONS) && !defined(IMGUI_DISABLE_OBSOLETE_KEYIO) +#define IMGUI_DISABLE_OBSOLETE_KEYIO +#endif + // A key identifier (ImGuiKey_XXX or ImGuiMod_XXX value): can represent Keyboard, Mouse and Gamepad values. // All our named keys are >= 512. Keys value 0 to 511 are left unused as legacy native/opaque key values (< 1.87). // Since >= 1.89 we increased typing (went from int to enum), some legacy code may need a cast to ImGuiKey. // Read details about the 1.87 and 1.89 transition : https://github.com/ocornut/imgui/issues/4921 // Note that "Keys" related to physical keys and are not the same concept as input "Characters", the later are submitted via io.AddInputCharacter(). +// The keyboard key enum values are named after the keys on a standard US keyboard, and on other keyboard types the keys reported may not match the keycaps. enum ImGuiKey : int { // Keyboard @@ -1483,6 +1405,8 @@ enum ImGuiKey : int ImGuiKey_U, ImGuiKey_V, ImGuiKey_W, ImGuiKey_X, ImGuiKey_Y, ImGuiKey_Z, ImGuiKey_F1, ImGuiKey_F2, ImGuiKey_F3, ImGuiKey_F4, ImGuiKey_F5, ImGuiKey_F6, ImGuiKey_F7, ImGuiKey_F8, ImGuiKey_F9, ImGuiKey_F10, ImGuiKey_F11, ImGuiKey_F12, + ImGuiKey_F13, ImGuiKey_F14, ImGuiKey_F15, ImGuiKey_F16, ImGuiKey_F17, ImGuiKey_F18, + ImGuiKey_F19, ImGuiKey_F20, ImGuiKey_F21, ImGuiKey_F22, ImGuiKey_F23, ImGuiKey_F24, ImGuiKey_Apostrophe, // ' ImGuiKey_Comma, // , ImGuiKey_Minus, // - @@ -1508,6 +1432,8 @@ enum ImGuiKey : int ImGuiKey_KeypadAdd, ImGuiKey_KeypadEnter, ImGuiKey_KeypadEqual, + ImGuiKey_AppBack, // Available on some keyboard/mouses. Often referred as "Browser Back" + ImGuiKey_AppForward, // Gamepad (some of those are analog values, 0.0f to 1.0f) // NAVIGATION ACTION // (download controller mapping PNG/PSD at http://dearimgui.com/controls_sheets) @@ -1576,7 +1502,7 @@ enum ImGuiKey : int #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS ImGuiKey_ModCtrl = ImGuiMod_Ctrl, ImGuiKey_ModShift = ImGuiMod_Shift, ImGuiKey_ModAlt = ImGuiMod_Alt, ImGuiKey_ModSuper = ImGuiMod_Super, // Renamed in 1.89 - ImGuiKey_KeyPadEnter = ImGuiKey_KeypadEnter, // Renamed in 1.87 + //ImGuiKey_KeyPadEnter = ImGuiKey_KeypadEnter, // Renamed in 1.87 #endif }; @@ -1645,15 +1571,15 @@ enum ImGuiCol_ ImGuiCol_FrameBg, // Background of checkbox, radio button, plot, slider, text input ImGuiCol_FrameBgHovered, ImGuiCol_FrameBgActive, - ImGuiCol_TitleBg, - ImGuiCol_TitleBgActive, - ImGuiCol_TitleBgCollapsed, + ImGuiCol_TitleBg, // Title bar + ImGuiCol_TitleBgActive, // Title bar when focused + ImGuiCol_TitleBgCollapsed, // Title bar when collapsed ImGuiCol_MenuBarBg, ImGuiCol_ScrollbarBg, ImGuiCol_ScrollbarGrab, ImGuiCol_ScrollbarGrabHovered, ImGuiCol_ScrollbarGrabActive, - ImGuiCol_CheckMark, + ImGuiCol_CheckMark, // Checkbox tick and RadioButton circle ImGuiCol_SliderGrab, ImGuiCol_SliderGrabActive, ImGuiCol_Button, @@ -1848,7 +1774,7 @@ enum ImGuiMouseSource : int ImGuiMouseSource_COUNT }; -// Enumeration for ImGui::SetWindow***(), SetNextWindow***(), SetNextItem***() functions +// Enumeration for ImGui::SetNextWindow***(), SetWindow***(), SetNextItem***() functions // Represent a condition. // Important: Treat as a regular enum! Do NOT combine multiple values using binary operators! All the functions above treat 0 as a shortcut to ImGuiCond_Always. enum ImGuiCond_ @@ -1860,6 +1786,170 @@ enum ImGuiCond_ ImGuiCond_Appearing = 1 << 3, // Set the variable if the object/window is appearing after being hidden/inactive (or the first time) }; +//----------------------------------------------------------------------------- +// [SECTION] Tables API flags and structures (ImGuiTableFlags, ImGuiTableColumnFlags, ImGuiTableRowFlags, ImGuiTableBgTarget, ImGuiTableSortSpecs, ImGuiTableColumnSortSpecs) +//----------------------------------------------------------------------------- + +// Flags for ImGui::BeginTable() +// - 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. +// - The DEFAULT sizing policies are: +// - Default to ImGuiTableFlags_SizingFixedFit if ScrollX is on, or if host window has ImGuiWindowFlags_AlwaysAutoResize. +// - Default to ImGuiTableFlags_SizingStretchSame if ScrollX is off. +// - When ScrollX is off: +// - Table defaults to ImGuiTableFlags_SizingStretchSame -> all Columns defaults to ImGuiTableColumnFlags_WidthStretch with same weight. +// - Columns sizing policy allowed: Stretch (default), Fixed/Auto. +// - 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. +// 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). +// - When ScrollX is on: +// - Table defaults to ImGuiTableFlags_SizingFixedFit -> all Columns defaults to ImGuiTableColumnFlags_WidthFixed +// - Columns sizing policy allowed: Fixed/Auto mostly. +// - Fixed Columns can be enlarged as needed. Table will show a horizontal scrollbar if needed. +// - When using auto-resizing (non-resizable) fixed columns, querying the content width to use item right-alignment e.g. SetNextItemWidth(-FLT_MIN) doesn't make sense, would create a feedback loop. +// - Using Stretch columns OFTEN DOES NOT MAKE SENSE if ScrollX is on, UNLESS you have specified a value for 'inner_width' in BeginTable(). +// If you specify a value for 'inner_width' then effectively the scrolling space is known and Stretch or mixed Fixed/Stretch columns become meaningful again. +// - Read on documentation at the top of imgui_tables.cpp for details. +enum ImGuiTableFlags_ +{ + // Features + ImGuiTableFlags_None = 0, + ImGuiTableFlags_Resizable = 1 << 0, // Enable resizing columns. + ImGuiTableFlags_Reorderable = 1 << 1, // Enable reordering columns in header row (need calling TableSetupColumn() + TableHeadersRow() to display headers) + ImGuiTableFlags_Hideable = 1 << 2, // Enable hiding/disabling columns in context menu. + ImGuiTableFlags_Sortable = 1 << 3, // Enable sorting. Call TableGetSortSpecs() to obtain sort specs. Also see ImGuiTableFlags_SortMulti and ImGuiTableFlags_SortTristate. + ImGuiTableFlags_NoSavedSettings = 1 << 4, // Disable persisting columns order, width and sort settings in the .ini file. + ImGuiTableFlags_ContextMenuInBody = 1 << 5, // Right-click on columns body/contents will display table context menu. By default it is available in TableHeadersRow(). + // Decorations + ImGuiTableFlags_RowBg = 1 << 6, // Set each RowBg color with ImGuiCol_TableRowBg or ImGuiCol_TableRowBgAlt (equivalent of calling TableSetBgColor with ImGuiTableBgFlags_RowBg0 on each row manually) + ImGuiTableFlags_BordersInnerH = 1 << 7, // Draw horizontal borders between rows. + ImGuiTableFlags_BordersOuterH = 1 << 8, // Draw horizontal borders at the top and bottom. + ImGuiTableFlags_BordersInnerV = 1 << 9, // Draw vertical borders between columns. + ImGuiTableFlags_BordersOuterV = 1 << 10, // Draw vertical borders on the left and right sides. + ImGuiTableFlags_BordersH = ImGuiTableFlags_BordersInnerH | ImGuiTableFlags_BordersOuterH, // Draw horizontal borders. + ImGuiTableFlags_BordersV = ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersOuterV, // Draw vertical borders. + ImGuiTableFlags_BordersInner = ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_BordersInnerH, // Draw inner borders. + ImGuiTableFlags_BordersOuter = ImGuiTableFlags_BordersOuterV | ImGuiTableFlags_BordersOuterH, // Draw outer borders. + ImGuiTableFlags_Borders = ImGuiTableFlags_BordersInner | ImGuiTableFlags_BordersOuter, // Draw all borders. + ImGuiTableFlags_NoBordersInBody = 1 << 11, // [ALPHA] Disable vertical borders in columns Body (borders will always appear in Headers). -> May move to style + ImGuiTableFlags_NoBordersInBodyUntilResize = 1 << 12, // [ALPHA] Disable vertical borders in columns Body until hovered for resize (borders will always appear in Headers). -> May move to style + // Sizing Policy (read above for defaults) + ImGuiTableFlags_SizingFixedFit = 1 << 13, // Columns default to _WidthFixed or _WidthAuto (if resizable or not resizable), matching contents width. + ImGuiTableFlags_SizingFixedSame = 2 << 13, // Columns default to _WidthFixed or _WidthAuto (if resizable or not resizable), matching the maximum contents width of all columns. Implicitly enable ImGuiTableFlags_NoKeepColumnsVisible. + ImGuiTableFlags_SizingStretchProp = 3 << 13, // Columns default to _WidthStretch with default weights proportional to each columns contents widths. + ImGuiTableFlags_SizingStretchSame = 4 << 13, // Columns default to _WidthStretch with default weights all equal, unless overridden by TableSetupColumn(). + // Sizing Extra Options + ImGuiTableFlags_NoHostExtendX = 1 << 16, // Make outer width auto-fit to columns, overriding outer_size.x value. Only available when ScrollX/ScrollY are disabled and Stretch columns are not used. + ImGuiTableFlags_NoHostExtendY = 1 << 17, // Make outer height stop exactly at outer_size.y (prevent auto-extending table past the limit). Only available when ScrollX/ScrollY are disabled. Data below the limit will be clipped and not visible. + ImGuiTableFlags_NoKeepColumnsVisible = 1 << 18, // Disable keeping column always minimally visible when ScrollX is off and table gets too small. Not recommended if columns are resizable. + ImGuiTableFlags_PreciseWidths = 1 << 19, // Disable distributing remainder width to stretched columns (width allocation on a 100-wide table with 3 columns: Without this flag: 33,33,34. With this flag: 33,33,33). With larger number of columns, resizing will appear to be less smooth. + // Clipping + ImGuiTableFlags_NoClip = 1 << 20, // Disable clipping rectangle for every individual columns (reduce draw command count, items will be able to overflow into other columns). Generally incompatible with TableSetupScrollFreeze(). + // Padding + ImGuiTableFlags_PadOuterX = 1 << 21, // Default if BordersOuterV is on. Enable outermost padding. Generally desirable if you have headers. + ImGuiTableFlags_NoPadOuterX = 1 << 22, // Default if BordersOuterV is off. Disable outermost padding. + ImGuiTableFlags_NoPadInnerX = 1 << 23, // Disable inner padding between columns (double inner padding if BordersOuterV is on, single inner padding if BordersOuterV is off). + // Scrolling + ImGuiTableFlags_ScrollX = 1 << 24, // Enable horizontal scrolling. Require 'outer_size' parameter of BeginTable() to specify the container size. Changes default sizing policy. Because this creates a child window, ScrollY is currently generally recommended when using ScrollX. + ImGuiTableFlags_ScrollY = 1 << 25, // Enable vertical scrolling. Require 'outer_size' parameter of BeginTable() to specify the container size. + // Sorting + ImGuiTableFlags_SortMulti = 1 << 26, // Hold shift when clicking headers to sort on multiple column. TableGetSortSpecs() may return specs where (SpecsCount > 1). + ImGuiTableFlags_SortTristate = 1 << 27, // Allow no sorting, disable default sorting. TableGetSortSpecs() may return specs where (SpecsCount == 0). + // Miscellaneous + ImGuiTableFlags_HighlightHoveredColumn = 1 << 28, // Highlight column headers when hovered (may evolve into a fuller highlight) + + // [Internal] Combinations and masks + ImGuiTableFlags_SizingMask_ = ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_SizingFixedSame | ImGuiTableFlags_SizingStretchProp | ImGuiTableFlags_SizingStretchSame, +}; + +// Flags for ImGui::TableSetupColumn() +enum ImGuiTableColumnFlags_ +{ + // Input configuration flags + ImGuiTableColumnFlags_None = 0, + ImGuiTableColumnFlags_Disabled = 1 << 0, // Overriding/master disable flag: hide column, won't show in context menu (unlike calling TableSetColumnEnabled() which manipulates the user accessible state) + ImGuiTableColumnFlags_DefaultHide = 1 << 1, // Default as a hidden/disabled column. + ImGuiTableColumnFlags_DefaultSort = 1 << 2, // Default as a sorting column. + ImGuiTableColumnFlags_WidthStretch = 1 << 3, // Column will stretch. Preferable with horizontal scrolling disabled (default if table sizing policy is _SizingStretchSame or _SizingStretchProp). + ImGuiTableColumnFlags_WidthFixed = 1 << 4, // Column will not stretch. Preferable with horizontal scrolling enabled (default if table sizing policy is _SizingFixedFit and table is resizable). + ImGuiTableColumnFlags_NoResize = 1 << 5, // Disable manual resizing. + ImGuiTableColumnFlags_NoReorder = 1 << 6, // Disable manual reordering this column, this will also prevent other columns from crossing over this column. + ImGuiTableColumnFlags_NoHide = 1 << 7, // Disable ability to hide/disable this column. + ImGuiTableColumnFlags_NoClip = 1 << 8, // Disable clipping for this column (all NoClip columns will render in a same draw command). + ImGuiTableColumnFlags_NoSort = 1 << 9, // Disable ability to sort on this field (even if ImGuiTableFlags_Sortable is set on the table). + ImGuiTableColumnFlags_NoSortAscending = 1 << 10, // Disable ability to sort in the ascending direction. + ImGuiTableColumnFlags_NoSortDescending = 1 << 11, // Disable ability to sort in the descending direction. + ImGuiTableColumnFlags_NoHeaderLabel = 1 << 12, // TableHeadersRow() will not submit horizontal label for this column. Convenient for some small columns. Name will still appear in context menu or in angled headers. + ImGuiTableColumnFlags_NoHeaderWidth = 1 << 13, // Disable header text width contribution to automatic column width. + ImGuiTableColumnFlags_PreferSortAscending = 1 << 14, // Make the initial sort direction Ascending when first sorting on this column (default). + ImGuiTableColumnFlags_PreferSortDescending = 1 << 15, // Make the initial sort direction Descending when first sorting on this column. + ImGuiTableColumnFlags_IndentEnable = 1 << 16, // Use current Indent value when entering cell (default for column 0). + ImGuiTableColumnFlags_IndentDisable = 1 << 17, // Ignore current Indent value when entering cell (default for columns > 0). Indentation changes _within_ the cell will still be honored. + ImGuiTableColumnFlags_AngledHeader = 1 << 18, // TableHeadersRow() will submit an angled header row for this column. Note this will add an extra row. + + // Output status flags, read-only via TableGetColumnFlags() + ImGuiTableColumnFlags_IsEnabled = 1 << 24, // Status: is enabled == not hidden by user/api (referred to as "Hide" in _DefaultHide and _NoHide) flags. + ImGuiTableColumnFlags_IsVisible = 1 << 25, // Status: is visible == is enabled AND not clipped by scrolling. + ImGuiTableColumnFlags_IsSorted = 1 << 26, // Status: is currently part of the sort specs + ImGuiTableColumnFlags_IsHovered = 1 << 27, // Status: is hovered by mouse + + // [Internal] Combinations and masks + ImGuiTableColumnFlags_WidthMask_ = ImGuiTableColumnFlags_WidthStretch | ImGuiTableColumnFlags_WidthFixed, + ImGuiTableColumnFlags_IndentMask_ = ImGuiTableColumnFlags_IndentEnable | ImGuiTableColumnFlags_IndentDisable, + ImGuiTableColumnFlags_StatusMask_ = ImGuiTableColumnFlags_IsEnabled | ImGuiTableColumnFlags_IsVisible | ImGuiTableColumnFlags_IsSorted | ImGuiTableColumnFlags_IsHovered, + ImGuiTableColumnFlags_NoDirectResize_ = 1 << 30, // [Internal] Disable user resizing this column directly (it may however we resized indirectly from its left edge) +}; + +// Flags for ImGui::TableNextRow() +enum ImGuiTableRowFlags_ +{ + ImGuiTableRowFlags_None = 0, + 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() +// Background colors are rendering in 3 layers: +// - Layer 0: draw with RowBg0 color if set, otherwise draw with ColumnBg0 if set. +// - Layer 1: draw with RowBg1 color if set, otherwise draw with ColumnBg1 if set. +// - Layer 2: draw with CellBg color if set. +// The purpose of the two row/columns layers is to let you decide if a background color change should override or blend with the existing color. +// When using ImGuiTableFlags_RowBg on the table, each row has the RowBg0 color automatically set for odd/even rows. +// If you set the color of RowBg0 target, your color will override the existing RowBg0 color. +// If you set the color of RowBg1 or ColumnBg1 target, your color will blend over the RowBg0 color. +enum ImGuiTableBgTarget_ +{ + ImGuiTableBgTarget_None = 0, + ImGuiTableBgTarget_RowBg0 = 1, // Set row background color 0 (generally used for background, automatically set when ImGuiTableFlags_RowBg is used) + ImGuiTableBgTarget_RowBg1 = 2, // Set row background color 1 (generally used for selection marking) + ImGuiTableBgTarget_CellBg = 3, // Set cell background color (top-most color) +}; + +// Sorting specifications for a table (often handling sort specs for a single column, occasionally more) +// Obtained by calling TableGetSortSpecs(). +// When 'SpecsDirty == true' you can sort your data. It will be true with sorting specs have changed since last call, or the first time. +// Make sure to set 'SpecsDirty = false' after sorting, else you may wastefully sort your data every frame! +struct ImGuiTableSortSpecs +{ + const ImGuiTableColumnSortSpecs* Specs; // Pointer to sort spec array. + int SpecsCount; // Sort spec count. Most often 1. May be > 1 when ImGuiTableFlags_SortMulti is enabled. May be == 0 when ImGuiTableFlags_SortTristate is enabled. + bool SpecsDirty; // Set to true when specs have changed since last time! Use this to sort again, then clear the flag. + + ImGuiTableSortSpecs() { memset(this, 0, sizeof(*this)); } +}; + +// Sorting specification for one column of a table (sizeof == 12 bytes) +struct ImGuiTableColumnSortSpecs +{ + ImGuiID ColumnUserID; // User id of the column (if specified by a TableSetupColumn() call) + ImS16 ColumnIndex; // Index of the column + ImS16 SortOrder; // Index within parent ImGuiTableSortSpecs (always stored in order starting from 0, tables sorted on a single criteria will always have a 0 here) + ImGuiSortDirection SortDirection : 8; // ImGuiSortDirection_Ascending or ImGuiSortDirection_Descending + + ImGuiTableColumnSortSpecs() { memset(this, 0, sizeof(*this)); } +}; + //----------------------------------------------------------------------------- // [SECTION] Helpers: Memory allocations macros, ImVector<> //----------------------------------------------------------------------------- @@ -1996,6 +2086,7 @@ struct ImGuiStyle 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 TableAngledHeadersAngle; // Angle of angled headers (supported values range from -50.0f degrees to +50.0f degrees). 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. @@ -2098,16 +2189,22 @@ struct ImGuiIO // Debug options //------------------------------------------------------------------ + // Option to enable various debug tools showing buttons that will call the IM_DEBUG_BREAK() macro. + // - The Item Picker tool will be available regardless of this being enabled, in order to maximize its discoverability. + // - Requires a debugger being attached, otherwise IM_DEBUG_BREAK() options will appear to crash your application. + // e.g. io.ConfigDebugIsDebuggerPresent = ::IsDebuggerPresent() on Win32, or refer to ImOsIsDebuggerPresent() imgui_test_engine/imgui_te_utils.cpp for a Unix compatible version). + bool ConfigDebugIsDebuggerPresent; // = false // Enable various tools calling IM_DEBUG_BREAK(). + // Tools to test correct Begin/End and BeginChild/EndChild behaviors. - // Presently Begin()/End() and BeginChild()/EndChild() needs to ALWAYS be called in tandem, regardless of return value of BeginXXX() - // This is inconsistent with other BeginXXX functions and create confusion for many users. - // We expect to update the API eventually. In the meanwhile we provide tools to facilitate checking user-code behavior. + // - Presently Begin()/End() and BeginChild()/EndChild() needs to ALWAYS be called in tandem, regardless of return value of BeginXXX() + // - This is inconsistent with other BeginXXX functions and create confusion for many users. + // - We expect to update the API eventually. In the meanwhile we provide tools to facilitate checking user-code behavior. bool ConfigDebugBeginReturnValueOnce;// = false // First-time calls to Begin()/BeginChild() will return false. NEEDS TO BE SET AT APPLICATION BOOT TIME if you don't want to miss windows. bool ConfigDebugBeginReturnValueLoop;// = false // Some calls to Begin()/BeginChild() will return false. Will cycle through window depths then repeat. Suggested use: add "io.ConfigDebugBeginReturnValue = io.KeyShift" in your main loop then occasionally press SHIFT. Windows should be flickering while running. - // Option to deactivate io.AddFocusEvent(false) handling. May facilitate interactions with a debugger when focus loss leads to clearing inputs data. - // Backends may have other side-effects on focus loss, so this will reduce side-effects but not necessary remove all of them. - // Consider using e.g. Win32's IsDebuggerPresent() as an additional filter (or see ImOsIsDebuggerPresent() in imgui_test_engine/imgui_te_utils.cpp for a Unix compatible version). + // Option to deactivate io.AddFocusEvent(false) handling. + // - May facilitate interactions with a debugger when focus loss leads to clearing inputs data. + // - Backends may have other side-effects on focus loss, so this will reduce side-effects but not necessary remove all of them. bool ConfigDebugIgnoreFocusLoss; // = false // Ignore io.AddFocusEvent(false), consequently not calling io.ClearInputKeys() in input processing. // Option to audit .ini data @@ -2134,11 +2231,6 @@ 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) // (default to use native imm32 api on Windows) void (*SetPlatformImeDataFn)(ImGuiViewport* viewport, ImGuiPlatformImeData* data); -#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS - void* ImeWindowHandle; // = NULL // [Obsoleted in 1.87] 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 // 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 @@ -2165,7 +2257,7 @@ struct ImGuiIO IMGUI_API void ClearEventsQueue(); // Clear all incoming events. IMGUI_API void ClearInputKeys(); // Clear current keyboard/mouse/gamepad state + current frame text input buffer. Equivalent to releasing all keys/buttons. #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS - IMGUI_API void ClearInputCharacters(); // [Obsolete] Clear the current frame text input buffer. Now included within ClearInputKeys(). + IMGUI_API void ClearInputCharacters(); // [Obsoleted in 1.89.8] Clear the current frame text input buffer. Now included within ClearInputKeys(). #endif //------------------------------------------------------------------ @@ -2186,7 +2278,6 @@ struct ImGuiIO 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. // Legacy: before 1.87, we required backend to fill io.KeyMap[] (imgui->native map) during initialization and io.KeysDown[] (native indices) every frame. @@ -2196,6 +2287,7 @@ struct ImGuiIO int KeyMap[ImGuiKey_COUNT]; // [LEGACY] Input: map of indices into the KeysDown[512] entries array which represent your "native" keyboard state. The first 512 are now unused and should be kept zero. Legacy backend will write into KeyMap[] using ImGuiKey_ indices which are always >512. bool KeysDown[ImGuiKey_COUNT]; // [LEGACY] Input: 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). This used to be [512] sized. It is now ImGuiKey_COUNT to allow legacy io.KeysDown[GetKeyIndex(...)] to work without an overflow. float NavInputs[ImGuiNavInput_COUNT]; // [LEGACY] Since 1.88, NavInputs[] was removed. Backends from 1.60 to 1.86 won't build. Feed gamepad inputs via io.AddKeyEvent() and ImGuiKey_GamepadXXX enums. + //void* ImeWindowHandle; // [Obsoleted in 1.87] Set ImGuiViewport::PlatformHandleRaw instead. Set this to your HWND to get automatic IME cursor positioning. #endif //------------------------------------------------------------------ @@ -2249,7 +2341,7 @@ struct ImGuiIO }; //----------------------------------------------------------------------------- -// [SECTION] Misc data structures +// [SECTION] Misc data structures (ImGuiInputTextCallbackData, ImGuiSizeCallbackData, ImGuiPayload) //----------------------------------------------------------------------------- // Shared state of InputText(), passed as an argument to your callback when a ImGuiInputTextFlags_Callback* flag is used. @@ -2312,6 +2404,7 @@ struct ImGuiWindowClass { ImGuiID ClassId; // User data. 0 = Default class (unclassed). Windows of different classes cannot be docked with each others. ImGuiID ParentViewportId; // Hint for the platform backend. -1: use default. 0: request platform backend to not parent the platform. != 0: request platform backend to create a parent<>child relationship between the platform windows. Not conforming backends are free to e.g. parent every viewport to the main viewport or not. + ImGuiID FocusRouteParentWindowId; // ID of parent window for shortcut focus route evaluation, e.g. Shortcut() call from Parent Window will succeed when this window is focused. ImGuiViewportFlags ViewportFlagsOverrideSet; // Viewport flags to set when a window of this class owns a viewport. This allows you to enforce OS decoration or task bar icon, override the defaults on a per-window basis. ImGuiViewportFlags ViewportFlagsOverrideClear; // Viewport flags to clear when a window of this class owns a viewport. This allows you to enforce OS decoration or task bar icon, override the defaults on a per-window basis. ImGuiTabItemFlags TabItemFlagsOverrideSet; // [EXPERIMENTAL] TabItem flags to set when a window of this class gets submitted into a dock node tab bar. May use with ImGuiTabItemFlags_Leading or ImGuiTabItemFlags_Trailing. @@ -2344,30 +2437,6 @@ struct ImGuiPayload bool IsDelivery() const { return Delivery; } }; -// Sorting specification for one column of a table (sizeof == 12 bytes) -struct ImGuiTableColumnSortSpecs -{ - ImGuiID ColumnUserID; // User id of the column (if specified by a TableSetupColumn() call) - ImS16 ColumnIndex; // Index of the column - ImS16 SortOrder; // Index within parent ImGuiTableSortSpecs (always stored in order starting from 0, tables sorted on a single criteria will always have a 0 here) - ImGuiSortDirection SortDirection : 8; // ImGuiSortDirection_Ascending or ImGuiSortDirection_Descending - - ImGuiTableColumnSortSpecs() { memset(this, 0, sizeof(*this)); } -}; - -// Sorting specifications for a table (often handling sort specs for a single column, occasionally more) -// Obtained by calling TableGetSortSpecs(). -// When 'SpecsDirty == true' you can sort your data. It will be true with sorting specs have changed since last call, or the first time. -// Make sure to set 'SpecsDirty = false' after sorting, else you may wastefully sort your data every frame! -struct ImGuiTableSortSpecs -{ - const ImGuiTableColumnSortSpecs* Specs; // Pointer to sort spec array. - int SpecsCount; // Sort spec count. Most often 1. May be > 1 when ImGuiTableFlags_SortMulti is enabled. May be == 0 when ImGuiTableFlags_SortTristate is enabled. - bool SpecsDirty; // Set to true when specs have changed since last time! Use this to sort again, then clear the flag. - - ImGuiTableSortSpecs() { memset(this, 0, sizeof(*this)); } -}; - //----------------------------------------------------------------------------- // [SECTION] Helpers (ImGuiOnceUponAFrame, ImGuiTextFilter, ImGuiTextBuffer, ImGuiStorage, ImGuiListClipper, Math Operators, ImColor) //----------------------------------------------------------------------------- @@ -2451,9 +2520,9 @@ struct ImGuiStorage { ImGuiID key; union { int val_i; float val_f; void* val_p; }; - ImGuiStoragePair(ImGuiID _key, int _val_i) { key = _key; val_i = _val_i; } - ImGuiStoragePair(ImGuiID _key, float _val_f) { key = _key; val_f = _val_f; } - ImGuiStoragePair(ImGuiID _key, void* _val_p) { key = _key; val_p = _val_p; } + ImGuiStoragePair(ImGuiID _key, int _val) { key = _key; val_i = _val; } + ImGuiStoragePair(ImGuiID _key, float _val) { key = _key; val_f = _val; } + ImGuiStoragePair(ImGuiID _key, void* _val) { key = _key; val_p = _val; } }; ImVector Data; @@ -2480,11 +2549,10 @@ struct ImGuiStorage IMGUI_API float* GetFloatRef(ImGuiID key, float default_val = 0.0f); IMGUI_API void** GetVoidPtrRef(ImGuiID key, void* default_val = NULL); - // Use on your own storage if you know only integer are being stored (open/close all tree nodes) - IMGUI_API void SetAllInt(int val); - - // For quicker full rebuild of a storage (instead of an incremental one), you may add all your contents and then sort once. + // Advanced: for quicker full rebuild of a storage (instead of an incremental one), you may add all your contents and then sort once. IMGUI_API void BuildSortByKey(); + // Obsolete: use on your own storage if you know only integer are being stored (open/close all tree nodes) + IMGUI_API void SetAllInt(int val); }; // Helper: Manually clip large list of items. @@ -2557,9 +2625,13 @@ static inline ImVec2& operator+=(ImVec2& lhs, const ImVec2& rhs) { lhs.x static inline ImVec2& operator-=(ImVec2& lhs, const ImVec2& rhs) { lhs.x -= rhs.x; lhs.y -= rhs.y; return lhs; } static inline ImVec2& operator*=(ImVec2& lhs, const ImVec2& rhs) { lhs.x *= rhs.x; lhs.y *= rhs.y; return lhs; } static inline ImVec2& operator/=(ImVec2& lhs, const ImVec2& rhs) { lhs.x /= rhs.x; lhs.y /= rhs.y; return lhs; } +static inline bool operator==(const ImVec2& lhs, const ImVec2& rhs) { return lhs.x == rhs.x && lhs.y == rhs.y; } +static inline bool operator!=(const ImVec2& lhs, const ImVec2& rhs) { return lhs.x != rhs.x || lhs.y != rhs.y; } static inline ImVec4 operator+(const ImVec4& lhs, const ImVec4& rhs) { return ImVec4(lhs.x + rhs.x, lhs.y + rhs.y, lhs.z + rhs.z, lhs.w + rhs.w); } static inline ImVec4 operator-(const ImVec4& lhs, const ImVec4& rhs) { return ImVec4(lhs.x - rhs.x, lhs.y - rhs.y, lhs.z - rhs.z, lhs.w - rhs.w); } static inline ImVec4 operator*(const ImVec4& lhs, const ImVec4& rhs) { return ImVec4(lhs.x * rhs.x, lhs.y * rhs.y, lhs.z * rhs.z, lhs.w * rhs.w); } +static inline bool operator==(const ImVec4& lhs, const ImVec4& rhs) { return lhs.x == rhs.x && lhs.y == rhs.y && lhs.z == rhs.z && lhs.w == rhs.w; } +static inline bool operator!=(const ImVec4& lhs, const ImVec4& rhs) { return lhs.x != rhs.x || lhs.y != rhs.y || lhs.z != rhs.z || lhs.w != rhs.w; } IM_MSVC_RUNTIME_CHECKS_RESTORE #endif @@ -2629,9 +2701,9 @@ typedef void (*ImDrawCallback)(const ImDrawList* parent_list, const ImDrawCmd* c // Special Draw callback value to request renderer backend to reset the graphics/render state. // The renderer backend needs to handle this special value, otherwise it will crash trying to call a function at this address. -// This is useful for example if you submitted callbacks which you know have altered the render state and you want it to be restored. -// It is not done by default because they are many perfectly useful way of altering render state for imgui contents (e.g. changing shader/blending settings before an Image call). -#define ImDrawCallback_ResetRenderState (ImDrawCallback)(-1) +// This is useful, for example, if you submitted callbacks which you know have altered the render state and you want it to be restored. +// Render state is not reset by default because they are many perfectly useful way of altering render state (e.g. changing shader/blending settings before an Image call). +#define ImDrawCallback_ResetRenderState (ImDrawCallback)(-8) // Typically, 1 command = 1 GPU draw call (unless command is a callback) // - VtxOffset: When 'io.BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset' is enabled, @@ -2813,7 +2885,8 @@ struct ImDrawList IMGUI_API void AddImageRounded(ImTextureID user_texture_id, const ImVec2& p_min, const ImVec2& p_max, const ImVec2& uv_min, const ImVec2& uv_max, ImU32 col, float rounding, ImDrawFlags flags = 0); // Stateful path API, add points then finish with PathFillConvex() or PathStroke() - // - Filled shapes must always use clockwise winding order. The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + // - Important: filled shapes must always use clockwise winding order! The anti-aliasing fringe depends on it. Counter-clockwise shapes will have "inward" anti-aliasing. + // so e.g. 'PathArcTo(center, radius, PI * -0.5f, PI)' is ok, whereas 'PathArcTo(center, radius, PI, PI * -0.5f)' won't have correct anti-aliasing when followed by PathFillConvex(). inline void PathClear() { _Path.Size = 0; } inline void PathLineTo(const ImVec2& pos) { _Path.push_back(pos); } inline void PathLineToMergeDuplicate(const ImVec2& pos) { if (_Path.Size == 0 || memcmp(&_Path.Data[_Path.Size - 1], &pos, 8) != 0) _Path.push_back(pos); } @@ -2914,7 +2987,8 @@ struct ImFontConfig float GlyphMaxAdvanceX; // FLT_MAX // Maximum AdvanceX for glyphs bool MergeMode; // false // Merge into previous ImFont, so you can combine multiple inputs font into one ImFont (e.g. ASCII font + icons + Japanese glyphs). You may want to use GlyphOffset.y when merge font of different heights. unsigned int FontBuilderFlags; // 0 // Settings for custom font builder. THIS IS BUILDER IMPLEMENTATION DEPENDENT. Leave as zero if unsure. - float RasterizerMultiply; // 1.0f // Brighten (>1.0f) or darken (<1.0f) font output. Brightening small fonts may be a good workaround to make them more readable. + float RasterizerMultiply; // 1.0f // Linearly brighten (>1.0f) or darken (<1.0f) font output. Brightening small fonts may be a good workaround to make them more readable. This is a silly thing we may remove in the future. + float RasterizerDensity; // 1.0f // DPI scale for rasterization, not altering other font metrics: make it easy to swap between e.g. a 100% and a 400% fonts for a zooming display. IMPORTANT: If you increase this it is expected that you increase font scale accordingly, otherwise quality may look lowered. ImWchar EllipsisChar; // -1 // Explicitly specify unicode codepoint of ellipsis character. When fonts are being merged first specified ellipsis will be used. // [Internal] @@ -3366,6 +3440,11 @@ namespace ImGui namespace ImGui { // OBSOLETED in 1.90.0 (from September 2023) + static inline bool BeginChildFrame(ImGuiID id, const ImVec2& size, ImGuiWindowFlags window_flags = 0) { return BeginChild(id, size, ImGuiChildFlags_FrameStyle, window_flags); } + static inline void EndChildFrame() { EndChild(); } + //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 + static inline void ShowStackToolWindow(bool* p_open = NULL) { ShowIDStackToolWindow(p_open); } IMGUI_API bool ListBox(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); IMGUI_API bool Combo(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); // OBSOLETED in 1.89.7 (from June 2023) @@ -3378,10 +3457,10 @@ namespace ImGui // OBSOLETED in 1.88 (from May 2022) static inline void CaptureKeyboardFromApp(bool want_capture_keyboard = true) { SetNextFrameWantCaptureKeyboard(want_capture_keyboard); } // Renamed as name was misleading + removed default value. static inline void CaptureMouseFromApp(bool want_capture_mouse = true) { SetNextFrameWantCaptureMouse(want_capture_mouse); } // Renamed as name was misleading + removed default value. - // OBSOLETED in 1.86 (from November 2021) - IMGUI_API void CalcListClipping(int items_count, float items_height, int* out_items_display_start, int* out_items_display_end); // Calculate coarse clipping for large list of evenly sized items. Prefer using ImGuiListClipper. // Some of the older obsolete names along with their replacement (commented out so they are not reported in IDE) + //-- OBSOLETED in 1.86 (from November 2021) + //IMGUI_API void CalcListClipping(int items_count, float items_height, int* out_items_display_start, int* out_items_display_end); // Code removed, see 1.90 for last version of the code. Calculate range of visible items for large list of evenly sized items. Prefer using ImGuiListClipper. //-- OBSOLETED in 1.85 (from August 2021) //static inline float GetWindowContentRegionWidth() { return GetWindowContentRegionMax().x - GetWindowContentRegionMin().x; } //-- OBSOLETED in 1.81 (from February 2021) @@ -3457,6 +3536,8 @@ enum ImGuiModFlags_ { ImGuiModFlags_None = 0, ImGuiModFlags_Ctrl = ImGuiMod_Ctrl //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 }; +#define IM_OFFSETOF(_TYPE,_MEMBER) offsetof(_TYPE, _MEMBER) // OBSOLETED IN 1.90 (now using C++11 standard version) + #endif // #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS // RENAMED IMGUI_DISABLE_METRICS_WINDOW > IMGUI_DISABLE_DEBUG_TOOLS in 1.88 (from June 2022) @@ -3479,9 +3560,14 @@ enum ImGuiModFlags_ { ImGuiModFlags_None = 0, ImGuiModFlags_Ctrl = ImGuiMod_Ctrl #pragma warning (pop) #endif -// Include imgui_user.h at the end of imgui.h (convenient for user to only explicitly include vanilla imgui.h) +// Include imgui_user.h at the end of imgui.h +// May be convenient for some users to only explicitly include vanilla imgui.h and have extra stuff included. #ifdef IMGUI_INCLUDE_IMGUI_USER_H +#ifdef IMGUI_USER_H_FILENAME +#include IMGUI_USER_H_FILENAME +#else #include "imgui_user.h" #endif +#endif #endif // #ifndef IMGUI_DISABLE diff --git a/cimgui/imgui/imgui_demo.cpp b/cimgui/imgui/imgui_demo.cpp index 51be2777e..9b4ba871b 100644 --- a/cimgui/imgui/imgui_demo.cpp +++ b/cimgui/imgui/imgui_demo.cpp @@ -1,4 +1,4 @@ -// dear imgui, v1.90 WIP +// dear imgui, v1.90.4 // (demo code) // Help: @@ -54,7 +54,7 @@ // Because we can't assume anything about your support of maths operators, we cannot use them in imgui_demo.cpp. // Navigating this file: -// - In Visual Studio IDE: CTRL+comma ("Edit.GoToAll") can follow symbols in comments, whereas CTRL+F12 ("Edit.GoToImplementation") cannot. +// - In Visual Studio: CTRL+comma ("Edit.GoToAll") can follow symbols in comments, whereas CTRL+F12 ("Edit.GoToImplementation") cannot. // - With Visual Assist installed: ALT+G ("VAssistX.GoToImplementation") can also follow symbols in comments. /* @@ -172,7 +172,8 @@ Index of this file: #define IM_MAX(A, B) (((A) >= (B)) ? (A) : (B)) #define IM_CLAMP(V, MN, MX) ((V) < (MN) ? (MN) : (V) > (MX) ? (MX) : (V)) -// Enforce cdecl calling convention for functions called by the standard library, in case compilation settings changed the default to e.g. __vectorcall +// Enforce cdecl calling convention for functions called by the standard library, +// in case compilation settings changed the default to e.g. __vectorcall #ifndef IMGUI_CDECL #ifdef _MSC_VER #define IMGUI_CDECL __cdecl @@ -304,7 +305,7 @@ void ImGui::ShowDemoWindow(bool* p_open) // Dear ImGui Tools (accessible from the "Tools" menu) static bool show_tool_metrics = false; static bool show_tool_debug_log = false; - static bool show_tool_stack_tool = false; + static bool show_tool_id_stack_tool = false; static bool show_tool_style_editor = false; static bool show_tool_about = false; @@ -312,8 +313,8 @@ void ImGui::ShowDemoWindow(bool* p_open) ImGui::ShowMetricsWindow(&show_tool_metrics); if (show_tool_debug_log) ImGui::ShowDebugLogWindow(&show_tool_debug_log); - if (show_tool_stack_tool) - ImGui::ShowStackToolWindow(&show_tool_stack_tool); + if (show_tool_id_stack_tool) + ImGui::ShowIDStackToolWindow(&show_tool_id_stack_tool); if (show_tool_style_editor) { ImGui::Begin("Dear ImGui Style Editor", &show_tool_style_editor); @@ -415,8 +416,14 @@ void ImGui::ShowDemoWindow(bool* p_open) #endif ImGui::MenuItem("Metrics/Debugger", NULL, &show_tool_metrics, has_debug_tools); ImGui::MenuItem("Debug Log", NULL, &show_tool_debug_log, has_debug_tools); - ImGui::MenuItem("Stack Tool", NULL, &show_tool_stack_tool, has_debug_tools); + ImGui::MenuItem("ID Stack Tool", NULL, &show_tool_id_stack_tool, has_debug_tools); ImGui::MenuItem("Style Editor", NULL, &show_tool_style_editor); + bool is_debugger_present = ImGui::GetIO().ConfigDebugIsDebuggerPresent; + if (ImGui::MenuItem("Item Picker", NULL, false, has_debug_tools && is_debugger_present)) + ImGui::DebugStartItemPicker(); + if (!is_debugger_present) + ImGui::SetItemTooltip("Requires io.ConfigDebugIsDebuggerPresent=true to be set.\n\nWe otherwise disable the menu option to avoid casual users crashing the application.\n\nYou can however always access the Item Picker in Metrics->Tools."); + ImGui::Separator(); ImGui::MenuItem("About Dear ImGui", NULL, &show_tool_about); ImGui::EndMenu(); } @@ -476,6 +483,12 @@ void ImGui::ShowDemoWindow(bool* p_open) ImGui::CheckboxFlags("io.ConfigFlags: NoMouseCursorChange", &io.ConfigFlags, ImGuiConfigFlags_NoMouseCursorChange); ImGui::SameLine(); HelpMarker("Instruct backend to not alter mouse cursor shape and visibility."); + ImGui::Checkbox("io.ConfigInputTrickleEventQueue", &io.ConfigInputTrickleEventQueue); + ImGui::SameLine(); HelpMarker("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."); + ImGui::Checkbox("io.MouseDrawCursor", &io.MouseDrawCursor); + ImGui::SameLine(); HelpMarker("Instruct Dear ImGui to render a mouse cursor itself. Note that a mouse cursor rendered via your application GPU rendering path will feel more laggy than hardware cursor, but will be more in sync with your other visuals.\n\nSome desktop applications may use both kinds of cursors (e.g. enable software cursor only when resizing/dragging something)."); + + ImGui::SeparatorText("Docking"); ImGui::CheckboxFlags("io.ConfigFlags: DockingEnable", &io.ConfigFlags, ImGuiConfigFlags_DockingEnable); ImGui::SameLine(); if (io.ConfigDockingWithShift) @@ -496,6 +509,7 @@ void ImGui::ShowDemoWindow(bool* p_open) ImGui::Unindent(); } + ImGui::SeparatorText("Multi-viewports"); ImGui::CheckboxFlags("io.ConfigFlags: ViewportsEnable", &io.ConfigFlags, ImGuiConfigFlags_ViewportsEnable); ImGui::SameLine(); HelpMarker("[beta] Enable beta multi-viewports support. See ImGuiPlatformIO for details."); if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) @@ -512,11 +526,6 @@ void ImGui::ShowDemoWindow(bool* p_open) ImGui::Unindent(); } - ImGui::Checkbox("io.ConfigInputTrickleEventQueue", &io.ConfigInputTrickleEventQueue); - ImGui::SameLine(); HelpMarker("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."); - ImGui::Checkbox("io.MouseDrawCursor", &io.MouseDrawCursor); - ImGui::SameLine(); HelpMarker("Instruct Dear ImGui to render a mouse cursor itself. Note that a mouse cursor rendered via your application GPU rendering path will feel more laggy than hardware cursor, but will be more in sync with your other visuals.\n\nSome desktop applications may use both kinds of cursors (e.g. enable software cursor only when resizing/dragging something)."); - ImGui::SeparatorText("Widgets"); ImGui::Checkbox("io.ConfigInputTextCursorBlink", &io.ConfigInputTextCursorBlink); ImGui::SameLine(); HelpMarker("Enable blinking cursor (optional as some users consider it to be distracting)."); @@ -531,10 +540,12 @@ void ImGui::ShowDemoWindow(bool* p_open) ImGui::Text("Also see Style->Rendering for rendering options."); ImGui::SeparatorText("Debug"); + ImGui::Checkbox("io.ConfigDebugIsDebuggerPresent", &io.ConfigDebugIsDebuggerPresent); + ImGui::SameLine(); HelpMarker("Enable various tools calling IM_DEBUG_BREAK().\n\nRequires a debugger being attached, otherwise IM_DEBUG_BREAK() options will appear to crash your application."); ImGui::BeginDisabled(); ImGui::Checkbox("io.ConfigDebugBeginReturnValueOnce", &io.ConfigDebugBeginReturnValueOnce); // . ImGui::EndDisabled(); - ImGui::SameLine(); HelpMarker("First calls to Begin()/BeginChild() will return false.\n\nTHIS OPTION IS DISABLED because it needs to be set at application boot-time to make sense. Showing the disabled option is a way to make this feature easier to discover"); + ImGui::SameLine(); HelpMarker("First calls to Begin()/BeginChild() will return false.\n\nTHIS OPTION IS DISABLED because it needs to be set at application boot-time to make sense. Showing the disabled option is a way to make this feature easier to discover."); ImGui::Checkbox("io.ConfigDebugBeginReturnValueLoop", &io.ConfigDebugBeginReturnValueLoop); ImGui::SameLine(); HelpMarker("Some calls to Begin()/BeginChild() will return false.\n\nWill cycle through window depths then repeat. Windows should be flickering while running."); ImGui::Checkbox("io.ConfigDebugIgnoreFocusLoss", &io.ConfigDebugIgnoreFocusLoss); @@ -818,7 +829,8 @@ static void ShowDemoWindowWidgets() static int item_current = 0; ImGui::Combo("combo", &item_current, items, IM_ARRAYSIZE(items)); ImGui::SameLine(); HelpMarker( - "Using the simplified one-liner Combo API here.\nRefer to the \"Combo\" section below for an explanation of how to use the more flexible and general BeginCombo/EndCombo API."); + "Using the simplified one-liner Combo API here.\n" + "Refer to the \"Combo\" section below for an explanation of how to use the more flexible and general BeginCombo/EndCombo API."); } { @@ -829,7 +841,8 @@ static void ShowDemoWindowWidgets() static int item_current = 1; ImGui::ListBox("listbox", &item_current, items, IM_ARRAYSIZE(items), 4); ImGui::SameLine(); HelpMarker( - "Using the simplified one-liner ListBox API here.\nRefer to the \"List boxes\" section below for an explanation of how to use the more flexible and general BeginListBox/EndListBox API."); + "Using the simplified one-liner ListBox API here.\n" + "Refer to the \"List boxes\" section below for an explanation of how to use the more flexible and general BeginListBox/EndListBox API."); } ImGui::TreePop(); @@ -893,9 +906,9 @@ static void ShowDemoWindowWidgets() "flags for a specific tooltip instance."); // The following examples are passed for documentation purpose but may not be useful to most users. - // Passing ImGuiHoveredFlags_Tooltip to IsItemHovered() will pull ImGuiHoveredFlags flags values from + // Passing ImGuiHoveredFlags_ForTooltip to IsItemHovered() will pull ImGuiHoveredFlags flags values from // 'style.HoverFlagsForTooltipMouse' or 'style.HoverFlagsForTooltipNav' depending on whether mouse or gamepad/keyboard is being used. - // With default settings, ImGuiHoveredFlags_Tooltip is equivalent to ImGuiHoveredFlags_DelayShort + ImGuiHoveredFlags_Stationary. + // With default settings, ImGuiHoveredFlags_ForTooltip is equivalent to ImGuiHoveredFlags_DelayShort + ImGuiHoveredFlags_Stationary. ImGui::Button("Manual", sz); if (ImGui::IsItemHovered(ImGuiHoveredFlags_ForTooltip)) ImGui::SetTooltip("I am a manually emitted tooltip."); @@ -934,10 +947,10 @@ static void ShowDemoWindowWidgets() // if (once) // ImGui::Text("This will be displayed only once."); - IMGUI_DEMO_MARKER("Widgets/Trees"); - if (ImGui::TreeNode("Trees")) + IMGUI_DEMO_MARKER("Widgets/Tree Nodes"); + if (ImGui::TreeNode("Tree Nodes")) { - IMGUI_DEMO_MARKER("Widgets/Trees/Basic trees"); + IMGUI_DEMO_MARKER("Widgets/Tree Nodes/Basic trees"); if (ImGui::TreeNode("Basic trees")) { for (int i = 0; i < 5; i++) @@ -958,7 +971,7 @@ static void ShowDemoWindowWidgets() ImGui::TreePop(); } - IMGUI_DEMO_MARKER("Widgets/Trees/Advanced, with Selectable nodes"); + IMGUI_DEMO_MARKER("Widgets/Tree Nodes/Advanced, with Selectable nodes"); if (ImGui::TreeNode("Advanced, with Selectable nodes")) { HelpMarker( @@ -971,6 +984,7 @@ static void ShowDemoWindowWidgets() ImGui::CheckboxFlags("ImGuiTreeNodeFlags_OpenOnDoubleClick", &base_flags, ImGuiTreeNodeFlags_OpenOnDoubleClick); ImGui::CheckboxFlags("ImGuiTreeNodeFlags_SpanAvailWidth", &base_flags, ImGuiTreeNodeFlags_SpanAvailWidth); ImGui::SameLine(); HelpMarker("Extend hit area to all available width instead of allowing more items to be laid out after the node."); ImGui::CheckboxFlags("ImGuiTreeNodeFlags_SpanFullWidth", &base_flags, ImGuiTreeNodeFlags_SpanFullWidth); + ImGui::CheckboxFlags("ImGuiTreeNodeFlags_SpanAllColumns", &base_flags, ImGuiTreeNodeFlags_SpanAllColumns); ImGui::SameLine(); HelpMarker("For use in Tables only."); ImGui::Checkbox("Align label with current X position", &align_label_with_current_x_position); ImGui::Checkbox("Test tree node as drag source", &test_drag_and_drop); ImGui::Text("Hello!"); @@ -1146,7 +1160,7 @@ static void ShowDemoWindowWidgets() "CJK text will only appear if the font was loaded with the appropriate CJK character ranges. " "Call io.Fonts->AddFontFromFileTTF() manually to load extra character ranges. " "Read docs/FONTS.md for details."); - ImGui::Text("Hiragana: \xe3\x81\x8b\xe3\x81\x8d\xe3\x81\x8f\xe3\x81\x91\xe3\x81\x93 (kakikukeko)"); // Normally we would use u8"blah blah" with the proper characters directly in the string. + ImGui::Text("Hiragana: \xe3\x81\x8b\xe3\x81\x8d\xe3\x81\x8f\xe3\x81\x91\xe3\x81\x93 (kakikukeko)"); ImGui::Text("Kanjis: \xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e (nihongo)"); static char buf[32] = "\xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e"; //static char buf[32] = u8"NIHONGO"; // <- this is how you would write it with C++11, using real kanjis @@ -1190,7 +1204,7 @@ static void ShowDemoWindowWidgets() ImVec2 pos = ImGui::GetCursorScreenPos(); ImVec2 uv_min = ImVec2(0.0f, 0.0f); // Top-left ImVec2 uv_max = ImVec2(1.0f, 1.0f); // Lower-right - ImVec4 tint_col = use_text_color_for_tint ? ImGui::GetStyleColorVec4(ImGuiCol_Text) : ImVec4(1.0f, 1.0f, 1.0f, 1.0f); // No tint + ImVec4 tint_col = use_text_color_for_tint ? ImGui::GetStyleColorVec4(ImGuiCol_Text) : ImVec4(1.0f, 1.0f, 1.0f, 1.0f); // No tint ImVec4 border_col = ImGui::GetStyleColorVec4(ImGuiCol_Border); ImGui::Image(my_tex_id, ImVec2(my_tex_w, my_tex_h), uv_min, uv_max, tint_col, border_col); if (ImGui::BeginItemTooltip()) @@ -1249,16 +1263,29 @@ static void ShowDemoWindowWidgets() ImGui::CheckboxFlags("ImGuiComboFlags_PopupAlignLeft", &flags, ImGuiComboFlags_PopupAlignLeft); ImGui::SameLine(); HelpMarker("Only makes a difference if the popup is larger than the combo"); if (ImGui::CheckboxFlags("ImGuiComboFlags_NoArrowButton", &flags, ImGuiComboFlags_NoArrowButton)) - flags &= ~ImGuiComboFlags_NoPreview; // Clear the other flag, as we cannot combine both + flags &= ~ImGuiComboFlags_NoPreview; // Clear incompatible flags if (ImGui::CheckboxFlags("ImGuiComboFlags_NoPreview", &flags, ImGuiComboFlags_NoPreview)) - flags &= ~ImGuiComboFlags_NoArrowButton; // Clear the other flag, as we cannot combine both + flags &= ~(ImGuiComboFlags_NoArrowButton | ImGuiComboFlags_WidthFitPreview); // Clear incompatible flags + if (ImGui::CheckboxFlags("ImGuiComboFlags_WidthFitPreview", &flags, ImGuiComboFlags_WidthFitPreview)) + flags &= ~ImGuiComboFlags_NoPreview; + + // Override default popup height + if (ImGui::CheckboxFlags("ImGuiComboFlags_HeightSmall", &flags, ImGuiComboFlags_HeightSmall)) + flags &= ~(ImGuiComboFlags_HeightMask_ & ~ImGuiComboFlags_HeightSmall); + if (ImGui::CheckboxFlags("ImGuiComboFlags_HeightRegular", &flags, ImGuiComboFlags_HeightRegular)) + flags &= ~(ImGuiComboFlags_HeightMask_ & ~ImGuiComboFlags_HeightRegular); + if (ImGui::CheckboxFlags("ImGuiComboFlags_HeightLargest", &flags, ImGuiComboFlags_HeightLargest)) + flags &= ~(ImGuiComboFlags_HeightMask_ & ~ImGuiComboFlags_HeightLargest); // Using the generic BeginCombo() API, you have full control over how to display the combo contents. // (your selection data could be an index, a pointer to the object, an id for the object, a flag intrusively // stored in the object itself, etc.) const char* items[] = { "AAAA", "BBBB", "CCCC", "DDDD", "EEEE", "FFFF", "GGGG", "HHHH", "IIII", "JJJJ", "KKKK", "LLLLLLL", "MMMM", "OOOOOOO" }; static int item_current_idx = 0; // Here we store our selection data as an index. - const char* combo_preview_value = items[item_current_idx]; // Pass in the preview value visible before opening the combo (it could be anything) + + // Pass in the preview value visible before opening the combo (it could technically be different contents or not pulled from items[]) + const char* combo_preview_value = items[item_current_idx]; + if (ImGui::BeginCombo("combo 1", combo_preview_value, flags)) { for (int n = 0; n < IM_ARRAYSIZE(items); n++) @@ -1274,6 +1301,10 @@ static void ShowDemoWindowWidgets() ImGui::EndCombo(); } + ImGui::Spacing(); + ImGui::SeparatorText("One-liner variants"); + HelpMarker("Flags above don't apply to this section."); + // Simplified one-liner Combo() API, using values packed in a single constant string // This is a convenience for when the selection set is small and known at compile-time. static int item_current_2 = 0; @@ -1294,6 +1325,11 @@ static void ShowDemoWindowWidgets() IMGUI_DEMO_MARKER("Widgets/List Boxes"); if (ImGui::TreeNode("List boxes")) { + // BeginListBox() is essentially a thin wrapper to using BeginChild()/EndChild() + // using the ImGuiChildFlags_FrameStyle flag for stylistic changes + displaying a label. + // You may be tempted to simply use BeginChild() directly. However note that BeginChild() requires EndChild() + // to always be called (inconsistent with BeginListBox()/EndListBox()). + // Using the generic BeginListBox() API, you have full control over how to display the combo contents. // (your selection data could be an index, a pointer to the object, an id for the object, a flag intrusively // stored in the object itself, etc.) @@ -1520,6 +1556,7 @@ static void ShowDemoWindowWidgets() HelpMarker("You can use the ImGuiInputTextFlags_CallbackResize facility if you need to wire InputTextMultiline() to a dynamic string type. See misc/cpp/imgui_stdlib.h for an example. (This is not demonstrated in imgui_demo.cpp because we don't want to include in here)"); ImGui::CheckboxFlags("ImGuiInputTextFlags_ReadOnly", &flags, ImGuiInputTextFlags_ReadOnly); ImGui::CheckboxFlags("ImGuiInputTextFlags_AllowTabInput", &flags, ImGuiInputTextFlags_AllowTabInput); + ImGui::SameLine(); HelpMarker("When _AllowTabInput is set, passing through the widget with Tabbing doesn't automatically activate it, in order to also cycling through subsequent widgets."); ImGui::CheckboxFlags("ImGuiInputTextFlags_CtrlEnterForNewLine", &flags, ImGuiInputTextFlags_CtrlEnterForNewLine); ImGui::InputTextMultiline("##source", text, IM_ARRAYSIZE(text), ImVec2(-FLT_MIN, ImGui::GetTextLineHeight() * 16), flags); ImGui::TreePop(); @@ -1610,16 +1647,21 @@ static void ShowDemoWindowWidgets() }; static char buf1[64]; ImGui::InputText("Completion", buf1, 64, ImGuiInputTextFlags_CallbackCompletion, Funcs::MyCallback); - ImGui::SameLine(); HelpMarker("Here we append \"..\" each time Tab is pressed. See 'Examples>Console' for a more meaningful demonstration of using this callback."); + ImGui::SameLine(); HelpMarker( + "Here we append \"..\" each time Tab is pressed. " + "See 'Examples>Console' for a more meaningful demonstration of using this callback."); static char buf2[64]; ImGui::InputText("History", buf2, 64, ImGuiInputTextFlags_CallbackHistory, Funcs::MyCallback); - ImGui::SameLine(); HelpMarker("Here we replace and select text each time Up/Down are pressed. See 'Examples>Console' for a more meaningful demonstration of using this callback."); + ImGui::SameLine(); HelpMarker( + "Here we replace and select text each time Up/Down are pressed. " + "See 'Examples>Console' for a more meaningful demonstration of using this callback."); static char buf3[64]; static int edit_count = 0; ImGui::InputText("Edit", buf3, 64, ImGuiInputTextFlags_CallbackEdit, Funcs::MyCallback, (void*)&edit_count); - ImGui::SameLine(); HelpMarker("Here we toggle the casing of the first character on every edit + count edits."); + ImGui::SameLine(); HelpMarker( + "Here we toggle the casing of the first character on every edit + count edits."); ImGui::SameLine(); ImGui::Text("(%d)", edit_count); ImGui::TreePop(); @@ -1794,8 +1836,9 @@ static void ShowDemoWindowWidgets() ImGui::EndPopup(); } - // Demo Trailing Tabs: click the "+" button to add a new tab (in your app you may want to use a font icon instead of the "+") - // Note that we submit it before the regular tabs, but because of the ImGuiTabItemFlags_Trailing flag it will always appear at the end. + // Demo Trailing Tabs: click the "+" button to add a new tab. + // (In your app you may want to use a font icon instead of the "+") + // We submit it before the regular tabs, but thanks to the ImGuiTabItemFlags_Trailing flag it will always appear at the end. if (show_trailing_button) if (ImGui::TabItemButton("+", ImGuiTabItemFlags_Trailing | ImGuiTabItemFlags_NoTooltip)) active_tabs.push_back(next_tab_id++); // Add new tab @@ -2079,7 +2122,8 @@ static void ShowDemoWindowWidgets() if (ImGui::Button("Default: Float + HDR + Hue Wheel")) ImGui::SetColorEditOptions(ImGuiColorEditFlags_Float | ImGuiColorEditFlags_HDR | ImGuiColorEditFlags_PickerHueWheel); - // Always both a small version of both types of pickers (to make it more visible in the demo to people who are skimming quickly through it) + // Always display a small version of both types of pickers + // (that's in order to make it more visible in the demo to people who are skimming quickly through it) ImGui::Text("Both types:"); float w = (ImGui::GetContentRegionAvail().x - ImGui::GetStyle().ItemSpacing.y) * 0.40f; ImGui::SetNextItemWidth(w); @@ -2484,6 +2528,36 @@ static void ShowDemoWindowWidgets() ImGui::TreePop(); } + IMGUI_DEMO_MARKER("Widgets/Drag and Drop/Tooltip at target location"); + if (ImGui::TreeNode("Tooltip at target location")) + { + for (int n = 0; n < 2; n++) + { + // Drop targets + ImGui::Button(n ? "drop here##1" : "drop here##0"); + if (ImGui::BeginDragDropTarget()) + { + ImGuiDragDropFlags drop_target_flags = ImGuiDragDropFlags_AcceptBeforeDelivery | ImGuiDragDropFlags_AcceptNoPreviewTooltip; + if (const ImGuiPayload* payload = ImGui::AcceptDragDropPayload(IMGUI_PAYLOAD_TYPE_COLOR_4F, drop_target_flags)) + { + IM_UNUSED(payload); + ImGui::SetMouseCursor(ImGuiMouseCursor_NotAllowed); + ImGui::BeginTooltip(); + ImGui::Text("Cannot drop here!"); + ImGui::EndTooltip(); + } + ImGui::EndDragDropTarget(); + } + + // Drop source + static ImVec4 col4 = { 1.0f, 0.0f, 0.2f, 1.0f }; + if (n == 0) + ImGui::ColorButton("drag me", col4); + + } + ImGui::TreePop(); + } + ImGui::TreePop(); } @@ -2605,7 +2679,7 @@ static void ShowDemoWindowWidgets() static bool embed_all_inside_a_child_window = false; ImGui::Checkbox("Embed everything inside a child window for testing _RootWindow flag.", &embed_all_inside_a_child_window); if (embed_all_inside_a_child_window) - ImGui::BeginChild("outer_child", ImVec2(0, ImGui::GetFontSize() * 20.0f), true); + ImGui::BeginChild("outer_child", ImVec2(0, ImGui::GetFontSize() * 20.0f), ImGuiChildFlags_Border); // Testing IsWindowFocused() function with its various flags. ImGui::BulletText( @@ -2665,7 +2739,7 @@ static void ShowDemoWindowWidgets() ImGui::IsWindowHovered(ImGuiHoveredFlags_AnyWindow), ImGui::IsWindowHovered(ImGuiHoveredFlags_Stationary)); - ImGui::BeginChild("child", ImVec2(0, 50), true); + ImGui::BeginChild("child", ImVec2(0, 50), ImGuiChildFlags_Border); ImGui::Text("This is another child window for testing the _ChildWindows flag."); ImGui::EndChild(); if (embed_all_inside_a_child_window) @@ -2752,7 +2826,7 @@ static void ShowDemoWindowLayout() ImGuiWindowFlags window_flags = ImGuiWindowFlags_HorizontalScrollbar; if (disable_mouse_wheel) window_flags |= ImGuiWindowFlags_NoScrollWithMouse; - ImGui::BeginChild("ChildL", ImVec2(ImGui::GetContentRegionAvail().x * 0.5f, 260), false, window_flags); + ImGui::BeginChild("ChildL", ImVec2(ImGui::GetContentRegionAvail().x * 0.5f, 260), ImGuiChildFlags_None, window_flags); for (int i = 0; i < 100; i++) ImGui::Text("%04d: scrollable region", i); ImGui::EndChild(); @@ -2768,7 +2842,7 @@ static void ShowDemoWindowLayout() if (!disable_menu) window_flags |= ImGuiWindowFlags_MenuBar; ImGui::PushStyleVar(ImGuiStyleVar_ChildRounding, 5.0f); - ImGui::BeginChild("ChildR", ImVec2(0, 260), true, window_flags); + ImGui::BeginChild("ChildR", ImVec2(0, 260), ImGuiChildFlags_Border, window_flags); if (!disable_menu && ImGui::BeginMenuBar()) { if (ImGui::BeginMenu("Menu")) @@ -2793,6 +2867,35 @@ static void ShowDemoWindowLayout() ImGui::PopStyleVar(); } + // Child 3: manual-resize + ImGui::SeparatorText("Manual-resize"); + { + HelpMarker("Drag bottom border to resize. Double-click bottom border to auto-fit to vertical contents."); + ImGui::PushStyleColor(ImGuiCol_ChildBg, ImGui::GetStyleColorVec4(ImGuiCol_FrameBg)); + if (ImGui::BeginChild("ResizableChild", ImVec2(-FLT_MIN, ImGui::GetTextLineHeightWithSpacing() * 8), ImGuiChildFlags_Border | ImGuiChildFlags_ResizeY)) + for (int n = 0; n < 10; n++) + ImGui::Text("Line %04d", n); + ImGui::PopStyleColor(); + ImGui::EndChild(); + } + + // Child 4: auto-resizing height with a limit + ImGui::SeparatorText("Auto-resize with constraints"); + { + static int draw_lines = 3; + static int max_height_in_lines = 10; + ImGui::SetNextItemWidth(ImGui::GetFontSize() * 8); + ImGui::DragInt("Lines Count", &draw_lines, 0.2f); + ImGui::SetNextItemWidth(ImGui::GetFontSize() * 8); + ImGui::DragInt("Max Height (in Lines)", &max_height_in_lines, 0.2f); + + ImGui::SetNextWindowSizeConstraints(ImVec2(0.0f, ImGui::GetTextLineHeightWithSpacing() * 1), ImVec2(FLT_MAX, ImGui::GetTextLineHeightWithSpacing() * max_height_in_lines)); + if (ImGui::BeginChild("ConstrainedChild", ImVec2(-FLT_MIN, 0.0f), ImGuiChildFlags_Border | ImGuiChildFlags_AutoResizeY)) + for (int n = 0; n < draw_lines; n++) + ImGui::Text("Line %04d", n); + ImGui::EndChild(); + } + ImGui::SeparatorText("Misc/Advanced"); // Demonstrate a few extra things @@ -2804,19 +2907,33 @@ static void ShowDemoWindowLayout() // the POV of the parent window). See 'Demo->Querying Status (Edited/Active/Hovered etc.)' for details. { static int offset_x = 0; + static bool override_bg_color = true; + static ImGuiChildFlags child_flags = ImGuiChildFlags_Border | ImGuiChildFlags_ResizeX | ImGuiChildFlags_ResizeY; ImGui::SetNextItemWidth(ImGui::GetFontSize() * 8); ImGui::DragInt("Offset X", &offset_x, 1.0f, -1000, 1000); + ImGui::Checkbox("Override ChildBg color", &override_bg_color); + ImGui::CheckboxFlags("ImGuiChildFlags_Border", &child_flags, ImGuiChildFlags_Border); + ImGui::CheckboxFlags("ImGuiChildFlags_AlwaysUseWindowPadding", &child_flags, ImGuiChildFlags_AlwaysUseWindowPadding); + ImGui::CheckboxFlags("ImGuiChildFlags_ResizeX", &child_flags, ImGuiChildFlags_ResizeX); + ImGui::CheckboxFlags("ImGuiChildFlags_ResizeY", &child_flags, ImGuiChildFlags_ResizeY); + ImGui::CheckboxFlags("ImGuiChildFlags_FrameStyle", &child_flags, ImGuiChildFlags_FrameStyle); + ImGui::SameLine(); HelpMarker("Style the child window like a framed item: use FrameBg, FrameRounding, FrameBorderSize, FramePadding instead of ChildBg, ChildRounding, ChildBorderSize, WindowPadding."); + if (child_flags & ImGuiChildFlags_FrameStyle) + override_bg_color = false; ImGui::SetCursorPosX(ImGui::GetCursorPosX() + (float)offset_x); - ImGui::PushStyleColor(ImGuiCol_ChildBg, IM_COL32(255, 0, 0, 100)); - ImGui::BeginChild("Red", ImVec2(200, 100), true, ImGuiWindowFlags_None); + if (override_bg_color) + ImGui::PushStyleColor(ImGuiCol_ChildBg, IM_COL32(255, 0, 0, 100)); + ImGui::BeginChild("Red", ImVec2(200, 100), child_flags, ImGuiWindowFlags_None); + if (override_bg_color) + ImGui::PopStyleColor(); + for (int n = 0; n < 50; n++) ImGui::Text("Some test %d", n); ImGui::EndChild(); bool child_is_hovered = ImGui::IsItemHovered(); ImVec2 child_rect_min = ImGui::GetItemRectMin(); ImVec2 child_rect_max = ImGui::GetItemRectMax(); - ImGui::PopStyleColor(); ImGui::Text("Hovered: %d", child_is_hovered); ImGui::Text("Rect of child window is: (%.0f,%.0f) (%.0f,%.0f)", child_rect_min.x, child_rect_min.y, child_rect_max.x, child_rect_max.y); } @@ -3205,7 +3322,7 @@ static void ShowDemoWindowLayout() const ImGuiWindowFlags child_flags = enable_extra_decorations ? ImGuiWindowFlags_MenuBar : 0; const ImGuiID child_id = ImGui::GetID((void*)(intptr_t)i); - const bool child_is_visible = ImGui::BeginChild(child_id, ImVec2(child_w, 200.0f), true, child_flags); + const bool child_is_visible = ImGui::BeginChild(child_id, ImVec2(child_w, 200.0f), ImGuiChildFlags_Border, child_flags); if (ImGui::BeginMenuBar()) { ImGui::TextUnformatted("abc"); @@ -3252,7 +3369,7 @@ static void ShowDemoWindowLayout() float child_height = ImGui::GetTextLineHeight() + style.ScrollbarSize + style.WindowPadding.y * 2.0f; ImGuiWindowFlags child_flags = ImGuiWindowFlags_HorizontalScrollbar | (enable_extra_decorations ? ImGuiWindowFlags_AlwaysVerticalScrollbar : 0); ImGuiID child_id = ImGui::GetID((void*)(intptr_t)i); - bool child_is_visible = ImGui::BeginChild(child_id, ImVec2(-100, child_height), true, child_flags); + bool child_is_visible = ImGui::BeginChild(child_id, ImVec2(-100, child_height), ImGuiChildFlags_Border, child_flags); if (scroll_to_off) ImGui::SetScrollX(scroll_to_off_px); if (scroll_to_pos) @@ -3294,7 +3411,7 @@ static void ShowDemoWindowLayout() ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding, 3.0f); ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(2.0f, 1.0f)); ImVec2 scrolling_child_size = ImVec2(0, ImGui::GetFrameHeightWithSpacing() * 7 + 30); - ImGui::BeginChild("scrolling", scrolling_child_size, true, ImGuiWindowFlags_HorizontalScrollbar); + ImGui::BeginChild("scrolling", scrolling_child_size, ImGuiChildFlags_Border, ImGuiWindowFlags_HorizontalScrollbar); for (int line = 0; line < lines; line++) { // Display random stuff. For the sake of this trivial demo we are using basic Button() + SameLine() @@ -3363,7 +3480,9 @@ static void ShowDemoWindowLayout() IMGUI_DEMO_MARKER("Layout/Scrolling/Horizontal contents size demo window"); ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(2, 0)); ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(2, 0)); - HelpMarker("Test of different widgets react and impact the work rectangle growing when horizontal scrolling is enabled.\n\nUse 'Metrics->Tools->Show windows rectangles' to visualize rectangles."); + HelpMarker( + "Test how different widgets react and impact the work rectangle growing when horizontal scrolling is enabled.\n\n" + "Use 'Metrics->Tools->Show windows rectangles' to visualize rectangles."); ImGui::Checkbox("H-scrollbar", &show_h_scrollbar); ImGui::Checkbox("Button", &show_button); // Will grow contents size (unless explicitly overwritten) ImGui::Checkbox("Tree nodes", &show_tree_nodes); // Will grow contents size and display highlight over full width @@ -3438,7 +3557,7 @@ static void ShowDemoWindowLayout() } if (show_child) { - ImGui::BeginChild("child", ImVec2(0, 0), true); + ImGui::BeginChild("child", ImVec2(0, 0), ImGuiChildFlags_Border); ImGui::EndChild(); } ImGui::End(); @@ -3519,7 +3638,8 @@ static void ShowDemoWindowLayout() HelpMarker( "Hit-testing is by default performed in item submission order, which generally is perceived as 'back-to-front'.\n\n" - "By using SetNextItemAllowOverlap() you can notify that an item may be overlapped by another. Doing so alters the hovering logic: items using AllowOverlap mode requires an extra frame to accept hovered state."); + "By using SetNextItemAllowOverlap() you can notify that an item may be overlapped by another. " + "Doing so alters the hovering logic: items using AllowOverlap mode requires an extra frame to accept hovered state."); ImGui::Checkbox("Enable AllowOverlap", &enable_allow_overlap); ImVec2 button1_pos = ImGui::GetCursorScreenPos(); @@ -3906,7 +4026,8 @@ struct MyItem } // qsort() is instable so always return a way to differenciate items. - // Your own compare function may want to avoid fallback on implicit sort specs e.g. a Name compare if it wasn't already part of the sort specs. + // Your own compare function may want to avoid fallback on implicit sort specs. + // e.g. a Name compare if it wasn't already part of the sort specs. return (a->ID - b->ID); } }; @@ -3990,6 +4111,7 @@ static void EditTableColumnsFlags(ImGuiTableColumnFlags* p_flags) ImGui::CheckboxFlags("_PreferSortDescending", p_flags, ImGuiTableColumnFlags_PreferSortDescending); ImGui::CheckboxFlags("_IndentEnable", p_flags, ImGuiTableColumnFlags_IndentEnable); ImGui::SameLine(); HelpMarker("Default for column 0"); ImGui::CheckboxFlags("_IndentDisable", p_flags, ImGuiTableColumnFlags_IndentDisable); ImGui::SameLine(); HelpMarker("Default for column >0"); + ImGui::CheckboxFlags("_AngledHeader", p_flags, ImGuiTableColumnFlags_AngledHeader); } static void ShowTableColumnsStatusFlags(ImGuiTableColumnFlags flags) @@ -4014,10 +4136,10 @@ static void ShowDemoWindowTables() ImGui::PushID("Tables"); int open_action = -1; - if (ImGui::Button("Open all")) + if (ImGui::Button("Expand all")) open_action = 1; ImGui::SameLine(); - if (ImGui::Button("Close all")) + if (ImGui::Button("Collapse all")) open_action = 0; ImGui::SameLine(); @@ -4088,8 +4210,9 @@ static void ShowDemoWindowTables() // as TableNextColumn() will automatically wrap around and create new rows as needed. // This is generally more convenient when your cells all contains the same type of data. HelpMarker( - "Only using TableNextColumn(), which tends to be convenient for tables where every cell contains the same type of contents.\n" - "This is also more similar to the old NextColumn() function of the Columns API, and provided to facilitate the Columns->Tables API transition."); + "Only using TableNextColumn(), which tends to be convenient for tables where every cell contains " + "the same type of contents.\n This is also more similar to the old NextColumn() function of the " + "Columns API, and provided to facilitate the Columns->Tables API transition."); if (ImGui::BeginTable("table3", 3)) { for (int item = 0; item < 14; item++) @@ -4145,8 +4268,8 @@ static void ShowDemoWindowTables() if (ImGui::BeginTable("table1", 3, flags)) { - // Display headers so we can inspect their interaction with borders. - // (Headers are not the main purpose of this section of the demo, so we are not elaborating on them too much. See other sections for details) + // Display headers so we can inspect their interaction with borders + // (Headers are not the main purpose of this section of the demo, so we are not elaborating on them now. See other sections for details) if (display_headers) { ImGui::TableSetupColumn("One"); @@ -4185,7 +4308,9 @@ static void ShowDemoWindowTables() PushStyleCompact(); ImGui::CheckboxFlags("ImGuiTableFlags_Resizable", &flags, ImGuiTableFlags_Resizable); ImGui::CheckboxFlags("ImGuiTableFlags_BordersV", &flags, ImGuiTableFlags_BordersV); - ImGui::SameLine(); HelpMarker("Using the _Resizable flag automatically enables the _BordersInnerV flag as well, this is why the resize borders are still showing when unchecking this."); + ImGui::SameLine(); HelpMarker( + "Using the _Resizable flag automatically enables the _BordersInnerV flag as well, " + "this is why the resize borders are still showing when unchecking this."); PopStyleCompact(); if (ImGui::BeginTable("table1", 3, flags)) @@ -4303,6 +4428,7 @@ static void ShowDemoWindowTables() ImGui::CheckboxFlags("ImGuiTableFlags_Hideable", &flags, ImGuiTableFlags_Hideable); ImGui::CheckboxFlags("ImGuiTableFlags_NoBordersInBody", &flags, ImGuiTableFlags_NoBordersInBody); ImGui::CheckboxFlags("ImGuiTableFlags_NoBordersInBodyUntilResize", &flags, ImGuiTableFlags_NoBordersInBodyUntilResize); ImGui::SameLine(); HelpMarker("Disable vertical borders in columns Body until hovered for resize (borders will always appear in Headers)"); + ImGui::CheckboxFlags("ImGuiTableFlags_HighlightHoveredColumn", &flags, ImGuiTableFlags_HighlightHoveredColumn); PopStyleCompact(); if (ImGui::BeginTable("table1", 3, flags)) @@ -4325,7 +4451,8 @@ static void ShowDemoWindowTables() ImGui::EndTable(); } - // Use outer_size.x == 0.0f instead of default to make the table as tight as possible (only valid when no scrolling and no stretch column) + // Use outer_size.x == 0.0f instead of default to make the table as tight as possible + // (only valid when no scrolling and no stretch column) if (ImGui::BeginTable("table2", 3, flags | ImGuiTableFlags_SizingFixedFit, ImVec2(0.0f, 0.0f))) { ImGui::TableSetupColumn("One"); @@ -4358,7 +4485,8 @@ static void ShowDemoWindowTables() "e.g.:\n" "- BorderOuterV\n" "- any form of row selection\n" - "Because of this, activating BorderOuterV sets the default to PadOuterX. Using PadOuterX or NoPadOuterX you can override the default.\n\n" + "Because of this, activating BorderOuterV sets the default to PadOuterX. " + "Using PadOuterX or NoPadOuterX you can override the default.\n\n" "Actual padding values are using style.CellPadding.\n\n" "In this demo we don't show horizontal borders to emphasize how they don't affect default horizontal padding."); @@ -4474,7 +4602,8 @@ static void ShowDemoWindowTables() EditTableSizingFlags(&sizing_policy_flags[table_n]); // To make it easier to understand the different sizing policy, - // For each policy: we display one table where the columns have equal contents width, and one where the columns have different contents width. + // For each policy: we display one table where the columns have equal contents width, + // and one where the columns have different contents width. if (ImGui::BeginTable("table1", 3, sizing_policy_flags[table_n] | flags1)) { for (int row = 0; row < 3; row++) @@ -4503,7 +4632,9 @@ static void ShowDemoWindowTables() ImGui::Spacing(); ImGui::TextUnformatted("Advanced"); ImGui::SameLine(); - HelpMarker("This section allows you to interact and see the effect of various sizing policies depending on whether Scroll is enabled and the contents of your columns."); + HelpMarker( + "This section allows you to interact and see the effect of various sizing policies " + "depending on whether Scroll is enabled and the contents of your columns."); enum ContentsType { CT_ShowWidth, CT_ShortText, CT_LongText, CT_Button, CT_FillButton, CT_InputText }; static ImGuiTableFlags flags = ImGuiTableFlags_ScrollY | ImGuiTableFlags_Borders | ImGuiTableFlags_RowBg | ImGuiTableFlags_Resizable; @@ -4518,7 +4649,9 @@ static void ShowDemoWindowTables() if (contents_type == CT_FillButton) { ImGui::SameLine(); - HelpMarker("Be mindful that using right-alignment (e.g. size.x = -FLT_MIN) creates a feedback loop where contents width can feed into auto-column width can feed into contents width."); + HelpMarker( + "Be mindful that using right-alignment (e.g. size.x = -FLT_MIN) creates a feedback loop " + "where contents width can feed into auto-column width can feed into contents width."); } ImGui::DragInt("Columns", &column_count, 0.1f, 1, 64, "%d", ImGuiSliderFlags_AlwaysClamp); ImGui::CheckboxFlags("ImGuiTableFlags_Resizable", &flags, ImGuiTableFlags_Resizable); @@ -4564,7 +4697,9 @@ static void ShowDemoWindowTables() IMGUI_DEMO_MARKER("Tables/Vertical scrolling, with clipping"); if (ImGui::TreeNode("Vertical scrolling, with clipping")) { - HelpMarker("Here we activate ScrollY, which will create a child window container to allow hosting scrollable contents.\n\nWe also demonstrate using ImGuiListClipper to virtualize the submission of many items."); + HelpMarker( + "Here we activate ScrollY, which will create a child window container to allow hosting scrollable contents.\n\n" + "We also demonstrate using ImGuiListClipper to virtualize the submission of many items."); static ImGuiTableFlags flags = ImGuiTableFlags_ScrollY | ImGuiTableFlags_RowBg | ImGuiTableFlags_BordersOuter | ImGuiTableFlags_BordersV | ImGuiTableFlags_Resizable | ImGuiTableFlags_Reorderable | ImGuiTableFlags_Hideable; PushStyleCompact(); @@ -4610,8 +4745,9 @@ static void ShowDemoWindowTables() HelpMarker( "When ScrollX is enabled, the default sizing policy becomes ImGuiTableFlags_SizingFixedFit, " "as automatically stretching columns doesn't make much sense with horizontal scrolling.\n\n" - "Also note that as of the current version, you will almost always want to enable ScrollY along with ScrollX," - "because the container window won't automatically extend vertically to fix contents (this may be improved in future versions)."); + "Also note that as of the current version, you will almost always want to enable ScrollY along with ScrollX, " + "because the container window won't automatically extend vertically to fix contents " + "(this may be improved in future versions)."); static ImGuiTableFlags flags = ImGuiTableFlags_ScrollX | ImGuiTableFlags_ScrollY | ImGuiTableFlags_RowBg | ImGuiTableFlags_BordersOuter | ImGuiTableFlags_BordersV | ImGuiTableFlags_Resizable | ImGuiTableFlags_Reorderable | ImGuiTableFlags_Hideable; static int freeze_cols = 1; static int freeze_rows = 1; @@ -4668,7 +4804,8 @@ static void ShowDemoWindowTables() HelpMarker( "Showcase using Stretch columns + ScrollX together: " "this is rather unusual and only makes sense when specifying an 'inner_width' for the table!\n" - "Without an explicit value, inner_width is == outer_size.x and therefore using Stretch columns + ScrollX together doesn't make sense."); + "Without an explicit value, inner_width is == outer_size.x and therefore using Stretch columns " + "along with ScrollX doesn't make sense."); static ImGuiTableFlags flags2 = ImGuiTableFlags_SizingStretchSame | ImGuiTableFlags_ScrollX | ImGuiTableFlags_ScrollY | ImGuiTableFlags_BordersOuter | ImGuiTableFlags_RowBg | ImGuiTableFlags_ContextMenuInBody; static float inner_width = 1000.0f; PushStyleCompact(); @@ -4726,8 +4863,9 @@ static void ShowDemoWindowTables() } // Create the real table we care about for the example! - // We use a scrolling table to be able to showcase the difference between the _IsEnabled and _IsVisible flags above, otherwise in - // a non-scrolling table columns are always visible (unless using ImGuiTableFlags_NoKeepColumnsVisible + resizing the parent window down) + // We use a scrolling table to be able to showcase the difference between the _IsEnabled and _IsVisible flags above, + // otherwise in a non-scrolling table columns are always visible (unless using ImGuiTableFlags_NoKeepColumnsVisible + // + resizing the parent window down). const ImGuiTableFlags flags = ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_ScrollX | ImGuiTableFlags_ScrollY | ImGuiTableFlags_RowBg | ImGuiTableFlags_BordersOuter | ImGuiTableFlags_BordersV @@ -4735,15 +4873,22 @@ static void ShowDemoWindowTables() ImVec2 outer_size = ImVec2(0.0f, TEXT_BASE_HEIGHT * 9); if (ImGui::BeginTable("table_columns_flags", column_count, flags, outer_size)) { + bool has_angled_header = false; for (int column = 0; column < column_count; column++) + { + has_angled_header |= (column_flags[column] & ImGuiTableColumnFlags_AngledHeader) != 0; ImGui::TableSetupColumn(column_names[column], column_flags[column]); + } + if (has_angled_header) + ImGui::TableAngledHeadersRow(); ImGui::TableHeadersRow(); for (int column = 0; column < column_count; column++) column_flags_out[column] = ImGui::TableGetColumnFlags(column); float indent_step = (float)((int)TEXT_BASE_WIDTH / 2); for (int row = 0; row < 8; row++) { - ImGui::Indent(indent_step); // Add some indentation to demonstrate usage of per-column IndentEnable/IndentDisable flags. + // Add some indentation to demonstrate usage of per-column IndentEnable/IndentDisable flags. + ImGui::Indent(indent_step); ImGui::TableNextRow(); for (int column = 0; column < column_count; column++) { @@ -4792,7 +4937,9 @@ static void ShowDemoWindowTables() ImGui::EndTable(); } - HelpMarker("Using TableSetupColumn() to setup explicit width.\n\nUnless _NoKeepColumnsVisible is set, fixed columns with set width may still be shrunk down if there's not enough space in the host."); + HelpMarker( + "Using TableSetupColumn() to setup explicit width.\n\nUnless _NoKeepColumnsVisible is set, " + "fixed columns with set width may still be shrunk down if there's not enough space in the host."); static ImGuiTableFlags flags2 = ImGuiTableFlags_None; PushStyleCompact(); @@ -4802,7 +4949,8 @@ static void ShowDemoWindowTables() PopStyleCompact(); if (ImGui::BeginTable("table2", 4, flags2)) { - // We could also set ImGuiTableFlags_SizingFixedFit on the table and all columns will default to ImGuiTableColumnFlags_WidthFixed. + // We could also set ImGuiTableFlags_SizingFixedFit on the table and then all columns + // will default to ImGuiTableColumnFlags_WidthFixed. ImGui::TableSetupColumn("", ImGuiTableColumnFlags_WidthFixed, 100.0f); ImGui::TableSetupColumn("", ImGuiTableColumnFlags_WidthFixed, TEXT_BASE_WIDTH * 15.0f); ImGui::TableSetupColumn("", ImGuiTableColumnFlags_WidthFixed, TEXT_BASE_WIDTH * 30.0f); @@ -4874,7 +5022,10 @@ static void ShowDemoWindowTables() IMGUI_DEMO_MARKER("Tables/Row height"); if (ImGui::TreeNode("Row height")) { - HelpMarker("You can pass a 'min_row_height' to TableNextRow().\n\nRows are padded with 'style.CellPadding.y' on top and bottom, so effectively the minimum row height will always be >= 'style.CellPadding.y * 2.0f'.\n\nWe cannot honor a _maximum_ row height as that would require a unique clipping rectangle per row."); + HelpMarker( + "You can pass a 'min_row_height' to TableNextRow().\n\nRows are padded with 'style.CellPadding.y' on top and bottom, " + "so effectively the minimum row height will always be >= 'style.CellPadding.y * 2.0f'.\n\n" + "We cannot honor a _maximum_ row height as that would require a unique clipping rectangle per row."); if (ImGui::BeginTable("table_row_height", 1, ImGuiTableFlags_Borders)) { for (int row = 0; row < 8; row++) @@ -4887,7 +5038,10 @@ static void ShowDemoWindowTables() ImGui::EndTable(); } - HelpMarker("Showcase using SameLine(0,0) to share Current Line Height between cells.\n\nPlease note that Tables Row Height is not the same thing as Current Line Height, as a table cell may contains multiple lines."); + HelpMarker( + "Showcase using SameLine(0,0) to share Current Line Height between cells.\n\n" + "Please note that Tables Row Height is not the same thing as Current Line Height, " + "as a table cell may contains multiple lines."); if (ImGui::BeginTable("table_share_lineheight", 2, ImGuiTableFlags_Borders)) { ImGui::TableNextRow(); @@ -5060,6 +5214,11 @@ static void ShowDemoWindowTables() { static ImGuiTableFlags flags = ImGuiTableFlags_BordersV | ImGuiTableFlags_BordersOuterH | ImGuiTableFlags_Resizable | ImGuiTableFlags_RowBg | ImGuiTableFlags_NoBordersInBody; + static ImGuiTreeNodeFlags tree_node_flags = ImGuiTreeNodeFlags_SpanAllColumns; + ImGui::CheckboxFlags("ImGuiTreeNodeFlags_SpanFullWidth", &tree_node_flags, ImGuiTreeNodeFlags_SpanFullWidth); + ImGui::CheckboxFlags("ImGuiTreeNodeFlags_SpanAllColumns", &tree_node_flags, ImGuiTreeNodeFlags_SpanAllColumns); + + HelpMarker("See \"Columns flags\" section to configure how indentation is applied to individual columns."); if (ImGui::BeginTable("3ways", 3, flags)) { // The first column will use the default _WidthStretch when ScrollX is Off and _WidthFixed when ScrollX is On @@ -5083,7 +5242,7 @@ static void ShowDemoWindowTables() const bool is_folder = (node->ChildCount > 0); if (is_folder) { - bool open = ImGui::TreeNodeEx(node->Name, ImGuiTreeNodeFlags_SpanFullWidth); + bool open = ImGui::TreeNodeEx(node->Name, tree_node_flags); ImGui::TableNextColumn(); ImGui::TextDisabled("--"); ImGui::TableNextColumn(); @@ -5097,7 +5256,7 @@ static void ShowDemoWindowTables() } else { - ImGui::TreeNodeEx(node->Name, ImGuiTreeNodeFlags_Leaf | ImGuiTreeNodeFlags_Bullet | ImGuiTreeNodeFlags_NoTreePushOnOpen | ImGuiTreeNodeFlags_SpanFullWidth); + ImGui::TreeNodeEx(node->Name, tree_node_flags | ImGuiTreeNodeFlags_Leaf | ImGuiTreeNodeFlags_Bullet | ImGuiTreeNodeFlags_NoTreePushOnOpen); ImGui::TableNextColumn(); ImGui::Text("%d", node->Size); ImGui::TableNextColumn(); @@ -5132,7 +5291,8 @@ static void ShowDemoWindowTables() { HelpMarker( "Showcase using PushItemWidth() and how it is preserved on a per-column basis.\n\n" - "Note that on auto-resizing non-resizable fixed columns, querying the content width for e.g. right-alignment doesn't make sense."); + "Note that on auto-resizing non-resizable fixed columns, querying the content width for " + "e.g. right-alignment doesn't make sense."); if (ImGui::BeginTable("table_item_width", 3, ImGuiTableFlags_Borders)) { ImGui::TableSetupColumn("small"); @@ -5218,13 +5378,72 @@ static void ShowDemoWindowTables() ImGui::TreePop(); } - // Demonstrate creating custom context menus inside columns, while playing it nice with context menus provided by TableHeadersRow()/TableHeader() + // Demonstrate using ImGuiTableColumnFlags_AngledHeader flag to create angled headers + if (open_action != -1) + ImGui::SetNextItemOpen(open_action != 0); + IMGUI_DEMO_MARKER("Tables/Angled headers"); + if (ImGui::TreeNode("Angled headers")) + { + const char* column_names[] = { "Track", "cabasa", "ride", "smash", "tom-hi", "tom-mid", "tom-low", "hihat-o", "hihat-c", "snare-s", "snare-c", "clap", "rim", "kick" }; + const int columns_count = IM_ARRAYSIZE(column_names); + const int rows_count = 12; + + static ImGuiTableFlags table_flags = ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_ScrollX | ImGuiTableFlags_ScrollY | ImGuiTableFlags_BordersOuter | ImGuiTableFlags_BordersInnerH | ImGuiTableFlags_Hideable | ImGuiTableFlags_Resizable | ImGuiTableFlags_Reorderable | ImGuiTableFlags_HighlightHoveredColumn; + static ImGuiTableColumnFlags column_flags = ImGuiTableColumnFlags_AngledHeader | ImGuiTableColumnFlags_WidthFixed; + static bool bools[columns_count * rows_count] = {}; // Dummy storage selection storage + static int frozen_cols = 1; + static int frozen_rows = 2; + ImGui::CheckboxFlags("_ScrollX", &table_flags, ImGuiTableFlags_ScrollX); + ImGui::CheckboxFlags("_ScrollY", &table_flags, ImGuiTableFlags_ScrollY); + ImGui::CheckboxFlags("_Resizable", &table_flags, ImGuiTableFlags_Resizable); + ImGui::CheckboxFlags("_NoBordersInBody", &table_flags, ImGuiTableFlags_NoBordersInBody); + ImGui::CheckboxFlags("_HighlightHoveredColumn", &table_flags, ImGuiTableFlags_HighlightHoveredColumn); + ImGui::SetNextItemWidth(ImGui::GetFontSize() * 8); + ImGui::SliderInt("Frozen columns", &frozen_cols, 0, 2); + ImGui::SetNextItemWidth(ImGui::GetFontSize() * 8); + ImGui::SliderInt("Frozen rows", &frozen_rows, 0, 2); + ImGui::CheckboxFlags("Disable header contributing to column width", &column_flags, ImGuiTableColumnFlags_NoHeaderWidth); + + if (ImGui::BeginTable("table_angled_headers", columns_count, table_flags, ImVec2(0.0f, TEXT_BASE_HEIGHT * 12))) + { + ImGui::TableSetupColumn(column_names[0], ImGuiTableColumnFlags_NoHide | ImGuiTableColumnFlags_NoReorder); + for (int n = 1; n < columns_count; n++) + ImGui::TableSetupColumn(column_names[n], column_flags); + ImGui::TableSetupScrollFreeze(frozen_cols, frozen_rows); + + ImGui::TableAngledHeadersRow(); // Draw angled headers for all columns with the ImGuiTableColumnFlags_AngledHeader flag. + ImGui::TableHeadersRow(); // Draw remaining headers and allow access to context-menu and other functions. + for (int row = 0; row < rows_count; row++) + { + ImGui::PushID(row); + ImGui::TableNextRow(); + ImGui::TableSetColumnIndex(0); + ImGui::AlignTextToFramePadding(); + ImGui::Text("Track %d", row); + for (int column = 1; column < columns_count; column++) + if (ImGui::TableSetColumnIndex(column)) + { + ImGui::PushID(column); + ImGui::Checkbox("", &bools[row * columns_count + column]); + ImGui::PopID(); + } + ImGui::PopID(); + } + ImGui::EndTable(); + } + ImGui::TreePop(); + } + + // Demonstrate creating custom context menus inside columns, + // while playing it nice with context menus provided by TableHeadersRow()/TableHeader() if (open_action != -1) ImGui::SetNextItemOpen(open_action != 0); IMGUI_DEMO_MARKER("Tables/Context menus"); if (ImGui::TreeNode("Context menus")) { - HelpMarker("By default, right-clicking over a TableHeadersRow()/TableHeader() line will open the default context-menu.\nUsing ImGuiTableFlags_ContextMenuInBody we also allow right-clicking over columns body."); + HelpMarker( + "By default, right-clicking over a TableHeadersRow()/TableHeader() line will open the default context-menu.\n" + "Using ImGuiTableFlags_ContextMenuInBody we also allow right-clicking over columns body."); static ImGuiTableFlags flags1 = ImGuiTableFlags_Resizable | ImGuiTableFlags_Reorderable | ImGuiTableFlags_Hideable | ImGuiTableFlags_Borders | ImGuiTableFlags_ContextMenuInBody; PushStyleCompact(); @@ -5261,7 +5480,9 @@ static void ShowDemoWindowTables() // [2.1] Right-click on the TableHeadersRow() line to open the default table context menu. // [2.2] Right-click on the ".." to open a custom popup // [2.3] Right-click in columns to open another custom popup - HelpMarker("Demonstrate mixing table context menu (over header), item context button (over button) and custom per-colum context menu (over column body)."); + HelpMarker( + "Demonstrate mixing table context menu (over header), item context button (over button) " + "and custom per-colunm context menu (over column body)."); ImGuiTableFlags flags2 = ImGuiTableFlags_Resizable | ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_Reorderable | ImGuiTableFlags_Hideable | ImGuiTableFlags_Borders; if (ImGui::BeginTable("table_context_menu_2", COLUMNS_COUNT, flags2)) { @@ -5336,6 +5557,7 @@ static void ShowDemoWindowTables() static ImGuiTableFlags flags = ImGuiTableFlags_Resizable | ImGuiTableFlags_Reorderable | ImGuiTableFlags_Hideable | ImGuiTableFlags_Borders | ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_NoSavedSettings; ImGui::CheckboxFlags("ImGuiTableFlags_ScrollY", &flags, ImGuiTableFlags_ScrollY); ImGui::CheckboxFlags("ImGuiTableFlags_SizingFixedFit", &flags, ImGuiTableFlags_SizingFixedFit); + ImGui::CheckboxFlags("ImGuiTableFlags_HighlightHoveredColumn", &flags, ImGuiTableFlags_HighlightHoveredColumn); for (int n = 0; n < 3; n++) { char buf[32]; @@ -5463,6 +5685,7 @@ static void ShowDemoWindowTables() | ImGuiTableFlags_RowBg | ImGuiTableFlags_Borders | ImGuiTableFlags_NoBordersInBody | ImGuiTableFlags_ScrollX | ImGuiTableFlags_ScrollY | ImGuiTableFlags_SizingFixedFit; + static ImGuiTableColumnFlags columns_base_flags = ImGuiTableColumnFlags_None; enum ContentsType { CT_Text, CT_Button, CT_SmallButton, CT_FillButton, CT_Selectable, CT_SelectableSpanRow }; static int contents_type = CT_SelectableSpanRow; @@ -5556,9 +5779,17 @@ static void ShowDemoWindowTables() ImGui::TreePop(); } - if (ImGui::TreeNodeEx("Other:", ImGuiTreeNodeFlags_DefaultOpen)) + if (ImGui::TreeNodeEx("Headers:", ImGuiTreeNodeFlags_DefaultOpen)) { ImGui::Checkbox("show_headers", &show_headers); + ImGui::CheckboxFlags("ImGuiTableFlags_HighlightHoveredColumn", &flags, ImGuiTableFlags_HighlightHoveredColumn); + ImGui::CheckboxFlags("ImGuiTableColumnFlags_AngledHeader", &columns_base_flags, ImGuiTableColumnFlags_AngledHeader); + ImGui::SameLine(); HelpMarker("Enable AngledHeader on all columns. Best enabled on selected narrow columns (see \"Angled headers\" section of the demo)."); + ImGui::TreePop(); + } + + if (ImGui::TreeNodeEx("Other:", ImGuiTreeNodeFlags_DefaultOpen)) + { ImGui::Checkbox("show_wrapped_text", &show_wrapped_text); ImGui::DragFloat2("##OuterSize", &outer_size_value.x); @@ -5619,12 +5850,12 @@ static void ShowDemoWindowTables() // Declare columns // We use the "user_id" parameter of TableSetupColumn() to specify a user id that will be stored in the sort specifications. // This is so our sort function can identify a column given our own identifier. We could also identify them based on their index! - ImGui::TableSetupColumn("ID", ImGuiTableColumnFlags_DefaultSort | ImGuiTableColumnFlags_WidthFixed | ImGuiTableColumnFlags_NoHide, 0.0f, MyItemColumnID_ID); - ImGui::TableSetupColumn("Name", ImGuiTableColumnFlags_WidthFixed, 0.0f, MyItemColumnID_Name); - ImGui::TableSetupColumn("Action", ImGuiTableColumnFlags_NoSort | ImGuiTableColumnFlags_WidthFixed, 0.0f, MyItemColumnID_Action); - ImGui::TableSetupColumn("Quantity", ImGuiTableColumnFlags_PreferSortDescending, 0.0f, MyItemColumnID_Quantity); - ImGui::TableSetupColumn("Description", (flags & ImGuiTableFlags_NoHostExtendX) ? 0 : ImGuiTableColumnFlags_WidthStretch, 0.0f, MyItemColumnID_Description); - ImGui::TableSetupColumn("Hidden", ImGuiTableColumnFlags_DefaultHide | ImGuiTableColumnFlags_NoSort); + ImGui::TableSetupColumn("ID", columns_base_flags | ImGuiTableColumnFlags_DefaultSort | ImGuiTableColumnFlags_WidthFixed | ImGuiTableColumnFlags_NoHide, 0.0f, MyItemColumnID_ID); + ImGui::TableSetupColumn("Name", columns_base_flags | ImGuiTableColumnFlags_WidthFixed, 0.0f, MyItemColumnID_Name); + ImGui::TableSetupColumn("Action", columns_base_flags | ImGuiTableColumnFlags_NoSort | ImGuiTableColumnFlags_WidthFixed, 0.0f, MyItemColumnID_Action); + ImGui::TableSetupColumn("Quantity", columns_base_flags | ImGuiTableColumnFlags_PreferSortDescending, 0.0f, MyItemColumnID_Quantity); + ImGui::TableSetupColumn("Description", columns_base_flags | ((flags & ImGuiTableFlags_NoHostExtendX) ? 0 : ImGuiTableColumnFlags_WidthStretch), 0.0f, MyItemColumnID_Description); + ImGui::TableSetupColumn("Hidden", columns_base_flags | ImGuiTableColumnFlags_DefaultHide | ImGuiTableColumnFlags_NoSort); ImGui::TableSetupScrollFreeze(freeze_cols, freeze_rows); // Sort our data if sort specs have been changed! @@ -5643,6 +5874,8 @@ static void ShowDemoWindowTables() const bool sorts_specs_using_quantity = (ImGui::TableGetColumnFlags(3) & ImGuiTableColumnFlags_IsSorted) != 0; // Show headers + if (show_headers && (columns_base_flags & ImGuiTableColumnFlags_AngledHeader) != 0) + ImGui::TableAngledHeadersRow(); if (show_headers) ImGui::TableHeadersRow(); @@ -5708,7 +5941,7 @@ static void ShowDemoWindowTables() // Here we demonstrate marking our data set as needing to be sorted again if we modified a quantity, // and we are currently sorting on the column showing the Quantity. // To avoid triggering a sort while holding the button, we only trigger it when the button has been released. - // You will probably need a more advanced system in your code if you want to automatically sort when a specific entry changes. + // You will probably need some extra logic if you want to automatically sort when a specific entry changes. if (ImGui::TableSetColumnIndex(2)) { if (ImGui::SmallButton("Chop")) { item->Quantity += 1; } @@ -5910,7 +6143,7 @@ static void ShowDemoWindowColumns() { ImGui::SetNextWindowContentSize(ImVec2(1500.0f, 0.0f)); ImVec2 child_size = ImVec2(0, ImGui::GetFontSize() * 20.0f); - ImGui::BeginChild("##ScrollingRegion", child_size, false, ImGuiWindowFlags_HorizontalScrollbar); + ImGui::BeginChild("##ScrollingRegion", child_size, ImGuiChildFlags_None, ImGuiWindowFlags_HorizontalScrollbar); ImGui::Columns(10); // Also demonstrate using clipper for large vertical lists @@ -5996,13 +6229,15 @@ static void ShowDemoWindowInputs() for (int i = 0; i < IM_ARRAYSIZE(io.MouseDown); i++) if (ImGui::IsMouseDown(i)) { ImGui::SameLine(); ImGui::Text("b%d (%.02f secs)", i, io.MouseDownDuration[i]); } ImGui::Text("Mouse wheel: %.1f", io.MouseWheel); - // We iterate both legacy native range and named ImGuiKey ranges, which is a little odd but this allows displaying the data for old/new backends. - // User code should never have to go through such hoops! You can generally iterate between ImGuiKey_NamedKey_BEGIN and ImGuiKey_NamedKey_END. + // We iterate both legacy native range and named ImGuiKey ranges. This is a little unusual/odd but this allows + // displaying the data for old/new backends. + // User code should never have to go through such hoops! + // You can generally iterate between ImGuiKey_NamedKey_BEGIN and ImGuiKey_NamedKey_END. #ifdef IMGUI_DISABLE_OBSOLETE_KEYIO struct funcs { static bool IsLegacyNativeDupe(ImGuiKey) { return false; } }; ImGuiKey start_key = ImGuiKey_NamedKey_BEGIN; #else - struct funcs { static bool IsLegacyNativeDupe(ImGuiKey key) { return key < 512 && ImGui::GetIO().KeyMap[key] != -1; } }; // Hide Native<>ImGuiKey duplicates when both exists in the array + struct funcs { static bool IsLegacyNativeDupe(ImGuiKey key) { return key >= 0 && key < 512 && ImGui::GetIO().KeyMap[key] != -1; } }; // Hide Native<>ImGuiKey duplicates when both exists in the array ImGuiKey start_key = (ImGuiKey)0; #endif ImGui::Text("Keys down:"); for (ImGuiKey key = start_key; key < ImGuiKey_NamedKey_END; key = (ImGuiKey)(key + 1)) { if (funcs::IsLegacyNativeDupe(key) || !ImGui::IsKeyDown(key)) continue; ImGui::SameLine(); ImGui::Text((key < ImGuiKey_NamedKey_BEGIN) ? "\"%s\"" : "\"%s\" %d", ImGui::GetKeyName(key), key); } @@ -6036,7 +6271,8 @@ static void ShowDemoWindowInputs() { HelpMarker( "Hovering the colored canvas will override io.WantCaptureXXX fields.\n" - "Notice how normally (when set to none), the value of io.WantCaptureKeyboard would be false when hovering and true when clicking."); + "Notice how normally (when set to none), the value of io.WantCaptureKeyboard would be false when hovering " + "and true when clicking."); static int capture_override_mouse = -1; static int capture_override_keyboard = -1; const char* capture_override_desc[] = { "None", "Set to false", "Set to true" }; @@ -6202,7 +6438,7 @@ void ImGui::ShowAboutWindow(bool* p_open) bool copy_to_clipboard = ImGui::Button("Copy to clipboard"); ImVec2 child_size = ImVec2(0, ImGui::GetTextLineHeightWithSpacing() * 18); - ImGui::BeginChildFrame(ImGui::GetID("cfg_infos"), child_size, ImGuiWindowFlags_NoMove); + ImGui::BeginChild(ImGui::GetID("cfg_infos"), child_size, ImGuiChildFlags_FrameStyle); if (copy_to_clipboard) { ImGui::LogToClipboard(); @@ -6339,7 +6575,7 @@ void ImGui::ShowAboutWindow(bool* p_open) ImGui::LogText("\n```\n"); ImGui::LogFinish(); } - ImGui::EndChildFrame(); + ImGui::EndChild(); } ImGui::End(); } @@ -6450,7 +6686,6 @@ void ImGui::ShowStyleEditor(ImGuiStyle* ref) ImGui::SeparatorText("Main"); ImGui::SliderFloat2("WindowPadding", (float*)&style.WindowPadding, 0.0f, 20.0f, "%.0f"); ImGui::SliderFloat2("FramePadding", (float*)&style.FramePadding, 0.0f, 20.0f, "%.0f"); - ImGui::SliderFloat2("CellPadding", (float*)&style.CellPadding, 0.0f, 20.0f, "%.0f"); ImGui::SliderFloat2("ItemSpacing", (float*)&style.ItemSpacing, 0.0f, 20.0f, "%.0f"); ImGui::SliderFloat2("ItemInnerSpacing", (float*)&style.ItemInnerSpacing, 0.0f, 20.0f, "%.0f"); ImGui::SliderFloat2("TouchExtraPadding", (float*)&style.TouchExtraPadding, 0.0f, 10.0f, "%.0f"); @@ -6475,6 +6710,10 @@ void ImGui::ShowStyleEditor(ImGuiStyle* ref) ImGui::SliderFloat("GrabRounding", &style.GrabRounding, 0.0f, 12.0f, "%.0f"); ImGui::SliderFloat("TabRounding", &style.TabRounding, 0.0f, 12.0f, "%.0f"); + ImGui::SeparatorText("Tables"); + ImGui::SliderFloat2("CellPadding", (float*)&style.CellPadding, 0.0f, 20.0f, "%.0f"); + ImGui::SliderAngle("TableAngledHeadersAngle", &style.TableAngledHeadersAngle, -50.0f, +50.0f); + ImGui::SeparatorText("Widgets"); ImGui::SliderFloat2("WindowTitleAlign", (float*)&style.WindowTitleAlign, 0.0f, 1.0f, "%.2f"); int window_menu_button_position = style.WindowMenuButtonPosition + 1; @@ -6548,14 +6787,21 @@ void ImGui::ShowStyleEditor(ImGuiStyle* ref) "Left-click on color square to open color picker,\n" "Right-click to open edit options menu."); - ImGui::BeginChild("##colors", ImVec2(0, 0), true, ImGuiWindowFlags_AlwaysVerticalScrollbar | ImGuiWindowFlags_AlwaysHorizontalScrollbar | ImGuiWindowFlags_NavFlattened); - ImGui::PushItemWidth(-160); + ImGui::SetNextWindowSizeConstraints(ImVec2(0.0f, ImGui::GetTextLineHeightWithSpacing() * 10), ImVec2(FLT_MAX, FLT_MAX)); + ImGui::BeginChild("##colors", ImVec2(0, 0), ImGuiChildFlags_Border, ImGuiWindowFlags_AlwaysVerticalScrollbar | ImGuiWindowFlags_AlwaysHorizontalScrollbar | ImGuiWindowFlags_NavFlattened); + ImGui::PushItemWidth(ImGui::GetFontSize() * -12); for (int i = 0; i < ImGuiCol_COUNT; i++) { const char* name = ImGui::GetStyleColorName(i); if (!filter.PassFilter(name)) continue; ImGui::PushID(i); +#ifndef IMGUI_DISABLE_DEBUG_TOOLS + if (ImGui::Button("?")) + ImGui::DebugFlashStyleColor((ImGuiCol)i); + ImGui::SetItemTooltip("Flash given color to identify places where it is used."); + ImGui::SameLine(); +#endif ImGui::ColorEdit4("##color", (float*)&style.Colors[i], ImGuiColorEditFlags_AlphaBar | alpha_flags); if (memcmp(&style.Colors[i], &ref->Colors[i], sizeof(ImVec4)) != 0) { @@ -6775,7 +7021,7 @@ static void ShowExampleMenuFile() { static bool enabled = true; ImGui::MenuItem("Enabled", "", &enabled); - ImGui::BeginChild("child", ImVec2(0, 60), true); + ImGui::BeginChild("child", ImVec2(0, 60), ImGuiChildFlags_Border); for (int i = 0; i < 10; i++) ImGui::Text("Scrolling Text %d", i); ImGui::EndChild(); @@ -6860,19 +7106,19 @@ struct ExampleAppConsole { ClearLog(); for (int i = 0; i < History.Size; i++) - free(History[i]); + ImGui::MemFree(History[i]); } // Portable helpers static int Stricmp(const char* s1, const char* s2) { int d; while ((d = toupper(*s2) - toupper(*s1)) == 0 && *s1) { s1++; s2++; } return d; } static int Strnicmp(const char* s1, const char* s2, int n) { int d = 0; while (n > 0 && (d = toupper(*s2) - toupper(*s1)) == 0 && *s1) { s1++; s2++; n--; } return d; } - static char* Strdup(const char* s) { IM_ASSERT(s); size_t len = strlen(s) + 1; void* buf = malloc(len); IM_ASSERT(buf); return (char*)memcpy(buf, (const void*)s, len); } + static char* Strdup(const char* s) { IM_ASSERT(s); size_t len = strlen(s) + 1; void* buf = ImGui::MemAlloc(len); IM_ASSERT(buf); return (char*)memcpy(buf, (const void*)s, len); } static void Strtrim(char* s) { char* str_end = s + strlen(s); while (str_end > s && str_end[-1] == ' ') str_end--; *str_end = 0; } void ClearLog() { for (int i = 0; i < Items.Size; i++) - free(Items[i]); + ImGui::MemFree(Items[i]); Items.clear(); } @@ -6941,7 +7187,7 @@ struct ExampleAppConsole // Reserve enough left-over height for 1 separator + 1 input text const float footer_height_to_reserve = ImGui::GetStyle().ItemSpacing.y + ImGui::GetFrameHeightWithSpacing(); - if (ImGui::BeginChild("ScrollingRegion", ImVec2(0, -footer_height_to_reserve), false, ImGuiWindowFlags_HorizontalScrollbar)) + if (ImGui::BeginChild("ScrollingRegion", ImVec2(0, -footer_height_to_reserve), ImGuiChildFlags_None, ImGuiWindowFlags_HorizontalScrollbar)) { if (ImGui::BeginPopupContextWindow()) { @@ -7038,7 +7284,7 @@ struct ExampleAppConsole for (int i = History.Size - 1; i >= 0; i--) if (Stricmp(History[i], command_line) == 0) { - free(History[i]); + ImGui::MemFree(History[i]); History.erase(History.begin() + i); break; } @@ -7252,7 +7498,7 @@ struct ExampleAppLog ImGui::Separator(); - if (ImGui::BeginChild("scrolling", ImVec2(0, 0), false, ImGuiWindowFlags_HorizontalScrollbar)) + if (ImGui::BeginChild("scrolling", ImVec2(0, 0), ImGuiChildFlags_None, ImGuiWindowFlags_HorizontalScrollbar)) { if (clear) Clear(); @@ -7371,7 +7617,7 @@ static void ShowExampleAppLayout(bool* p_open) // Left static int selected = 0; { - ImGui::BeginChild("left pane", ImVec2(150, 0), true); + ImGui::BeginChild("left pane", ImVec2(150, 0), ImGuiChildFlags_Border | ImGuiChildFlags_ResizeX); for (int i = 0; i < 100; i++) { // FIXME: Good candidate to use ImGuiSelectableFlags_SelectOnNav @@ -7599,18 +7845,31 @@ static void ShowExampleAppConstrainedResize(bool* p_open) { // Helper functions to demonstrate programmatic constraints // FIXME: This doesn't take account of decoration size (e.g. title bar), library should make this easier. - static void AspectRatio(ImGuiSizeCallbackData* data) { float aspect_ratio = *(float*)data->UserData; data->DesiredSize.x = IM_MAX(data->CurrentSize.x, data->CurrentSize.y); data->DesiredSize.y = (float)(int)(data->DesiredSize.x / aspect_ratio); } - static void Square(ImGuiSizeCallbackData* data) { data->DesiredSize.x = data->DesiredSize.y = IM_MAX(data->CurrentSize.x, data->CurrentSize.y); } - static void Step(ImGuiSizeCallbackData* data) { float step = *(float*)data->UserData; data->DesiredSize = ImVec2((int)(data->CurrentSize.x / step + 0.5f) * step, (int)(data->CurrentSize.y / step + 0.5f) * step); } + // FIXME: None of the three demos works consistently when resizing from borders. + static void AspectRatio(ImGuiSizeCallbackData* data) + { + float aspect_ratio = *(float*)data->UserData; + data->DesiredSize.y = (float)(int)(data->DesiredSize.x / aspect_ratio); + } + static void Square(ImGuiSizeCallbackData* data) + { + data->DesiredSize.x = data->DesiredSize.y = IM_MAX(data->DesiredSize.x, data->DesiredSize.y); + } + static void Step(ImGuiSizeCallbackData* data) + { + float step = *(float*)data->UserData; + data->DesiredSize = ImVec2((int)(data->DesiredSize.x / step + 0.5f) * step, (int)(data->DesiredSize.y / step + 0.5f) * step); + } }; const char* test_desc[] = { "Between 100x100 and 500x500", "At least 100x100", - "Resize vertical only", - "Resize horizontal only", + "Resize vertical + lock current width", + "Resize horizontal + lock current height", "Width Between 400 and 500", + "Height at least 400", "Custom: Aspect Ratio 16:9", "Custom: Always Square", "Custom: Fixed Steps (100)", @@ -7619,7 +7878,7 @@ static void ShowExampleAppConstrainedResize(bool* p_open) // Options static bool auto_resize = false; static bool window_padding = true; - static int type = 5; // Aspect Ratio + static int type = 6; // Aspect Ratio static int display_lines = 10; // Submit constraint @@ -7627,12 +7886,13 @@ static void ShowExampleAppConstrainedResize(bool* p_open) float fixed_step = 100.0f; if (type == 0) ImGui::SetNextWindowSizeConstraints(ImVec2(100, 100), ImVec2(500, 500)); // Between 100x100 and 500x500 if (type == 1) ImGui::SetNextWindowSizeConstraints(ImVec2(100, 100), ImVec2(FLT_MAX, FLT_MAX)); // Width > 100, Height > 100 - if (type == 2) ImGui::SetNextWindowSizeConstraints(ImVec2(-1, 0), ImVec2(-1, FLT_MAX)); // Vertical only - if (type == 3) ImGui::SetNextWindowSizeConstraints(ImVec2(0, -1), ImVec2(FLT_MAX, -1)); // Horizontal only + if (type == 2) ImGui::SetNextWindowSizeConstraints(ImVec2(-1, 0), ImVec2(-1, FLT_MAX)); // Resize vertical + lock current width + if (type == 3) ImGui::SetNextWindowSizeConstraints(ImVec2(0, -1), ImVec2(FLT_MAX, -1)); // Resize horizontal + lock current height if (type == 4) ImGui::SetNextWindowSizeConstraints(ImVec2(400, -1), ImVec2(500, -1)); // Width Between and 400 and 500 - if (type == 5) ImGui::SetNextWindowSizeConstraints(ImVec2(0, 0), ImVec2(FLT_MAX, FLT_MAX), CustomConstraints::AspectRatio, (void*)&aspect_ratio); // Aspect ratio - if (type == 6) ImGui::SetNextWindowSizeConstraints(ImVec2(0, 0), ImVec2(FLT_MAX, FLT_MAX), CustomConstraints::Square); // Always Square - if (type == 7) ImGui::SetNextWindowSizeConstraints(ImVec2(0, 0), ImVec2(FLT_MAX, FLT_MAX), CustomConstraints::Step, (void*)&fixed_step); // Fixed Step + if (type == 5) ImGui::SetNextWindowSizeConstraints(ImVec2(-1, 500), ImVec2(-1, FLT_MAX)); // Height at least 400 + if (type == 6) ImGui::SetNextWindowSizeConstraints(ImVec2(0, 0), ImVec2(FLT_MAX, FLT_MAX), CustomConstraints::AspectRatio, (void*)&aspect_ratio); // Aspect ratio + if (type == 7) ImGui::SetNextWindowSizeConstraints(ImVec2(0, 0), ImVec2(FLT_MAX, FLT_MAX), CustomConstraints::Square); // Always Square + if (type == 8) ImGui::SetNextWindowSizeConstraints(ImVec2(0, 0), ImVec2(FLT_MAX, FLT_MAX), CustomConstraints::Step, (void*)&fixed_step); // Fixed Step // Submit window if (!window_padding) @@ -7879,6 +8139,9 @@ static void ShowExampleAppCustomRendering(bool* p_open) const float rounding = sz / 5.0f; const int circle_segments = circle_segments_override ? circle_segments_override_v : 0; const int curve_segments = curve_segments_override ? curve_segments_override_v : 0; + const ImVec2 cp3[3] = { ImVec2(0.0f, sz * 0.6f), ImVec2(sz * 0.5f, -sz * 0.4f), ImVec2(sz, sz) }; // Control points for curves + const ImVec2 cp4[4] = { ImVec2(0.0f, 0.0f), ImVec2(sz * 1.3f, sz * 0.3f), ImVec2(sz - sz * 1.3f, sz - sz * 0.3f), ImVec2(sz, sz) }; + float x = p.x + 4.0f; float y = p.y + 4.0f; for (int n = 0; n < 2; n++) @@ -7897,17 +8160,23 @@ static void ShowExampleAppCustomRendering(bool* p_open) draw_list->AddLine(ImVec2(x, y), ImVec2(x, y + sz), col, th); x += spacing; // Vertical line (note: drawing a filled rectangle will be faster!) draw_list->AddLine(ImVec2(x, y), ImVec2(x + sz, y + sz), col, th); x += sz + spacing; // Diagonal line + // Path + draw_list->PathArcTo(ImVec2(x + sz*0.5f, y + sz*0.5f), sz*0.5f, 3.141592f, 3.141592f * -0.5f); + draw_list->PathStroke(col, ImDrawFlags_None, th); + x += sz + spacing; + // Quadratic Bezier Curve (3 control points) - ImVec2 cp3[3] = { ImVec2(x, y + sz * 0.6f), ImVec2(x + sz * 0.5f, y - sz * 0.4f), ImVec2(x + sz, y + sz) }; - draw_list->AddBezierQuadratic(cp3[0], cp3[1], cp3[2], col, th, curve_segments); x += sz + spacing; + draw_list->AddBezierQuadratic(ImVec2(x + cp3[0].x, y + cp3[0].y), ImVec2(x + cp3[1].x, y + cp3[1].y), ImVec2(x + cp3[2].x, y + cp3[2].y), col, th, curve_segments); + x += sz + spacing; // Cubic Bezier Curve (4 control points) - ImVec2 cp4[4] = { ImVec2(x, y), ImVec2(x + sz * 1.3f, y + sz * 0.3f), ImVec2(x + sz - sz * 1.3f, y + sz - sz * 0.3f), ImVec2(x + sz, y + sz) }; - draw_list->AddBezierCubic(cp4[0], cp4[1], cp4[2], cp4[3], col, th, curve_segments); + draw_list->AddBezierCubic(ImVec2(x + cp4[0].x, y + cp4[0].y), ImVec2(x + cp4[1].x, y + cp4[1].y), ImVec2(x + cp4[2].x, y + cp4[2].y), ImVec2(x + cp4[3].x, y + cp4[3].y), col, th, curve_segments); x = p.x + 4; y += sz + spacing; } + + // Filled shapes draw_list->AddNgonFilled(ImVec2(x + sz * 0.5f, y + sz * 0.5f), sz * 0.5f, col, ngon_sides); x += sz + spacing; // N-gon draw_list->AddCircleFilled(ImVec2(x + sz * 0.5f, y + sz * 0.5f), sz * 0.5f, col, circle_segments); x += sz + spacing; // Circle draw_list->AddEllipseFilled(ImVec2(x + sz * 0.5f, y + sz * 0.5f), sz * 0.5f, sz * 0.3f, col, -0.3f, circle_segments); x += sz + spacing;// Ellipse @@ -7919,9 +8188,27 @@ static void ShowExampleAppCustomRendering(bool* p_open) draw_list->AddRectFilled(ImVec2(x, y), ImVec2(x + sz, y + thickness), col); x += sz + spacing; // Horizontal line (faster than AddLine, but only handle integer thickness) draw_list->AddRectFilled(ImVec2(x, y), ImVec2(x + thickness, y + sz), col); x += spacing * 2.0f;// Vertical line (faster than AddLine, but only handle integer thickness) draw_list->AddRectFilled(ImVec2(x, y), ImVec2(x + 1, y + 1), col); x += sz; // Pixel (faster than AddLine) + + // Path + draw_list->PathArcTo(ImVec2(x + sz * 0.5f, y + sz * 0.5f), sz * 0.5f, 3.141592f * -0.5f, 3.141592f); + draw_list->PathFillConvex(col); + x += sz + spacing; + + // Quadratic Bezier Curve (3 control points) + draw_list->PathLineTo(ImVec2(x + cp3[0].x, y + cp3[0].y)); + draw_list->PathBezierQuadraticCurveTo(ImVec2(x + cp3[1].x, y + cp3[1].y), ImVec2(x + cp3[2].x, y + cp3[2].y), curve_segments); + draw_list->PathFillConvex(col); + x += sz + spacing; + + // Cubic Bezier Curve (4 control points): this is concave so not drawing it yet + //draw_list->PathLineTo(ImVec2(x + cp4[0].x, y + cp4[0].y)); + //draw_list->PathBezierCubicCurveTo(ImVec2(x + cp4[1].x, y + cp4[1].y), ImVec2(x + cp4[2].x, y + cp4[2].y), ImVec2(x + cp4[3].x, y + cp4[3].y), curve_segments); + //draw_list->PathFillConvex(col); + //x += sz + spacing; + draw_list->AddRectFilledMultiColor(ImVec2(x, y), ImVec2(x + sz, y + sz), IM_COL32(0, 0, 0, 255), IM_COL32(255, 0, 0, 255), IM_COL32(255, 255, 0, 255), IM_COL32(0, 255, 0, 255)); - ImGui::Dummy(ImVec2((sz + spacing) * 11.2f, (sz + spacing) * 3.0f)); + ImGui::Dummy(ImVec2((sz + spacing) * 12.2f, (sz + spacing) * 3.0f)); ImGui::PopItemWidth(); ImGui::EndTabItem(); } @@ -7943,7 +8230,7 @@ static void ShowExampleAppCustomRendering(bool* p_open) // To use a child window instead we could use, e.g: // ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0, 0)); // Disable padding // ImGui::PushStyleColor(ImGuiCol_ChildBg, IM_COL32(50, 50, 50, 255)); // Set a background color - // ImGui::BeginChild("canvas", ImVec2(0.0f, 0.0f), true, ImGuiWindowFlags_NoMove); + // ImGui::BeginChild("canvas", ImVec2(0.0f, 0.0f), ImGuiChildFlags_Border, ImGuiWindowFlags_NoMove); // ImGui::PopStyleColor(); // ImGui::PopStyleVar(); // [...] @@ -8515,13 +8802,13 @@ void ShowExampleAppDocuments(bool* p_open) { ImGui::Text("Save change to the following items?"); float item_height = ImGui::GetTextLineHeightWithSpacing(); - if (ImGui::BeginChildFrame(ImGui::GetID("frame"), ImVec2(-FLT_MIN, 6.25f * item_height))) + if (ImGui::BeginChild(ImGui::GetID("frame"), ImVec2(-FLT_MIN, 6.25f * item_height), ImGuiChildFlags_FrameStyle)) { for (int n = 0; n < close_queue.Size; n++) if (close_queue[n]->Dirty) ImGui::Text("%s", close_queue[n]->Name); } - ImGui::EndChildFrame(); + ImGui::EndChild(); ImVec2 button_size(ImGui::GetFontSize() * 7.0f, 0.0f); if (ImGui::Button("Yes", button_size)) diff --git a/cimgui/imgui/imgui_draw.cpp b/cimgui/imgui/imgui_draw.cpp index e6bb0b56f..659d578e4 100644 --- a/cimgui/imgui/imgui_draw.cpp +++ b/cimgui/imgui/imgui_draw.cpp @@ -1,4 +1,4 @@ -// dear imgui, v1.90 WIP +// dear imgui, v1.90.4 // (drawing and font code) /* @@ -135,7 +135,7 @@ namespace IMGUI_STB_NAMESPACE #define STBTT_sqrt(x) ImSqrt(x) #define STBTT_pow(x,y) ImPow(x,y) #define STBTT_fabs(x) ImFabs(x) -#define STBTT_ifloor(x) ((int)ImFloorSigned(x)) +#define STBTT_ifloor(x) ((int)ImFloor(x)) #define STBTT_iceil(x) ((int)ImCeil(x)) #define STBTT_STATIC #define STB_TRUETYPE_IMPLEMENTATION @@ -392,9 +392,9 @@ void ImDrawListSharedData::SetCircleTessellationMaxError(float max_error) void ImDrawList::_ResetForNewFrame() { // Verify that the ImDrawCmd fields we want to memcmp() are contiguous in memory. - IM_STATIC_ASSERT(IM_OFFSETOF(ImDrawCmd, ClipRect) == 0); - IM_STATIC_ASSERT(IM_OFFSETOF(ImDrawCmd, TextureId) == sizeof(ImVec4)); - IM_STATIC_ASSERT(IM_OFFSETOF(ImDrawCmd, VtxOffset) == sizeof(ImVec4) + sizeof(ImTextureID)); + IM_STATIC_ASSERT(offsetof(ImDrawCmd, ClipRect) == 0); + IM_STATIC_ASSERT(offsetof(ImDrawCmd, TextureId) == sizeof(ImVec4)); + IM_STATIC_ASSERT(offsetof(ImDrawCmd, VtxOffset) == sizeof(ImVec4) + sizeof(ImTextureID)); if (_Splitter._Count > 1) _Splitter.Merge(this); @@ -481,7 +481,7 @@ void ImDrawList::AddCallback(ImDrawCallback callback, void* callback_data) } // Compare ClipRect, TextureId and VtxOffset with a single memcmp() -#define ImDrawCmd_HeaderSize (IM_OFFSETOF(ImDrawCmd, VtxOffset) + sizeof(unsigned int)) +#define ImDrawCmd_HeaderSize (offsetof(ImDrawCmd, VtxOffset) + sizeof(unsigned int)) #define ImDrawCmd_HeaderCompare(CMD_LHS, CMD_RHS) (memcmp(CMD_LHS, CMD_RHS, ImDrawCmd_HeaderSize)) // Compare ClipRect, TextureId, VtxOffset #define ImDrawCmd_HeaderCopy(CMD_DST, CMD_SRC) (memcpy(CMD_DST, CMD_SRC, ImDrawCmd_HeaderSize)) // Copy ClipRect, TextureId, VtxOffset #define ImDrawCmd_AreSequentialIdxOffset(CMD_0, CMD_1) (CMD_0->IdxOffset + CMD_0->ElemCount == CMD_1->IdxOffset) @@ -647,7 +647,7 @@ void ImDrawList::PrimReserve(int idx_count, int vtx_count) _IdxWritePtr = IdxBuffer.Data + idx_buffer_old_size; } -// Release the a number of reserved vertices/indices from the end of the last reservation made with PrimReserve(). +// Release the number of reserved vertices/indices from the end of the last reservation made with PrimReserve(). void ImDrawList::PrimUnreserve(int idx_count, int vtx_count) { IM_ASSERT_PARANOID(idx_count >= 0 && vtx_count >= 0); @@ -1197,8 +1197,8 @@ void ImDrawList::PathArcTo(const ImVec2& center, float radius, float a_min, floa const float a_min_sample_f = IM_DRAWLIST_ARCFAST_SAMPLE_MAX * a_min / (IM_PI * 2.0f); const float a_max_sample_f = IM_DRAWLIST_ARCFAST_SAMPLE_MAX * a_max / (IM_PI * 2.0f); - const int a_min_sample = a_is_reverse ? (int)ImFloorSigned(a_min_sample_f) : (int)ImCeil(a_min_sample_f); - const int a_max_sample = a_is_reverse ? (int)ImCeil(a_max_sample_f) : (int)ImFloorSigned(a_max_sample_f); + const int a_min_sample = a_is_reverse ? (int)ImFloor(a_min_sample_f) : (int)ImCeil(a_min_sample_f); + const int a_max_sample = a_is_reverse ? (int)ImCeil(a_max_sample_f) : (int)ImFloor(a_max_sample_f); const int a_mid_samples = a_is_reverse ? ImMax(a_min_sample - a_max_sample, 0) : ImMax(a_max_sample - a_min_sample, 0); const float a_min_segment_angle = a_min_sample * IM_PI * 2.0f / IM_DRAWLIST_ARCFAST_SAMPLE_MAX; @@ -1995,6 +1995,14 @@ void ImGui::ShadeVertsLinearUV(ImDrawList* draw_list, int vert_start_idx, int ve } } +void ImGui::ShadeVertsTransformPos(ImDrawList* draw_list, int vert_start_idx, int vert_end_idx, const ImVec2& pivot_in, float cos_a, float sin_a, const ImVec2& pivot_out) +{ + ImDrawVert* vert_start = draw_list->VtxBuffer.Data + vert_start_idx; + ImDrawVert* vert_end = draw_list->VtxBuffer.Data + vert_end_idx; + for (ImDrawVert* vertex = vert_start; vertex < vert_end; ++vertex) + vertex->pos = ImRotate(vertex->pos- pivot_in, cos_a, sin_a) + pivot_out; +} + //----------------------------------------------------------------------------- // [SECTION] ImFontConfig //----------------------------------------------------------------------------- @@ -2007,6 +2015,7 @@ ImFontConfig::ImFontConfig() OversampleV = 1; GlyphMaxAdvanceX = FLT_MAX; RasterizerMultiply = 1.0f; + RasterizerDensity = 1.0f; EllipsisChar = (ImWchar)-1; } @@ -2227,7 +2236,7 @@ ImFont* ImFontAtlas::AddFontDefault(const ImFontConfig* font_cfg_template) if (font_cfg.Name[0] == '\0') ImFormatString(font_cfg.Name, IM_ARRAYSIZE(font_cfg.Name), "ProggyClean.ttf, %dpx", (int)font_cfg.SizePixels); font_cfg.EllipsisChar = (ImWchar)0x0085; - font_cfg.GlyphOffset.y = 1.0f * IM_FLOOR(font_cfg.SizePixels / 13.0f); // Add +1 offset per 13 units + font_cfg.GlyphOffset.y = 1.0f * IM_TRUNC(font_cfg.SizePixels / 13.0f); // Add +1 offset per 13 units const char* ttf_compressed_base85 = GetDefaultCompressedFontDataTTFBase85(); const ImWchar* glyph_ranges = font_cfg.GlyphRanges != NULL ? font_cfg.GlyphRanges : GetGlyphRangesDefault(); @@ -2564,7 +2573,7 @@ static bool ImFontAtlasBuildWithStbTruetype(ImFontAtlas* atlas) // Convert our ranges in the format stb_truetype wants ImFontConfig& cfg = atlas->ConfigData[src_i]; - src_tmp.PackRange.font_size = cfg.SizePixels; + src_tmp.PackRange.font_size = cfg.SizePixels * cfg.RasterizerDensity; src_tmp.PackRange.first_unicode_codepoint_in_range = 0; src_tmp.PackRange.array_of_unicode_codepoints = src_tmp.GlyphsList.Data; src_tmp.PackRange.num_chars = src_tmp.GlyphsList.Size; @@ -2573,7 +2582,7 @@ static bool ImFontAtlasBuildWithStbTruetype(ImFontAtlas* atlas) src_tmp.PackRange.v_oversample = (unsigned char)cfg.OversampleV; // Gather the sizes of all rectangles we will need to pack (this loop is based on stbtt_PackFontRangesGatherRects) - const float scale = (cfg.SizePixels > 0) ? stbtt_ScaleForPixelHeight(&src_tmp.FontInfo, cfg.SizePixels) : stbtt_ScaleForMappingEmToPixels(&src_tmp.FontInfo, -cfg.SizePixels); + const float scale = (cfg.SizePixels > 0.0f) ? stbtt_ScaleForPixelHeight(&src_tmp.FontInfo, cfg.SizePixels * cfg.RasterizerDensity) : stbtt_ScaleForMappingEmToPixels(&src_tmp.FontInfo, -cfg.SizePixels * cfg.RasterizerDensity); const int padding = atlas->TexGlyphPadding; for (int glyph_i = 0; glyph_i < src_tmp.GlyphsList.Size; glyph_i++) { @@ -2669,12 +2678,14 @@ static bool ImFontAtlasBuildWithStbTruetype(ImFontAtlas* atlas) int unscaled_ascent, unscaled_descent, unscaled_line_gap; stbtt_GetFontVMetrics(&src_tmp.FontInfo, &unscaled_ascent, &unscaled_descent, &unscaled_line_gap); - const float ascent = ImFloor(unscaled_ascent * font_scale + ((unscaled_ascent > 0.0f) ? +1 : -1)); - const float descent = ImFloor(unscaled_descent * font_scale + ((unscaled_descent > 0.0f) ? +1 : -1)); + const float ascent = ImTrunc(unscaled_ascent * font_scale + ((unscaled_ascent > 0.0f) ? +1 : -1)); + const float descent = ImTrunc(unscaled_descent * font_scale + ((unscaled_descent > 0.0f) ? +1 : -1)); ImFontAtlasBuildSetupFont(atlas, dst_font, &cfg, ascent, descent); const float font_off_x = cfg.GlyphOffset.x; const float font_off_y = cfg.GlyphOffset.y + IM_ROUND(dst_font->Ascent); + const float inv_rasterization_scale = 1.0f / cfg.RasterizerDensity; + for (int glyph_i = 0; glyph_i < src_tmp.GlyphsCount; glyph_i++) { // Register glyph @@ -2683,7 +2694,11 @@ static bool ImFontAtlasBuildWithStbTruetype(ImFontAtlas* atlas) stbtt_aligned_quad q; float unused_x = 0.0f, unused_y = 0.0f; stbtt_GetPackedQuad(src_tmp.PackedChars, atlas->TexWidth, atlas->TexHeight, glyph_i, &unused_x, &unused_y, &q, 0); - dst_font->AddGlyph(&cfg, (ImWchar)codepoint, q.x0 + font_off_x, q.y0 + font_off_y, q.x1 + font_off_x, q.y1 + font_off_y, q.s0, q.t0, q.s1, q.t1, pc.xadvance); + float x0 = q.x0 * inv_rasterization_scale + font_off_x; + float y0 = q.y0 * inv_rasterization_scale + font_off_y; + float x1 = q.x1 * inv_rasterization_scale + font_off_x; + float y1 = q.y1 * inv_rasterization_scale + font_off_y; + dst_font->AddGlyph(&cfg, (ImWchar)codepoint, x0, y0, x1, y1, q.s0, q.t0, q.s1, q.t1, pc.xadvance * inv_rasterization_scale); } } @@ -2879,7 +2894,7 @@ void ImFontAtlasBuildInit(ImFontAtlas* atlas) // - Note that using io.FontGlobalScale or SetWindowFontScale(), with are legacy-ish, partially supported features, can still lead to unrounded sizes. // - We may support it better later and remove this rounding. for (ImFontConfig& cfg : atlas->ConfigData) - cfg.SizePixels = ImFloor(cfg.SizePixels); + cfg.SizePixels = ImTrunc(cfg.SizePixels); // Register texture region for mouse cursors or standard white pixels if (atlas->PackIdMouseCursors < 0) @@ -3406,7 +3421,7 @@ void ImFont::AddGlyph(const ImFontConfig* cfg, ImWchar codepoint, float x0, floa advance_x = ImClamp(advance_x, cfg->GlyphMinAdvanceX, cfg->GlyphMaxAdvanceX); if (advance_x != advance_x_original) { - float char_off_x = cfg->PixelSnapH ? ImFloor((advance_x - advance_x_original) * 0.5f) : (advance_x - advance_x_original) * 0.5f; + float char_off_x = cfg->PixelSnapH ? ImTrunc((advance_x - advance_x_original) * 0.5f) : (advance_x - advance_x_original) * 0.5f; x0 += char_off_x; x1 += char_off_x; } @@ -3674,8 +3689,8 @@ void ImFont::RenderChar(ImDrawList* draw_list, float size, const ImVec2& pos, Im if (glyph->Colored) col |= ~IM_COL32_A_MASK; float scale = (size >= 0.0f) ? (size / FontSize) : 1.0f; - float x = IM_FLOOR(pos.x); - float y = IM_FLOOR(pos.y); + float x = IM_TRUNC(pos.x); + float y = IM_TRUNC(pos.y); draw_list->PrimReserve(6, 4); draw_list->PrimRectUV(ImVec2(x + glyph->X0 * scale, y + glyph->Y0 * scale), ImVec2(x + glyph->X1 * scale, y + glyph->Y1 * scale), ImVec2(glyph->U0, glyph->V0), ImVec2(glyph->U1, glyph->V1), col); } @@ -3687,8 +3702,8 @@ void ImFont::RenderText(ImDrawList* draw_list, float size, const ImVec2& pos, Im text_end = text_begin + strlen(text_begin); // ImGui:: functions generally already provides a valid text_end, so this is merely to handle direct calls. // Align to be pixel perfect - float x = IM_FLOOR(pos.x); - float y = IM_FLOOR(pos.y); + float x = IM_TRUNC(pos.x); + float y = IM_TRUNC(pos.y); if (y > clip_rect.w) return; @@ -3997,8 +4012,8 @@ void ImGui::RenderRectFilledRangeH(ImDrawList* draw_list, const ImRect& rect, Im } else { - draw_list->PathArcTo(ImVec2(x0, p1.y - rounding), rounding, IM_PI - arc0_e, IM_PI - arc0_b, 3); // BL - draw_list->PathArcTo(ImVec2(x0, p0.y + rounding), rounding, IM_PI + arc0_b, IM_PI + arc0_e, 3); // TR + draw_list->PathArcTo(ImVec2(x0, p1.y - rounding), rounding, IM_PI - arc0_e, IM_PI - arc0_b); // BL + draw_list->PathArcTo(ImVec2(x0, p0.y + rounding), rounding, IM_PI + arc0_b, IM_PI + arc0_e); // TR } if (p1.x > rect.Min.x + rounding) { @@ -4017,8 +4032,8 @@ void ImGui::RenderRectFilledRangeH(ImDrawList* draw_list, const ImRect& rect, Im } else { - draw_list->PathArcTo(ImVec2(x1, p0.y + rounding), rounding, -arc1_e, -arc1_b, 3); // TR - draw_list->PathArcTo(ImVec2(x1, p1.y - rounding), rounding, +arc1_b, +arc1_e, 3); // BR + draw_list->PathArcTo(ImVec2(x1, p0.y + rounding), rounding, -arc1_e, -arc1_b); // TR + draw_list->PathArcTo(ImVec2(x1, p1.y - rounding), rounding, +arc1_b, +arc1_e); // BR } } draw_list->PathFillConvex(col); @@ -4216,8 +4231,8 @@ static unsigned int stb_decompress(unsigned char *output, const unsigned char *i //----------------------------------------------------------------------------- // ProggyClean.ttf // Copyright (c) 2004, 2005 Tristan Grimmer -// MIT license (see License.txt in http://www.upperbounds.net/download/ProggyClean.ttf.zip) -// Download and more information at http://upperbounds.net +// MIT license (see License.txt in http://www.proggyfonts.net/index.php?menu=download) +// Download and more information at http://www.proggyfonts.net or http://upperboundsinteractive.com/fonts.php //----------------------------------------------------------------------------- // File: 'ProggyClean.ttf' (41208 bytes) // Exported using misc/fonts/binary_to_compressed_c.cpp (with compression + base85 string encoding). diff --git a/cimgui/imgui/imgui_internal.h b/cimgui/imgui/imgui_internal.h index 6f8606774..2d243a183 100644 --- a/cimgui/imgui/imgui_internal.h +++ b/cimgui/imgui/imgui_internal.h @@ -1,12 +1,7 @@ -// dear imgui, v1.90 WIP +// dear imgui, v1.90.4 // (internal structures/api) // You may use this file to debug, understand or extend Dear ImGui features but we don't provide any guarantee of forward compatibility. -// To implement maths operators for ImVec2 (disabled by default to not conflict with using IM_VEC2_CLASS_EXTRA with your own math types+operators), use: -/* -#define IMGUI_DEFINE_MATH_OPERATORS -#include "imgui_internal.h" -*/ /* @@ -20,6 +15,8 @@ Index of this file: // [SECTION] Generic helpers // [SECTION] ImDrawList support // [SECTION] Widgets support: flags, enums, data structures +// [SECTION] Data types support +// [SECTION] Popup support // [SECTION] Inputs support // [SECTION] Clipper support // [SECTION] Navigation support @@ -82,7 +79,7 @@ Index of this file: #pragma clang diagnostic ignored "-Wunknown-warning-option" // warning: unknown warning group 'xxx' #endif #pragma clang diagnostic ignored "-Wunknown-pragmas" // warning: unknown warning group 'xxx' -#pragma clang diagnostic ignored "-Wfloat-equal" // warning: comparing floating point with == or != is unsafe // storing and comparing against same constants ok, for ImFloorSigned() +#pragma clang diagnostic ignored "-Wfloat-equal" // warning: comparing floating point with == or != is unsafe // storing and comparing against same constants ok, for ImFloor() #pragma clang diagnostic ignored "-Wunused-function" // for stb_textedit.h #pragma clang diagnostic ignored "-Wmissing-prototypes" // for stb_textedit.h #pragma clang diagnostic ignored "-Wold-style-cast" @@ -206,13 +203,13 @@ extern IMGUI_API ImGuiContext* GImGui; // Current implicit context pointer namespace ImStb { -#undef STB_TEXTEDIT_STRING -#undef STB_TEXTEDIT_CHARTYPE -#define STB_TEXTEDIT_STRING ImGuiInputTextState -#define STB_TEXTEDIT_CHARTYPE ImWchar -#define STB_TEXTEDIT_GETWIDTH_NEWLINE (-1.0f) -#define STB_TEXTEDIT_UNDOSTATECOUNT 99 -#define STB_TEXTEDIT_UNDOCHARCOUNT 999 +#undef IMSTB_TEXTEDIT_STRING +#undef IMSTB_TEXTEDIT_CHARTYPE +#define IMSTB_TEXTEDIT_STRING ImGuiInputTextState +#define IMSTB_TEXTEDIT_CHARTYPE ImWchar +#define IMSTB_TEXTEDIT_GETWIDTH_NEWLINE (-1.0f) +#define IMSTB_TEXTEDIT_UNDOSTATECOUNT 99 +#define IMSTB_TEXTEDIT_UNDOCHARCOUNT 999 #include "imstb_textedit.h" } // namespace ImStb @@ -240,15 +237,16 @@ namespace ImStb #else #define IMGUI_DEBUG_LOG(...) ((void)0) #endif -#define IMGUI_DEBUG_LOG_ACTIVEID(...) do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventActiveId) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0) -#define IMGUI_DEBUG_LOG_FOCUS(...) do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventFocus) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0) -#define IMGUI_DEBUG_LOG_POPUP(...) do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventPopup) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0) -#define IMGUI_DEBUG_LOG_NAV(...) do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventNav) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0) -#define IMGUI_DEBUG_LOG_SELECTION(...) do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventSelection)IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0) -#define IMGUI_DEBUG_LOG_CLIPPER(...) do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventClipper) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0) -#define IMGUI_DEBUG_LOG_IO(...) do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventIO) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0) -#define IMGUI_DEBUG_LOG_DOCKING(...) do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventDocking) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0) -#define IMGUI_DEBUG_LOG_VIEWPORT(...) do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventViewport) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0) +#define IMGUI_DEBUG_LOG_ACTIVEID(...) do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventActiveId) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0) +#define IMGUI_DEBUG_LOG_FOCUS(...) do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventFocus) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0) +#define IMGUI_DEBUG_LOG_POPUP(...) do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventPopup) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0) +#define IMGUI_DEBUG_LOG_NAV(...) do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventNav) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0) +#define IMGUI_DEBUG_LOG_SELECTION(...) do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventSelection) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0) +#define IMGUI_DEBUG_LOG_CLIPPER(...) do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventClipper) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0) +#define IMGUI_DEBUG_LOG_IO(...) do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventIO) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0) +#define IMGUI_DEBUG_LOG_INPUTROUTING(...) do{if (g.DebugLogFlags & ImGuiDebugLogFlags_EventInputRouting)IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0) +#define IMGUI_DEBUG_LOG_DOCKING(...) do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventDocking) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0) +#define IMGUI_DEBUG_LOG_VIEWPORT(...) do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventViewport) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0) // Static Asserts #define IM_STATIC_ASSERT(_COND) static_assert(_COND, "") @@ -281,10 +279,13 @@ namespace ImStb #define IM_MEMALIGN(_OFF,_ALIGN) (((_OFF) + ((_ALIGN) - 1)) & ~((_ALIGN) - 1)) // Memory align e.g. IM_ALIGN(0,4)=0, IM_ALIGN(1,4)=4, IM_ALIGN(4,4)=4, IM_ALIGN(5,4)=8 #define IM_F32_TO_INT8_UNBOUND(_VAL) ((int)((_VAL) * 255.0f + ((_VAL)>=0 ? 0.5f : -0.5f))) // Unsaturated, for display purpose #define IM_F32_TO_INT8_SAT(_VAL) ((int)(ImSaturate(_VAL) * 255.0f + 0.5f)) // Saturated, always output 0..255 -#define IM_FLOOR(_VAL) ((float)(int)(_VAL)) // ImFloor() is not inlined in MSVC debug builds +#define IM_TRUNC(_VAL) ((float)(int)(_VAL)) // ImTrunc() is not inlined in MSVC debug builds #define IM_ROUND(_VAL) ((float)(int)((_VAL) + 0.5f)) // #define IM_STRINGIFY_HELPER(_X) #_X #define IM_STRINGIFY(_X) IM_STRINGIFY_HELPER(_X) // Preprocessor idiom to stringify e.g. an integer. +#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS +#define IM_FLOOR IM_TRUNC +#endif // Enforce cdecl calling convention for functions called by the standard library, in case compilation settings changed the default to e.g. __vectorcall #ifdef _MSC_VER @@ -309,11 +310,11 @@ namespace ImStb #elif defined(__clang__) #define IM_DEBUG_BREAK() __builtin_debugtrap() #elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) -#define IM_DEBUG_BREAK() __asm__ volatile("int $0x03") +#define IM_DEBUG_BREAK() __asm__ volatile("int3;nop") #elif defined(__GNUC__) && defined(__thumb__) #define IM_DEBUG_BREAK() __asm__ volatile(".inst 0xde01") #elif defined(__GNUC__) && defined(__arm__) && !defined(__thumb__) -#define IM_DEBUG_BREAK() __asm__ volatile(".inst 0xe7f001f0"); +#define IM_DEBUG_BREAK() __asm__ volatile(".inst 0xe7f001f0") #else #define IM_DEBUG_BREAK() IM_ASSERT(0) // It is expected that you define IM_DEBUG_BREAK() into something that will break nicely in a debugger! #endif @@ -448,7 +449,6 @@ IM_MSVC_RUNTIME_CHECKS_OFF #define ImAcos(X) acosf(X) #define ImAtan2(Y, X) atan2f((Y), (X)) #define ImAtof(STR) atof(STR) -//#define ImFloorStd(X) floorf(X) // We use our own, see ImFloor() and ImFloorSigned() #define ImCeil(X) ceilf(X) static inline float ImPow(float x, float y) { return powf(x, y); } // DragBehaviorT/SliderBehaviorT uses ImPow with either float/double and need the precision static inline double ImPow(double x, double y) { return pow(x, y); } @@ -486,10 +486,10 @@ static inline float ImSaturate(float f) static inline float ImLengthSqr(const ImVec2& lhs) { return (lhs.x * lhs.x) + (lhs.y * lhs.y); } static inline float ImLengthSqr(const ImVec4& lhs) { return (lhs.x * lhs.x) + (lhs.y * lhs.y) + (lhs.z * lhs.z) + (lhs.w * lhs.w); } static inline float ImInvLength(const ImVec2& lhs, float fail_value) { float d = (lhs.x * lhs.x) + (lhs.y * lhs.y); if (d > 0.0f) return ImRsqrt(d); return fail_value; } -static inline float ImFloor(float f) { return (float)(int)(f); } -static inline float ImFloorSigned(float f) { return (float)((f >= 0 || (float)(int)f == f) ? (int)f : (int)f - 1); } // Decent replacement for floorf() -static inline ImVec2 ImFloor(const ImVec2& v) { return ImVec2((float)(int)(v.x), (float)(int)(v.y)); } -static inline ImVec2 ImFloorSigned(const ImVec2& v) { return ImVec2(ImFloorSigned(v.x), ImFloorSigned(v.y)); } +static inline float ImTrunc(float f) { return (float)(int)(f); } +static inline ImVec2 ImTrunc(const ImVec2& v) { return ImVec2((float)(int)(v.x), (float)(int)(v.y)); } +static inline float ImFloor(float f) { return (float)((f >= 0 || (float)(int)f == f) ? (int)f : (int)f - 1); } // Decent replacement for floorf() +static inline ImVec2 ImFloor(const ImVec2& v) { return ImVec2(ImFloor(v.x), ImFloor(v.y)); } static inline int ImModPositive(int a, int b) { return (a + b) % b; } static inline float ImDot(const ImVec2& a, const ImVec2& b) { return a.x * b.x + a.y * b.y; } static inline ImVec2 ImRotate(const ImVec2& v, float cos_a, float sin_a) { return ImVec2(v.x * cos_a - v.y * sin_a, v.x * sin_a + v.y * cos_a); } @@ -552,6 +552,7 @@ struct IMGUI_API ImRect ImVec2 GetBR() const { return Max; } // Bottom-right bool Contains(const ImVec2& p) const { return p.x >= Min.x && p.y >= Min.y && p.x < Max.x && p.y < Max.y; } bool Contains(const ImRect& r) const { return r.Min.x >= Min.x && r.Min.y >= Min.y && r.Max.x <= Max.x && r.Max.y <= Max.y; } + bool ContainsWithPad(const ImVec2& p, const ImVec2& pad) const { return p.x >= Min.x - pad.x && p.y >= Min.y - pad.y && p.x < Max.x + pad.x && p.y < Max.y + pad.y; } bool Overlaps(const ImRect& r) const { return r.Min.y < Max.y && r.Max.y > Min.y && r.Min.x < Max.x && r.Max.x > Min.x; } void Add(const ImVec2& p) { if (Min.x > p.x) Min.x = p.x; if (Min.y > p.y) Min.y = p.y; if (Max.x < p.x) Max.x = p.x; if (Max.y < p.y) Max.y = p.y; } void Add(const ImRect& r) { if (Min.x > r.Min.x) Min.x = r.Min.x; if (Min.y > r.Min.y) Min.y = r.Min.y; if (Max.x < r.Max.x) Max.x = r.Max.x; if (Max.y < r.Max.y) Max.y = r.Max.y; } @@ -562,7 +563,7 @@ struct IMGUI_API ImRect void TranslateY(float dy) { Min.y += dy; Max.y += dy; } void ClipWith(const ImRect& r) { Min = ImMax(Min, r.Min); Max = ImMin(Max, r.Max); } // Simple version, may lead to an inverted rectangle, which is fine for Contains/Overlaps test but not for display. void ClipWithFull(const ImRect& r) { Min = ImClamp(Min, r.Min, r.Max); Max = ImClamp(Max, r.Min, r.Max); } // Full version, ensure both points are fully clipped. - void Floor() { Min.x = IM_FLOOR(Min.x); Min.y = IM_FLOOR(Min.y); Max.x = IM_FLOOR(Max.x); Max.y = IM_FLOOR(Max.y); } + void Floor() { Min.x = IM_TRUNC(Min.x); Min.y = IM_TRUNC(Min.y); Max.x = IM_TRUNC(Max.x); Max.y = IM_TRUNC(Max.y); } bool IsInverted() const { return Min.x > Max.x || Min.y > Max.y; } ImVec4 ToVec4() const { return ImVec4(Min.x, Min.y, Max.x, Max.y); } }; @@ -701,9 +702,6 @@ struct ImPool int GetBufSize() const { return Buf.Size; } int GetMapSize() const { return Map.Data.Size; } // It is the map we need iterate to find valid items, since we don't have "alive" storage anywhere T* TryGetMapData(ImPoolIdx n) { int idx = Map.Data[n].val_i; if (idx == -1) return NULL; return GetByIndex(idx); } -#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS - int GetSize() { return GetMapSize(); } // For ImPlot: should use GetMapSize() from (IMGUI_VERSION_NUM >= 18304) -#endif }; // Helper: ImChunkStream<> @@ -727,7 +725,6 @@ struct ImChunkStream int offset_from_ptr(const T* p) { IM_ASSERT(p >= begin() && p < end()); const ptrdiff_t off = (const char*)p - Buf.Data; return (int)off; } T* ptr_from_offset(int off) { IM_ASSERT(off >= 4 && off < Buf.Size); return (T*)(void*)(Buf.Data + off); } void swap(ImChunkStream& rhs) { rhs.Buf.swap(Buf); } - }; // Helper: ImGuiTextIndex<> @@ -848,8 +845,8 @@ enum ImGuiItemStatusFlags_ ImGuiItemStatusFlags_HasDeactivated = 1 << 5, // Set if the widget/group is able to provide data for the ImGuiItemStatusFlags_Deactivated flag. ImGuiItemStatusFlags_Deactivated = 1 << 6, // Only valid if ImGuiItemStatusFlags_HasDeactivated is set. ImGuiItemStatusFlags_HoveredWindow = 1 << 7, // Override the HoveredWindow test to allow cross-window hover testing. - ImGuiItemStatusFlags_FocusedByTabbing = 1 << 8, // Set when the Focusable item just got focused by Tabbing (FIXME: to be removed soon) - ImGuiItemStatusFlags_Visible = 1 << 9, // [WIP] Set when item is overlapping the current clipping rectangle (Used internally. Please don't use yet: API/system will change as we refactor Itemadd()). + ImGuiItemStatusFlags_Visible = 1 << 8, // [WIP] Set when item is overlapping the current clipping rectangle (Used internally. Please don't use yet: API/system will change as we refactor Itemadd()). + ImGuiItemStatusFlags_HasClipRect = 1 << 9, // g.LastItemData.ClipRect is valid // Additional status + semantic for ImGuiTestEngine #ifdef IMGUI_ENABLE_TEST_ENGINE @@ -998,43 +995,6 @@ enum ImGuiPlotType ImGuiPlotType_Histogram, }; -enum ImGuiPopupPositionPolicy -{ - ImGuiPopupPositionPolicy_Default, - ImGuiPopupPositionPolicy_ComboBox, - ImGuiPopupPositionPolicy_Tooltip, -}; - -struct ImGuiDataVarInfo -{ - ImGuiDataType Type; - ImU32 Count; // 1+ - ImU32 Offset; // Offset in parent structure - void* GetVarPtr(void* parent) const { return (void*)((unsigned char*)parent + Offset); } -}; - -struct ImGuiDataTypeTempStorage -{ - ImU8 Data[8]; // Can fit any data up to ImGuiDataType_COUNT -}; - -// Type information associated to one ImGuiDataType. Retrieve with DataTypeGetInfo(). -struct ImGuiDataTypeInfo -{ - size_t Size; // Size in bytes - const char* Name; // Short descriptive name for the type, for debugging - const char* PrintFmt; // Default printf format for the type - const char* ScanFmt; // Default scanf format for the type -}; - -// Extend ImGuiDataType_ -enum ImGuiDataTypePrivate_ -{ - ImGuiDataType_String = ImGuiDataType_COUNT + 1, - ImGuiDataType_Pointer, - ImGuiDataType_ID, -}; - // Stacked color modifier, backup of modified data so we can restore it struct ImGuiColorMod { @@ -1071,6 +1031,7 @@ struct IMGUI_API ImGuiGroupData ImGuiID WindowID; ImVec2 BackupCursorPos; ImVec2 BackupCursorMaxPos; + ImVec2 BackupCursorPosPrevLine; ImVec1 BackupIndent; ImVec1 BackupGroupOffset; ImVec2 BackupCurrLineSize; @@ -1078,6 +1039,7 @@ struct IMGUI_API ImGuiGroupData ImGuiID BackupActiveIdIsAlive; bool BackupActiveIdPreviousFrameIsAlive; bool BackupHoveredIdIsAlive; + bool BackupIsSameLine; bool EmitItem; }; @@ -1117,7 +1079,7 @@ struct IMGUI_API ImGuiInputTextState int CurLenW, CurLenA; // we need to maintain our buffer length in both UTF-8 and wchar format. UTF-8 length is valid even if TextA is not. ImVector TextW; // edit buffer, we need to persist but can't guarantee the persistence of the user-provided buffer. so we copy into own buffer. ImVector TextA; // temporary UTF8 buffer for callbacks and other operations. this is not updated in every code-path! size=capacity. - ImVector InitialTextA; // backup of end-user buffer at the time of focus (in UTF-8, unaltered) + ImVector InitialTextA; // value to revert to when pressing Escape = backup of end-user buffer at the time of focus (in UTF-8, unaltered) bool TextAIsValid; // temporary UTF8 buffer is not initially valid before we make the widget active (until then we pull the data from user argument) int BufCapacityA; // end-user buffer capacity float ScrollX; // horizontal scrolling/offset @@ -1127,12 +1089,15 @@ struct IMGUI_API ImGuiInputTextState bool SelectedAllMouseLock; // after a double-click to select all, we ignore further mouse drags to update selection bool Edited; // edited this frame ImGuiInputTextFlags Flags; // copy of InputText() flags. may be used to check if e.g. ImGuiInputTextFlags_Password is set. + bool ReloadUserBuf; // force a reload of user buf so it may be modified externally. may be automatic in future version. + int ReloadSelectionStart; // POSITIONS ARE IN IMWCHAR units *NOT* UTF-8 this is why this is not exposed yet. + int ReloadSelectionEnd; ImGuiInputTextState() { memset(this, 0, sizeof(*this)); } void ClearText() { CurLenW = CurLenA = 0; TextW[0] = 0; TextA[0] = 0; CursorClamp(); } void ClearFreeMemory() { TextW.clear(); TextA.clear(); InitialTextA.clear(); } int GetUndoAvailCount() const { return Stb.undostate.undo_point; } - int GetRedoAvailCount() const { return STB_TEXTEDIT_UNDOSTATECOUNT - Stb.undostate.redo_point; } + int GetRedoAvailCount() const { return IMSTB_TEXTEDIT_UNDOSTATECOUNT - Stb.undostate.redo_point; } void OnKeyPressed(int key); // Cannot be inline because we call in code in stb_textedit.h implementation // Cursor & Selection @@ -1144,21 +1109,16 @@ struct IMGUI_API ImGuiInputTextState int GetSelectionStart() const { return Stb.select_start; } int GetSelectionEnd() const { return Stb.select_end; } void SelectAll() { Stb.select_start = 0; Stb.cursor = Stb.select_end = CurLenW; Stb.has_preferred_x = 0; } -}; -// Storage for current popup stack -struct ImGuiPopupData -{ - ImGuiID PopupId; // Set on OpenPopup() - ImGuiWindow* Window; // Resolved on BeginPopup() - may stay unresolved if user never calls OpenPopup() - ImGuiWindow* BackupNavWindow;// Set on OpenPopup(), a NavWindow that will be restored on popup close - int ParentNavLayer; // Resolved on BeginPopup(). Actually a ImGuiNavLayer type (declared down below), initialized to -1 which is not part of an enum, but serves well-enough as "not any of layers" value - int OpenFrameCount; // Set on OpenPopup() - ImGuiID OpenParentId; // Set on OpenPopup(), we need this to differentiate multiple menu sets from each others (e.g. inside menu bar vs loose menu items) - ImVec2 OpenPopupPos; // Set on OpenPopup(), preferred popup position (typically == OpenMousePos when using mouse) - ImVec2 OpenMousePos; // Set on OpenPopup(), copy of mouse position at the time of opening popup + // Reload user buf (WIP #2890) + // If you modify underlying user-passed const char* while active you need to call this (InputText V2 may lift this) + // strcpy(my_buf, "hello"); + // if (ImGuiInputTextState* state = ImGui::GetInputTextState(id)) // id may be ImGui::GetItemID() is last item + // state->ReloadUserBufAndSelectAll(); + void ReloadUserBufAndSelectAll() { ReloadUserBuf = true; ReloadSelectionStart = 0; ReloadSelectionEnd = INT_MAX; } + void ReloadUserBufAndKeepSelection() { ReloadUserBuf = true; ReloadSelectionStart = Stb.select_start; ReloadSelectionEnd = Stb.select_end; } + void ReloadUserBufAndMoveToEnd() { ReloadUserBuf = true; ReloadSelectionStart = ReloadSelectionEnd = INT_MAX; } - ImGuiPopupData() { memset(this, 0, sizeof(*this)); ParentNavLayer = OpenFrameCount = -1; } }; enum ImGuiNextWindowDataFlags_ @@ -1172,9 +1132,10 @@ enum ImGuiNextWindowDataFlags_ ImGuiNextWindowDataFlags_HasFocus = 1 << 5, ImGuiNextWindowDataFlags_HasBgAlpha = 1 << 6, ImGuiNextWindowDataFlags_HasScroll = 1 << 7, - ImGuiNextWindowDataFlags_HasViewport = 1 << 8, - ImGuiNextWindowDataFlags_HasDock = 1 << 9, - ImGuiNextWindowDataFlags_HasWindowClass = 1 << 10, + ImGuiNextWindowDataFlags_HasChildFlags = 1 << 8, + ImGuiNextWindowDataFlags_HasViewport = 1 << 9, + ImGuiNextWindowDataFlags_HasDock = 1 << 10, + ImGuiNextWindowDataFlags_HasWindowClass = 1 << 11, }; // Storage for SetNexWindow** functions @@ -1190,6 +1151,7 @@ struct ImGuiNextWindowData ImVec2 SizeVal; ImVec2 ContentSizeVal; ImVec2 ScrollVal; + ImGuiChildFlags ChildFlags; bool PosUndock; bool CollapsedVal; ImRect SizeConstraintRect; @@ -1211,9 +1173,10 @@ typedef ImS64 ImGuiSelectionUserData; enum ImGuiNextItemDataFlags_ { - ImGuiNextItemDataFlags_None = 0, - ImGuiNextItemDataFlags_HasWidth = 1 << 0, - ImGuiNextItemDataFlags_HasOpen = 1 << 1, + ImGuiNextItemDataFlags_None = 0, + ImGuiNextItemDataFlags_HasWidth = 1 << 0, + ImGuiNextItemDataFlags_HasOpen = 1 << 1, + ImGuiNextItemDataFlags_HasShortcut = 1 << 2, }; struct ImGuiNextItemData @@ -1221,10 +1184,11 @@ struct ImGuiNextItemData ImGuiNextItemDataFlags Flags; ImGuiItemFlags ItemFlags; // Currently only tested/used for ImGuiItemFlags_AllowOverlap. // Non-flags members are NOT cleared by ItemAdd() meaning they are still valid during NavProcessItem() - float Width; // Set by SetNextItemWidth() ImGuiSelectionUserData SelectionUserData; // Set by SetNextItemSelectionUserData() (note that NULL/0 is a valid value, we use -1 == ImGuiSelectionUserData_Invalid to mark invalid values) - ImGuiCond OpenCond; + float Width; // Set by SetNextItemWidth() + ImGuiKeyChord Shortcut; // Set by SetNextItemShortcut() bool OpenVal; // Set by SetNextItemOpen() + ImGuiCond OpenCond : 8; ImGuiNextItemData() { memset(this, 0, sizeof(*this)); SelectionUserData = -1; } inline void ClearFlags() { Flags = ImGuiNextItemDataFlags_None; ItemFlags = ImGuiItemFlags_None; } // Also cleared manually by ItemAdd()! @@ -1238,7 +1202,9 @@ struct ImGuiLastItemData ImGuiItemStatusFlags StatusFlags; // See ImGuiItemStatusFlags_ ImRect Rect; // Full rectangle ImRect NavRect; // Navigation scoring rectangle (not displayed) - ImRect DisplayRect; // Display rectangle (only if ImGuiItemStatusFlags_HasDisplayRect is set) + // Rarely used fields are not explicitly cleared, only valid when the corresponding ImGuiItemStatusFlags is set. + ImRect DisplayRect; // Display rectangle (ONLY VALID IF ImGuiItemStatusFlags_HasDisplayRect is set) + ImRect ClipRect; // Clip rectangle at the time of submitting item (ONLY VALID IF ImGuiItemStatusFlags_HasClipRect is set) ImGuiLastItemData() { memset(this, 0, sizeof(*this)); } }; @@ -1273,9 +1239,9 @@ struct IMGUI_API ImGuiStackSizes // Data saved for each window pushed into the stack struct ImGuiWindowStackData { - ImGuiWindow* Window; - ImGuiLastItemData ParentLastItemDataBackup; - ImGuiStackSizes StackSizesOnBegin; // Store size of various stacks for asserting + ImGuiWindow* Window; + ImGuiLastItemData ParentLastItemDataBackup; + ImGuiStackSizes StackSizesOnBegin; // Store size of various stacks for asserting }; struct ImGuiShrinkWidthItem @@ -1294,6 +1260,66 @@ struct ImGuiPtrOrIndex ImGuiPtrOrIndex(int index) { Ptr = NULL; Index = index; } }; +//----------------------------------------------------------------------------- +// [SECTION] Data types support +//----------------------------------------------------------------------------- + +struct ImGuiDataVarInfo +{ + ImGuiDataType Type; + ImU32 Count; // 1+ + ImU32 Offset; // Offset in parent structure + void* GetVarPtr(void* parent) const { return (void*)((unsigned char*)parent + Offset); } +}; + +struct ImGuiDataTypeTempStorage +{ + ImU8 Data[8]; // Can fit any data up to ImGuiDataType_COUNT +}; + +// Type information associated to one ImGuiDataType. Retrieve with DataTypeGetInfo(). +struct ImGuiDataTypeInfo +{ + size_t Size; // Size in bytes + const char* Name; // Short descriptive name for the type, for debugging + const char* PrintFmt; // Default printf format for the type + const char* ScanFmt; // Default scanf format for the type +}; + +// Extend ImGuiDataType_ +enum ImGuiDataTypePrivate_ +{ + ImGuiDataType_String = ImGuiDataType_COUNT + 1, + ImGuiDataType_Pointer, + ImGuiDataType_ID, +}; + +//----------------------------------------------------------------------------- +// [SECTION] Popup support +//----------------------------------------------------------------------------- + +enum ImGuiPopupPositionPolicy +{ + ImGuiPopupPositionPolicy_Default, + ImGuiPopupPositionPolicy_ComboBox, + ImGuiPopupPositionPolicy_Tooltip, +}; + +// Storage for popup stacks (g.OpenPopupStack and g.BeginPopupStack) +struct ImGuiPopupData +{ + ImGuiID PopupId; // Set on OpenPopup() + ImGuiWindow* Window; // Resolved on BeginPopup() - may stay unresolved if user never calls OpenPopup() + ImGuiWindow* BackupNavWindow;// Set on OpenPopup(), a NavWindow that will be restored on popup close + int ParentNavLayer; // Resolved on BeginPopup(). Actually a ImGuiNavLayer type (declared down below), initialized to -1 which is not part of an enum, but serves well-enough as "not any of layers" value + int OpenFrameCount; // Set on OpenPopup() + ImGuiID OpenParentId; // Set on OpenPopup(), we need this to differentiate multiple menu sets from each others (e.g. inside menu bar vs loose menu items) + ImVec2 OpenPopupPos; // Set on OpenPopup(), preferred popup position (typically == OpenMousePos when using mouse) + ImVec2 OpenMousePos; // Set on OpenPopup(), copy of mouse position at the time of opening popup + + ImGuiPopupData() { memset(this, 0, sizeof(*this)); ParentNavLayer = OpenFrameCount = -1; } +}; + //----------------------------------------------------------------------------- // [SECTION] Inputs support //----------------------------------------------------------------------------- @@ -1387,11 +1413,12 @@ struct ImGuiKeyRoutingData { ImGuiKeyRoutingIndex NextEntryIndex; ImU16 Mods; // Technically we'd only need 4-bits but for simplify we store ImGuiMod_ values which need 16-bits. ImGuiMod_Shortcut is already translated to Ctrl/Super. + ImU8 RoutingCurrScore; // [DEBUG] For debug display ImU8 RoutingNextScore; // Lower is better (0: perfect score) ImGuiID RoutingCurr; ImGuiID RoutingNext; - ImGuiKeyRoutingData() { NextEntryIndex = -1; Mods = 0; RoutingNextScore = 255; RoutingCurr = RoutingNext = ImGuiKeyOwner_None; } + ImGuiKeyRoutingData() { NextEntryIndex = -1; Mods = 0; RoutingCurrScore = RoutingNextScore = 255; RoutingCurr = RoutingNext = ImGuiKeyOwner_None; } }; // Routing table: maintain a desired owner for each possible key-chord (key + mods), and setup owner in NewFrame() when mods are matching. @@ -1419,49 +1446,69 @@ struct ImGuiKeyOwnerData }; // Flags for extended versions of IsKeyPressed(), IsMouseClicked(), Shortcut(), SetKeyOwner(), SetItemKeyOwner() -// Don't mistake with ImGuiInputTextFlags! (for ImGui::InputText() function) +// Don't mistake with ImGuiInputTextFlags! (which is for ImGui::InputText() function) enum ImGuiInputFlags_ { - // Flags for IsKeyPressed(), IsMouseClicked(), Shortcut() + // Flags for IsKeyPressed(), IsKeyChordPressed(), IsMouseClicked(), Shortcut() ImGuiInputFlags_None = 0, - ImGuiInputFlags_Repeat = 1 << 0, // Return true on successive repeats. Default for legacy IsKeyPressed(). NOT Default for legacy IsMouseClicked(). MUST BE == 1. + + // Repeat mode + ImGuiInputFlags_Repeat = 1 << 0, // Enable repeat. Return true on successive repeats. Default for legacy IsKeyPressed(). NOT Default for legacy IsMouseClicked(). MUST BE == 1. ImGuiInputFlags_RepeatRateDefault = 1 << 1, // Repeat rate: Regular (default) ImGuiInputFlags_RepeatRateNavMove = 1 << 2, // Repeat rate: Fast ImGuiInputFlags_RepeatRateNavTweak = 1 << 3, // Repeat rate: Faster - ImGuiInputFlags_RepeatRateMask_ = ImGuiInputFlags_RepeatRateDefault | ImGuiInputFlags_RepeatRateNavMove | ImGuiInputFlags_RepeatRateNavTweak, + + // Repeat mode: Specify when repeating key pressed can be interrupted. + // In theory ImGuiInputFlags_RepeatUntilOtherKeyPress may be a desirable default, but it would break too many behavior so everything is opt-in. + ImGuiInputFlags_RepeatUntilRelease = 1 << 4, // Stop repeating when released (default for all functions except Shortcut). This only exists to allow overriding Shortcut() default behavior. + ImGuiInputFlags_RepeatUntilKeyModsChange = 1 << 5, // Stop repeating when released OR if keyboard mods are changed (default for Shortcut) + ImGuiInputFlags_RepeatUntilKeyModsChangeFromNone = 1 << 6, // Stop repeating when released OR if keyboard mods are leaving the None state. Allows going from Mod+Key to Key by releasing Mod. + ImGuiInputFlags_RepeatUntilOtherKeyPress = 1 << 7, // Stop repeating when released OR if any other keyboard key is pressed during the repeat // Flags for SetItemKeyOwner() - ImGuiInputFlags_CondHovered = 1 << 4, // Only set if item is hovered (default to both) - ImGuiInputFlags_CondActive = 1 << 5, // Only set if item is active (default to both) + ImGuiInputFlags_CondHovered = 1 << 8, // Only set if item is hovered (default to both) + ImGuiInputFlags_CondActive = 1 << 9, // Only set if item is active (default to both) ImGuiInputFlags_CondDefault_ = ImGuiInputFlags_CondHovered | ImGuiInputFlags_CondActive, - ImGuiInputFlags_CondMask_ = ImGuiInputFlags_CondHovered | ImGuiInputFlags_CondActive, // Flags for SetKeyOwner(), SetItemKeyOwner() - ImGuiInputFlags_LockThisFrame = 1 << 6, // Access to key data will require EXPLICIT owner ID (ImGuiKeyOwner_Any/0 will NOT accepted for polling). Cleared at end of frame. This is useful to make input-owner-aware code steal keys from non-input-owner-aware code. - ImGuiInputFlags_LockUntilRelease = 1 << 7, // Access to key data will require EXPLICIT owner ID (ImGuiKeyOwner_Any/0 will NOT accepted for polling). Cleared when the key is released or at end of each frame if key is released. This is useful to make input-owner-aware code steal keys from non-input-owner-aware code. + // Locking is useful to make input-owner-aware code steal keys from non-input-owner-aware code. If all code is input-owner-aware locking would never be necessary. + ImGuiInputFlags_LockThisFrame = 1 << 10, // Further accesses to key data will require EXPLICIT owner ID (ImGuiKeyOwner_Any/0 will NOT accepted for polling). Cleared at end of frame. + ImGuiInputFlags_LockUntilRelease = 1 << 11, // Further accesses to key data will require EXPLICIT owner ID (ImGuiKeyOwner_Any/0 will NOT accepted for polling). Cleared when the key is released or at end of each frame if key is released. // Routing policies for Shortcut() + low-level SetShortcutRouting() // - The general idea is that several callers register interest in a shortcut, and only one owner gets it. - // - When a policy (other than _RouteAlways) is set, Shortcut() will register itself with SetShortcutRouting(), + // Parent -> call Shortcut(Ctrl+S) // When Parent is focused, Parent gets the shortcut. + // Child1 -> call Shortcut(Ctrl+S) // When Child1 is focused, Child1 gets the shortcut (Child1 overrides Parent shortcuts) + // Child2 -> no call // When Child2 is focused, Parent gets the shortcut. + // The whole system is order independent, so if Child1 does it calls before Parent results will be identical. + // This is an important property as it facilitate working with foreign code or larger codebase. + // - Visualize registered routes in 'Metrics->Inputs' and submitted routes in 'Debug Log->InputRouting'. + // - When a policy (except for _RouteAlways *) is set, Shortcut() will register itself with SetShortcutRouting(), // allowing the system to decide where to route the input among other route-aware calls. - // - Shortcut() uses ImGuiInputFlags_RouteFocused by default: meaning that a simple Shortcut() poll - // will register a route and only succeed when parent window is in the focus stack and if no-one - // with a higher priority is claiming the shortcut. - // - Using ImGuiInputFlags_RouteAlways is roughly equivalent to doing e.g. IsKeyPressed(key) + testing mods. + // (* Using ImGuiInputFlags_RouteAlways is roughly equivalent to calling IsKeyChordPressed(key)). + // - Shortcut() uses ImGuiInputFlags_RouteFocused by default. Meaning that a Shortcut() call will register + // a route and only succeed when parent window is in the focus-stack and if no-one with a higher priority + // is claiming the same shortcut. + // - You can chain two unrelated windows in the focus stack using SetWindowParentWindowForFocusRoute(). // - Priorities: GlobalHigh > Focused (when owner is active item) > Global > Focused (when focused window) > GlobalLow. // - Can select only 1 policy among all available. - ImGuiInputFlags_RouteFocused = 1 << 8, // (Default) Register focused route: Accept inputs if window is in focus stack. Deep-most focused window takes inputs. ActiveId takes inputs over deep-most focused window. - ImGuiInputFlags_RouteGlobalLow = 1 << 9, // Register route globally (lowest priority: unless a focused window or active item registered the route) -> recommended Global priority. - ImGuiInputFlags_RouteGlobal = 1 << 10, // Register route globally (medium priority: unless an active item registered the route, e.g. CTRL+A registered by InputText). - ImGuiInputFlags_RouteGlobalHigh = 1 << 11, // Register route globally (highest priority: unlikely you need to use that: will interfere with every active items) - ImGuiInputFlags_RouteMask_ = ImGuiInputFlags_RouteFocused | ImGuiInputFlags_RouteGlobal | ImGuiInputFlags_RouteGlobalLow | ImGuiInputFlags_RouteGlobalHigh, // _Always not part of this! - ImGuiInputFlags_RouteAlways = 1 << 12, // Do not register route, poll keys directly. - ImGuiInputFlags_RouteUnlessBgFocused= 1 << 13, // Global routes will not be applied if underlying background/void is focused (== no Dear ImGui windows are focused). Useful for overlay applications. - ImGuiInputFlags_RouteExtraMask_ = ImGuiInputFlags_RouteAlways | ImGuiInputFlags_RouteUnlessBgFocused, + ImGuiInputFlags_RouteFocused = 1 << 12, // (Default) Honor focus route: Accept inputs if window is in focus stack. Deep-most focused window takes inputs. ActiveId takes inputs over deep-most focused window. + ImGuiInputFlags_RouteGlobalLow = 1 << 13, // Register route globally (lowest priority: unless a focused window or active item registered the route) -> recommended Global priority IF you need a Global priority. + ImGuiInputFlags_RouteGlobal = 1 << 14, // Register route globally (medium priority: unless an active item registered the route, e.g. CTRL+A registered by InputText will take priority over this). + ImGuiInputFlags_RouteGlobalHigh = 1 << 15, // Register route globally (higher priority: unlikely you need to use that: will interfere with every active items, e.g. CTRL+A registered by InputText will be overriden by this) + ImGuiInputFlags_RouteAlways = 1 << 16, // Do not register route, poll keys directly. + // Routing polices: extra options + ImGuiInputFlags_RouteUnlessBgFocused= 1 << 17, // Global routes will not be applied if underlying background/void is focused (== no Dear ImGui windows are focused). Useful for overlay applications. // [Internal] Mask of which function support which flags - ImGuiInputFlags_SupportedByIsKeyPressed = ImGuiInputFlags_Repeat | ImGuiInputFlags_RepeatRateMask_, - ImGuiInputFlags_SupportedByShortcut = ImGuiInputFlags_Repeat | ImGuiInputFlags_RepeatRateMask_ | ImGuiInputFlags_RouteMask_ | ImGuiInputFlags_RouteExtraMask_, + ImGuiInputFlags_RepeatRateMask_ = ImGuiInputFlags_RepeatRateDefault | ImGuiInputFlags_RepeatRateNavMove | ImGuiInputFlags_RepeatRateNavTweak, + ImGuiInputFlags_RepeatUntilMask_ = ImGuiInputFlags_RepeatUntilRelease | ImGuiInputFlags_RepeatUntilKeyModsChange | ImGuiInputFlags_RepeatUntilKeyModsChangeFromNone | ImGuiInputFlags_RepeatUntilOtherKeyPress, + ImGuiInputFlags_RepeatMask_ = ImGuiInputFlags_Repeat | ImGuiInputFlags_RepeatRateMask_ | ImGuiInputFlags_RepeatUntilMask_, + ImGuiInputFlags_CondMask_ = ImGuiInputFlags_CondHovered | ImGuiInputFlags_CondActive, + ImGuiInputFlags_RouteMask_ = ImGuiInputFlags_RouteFocused | ImGuiInputFlags_RouteGlobal | ImGuiInputFlags_RouteGlobalLow | ImGuiInputFlags_RouteGlobalHigh, // _Always not part of this! + ImGuiInputFlags_SupportedByIsKeyPressed = ImGuiInputFlags_RepeatMask_, + ImGuiInputFlags_SupportedByIsMouseClicked = ImGuiInputFlags_Repeat, + ImGuiInputFlags_SupportedByShortcut = ImGuiInputFlags_RepeatMask_ | ImGuiInputFlags_RouteMask_ | ImGuiInputFlags_RouteAlways | ImGuiInputFlags_RouteUnlessBgFocused, ImGuiInputFlags_SupportedBySetKeyOwner = ImGuiInputFlags_LockThisFrame | ImGuiInputFlags_LockUntilRelease, ImGuiInputFlags_SupportedBySetItemKeyOwner = ImGuiInputFlags_SupportedBySetKeyOwner | ImGuiInputFlags_CondMask_, }; @@ -1506,6 +1553,8 @@ enum ImGuiActivateFlags_ ImGuiActivateFlags_PreferInput = 1 << 0, // Favor activation that requires keyboard text input (e.g. for Slider/Drag). Default for Enter key. ImGuiActivateFlags_PreferTweak = 1 << 1, // Favor activation for tweaking with arrows or gamepad (e.g. for Slider/Drag). Default for Space key and if keyboard is not used. ImGuiActivateFlags_TryToPreserveState = 1 << 2, // Request widget to preserve state if it can (e.g. InputText will try to preserve cursor/selection) + ImGuiActivateFlags_FromTabbing = 1 << 3, // Activation requested by a tabbing request + ImGuiActivateFlags_FromShortcut = 1 << 4, // Activation requested by an item shortcut via SetNextItemShortcut() function. }; // Early work-in-progress API for ScrollToItem() @@ -1526,8 +1575,7 @@ enum ImGuiScrollFlags_ enum ImGuiNavHighlightFlags_ { ImGuiNavHighlightFlags_None = 0, - ImGuiNavHighlightFlags_TypeDefault = 1 << 0, - ImGuiNavHighlightFlags_TypeThin = 1 << 1, + ImGuiNavHighlightFlags_Compact = 1 << 1, // Compact highlight, no padding ImGuiNavHighlightFlags_AlwaysDraw = 1 << 2, // Draw rectangular highlight if (g.NavId == id) _even_ when using the mouse. ImGuiNavHighlightFlags_NoRounding = 1 << 3, }; @@ -1576,6 +1624,12 @@ struct ImGuiNavItemData void Clear() { Window = NULL; ID = FocusScopeId = 0; InFlags = 0; SelectionUserData = -1; DistBox = DistCenter = DistAxial = FLT_MAX; } }; +struct ImGuiFocusScopeData +{ + ImGuiID ID; + ImGuiID WindowID; +}; + //----------------------------------------------------------------------------- // [SECTION] Typing-select support //----------------------------------------------------------------------------- @@ -1617,7 +1671,7 @@ struct IMGUI_API ImGuiTypingSelectState // [SECTION] Columns support //----------------------------------------------------------------------------- -// Flags for internal's BeginColumns(). Prefix using BeginTable() nowadays! +// Flags for internal's BeginColumns(). This is an obsolete API. Prefer using BeginTable() nowadays! enum ImGuiOldColumnFlags_ { ImGuiOldColumnFlags_None = 0, @@ -1625,16 +1679,16 @@ enum ImGuiOldColumnFlags_ ImGuiOldColumnFlags_NoResize = 1 << 1, // Disable resizing columns when clicking on the dividers ImGuiOldColumnFlags_NoPreserveWidths = 1 << 2, // Disable column width preservation when adjusting columns ImGuiOldColumnFlags_NoForceWithinWindow = 1 << 3, // Disable forcing columns to fit within window - ImGuiOldColumnFlags_GrowParentContentsSize = 1 << 4, // (WIP) Restore pre-1.51 behavior of extending the parent window contents size but _without affecting the columns width at all_. Will eventually remove. + ImGuiOldColumnFlags_GrowParentContentsSize = 1 << 4, // Restore pre-1.51 behavior of extending the parent window contents size but _without affecting the columns width at all_. Will eventually remove. // Obsolete names (will be removed) #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS - ImGuiColumnsFlags_None = ImGuiOldColumnFlags_None, - ImGuiColumnsFlags_NoBorder = ImGuiOldColumnFlags_NoBorder, - ImGuiColumnsFlags_NoResize = ImGuiOldColumnFlags_NoResize, - ImGuiColumnsFlags_NoPreserveWidths = ImGuiOldColumnFlags_NoPreserveWidths, - ImGuiColumnsFlags_NoForceWithinWindow = ImGuiOldColumnFlags_NoForceWithinWindow, - ImGuiColumnsFlags_GrowParentContentsSize = ImGuiOldColumnFlags_GrowParentContentsSize, + //ImGuiColumnsFlags_None = ImGuiOldColumnFlags_None, + //ImGuiColumnsFlags_NoBorder = ImGuiOldColumnFlags_NoBorder, + //ImGuiColumnsFlags_NoResize = ImGuiOldColumnFlags_NoResize, + //ImGuiColumnsFlags_NoPreserveWidths = ImGuiOldColumnFlags_NoPreserveWidths, + //ImGuiColumnsFlags_NoForceWithinWindow = ImGuiOldColumnFlags_NoForceWithinWindow, + //ImGuiColumnsFlags_GrowParentContentsSize = ImGuiOldColumnFlags_GrowParentContentsSize, #endif }; @@ -1701,6 +1755,7 @@ enum ImGuiDockNodeFlagsPrivate_ ImGuiDockNodeFlags_NoCloseButton = 1 << 15, // Saved // Disable close button ImGuiDockNodeFlags_NoResizeX = 1 << 16, // // ImGuiDockNodeFlags_NoResizeY = 1 << 17, // // + ImGuiDockNodeFlags_DockedWindowsInFocusRoute= 1 << 18, // // Any docked window will be automatically be focus-route chained (window->ParentWindowForFocusRoute set to this) so Shortcut() in this window can run when any docked window is focused. // Disable docking/undocking actions in this dockspace or individual node (existing docked nodes will be preserved) // Those are not exposed in public because the desirable sharing/inheriting/copy-flag-on-split behaviors are quite difficult to design and understand. // The two public flags ImGuiDockNodeFlags_NoDockingOverCentralNode/ImGuiDockNodeFlags_NoDockingSplit don't have those issues. @@ -1891,6 +1946,7 @@ struct ImGuiWindowSettings ImGuiID ClassId; // ID of window class if specified short DockOrder; // Order of the last time the window was visible within its DockNode. This is used to reorder windows that are reappearing on the same frame. Same value between windows that were active and windows that were none are possible. bool Collapsed; + bool IsChild; bool WantApply; // Set when loaded from .ini data (to enable merging/loading .ini data into an already running context) bool WantDelete; // Set to invalidate/delete the settings entry @@ -1930,6 +1986,7 @@ enum ImGuiLocKey : int ImGuiLocKey_WindowingUntitled, ImGuiLocKey_DockingHideTabBar, ImGuiLocKey_DockingHoldShiftToDock, + ImGuiLocKey_DockingDragToUndockOrMoveNode, ImGuiLocKey_COUNT }; @@ -1947,34 +2004,56 @@ struct ImGuiLocEntry enum ImGuiDebugLogFlags_ { // Event types - ImGuiDebugLogFlags_None = 0, - ImGuiDebugLogFlags_EventActiveId = 1 << 0, - ImGuiDebugLogFlags_EventFocus = 1 << 1, - ImGuiDebugLogFlags_EventPopup = 1 << 2, - ImGuiDebugLogFlags_EventNav = 1 << 3, - ImGuiDebugLogFlags_EventClipper = 1 << 4, - ImGuiDebugLogFlags_EventSelection = 1 << 5, - ImGuiDebugLogFlags_EventIO = 1 << 6, - ImGuiDebugLogFlags_EventDocking = 1 << 7, - ImGuiDebugLogFlags_EventViewport = 1 << 8, - ImGuiDebugLogFlags_EventMask_ = ImGuiDebugLogFlags_EventActiveId | ImGuiDebugLogFlags_EventFocus | ImGuiDebugLogFlags_EventPopup | ImGuiDebugLogFlags_EventNav | ImGuiDebugLogFlags_EventClipper | ImGuiDebugLogFlags_EventSelection | ImGuiDebugLogFlags_EventIO | ImGuiDebugLogFlags_EventDocking | ImGuiDebugLogFlags_EventViewport, - ImGuiDebugLogFlags_OutputToTTY = 1 << 10, // Also send output to TTY - ImGuiDebugLogFlags_OutputToTestEngine = 1 << 11,// Also send output to Test Engine + ImGuiDebugLogFlags_None = 0, + ImGuiDebugLogFlags_EventActiveId = 1 << 0, + ImGuiDebugLogFlags_EventFocus = 1 << 1, + ImGuiDebugLogFlags_EventPopup = 1 << 2, + ImGuiDebugLogFlags_EventNav = 1 << 3, + ImGuiDebugLogFlags_EventClipper = 1 << 4, + ImGuiDebugLogFlags_EventSelection = 1 << 5, + ImGuiDebugLogFlags_EventIO = 1 << 6, + ImGuiDebugLogFlags_EventInputRouting = 1 << 7, + ImGuiDebugLogFlags_EventDocking = 1 << 8, + ImGuiDebugLogFlags_EventViewport = 1 << 9, + + ImGuiDebugLogFlags_EventMask_ = ImGuiDebugLogFlags_EventActiveId | ImGuiDebugLogFlags_EventFocus | ImGuiDebugLogFlags_EventPopup | ImGuiDebugLogFlags_EventNav | ImGuiDebugLogFlags_EventClipper | ImGuiDebugLogFlags_EventSelection | ImGuiDebugLogFlags_EventIO | ImGuiDebugLogFlags_EventInputRouting | ImGuiDebugLogFlags_EventDocking | ImGuiDebugLogFlags_EventViewport, + ImGuiDebugLogFlags_OutputToTTY = 1 << 20, // Also send output to TTY + ImGuiDebugLogFlags_OutputToTestEngine = 1 << 21, // Also send output to Test Engine +}; + +struct ImGuiDebugAllocEntry +{ + int FrameCount; + ImS16 AllocCount; + ImS16 FreeCount; +}; + +struct ImGuiDebugAllocInfo +{ + int TotalAllocCount; // Number of call to MemAlloc(). + int TotalFreeCount; + ImS16 LastEntriesIdx; // Current index in buffer + ImGuiDebugAllocEntry LastEntriesBuf[6]; // Track last 6 frames that had allocations + + ImGuiDebugAllocInfo() { memset(this, 0, sizeof(*this)); } }; struct ImGuiMetricsConfig { bool ShowDebugLog = false; - bool ShowStackTool = false; + bool ShowIDStackTool = false; bool ShowWindowsRects = false; bool ShowWindowsBeginOrder = false; bool ShowTablesRects = false; bool ShowDrawCmdMesh = true; bool ShowDrawCmdBoundingBoxes = true; + bool ShowTextEncodingViewer = false; bool ShowAtlasTintedWithTextColor = false; bool ShowDockingNodes = false; int ShowWindowsRectsType = -1; int ShowTablesRectsType = -1; + int HighlightMonitorIdx = -1; + ImGuiID HighlightViewportID = 0; }; struct ImGuiStackLevelInfo @@ -1988,8 +2067,8 @@ struct ImGuiStackLevelInfo ImGuiStackLevelInfo() { memset(this, 0, sizeof(*this)); } }; -// State for Stack tool queries -struct ImGuiStackTool +// State for ID Stack tool queries +struct ImGuiIDStackTool { int LastActiveFrame; int StackLevel; // -1: query stack and resize Results, >= 0: individual stack level @@ -1998,7 +2077,7 @@ struct ImGuiStackTool bool CopyToClipboardOnCtrlC; float CopyToClipboardLastTime; - ImGuiStackTool() { memset(this, 0, sizeof(*this)); CopyToClipboardLastTime = -FLT_MAX; } + ImGuiIDStackTool() { memset(this, 0, sizeof(*this)); CopyToClipboardLastTime = -FLT_MAX; } }; //----------------------------------------------------------------------------- @@ -2062,6 +2141,7 @@ struct ImGuiContext ImGuiStorage WindowsById; // Map window's ImGuiID to ImGuiWindow* int WindowsActiveCount; // Number of unique windows submitted by frame ImVec2 WindowsHoverPadding; // Padding around resizable windows for which hovering on counts as hovering the window == ImMax(style.TouchExtraPadding, WINDOWS_HOVER_PADDING) + ImGuiID DebugBreakInWindow; // Set to break in Begin() call. ImGuiWindow* CurrentWindow; // Window being drawn into ImGuiWindow* HoveredWindow; // Window the mouse is hovering. Will typically catch mouse inputs. ImGuiWindow* HoveredWindowUnderMovingWindow; // Hovered window ignoring MovingWindow. Only set if MovingWindow is set. @@ -2069,12 +2149,13 @@ struct ImGuiContext ImGuiWindow* WheelingWindow; // Track the window we started mouse-wheeling on. Until a timer elapse or mouse has moved, generally keep scrolling the same window even if during the course of scrolling the mouse ends up hovering a child window. ImVec2 WheelingWindowRefMousePos; int WheelingWindowStartFrame; // This may be set one frame before WheelingWindow is != NULL + int WheelingWindowScrolledFrame; float WheelingWindowReleaseTimer; ImVec2 WheelingWindowWheelRemainder; ImVec2 WheelingAxisAvg; // Item/widgets state and tracking information - ImGuiID DebugHookIdInfo; // Will call core hooks: DebugHookIdInfo() from GetID functions, used by Stack Tool [next HoveredId/ActiveId to not pull in an extra cache-line] + ImGuiID DebugHookIdInfo; // Will call core hooks: DebugHookIdInfo() from GetID functions, used by ID Stack Tool [next HoveredId/ActiveId to not pull in an extra cache-line] ImGuiID HoveredId; // Hovered widget, filled during the frame ImGuiID HoveredIdPreviousFrame; bool HoveredIdAllowOverlap; @@ -2090,10 +2171,11 @@ struct ImGuiContext bool ActiveIdHasBeenPressedBefore; // Track whether the active id led to a press (this is to allow changing between PressOnClick and PressOnRelease without pressing twice). Used by range_select branch. bool ActiveIdHasBeenEditedBefore; // Was the value associated to the widget Edited over the course of the Active state. bool ActiveIdHasBeenEditedThisFrame; + bool ActiveIdFromShortcut; + int ActiveIdMouseButton : 8; ImVec2 ActiveIdClickOffset; // Clicked offset from upper-left corner, if applicable (currently only set by ButtonBehavior) ImGuiWindow* ActiveIdWindow; ImGuiInputSource ActiveIdSource; // Activating source: ImGuiInputSource_Mouse OR ImGuiInputSource_Keyboard OR ImGuiInputSource_Gamepad - int ActiveIdMouseButton; ImGuiID ActiveIdPreviousFrame; bool ActiveIdPreviousFrameIsAlive; bool ActiveIdPreviousFrameHasBeenEditedBefore; @@ -2105,34 +2187,39 @@ struct ImGuiContext // - The idea is that instead of "eating" a given key, we can link to an owner. // - Input query can then read input by specifying ImGuiKeyOwner_Any (== 0), ImGuiKeyOwner_None (== -1) or a custom ID. // - Routing is requested ahead of time for a given chord (Key + Mods) and granted in NewFrame(). + double LastKeyModsChangeTime; // Record the last time key mods changed (affect repeat delay when using shortcut logic) + double LastKeyModsChangeFromNoneTime; // Record the last time key mods changed away from being 0 (affect repeat delay when using shortcut logic) + double LastKeyboardKeyPressTime; // Record the last time a keyboard key (ignore mouse/gamepad ones) was pressed. + ImBitArrayForNamedKeys KeysMayBeCharInput; // Lookup to tell if a key can emit char input, see IsKeyChordPotentiallyCharInput(). sizeof() = 20 bytes ImGuiKeyOwnerData KeysOwnerData[ImGuiKey_NamedKey_COUNT]; ImGuiKeyRoutingTable KeysRoutingTable; ImU32 ActiveIdUsingNavDirMask; // Active widget will want to read those nav move requests (e.g. can activate a button and move away from it) bool ActiveIdUsingAllKeyboardKeys; // Active widget will want to read all keyboard keys inputs. (FIXME: This is a shortcut for not taking ownership of 100+ keys but perhaps best to not have the inconsistency) + ImGuiKeyChord DebugBreakInShortcutRouting; // Set to break in SetShortcutRouting()/Shortcut() calls. #ifndef IMGUI_DISABLE_OBSOLETE_KEYIO ImU32 ActiveIdUsingNavInputMask; // If you used this. Since (IMGUI_VERSION_NUM >= 18804) : 'g.ActiveIdUsingNavInputMask |= (1 << ImGuiNavInput_Cancel);' becomes 'SetKeyOwner(ImGuiKey_Escape, g.ActiveId) and/or SetKeyOwner(ImGuiKey_NavGamepadCancel, g.ActiveId);' #endif // Next window/item data - ImGuiID CurrentFocusScopeId; // == g.FocusScopeStack.back() - ImGuiItemFlags CurrentItemFlags; // == g.ItemFlagsStack.back() + ImGuiID CurrentFocusScopeId; // Value for currently appending items == g.FocusScopeStack.back(). Not to be mistaken with g.NavFocusScopeId. + ImGuiItemFlags CurrentItemFlags; // Value for currently appending items == g.ItemFlagsStack.back() ImGuiID DebugLocateId; // Storage for DebugLocateItemOnHover() feature: this is read by ItemAdd() so we keep it in a hot/cached location ImGuiNextItemData NextItemData; // Storage for SetNextItem** functions ImGuiLastItemData LastItemData; // Storage for last submitted item (setup by ItemAdd) ImGuiNextWindowData NextWindowData; // Storage for SetNextWindow** functions + bool DebugShowGroupRects; // Shared stacks - ImVector ColorStack; // Stack for PushStyleColor()/PopStyleColor() - inherited by Begin() - ImVector StyleVarStack; // Stack for PushStyleVar()/PopStyleVar() - inherited by Begin() - ImVector FontStack; // Stack for PushFont()/PopFont() - inherited by Begin() - ImVector FocusScopeStack; // Stack for PushFocusScope()/PopFocusScope() - inherited by BeginChild(), pushed into by Begin() - ImVector ItemFlagsStack; // Stack for PushItemFlag()/PopItemFlag() - inherited by Begin() - ImVector GroupStack; // Stack for BeginGroup()/EndGroup() - not inherited by Begin() - ImVector OpenPopupStack; // Which popups are open (persistent) - ImVector BeginPopupStack; // Which level of BeginPopup() we are in (reset every frame) - ImVector NavTreeNodeStack; // Stack for TreeNode() when a NavLeft requested is emitted. - - int BeginMenuCount; + ImGuiCol DebugFlashStyleColorIdx; // (Keep close to ColorStack to share cache line) + ImVector ColorStack; // Stack for PushStyleColor()/PopStyleColor() - inherited by Begin() + ImVector StyleVarStack; // Stack for PushStyleVar()/PopStyleVar() - inherited by Begin() + ImVector FontStack; // Stack for PushFont()/PopFont() - inherited by Begin() + ImVector FocusScopeStack; // Stack for PushFocusScope()/PopFocusScope() - inherited by BeginChild(), pushed into by Begin() + ImVector ItemFlagsStack; // Stack for PushItemFlag()/PopItemFlag() - inherited by Begin() + ImVector GroupStack; // Stack for BeginGroup()/EndGroup() - not inherited by Begin() + ImVector OpenPopupStack; // Which popups are open (persistent) + ImVector BeginPopupStack; // Which level of BeginPopup() we are in (reset every frame) + ImVector NavTreeNodeStack; // Stack for TreeNode() when a NavLeft requested is emitted. // Viewports ImVector Viewports; // Active viewports (always 1+, and generally 1 unless multi-viewports are enabled). Each viewports hold their copy of ImDrawData. @@ -2142,6 +2229,7 @@ struct ImGuiContext ImGuiViewportP* MouseLastHoveredViewport; // Last known viewport that was hovered by mouse (even if we are not hovering any viewport any more) + honoring the _NoInputs flag. ImGuiID PlatformLastFocusedViewportId; ImGuiPlatformMonitor FallbackMonitor; // Virtual monitor used as fallback if backend doesn't provide monitor information. + ImRect PlatformMonitorsFullWorkRect; // Bounding box of all platform monitors int ViewportCreatedCount; // Unique sequential creation counter (mostly for testing/debugging) int PlatformWindowsCreatedCount; // Unique sequential creation counter (mostly for testing/debugging) int ViewportFocusedStampCount; // Every time the front-most window changes, we stamp its viewport with an incrementing counter @@ -2149,11 +2237,14 @@ struct ImGuiContext // Gamepad/keyboard Navigation ImGuiWindow* NavWindow; // Focused window for navigation. Could be called 'FocusedWindow' ImGuiID NavId; // Focused item for navigation - ImGuiID NavFocusScopeId; // Identify a selection scope (selection code often wants to "clear other items" when landing on an item of the selection set) + ImGuiID NavFocusScopeId; // Focused focus scope (e.g. selection code often wants to "clear other items" when landing on an item of the same scope) + ImVector NavFocusRoute; // Reversed copy focus scope stack for NavId (should contains NavFocusScopeId). This essentially follow the window->ParentWindowForFocusRoute chain. ImGuiID NavActivateId; // ~~ (g.ActiveId == 0) && (IsKeyPressed(ImGuiKey_Space) || IsKeyDown(ImGuiKey_Enter) || IsKeyPressed(ImGuiKey_NavGamepadActivate)) ? NavId : 0, also set when calling ActivateItem() ImGuiID NavActivateDownId; // ~~ IsKeyDown(ImGuiKey_Space) || IsKeyDown(ImGuiKey_Enter) || IsKeyDown(ImGuiKey_NavGamepadActivate) ? NavId : 0 ImGuiID NavActivatePressedId; // ~~ IsKeyPressed(ImGuiKey_Space) || IsKeyPressed(ImGuiKey_Enter) || IsKeyPressed(ImGuiKey_NavGamepadActivate) ? NavId : 0 (no repeat) ImGuiActivateFlags NavActivateFlags; + ImGuiID NavHighlightActivatedId; + float NavHighlightActivatedTimer; ImGuiID NavJustMovedToId; // Just navigated to this id (result of a successfully MoveRequest). ImGuiID NavJustMovedToFocusScopeId; // Just navigated to this focus scope id (result of a successfully MoveRequest). ImGuiKeyChord NavJustMovedToKeyMods; @@ -2200,6 +2291,7 @@ struct ImGuiContext float NavWindowingTimer; float NavWindowingHighlightAlpha; bool NavWindowingToggleLayer; + ImGuiKey NavWindowingToggleKey; ImVec2 NavWindowingAccumDeltaPos; ImVec2 NavWindowingAccumDeltaSize; @@ -2215,6 +2307,7 @@ struct ImGuiContext int DragDropMouseButton; ImGuiPayload DragDropPayload; ImRect DragDropTargetRect; // Store rectangle of current target candidate (we favor small targets when overlapping) + ImRect DragDropTargetClipRect; // Store ClipRect at the time of item's drawing ImGuiID DragDropTargetId; ImGuiDragDropFlags DragDropAcceptFlags; float DragDropAcceptIdCurrRectSurface; // Target item surface (we resolve overlapping targets by prioritizing the smaller surface) @@ -2231,6 +2324,7 @@ struct ImGuiContext // Tables ImGuiTable* CurrentTable; + ImGuiID DebugBreakInTable; // Set to break in BeginTable() call. int TablesTempDataStacked; // Temporary table data size (because we leave previous instances undestructed, we generally don't use TablesTempData.Size) ImVector TablesTempData; // Temporary table data (buffers reused/shared across instances, support nesting) ImPool Tables; // Persistent table data @@ -2261,6 +2355,8 @@ struct ImGuiContext ImGuiInputTextDeactivatedState InputTextDeactivatedState; ImFont InputTextPasswordFont; ImGuiID TempInputId; // Temporary text input when CTRL+clicking on a slider, etc. + int BeginMenuDepth; + int BeginComboDepth; ImGuiColorEditFlags ColorEditOptions; // Store user options for color edit widgets ImGuiID ColorEditCurrentID; // Set temporarily while inside of the parent-most ColorEdit4/ColorPicker4 (because they call each others). ImGuiID ColorEditSavedID; // ID we are saving/restoring HS for @@ -2269,6 +2365,8 @@ struct ImGuiContext ImU32 ColorEditSavedColor; // RGB value with alpha set to 0. ImVec4 ColorPickerRef; // Initial/reference color at the time of opening the color picker. ImGuiComboPreviewData ComboPreviewData; + ImRect WindowResizeBorderExpectedRect; // Expected border rect, switch to relative edit if moving + bool WindowResizeRelativeMode; float SliderGrabClickOffset; float SliderCurrentAccum; // Accumulated slider delta when using navigation controls. bool SliderCurrentAccumDirty; // Has the accumulated slider delta changed since last time we tried to apply it? @@ -2321,17 +2419,24 @@ struct ImGuiContext int LogDepthToExpandDefault; // Default/stored value for LogDepthMaxExpand if not specified in the LogXXX function call. // Debug Tools + // (some of the highly frequently used data are interleaved in other structures above: DebugBreakXXX fields, DebugHookIdInfo, DebugLocateId etc.) ImGuiDebugLogFlags DebugLogFlags; ImGuiTextBuffer DebugLogBuf; ImGuiTextIndex DebugLogIndex; - ImU8 DebugLogClipperAutoDisableFrames; + ImGuiDebugLogFlags DebugLogAutoDisableFlags; + ImU8 DebugLogAutoDisableFrames; ImU8 DebugLocateFrames; // For DebugLocateItemOnHover(). This is used together with DebugLocateId which is in a hot/cached spot above. + bool DebugBreakInLocateId; // Debug break in ItemAdd() call for g.DebugLocateId. + ImGuiKeyChord DebugBreakKeyChord; // = ImGuiKey_Pause ImS8 DebugBeginReturnValueCullDepth; // Cycle between 0..9 then wrap around. bool DebugItemPickerActive; // Item picker is active (started with DebugStartItemPicker()) ImU8 DebugItemPickerMouseButton; ImGuiID DebugItemPickerBreakId; // Will call IM_DEBUG_BREAK() when encountering this ID + float DebugFlashStyleColorTime; + ImVec4 DebugFlashStyleColorBackup; ImGuiMetricsConfig DebugMetricsConfig; - ImGuiStackTool DebugStackTool; + ImGuiIDStackTool DebugIDStackTool; + ImGuiDebugAllocInfo DebugAllocInfo; ImGuiDockNode* DebugHoveredDockNode; // Hovered dock node. // Misc @@ -2343,6 +2448,7 @@ struct ImGuiContext int WantCaptureKeyboardNextFrame; // " int WantTextInputNextFrame; ImVector TempBuffer; // Temporary text buffer + char TempKeychordName[64]; ImGuiContext(ImFontAtlas* shared_font_atlas) { @@ -2372,7 +2478,7 @@ struct ImGuiContext HoveredWindowUnderMovingWindow = NULL; MovingWindow = NULL; WheelingWindow = NULL; - WheelingWindowStartFrame = -1; + WheelingWindowStartFrame = WheelingWindowScrolledFrame = -1; WheelingWindowReleaseTimer = 0.0f; DebugHookIdInfo = 0; @@ -2389,6 +2495,7 @@ struct ImGuiContext ActiveIdHasBeenPressedBefore = false; ActiveIdHasBeenEditedBefore = false; ActiveIdHasBeenEditedThisFrame = false; + ActiveIdFromShortcut = false; ActiveIdClickOffset = ImVec2(-1, -1); ActiveIdWindow = NULL; ActiveIdSource = ImGuiInputSource_None; @@ -2400,6 +2507,8 @@ struct ImGuiContext LastActiveId = 0; LastActiveIdTimer = 0.0f; + LastKeyboardKeyPressTime = LastKeyModsChangeTime = LastKeyModsChangeFromNoneTime = -1.0; + ActiveIdUsingNavDirMask = 0x00; ActiveIdUsingAllKeyboardKeys = false; #ifndef IMGUI_DISABLE_OBSOLETE_KEYIO @@ -2408,7 +2517,7 @@ struct ImGuiContext CurrentFocusScopeId = 0; CurrentItemFlags = ImGuiItemFlags_None; - BeginMenuCount = 0; + DebugShowGroupRects = false; CurrentDpiScale = 0.0f; CurrentViewport = NULL; @@ -2421,6 +2530,8 @@ struct ImGuiContext NavId = NavFocusScopeId = NavActivateId = NavActivateDownId = NavActivatePressedId = 0; NavJustMovedToId = NavJustMovedToFocusScopeId = NavNextActivateId = 0; NavActivateFlags = NavNextActivateFlags = ImGuiActivateFlags_None; + NavHighlightActivatedId = 0; + NavHighlightActivatedTimer = 0.0f; NavJustMovedToKeyMods = ImGuiMod_None; NavInputSource = ImGuiInputSource_Keyboard; NavLayer = ImGuiNavLayer_Main; @@ -2448,6 +2559,7 @@ struct ImGuiContext NavWindowingTarget = NavWindowingTargetAnim = NavWindowingListWindow = NULL; NavWindowingTimer = NavWindowingHighlightAlpha = 0.0f; NavWindowingToggleLayer = false; + NavWindowingToggleKey = ImGuiKey_None; DimBgRatio = 0.0f; @@ -2476,10 +2588,12 @@ struct ImGuiContext MouseStationaryTimer = 0.0f; TempInputId = 0; + BeginMenuDepth = BeginComboDepth = 0; ColorEditOptions = ImGuiColorEditFlags_DefaultOptions_; ColorEditCurrentID = ColorEditSavedID = 0; ColorEditSavedHue = ColorEditSavedSat = 0.0f; ColorEditSavedColor = 0; + WindowResizeRelativeMode = false; SliderGrabClickOffset = 0.0f; SliderCurrentAccum = 0.0f; SliderCurrentAccumDirty = false; @@ -2515,18 +2629,29 @@ struct ImGuiContext DebugLogFlags = ImGuiDebugLogFlags_OutputToTTY; DebugLocateId = 0; - DebugLogClipperAutoDisableFrames = 0; + DebugLogAutoDisableFlags = ImGuiDebugLogFlags_None; + DebugLogAutoDisableFrames = 0; DebugLocateFrames = 0; DebugBeginReturnValueCullDepth = -1; DebugItemPickerActive = false; DebugItemPickerMouseButton = ImGuiMouseButton_Left; DebugItemPickerBreakId = 0; + DebugFlashStyleColorTime = 0.0f; + DebugFlashStyleColorIdx = ImGuiCol_COUNT; DebugHoveredDockNode = NULL; + // Same as DebugBreakClearData(). Those fields are scattered in their respective subsystem to stay in hot-data locations + DebugBreakInWindow = 0; + DebugBreakInTable = 0; + DebugBreakInLocateId = false; + DebugBreakKeyChord = ImGuiKey_Pause; + DebugBreakInShortcutRouting = ImGuiKey_None; + memset(FramerateSecPerFrame, 0, sizeof(FramerateSecPerFrame)); FramerateSecPerFrameIdx = FramerateSecPerFrameCount = 0; FramerateSecPerFrameAccum = 0.0f; WantCaptureMouseNextFrame = WantCaptureKeyboardNextFrame = WantTextInputNextFrame = -1; + memset(TempKeychordName, 0, sizeof(TempKeychordName)); } }; @@ -2576,6 +2701,7 @@ struct IMGUI_API ImGuiWindowTempData int CurrentTableIdx; // Current table index (into g.Tables) ImGuiLayoutType LayoutType; ImGuiLayoutType ParentLayoutType; // Layout type of parent window at the time of Begin() + ImU32 ModalDimBgColor; // Local parameters stacks // We store the current settings outside of the vectors to increase memory locality (reduce cache misses). The vectors are rarely modified. Also it allows us to not heap allocate for short-lived windows which are not using those settings. @@ -2592,6 +2718,7 @@ struct IMGUI_API ImGuiWindow char* Name; // Window name, owned by the window. ImGuiID ID; // == ImHashStr(Name) ImGuiWindowFlags Flags, FlagsPreviousFrame; // See enum ImGuiWindowFlags_ + ImGuiChildFlags ChildFlags; // Set when window is a child window. See enum ImGuiChildFlags_ ImGuiWindowClass WindowClass; // Advanced users only. Set with SetNextWindowClass() ImGuiViewportP* Viewport; // Always set in Begin(). Inactive windows may have a NULL value here if their viewport was discarded. ImGuiID ViewportId; // We backup the viewport id (since the viewport may disappear or never be created if the window is inactive) @@ -2632,6 +2759,7 @@ struct IMGUI_API ImGuiWindow bool IsFallbackWindow; // Set on the "Debug##Default" window. bool IsExplicitChild; // Set when passed _ChildWindow, left to false by BeginDocked() bool HasCloseButton; // Set when the window has a close button (p_open != NULL) + signed char ResizeBorderHovered; // Current border being hovered for resize (-1: none, otherwise 0-3) signed char ResizeBorderHeld; // Current border being held for resize (-1: none, otherwise 0-3) short BeginCount; // Number of Begin() during the current frame (generally 0 or 1, 1+ if appending via multiple Begin/End pairs) short BeginCountPreviousFrame; // Number of Begin() during the previous frame @@ -2640,7 +2768,6 @@ struct IMGUI_API ImGuiWindow short FocusOrder; // Order within WindowsFocusOrder[], altered when windows are focused. ImGuiID PopupId; // ID in the popup stack when this window is used as a popup/menu (because we use generic Name/ID for recycling) ImS8 AutoFitFramesX, AutoFitFramesY; - ImS8 AutoFitChildAxises; bool AutoFitOnlyGrows; ImGuiDir AutoPosLastDirection; ImS8 HiddenFramesCanSkipItems; // Hide the window for N frames @@ -2688,6 +2815,7 @@ struct IMGUI_API ImGuiWindow ImGuiWindow* RootWindowDockTree; // Point to ourself or first ancestor that is not a child window. Cross through dock nodes. ImGuiWindow* RootWindowForTitleBarHighlight; // Point to ourself or first ancestor which will display TitleBgActive color when this window is active. ImGuiWindow* RootWindowForNav; // Point to ourself or first ancestor which doesn't have the NavFlattened flag. + ImGuiWindow* ParentWindowForFocusRoute; // Set to manual link a window to its logical parent so that Shortcut() chain are honoerd (e.g. Tool linked to Document) ImGuiWindow* NavLastChildNavWindow; // When going to the menu bar, we remember the child window we came from. (This could probably be made implicit if we kept g.Windows sorted by last focused including child window.) ImGuiID NavLastIds[ImGuiNavLayer_COUNT]; // Last known NavId for this window, per layer (0/1) @@ -2892,16 +3020,17 @@ struct ImGuiTableCellData }; // Per-instance data that needs preserving across frames (seemingly most others do not need to be preserved aside from debug needs. Does that means they could be moved to ImGuiTableTempData?) +// sizeof() ~ 24 bytes struct ImGuiTableInstanceData { ImGuiID TableInstanceID; float LastOuterHeight; // Outer height from last frame - float LastFirstRowHeight; // Height of first row from last frame (FIXME: this is used as "header height" and may be reworked) + float LastTopHeadersRowHeight; // Height of first consecutive header rows from last frame (FIXME: this is used assuming consecutive headers are in same frozen set) float LastFrozenHeight; // Height of frozen section from last frame int HoveredRowLast; // Index of row which was hovered last frame. int HoveredRowNext; // Index of row hovered this frame, set after encountering it. - ImGuiTableInstanceData() { TableInstanceID = 0; LastOuterHeight = LastFirstRowHeight = LastFrozenHeight = 0.0f; HoveredRowLast = HoveredRowNext = -1; } + ImGuiTableInstanceData() { TableInstanceID = 0; LastOuterHeight = LastTopHeadersRowHeight = LastFrozenHeight = 0.0f; HoveredRowLast = HoveredRowNext = -1; } }; // FIXME-TABLE: more transient data could be stored in a stacked ImGuiTableTempData: e.g. SortSpecs, incoming RowData @@ -2953,6 +3082,8 @@ struct IMGUI_API ImGuiTable float ResizedColumnNextWidth; float ResizeLockMinContentsX2; // Lock minimum contents width while resizing down in order to not create feedback loops. But we allow growing the table. float RefScale; // Reference scale to be able to rescale columns on font/dpi changes. + float AngledHeadersHeight; // Set by TableAngledHeadersRow(), used in TableUpdateLayout() + float AngledHeadersSlope; // Set by TableAngledHeadersRow(), used in TableUpdateLayout() ImRect OuterRect; // Note: for non-scrolling table, OuterRect.Max.y is often FLT_MAX until EndTable(), unless a height has been specified in BeginTable(). ImRect InnerRect; // InnerRect but without decoration. As with OuterRect, for non-scrolling tables, InnerRect.Max.y is ImRect WorkRect; @@ -2975,8 +3106,10 @@ struct IMGUI_API ImGuiTable ImGuiTableColumnIdx ColumnsEnabledCount; // Number of enabled columns (<= ColumnsCount) ImGuiTableColumnIdx ColumnsEnabledFixedCount; // Number of enabled columns (<= ColumnsCount) ImGuiTableColumnIdx DeclColumnsCount; // Count calls to TableSetupColumn() + ImGuiTableColumnIdx AngledHeadersCount; // Count columns with angled headers ImGuiTableColumnIdx HoveredColumnBody; // Index of column whose visible region is being hovered. Important: == ColumnsCount when hovering empty region after the right-most column! ImGuiTableColumnIdx HoveredColumnBorder; // Index of column whose right-border is being hovered (for resizing). + ImGuiTableColumnIdx HighlightColumnHeader; // Index of column which should be highlighted. ImGuiTableColumnIdx AutoFitSingleColumn; // Index of single column requesting auto-fit. ImGuiTableColumnIdx ResizedColumn; // Index of column being resized. Reset when InstanceCurrent==0. ImGuiTableColumnIdx LastResizedColumn; // Index of column being resized from previous frame. @@ -3002,6 +3135,7 @@ struct IMGUI_API ImGuiTable bool IsSortSpecsDirty; bool IsUsingHeaders; // Set when the first row had the ImGuiTableRowFlags_Headers flag. bool IsContextPopupOpen; // Set when default context menu is open (also see: ContextPopupColumn, InstanceInteracted). + bool DisableDefaultContextMenu; // Disable default context menu contents. You may submit your own using TableBeginContextMenuPopup()/EndPopup() bool IsSettingsRequestLoad; bool IsSettingsDirty; // Set when table settings have changed and needs to be reported into ImGuiTableSetttings data. bool IsDefaultDisplayOrder; // Set when display order is unchanged from default (DisplayOrder contains 0...Count-1) @@ -3009,6 +3143,8 @@ struct IMGUI_API ImGuiTable bool IsResetDisplayOrderRequest; bool IsUnfrozenRows; // Set when we got past the frozen row. bool IsDefaultSizingPolicy; // Set if user didn't explicitly set a sizing policy in BeginTable() + bool IsActiveIdAliveBeforeTable; + bool IsActiveIdInTable; bool HasScrollbarYCurr; // Whether ANY instance of this table had a vertical scrollbar during the current frame. bool HasScrollbarYPrev; // Whether ANY instance of this table had a vertical scrollbar during the previous. bool MemoryCompacted; @@ -3021,11 +3157,12 @@ struct IMGUI_API ImGuiTable // Transient data that are only needed between BeginTable() and EndTable(), those buffers are shared (1 per level of stacked table). // - Accessing those requires chasing an extra pointer so for very frequently used data we leave them in the main table structure. // - We also leave out of this structure data that tend to be particularly useful for debugging/metrics. -// sizeof() ~ 112 bytes. +// sizeof() ~ 120 bytes. struct IMGUI_API ImGuiTableTempData { int TableIndex; // Index in g.Tables.Buf[] pool float LastTimeActive; // Last timestamp this structure was used + float AngledHeadersExtraWidth; // Used in EndTable() ImVec2 UserOuterSize; // outer_size.x passed to BeginTable() ImDrawListSplitter DrawSplitter; @@ -3106,7 +3243,8 @@ namespace ImGui IMGUI_API void SetWindowSize(ImGuiWindow* window, const ImVec2& size, ImGuiCond cond = 0); IMGUI_API void SetWindowCollapsed(ImGuiWindow* window, bool collapsed, ImGuiCond cond = 0); IMGUI_API void SetWindowHitTestHole(ImGuiWindow* window, const ImVec2& pos, const ImVec2& size); - IMGUI_API void SetWindowHiddendAndSkipItemsForCurrentFrame(ImGuiWindow* window); + IMGUI_API void SetWindowHiddenAndSkipItemsForCurrentFrame(ImGuiWindow* window); + inline void SetWindowParentWindowForFocusRoute(ImGuiWindow* window, ImGuiWindow* parent_window) { window->ParentWindowForFocusRoute = parent_window; } // You may also use SetNextWindowClass()'s FocusRouteParentWindowId field. inline ImRect WindowRectAbsToRel(ImGuiWindow* window, const ImRect& r) { ImVec2 off = window->DC.CursorStartPos; return ImRect(r.Min.x - off.x, r.Min.y - off.y, r.Max.x - off.x, r.Max.y - off.y); } inline ImRect WindowRectRelToAbs(ImGuiWindow* window, const ImRect& r) { ImVec2 off = window->DC.CursorStartPos; return ImRect(r.Min.x + off.x, r.Min.y + off.y, r.Max.x + off.x, r.Max.y + off.y); } inline ImVec2 WindowPosRelToAbs(ImGuiWindow* window, const ImVec2& p) { ImVec2 off = window->DC.CursorStartPos; return ImVec2(p.x + off.x, p.y + off.y); } @@ -3135,7 +3273,7 @@ namespace ImGui IMGUI_API void UpdateInputEvents(bool trickle_fast_inputs); IMGUI_API void UpdateHoveredWindowAndCaptureFlags(); IMGUI_API void StartMouseMovingWindow(ImGuiWindow* window); - IMGUI_API void StartMouseMovingWindowOrNode(ImGuiWindow* window, ImGuiDockNode* node, bool undock_floating_node); + IMGUI_API void StartMouseMovingWindowOrNode(ImGuiWindow* window, ImGuiDockNode* node, bool undock); IMGUI_API void UpdateMouseMovingWindowNewFrame(); IMGUI_API void UpdateMouseMovingWindowEndFrame(); @@ -3228,7 +3366,7 @@ namespace ImGui IMGUI_API void LogSetNextTextDecoration(const char* prefix, const char* suffix); // Popups, Modals, Tooltips - IMGUI_API bool BeginChildEx(const char* name, ImGuiID id, const ImVec2& size_arg, bool border, ImGuiWindowFlags flags); + IMGUI_API bool BeginChildEx(const char* name, ImGuiID id, const ImVec2& size_arg, ImGuiChildFlags child_flags, ImGuiWindowFlags window_flags); IMGUI_API void OpenPopupEx(ImGuiID id, ImGuiPopupFlags popup_flags = ImGuiPopupFlags_None); IMGUI_API void ClosePopupToLevel(int remaining, bool restore_focus_to_window_under_popup); IMGUI_API void ClosePopupsOverWindow(ImGuiWindow* ref_window, bool restore_focus_to_window_under_popup); @@ -3236,6 +3374,7 @@ namespace ImGui IMGUI_API bool IsPopupOpen(ImGuiID id, ImGuiPopupFlags popup_flags); IMGUI_API bool BeginPopupEx(ImGuiID id, ImGuiWindowFlags extra_flags); IMGUI_API bool BeginTooltipEx(ImGuiTooltipFlags tooltip_flags, ImGuiWindowFlags extra_window_flags); + IMGUI_API bool BeginTooltipHidden(); IMGUI_API ImRect GetPopupAllowedExtentRect(ImGuiWindow* window); IMGUI_API ImGuiWindow* GetTopMostPopupModal(); IMGUI_API ImGuiWindow* GetTopMostAndVisiblePopupModal(); @@ -3264,11 +3403,13 @@ namespace ImGui IMGUI_API void NavMoveRequestCancel(); IMGUI_API void NavMoveRequestApplyResult(); IMGUI_API void NavMoveRequestTryWrapping(ImGuiWindow* window, ImGuiNavMoveFlags move_flags); + IMGUI_API void NavHighlightActivated(ImGuiID id); IMGUI_API void NavClearPreferredPosForAxis(ImGuiAxis axis); IMGUI_API void NavRestoreHighlightAfterMove(); IMGUI_API void NavUpdateCurrentWindowIsScrollPushableX(); IMGUI_API void SetNavWindow(ImGuiWindow* window); IMGUI_API void SetNavID(ImGuiID id, ImGuiNavLayer nav_layer, ImGuiID focus_scope_id, const ImRect& rect_rel); + IMGUI_API void SetNavFocusScope(ImGuiID focus_scope_id); // Focus/Activation // This should be part of a larger set of API: FocusItem(offset = -1), FocusItemByID(id), ActivateItem(offset = -1), ActivateItemByID(id) etc. which are @@ -3285,7 +3426,8 @@ namespace ImGui inline bool IsGamepadKey(ImGuiKey key) { return key >= ImGuiKey_Gamepad_BEGIN && key < ImGuiKey_Gamepad_END; } inline bool IsMouseKey(ImGuiKey key) { return key >= ImGuiKey_Mouse_BEGIN && key < ImGuiKey_Mouse_END; } inline bool IsAliasKey(ImGuiKey key) { return key >= ImGuiKey_Aliases_BEGIN && key < ImGuiKey_Aliases_END; } - inline ImGuiKeyChord ConvertShortcutMod(ImGuiKeyChord key_chord) { ImGuiContext& g = *GImGui; IM_ASSERT_PARANOID(key_chord & ImGuiMod_Shortcut); return (key_chord & ~ImGuiMod_Shortcut) | (g.IO.ConfigMacOSXBehaviors ? ImGuiMod_Super : ImGuiMod_Ctrl); } + inline bool IsModKey(ImGuiKey key) { return key >= ImGuiKey_LeftCtrl && key <= ImGuiKey_RightSuper; } + ImGuiKeyChord FixupKeyChord(ImGuiContext* ctx, ImGuiKeyChord key_chord); inline ImGuiKey ConvertSingleModFlagToKey(ImGuiContext* ctx, ImGuiKey key) { ImGuiContext& g = *ctx; @@ -3299,7 +3441,7 @@ namespace ImGui IMGUI_API ImGuiKeyData* GetKeyData(ImGuiContext* ctx, ImGuiKey key); inline ImGuiKeyData* GetKeyData(ImGuiKey key) { ImGuiContext& g = *GImGui; return GetKeyData(&g, key); } - IMGUI_API void GetKeyChordName(ImGuiKeyChord key_chord, char* out_buf, int out_buf_size); + IMGUI_API const char* GetKeyChordName(ImGuiKeyChord key_chord); inline ImGuiKey MouseButtonToKey(ImGuiMouseButton button) { IM_ASSERT(button >= 0 && button < ImGuiMouseButton_COUNT); return (ImGuiKey)(ImGuiKey_MouseLeft + button); } IMGUI_API bool IsMouseDragPastThreshold(ImGuiMouseButton button, float lock_threshold = -1.0f); IMGUI_API ImVec2 GetKeyMagnitude2d(ImGuiKey key_left, ImGuiKey key_right, ImGuiKey key_up, ImGuiKey key_down); @@ -3340,6 +3482,7 @@ namespace ImGui IMGUI_API bool IsMouseDown(ImGuiMouseButton button, ImGuiID owner_id); IMGUI_API bool IsMouseClicked(ImGuiMouseButton button, ImGuiID owner_id, ImGuiInputFlags flags = 0); IMGUI_API bool IsMouseReleased(ImGuiMouseButton button, ImGuiID owner_id); + IMGUI_API bool IsMouseDoubleClicked(ImGuiMouseButton button, ImGuiID owner_id); // [EXPERIMENTAL] Shortcut Routing // - ImGuiKeyChord = a ImGuiKey optionally OR-red with ImGuiMod_Alt/ImGuiMod_Ctrl/ImGuiMod_Shift/ImGuiMod_Super. @@ -3351,8 +3494,13 @@ namespace ImGui // - Route is granted to a single owner. When multiple requests are made we have policies to select the winning route. // - Multiple read sites may use the same owner id and will all get the granted route. // - For routing: when owner_id is 0 we use the current Focus Scope ID as a default owner in order to identify our location. + // - TL;DR; + // - IsKeyChordPressed() compares mods + call IsKeyPressed() -> function has no side-effect. + // - Shortcut() submits a route then if currently can be routed calls IsKeyChordPressed() -> function has (desirable) side-effects. + IMGUI_API bool IsKeyChordPressed(ImGuiKeyChord key_chord, ImGuiID owner_id, ImGuiInputFlags flags = 0); + IMGUI_API void SetNextItemShortcut(ImGuiKeyChord key_chord); IMGUI_API bool Shortcut(ImGuiKeyChord key_chord, ImGuiID owner_id = 0, ImGuiInputFlags flags = 0); - IMGUI_API bool SetShortcutRouting(ImGuiKeyChord key_chord, ImGuiID owner_id = 0, ImGuiInputFlags flags = 0); + IMGUI_API bool SetShortcutRouting(ImGuiKeyChord key_chord, ImGuiID owner_id, ImGuiInputFlags flags = 0); // owner_id needs to be explicit and cannot be 0 IMGUI_API bool TestShortcutRouting(ImGuiKeyChord key_chord, ImGuiID owner_id); IMGUI_API ImGuiKeyRoutingData* GetShortcutRoutingData(ImGuiKeyChord key_chord); @@ -3428,7 +3576,7 @@ namespace ImGui IMGUI_API bool BeginDragDropTargetCustom(const ImRect& bb, ImGuiID id); IMGUI_API void ClearDragDrop(); IMGUI_API bool IsDragDropPayloadBeingAccepted(); - IMGUI_API void RenderDragDropTargetRect(const ImRect& bb); + IMGUI_API void RenderDragDropTargetRect(const ImRect& bb, const ImRect& item_clip_rect); // Typing-Select API IMGUI_API ImGuiTypingSelectRequest* GetTypingSelectRequest(ImGuiTypingSelectFlags flags = ImGuiTypingSelectFlags_None); @@ -3455,8 +3603,10 @@ namespace ImGui IMGUI_API int TableGetHoveredColumn(); // May use (TableGetColumnFlags() & ImGuiTableColumnFlags_IsHovered) instead. Return hovered column. return -1 when table is not hovered. return columns_count if the unused space at the right of visible columns is hovered. IMGUI_API int TableGetHoveredRow(); // Retrieve *PREVIOUS FRAME* hovered row. This difference with TableGetHoveredColumn() is the reason why this is not public yet. IMGUI_API float TableGetHeaderRowHeight(); + IMGUI_API float TableGetHeaderAngledMaxLabelWidth(); IMGUI_API void TablePushBackgroundChannel(); IMGUI_API void TablePopBackgroundChannel(); + IMGUI_API void TableAngledHeadersRowEx(float angle, float max_label_width = 0.0f); // Tables: Internals inline ImGuiTable* GetCurrentTable() { ImGuiContext& g = *GImGui; return g.CurrentTable; } @@ -3469,7 +3619,7 @@ namespace ImGui IMGUI_API void TableUpdateBorders(ImGuiTable* table); IMGUI_API void TableUpdateColumnsWeightFromWidth(ImGuiTable* table); IMGUI_API void TableDrawBorders(ImGuiTable* table); - IMGUI_API void TableDrawContextMenu(ImGuiTable* table); + IMGUI_API void TableDrawDefaultContextMenu(ImGuiTable* table, ImGuiTableFlags flags_for_section_to_display); IMGUI_API bool TableBeginContextMenuPopup(ImGuiTable* table); IMGUI_API void TableMergeDrawChannels(ImGuiTable* table); inline ImGuiTableInstanceData* TableGetInstanceData(ImGuiTable* table, int instance_no) { if (instance_no == 0) return &table->InstanceDataFirst; return &table->InstanceDataExtra[instance_no - 1]; } @@ -3536,7 +3686,7 @@ namespace ImGui IMGUI_API void RenderFrame(ImVec2 p_min, ImVec2 p_max, ImU32 fill_col, bool border = true, float rounding = 0.0f); IMGUI_API void RenderFrameBorder(ImVec2 p_min, ImVec2 p_max, float rounding = 0.0f); IMGUI_API void RenderColorRectWithAlphaCheckerboard(ImDrawList* draw_list, ImVec2 p_min, ImVec2 p_max, ImU32 fill_col, float grid_step, ImVec2 grid_off, float rounding = 0.0f, ImDrawFlags flags = 0); - IMGUI_API void RenderNavHighlight(const ImRect& bb, ImGuiID id, ImGuiNavHighlightFlags flags = ImGuiNavHighlightFlags_TypeDefault); // Navigation highlight + IMGUI_API void RenderNavHighlight(const ImRect& bb, ImGuiID id, ImGuiNavHighlightFlags flags = ImGuiNavHighlightFlags_None); // Navigation highlight IMGUI_API const char* FindRenderedTextEnd(const char* text, const char* text_end = NULL); // Find the optional ## from which we stop displaying text. IMGUI_API void RenderMouseCursor(ImVec2 pos, float scale, ImGuiMouseCursor mouse_cursor, ImU32 col_fill, ImU32 col_border, ImU32 col_shadow); @@ -3554,7 +3704,7 @@ namespace ImGui IMGUI_API void TextEx(const char* text, const char* text_end = NULL, ImGuiTextFlags flags = 0); IMGUI_API bool ButtonEx(const char* label, const ImVec2& size_arg = ImVec2(0, 0), ImGuiButtonFlags flags = 0); IMGUI_API bool ArrowButtonEx(const char* str_id, ImGuiDir dir, ImVec2 size_arg, ImGuiButtonFlags flags = 0); - IMGUI_API bool ImageButtonEx(ImGuiID id, ImTextureID texture_id, const ImVec2& size, const ImVec2& uv0, const ImVec2& uv1, const ImVec4& bg_col, const ImVec4& tint_col, ImGuiButtonFlags flags = 0); + IMGUI_API bool ImageButtonEx(ImGuiID id, ImTextureID texture_id, const ImVec2& image_size, const ImVec2& uv0, const ImVec2& uv1, const ImVec4& bg_col, const ImVec4& tint_col, ImGuiButtonFlags flags = 0); IMGUI_API void SeparatorEx(ImGuiSeparatorFlags flags, float thickness = 1.0f); IMGUI_API void SeparatorTextEx(ImGuiID id, const char* label, const char* label_end, float extra_width); IMGUI_API bool CheckboxFlags(const char* label, ImS64* flags, ImS64 flags_value); @@ -3618,6 +3768,7 @@ namespace ImGui // Shade functions (write over already created vertices) IMGUI_API void ShadeVertsLinearColorGradientKeepAlpha(ImDrawList* draw_list, int vert_start_idx, int vert_end_idx, ImVec2 gradient_p0, ImVec2 gradient_p1, ImU32 col0, ImU32 col1); IMGUI_API void ShadeVertsLinearUV(ImDrawList* draw_list, int vert_start_idx, int vert_end_idx, const ImVec2& a, const ImVec2& b, const ImVec2& uv_a, const ImVec2& uv_b, bool clamp); + IMGUI_API void ShadeVertsTransformPos(ImDrawList* draw_list, int vert_start_idx, int vert_end_idx, const ImVec2& pivot_in, float cos_a, float sin_a, const ImVec2& pivot_out); // Garbage collection IMGUI_API void GcCompactTransientMiscBuffers(); @@ -3627,6 +3778,7 @@ namespace ImGui // Debug Log IMGUI_API void DebugLog(const char* fmt, ...) IM_FMTARGS(1); IMGUI_API void DebugLogV(const char* fmt, va_list args) IM_FMTLIST(1); + IMGUI_API void DebugAllocHook(ImGuiDebugAllocInfo* info, int frame_count, void* ptr, size_t size); // size >= 0 : alloc, size = -1 : free // Debug Tools IMGUI_API void ErrorCheckEndFrameRecover(ImGuiErrorLogCallback log_callback, void* user_data = NULL); @@ -3638,7 +3790,9 @@ namespace ImGui IMGUI_API void DebugLocateItem(ImGuiID target_id); // Call sparingly: only 1 at the same time! IMGUI_API void DebugLocateItemOnHover(ImGuiID target_id); // Only call on reaction to a mouse Hover: because only 1 at the same time! IMGUI_API void DebugLocateItemResolveWithLastItem(); - inline void DebugStartItemPicker() { ImGuiContext& g = *GImGui; g.DebugItemPickerActive = true; } + IMGUI_API void DebugBreakClearData(); + IMGUI_API bool DebugBreakButton(const char* label, const char* description_of_location); + IMGUI_API void DebugBreakButtonTooltip(bool keyboard_only, const char* description_of_location); IMGUI_API void ShowFontAtlas(ImFontAtlas* atlas); IMGUI_API void DebugHookIdInfo(ImGuiID id, ImGuiDataType data_type, const void* data_id, const void* data_id_end); IMGUI_API void DebugNodeColumns(ImGuiOldColumns* columns); @@ -3666,13 +3820,12 @@ namespace ImGui inline void SetItemUsingMouseWheel() { SetItemKeyOwner(ImGuiKey_MouseWheelY); } // Changed in 1.89 inline bool TreeNodeBehaviorIsOpen(ImGuiID id, ImGuiTreeNodeFlags flags = 0) { return TreeNodeUpdateNextOpen(id, flags); } // Renamed in 1.89 - // Refactored focus/nav/tabbing system in 1.82 and 1.84. If you have old/custom copy-and-pasted widgets that used FocusableItemRegister(): + // Refactored focus/nav/tabbing system in 1.82 and 1.84. If you have old/custom copy-and-pasted widgets which used FocusableItemRegister(): // (Old) IMGUI_VERSION_NUM < 18209: using 'ItemAdd(....)' and 'bool tab_focused = FocusableItemRegister(...)' - // (Old) IMGUI_VERSION_NUM >= 18209: using 'ItemAdd(..., ImGuiItemAddFlags_Focusable)' and 'bool tab_focused = (GetItemStatusFlags() & ImGuiItemStatusFlags_Focused) != 0' - // (New) IMGUI_VERSION_NUM >= 18413: using 'ItemAdd(..., ImGuiItemFlags_Inputable)' and 'bool tab_focused = (GetItemStatusFlags() & ImGuiItemStatusFlags_FocusedTabbing) != 0 || (g.NavActivateId == id && (g.NavActivateFlags & ImGuiActivateFlags_PreferInput))' (WIP) - // Widget code are simplified as there's no need to call FocusableItemUnregister() while managing the transition from regular widget to TempInputText() - inline bool FocusableItemRegister(ImGuiWindow* window, ImGuiID id) { IM_ASSERT(0); IM_UNUSED(window); IM_UNUSED(id); return false; } // -> pass ImGuiItemAddFlags_Inputable flag to ItemAdd() - inline void FocusableItemUnregister(ImGuiWindow* window) { IM_ASSERT(0); IM_UNUSED(window); } // -> unnecessary: TempInputText() uses ImGuiInputTextFlags_MergedItem + // (Old) IMGUI_VERSION_NUM >= 18209: using 'ItemAdd(..., ImGuiItemAddFlags_Focusable)' and 'bool tab_focused = (g.LastItemData.StatusFlags & ImGuiItemStatusFlags_Focused) != 0' + // (New) IMGUI_VERSION_NUM >= 18413: using 'ItemAdd(..., ImGuiItemFlags_Inputable)' and 'bool tab_focused = (g.NavActivateId == id && (g.NavActivateFlags & ImGuiActivateFlags_PreferInput))' + //inline bool FocusableItemRegister(ImGuiWindow* window, ImGuiID id) // -> pass ImGuiItemAddFlags_Inputable flag to ItemAdd() + //inline void FocusableItemUnregister(ImGuiWindow* window) // -> unnecessary: TempInputText() uses ImGuiInputTextFlags_MergedItem #endif #ifndef IMGUI_DISABLE_OBSOLETE_KEYIO inline bool IsKeyPressedMap(ImGuiKey key, bool repeat = true) { IM_ASSERT(IsNamedKey(key)); return IsKeyPressed(key, repeat); } // Removed in 1.87: Mapping from named key is always identity! diff --git a/cimgui/imgui/imgui_tables.cpp b/cimgui/imgui/imgui_tables.cpp index 7fbf6181b..260df1a92 100644 --- a/cimgui/imgui/imgui_tables.cpp +++ b/cimgui/imgui/imgui_tables.cpp @@ -1,4 +1,4 @@ -// dear imgui, v1.90 WIP +// dear imgui, v1.90.4 // (tables and columns code) /* @@ -48,7 +48,8 @@ Index of this file: // - TableUpdateLayout() [Internal] followup to BeginTable(): setup everything: widths, columns positions, clipping rectangles. Automatically called by the FIRST call to TableNextRow() or TableHeadersRow(). // | TableSetupDrawChannels() - setup ImDrawList channels // | TableUpdateBorders() - detect hovering columns for resize, ahead of contents submission -// | TableDrawContextMenu() - draw right-click context menu +// | TableBeginContextMenuPopup() +// | - TableDrawDefaultContextMenu() - draw right-click context menu contents //----------------------------------------------------------------------------- // - TableHeadersRow() or TableHeader() user submit a headers row (optional) // | TableSortSpecsClickColumn() - when left-clicked: alter sort order and sort direction @@ -321,13 +322,17 @@ bool ImGui::BeginTableEx(const char* name, ImGuiID id, int columns_count, ImG const ImVec2 avail_size = GetContentRegionAvail(); const ImVec2 actual_outer_size = CalcItemSize(outer_size, ImMax(avail_size.x, 1.0f), use_child_window ? ImMax(avail_size.y, 1.0f) : 0.0f); const ImRect outer_rect(outer_window->DC.CursorPos, outer_window->DC.CursorPos + actual_outer_size); - const bool outer_window_is_measuring_size = (outer_window->AutoFitFramesX > 0) || (outer_window->AutoFitFramesY > 0); // Doesn't apply to auto-fitting windows! + const bool outer_window_is_measuring_size = (outer_window->AutoFitFramesX > 0) || (outer_window->AutoFitFramesY > 0); // Doesn't apply to AlwaysAutoResize windows! if (use_child_window && IsClippedEx(outer_rect, 0) && !outer_window_is_measuring_size) { ItemSize(outer_rect); return false; } + // [DEBUG] Debug break requested by user + if (g.DebugBreakInTable == id) + IM_DEBUG_BREAK(); + // Acquire storage for the table ImGuiTable* table = g.Tables.GetOrAddByKey(id); const ImGuiTableFlags table_last_flags = table->Flags; @@ -346,7 +351,8 @@ bool ImGui::BeginTableEx(const char* name, ImGuiID id, int columns_count, ImG flags = TableFixFlags(flags, outer_window); // Initialize - const int instance_no = (table->LastFrameActive != g.FrameCount) ? 0 : table->InstanceCurrent + 1; + const int previous_frame_active = table->LastFrameActive; + const int instance_no = (previous_frame_active != g.FrameCount) ? 0 : table->InstanceCurrent + 1; table->ID = id; table->Flags = flags; table->LastFrameActive = g.FrameCount; @@ -444,6 +450,18 @@ bool ImGui::BeginTableEx(const char* name, ImGuiID id, int columns_count, ImG temp_data->HostBackupItemWidthStackSize = outer_window->DC.ItemWidthStack.Size; inner_window->DC.PrevLineSize = inner_window->DC.CurrLineSize = ImVec2(0.0f, 0.0f); + // Make left and top borders not overlap our contents by offsetting HostClipRect (#6765) + // (we normally shouldn't alter HostClipRect as we rely on TableMergeDrawChannels() expanding non-clipped column toward the + // limits of that rectangle, in order for ImDrawListSplitter::Merge() to merge the draw commands. However since the overlap + // problem only affect scrolling tables in this case we can get away with doing it without extra cost). + if (inner_window != outer_window) + { + if (flags & ImGuiTableFlags_BordersOuterV) + table->HostClipRect.Min.x = ImMin(table->HostClipRect.Min.x + TABLE_BORDER_SIZE, table->HostClipRect.Max.x); + if (flags & ImGuiTableFlags_BordersOuterH) + table->HostClipRect.Min.y = ImMin(table->HostClipRect.Min.y + TABLE_BORDER_SIZE, table->HostClipRect.Max.y); + } + // Padding and Spacing // - None ........Content..... Pad .....Content........ // - PadOuter | Pad ..Content..... Pad .....Content.. Pad | @@ -477,7 +495,10 @@ bool ImGui::BeginTableEx(const char* name, ImGuiID id, int columns_count, ImG table->FreezeRowsRequest = table->FreezeRowsCount = 0; // This will be setup by TableSetupScrollFreeze(), if any table->FreezeColumnsRequest = table->FreezeColumnsCount = 0; table->IsUnfrozenRows = true; - table->DeclColumnsCount = 0; + table->DeclColumnsCount = table->AngledHeadersCount = 0; + if (previous_frame_active + 1 < g.FrameCount) + table->IsActiveIdInTable = false; + temp_data->AngledHeadersExtraWidth = 0.0f; // Using opaque colors facilitate overlapping lines of the grid, otherwise we'd need to improve TableDrawBorders() table->BorderColorStrong = GetColorU32(ImGuiCol_TableBorderStrong); @@ -937,7 +958,7 @@ void ImGui::TableUpdateLayout(ImGuiTable* table) if (column->Flags & ImGuiTableColumnFlags_WidthStretch) { float weight_ratio = column->StretchWeight / stretch_sum_weights; - column->WidthRequest = IM_FLOOR(ImMax(width_avail_for_stretched_columns * weight_ratio, table->MinColumnWidth) + 0.01f); + column->WidthRequest = IM_TRUNC(ImMax(width_avail_for_stretched_columns * weight_ratio, table->MinColumnWidth) + 0.01f); width_remaining_for_stretched_columns -= column->WidthRequest; } @@ -947,7 +968,7 @@ void ImGui::TableUpdateLayout(ImGuiTable* table) column->Flags |= ImGuiTableColumnFlags_NoDirectResize_; // Assign final width, record width in case we will need to shrink - column->WidthGiven = ImFloor(ImMax(column->WidthRequest, table->MinColumnWidth)); + column->WidthGiven = ImTrunc(ImMax(column->WidthRequest, table->MinColumnWidth)); table->ColumnsGivenWidth += column->WidthGiven; } @@ -974,14 +995,19 @@ void ImGui::TableUpdateLayout(ImGuiTable* table) ImGuiTableInstanceData* table_instance = TableGetInstanceData(table, table->InstanceCurrent); table_instance->HoveredRowLast = table_instance->HoveredRowNext; table_instance->HoveredRowNext = -1; - table->HoveredColumnBody = -1; - table->HoveredColumnBorder = -1; + table->HoveredColumnBody = table->HoveredColumnBorder = -1; const ImRect mouse_hit_rect(table->OuterRect.Min.x, table->OuterRect.Min.y, table->OuterRect.Max.x, ImMax(table->OuterRect.Max.y, table->OuterRect.Min.y + table_instance->LastOuterHeight)); const ImGuiID backup_active_id = g.ActiveId; g.ActiveId = 0; const bool is_hovering_table = ItemHoverable(mouse_hit_rect, 0, ImGuiItemFlags_None); g.ActiveId = backup_active_id; + // Determine skewed MousePos.x to support angled headers. + float mouse_skewed_x = g.IO.MousePos.x; + if (table->AngledHeadersHeight > 0.0f) + if (g.IO.MousePos.y >= table->OuterRect.Min.y && g.IO.MousePos.y <= table->OuterRect.Min.y + table->AngledHeadersHeight) + mouse_skewed_x += ImTrunc((table->OuterRect.Min.y + table->AngledHeadersHeight - g.IO.MousePos.y) * table->AngledHeadersSlope); + // [Part 6] Setup final position, offset, skip/clip states and clipping rectangles, detect hovered column // Process columns in their visible orders as we are comparing the visible order and adjusting host_clip_rect while looping. int visible_n = 0; @@ -1023,7 +1049,7 @@ void ImGui::TableUpdateLayout(ImGuiTable* table) } // Detect hovered column - if (is_hovering_table && g.IO.MousePos.x >= column->ClipRect.Min.x && g.IO.MousePos.x < column->ClipRect.Max.x) + if (is_hovering_table && mouse_skewed_x >= column->ClipRect.Min.x && mouse_skewed_x < column->ClipRect.Max.x) table->HoveredColumnBody = (ImGuiTableColumnIdx)column_n; // Lock start position @@ -1042,7 +1068,7 @@ void ImGui::TableUpdateLayout(ImGuiTable* table) // - FIXME-TABLE: We want equal width columns to have equal (ClipRect.Max.x - WorkMinX) width, which means ClipRect.max.x cannot stray off host_clip_rect.Max.x else right-most column may appear shorter. column->WorkMinX = column->MinX + table->CellPaddingX + table->CellSpacingX1; column->WorkMaxX = column->MaxX - table->CellPaddingX - table->CellSpacingX2; // Expected max - column->ItemWidth = ImFloor(column->WidthGiven * 0.65f); + column->ItemWidth = ImTrunc(column->WidthGiven * 0.65f); column->ClipRect.Min.x = column->MinX; column->ClipRect.Min.y = work_rect.Min.y; column->ClipRect.Max.x = column->MaxX; //column->WorkMaxX; @@ -1122,13 +1148,13 @@ void ImGui::TableUpdateLayout(ImGuiTable* table) // because of using _WidthAuto/_WidthStretch). This will hide the resizing option from the context menu. const float unused_x1 = ImMax(table->WorkRect.Min.x, table->Columns[table->RightMostEnabledColumn].ClipRect.Max.x); if (is_hovering_table && table->HoveredColumnBody == -1) - { - if (g.IO.MousePos.x >= unused_x1) + if (mouse_skewed_x >= unused_x1) table->HoveredColumnBody = (ImGuiTableColumnIdx)table->ColumnsCount; - } if (has_resizable == false && (table->Flags & ImGuiTableFlags_Resizable)) table->Flags &= ~ImGuiTableFlags_Resizable; + table->IsActiveIdAliveBeforeTable = (g.ActiveIdIsAlive != 0); + // [Part 8] Lock actual OuterRect/WorkRect right-most position. // This is done late to handle the case of fixed-columns tables not claiming more widths that they need. // Because of this we are careful with uses of WorkRect and InnerClipRect before this point. @@ -1140,7 +1166,7 @@ void ImGui::TableUpdateLayout(ImGuiTable* table) table->InnerClipRect.Max.x = ImMin(table->InnerClipRect.Max.x, unused_x1); } table->InnerWindow->ParentWorkRect = table->WorkRect; - table->BorderX1 = table->InnerClipRect.Min.x + ((table->Flags & ImGuiTableFlags_BordersOuterV) ? 1.0f : 0.0f); + table->BorderX1 = table->InnerClipRect.Min.x; table->BorderX2 = table->InnerClipRect.Max.x; // Setup window's WorkRect.Max.y for GetContentRegionAvail(). Other values will be updated in each TableBeginCell() call. @@ -1157,14 +1183,26 @@ void ImGui::TableUpdateLayout(ImGuiTable* table) // [Part 10] Hit testing on borders if (table->Flags & ImGuiTableFlags_Resizable) TableUpdateBorders(table); - table_instance->LastFirstRowHeight = 0.0f; + table_instance->LastTopHeadersRowHeight = 0.0f; table->IsLayoutLocked = true; table->IsUsingHeaders = false; - // [Part 11] Context menu - if (TableBeginContextMenuPopup(table)) + // Highlight header + table->HighlightColumnHeader = -1; + if (table->IsContextPopupOpen && table->ContextPopupColumn != -1 && table->InstanceInteracted == table->InstanceCurrent) + table->HighlightColumnHeader = table->ContextPopupColumn; + else if ((table->Flags & ImGuiTableFlags_HighlightHoveredColumn) && table->HoveredColumnBody != -1 && table->HoveredColumnBody != table->ColumnsCount && table->HoveredColumnBorder == -1) + if (g.ActiveId == 0 || (table->IsActiveIdInTable || g.DragDropActive)) + table->HighlightColumnHeader = table->HoveredColumnBody; + + // [Part 11] Default context menu + // - To append to this menu: you can call TableBeginContextMenuPopup()/.../EndPopup(). + // - To modify or replace this: set table->IsContextPopupNoDefaultContents = true, then call TableBeginContextMenuPopup()/.../EndPopup(). + // - You may call TableDrawDefaultContextMenu() with selected flags to display specific sections of the default menu, + // e.g. TableDrawDefaultContextMenu(table, table->Flags & ~ImGuiTableFlags_Hideable) will display everything EXCEPT columns visibility options. + if (table->DisableDefaultContextMenu == false && TableBeginContextMenuPopup(table)) { - TableDrawContextMenu(table); + TableDrawDefaultContextMenu(table, table->Flags); EndPopup(); } @@ -1201,9 +1239,9 @@ void ImGui::TableUpdateBorders(ImGuiTable* table) // Actual columns highlight/render will be performed in EndTable() and not be affected. ImGuiTableInstanceData* table_instance = TableGetInstanceData(table, table->InstanceCurrent); const float hit_half_width = TABLE_RESIZE_SEPARATOR_HALF_THICKNESS; - const float hit_y1 = table->OuterRect.Min.y; + const float hit_y1 = (table->FreezeRowsCount >= 1 ? table->OuterRect.Min.y : table->WorkRect.Min.y) + table->AngledHeadersHeight; const float hit_y2_body = ImMax(table->OuterRect.Max.y, hit_y1 + table_instance->LastOuterHeight); - const float hit_y2_head = hit_y1 + table_instance->LastFirstRowHeight; + const float hit_y2_head = hit_y1 + table_instance->LastTopHeadersRowHeight; for (int order_n = 0; order_n < table->ColumnsCount; order_n++) { @@ -1234,7 +1272,7 @@ void ImGui::TableUpdateBorders(ImGuiTable* table) { TableSetColumnWidthAutoSingle(table, column_n); ClearActiveID(); - held = hovered = false; + held = false; } if (held) { @@ -1306,7 +1344,7 @@ void ImGui::EndTable() max_pos_x = ImMax(max_pos_x, table->Columns[table->RightMostEnabledColumn].WorkMaxX + table->CellPaddingX + table->OuterPaddingX - outer_padding_for_border); if (table->ResizedColumn != -1) max_pos_x = ImMax(max_pos_x, table->ResizeLockMinContentsX2); - table->InnerWindow->DC.CursorMaxPos.x = max_pos_x; + table->InnerWindow->DC.CursorMaxPos.x = max_pos_x + table->TempData->AngledHeadersExtraWidth; } // Pop clipping rect @@ -1378,10 +1416,12 @@ void ImGui::EndTable() { ImGuiTableColumn* column = &table->Columns[table->ResizedColumn]; const float new_x2 = (g.IO.MousePos.x - g.ActiveIdClickOffset.x + TABLE_RESIZE_SEPARATOR_HALF_THICKNESS); - const float new_width = ImFloor(new_x2 - column->MinX - table->CellSpacingX1 - table->CellPaddingX * 2.0f); + const float new_width = ImTrunc(new_x2 - column->MinX - table->CellSpacingX1 - table->CellPaddingX * 2.0f); table->ResizedColumnNextWidth = new_width; } + table->IsActiveIdInTable = (g.ActiveIdIsAlive != 0 && table->IsActiveIdAliveBeforeTable == false); + // Pop from id stack IM_ASSERT_USER_ERROR(inner_window->IDStack.back() == table_instance->TableInstanceID, "Mismatching PushID/PopID!"); IM_ASSERT_USER_ERROR(outer_window->DC.ItemWidthStack.Size >= temp_data->HostBackupItemWidthStackSize, "Too many PopItemWidth!"); @@ -1422,7 +1462,7 @@ void ImGui::EndTable() } else if (temp_data->UserOuterSize.x <= 0.0f) { - const float decoration_size = (table->Flags & ImGuiTableFlags_ScrollX) ? inner_window->ScrollbarSizes.x : 0.0f; + const float decoration_size = table->TempData->AngledHeadersExtraWidth + ((table->Flags & ImGuiTableFlags_ScrollX) ? inner_window->ScrollbarSizes.x : 0.0f); outer_window->DC.IdealMaxPos.x = ImMax(outer_window->DC.IdealMaxPos.x, table->OuterRect.Min.x + table->ColumnsAutoFitWidth + decoration_size - temp_data->UserOuterSize.x); outer_window->DC.CursorMaxPos.x = ImMax(backup_outer_max_pos.x, ImMin(table->OuterRect.Max.x, table->OuterRect.Min.x + table->ColumnsAutoFitWidth)); } @@ -1461,7 +1501,7 @@ void ImGui::EndTable() NavUpdateCurrentWindowIsScrollPushableX(); } -// See "COLUMN SIZING POLICIES" comments at the top of this file +// See "COLUMNS SIZING POLICIES" comments at the top of this file // If (init_width_or_weight <= 0.0f) it is ignored void ImGui::TableSetupColumn(const char* label, ImGuiTableColumnFlags flags, float init_width_or_weight, ImGuiID user_id) { @@ -1489,6 +1529,11 @@ void ImGui::TableSetupColumn(const char* label, ImGuiTableColumnFlags flags, flo if ((flags & ImGuiTableColumnFlags_WidthMask_) == 0 && init_width_or_weight > 0.0f) if ((table->Flags & ImGuiTableFlags_SizingMask_) == ImGuiTableFlags_SizingFixedFit || (table->Flags & ImGuiTableFlags_SizingMask_) == ImGuiTableFlags_SizingFixedSame) flags |= ImGuiTableColumnFlags_WidthFixed; + if (flags & ImGuiTableColumnFlags_AngledHeader) + { + flags |= ImGuiTableColumnFlags_NoHeaderLabel; + table->AngledHeadersCount++; + } TableSetupColumnFlags(table, column, flags); column->UserID = user_id; @@ -1522,6 +1567,7 @@ void ImGui::TableSetupColumn(const char* label, ImGuiTableColumnFlags flags, flo } // Store name (append with zero-terminator in contiguous buffer) + // FIXME: If we recorded the number of \n in names we could compute header row height column->NameOffset = -1; if (label != NULL && label[0] != 0) { @@ -1836,15 +1882,16 @@ void ImGui::TableEndRow(ImGuiTable* table) const float bg_y2 = table->RowPosY2; const bool unfreeze_rows_actual = (table->CurrentRow + 1 == table->FreezeRowsCount); const bool unfreeze_rows_request = (table->CurrentRow + 1 == table->FreezeRowsRequest); - if (table->CurrentRow == 0) - TableGetInstanceData(table, table->InstanceCurrent)->LastFirstRowHeight = bg_y2 - bg_y1; + ImGuiTableInstanceData* table_instance = TableGetInstanceData(table, table->InstanceCurrent); + if ((table->RowFlags & ImGuiTableRowFlags_Headers) && (table->CurrentRow == 0 || (table->LastRowFlags & ImGuiTableRowFlags_Headers))) + table_instance->LastTopHeadersRowHeight += bg_y2 - bg_y1; const bool is_visible = (bg_y2 >= table->InnerClipRect.Min.y && bg_y1 <= table->InnerClipRect.Max.y); if (is_visible) { // Update data for TableGetHoveredRow() if (table->HoveredColumnBody != -1 && g.IO.MousePos.y >= bg_y1 && g.IO.MousePos.y < bg_y2) - TableGetInstanceData(table, table->InstanceCurrent)->HoveredRowNext = table->CurrentRow; + table_instance->HoveredRowNext = table->CurrentRow; // Decide of background color for the row ImU32 bg_col0 = 0; @@ -1922,7 +1969,7 @@ void ImGui::TableEndRow(ImGuiTable* table) IM_ASSERT(table->IsUnfrozenRows == false); const float y0 = ImMax(table->RowPosY2 + 1, window->InnerClipRect.Min.y); table->IsUnfrozenRows = true; - TableGetInstanceData(table, table->InstanceCurrent)->LastFrozenHeight = y0 - table->OuterRect.Min.y; + table_instance->LastFrozenHeight = y0 - table->OuterRect.Min.y; // BgClipRect starts as table->InnerClipRect, reduce it now and make BgClipRectForDrawCmd == BgClipRect table->BgClipRect.Min.y = table->Bg2ClipRectForDrawCmd.Min.y = ImMin(y0, window->InnerClipRect.Max.y); @@ -2108,6 +2155,8 @@ void ImGui::TableEndCell(ImGuiTable* table) // - TableSetColumnWidthAutoAll() [Internal] // - TableUpdateColumnsWeightFromWidth() [Internal] //------------------------------------------------------------------------- +// Note that actual columns widths are computed in TableUpdateLayout(). +//------------------------------------------------------------------------- // Maximum column content width given current layout. Use column->MinX so this value on a per-column basis. float ImGui::TableGetMaxColumnWidth(const ImGuiTable* table, int column_n) @@ -2300,6 +2349,7 @@ void ImGui::TableUpdateColumnsWeightFromWidth(ImGuiTable* table) // - TablePopBackgroundChannel() [Internal] // - TableSetupDrawChannels() [Internal] // - TableMergeDrawChannels() [Internal] +// - TableGetColumnBorderCol() [Internal] // - TableDrawBorders() [Internal] //------------------------------------------------------------------------- @@ -2583,6 +2633,18 @@ void ImGui::TableMergeDrawChannels(ImGuiTable* table) } } +static ImU32 TableGetColumnBorderCol(ImGuiTable* table, int order_n, int column_n) +{ + const bool is_hovered = (table->HoveredColumnBorder == column_n); + const bool is_resized = (table->ResizedColumn == column_n) && (table->InstanceInteracted == table->InstanceCurrent); + const bool is_frozen_separator = (table->FreezeColumnsCount == order_n + 1); + if (is_resized || is_hovered) + return ImGui::GetColorU32(is_resized ? ImGuiCol_SeparatorActive : ImGuiCol_SeparatorHovered); + if (is_frozen_separator || (table->Flags & (ImGuiTableFlags_NoBordersInBody | ImGuiTableFlags_NoBordersInBodyUntilResize))) + return table->BorderColorStrong; + return table->BorderColorLight; +} + // FIXME-TABLE: This is a mess, need to redesign how we render borders (as some are also done in TableEndRow) void ImGui::TableDrawBorders(ImGuiTable* table) { @@ -2597,9 +2659,9 @@ void ImGui::TableDrawBorders(ImGuiTable* table) // Draw inner border and resizing feedback ImGuiTableInstanceData* table_instance = TableGetInstanceData(table, table->InstanceCurrent); const float border_size = TABLE_BORDER_SIZE; - const float draw_y1 = table->InnerRect.Min.y + ((table->Flags & ImGuiTableFlags_BordersOuterH) ? 1.0f : 0.0f); + const float draw_y1 = ImMax(table->InnerRect.Min.y, (table->FreezeRowsCount >= 1 ? table->InnerRect.Min.y : table->WorkRect.Min.y) + table->AngledHeadersHeight) + ((table->Flags & ImGuiTableFlags_BordersOuterH) ? 1.0f : 0.0f); const float draw_y2_body = table->InnerRect.Max.y; - const float draw_y2_head = table->IsUsingHeaders ? ImMin(table->InnerRect.Max.y, (table->FreezeRowsCount >= 1 ? table->InnerRect.Min.y : table->WorkRect.Min.y) + table_instance->LastFirstRowHeight) : draw_y1; + const float draw_y2_head = table->IsUsingHeaders ? ImMin(table->InnerRect.Max.y, (table->FreezeRowsCount >= 1 ? table->InnerRect.Min.y : table->WorkRect.Min.y) + table_instance->LastTopHeadersRowHeight) : draw_y1; if (table->Flags & ImGuiTableFlags_BordersInnerV) { for (int order_n = 0; order_n < table->ColumnsCount; order_n++) @@ -2625,21 +2687,9 @@ void ImGui::TableDrawBorders(ImGuiTable* table) // Draw in outer window so right-most column won't be clipped // Always draw full height border when being resized/hovered, or on the delimitation of frozen column scrolling. - ImU32 col; - float draw_y2; - if (is_hovered || is_resized || is_frozen_separator) - { - draw_y2 = draw_y2_body; - col = is_resized ? GetColorU32(ImGuiCol_SeparatorActive) : is_hovered ? GetColorU32(ImGuiCol_SeparatorHovered) : table->BorderColorStrong; - } - else - { - draw_y2 = (table->Flags & (ImGuiTableFlags_NoBordersInBody | ImGuiTableFlags_NoBordersInBodyUntilResize)) ? draw_y2_head : draw_y2_body; - col = (table->Flags & (ImGuiTableFlags_NoBordersInBody | ImGuiTableFlags_NoBordersInBodyUntilResize)) ? table->BorderColorStrong : table->BorderColorLight; - } - + float draw_y2 = (is_hovered || is_resized || is_frozen_separator || (table->Flags & (ImGuiTableFlags_NoBordersInBody | ImGuiTableFlags_NoBordersInBodyUntilResize)) == 0) ? draw_y2_body : draw_y2_head; if (draw_y2 > draw_y1) - inner_drawlist->AddLine(ImVec2(column->MaxX, draw_y1), ImVec2(column->MaxX, draw_y2), col, border_size); + inner_drawlist->AddLine(ImVec2(column->MaxX, draw_y1), ImVec2(column->MaxX, draw_y2), TableGetColumnBorderCol(table, order_n, column_n), border_size); } } @@ -2880,8 +2930,11 @@ void ImGui::TableSortSpecsBuild(ImGuiTable* table) // [SECTION] Tables: Headers //------------------------------------------------------------------------- // - TableGetHeaderRowHeight() [Internal] +// - TableGetHeaderAngledMaxLabelWidth() [Internal] // - TableHeadersRow() // - TableHeader() +// - TableAngledHeadersRow() +// - TableAngledHeadersRowEx() [Internal] //------------------------------------------------------------------------- float ImGui::TableGetHeaderRowHeight() @@ -2890,16 +2943,26 @@ float ImGui::TableGetHeaderRowHeight() // Calculate row height, for the unlikely case that some labels may be taller than others. // If we didn't do that, uneven header height would highlight but smaller one before the tallest wouldn't catch input for all height. // In your custom header row you may omit this all together and just call TableNextRow() without a height... - float row_height = GetTextLineHeight(); - int columns_count = TableGetColumnCount(); - for (int column_n = 0; column_n < columns_count; column_n++) - { - ImGuiTableColumnFlags flags = TableGetColumnFlags(column_n); - if ((flags & ImGuiTableColumnFlags_IsEnabled) && !(flags & ImGuiTableColumnFlags_NoHeaderLabel)) - row_height = ImMax(row_height, CalcTextSize(TableGetColumnName(column_n)).y); - } - row_height += GetStyle().CellPadding.y * 2.0f; - return row_height; + ImGuiContext& g = *GImGui; + ImGuiTable* table = g.CurrentTable; + float row_height = g.FontSize; + for (int column_n = 0; column_n < table->ColumnsCount; column_n++) + if (IM_BITARRAY_TESTBIT(table->EnabledMaskByIndex, column_n)) + if ((table->Columns[column_n].Flags & ImGuiTableColumnFlags_NoHeaderLabel) == 0) + row_height = ImMax(row_height, CalcTextSize(TableGetColumnName(table, column_n)).y); + return row_height + g.Style.CellPadding.y * 2.0f; +} + +float ImGui::TableGetHeaderAngledMaxLabelWidth() +{ + ImGuiContext& g = *GImGui; + ImGuiTable* table = g.CurrentTable; + float width = 0.0f; + for (int column_n = 0; column_n < table->ColumnsCount; column_n++) + if (IM_BITARRAY_TESTBIT(table->EnabledMaskByIndex, column_n)) + if (table->Columns[column_n].Flags & ImGuiTableColumnFlags_AngledHeader) + width = ImMax(width, CalcTextSize(TableGetColumnName(table, column_n), NULL, true).x); + return width + g.Style.CellPadding.y * 2.0f; // Swap padding } // [Public] This is a helper to output TableHeader() calls based on the column names declared in TableSetupColumn(). @@ -2919,9 +2982,9 @@ void ImGui::TableHeadersRow() TableUpdateLayout(table); // Open row - const float row_y1 = GetCursorScreenPos().y; const float row_height = TableGetHeaderRowHeight(); TableNextRow(ImGuiTableRowFlags_Headers, row_height); + const float row_y1 = GetCursorScreenPos().y; if (table->HostSkipItems) // Merely an optimization, you may skip in your own code. return; @@ -2943,7 +3006,7 @@ void ImGui::TableHeadersRow() ImVec2 mouse_pos = ImGui::GetMousePos(); if (IsMouseReleased(1) && TableGetHoveredColumn() == columns_count) if (mouse_pos.y >= row_y1 && mouse_pos.y < row_y1 + row_height) - TableOpenContextMenu(-1); // Will open a non-column-specific popup. + TableOpenContextMenu(columns_count); // Will open a non-column-specific popup. } // Emit a column header (text + optional sort order) @@ -2977,11 +3040,14 @@ void ImGui::TableHeader(const char* label) // Calculate ideal size for sort order arrow float w_arrow = 0.0f; float w_sort_text = 0.0f; + bool sort_arrow = false; char sort_order_suf[4] = ""; const float ARROW_SCALE = 0.65f; if ((table->Flags & ImGuiTableFlags_Sortable) && !(column->Flags & ImGuiTableColumnFlags_NoSort)) { - w_arrow = ImFloor(g.FontSize * ARROW_SCALE + g.Style.FramePadding.x); + w_arrow = ImTrunc(g.FontSize * ARROW_SCALE + g.Style.FramePadding.x); + if (column->SortOrder != -1) + sort_arrow = true; if (column->SortOrder > 0) { ImFormatString(sort_order_suf, IM_ARRAYSIZE(sort_order_suf), "%d", column->SortOrder + 1); @@ -2989,13 +3055,12 @@ void ImGui::TableHeader(const char* label) } } - // We feed our unclipped width to the column without writing on CursorMaxPos, so that column is still considering for merging. + // We feed our unclipped width to the column without writing on CursorMaxPos, so that column is still considered for merging. float max_pos_x = label_pos.x + label_size.x + w_sort_text + w_arrow; - column->ContentMaxXHeadersUsed = ImMax(column->ContentMaxXHeadersUsed, column->WorkMaxX); + column->ContentMaxXHeadersUsed = ImMax(column->ContentMaxXHeadersUsed, sort_arrow ? cell_r.Max.x : ImMin(max_pos_x, cell_r.Max.x)); column->ContentMaxXHeadersIdeal = ImMax(column->ContentMaxXHeadersIdeal, max_pos_x); // Keep header highlighted when context menu is open. - const bool selected = (table->IsContextPopupOpen && table->ContextPopupColumn == column_n && table->InstanceInteracted == table->InstanceCurrent); ImGuiID id = window->GetID(label); ImRect bb(cell_r.Min.x, cell_r.Min.y, cell_r.Max.x, ImMax(cell_r.Max.y, cell_r.Min.y + label_height + g.Style.CellPadding.y * 2.0f)); ItemSize(ImVec2(0.0f, label_height)); // Don't declare unclipped width, it'll be fed ContentMaxPosHeadersIdeal @@ -3006,9 +3071,10 @@ void ImGui::TableHeader(const char* label) //GetForegroundDrawList()->AddRect(bb.Min, bb.Max, IM_COL32(255, 0, 0, 255)); // [DEBUG] // Using AllowOverlap mode because we cover the whole cell, and we want user to be able to submit subsequent items. + const bool highlight = (table->HighlightColumnHeader == column_n); bool hovered, held; bool pressed = ButtonBehavior(bb, id, &hovered, &held, ImGuiButtonFlags_AllowOverlap); - if (held || hovered || selected) + if (held || hovered || highlight) { const ImU32 col = GetColorU32(held ? ImGuiCol_HeaderActive : hovered ? ImGuiCol_HeaderHovered : ImGuiCol_Header); //RenderFrame(bb.Min, bb.Max, col, false, 0.0f); @@ -3020,7 +3086,7 @@ void ImGui::TableHeader(const char* label) if ((table->RowFlags & ImGuiTableRowFlags_Headers) == 0) TableSetBgColor(ImGuiTableBgTarget_CellBg, GetColorU32(ImGuiCol_TableHeaderBg), table->CurrentColumn); } - RenderNavHighlight(bb, id, ImGuiNavHighlightFlags_TypeThin | ImGuiNavHighlightFlags_NoRounding); + RenderNavHighlight(bb, id, ImGuiNavHighlightFlags_Compact | ImGuiNavHighlightFlags_NoRounding); if (held) table->HeldHeaderColumn = (ImGuiTableColumnIdx)column_n; window->DC.CursorPos.y -= g.Style.ItemSpacing.y * 0.5f; @@ -3086,11 +3152,148 @@ void ImGui::TableHeader(const char* label) TableOpenContextMenu(column_n); } +// Unlike TableHeadersRow() it is not expected that you can reimplement or customize this with custom widgets. +// FIXME: highlight without ImGuiTableFlags_HighlightHoveredColumn +// FIXME: No hit-testing/button on the angled header. +void ImGui::TableAngledHeadersRow() +{ + ImGuiContext& g = *GImGui; + TableAngledHeadersRowEx(g.Style.TableAngledHeadersAngle, 0.0f); +} + +void ImGui::TableAngledHeadersRowEx(float angle, float max_label_width) +{ + ImGuiContext& g = *GImGui; + ImGuiTable* table = g.CurrentTable; + ImGuiWindow* window = g.CurrentWindow; + ImDrawList* draw_list = window->DrawList; + IM_ASSERT(table != NULL && "Need to call TableHeadersRow() after BeginTable()!"); + IM_ASSERT(table->CurrentRow == -1 && "Must be first row"); + + if (max_label_width == 0.0f) + max_label_width = TableGetHeaderAngledMaxLabelWidth(); + + // Angle argument expressed in (-IM_PI/2 .. +IM_PI/2) as it is easier to think about for user. + const bool flip_label = (angle < 0.0f); + angle -= IM_PI * 0.5f; + const float cos_a = ImCos(angle); + const float sin_a = ImSin(angle); + const float label_cos_a = flip_label ? ImCos(angle + IM_PI) : cos_a; + const float label_sin_a = flip_label ? ImSin(angle + IM_PI) : sin_a; + const ImVec2 unit_right = ImVec2(cos_a, sin_a); + + // Calculate our base metrics and set angled headers data _before_ the first call to TableNextRow() + // FIXME-STYLE: Would it be better for user to submit 'max_label_width' or 'row_height' ? One can be derived from the other. + const float header_height = g.FontSize + g.Style.CellPadding.x * 2.0f; + const float row_height = ImFabs(ImRotate(ImVec2(max_label_width, flip_label ? +header_height : -header_height), cos_a, sin_a).y); + table->AngledHeadersHeight = row_height; + table->AngledHeadersSlope = (sin_a != 0.0f) ? (cos_a / sin_a) : 0.0f; + const ImVec2 header_angled_vector = unit_right * (row_height / -sin_a); // vector from bottom-left to top-left, and from bottom-right to top-right + + // Declare row, override and draw our own background + TableNextRow(ImGuiTableRowFlags_Headers, row_height); + TableNextColumn(); + const ImRect row_r(table->WorkRect.Min.x, table->BgClipRect.Min.y, table->WorkRect.Max.x, table->RowPosY2); + table->DrawSplitter->SetCurrentChannel(draw_list, TABLE_DRAW_CHANNEL_BG0); + float clip_rect_min_x = table->BgClipRect.Min.x; + if (table->FreezeColumnsCount > 0) + clip_rect_min_x = ImMax(clip_rect_min_x, table->Columns[table->FreezeColumnsCount - 1].MaxX); + TableSetBgColor(ImGuiTableBgTarget_RowBg0, 0); // Cancel + PushClipRect(table->BgClipRect.Min, table->BgClipRect.Max, false); // Span all columns + draw_list->AddRectFilled(ImVec2(table->BgClipRect.Min.x, row_r.Min.y), ImVec2(table->BgClipRect.Max.x, row_r.Max.y), GetColorU32(ImGuiCol_TableHeaderBg, 0.25f)); // FIXME-STYLE: Change row background with an arbitrary color. + PushClipRect(ImVec2(clip_rect_min_x, table->BgClipRect.Min.y), table->BgClipRect.Max, true); // Span all columns + + const ImGuiID row_id = GetID("##AngledHeaders"); + ButtonBehavior(row_r, row_id, NULL, NULL); + KeepAliveID(row_id); + + ImGuiTableInstanceData* table_instance = TableGetInstanceData(table, table->InstanceCurrent); + int highlight_column_n = table->HighlightColumnHeader; + if (highlight_column_n == -1 && table->HoveredColumnBody != -1) + if (table_instance->HoveredRowLast == 0 && table->HoveredColumnBorder == -1 && (g.ActiveId == 0 || g.ActiveId == row_id || (table->IsActiveIdInTable || g.DragDropActive))) + highlight_column_n = table->HoveredColumnBody; + + // Draw background and labels in first pass, then all borders. + float max_x = 0.0f; + ImVec2 padding = g.Style.CellPadding; // We will always use swapped component + for (int pass = 0; pass < 2; pass++) + for (int order_n = 0; order_n < table->ColumnsCount; order_n++) + { + if (!IM_BITARRAY_TESTBIT(table->EnabledMaskByDisplayOrder, order_n)) + continue; + const int column_n = table->DisplayOrderToIndex[order_n]; + ImGuiTableColumn* column = &table->Columns[column_n]; + if ((column->Flags & ImGuiTableColumnFlags_AngledHeader) == 0) // Note: can't rely on ImGuiTableColumnFlags_IsVisible test here. + continue; + + ImVec2 bg_shape[4]; + bg_shape[0] = ImVec2(column->MaxX, row_r.Max.y); + bg_shape[1] = ImVec2(column->MinX, row_r.Max.y); + bg_shape[2] = bg_shape[1] + header_angled_vector; + bg_shape[3] = bg_shape[0] + header_angled_vector; + if (pass == 0) + { + // Draw shape + draw_list->AddQuadFilled(bg_shape[0], bg_shape[1], bg_shape[2], bg_shape[3], GetColorU32(ImGuiCol_TableHeaderBg)); + if (column_n == highlight_column_n) + draw_list->AddQuadFilled(bg_shape[0], bg_shape[1], bg_shape[2], bg_shape[3], GetColorU32(ImGuiCol_Header)); // Highlight on hover + max_x = ImMax(max_x, bg_shape[3].x); + + // Draw label + // - First draw at an offset where RenderTextXXX() function won't meddle with applying current ClipRect, then transform to final offset. + // - Handle multiple lines manually, as we want each lines to follow on the horizontal border, rather than see a whole block rotated. + const char* label_name = TableGetColumnName(table, column_n); + const char* label_name_end = FindRenderedTextEnd(label_name); + const float line_off_step_x = g.FontSize / -sin_a; + float line_off_curr_x = 0.0f; + while (label_name < label_name_end) + { + const char* label_name_eol = strchr(label_name, '\n'); + if (label_name_eol == NULL) + label_name_eol = label_name_end; + + // FIXME: Individual line clipping for right-most column is broken for negative angles. + ImVec2 label_size = CalcTextSize(label_name, label_name_eol); + float clip_width = max_label_width - padding.y; // Using padding.y*2.0f would be symetrical but hide more text. + float clip_height = ImMin(label_size.y, column->ClipRect.Max.x - column->WorkMinX - line_off_curr_x); + ImRect clip_r(window->ClipRect.Min, window->ClipRect.Min + ImVec2(clip_width, clip_height)); + int vtx_idx_begin = draw_list->_VtxCurrentIdx; + RenderTextEllipsis(draw_list, clip_r.Min, clip_r.Max, clip_r.Max.x, clip_r.Max.x, label_name, label_name_eol, &label_size); + int vtx_idx_end = draw_list->_VtxCurrentIdx; + + // Rotate and offset label + ImVec2 pivot_in = ImVec2(window->ClipRect.Min.x, window->ClipRect.Min.y + label_size.y); + ImVec2 pivot_out = ImVec2(column->WorkMinX, row_r.Max.y); + line_off_curr_x += line_off_step_x; + pivot_out += unit_right * padding.y; + if (flip_label) + pivot_out += unit_right * (clip_width - ImMax(0.0f, clip_width - label_size.x)); + pivot_out.x += flip_label ? line_off_curr_x - line_off_step_x : line_off_curr_x; + ShadeVertsTransformPos(draw_list, vtx_idx_begin, vtx_idx_end, pivot_in, label_cos_a, label_sin_a, pivot_out); // Rotate and offset + //if (g.IO.KeyShift) { ImDrawList* fg_dl = GetForegroundDrawList(); vtx_idx_begin = fg_dl->_VtxCurrentIdx; fg_dl->AddRect(clip_r.Min, clip_r.Max, IM_COL32(0, 255, 0, 255), 0.0f, 0, 2.0f); ShadeVertsTransformPos(fg_dl, vtx_idx_begin, fg_dl->_VtxCurrentIdx, pivot_in, label_cos_a, label_sin_a, pivot_out); } + + // Register header width + column->ContentMaxXHeadersUsed = column->ContentMaxXHeadersIdeal = column->WorkMinX + ImCeil(line_off_curr_x); + label_name = label_name_eol + 1; + } + } + if (pass == 1) + { + // Draw border + draw_list->AddLine(bg_shape[0], bg_shape[3], TableGetColumnBorderCol(table, order_n, column_n)); + } + } + PopClipRect(); + PopClipRect(); + table->TempData->AngledHeadersExtraWidth = ImMax(0.0f, max_x - table->Columns[table->RightMostEnabledColumn].MaxX); +} + //------------------------------------------------------------------------- // [SECTION] Tables: Context Menu //------------------------------------------------------------------------- // - TableOpenContextMenu() [Internal] -// - TableDrawContextMenu() [Internal] +// - TableBeginContextMenuPopup() [Internal] +// - TableDrawDefaultContextMenu() [Internal] //------------------------------------------------------------------------- // Use -1 to open menu not specific to a given column. @@ -3126,7 +3329,13 @@ bool ImGui::TableBeginContextMenuPopup(ImGuiTable* table) // Output context menu into current window (generally a popup) // FIXME-TABLE: Ideally this should be writable by the user. Full programmatic access to that data? -void ImGui::TableDrawContextMenu(ImGuiTable* table) +// Sections to display are pulled from 'flags_for_section_to_display', which is typically == table->Flags. +// - ImGuiTableFlags_Resizable -> display Sizing menu items +// - ImGuiTableFlags_Reorderable -> display "Reset Order" +////- ImGuiTableFlags_Sortable -> display sorting options (disabled) +// - ImGuiTableFlags_Hideable -> display columns visibility menu items +// It means if you have a custom context menus you can call this section and omit some sections, and add your own. +void ImGui::TableDrawDefaultContextMenu(ImGuiTable* table, ImGuiTableFlags flags_for_section_to_display) { ImGuiContext& g = *GImGui; ImGuiWindow* window = g.CurrentWindow; @@ -3138,7 +3347,7 @@ void ImGui::TableDrawContextMenu(ImGuiTable* table) ImGuiTableColumn* column = (column_n != -1) ? &table->Columns[column_n] : NULL; // Sizing - if (table->Flags & ImGuiTableFlags_Resizable) + if (flags_for_section_to_display & ImGuiTableFlags_Resizable) { if (column != NULL) { @@ -3158,7 +3367,7 @@ void ImGui::TableDrawContextMenu(ImGuiTable* table) } // Ordering - if (table->Flags & ImGuiTableFlags_Reorderable) + if (flags_for_section_to_display & ImGuiTableFlags_Reorderable) { if (MenuItem(LocalizeGetMsg(ImGuiLocKey_TableResetOrder), NULL, false, !table->IsDefaultDisplayOrder)) table->IsResetDisplayOrderRequest = true; @@ -3172,7 +3381,7 @@ void ImGui::TableDrawContextMenu(ImGuiTable* table) // Sorting // (modify TableOpenContextMenu() to add _Sortable flag if enabling this) #if 0 - if ((table->Flags & ImGuiTableFlags_Sortable) && column != NULL && (column->Flags & ImGuiTableColumnFlags_NoSort) == 0) + if ((flags_for_section_to_display & ImGuiTableFlags_Sortable) && column != NULL && (column->Flags & ImGuiTableColumnFlags_NoSort) == 0) { if (want_separator) Separator(); @@ -3187,7 +3396,7 @@ void ImGui::TableDrawContextMenu(ImGuiTable* table) #endif // Hiding / Visibility - if (table->Flags & ImGuiTableFlags_Hideable) + if (flags_for_section_to_display & ImGuiTableFlags_Hideable) { if (want_separator) Separator(); @@ -3623,7 +3832,8 @@ static const char* DebugNodeTableGetSizingPolicyDesc(ImGuiTableFlags sizing_poli void ImGui::DebugNodeTable(ImGuiTable* table) { - const bool is_active = (table->LastFrameActive >= GetFrameCount() - 2); // Note that fully clipped early out scrolling tables will appear as inactive here. + ImGuiContext& g = *GImGui; + const bool is_active = (table->LastFrameActive >= g.FrameCount - 2); // Note that fully clipped early out scrolling tables will appear as inactive here. if (!is_active) { PushStyleColor(ImGuiCol_Text, GetStyleColorVec4(ImGuiCol_TextDisabled)); } bool open = TreeNode(table, "Table 0x%08X (%d columns, in '%s')%s", table->ID, table->ColumnsCount, table->OuterWindow->Name, is_active ? "" : " *Inactive*"); if (!is_active) { PopStyleColor(); } @@ -3635,6 +3845,13 @@ void ImGui::DebugNodeTable(ImGuiTable* table) return; if (table->InstanceCurrent > 0) Text("** %d instances of same table! Some data below will refer to last instance.", table->InstanceCurrent + 1); + if (g.IO.ConfigDebugIsDebuggerPresent) + { + if (DebugBreakButton("**DebugBreak**", "in BeginTable()")) + g.DebugBreakInTable = table->ID; + SameLine(); + } + bool clear_settings = SmallButton("Clear settings"); BulletText("OuterRect: Pos: (%.1f,%.1f) Size: (%.1f,%.1f) Sizing: '%s'", table->OuterRect.Min.x, table->OuterRect.Min.y, table->OuterRect.GetWidth(), table->OuterRect.GetHeight(), DebugNodeTableGetSizingPolicyDesc(table->Flags)); BulletText("ColumnsGivenWidth: %.1f, ColumnsAutoFitWidth: %.1f, InnerWidth: %.1f%s", table->ColumnsGivenWidth, table->ColumnsAutoFitWidth, table->InnerWidth, table->InnerWidth == 0.0f ? " (auto)" : ""); @@ -3955,7 +4172,7 @@ void ImGui::BeginColumns(const char* str_id, int columns_count, ImGuiOldColumnFl // Set state for first column // We aim so that the right-most column will have the same clipping width as other after being clipped by parent ClipRect const float column_padding = g.Style.ItemSpacing.x; - const float half_clip_extend_x = ImFloor(ImMax(window->WindowPadding.x * 0.5f, window->WindowBorderSize)); + const float half_clip_extend_x = ImTrunc(ImMax(window->WindowPadding.x * 0.5f, window->WindowBorderSize)); const float max_1 = window->WorkRect.Max.x + column_padding - ImMax(column_padding - window->WindowPadding.x, 0.0f); const float max_2 = window->WorkRect.Max.x + half_clip_extend_x; columns->OffMinX = window->DC.Indent.x - column_padding + ImMax(column_padding - window->WindowPadding.x, 0.0f); @@ -4002,7 +4219,7 @@ void ImGui::BeginColumns(const char* str_id, int columns_count, ImGuiOldColumnFl float width = offset_1 - offset_0; PushItemWidth(width * 0.65f); window->DC.ColumnsOffset.x = ImMax(column_padding - window->WindowPadding.x, 0.0f); - window->DC.CursorPos.x = IM_FLOOR(window->Pos.x + window->DC.Indent.x + window->DC.ColumnsOffset.x); + window->DC.CursorPos.x = IM_TRUNC(window->Pos.x + window->DC.Indent.x + window->DC.ColumnsOffset.x); window->WorkRect.Max.x = window->Pos.x + offset_1 - column_padding; window->WorkRect.Max.y = window->ContentRegionRect.Max.y; } @@ -4018,7 +4235,7 @@ void ImGui::NextColumn() if (columns->Count == 1) { - window->DC.CursorPos.x = IM_FLOOR(window->Pos.x + window->DC.Indent.x + window->DC.ColumnsOffset.x); + window->DC.CursorPos.x = IM_TRUNC(window->Pos.x + window->DC.Indent.x + window->DC.ColumnsOffset.x); IM_ASSERT(columns->Current == 0); return; } @@ -4050,7 +4267,7 @@ void ImGui::NextColumn() window->DC.IsSameLine = false; columns->LineMinY = columns->LineMaxY; } - window->DC.CursorPos.x = IM_FLOOR(window->Pos.x + window->DC.Indent.x + window->DC.ColumnsOffset.x); + window->DC.CursorPos.x = IM_TRUNC(window->Pos.x + window->DC.Indent.x + window->DC.ColumnsOffset.x); window->DC.CursorPos.y = columns->LineMinY; window->DC.CurrLineSize = ImVec2(0.0f, 0.0f); window->DC.CurrLineTextBaseOffset = 0.0f; @@ -4114,7 +4331,7 @@ void ImGui::EndColumns() // Draw column const ImU32 col = GetColorU32(held ? ImGuiCol_SeparatorActive : hovered ? ImGuiCol_SeparatorHovered : ImGuiCol_Separator); - const float xi = IM_FLOOR(x); + const float xi = IM_TRUNC(x); window->DrawList->AddLine(ImVec2(xi, y1 + 1.0f), ImVec2(xi, y2), col); } @@ -4135,7 +4352,7 @@ void ImGui::EndColumns() window->ParentWorkRect = columns->HostBackupParentWorkRect; window->DC.CurrentColumns = NULL; window->DC.ColumnsOffset.x = 0.0f; - window->DC.CursorPos.x = IM_FLOOR(window->Pos.x + window->DC.Indent.x + window->DC.ColumnsOffset.x); + window->DC.CursorPos.x = IM_TRUNC(window->Pos.x + window->DC.Indent.x + window->DC.ColumnsOffset.x); NavUpdateCurrentWindowIsScrollPushableX(); } diff --git a/cimgui/imgui/imgui_widgets.cpp b/cimgui/imgui/imgui_widgets.cpp index 5d1dd459d..1ddf4c7f6 100644 --- a/cimgui/imgui/imgui_widgets.cpp +++ b/cimgui/imgui/imgui_widgets.cpp @@ -1,4 +1,4 @@ -// dear imgui, v1.90 WIP +// dear imgui, v1.90.4 // (widgets code) /* @@ -477,6 +477,9 @@ void ImGui::BulletTextV(const char* fmt, va_list args) // Frame N + RepeatDelay + RepeatRate*N true true - true //------------------------------------------------------------------------------------------------------------------------------------------------- +// FIXME: For refactor we could output flags, incl mouse hovered vs nav keyboard vs nav triggered etc. +// And better standardize how widgets use 'GetColor32((held && hovered) ? ... : hovered ? ...)' vs 'GetColor32(held ? ... : hovered ? ...);' +// For mouse feedback we typically prefer the 'held && hovered' test, but for nav feedback not always. Outputting hovered=true on Activation may be misleading. bool ImGui::ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool* out_held, ImGuiButtonFlags flags) { ImGuiContext& g = *GImGui; @@ -597,9 +600,9 @@ bool ImGui::ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool g.NavDisableHighlight = true; } - // Gamepad/Keyboard navigation - // We report navigated item as hovered but we don't set g.HoveredId to not interfere with mouse. - if (g.NavId == id && !g.NavDisableHighlight && g.NavDisableMouseHover && (g.ActiveId == 0 || g.ActiveId == id || g.ActiveId == window->MoveId)) + // Gamepad/Keyboard handling + // We report navigated and navigation-activated items as hovered but we don't set g.HoveredId to not interfere with mouse. + if (g.NavId == id && !g.NavDisableHighlight && g.NavDisableMouseHover) if (!(flags & ImGuiButtonFlags_NoHoveredOnFocus)) hovered = true; if (g.NavActivateDownId == id) @@ -621,8 +624,10 @@ bool ImGui::ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool pressed = true; SetActiveID(id, window); g.ActiveIdSource = g.NavInputSource; - if (!(flags & ImGuiButtonFlags_NoNavFocus)) + if (!(flags & ImGuiButtonFlags_NoNavFocus) && !(g.NavActivateFlags & ImGuiActivateFlags_FromShortcut)) SetFocusID(id, window); + if (g.NavActivateFlags & ImGuiActivateFlags_FromShortcut) + g.ActiveIdFromShortcut = true; } } @@ -666,13 +671,19 @@ bool ImGui::ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool else if (g.ActiveIdSource == ImGuiInputSource_Keyboard || g.ActiveIdSource == ImGuiInputSource_Gamepad) { // When activated using Nav, we hold on the ActiveID until activation button is released - if (g.NavActivateDownId != id) + if (g.NavActivateDownId == id) + held = true; // hovered == true not true as we are already likely hovered on direct activation. + else ClearActiveID(); } if (pressed) g.ActiveIdHasBeenPressedBefore = true; } + // Activation highlight (this may be a remote activation) + if (g.NavHighlightActivatedId == id) + hovered = true; + if (out_hovered) *out_hovered = hovered; if (out_held) *out_held = held; @@ -808,7 +819,7 @@ bool ImGui::CloseButton(ImGuiID id, const ImVec2& pos) ImRect bb_interact = bb; const float area_to_visible_ratio = window->OuterRectClipped.GetArea() / bb.GetArea(); if (area_to_visible_ratio < 1.5f) - bb_interact.Expand(ImFloor(bb_interact.GetSize() * -0.25f)); + bb_interact.Expand(ImTrunc(bb_interact.GetSize() * -0.25f)); // Tweak 2: We intentionally allow interaction when clipped so that a mechanical Alt,Right,Activate sequence can always close a window. // (this isn't the common behavior of buttons, but it doesn't affect the user because navigation tends to keep items visible in scrolling layer). @@ -862,7 +873,7 @@ bool ImGui::CollapseButton(ImGuiID id, const ImVec2& pos, ImGuiDockNode* dock_no // Switch to moving the window after mouse is moved beyond the initial drag threshold if (IsItemActive() && IsMouseDragging(0)) - StartMouseMovingWindowOrNode(window, dock_node, true); + StartMouseMovingWindowOrNode(window, dock_node, true); // Undock from window/collapse menu button return pressed; } @@ -944,7 +955,7 @@ bool ImGui::ScrollbarEx(const ImRect& bb_frame, ImGuiID id, ImGuiAxis axis, ImS6 const bool allow_interaction = (alpha >= 1.0f); ImRect bb = bb_frame; - bb.Expand(ImVec2(-ImClamp(IM_FLOOR((bb_frame_width - 2.0f) * 0.5f), 0.0f, 3.0f), -ImClamp(IM_FLOOR((bb_frame_height - 2.0f) * 0.5f), 0.0f, 3.0f))); + bb.Expand(ImVec2(-ImClamp(IM_TRUNC((bb_frame_width - 2.0f) * 0.5f), 0.0f, 3.0f), -ImClamp(IM_TRUNC((bb_frame_height - 2.0f) * 0.5f), 0.0f, 3.0f))); // V denote the main, longer axis of the scrollbar (= height for a vertical scrollbar) const float scrollbar_size_v = (axis == ImGuiAxis_X) ? bb.GetWidth() : bb.GetHeight(); @@ -972,7 +983,6 @@ bool ImGui::ScrollbarEx(const ImRect& bb_frame, ImGuiID id, ImGuiAxis axis, ImS6 // Click position in scrollbar normalized space (0.0f->1.0f) const float clicked_v_norm = ImSaturate((mouse_pos_v - scrollbar_pos_v) / scrollbar_size_v); - SetHoveredID(id); bool seek_absolute = false; if (g.ActiveIdIsJustActivated) @@ -1013,33 +1023,30 @@ bool ImGui::ScrollbarEx(const ImRect& bb_frame, ImGuiID id, ImGuiAxis axis, ImS6 return held; } -void ImGui::Image(ImTextureID user_texture_id, const ImVec2& size, const ImVec2& uv0, const ImVec2& uv1, const ImVec4& tint_col, const ImVec4& border_col) +// - Read about ImTextureID here: https://github.com/ocornut/imgui/wiki/Image-Loading-and-Displaying-Examples +// - 'uv0' and 'uv1' are texture coordinates. Read about them from the same link above. +void ImGui::Image(ImTextureID user_texture_id, const ImVec2& image_size, const ImVec2& uv0, const ImVec2& uv1, const ImVec4& tint_col, const ImVec4& border_col) { ImGuiWindow* window = GetCurrentWindow(); if (window->SkipItems) return; - ImRect bb(window->DC.CursorPos, window->DC.CursorPos + size); - if (border_col.w > 0.0f) - bb.Max += ImVec2(2, 2); + const float border_size = (border_col.w > 0.0f) ? 1.0f : 0.0f; + const ImVec2 padding(border_size, border_size); + const ImRect bb(window->DC.CursorPos, window->DC.CursorPos + image_size + padding * 2.0f); ItemSize(bb); if (!ItemAdd(bb, 0)) return; - if (border_col.w > 0.0f) - { - window->DrawList->AddRect(bb.Min, bb.Max, GetColorU32(border_col), 0.0f); - window->DrawList->AddImage(user_texture_id, bb.Min + ImVec2(1, 1), bb.Max - ImVec2(1, 1), uv0, uv1, GetColorU32(tint_col)); - } - else - { - window->DrawList->AddImage(user_texture_id, bb.Min, bb.Max, uv0, uv1, GetColorU32(tint_col)); - } + // Render + if (border_size > 0.0f) + window->DrawList->AddRect(bb.Min, bb.Max, GetColorU32(border_col), 0.0f, ImDrawFlags_None, border_size); + window->DrawList->AddImage(user_texture_id, bb.Min + padding, bb.Max - padding, uv0, uv1, GetColorU32(tint_col)); } // ImageButton() is flawed as 'id' is always derived from 'texture_id' (see #2464 #1390) // We provide this internal helper to write your own variant while we figure out how to redesign the public ImageButton() API. -bool ImGui::ImageButtonEx(ImGuiID id, ImTextureID texture_id, const ImVec2& size, const ImVec2& uv0, const ImVec2& uv1, const ImVec4& bg_col, const ImVec4& tint_col, ImGuiButtonFlags flags) +bool ImGui::ImageButtonEx(ImGuiID id, ImTextureID texture_id, const ImVec2& image_size, const ImVec2& uv0, const ImVec2& uv1, const ImVec4& bg_col, const ImVec4& tint_col, ImGuiButtonFlags flags) { ImGuiContext& g = *GImGui; ImGuiWindow* window = GetCurrentWindow(); @@ -1047,7 +1054,7 @@ bool ImGui::ImageButtonEx(ImGuiID id, ImTextureID texture_id, const ImVec2& size return false; const ImVec2 padding = g.Style.FramePadding; - const ImRect bb(window->DC.CursorPos, window->DC.CursorPos + size + padding * 2.0f); + const ImRect bb(window->DC.CursorPos, window->DC.CursorPos + image_size + padding * 2.0f); ItemSize(bb); if (!ItemAdd(bb, id)) return false; @@ -1066,14 +1073,15 @@ bool ImGui::ImageButtonEx(ImGuiID id, ImTextureID texture_id, const ImVec2& size return pressed; } -bool ImGui::ImageButton(const char* str_id, ImTextureID user_texture_id, const ImVec2& size, const ImVec2& uv0, const ImVec2& uv1, const ImVec4& bg_col, const ImVec4& tint_col) +// Note that ImageButton() adds style.FramePadding*2.0f to provided size. This is in order to facilitate fitting an image in a button. +bool ImGui::ImageButton(const char* str_id, ImTextureID user_texture_id, const ImVec2& image_size, const ImVec2& uv0, const ImVec2& uv1, const ImVec4& bg_col, const ImVec4& tint_col) { ImGuiContext& g = *GImGui; ImGuiWindow* window = g.CurrentWindow; if (window->SkipItems) return false; - return ImageButtonEx(window->GetID(str_id), user_texture_id, size, uv0, uv1, bg_col, tint_col); + return ImageButtonEx(window->GetID(str_id), user_texture_id, image_size, uv0, uv1, bg_col, tint_col); } #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS @@ -1140,12 +1148,12 @@ bool ImGui::Checkbox(const char* label, bool* v) { // Undocumented tristate/mixed/indeterminate checkbox (#2644) // This may seem awkwardly designed because the aim is to make ImGuiItemFlags_MixedValue supported by all widgets (not just checkbox) - ImVec2 pad(ImMax(1.0f, IM_FLOOR(square_sz / 3.6f)), ImMax(1.0f, IM_FLOOR(square_sz / 3.6f))); + ImVec2 pad(ImMax(1.0f, IM_TRUNC(square_sz / 3.6f)), ImMax(1.0f, IM_TRUNC(square_sz / 3.6f))); window->DrawList->AddRectFilled(check_bb.Min + pad, check_bb.Max - pad, check_col, style.FrameRounding); } else if (*v) { - const float pad = ImMax(1.0f, IM_FLOOR(square_sz / 6.0f)); + const float pad = ImMax(1.0f, IM_TRUNC(square_sz / 6.0f)); RenderCheckMark(window->DrawList, check_bb.Min + ImVec2(pad, pad), check_col, square_sz - pad * 2.0f); } @@ -1240,7 +1248,7 @@ bool ImGui::RadioButton(const char* label, bool active) window->DrawList->AddCircleFilled(center, radius, GetColorU32((held && hovered) ? ImGuiCol_FrameBgActive : hovered ? ImGuiCol_FrameBgHovered : ImGuiCol_FrameBg), num_segment); if (active) { - const float pad = ImMax(1.0f, IM_FLOOR(square_sz / 6.0f)); + const float pad = ImMax(1.0f, IM_TRUNC(square_sz / 6.0f)); window->DrawList->AddCircleFilled(center, radius - pad, GetColorU32(ImGuiCol_CheckMark)); } @@ -1420,26 +1428,19 @@ void ImGui::SeparatorEx(ImGuiSeparatorFlags flags, float thickness) else if (flags & ImGuiSeparatorFlags_Horizontal) { // Horizontal Separator - float x1 = window->Pos.x; - float x2 = window->Pos.x + window->Size.x; - - // FIXME-WORKRECT: old hack (#205) until we decide of consistent behavior with WorkRect/Indent and Separator - if (g.GroupStack.Size > 0 && g.GroupStack.back().WindowID == window->ID) - x1 += window->DC.Indent.x; - - // FIXME-WORKRECT: In theory we should simply be using WorkRect.Min.x/Max.x everywhere but it isn't aesthetically what we want, - // need to introduce a variant of WorkRect for that purpose. (#4787) - if (ImGuiTable* table = g.CurrentTable) - { - x1 = table->Columns[table->CurrentColumn].MinX; - x2 = table->Columns[table->CurrentColumn].MaxX; - } + float x1 = window->DC.CursorPos.x; + float x2 = window->WorkRect.Max.x; + // Preserve legacy behavior inside Columns() // Before Tables API happened, we relied on Separator() to span all columns of a Columns() set. // We currently don't need to provide the same feature for tables because tables naturally have border features. ImGuiOldColumns* columns = (flags & ImGuiSeparatorFlags_SpanAllColumns) ? window->DC.CurrentColumns : NULL; if (columns) + { + x1 = window->Pos.x + window->DC.Indent.x; // Used to be Pos.x before 2023/10/03 + x2 = window->Pos.x + window->Size.x; PushColumnsBackground(); + } // We don't provide our width to the layout so that it doesn't get feed back into AutoFit // FIXME: This prevents ->CursorMaxPos based bounding box evaluation from working (e.g. TableEndCell) @@ -1473,7 +1474,11 @@ void ImGui::Separator() // Those flags should eventually be configurable by the user // FIXME: We cannot g.Style.SeparatorTextBorderSize for thickness as it relates to SeparatorText() which is a decorated separator, not defaulting to 1.0f. ImGuiSeparatorFlags flags = (window->DC.LayoutType == ImGuiLayoutType_Horizontal) ? ImGuiSeparatorFlags_Vertical : ImGuiSeparatorFlags_Horizontal; - flags |= ImGuiSeparatorFlags_SpanAllColumns; // NB: this only applies to legacy Columns() api as they relied on Separator() a lot. + + // Only applies to legacy Columns() api as they relied on Separator() a lot. + if (window->DC.CurrentColumns) + flags |= ImGuiSeparatorFlags_SpanAllColumns; + SeparatorEx(flags, 1.0f); } @@ -1490,14 +1495,14 @@ void ImGui::SeparatorTextEx(ImGuiID id, const char* label, const char* label_end const float separator_thickness = style.SeparatorTextBorderSize; const ImVec2 min_size(label_size.x + extra_w + padding.x * 2.0f, ImMax(label_size.y + padding.y * 2.0f, separator_thickness)); const ImRect bb(pos, ImVec2(window->WorkRect.Max.x, pos.y + min_size.y)); - const float text_baseline_y = ImFloor((bb.GetHeight() - label_size.y) * style.SeparatorTextAlign.y + 0.99999f); //ImMax(padding.y, ImFloor((style.SeparatorTextSize - label_size.y) * 0.5f)); + const float text_baseline_y = ImTrunc((bb.GetHeight() - label_size.y) * style.SeparatorTextAlign.y + 0.99999f); //ImMax(padding.y, ImTrunc((style.SeparatorTextSize - label_size.y) * 0.5f)); ItemSize(min_size, text_baseline_y); if (!ItemAdd(bb, id)) return; const float sep1_x1 = pos.x; const float sep2_x2 = bb.Max.x; - const float seps_y = ImFloor((bb.Min.y + bb.Max.y) * 0.5f + 0.99999f); + const float seps_y = ImTrunc((bb.Min.y + bb.Max.y) * 0.5f + 0.99999f); const float label_avail_w = ImMax(0.0f, sep2_x2 - sep1_x1 - padding.x * 2.0f); const ImVec2 label_pos(pos.x + padding.x + ImMax(0.0f, (label_avail_w - label_size.x - extra_w) * style.SeparatorTextAlign.x), pos.y + text_baseline_y); // FIXME-ALIGN @@ -1572,8 +1577,7 @@ bool ImGui::SplitterBehavior(const ImRect& bb, ImGuiID id, ImGuiAxis axis, float ImRect bb_render = bb; if (held) { - ImVec2 mouse_delta_2d = g.IO.MousePos - g.ActiveIdClickOffset - bb_interact.Min; - float mouse_delta = (axis == ImGuiAxis_Y) ? mouse_delta_2d.y : mouse_delta_2d.x; + float mouse_delta = (g.IO.MousePos - g.ActiveIdClickOffset - bb_interact.Min)[axis]; // Minimum pane size float size_1_maximum_delta = ImMax(0.0f, *size1 - min_size1); @@ -1586,12 +1590,8 @@ bool ImGui::SplitterBehavior(const ImRect& bb, ImGuiID id, ImGuiAxis axis, float // Apply resize if (mouse_delta != 0.0f) { - if (mouse_delta < 0.0f) - IM_ASSERT(*size1 + mouse_delta >= min_size1); - if (mouse_delta > 0.0f) - IM_ASSERT(*size2 - mouse_delta >= min_size2); - *size1 += mouse_delta; - *size2 -= mouse_delta; + *size1 = ImMax(*size1 + mouse_delta, min_size1); + *size2 = ImMax(*size2 - mouse_delta, min_size2); bb_render.Translate((axis == ImGuiAxis_X) ? ImVec2(mouse_delta, 0.0f) : ImVec2(0.0f, mouse_delta)); MarkItemEdited(id); } @@ -1645,7 +1645,7 @@ void ImGui::ShrinkWidths(ImGuiShrinkWidthItem* items, int count, float width_exc width_excess = 0.0f; for (int n = 0; n < count; n++) { - float width_rounded = ImFloor(items[n].Width); + float width_rounded = ImTrunc(items[n].Width); width_excess += items[n].Width - width_rounded; items[n].Width = width_rounded; } @@ -1691,10 +1691,13 @@ bool ImGui::BeginCombo(const char* label, const char* preview_value, ImGuiComboF const ImGuiStyle& style = g.Style; const ImGuiID id = window->GetID(label); IM_ASSERT((flags & (ImGuiComboFlags_NoArrowButton | ImGuiComboFlags_NoPreview)) != (ImGuiComboFlags_NoArrowButton | ImGuiComboFlags_NoPreview)); // Can't use both flags together + if (flags & ImGuiComboFlags_WidthFitPreview) + IM_ASSERT((flags & (ImGuiComboFlags_NoPreview | (ImGuiComboFlags)ImGuiComboFlags_CustomPreview)) == 0); const float arrow_size = (flags & ImGuiComboFlags_NoArrowButton) ? 0.0f : GetFrameHeight(); const ImVec2 label_size = CalcTextSize(label, NULL, true); - const float w = (flags & ImGuiComboFlags_NoPreview) ? arrow_size : CalcItemWidth(); + const float preview_width = ((flags & ImGuiComboFlags_WidthFitPreview) && (preview_value != NULL)) ? CalcTextSize(preview_value, NULL, true).x : 0.0f; + const float w = (flags & ImGuiComboFlags_NoPreview) ? arrow_size : ((flags & ImGuiComboFlags_WidthFitPreview) ? (arrow_size + preview_width + style.FramePadding.x * 2.0f) : CalcItemWidth()); const ImRect bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(w, label_size.y + style.FramePadding.y * 2.0f)); const ImRect total_bb(bb.Min, bb.Max + ImVec2(label_size.x > 0.0f ? style.ItemInnerSpacing.x + label_size.x : 0.0f, 0.0f)); ItemSize(total_bb, style.FramePadding.y); @@ -1787,7 +1790,7 @@ bool ImGui::BeginComboPopup(ImGuiID popup_id, const ImRect& bb, ImGuiComboFlags // This is essentially a specialized version of BeginPopupEx() char name[16]; - ImFormatString(name, IM_ARRAYSIZE(name), "##Combo_%02d", g.BeginPopupStack.Size); // Recycle windows based on depth + ImFormatString(name, IM_ARRAYSIZE(name), "##Combo_%02d", g.BeginComboDepth); // Recycle windows based on depth // Set position given a custom constraint (peak into expected window size so we can position it) // FIXME: This might be easier to express with an hypothetical SetNextWindowPosConstraints() function? @@ -1814,12 +1817,15 @@ bool ImGui::BeginComboPopup(ImGuiID popup_id, const ImRect& bb, ImGuiComboFlags IM_ASSERT(0); // This should never happen as we tested for IsPopupOpen() above return false; } + g.BeginComboDepth++; return true; } void ImGui::EndCombo() { + ImGuiContext& g = *GImGui; EndPopup(); + g.BeginComboDepth--; } // Call directly after the BeginCombo/EndCombo block. The preview is designed to only host non-interactive elements @@ -1995,7 +2001,7 @@ bool ImGui::Combo(const char* label, int* current_item, bool (*old_getter)(void* // - DataTypeGetInfo() // - DataTypeFormatString() // - DataTypeApplyOp() -// - DataTypeApplyOpFromText() +// - DataTypeApplyFromText() // - DataTypeCompare() // - DataTypeClamp() // - GetMinimumStepAtDecimalPrecision @@ -2442,14 +2448,13 @@ bool ImGui::DragScalar(const char* label, ImGuiDataType data_type, void* p_data, if (!temp_input_is_active) { // Tabbing or CTRL-clicking on Drag turns it into an InputText - const bool input_requested_by_tabbing = temp_input_allowed && (g.LastItemData.StatusFlags & ImGuiItemStatusFlags_FocusedByTabbing) != 0; const bool clicked = hovered && IsMouseClicked(0, id); const bool double_clicked = (hovered && g.IO.MouseClickedCount[0] == 2 && TestKeyOwner(ImGuiKey_MouseLeft, id)); - const bool make_active = (input_requested_by_tabbing || clicked || double_clicked || g.NavActivateId == id); + const bool make_active = (clicked || double_clicked || g.NavActivateId == id); if (make_active && (clicked || double_clicked)) SetKeyOwner(ImGuiKey_MouseLeft, id); if (make_active && temp_input_allowed) - if (input_requested_by_tabbing || (clicked && g.IO.KeyCtrl) || double_clicked || (g.NavActivateId == id && (g.NavActivateFlags & ImGuiActivateFlags_PreferInput))) + if ((clicked && g.IO.KeyCtrl) || double_clicked || (g.NavActivateId == id && (g.NavActivateFlags & ImGuiActivateFlags_PreferInput))) temp_input_is_active = true; // (Optional) simple click (without moving) turns Drag into an InputText @@ -3034,13 +3039,12 @@ bool ImGui::SliderScalar(const char* label, ImGuiDataType data_type, void* p_dat if (!temp_input_is_active) { // Tabbing or CTRL-clicking on Slider turns it into an input box - const bool input_requested_by_tabbing = temp_input_allowed && (g.LastItemData.StatusFlags & ImGuiItemStatusFlags_FocusedByTabbing) != 0; const bool clicked = hovered && IsMouseClicked(0, id); - const bool make_active = (input_requested_by_tabbing || clicked || g.NavActivateId == id); + const bool make_active = (clicked || g.NavActivateId == id); if (make_active && clicked) SetKeyOwner(ImGuiKey_MouseLeft, id); if (make_active && temp_input_allowed) - if (input_requested_by_tabbing || (clicked && g.IO.KeyCtrl) || (g.NavActivateId == id && (g.NavActivateFlags & ImGuiActivateFlags_PreferInput))) + if ((clicked && g.IO.KeyCtrl) || (g.NavActivateId == id && (g.NavActivateFlags & ImGuiActivateFlags_PreferInput))) temp_input_is_active = true; if (make_active && !temp_input_is_active) @@ -3412,14 +3416,6 @@ bool ImGui::TempInputText(const ImRect& bb, ImGuiID id, const char* label, char* return value_changed; } -static inline ImGuiInputTextFlags InputScalar_DefaultCharsFilter(ImGuiDataType data_type, const char* format) -{ - if (data_type == ImGuiDataType_Float || data_type == ImGuiDataType_Double) - return ImGuiInputTextFlags_CharsScientific; - const char format_last_char = format[0] ? format[strlen(format) - 1] : 0; - return (format_last_char == 'x' || format_last_char == 'X') ? ImGuiInputTextFlags_CharsHexadecimal : ImGuiInputTextFlags_CharsDecimal; -} - // Note that Drag/Slider functions are only forwarding the min/max values clamping values if the ImGuiSliderFlags_AlwaysClamp flag is set! // This is intended: this way we allow CTRL+Click manual input to set a value out of bounds, for maximum flexibility. // However this may not be ideal for all uses, as some user code may break on out of bound values. @@ -3436,8 +3432,7 @@ bool ImGui::TempInputScalar(const ImRect& bb, ImGuiID id, const char* label, ImG DataTypeFormatString(data_buf, IM_ARRAYSIZE(data_buf), data_type, p_data, format); ImStrTrimBlanks(data_buf); - ImGuiInputTextFlags flags = ImGuiInputTextFlags_AutoSelectAll | ImGuiInputTextFlags_NoMarkEdited; - flags |= InputScalar_DefaultCharsFilter(data_type, format); + ImGuiInputTextFlags flags = ImGuiInputTextFlags_AutoSelectAll | (ImGuiInputTextFlags)ImGuiInputTextFlags_NoMarkEdited; bool value_changed = false; if (TempInputText(bb, id, label, data_buf, IM_ARRAYSIZE(data_buf), flags)) @@ -3481,10 +3476,7 @@ bool ImGui::InputScalar(const char* label, ImGuiDataType data_type, void* p_data char buf[64]; DataTypeFormatString(buf, IM_ARRAYSIZE(buf), data_type, p_data, format); - // Testing ActiveId as a minor optimization as filtering is not needed until active - if (g.ActiveId == 0 && (flags & (ImGuiInputTextFlags_CharsDecimal | ImGuiInputTextFlags_CharsHexadecimal | ImGuiInputTextFlags_CharsScientific)) == 0) - flags |= InputScalar_DefaultCharsFilter(data_type, format); - flags |= ImGuiInputTextFlags_AutoSelectAll | ImGuiInputTextFlags_NoMarkEdited; // We call MarkItemEdited() ourselves by comparing the actual data rather than the string. + flags |= ImGuiInputTextFlags_AutoSelectAll | (ImGuiInputTextFlags)ImGuiInputTextFlags_NoMarkEdited; // We call MarkItemEdited() ourselves by comparing the actual data rather than the string. bool value_changed = false; if (p_step == NULL) @@ -3578,7 +3570,6 @@ bool ImGui::InputScalarN(const char* label, ImGuiDataType data_type, void* p_dat bool ImGui::InputFloat(const char* label, float* v, float step, float step_fast, const char* format, ImGuiInputTextFlags flags) { - flags |= ImGuiInputTextFlags_CharsScientific; return InputScalar(label, ImGuiDataType_Float, (void*)v, (void*)(step > 0.0f ? &step : NULL), (void*)(step_fast > 0.0f ? &step_fast : NULL), format, flags); } @@ -3621,7 +3612,6 @@ bool ImGui::InputInt4(const char* label, int v[4], ImGuiInputTextFlags flags) bool ImGui::InputDouble(const char* label, double* v, double step, double step_fast, const char* format, ImGuiInputTextFlags flags) { - flags |= ImGuiInputTextFlags_CharsScientific; return InputScalar(label, ImGuiDataType_Double, (void*)v, (void*)(step > 0.0 ? &step : NULL), (void*)(step_fast > 0.0 ? &step_fast : NULL), format, flags); } @@ -3720,7 +3710,7 @@ namespace ImStb static int STB_TEXTEDIT_STRINGLEN(const ImGuiInputTextState* obj) { return obj->CurLenW; } static ImWchar STB_TEXTEDIT_GETCHAR(const ImGuiInputTextState* obj, int idx) { IM_ASSERT(idx <= obj->CurLenW); return obj->TextW[idx]; } -static float STB_TEXTEDIT_GETWIDTH(ImGuiInputTextState* obj, int line_start_idx, int char_idx) { ImWchar c = obj->TextW[line_start_idx + char_idx]; if (c == '\n') return STB_TEXTEDIT_GETWIDTH_NEWLINE; ImGuiContext& g = *obj->Ctx; return g.Font->GetCharAdvance(c) * (g.FontSize / g.Font->FontSize); } +static float STB_TEXTEDIT_GETWIDTH(ImGuiInputTextState* obj, int line_start_idx, int char_idx) { ImWchar c = obj->TextW[line_start_idx + char_idx]; if (c == '\n') return IMSTB_TEXTEDIT_GETWIDTH_NEWLINE; ImGuiContext& g = *obj->Ctx; return g.Font->GetCharAdvance(c) * (g.FontSize / g.Font->FontSize); } static int STB_TEXTEDIT_KEYTOTEXT(int key) { return key >= 0x200000 ? 0 : key; } static ImWchar STB_TEXTEDIT_NEWLINE = '\n'; static void STB_TEXTEDIT_LAYOUTROW(StbTexteditRow* r, ImGuiInputTextState* obj, int line_start_idx) @@ -3838,13 +3828,13 @@ static bool STB_TEXTEDIT_INSERTCHARS(ImGuiInputTextState* obj, int pos, const Im #define STB_TEXTEDIT_K_PGDOWN 0x20000F // keyboard input to move cursor down a page #define STB_TEXTEDIT_K_SHIFT 0x400000 -#define STB_TEXTEDIT_IMPLEMENTATION -#define STB_TEXTEDIT_memmove memmove +#define IMSTB_TEXTEDIT_IMPLEMENTATION +#define IMSTB_TEXTEDIT_memmove memmove #include "imstb_textedit.h" // stb_textedit internally allows for a single undo record to do addition and deletion, but somehow, calling // the stb_textedit_paste() function creates two separate records, so we perform it manually. (FIXME: Report to nothings/stb?) -static void stb_textedit_replace(ImGuiInputTextState* str, STB_TexteditState* state, const STB_TEXTEDIT_CHARTYPE* text, int text_len) +static void stb_textedit_replace(ImGuiInputTextState* str, STB_TexteditState* state, const IMSTB_TEXTEDIT_CHARTYPE* text, int text_len) { stb_text_makeundo_replace(str, state, 0, str->CurLenW, text_len); ImStb::STB_TEXTEDIT_DELETECHARS(str, 0, str->CurLenW); @@ -3942,8 +3932,8 @@ static bool InputTextFilterCharacter(ImGuiContext* ctx, unsigned int* p_char, Im if (c < 0x20) { bool pass = false; - pass |= (c == '\n' && (flags & ImGuiInputTextFlags_Multiline)); // Note that an Enter KEY will emit \r and be ignored (we poll for KEY in InputText() code) - pass |= (c == '\t' && (flags & ImGuiInputTextFlags_AllowTabInput)); + pass |= (c == '\n') && (flags & ImGuiInputTextFlags_Multiline) != 0; // Note that an Enter KEY will emit \r and be ignored (we poll for KEY in InputText() code) + pass |= (c == '\t') && (flags & ImGuiInputTextFlags_AllowTabInput) != 0; if (!pass) return false; apply_named_filters = false; // Override named filters below so newline and tabs can still be inserted. @@ -4063,7 +4053,7 @@ static void InputTextReconcileUndoStateAfterUserCallback(ImGuiInputTextState* st const int insert_len = new_last_diff - first_diff + 1; const int delete_len = old_last_diff - first_diff + 1; if (insert_len > 0 || delete_len > 0) - if (STB_TEXTEDIT_CHARTYPE* p = stb_text_createundo(&state->Stb.undostate, first_diff, delete_len, insert_len)) + if (IMSTB_TEXTEDIT_CHARTYPE* p = stb_text_createundo(&state->Stb.undostate, first_diff, delete_len, insert_len)) for (int i = 0; i < delete_len; i++) p[i] = ImStb::STB_TEXTEDIT_GETCHAR(state, first_diff + i); } @@ -4115,12 +4105,6 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_ const bool RENDER_SELECTION_WHEN_INACTIVE = false; const bool is_multiline = (flags & ImGuiInputTextFlags_Multiline) != 0; - const bool is_readonly = (flags & ImGuiInputTextFlags_ReadOnly) != 0; - const bool is_password = (flags & ImGuiInputTextFlags_Password) != 0; - const bool is_undoable = (flags & ImGuiInputTextFlags_NoUndoRedo) == 0; - const bool is_resizable = (flags & ImGuiInputTextFlags_CallbackResize) != 0; - if (is_resizable) - IM_ASSERT(callback != NULL); // Must provide a callback if you set the ImGuiInputTextFlags_CallbackResize flag! if (is_multiline) // Open group before calling GetID() because groups tracks id created within their scope (including the scrollbar) BeginGroup(); @@ -4134,7 +4118,6 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_ ImGuiWindow* draw_window = window; ImVec2 inner_size = frame_size; - ImGuiItemStatusFlags item_status_flags = 0; ImGuiLastItemData item_data_backup; if (is_multiline) { @@ -4145,11 +4128,14 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_ EndGroup(); return false; } - item_status_flags = g.LastItemData.StatusFlags; item_data_backup = g.LastItemData; window->DC.CursorPos = backup_pos; - // Prevent NavActivate reactivating in BeginChild(). + // Prevent NavActivation from Tabbing when our widget accepts Tab inputs: this allows cycling through widgets without stopping. + if (g.NavActivateId == id && (g.NavActivateFlags & ImGuiActivateFlags_FromTabbing) && (flags & ImGuiInputTextFlags_AllowTabInput)) + g.NavActivateId = 0; + + // Prevent NavActivate reactivating in BeginChild() when we are already active. const ImGuiID backup_activate_id = g.NavActivateId; if (g.ActiveId == id) // Prevent reactivation g.NavActivateId = 0; @@ -4181,7 +4167,6 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_ if (!(flags & ImGuiInputTextFlags_MergedItem)) if (!ItemAdd(total_bb, id, &frame_bb, ImGuiItemFlags_Inputable)) return false; - item_status_flags = g.LastItemData.StatusFlags; } const bool hovered = ItemHoverable(frame_bb, id, g.LastItemData.InFlags); if (hovered) @@ -4190,7 +4175,15 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_ // We are only allowed to access the state if we are already the active widget. ImGuiInputTextState* state = GetInputTextState(id); - const bool input_requested_by_tabbing = (item_status_flags & ImGuiItemStatusFlags_FocusedByTabbing) != 0; + if (g.LastItemData.InFlags & ImGuiItemFlags_ReadOnly) + flags |= ImGuiInputTextFlags_ReadOnly; + const bool is_readonly = (flags & ImGuiInputTextFlags_ReadOnly) != 0; + const bool is_password = (flags & ImGuiInputTextFlags_Password) != 0; + const bool is_undoable = (flags & ImGuiInputTextFlags_NoUndoRedo) == 0; + const bool is_resizable = (flags & ImGuiInputTextFlags_CallbackResize) != 0; + if (is_resizable) + IM_ASSERT(callback != NULL); // Must provide a callback if you set the ImGuiInputTextFlags_CallbackResize flag! + const bool input_requested_by_nav = (g.ActiveId != id) && ((g.NavActivateId == id) && ((g.NavActivateFlags & ImGuiActivateFlags_PreferInput) || (g.NavInputSource == ImGuiInputSource_Keyboard))); const bool user_clicked = hovered && io.MouseClicked[0]; @@ -4201,27 +4194,32 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_ float scroll_y = is_multiline ? draw_window->Scroll.y : FLT_MAX; + const bool init_reload_from_user_buf = (state != NULL && state->ReloadUserBuf); const bool init_changed_specs = (state != NULL && state->Stb.single_line != !is_multiline); // state != NULL means its our state. - const bool init_make_active = (user_clicked || user_scroll_finish || input_requested_by_nav || input_requested_by_tabbing); + const bool init_make_active = (user_clicked || user_scroll_finish || input_requested_by_nav); const bool init_state = (init_make_active || user_scroll_active); - if ((init_state && g.ActiveId != id) || init_changed_specs) + if ((init_state && g.ActiveId != id) || init_changed_specs || init_reload_from_user_buf) { // Access state even if we don't own it yet. state = &g.InputTextState; state->CursorAnimReset(); + state->ReloadUserBuf = false; // Backup state of deactivating item so they'll have a chance to do a write to output buffer on the same frame they report IsItemDeactivatedAfterEdit (#4714) InputTextDeactivateHook(state->ID); - // Take a copy of the initial buffer value (both in original UTF-8 format and converted to wchar) - // From the moment we focused we are ignoring the content of 'buf' (unless we are in read-only mode) + // From the moment we focused we are normally ignoring the content of 'buf' (unless we are in read-only mode) const int buf_len = (int)strlen(buf); - state->InitialTextA.resize(buf_len + 1); // UTF-8. we use +1 to make sure that .Data is always pointing to at least an empty string. - memcpy(state->InitialTextA.Data, buf, buf_len + 1); + if (!init_reload_from_user_buf) + { + // Take a copy of the initial buffer value. + state->InitialTextA.resize(buf_len + 1); // UTF-8. we use +1 to make sure that .Data is always pointing to at least an empty string. + memcpy(state->InitialTextA.Data, buf, buf_len + 1); + } // Preserve cursor position and undo/redo stack if we come back to same widget - // FIXME: Since we reworked this on 2022/06, may want to differenciate recycle_cursor vs recycle_undostate? - bool recycle_state = (state->ID == id && !init_changed_specs); + // FIXME: Since we reworked this on 2022/06, may want to differentiate recycle_cursor vs recycle_undostate? + bool recycle_state = (state->ID == id && !init_changed_specs && !init_reload_from_user_buf); if (recycle_state && (state->CurLenA != buf_len || (state->TextAIsValid && strncmp(state->TextA.Data, buf, buf_len) != 0))) recycle_state = false; @@ -4246,13 +4244,19 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_ stb_textedit_initialize_state(&state->Stb, !is_multiline); } - if (!is_multiline) + if (init_reload_from_user_buf) + { + state->Stb.select_start = state->ReloadSelectionStart; + state->Stb.cursor = state->Stb.select_end = state->ReloadSelectionEnd; + state->CursorClamp(); + } + else if (!is_multiline) { if (flags & ImGuiInputTextFlags_AutoSelectAll) select_all = true; if (input_requested_by_nav && (!recycle_state || !(g.NavActivateFlags & ImGuiActivateFlags_TryToPreserveState))) select_all = true; - if (input_requested_by_tabbing || (user_clicked && io.KeyCtrl)) + if (user_clicked && io.KeyCtrl) select_all = true; } @@ -4276,6 +4280,8 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_ g.ActiveIdUsingNavDirMask |= (1 << ImGuiDir_Left) | (1 << ImGuiDir_Right); if (is_multiline || (flags & ImGuiInputTextFlags_CallbackHistory)) g.ActiveIdUsingNavDirMask |= (1 << ImGuiDir_Up) | (1 << ImGuiDir_Down); + SetKeyOwner(ImGuiKey_Enter, id); + SetKeyOwner(ImGuiKey_KeypadEnter, id); SetKeyOwner(ImGuiKey_Home, id); SetKeyOwner(ImGuiKey_End, id); if (is_multiline) @@ -4285,8 +4291,6 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_ } if (is_osx) SetKeyOwner(ImGuiMod_Alt, id); - if (flags & (ImGuiInputTextFlags_CallbackCompletion | ImGuiInputTextFlags_AllowTabInput)) // Disable keyboard tabbing out as we will use the \t character. - SetShortcutRouting(ImGuiKey_Tab, id); } // We have an edge case if ActiveId was set through another widget (e.g. widget being swapped), clear id immediately (don't wait until the end of the function) @@ -4415,11 +4419,20 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_ // We expect backends to emit a Tab key but some also emit a Tab character which we ignore (#2467, #1336) // (For Tab and Enter: Win32/SFML/Allegro are sending both keys and chars, GLFW and SDL are only sending keys. For Space they all send all threes) - if ((flags & ImGuiInputTextFlags_AllowTabInput) && Shortcut(ImGuiKey_Tab, id) && !is_readonly) + if ((flags & ImGuiInputTextFlags_AllowTabInput) && !is_readonly) { - unsigned int c = '\t'; // Insert TAB - if (InputTextFilterCharacter(&g, &c, flags, callback, callback_user_data, ImGuiInputSource_Keyboard)) - state->OnKeyPressed((int)c); + if (Shortcut(ImGuiKey_Tab, id, ImGuiInputFlags_Repeat)) + { + unsigned int c = '\t'; // Insert TAB + if (InputTextFilterCharacter(&g, &c, flags, callback, callback_user_data, ImGuiInputSource_Keyboard)) + state->OnKeyPressed((int)c); + } + // FIXME: Implement Shift+Tab + /* + if (Shortcut(ImGuiKey_Tab | ImGuiMod_Shift, id, ImGuiInputFlags_Repeat)) + { + } + */ } // Process regular text input (before we check for Return because using some IME will effectively send a Return?) @@ -4617,7 +4630,7 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_ apply_new_text = ""; apply_new_text_length = 0; value_changed = true; - STB_TEXTEDIT_CHARTYPE empty_string; + IMSTB_TEXTEDIT_CHARTYPE empty_string; stb_textedit_replace(state, &state->Stb, &empty_string, 0); } else if (strcmp(buf, state->InitialTextA.Data) != 0) @@ -4726,7 +4739,7 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_ if (callback_data.SelectionEnd != utf8_selection_end || buf_dirty) { state->Stb.select_end = (callback_data.SelectionEnd == callback_data.SelectionStart) ? state->Stb.select_start : ImTextCountCharsFromUtf8(callback_data.Buf, callback_data.Buf + callback_data.SelectionEnd); } if (buf_dirty) { - IM_ASSERT((flags & ImGuiInputTextFlags_ReadOnly) == 0); + IM_ASSERT(!is_readonly); IM_ASSERT(callback_data.BufTextLen == (int)strlen(callback_data.Buf)); // You need to maintain BufTextLen if you change the text! InputTextReconcileUndoStateAfterUserCallback(state, callback_data.Buf, callback_data.BufTextLen); // FIXME: Move the rest of this block inside function and rename to InputTextReconcileStateAfterUserCallback() ? if (callback_data.BufTextLen > backup_current_text_length && is_resizable) @@ -4897,9 +4910,9 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_ const float scroll_increment_x = inner_size.x * 0.25f; const float visible_width = inner_size.x - style.FramePadding.x; if (cursor_offset.x < state->ScrollX) - state->ScrollX = IM_FLOOR(ImMax(0.0f, cursor_offset.x - scroll_increment_x)); + state->ScrollX = IM_TRUNC(ImMax(0.0f, cursor_offset.x - scroll_increment_x)); else if (cursor_offset.x - visible_width >= state->ScrollX) - state->ScrollX = IM_FLOOR(cursor_offset.x - visible_width + scroll_increment_x); + state->ScrollX = IM_TRUNC(cursor_offset.x - visible_width + scroll_increment_x); } else { @@ -4949,7 +4962,7 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_ else { ImVec2 rect_size = InputTextCalcTextSizeW(&g, p, text_selected_end, &p, NULL, true); - if (rect_size.x <= 0.0f) rect_size.x = IM_FLOOR(g.Font->GetCharAdvance((ImWchar)' ') * 0.50f); // So we can see selected empty lines + if (rect_size.x <= 0.0f) rect_size.x = IM_TRUNC(g.Font->GetCharAdvance((ImWchar)' ') * 0.50f); // So we can see selected empty lines ImRect rect(rect_pos + ImVec2(0.0f, bg_offy_up - g.FontSize), rect_pos + ImVec2(rect_size.x, bg_offy_dn)); rect.ClipWith(clip_rect); if (rect.Overlaps(clip_rect)) @@ -4972,7 +4985,7 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_ { state->CursorAnim += io.DeltaTime; bool cursor_is_visible = (!g.IO.ConfigInputTextCursorBlink) || (state->CursorAnim <= 0.0f) || ImFmod(state->CursorAnim, 1.20f) <= 0.80f; - ImVec2 cursor_screen_pos = ImFloor(draw_pos + cursor_offset - draw_scroll); + ImVec2 cursor_screen_pos = ImTrunc(draw_pos + cursor_offset - draw_scroll); ImRect cursor_screen_rect(cursor_screen_pos.x, cursor_screen_pos.y - g.FontSize + 0.5f, cursor_screen_pos.x + 1.0f, cursor_screen_pos.y - 1.5f); if (cursor_is_visible && cursor_screen_rect.Overlaps(clip_rect)) draw_window->DrawList->AddLine(cursor_screen_rect.Min, cursor_screen_rect.GetBL(), GetColorU32(ImGuiCol_Text)); @@ -5057,10 +5070,10 @@ void ImGui::DebugNodeInputTextState(ImGuiInputTextState* state) Text("CurLenW: %d, CurLenA: %d, Cursor: %d, Selection: %d..%d", state->CurLenW, state->CurLenA, stb_state->cursor, stb_state->select_start, stb_state->select_end); Text("has_preferred_x: %d (%.2f)", stb_state->has_preferred_x, stb_state->preferred_x); Text("undo_point: %d, redo_point: %d, undo_char_point: %d, redo_char_point: %d", undo_state->undo_point, undo_state->redo_point, undo_state->undo_char_point, undo_state->redo_char_point); - if (BeginChild("undopoints", ImVec2(0.0f, GetTextLineHeight() * 15), true)) // Visualize undo state + if (BeginChild("undopoints", ImVec2(0.0f, GetTextLineHeight() * 10), ImGuiChildFlags_Border | ImGuiChildFlags_ResizeY)) // Visualize undo state { PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(0, 0)); - for (int n = 0; n < STB_TEXTEDIT_UNDOSTATECOUNT; n++) + for (int n = 0; n < IMSTB_TEXTEDIT_UNDOSTATECOUNT; n++) { ImStb::StbUndoRecord* undo_rec = &undo_state->undo_rec[n]; const char undo_rec_type = (n < undo_state->undo_point) ? 'u' : (n >= undo_state->redo_point) ? 'r' : ' '; @@ -5142,10 +5155,8 @@ bool ImGui::ColorEdit4(const char* label, float col[4], ImGuiColorEditFlags flag ImGuiContext& g = *GImGui; const ImGuiStyle& style = g.Style; const float square_sz = GetFrameHeight(); - const float w_full = CalcItemWidth(); - const float w_button = (flags & ImGuiColorEditFlags_NoSmallPreview) ? 0.0f : (square_sz + style.ItemInnerSpacing.x); - const float w_inputs = w_full - w_button; const char* label_display_end = FindRenderedTextEnd(label); + float w_full = CalcItemWidth(); g.NextItemData.ClearFlags(); BeginGroup(); @@ -5179,6 +5190,9 @@ bool ImGui::ColorEdit4(const char* label, float col[4], ImGuiColorEditFlags flag const bool alpha = (flags & ImGuiColorEditFlags_NoAlpha) == 0; const bool hdr = (flags & ImGuiColorEditFlags_HDR) != 0; const int components = alpha ? 4 : 3; + const float w_button = (flags & ImGuiColorEditFlags_NoSmallPreview) ? 0.0f : (square_sz + style.ItemInnerSpacing.x); + const float w_inputs = ImMax(w_full - w_button, 1.0f); + w_full = w_inputs + w_button; // Convert to the formats we need float f[4] = { col[0], col[1], col[2], alpha ? col[3] : 1.0f }; @@ -5202,10 +5216,9 @@ bool ImGui::ColorEdit4(const char* label, float col[4], ImGuiColorEditFlags flag if ((flags & (ImGuiColorEditFlags_DisplayRGB | ImGuiColorEditFlags_DisplayHSV)) != 0 && (flags & ImGuiColorEditFlags_NoInputs) == 0) { // RGB/HSV 0..255 Sliders - const float w_item_one = ImMax(1.0f, IM_FLOOR((w_inputs - (style.ItemInnerSpacing.x) * (components - 1)) / (float)components)); - const float w_item_last = ImMax(1.0f, IM_FLOOR(w_inputs - (w_item_one + style.ItemInnerSpacing.x) * (components - 1))); + const float w_items = w_inputs - style.ItemInnerSpacing.x * (components - 1); - const bool hide_prefix = (w_item_one <= CalcTextSize((flags & ImGuiColorEditFlags_Float) ? "M:0.000" : "M:000").x); + const bool hide_prefix = (IM_TRUNC(w_items / components) <= CalcTextSize((flags & ImGuiColorEditFlags_Float) ? "M:0.000" : "M:000").x); static const char* ids[4] = { "##X", "##Y", "##Z", "##W" }; static const char* fmt_table_int[3][4] = { @@ -5221,11 +5234,14 @@ bool ImGui::ColorEdit4(const char* label, float col[4], ImGuiColorEditFlags flag }; const int fmt_idx = hide_prefix ? 0 : (flags & ImGuiColorEditFlags_DisplayHSV) ? 2 : 1; + float prev_split = 0.0f; for (int n = 0; n < components; n++) { if (n > 0) SameLine(0, style.ItemInnerSpacing.x); - SetNextItemWidth((n + 1 < components) ? w_item_one : w_item_last); + float next_split = IM_TRUNC(w_items * (n + 1) / components); + SetNextItemWidth(ImMax(next_split - prev_split, 1.0f)); + prev_split = next_split; // FIXME: When ImGuiColorEditFlags_HDR flag is passed HS values snap in weird ways when SV values go below 0. if (flags & ImGuiColorEditFlags_Float) @@ -5250,7 +5266,7 @@ bool ImGui::ColorEdit4(const char* label, float col[4], ImGuiColorEditFlags flag else ImFormatString(buf, IM_ARRAYSIZE(buf), "#%02X%02X%02X", ImClamp(i[0], 0, 255), ImClamp(i[1], 0, 255), ImClamp(i[2], 0, 255)); SetNextItemWidth(w_inputs); - if (InputText("##Text", buf, IM_ARRAYSIZE(buf), ImGuiInputTextFlags_CharsHexadecimal | ImGuiInputTextFlags_CharsUppercase)) + if (InputText("##Text", buf, IM_ARRAYSIZE(buf), ImGuiInputTextFlags_CharsUppercase)) { value_changed = true; char* p = buf; @@ -5348,7 +5364,7 @@ bool ImGui::ColorEdit4(const char* label, float col[4], ImGuiColorEditFlags flag // Drag and Drop Target // NB: The flag test is merely an optional micro-optimization, BeginDragDropTarget() does the same test. - if ((g.LastItemData.StatusFlags & ImGuiItemStatusFlags_HoveredRect) && !(flags & ImGuiColorEditFlags_NoDragDrop) && BeginDragDropTarget()) + if ((g.LastItemData.StatusFlags & ImGuiItemStatusFlags_HoveredRect) && !(g.LastItemData.InFlags & ImGuiItemFlags_ReadOnly) && !(flags & ImGuiColorEditFlags_NoDragDrop) && BeginDragDropTarget()) { bool accepted_drag_drop = false; if (const ImGuiPayload* payload = AcceptDragDropPayload(IMGUI_PAYLOAD_TYPE_COLOR_3F)) @@ -5413,6 +5429,7 @@ bool ImGui::ColorPicker4(const char* label, float col[4], ImGuiColorEditFlags fl ImGuiIO& io = g.IO; const float width = CalcItemWidth(); + const bool is_readonly = ((g.NextItemData.ItemFlags | g.CurrentItemFlags) & ImGuiItemFlags_ReadOnly) != 0; g.NextItemData.ClearFlags(); PushID(label); @@ -5447,7 +5464,7 @@ bool ImGui::ColorPicker4(const char* label, float col[4], ImGuiColorEditFlags fl float sv_picker_size = ImMax(bars_width * 1, width - (alpha_bar ? 2 : 1) * (bars_width + style.ItemInnerSpacing.x)); // Saturation/Value picking box float bar0_pos_x = picker_pos.x + sv_picker_size + style.ItemInnerSpacing.x; float bar1_pos_x = bar0_pos_x + bars_width + style.ItemInnerSpacing.x; - float bars_triangles_half_sz = IM_FLOOR(bars_width * 0.20f); + float bars_triangles_half_sz = IM_TRUNC(bars_width * 0.20f); float backup_initial_col[4]; memcpy(backup_initial_col, col, components * sizeof(float)); @@ -5483,7 +5500,7 @@ bool ImGui::ColorPicker4(const char* label, float col[4], ImGuiColorEditFlags fl { // Hue wheel + SV triangle logic InvisibleButton("hsv", ImVec2(sv_picker_size + style.ItemInnerSpacing.x + bars_width, sv_picker_size)); - if (IsItemActive()) + if (IsItemActive() && !is_readonly) { ImVec2 initial_off = g.IO.MouseClickedPos[0] - wheel_center; ImVec2 current_off = g.IO.MousePos - wheel_center; @@ -5518,7 +5535,7 @@ bool ImGui::ColorPicker4(const char* label, float col[4], ImGuiColorEditFlags fl { // SV rectangle logic InvisibleButton("sv", ImVec2(sv_picker_size, sv_picker_size)); - if (IsItemActive()) + if (IsItemActive() && !is_readonly) { S = ImSaturate((io.MousePos.x - picker_pos.x) / (sv_picker_size - 1)); V = 1.0f - ImSaturate((io.MousePos.y - picker_pos.y) / (sv_picker_size - 1)); @@ -5531,7 +5548,7 @@ bool ImGui::ColorPicker4(const char* label, float col[4], ImGuiColorEditFlags fl // Hue bar logic SetCursorScreenPos(ImVec2(bar0_pos_x, picker_pos.y)); InvisibleButton("hue", ImVec2(bars_width, sv_picker_size)); - if (IsItemActive()) + if (IsItemActive() && !is_readonly) { H = ImSaturate((io.MousePos.y - picker_pos.y) / (sv_picker_size - 1)); value_changed = value_changed_h = true; @@ -5615,7 +5632,7 @@ bool ImGui::ColorPicker4(const char* label, float col[4], ImGuiColorEditFlags fl if ((flags & ImGuiColorEditFlags_NoInputs) == 0) { PushItemWidth((alpha_bar ? bar1_pos_x : bar0_pos_x) + bars_width - picker_pos.x); - ImGuiColorEditFlags sub_flags_to_forward = ImGuiColorEditFlags_DataTypeMask_ | ImGuiColorEditFlags_InputMask_ | ImGuiColorEditFlags_HDR | ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_NoOptions | ImGuiColorEditFlags_NoSmallPreview | ImGuiColorEditFlags_AlphaPreview | ImGuiColorEditFlags_AlphaPreviewHalf; + ImGuiColorEditFlags sub_flags_to_forward = ImGuiColorEditFlags_DataTypeMask_ | ImGuiColorEditFlags_InputMask_ | ImGuiColorEditFlags_HDR | ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_NoOptions | ImGuiColorEditFlags_NoTooltip | ImGuiColorEditFlags_NoSmallPreview | ImGuiColorEditFlags_AlphaPreview | ImGuiColorEditFlags_AlphaPreviewHalf; ImGuiColorEditFlags sub_flags = (flags & sub_flags_to_forward) | ImGuiColorEditFlags_NoPicker; if (flags & ImGuiColorEditFlags_DisplayRGB || (flags & ImGuiColorEditFlags_DisplayMask_) == 0) if (ColorEdit4("##rgb", col, sub_flags | ImGuiColorEditFlags_DisplayRGB)) @@ -5737,7 +5754,7 @@ bool ImGui::ColorPicker4(const char* label, float col[4], ImGuiColorEditFlags fl } // Render cursor/preview circle (clamp S/V within 0..1 range because floating points colors may lead HSV values to be out of range) - float sv_cursor_rad = value_changed_sv ? 10.0f : 6.0f; + float sv_cursor_rad = value_changed_sv ? wheel_thickness * 0.55f : wheel_thickness * 0.40f; int sv_cursor_segments = draw_list->_CalcCircleAutoSegmentCount(sv_cursor_rad); // Lock segment count so the +1 one matches others. draw_list->AddCircleFilled(sv_cursor_pos, sv_cursor_rad, user_col32_striped_of_alpha, sv_cursor_segments); draw_list->AddCircle(sv_cursor_pos, sv_cursor_rad + 1, col_midgrey, sv_cursor_segments); @@ -6171,36 +6188,52 @@ bool ImGui::TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* l // We vertically grow up to current line height up the typical widget height. const float frame_height = ImMax(ImMin(window->DC.CurrLineSize.y, g.FontSize + style.FramePadding.y * 2), label_size.y + padding.y * 2); + const bool span_all_columns = (flags & ImGuiTreeNodeFlags_SpanAllColumns) != 0 && (g.CurrentTable != NULL); ImRect frame_bb; - frame_bb.Min.x = (flags & ImGuiTreeNodeFlags_SpanFullWidth) ? window->WorkRect.Min.x : window->DC.CursorPos.x; + frame_bb.Min.x = span_all_columns ? window->ParentWorkRect.Min.x : (flags & ImGuiTreeNodeFlags_SpanFullWidth) ? window->WorkRect.Min.x : window->DC.CursorPos.x; frame_bb.Min.y = window->DC.CursorPos.y; - frame_bb.Max.x = window->WorkRect.Max.x; + frame_bb.Max.x = span_all_columns ? window->ParentWorkRect.Max.x : window->WorkRect.Max.x; frame_bb.Max.y = window->DC.CursorPos.y + frame_height; if (display_frame) { // Framed header expand a little outside the default padding, to the edge of InnerClipRect // (FIXME: May remove this at some point and make InnerClipRect align with WindowPadding.x instead of WindowPadding.x*0.5f) - frame_bb.Min.x -= IM_FLOOR(window->WindowPadding.x * 0.5f - 1.0f); - frame_bb.Max.x += IM_FLOOR(window->WindowPadding.x * 0.5f); + frame_bb.Min.x -= IM_TRUNC(window->WindowPadding.x * 0.5f - 1.0f); + frame_bb.Max.x += IM_TRUNC(window->WindowPadding.x * 0.5f); } - const float text_offset_x = g.FontSize + (display_frame ? padding.x * 3 : padding.x * 2); // Collapser arrow width + Spacing + const float text_offset_x = g.FontSize + (display_frame ? padding.x * 3 : padding.x * 2); // Collapsing arrow width + Spacing const float text_offset_y = ImMax(padding.y, window->DC.CurrLineTextBaseOffset); // Latch before ItemSize changes it - const float text_width = g.FontSize + (label_size.x > 0.0f ? label_size.x + padding.x * 2 : 0.0f); // Include collapser + const float text_width = g.FontSize + (label_size.x > 0.0f ? label_size.x + padding.x * 2 : 0.0f); // Include collapsing ImVec2 text_pos(window->DC.CursorPos.x + text_offset_x, window->DC.CursorPos.y + text_offset_y); ItemSize(ImVec2(text_width, frame_height), padding.y); // For regular tree nodes, we arbitrary allow to click past 2 worth of ItemSpacing ImRect interact_bb = frame_bb; - if (!display_frame && (flags & (ImGuiTreeNodeFlags_SpanAvailWidth | ImGuiTreeNodeFlags_SpanFullWidth)) == 0) + if (!display_frame && (flags & (ImGuiTreeNodeFlags_SpanAvailWidth | ImGuiTreeNodeFlags_SpanFullWidth | ImGuiTreeNodeFlags_SpanAllColumns)) == 0) interact_bb.Max.x = frame_bb.Min.x + text_width + style.ItemSpacing.x * 2.0f; + // Modify ClipRect for the ItemAdd(), faster than doing a PushColumnsBackground/PushTableBackgroundChannel for every Selectable.. + const float backup_clip_rect_min_x = window->ClipRect.Min.x; + const float backup_clip_rect_max_x = window->ClipRect.Max.x; + if (span_all_columns) + { + window->ClipRect.Min.x = window->ParentWorkRect.Min.x; + window->ClipRect.Max.x = window->ParentWorkRect.Max.x; + } + // Compute open and multi-select states before ItemAdd() as it clear NextItem data. bool is_open = TreeNodeUpdateNextOpen(id, flags); bool item_add = ItemAdd(interact_bb, id); g.LastItemData.StatusFlags |= ImGuiItemStatusFlags_HasDisplayRect; g.LastItemData.DisplayRect = frame_bb; + if (span_all_columns) + { + window->ClipRect.Min.x = backup_clip_rect_min_x; + window->ClipRect.Max.x = backup_clip_rect_max_x; + } + // If a NavLeft request is happening and ImGuiTreeNodeFlags_NavLeftJumpsBackHere enabled: // Store data for the current depth to allow returning to this node from any child item. // For this purpose we essentially compare if g.NavIdIsAlive went from 0 to 1 between TreeNode() and TreePop(). @@ -6226,6 +6259,13 @@ bool ImGui::TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* l return is_open; } + if (span_all_columns) + { + TablePushBackgroundChannel(); + g.LastItemData.StatusFlags |= ImGuiItemStatusFlags_HasClipRect; + g.LastItemData.ClipRect = window->ClipRect; + } + ImGuiButtonFlags button_flags = ImGuiTreeNodeFlags_None; if ((flags & ImGuiTreeNodeFlags_AllowOverlap) || (g.LastItemData.InFlags & ImGuiItemFlags_AllowOverlap)) button_flags |= ImGuiButtonFlags_AllowOverlap; @@ -6308,7 +6348,7 @@ bool ImGui::TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* l // Render const ImU32 text_col = GetColorU32(ImGuiCol_Text); - ImGuiNavHighlightFlags nav_highlight_flags = ImGuiNavHighlightFlags_TypeThin; + ImGuiNavHighlightFlags nav_highlight_flags = ImGuiNavHighlightFlags_Compact; if (display_frame) { // Framed type @@ -6326,7 +6366,6 @@ bool ImGui::TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* l if (g.LogEnabled) LogSetNextTextDecoration("###", "###"); - RenderTextClipped(text_pos, frame_bb.Max, label, label_end, &label_size); } else { @@ -6343,9 +6382,17 @@ bool ImGui::TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* l RenderArrow(window->DrawList, ImVec2(text_pos.x - text_offset_x + padding.x, text_pos.y + g.FontSize * 0.15f), text_col, is_open ? ((flags & ImGuiTreeNodeFlags_UpsideDownArrow) ? ImGuiDir_Up : ImGuiDir_Down) : ImGuiDir_Right, 0.70f); if (g.LogEnabled) LogSetNextTextDecoration(">", NULL); - RenderText(text_pos, label, label_end, false); } + if (span_all_columns) + TablePopBackgroundChannel(); + + // Label + if (display_frame) + RenderTextClipped(text_pos, frame_bb.Max, label, label_end, &label_size); + else + RenderText(text_pos, label, label_end, false); + if (is_open && !(flags & ImGuiTreeNodeFlags_NoTreePushOnOpen)) TreePushOverrideID(id); IMGUI_TEST_ENGINE_ITEM_INFO(id, label, g.LastItemData.StatusFlags | (is_leaf ? 0 : ImGuiItemStatusFlags_Openable) | (is_open ? ImGuiItemStatusFlags_Opened : 0)); @@ -6446,7 +6493,7 @@ bool ImGui::CollapsingHeader(const char* label, bool* p_visible, ImGuiTreeNodeFl ImGuiID id = window->GetID(label); flags |= ImGuiTreeNodeFlags_CollapsingHeader; if (p_visible) - flags |= ImGuiTreeNodeFlags_AllowOverlap | ImGuiTreeNodeFlags_ClipLabelForTrailingButton; + flags |= ImGuiTreeNodeFlags_AllowOverlap | (ImGuiTreeNodeFlags)ImGuiTreeNodeFlags_ClipLabelForTrailingButton; bool is_open = TreeNodeBehavior(id, flags, label); if (p_visible != NULL) { @@ -6512,8 +6559,8 @@ bool ImGui::Selectable(const char* label, bool selected, ImGuiSelectableFlags fl { const float spacing_x = span_all_columns ? 0.0f : style.ItemSpacing.x; const float spacing_y = style.ItemSpacing.y; - const float spacing_L = IM_FLOOR(spacing_x * 0.50f); - const float spacing_U = IM_FLOOR(spacing_y * 0.50f); + const float spacing_L = IM_TRUNC(spacing_x * 0.50f); + const float spacing_U = IM_TRUNC(spacing_y * 0.50f); bb.Min.x -= spacing_L; bb.Min.y -= spacing_U; bb.Max.x += (spacing_x - spacing_L); @@ -6521,7 +6568,7 @@ bool ImGui::Selectable(const char* label, bool selected, ImGuiSelectableFlags fl } //if (g.IO.KeyCtrl) { GetForegroundDrawList()->AddRect(bb.Min, bb.Max, IM_COL32(0, 255, 0, 255)); } - // Modify ClipRect for the ItemAdd(), faster than doing a PushColumnsBackground/PushTableBackground for every Selectable.. + // Modify ClipRect for the ItemAdd(), faster than doing a PushColumnsBackground/PushTableBackgroundChannel for every Selectable.. const float backup_clip_rect_min_x = window->ClipRect.Min.x; const float backup_clip_rect_max_x = window->ClipRect.Max.x; if (span_all_columns) @@ -6547,10 +6594,15 @@ bool ImGui::Selectable(const char* label, bool selected, ImGuiSelectableFlags fl // FIXME: We can standardize the behavior of those two, we could also keep the fast path of override ClipRect + full push on render only, // which would be advantageous since most selectable are not selected. - if (span_all_columns && window->DC.CurrentColumns) - PushColumnsBackground(); - else if (span_all_columns && g.CurrentTable) - TablePushBackgroundChannel(); + if (span_all_columns) + { + if (g.CurrentTable) + TablePushBackgroundChannel(); + else if (window->DC.CurrentColumns) + PushColumnsBackground(); + g.LastItemData.StatusFlags |= ImGuiItemStatusFlags_HasClipRect; + g.LastItemData.ClipRect = window->ClipRect; + } // We use NoHoldingActiveID on menus so user can click and _hold_ on a menu then drag to browse child entries ImGuiButtonFlags button_flags = 0; @@ -6599,12 +6651,15 @@ bool ImGui::Selectable(const char* label, bool selected, ImGuiSelectableFlags fl RenderFrame(bb.Min, bb.Max, col, false, 0.0f); } if (g.NavId == id) - RenderNavHighlight(bb, id, ImGuiNavHighlightFlags_TypeThin | ImGuiNavHighlightFlags_NoRounding); + RenderNavHighlight(bb, id, ImGuiNavHighlightFlags_Compact | ImGuiNavHighlightFlags_NoRounding); - if (span_all_columns && window->DC.CurrentColumns) - PopColumnsBackground(); - else if (span_all_columns && g.CurrentTable) - TablePopBackgroundChannel(); + if (span_all_columns) + { + if (g.CurrentTable) + TablePopBackgroundChannel(); + else if (window->DC.CurrentColumns) + PopColumnsBackground(); + } RenderTextClipped(text_min, text_max, label, NULL, &label_size, style.SelectableTextAlign, &bb); @@ -6843,6 +6898,7 @@ void ImGui::SetNextItemSelectionUserData(ImGuiSelectionUserData selection_user_d // - ListBox() //------------------------------------------------------------------------- +// This is essentially a thin wrapper to using BeginChild/EndChild with the ImGuiChildFlags_FrameStyle flag for stylistic changes + displaying a label. // Tip: To have a list filling the entire window width, use size.x = -FLT_MIN and pass an non-visible label e.g. "##empty" // Tip: If your vertical size is calculated from an item count (e.g. 10 * item_height) consider adding a fractional part to facilitate seeing scrolling boundaries (e.g. 10.25 * item_height). bool ImGui::BeginListBox(const char* label, const ImVec2& size_arg) @@ -6858,7 +6914,7 @@ bool ImGui::BeginListBox(const char* label, const ImVec2& size_arg) // Size default to hold ~7.25 items. // Fractional number of items helps seeing that we can scroll down/up without looking at scrollbar. - ImVec2 size = ImFloor(CalcItemSize(size_arg, CalcItemWidth(), GetTextLineHeightWithSpacing() * 7.25f + style.FramePadding.y * 2.0f)); + ImVec2 size = ImTrunc(CalcItemSize(size_arg, CalcItemWidth(), GetTextLineHeightWithSpacing() * 7.25f + style.FramePadding.y * 2.0f)); ImVec2 frame_size = ImVec2(size.x, ImMax(size.y, label_size.y)); ImRect frame_bb(window->DC.CursorPos, window->DC.CursorPos + frame_size); ImRect bb(frame_bb.Min, frame_bb.Max + ImVec2(label_size.x > 0.0f ? style.ItemInnerSpacing.x + label_size.x : 0.0f, 0.0f)); @@ -6872,7 +6928,7 @@ bool ImGui::BeginListBox(const char* label, const ImVec2& size_arg) return false; } - // FIXME-OPT: We could omit the BeginGroup() if label_size.x but would need to omit the EndGroup() as well. + // FIXME-OPT: We could omit the BeginGroup() if label_size.x == 0.0f but would need to omit the EndGroup() as well. BeginGroup(); if (label_size.x > 0.0f) { @@ -6881,7 +6937,7 @@ bool ImGui::BeginListBox(const char* label, const ImVec2& size_arg) window->DC.CursorMaxPos = ImMax(window->DC.CursorMaxPos, label_pos + label_size); } - BeginChildFrame(id, frame_bb.GetSize()); + BeginChild(id, frame_bb.GetSize(), ImGuiChildFlags_FrameStyle); return true; } @@ -6892,7 +6948,7 @@ void ImGui::EndListBox() IM_ASSERT((window->Flags & ImGuiWindowFlags_ChildWindow) && "Mismatched BeginListBox/EndListBox calls. Did you test the return value of BeginListBox?"); IM_UNUSED(window); - EndChildFrame(); + EndChild(); EndGroup(); // This is only required to be able to do IsItemXXX query on the whole ListBox including label } @@ -6912,7 +6968,7 @@ bool ImGui::ListBox(const char* label, int* current_item, const char* (*getter)( if (height_in_items < 0) height_in_items = ImMin(items_count, 7); float height_in_items_f = height_in_items + 0.25f; - ImVec2 size(0.0f, ImFloor(GetTextLineHeightWithSpacing() * height_in_items_f + g.Style.FramePadding.y * 2.0f)); + ImVec2 size(0.0f, ImTrunc(GetTextLineHeightWithSpacing() * height_in_items_f + g.Style.FramePadding.y * 2.0f)); if (!BeginListBox(label, size)) return false; @@ -7444,15 +7500,15 @@ bool ImGui::BeginMenuEx(const char* label, const char* icon, bool enabled) // Menu inside an horizontal menu bar // Selectable extend their highlight by half ItemSpacing in each direction. // For ChildMenu, the popup position will be overwritten by the call to FindBestWindowPosForPopup() in Begin() - popup_pos = ImVec2(pos.x - 1.0f - IM_FLOOR(style.ItemSpacing.x * 0.5f), pos.y - style.FramePadding.y + window->MenuBarHeight()); - window->DC.CursorPos.x += IM_FLOOR(style.ItemSpacing.x * 0.5f); + popup_pos = ImVec2(pos.x - 1.0f - IM_TRUNC(style.ItemSpacing.x * 0.5f), pos.y - style.FramePadding.y + window->MenuBarHeight()); + window->DC.CursorPos.x += IM_TRUNC(style.ItemSpacing.x * 0.5f); PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(style.ItemSpacing.x * 2.0f, style.ItemSpacing.y)); float w = label_size.x; ImVec2 text_pos(window->DC.CursorPos.x + offsets->OffsetLabel, window->DC.CursorPos.y + window->DC.CurrLineTextBaseOffset); pressed = Selectable("", menu_is_open, selectable_flags, ImVec2(w, label_size.y)); RenderText(text_pos, label); PopStyleVar(); - window->DC.CursorPos.x += IM_FLOOR(style.ItemSpacing.x * (-1.0f + 0.5f)); // -1 spacing to compensate the spacing added when Selectable() did a SameLine(). It would also work to call SameLine() ourselves after the PopStyleVar(). + window->DC.CursorPos.x += IM_TRUNC(style.ItemSpacing.x * (-1.0f + 0.5f)); // -1 spacing to compensate the spacing added when Selectable() did a SameLine(). It would also work to call SameLine() ourselves after the PopStyleVar(). } else { @@ -7461,7 +7517,7 @@ bool ImGui::BeginMenuEx(const char* label, const char* icon, bool enabled) // Only when they are other items sticking out we're going to add spacing, yet only register minimum width into the layout system. popup_pos = ImVec2(pos.x, pos.y - style.WindowPadding.y); float icon_w = (icon && icon[0]) ? CalcTextSize(icon, NULL).x : 0.0f; - float checkmark_w = IM_FLOOR(g.FontSize * 1.20f); + float checkmark_w = IM_TRUNC(g.FontSize * 1.20f); float min_w = window->DC.MenuColumns.DeclColumns(icon_w, label_size.x, 0.0f, checkmark_w); // Feedback to next frame float extra_w = ImMax(0.0f, GetContentRegionAvail().x - min_w); ImVec2 text_pos(window->DC.CursorPos.x + offsets->OffsetLabel, window->DC.CursorPos.y + window->DC.CurrLineTextBaseOffset); @@ -7479,6 +7535,7 @@ bool ImGui::BeginMenuEx(const char* label, const char* icon, bool enabled) PopItemFlag(); bool want_open = false; + bool want_open_nav_init = false; bool want_close = false; if (window->DC.LayoutType == ImGuiLayoutType_Vertical) // (window->Flags & (ImGuiWindowFlags_Popup|ImGuiWindowFlags_ChildMenu)) { @@ -7489,18 +7546,18 @@ bool ImGui::BeginMenuEx(const char* label, const char* icon, bool enabled) ImGuiWindow* child_menu_window = (child_popup && child_popup->Window && child_popup->Window->ParentWindow == window) ? child_popup->Window : NULL; if (g.HoveredWindow == window && child_menu_window != NULL) { - float ref_unit = g.FontSize; // FIXME-DPI - float child_dir = (window->Pos.x < child_menu_window->Pos.x) ? 1.0f : -1.0f; - ImRect next_window_rect = child_menu_window->Rect(); + const float ref_unit = g.FontSize; // FIXME-DPI + const float child_dir = (window->Pos.x < child_menu_window->Pos.x) ? 1.0f : -1.0f; + const ImRect next_window_rect = child_menu_window->Rect(); ImVec2 ta = (g.IO.MousePos - g.IO.MouseDelta); ImVec2 tb = (child_dir > 0.0f) ? next_window_rect.GetTL() : next_window_rect.GetTR(); ImVec2 tc = (child_dir > 0.0f) ? next_window_rect.GetBL() : next_window_rect.GetBR(); - float extra = ImClamp(ImFabs(ta.x - tb.x) * 0.30f, ref_unit * 0.5f, ref_unit * 2.5f); // add a bit of extra slack. + const float pad_farmost_h = ImClamp(ImFabs(ta.x - tb.x) * 0.30f, ref_unit * 0.5f, ref_unit * 2.5f); // Add a bit of extra slack. ta.x += child_dir * -0.5f; tb.x += child_dir * ref_unit; tc.x += child_dir * ref_unit; - tb.y = ta.y + ImMax((tb.y - extra) - ta.y, -ref_unit * 8.0f); // triangle has maximum height to limit the slope and the bias toward large sub-menus - tc.y = ta.y + ImMin((tc.y + extra) - ta.y, +ref_unit * 8.0f); + tb.y = ta.y + ImMax((tb.y - pad_farmost_h) - ta.y, -ref_unit * 8.0f); // Triangle has maximum height to limit the slope and the bias toward large sub-menus + tc.y = ta.y + ImMin((tc.y + pad_farmost_h) - ta.y, +ref_unit * 8.0f); moving_toward_child_menu = ImTriangleContainsPoint(ta, tb, tc, g.IO.MousePos); //GetForegroundDrawList()->AddTriangleFilled(ta, tb, tc, moving_toward_child_menu ? IM_COL32(0,128,0,128) : IM_COL32(128,0,0,128)); // [DEBUG] } @@ -7508,18 +7565,22 @@ bool ImGui::BeginMenuEx(const char* label, const char* icon, bool enabled) // The 'HovereWindow == window' check creates an inconsistency (e.g. moving away from menu slowly tends to hit same window, whereas moving away fast does not) // But we also need to not close the top-menu menu when moving over void. Perhaps we should extend the triangle check to a larger polygon. // (Remember to test this on BeginPopup("A")->BeginMenu("B") sequence which behaves slightly differently as B isn't a Child of A and hovering isn't shared.) - if (menu_is_open && !hovered && g.HoveredWindow == window && !moving_toward_child_menu && !g.NavDisableMouseHover) + if (menu_is_open && !hovered && g.HoveredWindow == window && !moving_toward_child_menu && !g.NavDisableMouseHover && g.ActiveId == 0) want_close = true; // Open + // (note: at this point 'hovered' actually includes the NavDisableMouseHover == false test) if (!menu_is_open && pressed) // Click/activate to open want_open = true; else if (!menu_is_open && hovered && !moving_toward_child_menu) // Hover to open want_open = true; + else if (!menu_is_open && hovered && g.HoveredIdTimer >= 0.30f && g.MouseStationaryTimer >= 0.30f) // Hover to open (timer fallback) + want_open = true; if (g.NavId == id && g.NavMoveDir == ImGuiDir_Right) // Nav-Right to open { - want_open = true; + want_open = want_open_nav_init = true; NavMoveRequestCancel(); + NavRestoreHighlightAfterMove(); } } else @@ -7551,13 +7612,13 @@ bool ImGui::BeginMenuEx(const char* label, const char* icon, bool enabled) if (want_open && !menu_is_open && g.OpenPopupStack.Size > g.BeginPopupStack.Size) { - // Don't reopen/recycle same menu level in the same frame, first close the other menu and yield for a frame. + // Don't reopen/recycle same menu level in the same frame if it is a different menu ID, first close the other menu and yield for a frame. OpenPopup(label); } else if (want_open) { menu_is_open = true; - OpenPopup(label); + OpenPopup(label, ImGuiPopupFlags_NoReopen);// | (want_open_nav_init ? ImGuiPopupFlags_NoReopenAlwaysNavInit : 0)); } if (menu_is_open) @@ -7569,6 +7630,14 @@ bool ImGui::BeginMenuEx(const char* label, const char* icon, bool enabled) PopStyleVar(); if (menu_is_open) { + // Implement what ImGuiPopupFlags_NoReopenAlwaysNavInit would do: + // Perform an init request in the case the popup was already open (via a previous mouse hover) + if (want_open && want_open_nav_init && !g.NavInitRequest) + { + FocusWindow(g.CurrentWindow, ImGuiFocusRequestFlags_UnlessBelowModal); + NavInitWindow(g.CurrentWindow, false); + } + // Restore LastItemData so IsItemXXXX functions can work after BeginMenu()/EndMenu() // (This fixes using IsItemClicked() and IsItemHovered(), but IsItemHovered() also relies on its support for ImGuiItemFlags_NoWindowHoverableCheck) g.LastItemData = last_item_in_parent; @@ -7638,14 +7707,14 @@ bool ImGui::MenuItemEx(const char* label, const char* icon, const char* shortcut // Mimic the exact layout spacing of BeginMenu() to allow MenuItem() inside a menu bar, which is a little misleading but may be useful // Note that in this situation: we don't render the shortcut, we render a highlight instead of the selected tick mark. float w = label_size.x; - window->DC.CursorPos.x += IM_FLOOR(style.ItemSpacing.x * 0.5f); + window->DC.CursorPos.x += IM_TRUNC(style.ItemSpacing.x * 0.5f); ImVec2 text_pos(window->DC.CursorPos.x + offsets->OffsetLabel, window->DC.CursorPos.y + window->DC.CurrLineTextBaseOffset); PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(style.ItemSpacing.x * 2.0f, style.ItemSpacing.y)); pressed = Selectable("", selected, selectable_flags, ImVec2(w, 0.0f)); PopStyleVar(); if (g.LastItemData.StatusFlags & ImGuiItemStatusFlags_Visible) RenderText(text_pos, label); - window->DC.CursorPos.x += IM_FLOOR(style.ItemSpacing.x * (-1.0f + 0.5f)); // -1 spacing to compensate the spacing added when Selectable() did a SameLine(). It would also work to call SameLine() ourselves after the PopStyleVar(). + window->DC.CursorPos.x += IM_TRUNC(style.ItemSpacing.x * (-1.0f + 0.5f)); // -1 spacing to compensate the spacing added when Selectable() did a SameLine(). It would also work to call SameLine() ourselves after the PopStyleVar(). } else { @@ -7654,7 +7723,7 @@ bool ImGui::MenuItemEx(const char* label, const char* icon, const char* shortcut // Only when they are other items sticking out we're going to add spacing, yet only register minimum width into the layout system. float icon_w = (icon && icon[0]) ? CalcTextSize(icon, NULL).x : 0.0f; float shortcut_w = (shortcut && shortcut[0]) ? CalcTextSize(shortcut, NULL).x : 0.0f; - float checkmark_w = IM_FLOOR(g.FontSize * 1.20f); + float checkmark_w = IM_TRUNC(g.FontSize * 1.20f); float min_w = window->DC.MenuColumns.DeclColumns(icon_w, label_size.x, shortcut_w, checkmark_w); // Feedback for next frame float stretch_w = ImMax(0.0f, GetContentRegionAvail().x - min_w); pressed = Selectable("", false, selectable_flags | ImGuiSelectableFlags_SpanAvailWidth, ImVec2(min_w, label_size.y)); @@ -7801,8 +7870,8 @@ bool ImGui::BeginTabBar(const char* str_id, ImGuiTabBarFlags flags) ImGuiTabBar* tab_bar = g.TabBars.GetOrAddByKey(id); ImRect tab_bar_bb = ImRect(window->DC.CursorPos.x, window->DC.CursorPos.y, window->WorkRect.Max.x, window->DC.CursorPos.y + g.FontSize + g.Style.FramePadding.y * 2); tab_bar->ID = id; - tab_bar->SeparatorMinX = tab_bar->BarRect.Min.x - IM_FLOOR(window->WindowPadding.x * 0.5f); - tab_bar->SeparatorMaxX = tab_bar->BarRect.Max.x + IM_FLOOR(window->WindowPadding.x * 0.5f); + tab_bar->SeparatorMinX = tab_bar->BarRect.Min.x - IM_TRUNC(window->WindowPadding.x * 0.5f); + tab_bar->SeparatorMaxX = tab_bar->BarRect.Max.x + IM_TRUNC(window->WindowPadding.x * 0.5f); return BeginTabBarEx(tab_bar, tab_bar_bb, flags | ImGuiTabBarFlags_IsFocused); } @@ -8069,7 +8138,7 @@ static void ImGui::TabBarLayout(ImGuiTabBar* tab_bar) for (int tab_n = shrink_data_offset; tab_n < shrink_data_offset + shrink_data_count; tab_n++) { ImGuiTabItem* tab = &tab_bar->Tabs[g.ShrinkWidthBuffer[tab_n].Index]; - float shrinked_width = IM_FLOOR(g.ShrinkWidthBuffer[tab_n].Width); + float shrinked_width = IM_TRUNC(g.ShrinkWidthBuffer[tab_n].Width); if (shrinked_width < 0.0f) continue; @@ -8270,7 +8339,7 @@ void ImGui::TabBarCloseTab(ImGuiTabBar* tab_bar, ImGuiTabItem* tab) if (tab->Flags & ImGuiTabItemFlags_Button) return; // A button appended with TabItemButton(). - if (!(tab->Flags & ImGuiTabItemFlags_UnsavedDocument)) + if ((tab->Flags & (ImGuiTabItemFlags_UnsavedDocument | ImGuiTabItemFlags_NoAssumedClosure)) == 0) { // This will remove a frame of lag for selecting another tab on closure. // However we don't run it in the case where the 'Unsaved' flag is set, so user gets a chance to fully undo the closure @@ -8700,7 +8769,7 @@ bool ImGui::TabItemEx(ImGuiTabBar* tab_bar, const char* label, bool* p_open, const bool is_central_section = (tab->Flags & ImGuiTabItemFlags_SectionMask_) == 0; size.x = tab->Width; if (is_central_section) - window->DC.CursorPos = tab_bar->BarRect.Min + ImVec2(IM_FLOOR(tab->Offset - tab_bar->ScrollingAnim), 0.0f); + window->DC.CursorPos = tab_bar->BarRect.Min + ImVec2(IM_TRUNC(tab->Offset - tab_bar->ScrollingAnim), 0.0f); else window->DC.CursorPos = tab_bar->BarRect.Min + ImVec2(tab->Offset, 0.0f); ImVec2 pos = window->DC.CursorPos; @@ -8806,7 +8875,7 @@ bool ImGui::TabItemEx(ImGuiTabBar* tab_bar, const char* label, bool* p_open, if (hovered && g.HoveredIdNotActiveTimer > TOOLTIP_DELAY && bb.GetWidth() < tab->ContentWidth) { // Enlarge tab display when hovering - bb.Max.x = bb.Min.x + IM_FLOOR(ImLerp(bb.GetWidth(), tab->ContentWidth, ImSaturate((g.HoveredIdNotActiveTimer - 0.40f) * 6.0f))); + bb.Max.x = bb.Min.x + IM_TRUNC(ImLerp(bb.GetWidth(), tab->ContentWidth, ImSaturate((g.HoveredIdNotActiveTimer - 0.40f) * 6.0f))); display_draw_list = GetForegroundDrawList(window); TabItemBackground(display_draw_list, bb, flags, GetColorU32(ImGuiCol_TitleBgActive)); } @@ -8993,7 +9062,7 @@ void ImGui::TabItemLabelAndCloseButton(ImDrawList* draw_list, const ImRect& bb, } else if (unsaved_marker_visible) { - const ImRect bullet_bb(button_pos, button_pos + ImVec2(button_sz, button_sz) + g.Style.FramePadding * 2.0f); + const ImRect bullet_bb(button_pos, button_pos + ImVec2(button_sz, button_sz)); RenderBullet(draw_list, bullet_bb.GetCenter(), GetColorU32(ImGuiCol_Text)); } diff --git a/cimgui/imgui/imstb_textedit.h b/cimgui/imgui/imstb_textedit.h index 062d13d69..c30f1a124 100644 --- a/cimgui/imgui/imstb_textedit.h +++ b/cimgui/imgui/imstb_textedit.h @@ -4,6 +4,7 @@ // - Fix in stb_textedit_discard_redo (see https://github.com/nothings/stb/issues/321) // - Fix in stb_textedit_find_charpos to handle last line (see https://github.com/ocornut/imgui/issues/6000 + #6783) // Grep for [DEAR IMGUI] to find the changes. +// - Also renamed macros used or defined outside of IMSTB_TEXTEDIT_IMPLEMENTATION block from STB_TEXTEDIT_* to IMSTB_TEXTEDIT_* // stb_textedit.h - v1.14 - public domain - Sean Barrett // Development of this library was sponsored by RAD Game Tools @@ -30,7 +31,7 @@ // DEPENDENCIES // // Uses the C runtime function 'memmove', which you can override -// by defining STB_TEXTEDIT_memmove before the implementation. +// by defining IMSTB_TEXTEDIT_memmove before the implementation. // Uses no other functions. Performs no runtime allocations. // // @@ -274,8 +275,8 @@ //// //// -#ifndef INCLUDE_STB_TEXTEDIT_H -#define INCLUDE_STB_TEXTEDIT_H +#ifndef INCLUDE_IMSTB_TEXTEDIT_H +#define INCLUDE_IMSTB_TEXTEDIT_H //////////////////////////////////////////////////////////////////////// // @@ -286,33 +287,33 @@ // and undo state. // -#ifndef STB_TEXTEDIT_UNDOSTATECOUNT -#define STB_TEXTEDIT_UNDOSTATECOUNT 99 +#ifndef IMSTB_TEXTEDIT_UNDOSTATECOUNT +#define IMSTB_TEXTEDIT_UNDOSTATECOUNT 99 #endif -#ifndef STB_TEXTEDIT_UNDOCHARCOUNT -#define STB_TEXTEDIT_UNDOCHARCOUNT 999 +#ifndef IMSTB_TEXTEDIT_UNDOCHARCOUNT +#define IMSTB_TEXTEDIT_UNDOCHARCOUNT 999 #endif -#ifndef STB_TEXTEDIT_CHARTYPE -#define STB_TEXTEDIT_CHARTYPE int +#ifndef IMSTB_TEXTEDIT_CHARTYPE +#define IMSTB_TEXTEDIT_CHARTYPE int #endif -#ifndef STB_TEXTEDIT_POSITIONTYPE -#define STB_TEXTEDIT_POSITIONTYPE int +#ifndef IMSTB_TEXTEDIT_POSITIONTYPE +#define IMSTB_TEXTEDIT_POSITIONTYPE int #endif typedef struct { // private data - STB_TEXTEDIT_POSITIONTYPE where; - STB_TEXTEDIT_POSITIONTYPE insert_length; - STB_TEXTEDIT_POSITIONTYPE delete_length; + IMSTB_TEXTEDIT_POSITIONTYPE where; + IMSTB_TEXTEDIT_POSITIONTYPE insert_length; + IMSTB_TEXTEDIT_POSITIONTYPE delete_length; int char_storage; } StbUndoRecord; typedef struct { // private data - StbUndoRecord undo_rec [STB_TEXTEDIT_UNDOSTATECOUNT]; - STB_TEXTEDIT_CHARTYPE undo_char[STB_TEXTEDIT_UNDOCHARCOUNT]; + StbUndoRecord undo_rec [IMSTB_TEXTEDIT_UNDOSTATECOUNT]; + IMSTB_TEXTEDIT_CHARTYPE undo_char[IMSTB_TEXTEDIT_UNDOCHARCOUNT]; short undo_point, redo_point; int undo_char_point, redo_char_point; } StbUndoState; @@ -371,7 +372,7 @@ typedef struct float ymin,ymax; // height of row above and below baseline int num_chars; } StbTexteditRow; -#endif //INCLUDE_STB_TEXTEDIT_H +#endif //INCLUDE_IMSTB_TEXTEDIT_H //////////////////////////////////////////////////////////////////////////// @@ -384,11 +385,11 @@ typedef struct // implementation isn't include-guarded, since it might have indirectly // included just the "header" portion -#ifdef STB_TEXTEDIT_IMPLEMENTATION +#ifdef IMSTB_TEXTEDIT_IMPLEMENTATION -#ifndef STB_TEXTEDIT_memmove +#ifndef IMSTB_TEXTEDIT_memmove #include -#define STB_TEXTEDIT_memmove memmove +#define IMSTB_TEXTEDIT_memmove memmove #endif @@ -398,7 +399,7 @@ typedef struct // // traverse the layout to locate the nearest character to a display position -static int stb_text_locate_coord(STB_TEXTEDIT_STRING *str, float x, float y) +static int stb_text_locate_coord(IMSTB_TEXTEDIT_STRING *str, float x, float y) { StbTexteditRow r; int n = STB_TEXTEDIT_STRINGLEN(str); @@ -458,7 +459,7 @@ static int stb_text_locate_coord(STB_TEXTEDIT_STRING *str, float x, float y) } // API click: on mouse down, move the cursor to the clicked location, and reset the selection -static void stb_textedit_click(STB_TEXTEDIT_STRING *str, STB_TexteditState *state, float x, float y) +static void stb_textedit_click(IMSTB_TEXTEDIT_STRING *str, STB_TexteditState *state, float x, float y) { // In single-line mode, just always make y = 0. This lets the drag keep working if the mouse // goes off the top or bottom of the text @@ -476,7 +477,7 @@ static void stb_textedit_click(STB_TEXTEDIT_STRING *str, STB_TexteditState *stat } // API drag: on mouse drag, move the cursor and selection endpoint to the clicked location -static void stb_textedit_drag(STB_TEXTEDIT_STRING *str, STB_TexteditState *state, float x, float y) +static void stb_textedit_drag(IMSTB_TEXTEDIT_STRING *str, STB_TexteditState *state, float x, float y) { int p = 0; @@ -502,11 +503,11 @@ static void stb_textedit_drag(STB_TEXTEDIT_STRING *str, STB_TexteditState *state // // forward declarations -static void stb_text_undo(STB_TEXTEDIT_STRING *str, STB_TexteditState *state); -static void stb_text_redo(STB_TEXTEDIT_STRING *str, STB_TexteditState *state); -static void stb_text_makeundo_delete(STB_TEXTEDIT_STRING *str, STB_TexteditState *state, int where, int length); +static void stb_text_undo(IMSTB_TEXTEDIT_STRING *str, STB_TexteditState *state); +static void stb_text_redo(IMSTB_TEXTEDIT_STRING *str, STB_TexteditState *state); +static void stb_text_makeundo_delete(IMSTB_TEXTEDIT_STRING *str, STB_TexteditState *state, int where, int length); static void stb_text_makeundo_insert(STB_TexteditState *state, int where, int length); -static void stb_text_makeundo_replace(STB_TEXTEDIT_STRING *str, STB_TexteditState *state, int where, int old_length, int new_length); +static void stb_text_makeundo_replace(IMSTB_TEXTEDIT_STRING *str, STB_TexteditState *state, int where, int old_length, int new_length); typedef struct { @@ -518,7 +519,7 @@ typedef struct // find the x/y location of a character, and remember info about the previous row in // case we get a move-up event (for page up, we'll have to rescan) -static void stb_textedit_find_charpos(StbFindState *find, STB_TEXTEDIT_STRING *str, int n, int single_line) +static void stb_textedit_find_charpos(StbFindState *find, IMSTB_TEXTEDIT_STRING *str, int n, int single_line) { StbTexteditRow r; int prev_start = 0; @@ -569,7 +570,7 @@ static void stb_textedit_find_charpos(StbFindState *find, STB_TEXTEDIT_STRING *s #define STB_TEXT_HAS_SELECTION(s) ((s)->select_start != (s)->select_end) // make the selection/cursor state valid if client altered the string -static void stb_textedit_clamp(STB_TEXTEDIT_STRING *str, STB_TexteditState *state) +static void stb_textedit_clamp(IMSTB_TEXTEDIT_STRING *str, STB_TexteditState *state) { int n = STB_TEXTEDIT_STRINGLEN(str); if (STB_TEXT_HAS_SELECTION(state)) { @@ -583,7 +584,7 @@ static void stb_textedit_clamp(STB_TEXTEDIT_STRING *str, STB_TexteditState *stat } // delete characters while updating undo -static void stb_textedit_delete(STB_TEXTEDIT_STRING *str, STB_TexteditState *state, int where, int len) +static void stb_textedit_delete(IMSTB_TEXTEDIT_STRING *str, STB_TexteditState *state, int where, int len) { stb_text_makeundo_delete(str, state, where, len); STB_TEXTEDIT_DELETECHARS(str, where, len); @@ -591,7 +592,7 @@ static void stb_textedit_delete(STB_TEXTEDIT_STRING *str, STB_TexteditState *sta } // delete the section -static void stb_textedit_delete_selection(STB_TEXTEDIT_STRING *str, STB_TexteditState *state) +static void stb_textedit_delete_selection(IMSTB_TEXTEDIT_STRING *str, STB_TexteditState *state) { stb_textedit_clamp(str, state); if (STB_TEXT_HAS_SELECTION(state)) { @@ -628,7 +629,7 @@ static void stb_textedit_move_to_first(STB_TexteditState *state) } // move cursor to last character of selection -static void stb_textedit_move_to_last(STB_TEXTEDIT_STRING *str, STB_TexteditState *state) +static void stb_textedit_move_to_last(IMSTB_TEXTEDIT_STRING *str, STB_TexteditState *state) { if (STB_TEXT_HAS_SELECTION(state)) { stb_textedit_sortselection(state); @@ -640,13 +641,13 @@ static void stb_textedit_move_to_last(STB_TEXTEDIT_STRING *str, STB_TexteditStat } #ifdef STB_TEXTEDIT_IS_SPACE -static int is_word_boundary( STB_TEXTEDIT_STRING *str, int idx ) +static int is_word_boundary( IMSTB_TEXTEDIT_STRING *str, int idx ) { return idx > 0 ? (STB_TEXTEDIT_IS_SPACE( STB_TEXTEDIT_GETCHAR(str,idx-1) ) && !STB_TEXTEDIT_IS_SPACE( STB_TEXTEDIT_GETCHAR(str, idx) ) ) : 1; } #ifndef STB_TEXTEDIT_MOVEWORDLEFT -static int stb_textedit_move_to_word_previous( STB_TEXTEDIT_STRING *str, int c ) +static int stb_textedit_move_to_word_previous( IMSTB_TEXTEDIT_STRING *str, int c ) { --c; // always move at least one character while( c >= 0 && !is_word_boundary( str, c ) ) @@ -661,7 +662,7 @@ static int stb_textedit_move_to_word_previous( STB_TEXTEDIT_STRING *str, int c ) #endif #ifndef STB_TEXTEDIT_MOVEWORDRIGHT -static int stb_textedit_move_to_word_next( STB_TEXTEDIT_STRING *str, int c ) +static int stb_textedit_move_to_word_next( IMSTB_TEXTEDIT_STRING *str, int c ) { const int len = STB_TEXTEDIT_STRINGLEN(str); ++c; // always move at least one character @@ -688,7 +689,7 @@ static void stb_textedit_prep_selection_at_cursor(STB_TexteditState *state) } // API cut: delete selection -static int stb_textedit_cut(STB_TEXTEDIT_STRING *str, STB_TexteditState *state) +static int stb_textedit_cut(IMSTB_TEXTEDIT_STRING *str, STB_TexteditState *state) { if (STB_TEXT_HAS_SELECTION(state)) { stb_textedit_delete_selection(str,state); // implicitly clamps @@ -699,7 +700,7 @@ static int stb_textedit_cut(STB_TEXTEDIT_STRING *str, STB_TexteditState *state) } // API paste: replace existing selection with passed-in text -static int stb_textedit_paste_internal(STB_TEXTEDIT_STRING *str, STB_TexteditState *state, STB_TEXTEDIT_CHARTYPE *text, int len) +static int stb_textedit_paste_internal(IMSTB_TEXTEDIT_STRING *str, STB_TexteditState *state, IMSTB_TEXTEDIT_CHARTYPE *text, int len) { // if there's a selection, the paste should delete it stb_textedit_clamp(str, state); @@ -720,14 +721,14 @@ static int stb_textedit_paste_internal(STB_TEXTEDIT_STRING *str, STB_TexteditSta #endif // API key: process a keyboard input -static void stb_textedit_key(STB_TEXTEDIT_STRING *str, STB_TexteditState *state, STB_TEXTEDIT_KEYTYPE key) +static void stb_textedit_key(IMSTB_TEXTEDIT_STRING *str, STB_TexteditState *state, STB_TEXTEDIT_KEYTYPE key) { retry: switch (key) { default: { int c = STB_TEXTEDIT_KEYTOTEXT(key); if (c > 0) { - STB_TEXTEDIT_CHARTYPE ch = (STB_TEXTEDIT_CHARTYPE) c; + IMSTB_TEXTEDIT_CHARTYPE ch = (IMSTB_TEXTEDIT_CHARTYPE) c; // can't add newline in single-line mode if (c == '\n' && state->single_line) @@ -892,8 +893,8 @@ static void stb_textedit_key(STB_TEXTEDIT_STRING *str, STB_TexteditState *state, x = row.x0; for (i=0; i < row.num_chars; ++i) { float dx = STB_TEXTEDIT_GETWIDTH(str, start, i); - #ifdef STB_TEXTEDIT_GETWIDTH_NEWLINE - if (dx == STB_TEXTEDIT_GETWIDTH_NEWLINE) + #ifdef IMSTB_TEXTEDIT_GETWIDTH_NEWLINE + if (dx == IMSTB_TEXTEDIT_GETWIDTH_NEWLINE) break; #endif x += dx; @@ -954,8 +955,8 @@ static void stb_textedit_key(STB_TEXTEDIT_STRING *str, STB_TexteditState *state, x = row.x0; for (i=0; i < row.num_chars; ++i) { float dx = STB_TEXTEDIT_GETWIDTH(str, find.prev_first, i); - #ifdef STB_TEXTEDIT_GETWIDTH_NEWLINE - if (dx == STB_TEXTEDIT_GETWIDTH_NEWLINE) + #ifdef IMSTB_TEXTEDIT_GETWIDTH_NEWLINE + if (dx == IMSTB_TEXTEDIT_GETWIDTH_NEWLINE) break; #endif x += dx; @@ -1112,8 +1113,8 @@ static void stb_textedit_key(STB_TEXTEDIT_STRING *str, STB_TexteditState *state, static void stb_textedit_flush_redo(StbUndoState *state) { - state->redo_point = STB_TEXTEDIT_UNDOSTATECOUNT; - state->redo_char_point = STB_TEXTEDIT_UNDOCHARCOUNT; + state->redo_point = IMSTB_TEXTEDIT_UNDOSTATECOUNT; + state->redo_char_point = IMSTB_TEXTEDIT_UNDOCHARCOUNT; } // discard the oldest entry in the undo list @@ -1125,13 +1126,13 @@ static void stb_textedit_discard_undo(StbUndoState *state) int n = state->undo_rec[0].insert_length, i; // delete n characters from all other records state->undo_char_point -= n; - STB_TEXTEDIT_memmove(state->undo_char, state->undo_char + n, (size_t) (state->undo_char_point*sizeof(STB_TEXTEDIT_CHARTYPE))); + IMSTB_TEXTEDIT_memmove(state->undo_char, state->undo_char + n, (size_t) (state->undo_char_point*sizeof(IMSTB_TEXTEDIT_CHARTYPE))); for (i=0; i < state->undo_point; ++i) if (state->undo_rec[i].char_storage >= 0) state->undo_rec[i].char_storage -= n; // @OPTIMIZE: get rid of char_storage and infer it } --state->undo_point; - STB_TEXTEDIT_memmove(state->undo_rec, state->undo_rec+1, (size_t) (state->undo_point*sizeof(state->undo_rec[0]))); + IMSTB_TEXTEDIT_memmove(state->undo_rec, state->undo_rec+1, (size_t) (state->undo_point*sizeof(state->undo_rec[0]))); } } @@ -1141,7 +1142,7 @@ static void stb_textedit_discard_undo(StbUndoState *state) // fill up even though the undo buffer didn't static void stb_textedit_discard_redo(StbUndoState *state) { - int k = STB_TEXTEDIT_UNDOSTATECOUNT-1; + int k = IMSTB_TEXTEDIT_UNDOSTATECOUNT-1; if (state->redo_point <= k) { // if the k'th undo state has characters, clean those up @@ -1149,7 +1150,7 @@ static void stb_textedit_discard_redo(StbUndoState *state) int n = state->undo_rec[k].insert_length, i; // move the remaining redo character data to the end of the buffer state->redo_char_point += n; - STB_TEXTEDIT_memmove(state->undo_char + state->redo_char_point, state->undo_char + state->redo_char_point-n, (size_t) ((STB_TEXTEDIT_UNDOCHARCOUNT - state->redo_char_point)*sizeof(STB_TEXTEDIT_CHARTYPE))); + IMSTB_TEXTEDIT_memmove(state->undo_char + state->redo_char_point, state->undo_char + state->redo_char_point-n, (size_t) ((IMSTB_TEXTEDIT_UNDOCHARCOUNT - state->redo_char_point)*sizeof(IMSTB_TEXTEDIT_CHARTYPE))); // adjust the position of all the other records to account for above memmove for (i=state->redo_point; i < k; ++i) if (state->undo_rec[i].char_storage >= 0) @@ -1157,12 +1158,12 @@ static void stb_textedit_discard_redo(StbUndoState *state) } // now move all the redo records towards the end of the buffer; the first one is at 'redo_point' // [DEAR IMGUI] - size_t move_size = (size_t)((STB_TEXTEDIT_UNDOSTATECOUNT - state->redo_point - 1) * sizeof(state->undo_rec[0])); + size_t move_size = (size_t)((IMSTB_TEXTEDIT_UNDOSTATECOUNT - state->redo_point - 1) * sizeof(state->undo_rec[0])); const char* buf_begin = (char*)state->undo_rec; (void)buf_begin; const char* buf_end = (char*)state->undo_rec + sizeof(state->undo_rec); (void)buf_end; IM_ASSERT(((char*)(state->undo_rec + state->redo_point)) >= buf_begin); IM_ASSERT(((char*)(state->undo_rec + state->redo_point + 1) + move_size) <= buf_end); - STB_TEXTEDIT_memmove(state->undo_rec + state->redo_point+1, state->undo_rec + state->redo_point, move_size); + IMSTB_TEXTEDIT_memmove(state->undo_rec + state->redo_point+1, state->undo_rec + state->redo_point, move_size); // now move redo_point to point to the new one ++state->redo_point; @@ -1176,32 +1177,32 @@ static StbUndoRecord *stb_text_create_undo_record(StbUndoState *state, int numch // if we have no free records, we have to make room, by sliding the // existing records down - if (state->undo_point == STB_TEXTEDIT_UNDOSTATECOUNT) + if (state->undo_point == IMSTB_TEXTEDIT_UNDOSTATECOUNT) stb_textedit_discard_undo(state); // if the characters to store won't possibly fit in the buffer, we can't undo - if (numchars > STB_TEXTEDIT_UNDOCHARCOUNT) { + if (numchars > IMSTB_TEXTEDIT_UNDOCHARCOUNT) { state->undo_point = 0; state->undo_char_point = 0; return NULL; } // if we don't have enough free characters in the buffer, we have to make room - while (state->undo_char_point + numchars > STB_TEXTEDIT_UNDOCHARCOUNT) + while (state->undo_char_point + numchars > IMSTB_TEXTEDIT_UNDOCHARCOUNT) stb_textedit_discard_undo(state); return &state->undo_rec[state->undo_point++]; } -static STB_TEXTEDIT_CHARTYPE *stb_text_createundo(StbUndoState *state, int pos, int insert_len, int delete_len) +static IMSTB_TEXTEDIT_CHARTYPE *stb_text_createundo(StbUndoState *state, int pos, int insert_len, int delete_len) { StbUndoRecord *r = stb_text_create_undo_record(state, insert_len); if (r == NULL) return NULL; r->where = pos; - r->insert_length = (STB_TEXTEDIT_POSITIONTYPE) insert_len; - r->delete_length = (STB_TEXTEDIT_POSITIONTYPE) delete_len; + r->insert_length = (IMSTB_TEXTEDIT_POSITIONTYPE) insert_len; + r->delete_length = (IMSTB_TEXTEDIT_POSITIONTYPE) delete_len; if (insert_len == 0) { r->char_storage = -1; @@ -1213,7 +1214,7 @@ static STB_TEXTEDIT_CHARTYPE *stb_text_createundo(StbUndoState *state, int pos, } } -static void stb_text_undo(STB_TEXTEDIT_STRING *str, STB_TexteditState *state) +static void stb_text_undo(IMSTB_TEXTEDIT_STRING *str, STB_TexteditState *state) { StbUndoState *s = &state->undostate; StbUndoRecord u, *r; @@ -1240,7 +1241,7 @@ static void stb_text_undo(STB_TEXTEDIT_STRING *str, STB_TexteditState *state) // characters stored for *undoing* don't leave room for redo // if the last is true, we have to bail - if (s->undo_char_point + u.delete_length >= STB_TEXTEDIT_UNDOCHARCOUNT) { + if (s->undo_char_point + u.delete_length >= IMSTB_TEXTEDIT_UNDOCHARCOUNT) { // the undo records take up too much character space; there's no space to store the redo characters r->insert_length = 0; } else { @@ -1249,7 +1250,7 @@ static void stb_text_undo(STB_TEXTEDIT_STRING *str, STB_TexteditState *state) // there's definitely room to store the characters eventually while (s->undo_char_point + u.delete_length > s->redo_char_point) { // should never happen: - if (s->redo_point == STB_TEXTEDIT_UNDOSTATECOUNT) + if (s->redo_point == IMSTB_TEXTEDIT_UNDOSTATECOUNT) return; // there's currently not enough room, so discard a redo record stb_textedit_discard_redo(s); @@ -1281,11 +1282,11 @@ static void stb_text_undo(STB_TEXTEDIT_STRING *str, STB_TexteditState *state) s->redo_point--; } -static void stb_text_redo(STB_TEXTEDIT_STRING *str, STB_TexteditState *state) +static void stb_text_redo(IMSTB_TEXTEDIT_STRING *str, STB_TexteditState *state) { StbUndoState *s = &state->undostate; StbUndoRecord *u, r; - if (s->redo_point == STB_TEXTEDIT_UNDOSTATECOUNT) + if (s->redo_point == IMSTB_TEXTEDIT_UNDOSTATECOUNT) return; // we need to do two things: apply the redo record, and create an undo record @@ -1337,20 +1338,20 @@ static void stb_text_makeundo_insert(STB_TexteditState *state, int where, int le stb_text_createundo(&state->undostate, where, 0, length); } -static void stb_text_makeundo_delete(STB_TEXTEDIT_STRING *str, STB_TexteditState *state, int where, int length) +static void stb_text_makeundo_delete(IMSTB_TEXTEDIT_STRING *str, STB_TexteditState *state, int where, int length) { int i; - STB_TEXTEDIT_CHARTYPE *p = stb_text_createundo(&state->undostate, where, length, 0); + IMSTB_TEXTEDIT_CHARTYPE *p = stb_text_createundo(&state->undostate, where, length, 0); if (p) { for (i=0; i < length; ++i) p[i] = STB_TEXTEDIT_GETCHAR(str, where+i); } } -static void stb_text_makeundo_replace(STB_TEXTEDIT_STRING *str, STB_TexteditState *state, int where, int old_length, int new_length) +static void stb_text_makeundo_replace(IMSTB_TEXTEDIT_STRING *str, STB_TexteditState *state, int where, int old_length, int new_length) { int i; - STB_TEXTEDIT_CHARTYPE *p = stb_text_createundo(&state->undostate, where, old_length, new_length); + IMSTB_TEXTEDIT_CHARTYPE *p = stb_text_createundo(&state->undostate, where, old_length, new_length); if (p) { for (i=0; i < old_length; ++i) p[i] = STB_TEXTEDIT_GETCHAR(str, where+i); @@ -1362,8 +1363,8 @@ static void stb_textedit_clear_state(STB_TexteditState *state, int is_single_lin { state->undostate.undo_point = 0; state->undostate.undo_char_point = 0; - state->undostate.redo_point = STB_TEXTEDIT_UNDOSTATECOUNT; - state->undostate.redo_char_point = STB_TEXTEDIT_UNDOCHARCOUNT; + state->undostate.redo_point = IMSTB_TEXTEDIT_UNDOSTATECOUNT; + state->undostate.redo_char_point = IMSTB_TEXTEDIT_UNDOCHARCOUNT; state->select_end = state->select_start = 0; state->cursor = 0; state->has_preferred_x = 0; @@ -1386,16 +1387,16 @@ static void stb_textedit_initialize_state(STB_TexteditState *state, int is_singl #pragma GCC diagnostic ignored "-Wcast-qual" #endif -static int stb_textedit_paste(STB_TEXTEDIT_STRING *str, STB_TexteditState *state, STB_TEXTEDIT_CHARTYPE const *ctext, int len) +static int stb_textedit_paste(IMSTB_TEXTEDIT_STRING *str, STB_TexteditState *state, IMSTB_TEXTEDIT_CHARTYPE const *ctext, int len) { - return stb_textedit_paste_internal(str, state, (STB_TEXTEDIT_CHARTYPE *) ctext, len); + return stb_textedit_paste_internal(str, state, (IMSTB_TEXTEDIT_CHARTYPE *) ctext, len); } #if defined(__GNUC__) || defined(__clang__) #pragma GCC diagnostic pop #endif -#endif//STB_TEXTEDIT_IMPLEMENTATION +#endif//IMSTB_TEXTEDIT_IMPLEMENTATION /* ------------------------------------------------------------------------------ diff --git a/cimgui/imgui/misc/freetype/imgui_freetype.cpp b/cimgui/imgui/misc/freetype/imgui_freetype.cpp index facb9c9ee..a78bd5e31 100644 --- a/cimgui/imgui/misc/freetype/imgui_freetype.cpp +++ b/cimgui/imgui/misc/freetype/imgui_freetype.cpp @@ -6,6 +6,7 @@ // CHANGELOG // (minor and older changes stripped away, please see git history for details) +// 2023/11/13: added support for ImFontConfig::RasterizationDensity field for scaling render density without scaling metrics. // 2023/08/01: added support for SVG fonts, enable by using '#define IMGUI_ENABLE_FREETYPE_LUNASVG' (#6591) // 2023/01/04: fixed a packing issue which in some occurrences would prevent large amount of glyphs from being packed correctly. // 2021/08/23: fixed crash when FT_Render_Glyph() fails to render a glyph and returns NULL. @@ -63,8 +64,10 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wpragmas" // warning: unknown option after '#pragma GCC diagnostic' kind #pragma GCC diagnostic ignored "-Wunused-function" // warning: 'xxxx' defined but not used +#ifndef __clang__ #pragma GCC diagnostic ignored "-Wsubobject-linkage" // warning: 'xxxx' has a field 'xxxx' whose type uses the anonymous namespace #endif +#endif //------------------------------------------------------------------------- // Data @@ -164,6 +167,8 @@ namespace unsigned int UserFlags; // = ImFontConfig::RasterizerFlags FT_Int32 LoadFlags; FT_Render_Mode RenderMode; + float RasterizationDensity; + float InvRasterizationDensity; }; // From SDL_ttf: Handy routines for converting from fixed point @@ -206,6 +211,9 @@ namespace if (UserFlags & ImGuiFreeTypeBuilderFlags_LoadColor) LoadFlags |= FT_LOAD_COLOR; + RasterizationDensity = cfg.RasterizerDensity; + InvRasterizationDensity = 1.0f / RasterizationDensity; + memset(&Info, 0, sizeof(Info)); SetPixelHeight((uint32_t)cfg.SizePixels); @@ -229,19 +237,19 @@ namespace FT_Size_RequestRec req; req.type = (UserFlags & ImGuiFreeTypeBuilderFlags_Bitmap) ? FT_SIZE_REQUEST_TYPE_NOMINAL : FT_SIZE_REQUEST_TYPE_REAL_DIM; req.width = 0; - req.height = (uint32_t)pixel_height * 64; + req.height = (uint32_t)(pixel_height * 64 * RasterizationDensity); req.horiResolution = 0; req.vertResolution = 0; FT_Request_Size(Face, &req); // Update font info FT_Size_Metrics metrics = Face->size->metrics; - Info.PixelHeight = (uint32_t)pixel_height; - Info.Ascender = (float)FT_CEIL(metrics.ascender); - Info.Descender = (float)FT_CEIL(metrics.descender); - Info.LineSpacing = (float)FT_CEIL(metrics.height); - Info.LineGap = (float)FT_CEIL(metrics.height - metrics.ascender + metrics.descender); - Info.MaxAdvanceWidth = (float)FT_CEIL(metrics.max_advance); + Info.PixelHeight = (uint32_t)(pixel_height * InvRasterizationDensity); + Info.Ascender = (float)FT_CEIL(metrics.ascender) * InvRasterizationDensity; + Info.Descender = (float)FT_CEIL(metrics.descender) * InvRasterizationDensity; + Info.LineSpacing = (float)FT_CEIL(metrics.height) * InvRasterizationDensity; + Info.LineGap = (float)FT_CEIL(metrics.height - metrics.ascender + metrics.descender) * InvRasterizationDensity; + Info.MaxAdvanceWidth = (float)FT_CEIL(metrics.max_advance) * InvRasterizationDensity; } const FT_Glyph_Metrics* FreeTypeFont::LoadGlyph(uint32_t codepoint) @@ -429,7 +437,7 @@ bool ImFontAtlasBuildWithFreeTypeEx(FT_Library ft_library, ImFontAtlas* atlas, u ImFontAtlasBuildInit(atlas); // Clear atlas - atlas->TexID = (ImTextureID)nullptr; + atlas->TexID = 0; atlas->TexWidth = atlas->TexHeight = 0; atlas->TexUvScale = ImVec2(0.0f, 0.0f); atlas->TexUvWhitePixel = ImVec2(0.0f, 0.0f); @@ -693,15 +701,15 @@ bool ImFontAtlasBuildWithFreeTypeEx(FT_Library ft_library, ImFontAtlas* atlas, u const int ty = pack_rect.y + padding; // Register glyph - float x0 = info.OffsetX + font_off_x; - float y0 = info.OffsetY + font_off_y; - float x1 = x0 + info.Width; - float y1 = y0 + info.Height; + float x0 = info.OffsetX * src_tmp.Font.InvRasterizationDensity + font_off_x; + float y0 = info.OffsetY * src_tmp.Font.InvRasterizationDensity + font_off_y; + float x1 = x0 + info.Width * src_tmp.Font.InvRasterizationDensity; + float y1 = y0 + info.Height * src_tmp.Font.InvRasterizationDensity; float u0 = (tx) / (float)atlas->TexWidth; float v0 = (ty) / (float)atlas->TexHeight; float u1 = (tx + info.Width) / (float)atlas->TexWidth; float v1 = (ty + info.Height) / (float)atlas->TexHeight; - dst_font->AddGlyph(&cfg, (ImWchar)src_glyph.Codepoint, x0, y0, x1, y1, u0, v0, u1, v1, info.AdvanceX); + dst_font->AddGlyph(&cfg, (ImWchar)src_glyph.Codepoint, x0, y0, x1, y1, u0, v0, u1, v1, info.AdvanceX * src_tmp.Font.InvRasterizationDensity); ImFontGlyph* dst_glyph = &dst_font->Glyphs.back(); IM_ASSERT(dst_glyph->Codepoint == src_glyph.Codepoint); @@ -840,7 +848,7 @@ static FT_Error ImGuiLunasvgPortInit(FT_Pointer* _state) static void ImGuiLunasvgPortFree(FT_Pointer* _state) { - IM_DELETE(*(LunasvgPortState*)_state); + IM_DELETE(*(LunasvgPortState**)_state); } static FT_Error ImGuiLunasvgPortRender(FT_GlyphSlot slot, FT_Pointer* _state) diff --git a/cimgui/imgui/misc/freetype/imgui_freetype.h b/cimgui/imgui/misc/freetype/imgui_freetype.h index cc58ba6ab..b4e1d4893 100644 --- a/cimgui/imgui/misc/freetype/imgui_freetype.h +++ b/cimgui/imgui/misc/freetype/imgui_freetype.h @@ -43,9 +43,8 @@ namespace ImGuiFreeType IMGUI_API void SetAllocatorFunctions(void* (*alloc_func)(size_t sz, void* user_data), void (*free_func)(void* ptr, void* user_data), void* user_data = nullptr); // Obsolete names (will be removed soon) - // Prefer using '#define IMGUI_ENABLE_FREETYPE' #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS - static inline bool BuildFontAtlas(ImFontAtlas* atlas, unsigned int flags = 0) { atlas->FontBuilderIO = GetBuilderForFreeType(); atlas->FontBuilderFlags = flags; return atlas->Build(); } + //static inline bool BuildFontAtlas(ImFontAtlas* atlas, unsigned int flags = 0) { atlas->FontBuilderIO = GetBuilderForFreeType(); atlas->FontBuilderFlags = flags; return atlas->Build(); } // Prefer using '#define IMGUI_ENABLE_FREETYPE' #endif } diff --git a/cimgui/imnodes/imnodes.cpp b/cimgui/imnodes/imnodes.cpp index bf3704287..bf6be14f7 100644 --- a/cimgui/imnodes/imnodes.cpp +++ b/cimgui/imnodes/imnodes.cpp @@ -2648,35 +2648,35 @@ struct ImNodesStyleVarInfo static const ImNodesStyleVarInfo GStyleVarInfo[] = { // ImNodesStyleVar_GridSpacing - {ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImNodesStyle, GridSpacing)}, + {ImGuiDataType_Float, 1, (ImU32)offsetof(ImNodesStyle, GridSpacing)}, // ImNodesStyleVar_NodeCornerRounding - {ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImNodesStyle, NodeCornerRounding)}, + {ImGuiDataType_Float, 1, (ImU32)offsetof(ImNodesStyle, NodeCornerRounding)}, // ImNodesStyleVar_NodePadding - {ImGuiDataType_Float, 2, (ImU32)IM_OFFSETOF(ImNodesStyle, NodePadding)}, + {ImGuiDataType_Float, 2, (ImU32)offsetof(ImNodesStyle, NodePadding)}, // ImNodesStyleVar_NodeBorderThickness - {ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImNodesStyle, NodeBorderThickness)}, + {ImGuiDataType_Float, 1, (ImU32)offsetof(ImNodesStyle, NodeBorderThickness)}, // ImNodesStyleVar_LinkThickness - {ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImNodesStyle, LinkThickness)}, + {ImGuiDataType_Float, 1, (ImU32)offsetof(ImNodesStyle, LinkThickness)}, // ImNodesStyleVar_LinkLineSegmentsPerLength - {ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImNodesStyle, LinkLineSegmentsPerLength)}, + {ImGuiDataType_Float, 1, (ImU32)offsetof(ImNodesStyle, LinkLineSegmentsPerLength)}, // ImNodesStyleVar_LinkHoverDistance - {ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImNodesStyle, LinkHoverDistance)}, + {ImGuiDataType_Float, 1, (ImU32)offsetof(ImNodesStyle, LinkHoverDistance)}, // ImNodesStyleVar_PinCircleRadius - {ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImNodesStyle, PinCircleRadius)}, + {ImGuiDataType_Float, 1, (ImU32)offsetof(ImNodesStyle, PinCircleRadius)}, // ImNodesStyleVar_PinQuadSideLength - {ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImNodesStyle, PinQuadSideLength)}, + {ImGuiDataType_Float, 1, (ImU32)offsetof(ImNodesStyle, PinQuadSideLength)}, // ImNodesStyleVar_PinTriangleSideLength - {ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImNodesStyle, PinTriangleSideLength)}, + {ImGuiDataType_Float, 1, (ImU32)offsetof(ImNodesStyle, PinTriangleSideLength)}, // ImNodesStyleVar_PinLineThickness - {ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImNodesStyle, PinLineThickness)}, + {ImGuiDataType_Float, 1, (ImU32)offsetof(ImNodesStyle, PinLineThickness)}, // ImNodesStyleVar_PinHoverRadius - {ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImNodesStyle, PinHoverRadius)}, + {ImGuiDataType_Float, 1, (ImU32)offsetof(ImNodesStyle, PinHoverRadius)}, // ImNodesStyleVar_PinOffset - {ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImNodesStyle, PinOffset)}, + {ImGuiDataType_Float, 1, (ImU32)offsetof(ImNodesStyle, PinOffset)}, // ImNodesStyleVar_MiniMapPadding - {ImGuiDataType_Float, 2, (ImU32)IM_OFFSETOF(ImNodesStyle, MiniMapPadding)}, + {ImGuiDataType_Float, 2, (ImU32)offsetof(ImNodesStyle, MiniMapPadding)}, // ImNodesStyleVar_MiniMapOffset - {ImGuiDataType_Float, 2, (ImU32)IM_OFFSETOF(ImNodesStyle, MiniMapOffset)}, + {ImGuiDataType_Float, 2, (ImU32)offsetof(ImNodesStyle, MiniMapOffset)}, }; static const ImNodesStyleVarInfo* GetStyleVarInfo(ImNodesStyleVar idx) diff --git a/cimgui/implot/implot.cpp b/cimgui/implot/implot.cpp index 558767245..597b043b5 100644 --- a/cimgui/implot/implot.cpp +++ b/cimgui/implot/implot.cpp @@ -31,7 +31,7 @@ Below is a change-log of API breaking changes only. If you are using one of the When you are not sure about a old symbol or function name, try using the Search/Find function of your IDE to look for comments or references in all implot files. You can read releases logs https://github.com/epezent/implot/releases for more details. -- 2023/08/20 (0.17) - ImPlotFlags_NoChild was removed as child windows are no longer needed to capture scroll. You can safely remove this flag if you were using it. +- 2023/08/20 (0.17) - ImPlotFlags_NoChild was removed as child windows are no longer needed to capture scroll. You can safely remove this flag if you were using it. - 2023/06/26 (0.15) - Various build fixes related to updates in Dear ImGui internals. - 2022/11/25 (0.15) - Make PlotText honor ImPlotItemFlags_NoFit. - 2022/06/19 (0.14) - The signature of ColormapScale has changed to accommodate a new ImPlotColormapScaleFlags parameter @@ -293,35 +293,35 @@ struct ImPlotStyleVarInfo { static const ImPlotStyleVarInfo GPlotStyleVarInfo[] = { - { ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImPlotStyle, LineWeight) }, // ImPlotStyleVar_LineWeight - { ImGuiDataType_S32, 1, (ImU32)IM_OFFSETOF(ImPlotStyle, Marker) }, // ImPlotStyleVar_Marker - { ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImPlotStyle, MarkerSize) }, // ImPlotStyleVar_MarkerSize - { ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImPlotStyle, MarkerWeight) }, // ImPlotStyleVar_MarkerWeight - { ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImPlotStyle, FillAlpha) }, // ImPlotStyleVar_FillAlpha - { ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImPlotStyle, ErrorBarSize) }, // ImPlotStyleVar_ErrorBarSize - { ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImPlotStyle, ErrorBarWeight) }, // ImPlotStyleVar_ErrorBarWeight - { ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImPlotStyle, DigitalBitHeight) }, // ImPlotStyleVar_DigitalBitHeight - { ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImPlotStyle, DigitalBitGap) }, // ImPlotStyleVar_DigitalBitGap - - { ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImPlotStyle, PlotBorderSize) }, // ImPlotStyleVar_PlotBorderSize - { ImGuiDataType_Float, 1, (ImU32)IM_OFFSETOF(ImPlotStyle, MinorAlpha) }, // ImPlotStyleVar_MinorAlpha - { ImGuiDataType_Float, 2, (ImU32)IM_OFFSETOF(ImPlotStyle, MajorTickLen) }, // ImPlotStyleVar_MajorTickLen - { ImGuiDataType_Float, 2, (ImU32)IM_OFFSETOF(ImPlotStyle, MinorTickLen) }, // ImPlotStyleVar_MinorTickLen - { ImGuiDataType_Float, 2, (ImU32)IM_OFFSETOF(ImPlotStyle, MajorTickSize) }, // ImPlotStyleVar_MajorTickSize - { ImGuiDataType_Float, 2, (ImU32)IM_OFFSETOF(ImPlotStyle, MinorTickSize) }, // ImPlotStyleVar_MinorTickSize - { ImGuiDataType_Float, 2, (ImU32)IM_OFFSETOF(ImPlotStyle, MajorGridSize) }, // ImPlotStyleVar_MajorGridSize - { ImGuiDataType_Float, 2, (ImU32)IM_OFFSETOF(ImPlotStyle, MinorGridSize) }, // ImPlotStyleVar_MinorGridSize - { ImGuiDataType_Float, 2, (ImU32)IM_OFFSETOF(ImPlotStyle, PlotPadding) }, // ImPlotStyleVar_PlotPadding - { ImGuiDataType_Float, 2, (ImU32)IM_OFFSETOF(ImPlotStyle, LabelPadding) }, // ImPlotStyleVar_LabelPaddine - { ImGuiDataType_Float, 2, (ImU32)IM_OFFSETOF(ImPlotStyle, LegendPadding) }, // ImPlotStyleVar_LegendPadding - { ImGuiDataType_Float, 2, (ImU32)IM_OFFSETOF(ImPlotStyle, LegendInnerPadding) }, // ImPlotStyleVar_LegendInnerPadding - { ImGuiDataType_Float, 2, (ImU32)IM_OFFSETOF(ImPlotStyle, LegendSpacing) }, // ImPlotStyleVar_LegendSpacing - - { ImGuiDataType_Float, 2, (ImU32)IM_OFFSETOF(ImPlotStyle, MousePosPadding) }, // ImPlotStyleVar_MousePosPadding - { ImGuiDataType_Float, 2, (ImU32)IM_OFFSETOF(ImPlotStyle, AnnotationPadding) }, // ImPlotStyleVar_AnnotationPadding - { ImGuiDataType_Float, 2, (ImU32)IM_OFFSETOF(ImPlotStyle, FitPadding) }, // ImPlotStyleVar_FitPadding - { ImGuiDataType_Float, 2, (ImU32)IM_OFFSETOF(ImPlotStyle, PlotDefaultSize) }, // ImPlotStyleVar_PlotDefaultSize - { ImGuiDataType_Float, 2, (ImU32)IM_OFFSETOF(ImPlotStyle, PlotMinSize) } // ImPlotStyleVar_PlotMinSize + { ImGuiDataType_Float, 1, (ImU32)offsetof(ImPlotStyle, LineWeight) }, // ImPlotStyleVar_LineWeight + { ImGuiDataType_S32, 1, (ImU32)offsetof(ImPlotStyle, Marker) }, // ImPlotStyleVar_Marker + { ImGuiDataType_Float, 1, (ImU32)offsetof(ImPlotStyle, MarkerSize) }, // ImPlotStyleVar_MarkerSize + { ImGuiDataType_Float, 1, (ImU32)offsetof(ImPlotStyle, MarkerWeight) }, // ImPlotStyleVar_MarkerWeight + { ImGuiDataType_Float, 1, (ImU32)offsetof(ImPlotStyle, FillAlpha) }, // ImPlotStyleVar_FillAlpha + { ImGuiDataType_Float, 1, (ImU32)offsetof(ImPlotStyle, ErrorBarSize) }, // ImPlotStyleVar_ErrorBarSize + { ImGuiDataType_Float, 1, (ImU32)offsetof(ImPlotStyle, ErrorBarWeight) }, // ImPlotStyleVar_ErrorBarWeight + { ImGuiDataType_Float, 1, (ImU32)offsetof(ImPlotStyle, DigitalBitHeight) }, // ImPlotStyleVar_DigitalBitHeight + { ImGuiDataType_Float, 1, (ImU32)offsetof(ImPlotStyle, DigitalBitGap) }, // ImPlotStyleVar_DigitalBitGap + + { ImGuiDataType_Float, 1, (ImU32)offsetof(ImPlotStyle, PlotBorderSize) }, // ImPlotStyleVar_PlotBorderSize + { ImGuiDataType_Float, 1, (ImU32)offsetof(ImPlotStyle, MinorAlpha) }, // ImPlotStyleVar_MinorAlpha + { ImGuiDataType_Float, 2, (ImU32)offsetof(ImPlotStyle, MajorTickLen) }, // ImPlotStyleVar_MajorTickLen + { ImGuiDataType_Float, 2, (ImU32)offsetof(ImPlotStyle, MinorTickLen) }, // ImPlotStyleVar_MinorTickLen + { ImGuiDataType_Float, 2, (ImU32)offsetof(ImPlotStyle, MajorTickSize) }, // ImPlotStyleVar_MajorTickSize + { ImGuiDataType_Float, 2, (ImU32)offsetof(ImPlotStyle, MinorTickSize) }, // ImPlotStyleVar_MinorTickSize + { ImGuiDataType_Float, 2, (ImU32)offsetof(ImPlotStyle, MajorGridSize) }, // ImPlotStyleVar_MajorGridSize + { ImGuiDataType_Float, 2, (ImU32)offsetof(ImPlotStyle, MinorGridSize) }, // ImPlotStyleVar_MinorGridSize + { ImGuiDataType_Float, 2, (ImU32)offsetof(ImPlotStyle, PlotPadding) }, // ImPlotStyleVar_PlotPadding + { ImGuiDataType_Float, 2, (ImU32)offsetof(ImPlotStyle, LabelPadding) }, // ImPlotStyleVar_LabelPaddine + { ImGuiDataType_Float, 2, (ImU32)offsetof(ImPlotStyle, LegendPadding) }, // ImPlotStyleVar_LegendPadding + { ImGuiDataType_Float, 2, (ImU32)offsetof(ImPlotStyle, LegendInnerPadding) }, // ImPlotStyleVar_LegendInnerPadding + { ImGuiDataType_Float, 2, (ImU32)offsetof(ImPlotStyle, LegendSpacing) }, // ImPlotStyleVar_LegendSpacing + + { ImGuiDataType_Float, 2, (ImU32)offsetof(ImPlotStyle, MousePosPadding) }, // ImPlotStyleVar_MousePosPadding + { ImGuiDataType_Float, 2, (ImU32)offsetof(ImPlotStyle, AnnotationPadding) }, // ImPlotStyleVar_AnnotationPadding + { ImGuiDataType_Float, 2, (ImU32)offsetof(ImPlotStyle, FitPadding) }, // ImPlotStyleVar_FitPadding + { ImGuiDataType_Float, 2, (ImU32)offsetof(ImPlotStyle, PlotDefaultSize) }, // ImPlotStyleVar_PlotDefaultSize + { ImGuiDataType_Float, 2, (ImU32)offsetof(ImPlotStyle, PlotMinSize) } // ImPlotStyleVar_PlotMinSize }; static const ImPlotStyleVarInfo* GetPlotStyleVarInfo(ImPlotStyleVar idx) { @@ -341,8 +341,8 @@ void AddTextVertical(ImDrawList *DrawList, ImVec2 pos, ImU32 col, const char *te ImGuiContext& g = *GImGui; ImFont* font = g.Font; // Align to be pixel perfect - pos.x = IM_FLOOR(pos.x); - pos.y = IM_FLOOR(pos.y); + pos.x = ImFloor(pos.x); + pos.y = ImFloor(pos.y); const float scale = g.FontSize / font->FontSize; const char* s = text_begin; int chars_exp = (int)(text_end - s); @@ -604,10 +604,10 @@ bool ClampLegendRect(ImRect& legend_rect, const ImRect& outer_rect, const ImVec2 if (legend_rect.Max.y > outer_rect_pad.Max.y) { legend_rect.Max.y = outer_rect_pad.Max.y; clamped = true; - } + } return clamped; } - + int LegendSortingComp(const void* _a, const void* _b) { ImPlotItemGroup* items = GImPlot->SortItems; const int a = *(const int*)_a; @@ -1982,9 +1982,9 @@ bool UpdateInput(ImPlotPlot& plot) { if (any_hov && ImHasFlag(IO.KeyMods, gp.InputMap.ZoomMod)) { float zoom_rate = gp.InputMap.ZoomRate; - if (IO.MouseWheel == 0.0f) - zoom_rate = 0; - else if (IO.MouseWheel > 0) + if (IO.MouseWheel == 0.0f) + zoom_rate = 0; + else if (IO.MouseWheel > 0) zoom_rate = (-zoom_rate) / (1.0f + (2.0f * zoom_rate)); ImVec2 rect_size = plot.PlotRect.GetSize(); float tx = ImRemap(IO.MousePos.x, plot.PlotRect.Min.x, plot.PlotRect.Max.x, 0.0f, 1.0f); @@ -2451,7 +2451,7 @@ bool BeginPlot(const char* title_id, const ImVec2& size, ImPlotFlags flags) { ResetCtxForNextPlot(GImPlot); return false; } - + // setup items (or dont) if (gp.CurrentItems == nullptr) gp.CurrentItems = &plot.Items; @@ -2778,7 +2778,7 @@ void EndPlot() { // FINAL RENDER ----------------------------------------------------------- - const bool render_border = gp.Style.PlotBorderSize > 0 && gp.Style.Colors[ImPlotCol_PlotBorder].w > 0; + const bool render_border = gp.Style.PlotBorderSize > 0 && GetStyleColorVec4(ImPlotCol_PlotBorder).w > 0; const bool any_x_held = plot.Held || AnyAxesHeld(&plot.Axes[ImAxis_X1], IMPLOT_NUM_X_AXES); const bool any_y_held = plot.Held || AnyAxesHeld(&plot.Axes[ImAxis_Y1], IMPLOT_NUM_Y_AXES); @@ -3047,7 +3047,7 @@ void EndPlot() { const bool legend_scrollable = ClampLegendRect(legend.RectClamped, legend_out ? plot.FrameRect : plot.PlotRect, legend_out ? gp.Style.PlotPadding : gp.Style.LegendPadding - ); + ); const ImGuiButtonFlags legend_button_flags = ImGuiButtonFlags_AllowOverlap | ImGuiButtonFlags_PressedOnClick | ImGuiButtonFlags_PressedOnDoubleClick @@ -3058,7 +3058,7 @@ void EndPlot() { ImGui::KeepAliveID(plot.Items.ID); ImGui::ButtonBehavior(legend.RectClamped, plot.Items.ID, &legend.Hovered, &legend.Held, legend_button_flags); legend.Hovered = legend.Hovered || (ImGui::IsWindowHovered() && legend.RectClamped.Contains(IO.MousePos)); - + if (legend_scrollable) { if (legend.Hovered) { ImGui::SetKeyOwner(ImGuiKey_MouseWheelY, plot.Items.ID); @@ -3069,10 +3069,10 @@ void EndPlot() { legend.Scroll.x += scroll_step * IO.MouseWheel; legend.Scroll.y += scroll_step * IO.MouseWheel; } - } + } const ImVec2 min_scroll_offset = legend.RectClamped.GetSize() - legend.Rect.GetSize(); legend.Scroll.x = ImClamp(legend.Scroll.x, min_scroll_offset.x, 0.0f); - legend.Scroll.y = ImClamp(legend.Scroll.y, min_scroll_offset.y, 0.0f); + legend.Scroll.y = ImClamp(legend.Scroll.y, min_scroll_offset.y, 0.0f); const ImVec2 scroll_offset = legend_horz ? ImVec2(legend.Scroll.x, 0) : ImVec2(0, legend.Scroll.y); ImVec2 legend_offset = legend.RectClamped.Min - legend.Rect.Min + scroll_offset; legend.Rect.Min += legend_offset; @@ -3082,18 +3082,18 @@ void EndPlot() { } const ImU32 col_bg = GetStyleColorU32(ImPlotCol_LegendBg); - const ImU32 col_bd = GetStyleColorU32(ImPlotCol_LegendBorder); - ImGui::PushClipRect(legend.RectClamped.Min, legend.RectClamped.Max, true); - DrawList.AddRectFilled(legend.RectClamped.Min, legend.RectClamped.Max, col_bg); + const ImU32 col_bd = GetStyleColorU32(ImPlotCol_LegendBorder); + ImGui::PushClipRect(legend.RectClamped.Min, legend.RectClamped.Max, true); + DrawList.AddRectFilled(legend.RectClamped.Min, legend.RectClamped.Max, col_bg); bool legend_contextable = ShowLegendEntries(plot.Items, legend.Rect, legend.Hovered, gp.Style.LegendInnerPadding, gp.Style.LegendSpacing, !legend_horz, DrawList) - && !ImHasFlag(legend.Flags, ImPlotLegendFlags_NoMenus); + && !ImHasFlag(legend.Flags, ImPlotLegendFlags_NoMenus); DrawList.AddRect(legend.RectClamped.Min, legend.RectClamped.Max, col_bd); ImGui::PopClipRect(); // main ctx menu if (gp.OpenContextThisFrame && legend_contextable && !ImHasFlag(plot.Flags, ImPlotFlags_NoMenus)) - ImGui::OpenPopup("##LegendContext"); - + ImGui::OpenPopup("##LegendContext"); + if (ImGui::BeginPopup("##LegendContext")) { ImGui::Text("Legend"); ImGui::Separator(); if (ShowLegendContextMenu(legend, !ImHasFlag(plot.Flags, ImPlotFlags_NoLegend))) @@ -3566,7 +3566,7 @@ void EndSubplots() { const ImVec2 legend_pos = GetLocationPos(subplot.FrameRect, legend_size, legend.Location, gp.Style.PlotPadding); legend.Rect = ImRect(legend_pos, legend_pos + legend_size); legend.RectClamped = legend.Rect; - const bool legend_scrollable = ClampLegendRect(legend.RectClamped,subplot.FrameRect, gp.Style.PlotPadding); + const bool legend_scrollable = ClampLegendRect(legend.RectClamped,subplot.FrameRect, gp.Style.PlotPadding); const ImGuiButtonFlags legend_button_flags = ImGuiButtonFlags_AllowOverlap | ImGuiButtonFlags_PressedOnClick | ImGuiButtonFlags_PressedOnDoubleClick @@ -3577,7 +3577,7 @@ void EndSubplots() { ImGui::KeepAliveID(subplot.Items.ID); ImGui::ButtonBehavior(legend.RectClamped, subplot.Items.ID, &legend.Hovered, &legend.Held, legend_button_flags); legend.Hovered = legend.Hovered || (subplot.FrameHovered && legend.RectClamped.Contains(ImGui::GetIO().MousePos)); - + if (legend_scrollable) { if (legend.Hovered) { ImGui::SetKeyOwner(ImGuiKey_MouseWheelY, subplot.Items.ID); @@ -3588,10 +3588,10 @@ void EndSubplots() { legend.Scroll.x += scroll_step * IO.MouseWheel; legend.Scroll.y += scroll_step * IO.MouseWheel; } - } + } const ImVec2 min_scroll_offset = legend.RectClamped.GetSize() - legend.Rect.GetSize(); legend.Scroll.x = ImClamp(legend.Scroll.x, min_scroll_offset.x, 0.0f); - legend.Scroll.y = ImClamp(legend.Scroll.y, min_scroll_offset.y, 0.0f); + legend.Scroll.y = ImClamp(legend.Scroll.y, min_scroll_offset.y, 0.0f); const ImVec2 scroll_offset = legend_horz ? ImVec2(legend.Scroll.x, 0) : ImVec2(0, legend.Scroll.y); ImVec2 legend_offset = legend.RectClamped.Min - legend.Rect.Min + scroll_offset; legend.Rect.Min += legend_offset; @@ -3602,13 +3602,13 @@ void EndSubplots() { const ImU32 col_bg = GetStyleColorU32(ImPlotCol_LegendBg); const ImU32 col_bd = GetStyleColorU32(ImPlotCol_LegendBorder); - ImGui::PushClipRect(legend.RectClamped.Min, legend.RectClamped.Max, true); - DrawList.AddRectFilled(legend.RectClamped.Min, legend.RectClamped.Max, col_bg); + ImGui::PushClipRect(legend.RectClamped.Min, legend.RectClamped.Max, true); + DrawList.AddRectFilled(legend.RectClamped.Min, legend.RectClamped.Max, col_bg); bool legend_contextable = ShowLegendEntries(subplot.Items, legend.Rect, legend.Hovered, gp.Style.LegendInnerPadding, gp.Style.LegendSpacing, !legend_horz, DrawList) && !ImHasFlag(legend.Flags, ImPlotLegendFlags_NoMenus); DrawList.AddRect(legend.RectClamped.Min, legend.RectClamped.Max, col_bd); ImGui::PopClipRect(); - + if (legend_contextable && !ImHasFlag(subplot.Flags, ImPlotSubplotFlags_NoMenus) && ImGui::GetIO().MouseReleased[gp.InputMap.Menu]) ImGui::OpenPopup("##LegendContext"); if (ImGui::BeginPopup("##LegendContext")) { diff --git a/cimgui/implot/implot.h b/cimgui/implot/implot.h index 2c580029a..305433123 100644 --- a/cimgui/implot/implot.h +++ b/cimgui/implot/implot.h @@ -286,8 +286,9 @@ enum ImPlotInfLinesFlags_ { // Flags for PlotPieChart enum ImPlotPieChartFlags_ { - ImPlotPieChartFlags_None = 0, // default - ImPlotPieChartFlags_Normalize = 1 << 10 // force normalization of pie chart values (i.e. always make a full circle if sum < 0) + ImPlotPieChartFlags_None = 0, // default + ImPlotPieChartFlags_Normalize = 1 << 10, // force normalization of pie chart values (i.e. always make a full circle if sum < 0) + ImPlotPieChartFlags_IgnoreHidden = 1 << 11 // ignore hidden slices when drawing the pie chart (as if they were not there) }; // Flags for PlotHeatmap @@ -892,6 +893,7 @@ IMPLOT_TMP void PlotStems(const char* label_id, const T* xs, const T* ys, int co IMPLOT_TMP void PlotInfLines(const char* label_id, const T* values, int count, ImPlotInfLinesFlags flags=0, int offset=0, int stride=sizeof(T)); // Plots a pie chart. Center and radius are in plot units. #label_fmt can be set to nullptr for no labels. +IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data=nullptr, double angle0=90, ImPlotPieChartFlags flags=0); IMPLOT_TMP void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, const char* label_fmt="%.1f", double angle0=90, ImPlotPieChartFlags flags=0); // Plots a 2D heatmap chart. Values are expected to be in row-major order by default. Leave #scale_min and scale_max both at 0 for automatic color scaling, or set them to a predefined range. #label_fmt can be set to nullptr for no labels. diff --git a/cimgui/implot/implot_demo.cpp b/cimgui/implot/implot_demo.cpp index ddc325beb..c72ffd048 100644 --- a/cimgui/implot/implot_demo.cpp +++ b/cimgui/implot/implot_demo.cpp @@ -610,10 +610,8 @@ void Demo_PieCharts() { static ImPlotPieChartFlags flags = 0; ImGui::SetNextItemWidth(250); ImGui::DragFloat4("Values", data1, 0.01f, 0, 1); - if ((data1[0] + data1[1] + data1[2] + data1[3]) < 1) { - ImGui::SameLine(); - CHECKBOX_FLAG(flags,ImPlotPieChartFlags_Normalize); - } + CHECKBOX_FLAG(flags, ImPlotPieChartFlags_Normalize); + CHECKBOX_FLAG(flags, ImPlotPieChartFlags_IgnoreHidden); if (ImPlot::BeginPlot("##Pie1", ImVec2(250,250), ImPlotFlags_Equal | ImPlotFlags_NoMouseText)) { ImPlot::SetupAxes(nullptr, nullptr, ImPlotAxisFlags_NoDecorations, ImPlotAxisFlags_NoDecorations); @@ -1388,7 +1386,7 @@ void Demo_LegendOptions() { static int num_dummy_items = 25; ImGui::SliderInt("Num Dummy Items (Demo Scrolling)", &num_dummy_items, 0, 100); - + if (ImPlot::BeginPlot("##Legend",ImVec2(-1,0))) { ImPlot::SetupLegend(loc, flags); static MyImPlot::WaveData data1(0.001, 0.2, 4, 0.2); @@ -1407,11 +1405,11 @@ void Demo_LegendOptions() { char label[16]; snprintf(label, sizeof(label), "Item %03d", i+4); ImPlot::PlotDummy(label); - } + } ImPlot::EndPlot(); } -} - +} + //----------------------------------------------------------------------------- void Demo_DragPoints() { diff --git a/cimgui/implot/implot_internal.h b/cimgui/implot/implot_internal.h index 8c1650ef1..cd05478f2 100644 --- a/cimgui/implot/implot_internal.h +++ b/cimgui/implot/implot_internal.h @@ -1417,7 +1417,7 @@ IMPLOT_API ImVec2 GetLocationPos(const ImRect& outer_rect, const ImVec2& inner_s // Calculates the bounding box size of a legend _before_ clipping. IMPLOT_API ImVec2 CalcLegendSize(ImPlotItemGroup& items, const ImVec2& pad, const ImVec2& spacing, bool vertical); // Clips calculated legend size -IMPLOT_API bool ClampLegendRect(ImRect& legend_rect, const ImRect& outer_rect, const ImVec2& pad); +IMPLOT_API bool ClampLegendRect(ImRect& legend_rect, const ImRect& outer_rect, const ImVec2& pad); // Renders legend entries into a bounding box IMPLOT_API bool ShowLegendEntries(ImPlotItemGroup& items, const ImRect& legend_bb, bool interactable, const ImVec2& pad, const ImVec2& spacing, bool vertical, ImDrawList& DrawList); // Shows an alternate legend for the plot identified by #title_id, outside of the plot frame (can be called before or after of Begin/EndPlot but must occur in the same ImGui window! This is not thoroughly tested nor scrollable!). diff --git a/cimgui/implot/implot_items.cpp b/cimgui/implot/implot_items.cpp index 818054156..1871d15cb 100644 --- a/cimgui/implot/implot_items.cpp +++ b/cimgui/implot/implot_items.cpp @@ -2216,57 +2216,121 @@ IMPLOT_INLINE void RenderPieSlice(ImDrawList& draw_list, const ImPlotPoint& cent } template -void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, const char* fmt, double angle0, ImPlotPieChartFlags flags) { - IM_ASSERT_USER_ERROR(GImPlot->CurrentPlot != nullptr, "PlotPieChart() needs to be called between BeginPlot() and EndPlot()!"); - ImDrawList & draw_list = *GetPlotDrawList(); +double PieChartSum(const T* values, int count, bool ignore_hidden) { double sum = 0; - for (int i = 0; i < count; ++i) - sum += (double)values[i]; - const bool normalize = ImHasFlag(flags,ImPlotPieChartFlags_Normalize) || sum > 1.0; - ImPlotPoint center(x,y); - PushPlotClipRect(); + if (ignore_hidden) { + ImPlotContext& gp = *GImPlot; + ImPlotItemGroup& Items = *gp.CurrentItems; + for (int i = 0; i < count; ++i) { + if (i >= Items.GetItemCount()) + break; + + ImPlotItem* item = Items.GetItemByIndex(i); + IM_ASSERT(item != nullptr); + if (item->Show) { + sum += (double)values[i]; + } + } + } + else { + for (int i = 0; i < count; ++i) { + sum += (double)values[i]; + } + } + return sum; +} + +template +void PlotPieChartEx(const char* const label_ids[], const T* values, int count, ImPlotPoint center, double radius, double angle0, ImPlotPieChartFlags flags) { + ImDrawList& draw_list = *GetPlotDrawList(); + + const bool ignore_hidden = ImHasFlag(flags, ImPlotPieChartFlags_IgnoreHidden); + const double sum = PieChartSum(values, count, ignore_hidden); + const bool normalize = ImHasFlag(flags, ImPlotPieChartFlags_Normalize) || sum > 1.0; + double a0 = angle0 * 2 * IM_PI / 360.0; double a1 = angle0 * 2 * IM_PI / 360.0; - ImPlotPoint Pmin = ImPlotPoint(x-radius,y-radius); - ImPlotPoint Pmax = ImPlotPoint(x+radius,y+radius); + ImPlotPoint Pmin = ImPlotPoint(center.x - radius, center.y - radius); + ImPlotPoint Pmax = ImPlotPoint(center.x + radius, center.y + radius); for (int i = 0; i < count; ++i) { - double percent = normalize ? (double)values[i] / sum : (double)values[i]; - a1 = a0 + 2 * IM_PI * percent; - if (BeginItemEx(label_ids[i], FitterRect(Pmin,Pmax))) { - ImU32 col = GetCurrentItem()->Color; - if (percent < 0.5) { - RenderPieSlice(draw_list, center, radius, a0, a1, col); - } - else { - RenderPieSlice(draw_list, center, radius, a0, a0 + (a1 - a0) * 0.5, col); - RenderPieSlice(draw_list, center, radius, a0 + (a1 - a0) * 0.5, a1, col); + ImPlotItem* item = GetItem(label_ids[i]); + + const double percent = normalize ? (double)values[i] / sum : (double)values[i]; + const bool skip = sum <= 0.0 || (ignore_hidden && item != nullptr && !item->Show); + if (!skip) + a1 = a0 + 2 * IM_PI * percent; + + if (BeginItemEx(label_ids[i], FitterRect(Pmin, Pmax))) { + if (sum > 0.0) { + ImU32 col = GetCurrentItem()->Color; + if (percent < 0.5) { + RenderPieSlice(draw_list, center, radius, a0, a1, col); + } + else { + RenderPieSlice(draw_list, center, radius, a0, a0 + (a1 - a0) * 0.5, col); + RenderPieSlice(draw_list, center, radius, a0 + (a1 - a0) * 0.5, a1, col); + } } EndItem(); } - a0 = a1; + if (!skip) + a0 = a1; } +} + +int PieChartFormatter(double value, char* buff, int size, void* data) { + const char* fmt = (const char*)data; + return snprintf(buff, size, fmt, value); +}; + +template +void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, const char* fmt, double angle0, ImPlotPieChartFlags flags) { + PlotPieChart(label_ids, values, count, x, y, radius, PieChartFormatter, (void*)fmt, angle0, flags); +} +#define INSTANTIATE_MACRO(T) template IMPLOT_API void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, const char* fmt, double angle0, ImPlotPieChartFlags flags); +CALL_INSTANTIATE_FOR_NUMERIC_TYPES() +#undef INSTANTIATE_MACRO + +template +void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data, double angle0, ImPlotPieChartFlags flags) { + IM_ASSERT_USER_ERROR(GImPlot->CurrentPlot != nullptr, "PlotPieChart() needs to be called between BeginPlot() and EndPlot()!"); + ImDrawList& draw_list = *GetPlotDrawList(); + + const bool ignore_hidden = ImHasFlag(flags, ImPlotPieChartFlags_IgnoreHidden); + const double sum = PieChartSum(values, count, ignore_hidden); + const bool normalize = ImHasFlag(flags, ImPlotPieChartFlags_Normalize) || sum > 1.0; + ImPlotPoint center(x, y); + + PushPlotClipRect(); + PlotPieChartEx(label_ids, values, count, center, radius, angle0, flags); if (fmt != nullptr) { - a0 = angle0 * 2 * IM_PI / 360.0; - a1 = angle0 * 2 * IM_PI / 360.0; + double a0 = angle0 * 2 * IM_PI / 360.0; + double a1 = angle0 * 2 * IM_PI / 360.0; char buffer[32]; for (int i = 0; i < count; ++i) { ImPlotItem* item = GetItem(label_ids[i]); - double percent = normalize ? (double)values[i] / sum : (double)values[i]; - a1 = a0 + 2 * IM_PI * percent; - if (item->Show) { - ImFormatString(buffer, 32, fmt, (double)values[i]); - ImVec2 size = ImGui::CalcTextSize(buffer); - double angle = a0 + (a1 - a0) * 0.5; - ImVec2 pos = PlotToPixels(center.x + 0.5 * radius * cos(angle), center.y + 0.5 * radius * sin(angle),IMPLOT_AUTO,IMPLOT_AUTO); - ImU32 col = CalcTextColor(ImGui::ColorConvertU32ToFloat4(item->Color)); - draw_list.AddText(pos - size * 0.5f, col, buffer); + IM_ASSERT(item != nullptr); + + const double percent = normalize ? (double)values[i] / sum : (double)values[i]; + const bool skip = ignore_hidden && item != nullptr && !item->Show; + + if (!skip) { + a1 = a0 + 2 * IM_PI * percent; + if (item->Show) { + fmt((double)values[i], buffer, 32, fmt_data); + ImVec2 size = ImGui::CalcTextSize(buffer); + double angle = a0 + (a1 - a0) * 0.5; + ImVec2 pos = PlotToPixels(center.x + 0.5 * radius * cos(angle), center.y + 0.5 * radius * sin(angle), IMPLOT_AUTO, IMPLOT_AUTO); + ImU32 col = CalcTextColor(ImGui::ColorConvertU32ToFloat4(item->Color)); + draw_list.AddText(pos - size * 0.5f, col, buffer); + } + a0 = a1; } - a0 = a1; } } PopPlotClipRect(); } -#define INSTANTIATE_MACRO(T) template IMPLOT_API void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, const char* fmt, double angle0, ImPlotPieChartFlags flags); +#define INSTANTIATE_MACRO(T) template IMPLOT_API void PlotPieChart(const char* const label_ids[], const T* values, int count, double x, double y, double radius, ImPlotFormatter fmt, void* fmt_data, double angle0, ImPlotPieChartFlags flags); CALL_INSTANTIATE_FOR_NUMERIC_TYPES() #undef INSTANTIATE_MACRO @@ -2327,8 +2391,8 @@ struct GetterHeatmapColMaj { { } template IMPLOT_INLINE RectC operator()(I idx) const { double val = (double)Values[idx]; - const int r = idx % Cols; - const int c = idx / Cols; + const int r = idx % Rows; + const int c = idx / Rows; const ImPlotPoint p(XRef + HalfSize.x + c*Width, YRef + YDir * (HalfSize.y + r*Height)); RectC rect; rect.Pos = p; diff --git a/cimgui_enums.go b/cimgui_enums.go index e21330e67..bd5e8c78d 100644 --- a/cimgui_enums.go +++ b/cimgui_enums.go @@ -74,6 +74,10 @@ const ( ActivateFlagsPreferTweak = 2 // Request widget to preserve state if it can (e.g. InputText will try to preserve cursor/selection) ActivateFlagsTryToPreserveState = 4 + // Activation requested by a tabbing request + ActivateFlagsFromTabbing = 8 + // Activation requested by an item shortcut via SetNextItemShortcut() function. + ActivateFlagsFromShortcut = 16 ) // X/Y enums are fixed to 0/1 so they may be used to index ImVec2 @@ -167,6 +171,39 @@ const ( ButtonFlagsMouseButtonDefault = 1 ) +// Flags for ImGui::BeginChild() +// (Legacy: bit 0 must always correspond to ImGuiChildFlags_Border to be backward compatible with old API using 'bool border = false'. +// About using AutoResizeX/AutoResizeY flags: +// - May be combined with SetNextWindowSizeConstraints() to set a min/max size for each axis (see "Demo->Child->Auto-resize with Constraints"). +// - Size measurement for a given axis is only performed when the child window is within visible boundaries, or is just appearing. +// - This allows BeginChild() to return false when not within boundaries (e.g. when scrolling), which is more optimal. BUT it won't update its auto-size while clipped. +// While not perfect, it is a better default behavior as the always-on performance gain is more valuable than the occasional "resizing after becoming visible again" glitch. +// - You may also use ImGuiChildFlags_AlwaysAutoResize to force an update even when child window is not in view. +// HOWEVER PLEASE UNDERSTAND THAT DOING SO WILL PREVENT BeginChild() FROM EVER RETURNING FALSE, disabling benefits of coarse clipping. +// +// original name: ImGuiChildFlags_ +type ChildFlags int32 + +const ( + ChildFlagsNone = 0 + // Show an outer border and enable WindowPadding. (IMPORTANT: this is always == 1 == true for legacy reason) + ChildFlagsBorder = 1 + // Pad with style.WindowPadding even if no border are drawn (no padding by default for non-bordered child windows because it makes more sense) + ChildFlagsAlwaysUseWindowPadding = 2 + // Allow resize from right border (layout direction). Enable .ini saving (unless ImGuiWindowFlags_NoSavedSettings passed to window flags) + ChildFlagsResizeX = 4 + // Allow resize from bottom border (layout direction). " + ChildFlagsResizeY = 8 + // Enable auto-resizing width. Read "IMPORTANT: Size measurement" details above. + ChildFlagsAutoResizeX = 16 + // Enable auto-resizing height. Read "IMPORTANT: Size measurement" details above. + ChildFlagsAutoResizeY = 32 + // Combined with AutoResizeX/AutoResizeY. Always measure size even when child is hidden, always return true, always disable clipping optimization! NOT RECOMMENDED. + ChildFlagsAlwaysAutoResize = 64 + // Style the child window like a framed item: use FrameBg, FrameRounding, FrameBorderSize, FramePadding instead of ChildBg, ChildRounding, ChildBorderSize, WindowPadding. + ChildFlagsFrameStyle = 128 +) + // Enumeration for PushStyleColor() / PopStyleColor() // original name: ImGuiCol_ type Col int32 @@ -183,23 +220,27 @@ const ( ColBorder = 5 ColBorderShadow = 6 // Background of checkbox, radio button, plot, slider, text input - ColFrameBg = 7 - ColFrameBgHovered = 8 - ColFrameBgActive = 9 - ColTitleBg = 10 - ColTitleBgActive = 11 + ColFrameBg = 7 + ColFrameBgHovered = 8 + ColFrameBgActive = 9 + // Title bar + ColTitleBg = 10 + // Title bar when focused + ColTitleBgActive = 11 + // Title bar when collapsed ColTitleBgCollapsed = 12 ColMenuBarBg = 13 ColScrollbarBg = 14 ColScrollbarGrab = 15 ColScrollbarGrabHovered = 16 ColScrollbarGrabActive = 17 - ColCheckMark = 18 - ColSliderGrab = 19 - ColSliderGrabActive = 20 - ColButton = 21 - ColButtonHovered = 22 - ColButtonActive = 23 + // Checkbox tick and RadioButton circle + ColCheckMark = 18 + ColSliderGrab = 19 + ColSliderGrabActive = 20 + ColButton = 21 + ColButtonHovered = 22 + ColButtonActive = 23 // Header* colors are used for CollapsingHeader, TreeNode, Selectable, MenuItem ColHeader = 24 ColHeaderHovered = 25 @@ -336,11 +377,13 @@ const ( // Display on the preview box without the square arrow button ComboFlagsNoArrowButton = 32 // Display only a square arrow button - ComboFlagsNoPreview = 64 - ComboFlagsHeightMask = 30 + ComboFlagsNoPreview = 64 + // Width dynamically calculated from preview contents + ComboFlagsWidthFitPreview = 128 + ComboFlagsHeightMask = 30 ) -// Enumeration for ImGui::SetWindow***(), SetNextWindow***(), SetNextItem***() functions +// Enumeration for ImGui::SetNextWindow***(), SetWindow***(), SetNextItem***() functions // Represent a condition. // Important: Treat as a regular enum! Do NOT combine multiple values using binary operators! All the functions above treat 0 as a shortcut to ImGuiCond_Always. // original name: ImGuiCond_ @@ -457,21 +500,22 @@ const ( type DebugLogFlags int32 const ( - DebugLogFlagsNone = 0 - DebugLogFlagsEventActiveId = 1 - DebugLogFlagsEventFocus = 2 - DebugLogFlagsEventPopup = 4 - DebugLogFlagsEventNav = 8 - DebugLogFlagsEventClipper = 16 - DebugLogFlagsEventSelection = 32 - DebugLogFlagsEventIO = 64 - DebugLogFlagsEventDocking = 128 - DebugLogFlagsEventViewport = 256 - DebugLogFlagsEventMask = 511 + DebugLogFlagsNone = 0 + DebugLogFlagsEventActiveId = 1 + DebugLogFlagsEventFocus = 2 + DebugLogFlagsEventPopup = 4 + DebugLogFlagsEventNav = 8 + DebugLogFlagsEventClipper = 16 + DebugLogFlagsEventSelection = 32 + DebugLogFlagsEventIO = 64 + DebugLogFlagsEventInputRouting = 128 + DebugLogFlagsEventDocking = 256 + DebugLogFlagsEventViewport = 512 + DebugLogFlagsEventMask = 1023 // Also send output to TTY - DebugLogFlagsOutputToTTY = 1024 + DebugLogFlagsOutputToTTY = 1048576 // Also send output to Test Engine - DebugLogFlagsOutputToTestEngine = 2048 + DebugLogFlagsOutputToTestEngine = 2097152 ) // A cardinal direction @@ -508,6 +552,8 @@ const ( DockNodeFlagsNoResizeX = 65536 // // DockNodeFlagsNoResizeY = 131072 + // // Any docked window will be automatically be focus-route chained (window->ParentWindowForFocusRoute set to this) so Shortcut() in this window can run when any docked window is focused. + DockNodeFlagsDockedWindowsInFocusRoute = 262144 // // Disable this node from splitting other windows/nodes. DockNodeFlagsNoDockingSplitOther = 524288 // // Disable other windows/nodes from being docked over this node. @@ -694,13 +740,13 @@ const ( ) // Flags for extended versions of IsKeyPressed(), IsMouseClicked(), Shortcut(), SetKeyOwner(), SetItemKeyOwner() -// Don't mistake with ImGuiInputTextFlags! (for ImGui::InputText() function) +// Don't mistake with ImGuiInputTextFlags! (which is for ImGui::InputText() function) // original name: ImGuiInputFlags_ type InputFlags int32 const ( InputFlagsNone = 0 - // Return true on successive repeats. Default for legacy IsKeyPressed(). NOT Default for legacy IsMouseClicked(). MUST BE == 1. + // Enable repeat. Return true on successive repeats. Default for legacy IsKeyPressed(). NOT Default for legacy IsMouseClicked(). MUST BE == 1. InputFlagsRepeat = 1 // Repeat rate: Regular (default) InputFlagsRepeatRateDefault = 2 @@ -708,36 +754,46 @@ const ( InputFlagsRepeatRateNavMove = 4 // Repeat rate: Faster InputFlagsRepeatRateNavTweak = 8 - InputFlagsRepeatRateMask = 14 + // Stop repeating when released (default for all functions except Shortcut). This only exists to allow overriding Shortcut() default behavior. + InputFlagsRepeatUntilRelease = 16 + // Stop repeating when released OR if keyboard mods are changed (default for Shortcut) + InputFlagsRepeatUntilKeyModsChange = 32 + // Stop repeating when released OR if keyboard mods are leaving the None state. Allows going from Mod+Key to Key by releasing Mod. + InputFlagsRepeatUntilKeyModsChangeFromNone = 64 + // Stop repeating when released OR if any other keyboard key is pressed during the repeat + InputFlagsRepeatUntilOtherKeyPress = 128 // Only set if item is hovered (default to both) - InputFlagsCondHovered = 16 + InputFlagsCondHovered = 256 // Only set if item is active (default to both) - InputFlagsCondActive = 32 - InputFlagsCondDefault = 48 - InputFlagsCondMask = 48 - // Access to key data will require EXPLICIT owner ID (ImGuiKeyOwner_Any/0 will NOT accepted for polling). Cleared at end of frame. This is useful to make input-owner-aware code steal keys from non-input-owner-aware code. - InputFlagsLockThisFrame = 64 - // Access to key data will require EXPLICIT owner ID (ImGuiKeyOwner_Any/0 will NOT accepted for polling). Cleared when the key is released or at end of each frame if key is released. This is useful to make input-owner-aware code steal keys from non-input-owner-aware code. - InputFlagsLockUntilRelease = 128 - // (Default) Register focused route: Accept inputs if window is in focus stack. Deep-most focused window takes inputs. ActiveId takes inputs over deep-most focused window. - InputFlagsRouteFocused = 256 - // Register route globally (lowest priority: unless a focused window or active item registered the route) -> recommended Global priority. - InputFlagsRouteGlobalLow = 512 - // Register route globally (medium priority: unless an active item registered the route, e.g. CTRL+A registered by InputText). - InputFlagsRouteGlobal = 1024 - // Register route globally (highest priority: unlikely you need to use that: will interfere with every active items) - InputFlagsRouteGlobalHigh = 2048 - // _Always not part of this! - InputFlagsRouteMask = 3840 + InputFlagsCondActive = 512 + InputFlagsCondDefault = 768 + // Further accesses to key data will require EXPLICIT owner ID (ImGuiKeyOwner_Any/0 will NOT accepted for polling). Cleared at end of frame. + InputFlagsLockThisFrame = 1024 + // Further accesses to key data will require EXPLICIT owner ID (ImGuiKeyOwner_Any/0 will NOT accepted for polling). Cleared when the key is released or at end of each frame if key is released. + InputFlagsLockUntilRelease = 2048 + // (Default) Honor focus route: Accept inputs if window is in focus stack. Deep-most focused window takes inputs. ActiveId takes inputs over deep-most focused window. + InputFlagsRouteFocused = 4096 + // Register route globally (lowest priority: unless a focused window or active item registered the route) -> recommended Global priority IF you need a Global priority. + InputFlagsRouteGlobalLow = 8192 + // Register route globally (medium priority: unless an active item registered the route, e.g. CTRL+A registered by InputText will take priority over this). + InputFlagsRouteGlobal = 16384 + // Register route globally (higher priority: unlikely you need to use that: will interfere with every active items, e.g. CTRL+A registered by InputText will be overriden by this) + InputFlagsRouteGlobalHigh = 32768 // Do not register route, poll keys directly. - InputFlagsRouteAlways = 4096 + InputFlagsRouteAlways = 65536 // Global routes will not be applied if underlying background/void is focused (== no Dear ImGui windows are focused). Useful for overlay applications. - InputFlagsRouteUnlessBgFocused = 8192 - InputFlagsRouteExtraMask = 12288 - InputFlagsSupportedByIsKeyPressed = 15 - InputFlagsSupportedByShortcut = 16143 - InputFlagsSupportedBySetKeyOwner = 192 - InputFlagsSupportedBySetItemKeyOwner = 240 + InputFlagsRouteUnlessBgFocused = 131072 + InputFlagsRepeatRateMask = 14 + InputFlagsRepeatUntilMask = 240 + InputFlagsRepeatMask = 255 + InputFlagsCondMask = 768 + // _Always not part of this! + InputFlagsRouteMask = 61440 + InputFlagsSupportedByIsKeyPressed = 255 + InputFlagsSupportedByIsMouseClicked = 1 + InputFlagsSupportedByShortcut = 258303 + InputFlagsSupportedBySetKeyOwner = 3072 + InputFlagsSupportedBySetItemKeyOwner = 3840 ) // original name: ImGuiInputSource @@ -877,10 +933,10 @@ const ( ItemStatusFlagsDeactivated = 64 // Override the HoveredWindow test to allow cross-window hover testing. ItemStatusFlagsHoveredWindow = 128 - // Set when the Focusable item just got focused by Tabbing (FIXME: to be removed soon) - ItemStatusFlagsFocusedByTabbing = 256 // [WIP] Set when item is overlapping the current clipping rectangle (Used internally. Please don't use yet: API/system will change as we refactor Itemadd()). - ItemStatusFlagsVisible = 512 + ItemStatusFlagsVisible = 256 + // g.LastItemData.ClipRect is valid + ItemStatusFlagsHasClipRect = 512 ) // A key identifier (ImGuiKey_XXX or ImGuiMod_XXX value): can represent Keyboard, Mouse and Gamepad values. @@ -888,6 +944,7 @@ const ( // Since >= 1.89 we increased typing (went from int to enum), some legacy code may need a cast to ImGuiKey. // Read details about the 1.87 and 1.89 transition : https://github.com/ocornut/imgui/issues/4921 // Note that "Keys" related to physical keys and are not the same concept as input "Characters", the later are submitted via io.AddInputCharacter(). +// The keyboard key enum values are named after the keys on a standard US keyboard, and on other keyboard types the keys reported may not match the keycaps. // original name: ImGuiKey type Key int32 @@ -966,110 +1023,125 @@ const ( KeyF10 = 581 KeyF11 = 582 KeyF12 = 583 + KeyF13 = 584 + KeyF14 = 585 + KeyF15 = 586 + KeyF16 = 587 + KeyF17 = 588 + KeyF18 = 589 + KeyF19 = 590 + KeyF20 = 591 + KeyF21 = 592 + KeyF22 = 593 + KeyF23 = 594 + KeyF24 = 595 // ' - KeyApostrophe = 584 + KeyApostrophe = 596 // , - KeyComma = 585 + KeyComma = 597 // - - KeyMinus = 586 + KeyMinus = 598 // . - KeyPeriod = 587 + KeyPeriod = 599 // / - KeySlash = 588 + KeySlash = 600 // ; - KeySemicolon = 589 + KeySemicolon = 601 // = - KeyEqual = 590 + KeyEqual = 602 // [ - KeyLeftBracket = 591 + KeyLeftBracket = 603 // \ (this text inhibit multiline comment caused by backslash) - KeyBackslash = 592 + KeyBackslash = 604 // ] - KeyRightBracket = 593 + KeyRightBracket = 605 // ` - KeyGraveAccent = 594 - KeyCapsLock = 595 - KeyScrollLock = 596 - KeyNumLock = 597 - KeyPrintScreen = 598 - KeyPause = 599 - KeyKeypad0 = 600 - KeyKeypad1 = 601 - KeyKeypad2 = 602 - KeyKeypad3 = 603 - KeyKeypad4 = 604 - KeyKeypad5 = 605 - KeyKeypad6 = 606 - KeyKeypad7 = 607 - KeyKeypad8 = 608 - KeyKeypad9 = 609 - KeyKeypadDecimal = 610 - KeyKeypadDivide = 611 - KeyKeypadMultiply = 612 - KeyKeypadSubtract = 613 - KeyKeypadAdd = 614 - KeyKeypadEnter = 615 - KeyKeypadEqual = 616 + KeyGraveAccent = 606 + KeyCapsLock = 607 + KeyScrollLock = 608 + KeyNumLock = 609 + KeyPrintScreen = 610 + KeyPause = 611 + KeyKeypad0 = 612 + KeyKeypad1 = 613 + KeyKeypad2 = 614 + KeyKeypad3 = 615 + KeyKeypad4 = 616 + KeyKeypad5 = 617 + KeyKeypad6 = 618 + KeyKeypad7 = 619 + KeyKeypad8 = 620 + KeyKeypad9 = 621 + KeyKeypadDecimal = 622 + KeyKeypadDivide = 623 + KeyKeypadMultiply = 624 + KeyKeypadSubtract = 625 + KeyKeypadAdd = 626 + KeyKeypadEnter = 627 + KeyKeypadEqual = 628 + // Available on some keyboard/mouses. Often referred as "Browser Back" + KeyAppBack = 629 + KeyAppForward = 630 // Menu (Xbox) + (Switch) Start/Options (PS) - KeyGamepadStart = 617 + KeyGamepadStart = 631 // View (Xbox) - (Switch) Share (PS) - KeyGamepadBack = 618 + KeyGamepadBack = 632 // X (Xbox) Y (Switch) Square (PS) // Tap: Toggle Menu. Hold: Windowing mode (Focus/Move/Resize windows) - KeyGamepadFaceLeft = 619 + KeyGamepadFaceLeft = 633 // B (Xbox) A (Switch) Circle (PS) // Cancel / Close / Exit - KeyGamepadFaceRight = 620 + KeyGamepadFaceRight = 634 // Y (Xbox) X (Switch) Triangle (PS) // Text Input / On-screen Keyboard - KeyGamepadFaceUp = 621 + KeyGamepadFaceUp = 635 // A (Xbox) B (Switch) Cross (PS) // Activate / Open / Toggle / Tweak - KeyGamepadFaceDown = 622 + KeyGamepadFaceDown = 636 // D-pad Left // Move / Tweak / Resize Window (in Windowing mode) - KeyGamepadDpadLeft = 623 + KeyGamepadDpadLeft = 637 // D-pad Right // Move / Tweak / Resize Window (in Windowing mode) - KeyGamepadDpadRight = 624 + KeyGamepadDpadRight = 638 // D-pad Up // Move / Tweak / Resize Window (in Windowing mode) - KeyGamepadDpadUp = 625 + KeyGamepadDpadUp = 639 // D-pad Down // Move / Tweak / Resize Window (in Windowing mode) - KeyGamepadDpadDown = 626 + KeyGamepadDpadDown = 640 // L Bumper (Xbox) L (Switch) L1 (PS) // Tweak Slower / Focus Previous (in Windowing mode) - KeyGamepadL1 = 627 + KeyGamepadL1 = 641 // R Bumper (Xbox) R (Switch) R1 (PS) // Tweak Faster / Focus Next (in Windowing mode) - KeyGamepadR1 = 628 + KeyGamepadR1 = 642 // L Trig. (Xbox) ZL (Switch) L2 (PS) [Analog] - KeyGamepadL2 = 629 + KeyGamepadL2 = 643 // R Trig. (Xbox) ZR (Switch) R2 (PS) [Analog] - KeyGamepadR2 = 630 + KeyGamepadR2 = 644 // L Stick (Xbox) L3 (Switch) L3 (PS) - KeyGamepadL3 = 631 + KeyGamepadL3 = 645 // R Stick (Xbox) R3 (Switch) R3 (PS) - KeyGamepadR3 = 632 + KeyGamepadR3 = 646 // [Analog] // Move Window (in Windowing mode) - KeyGamepadLStickLeft = 633 + KeyGamepadLStickLeft = 647 // [Analog] // Move Window (in Windowing mode) - KeyGamepadLStickRight = 634 + KeyGamepadLStickRight = 648 // [Analog] // Move Window (in Windowing mode) - KeyGamepadLStickUp = 635 + KeyGamepadLStickUp = 649 // [Analog] // Move Window (in Windowing mode) - KeyGamepadLStickDown = 636 + KeyGamepadLStickDown = 650 // [Analog] - KeyGamepadRStickLeft = 637 + KeyGamepadRStickLeft = 651 // [Analog] - KeyGamepadRStickRight = 638 + KeyGamepadRStickRight = 652 // [Analog] - KeyGamepadRStickUp = 639 + KeyGamepadRStickUp = 653 // [Analog] - KeyGamepadRStickDown = 640 - KeyMouseLeft = 641 - KeyMouseRight = 642 - KeyMouseMiddle = 643 - KeyMouseX1 = 644 - KeyMouseX2 = 645 - KeyMouseWheelX = 646 - KeyMouseWheelY = 647 - KeyReservedForModCtrl = 648 - KeyReservedForModShift = 649 - KeyReservedForModAlt = 650 - KeyReservedForModSuper = 651 - KeyCOUNT = 652 + KeyGamepadRStickDown = 654 + KeyMouseLeft = 655 + KeyMouseRight = 656 + KeyMouseMiddle = 657 + KeyMouseX1 = 658 + KeyMouseX2 = 659 + KeyMouseWheelX = 660 + KeyMouseWheelY = 661 + KeyReservedForModCtrl = 662 + KeyReservedForModShift = 663 + KeyReservedForModAlt = 664 + KeyReservedForModSuper = 665 + KeyCOUNT = 666 ModNone = 0 // Ctrl ModCtrl = 4096 @@ -1084,12 +1156,12 @@ const ( // 5-bits ModMask = 63488 KeyNamedKeyBEGIN = 512 - KeyNamedKeyEND = 652 - KeyNamedKeyCOUNT = 140 - // Size of KeysData[]: hold legacy 0..512 keycodes + named keys - KeyKeysDataSIZE = 652 + KeyNamedKeyEND = 666 + KeyNamedKeyCOUNT = 154 + // Size of KeysData[]: only hold named keys + KeyKeysDataSIZE = 154 // Accesses to io.KeysData[] must use (key - ImGuiKey_KeysData_OFFSET) index. - KeyKeysDataOFFSET = 0 + KeyKeysDataOFFSET = 512 ) // FIXME: this is in development, not exposed/functional as a generic feature yet. @@ -1107,17 +1179,18 @@ const ( type LocKey int32 const ( - LocKeyVersionStr = 0 - LocKeyTableSizeOne = 1 - LocKeyTableSizeAllFit = 2 - LocKeyTableSizeAllDefault = 3 - LocKeyTableResetOrder = 4 - LocKeyWindowingMainMenuBar = 5 - LocKeyWindowingPopup = 6 - LocKeyWindowingUntitled = 7 - LocKeyDockingHideTabBar = 8 - LocKeyDockingHoldShiftToDock = 9 - LocKeyCOUNT = 10 + LocKeyVersionStr = 0 + LocKeyTableSizeOne = 1 + LocKeyTableSizeAllFit = 2 + LocKeyTableSizeAllDefault = 3 + LocKeyTableResetOrder = 4 + LocKeyWindowingMainMenuBar = 5 + LocKeyWindowingPopup = 6 + LocKeyWindowingUntitled = 7 + LocKeyDockingHideTabBar = 8 + LocKeyDockingHoldShiftToDock = 9 + LocKeyDockingDragToUndockOrMoveNode = 10 + LocKeyCOUNT = 11 ) // original name: ImGuiLogType @@ -1191,40 +1264,14 @@ const ( type NavHighlightFlags int32 const ( - NavHighlightFlagsNone = 0 - NavHighlightFlagsTypeDefault = 1 - NavHighlightFlagsTypeThin = 2 + NavHighlightFlagsNone = 0 + // Compact highlight, no padding + NavHighlightFlagsCompact = 2 // Draw rectangular highlight if (g.NavId == id) _even_ when using the mouse. NavHighlightFlagsAlwaysDraw = 4 NavHighlightFlagsNoRounding = 8 ) -// OBSOLETED in 1.88 (from July 2022): ImGuiNavInput and io.NavInputs[]. -// Official backends between 1.60 and 1.86: will keep working and feed gamepad inputs as long as IMGUI_DISABLE_OBSOLETE_KEYIO is not set. -// Custom backends: feed gamepad inputs via io.AddKeyEvent() and ImGuiKey_GamepadXXX enums. -// original name: ImGuiNavInput -type NavInput int32 - -const ( - NavInputActivate = 0 - NavInputCancel = 1 - NavInputInput = 2 - NavInputMenu = 3 - NavInputDpadLeft = 4 - NavInputDpadRight = 5 - NavInputDpadUp = 6 - NavInputDpadDown = 7 - NavInputLStickLeft = 8 - NavInputLStickRight = 9 - NavInputLStickUp = 10 - NavInputLStickDown = 11 - NavInputFocusPrev = 12 - NavInputFocusNext = 13 - NavInputTweakSlow = 14 - NavInputTweakFast = 15 - NavInputCOUNT = 16 -) - // original name: ImGuiNavLayer type NavLayer int32 @@ -1276,9 +1323,10 @@ const ( type NextItemDataFlags int32 const ( - NextItemDataFlagsNone = 0 - NextItemDataFlagsHasWidth = 1 - NextItemDataFlagsHasOpen = 2 + NextItemDataFlagsNone = 0 + NextItemDataFlagsHasWidth = 1 + NextItemDataFlagsHasOpen = 2 + NextItemDataFlagsHasShortcut = 4 ) // original name: ImGuiNextWindowDataFlags_ @@ -1294,12 +1342,13 @@ const ( NextWindowDataFlagsHasFocus = 32 NextWindowDataFlagsHasBgAlpha = 64 NextWindowDataFlagsHasScroll = 128 - NextWindowDataFlagsHasViewport = 256 - NextWindowDataFlagsHasDock = 512 - NextWindowDataFlagsHasWindowClass = 1024 + NextWindowDataFlagsHasChildFlags = 256 + NextWindowDataFlagsHasViewport = 512 + NextWindowDataFlagsHasDock = 1024 + NextWindowDataFlagsHasWindowClass = 2048 ) -// Flags for internal's BeginColumns(). Prefix using BeginTable() nowadays! +// Flags for internal's BeginColumns(). This is an obsolete API. Prefer using BeginTable() nowadays! // original name: ImGuiOldColumnFlags_ type OldColumnFlags int32 @@ -1313,7 +1362,7 @@ const ( OldColumnFlagsNoPreserveWidths = 4 // Disable forcing columns to fit within window OldColumnFlagsNoForceWithinWindow = 8 - // (WIP) Restore pre-1.51 behavior of extending the parent window contents size but _without affecting the columns width at all_. Will eventually remove. + // Restore pre-1.51 behavior of extending the parent window contents size but _without affecting the columns width at all_. Will eventually remove. OldColumnFlagsGrowParentContentsSize = 16 ) @@ -1326,8 +1375,8 @@ const ( ) // Flags for OpenPopup*(), BeginPopupContext*(), IsPopupOpen() functions. -// - To be backward compatible with older API which took an 'int mouse_button = 1' argument, we need to treat -// small flags values as a mouse button index, so we encode the mouse button in the first few bits of the flags. +// - To be backward compatible with older API which took an 'int mouse_button = 1' argument instead of 'ImGuiPopupFlags flags', +// we need to treat small flags values as a mouse button index, so we encode the mouse button in the first few bits of the flags. // It is therefore guaranteed to be legal to pass a mouse button index in ImGuiPopupFlags. // - For the same reason, we exceptionally default the ImGuiPopupFlags argument of BeginPopupContextXXX functions to 1 instead of 0. // IMPORTANT: because the default parameter is 1 (==ImGuiPopupFlags_MouseButtonRight), if you rely on the default parameter @@ -1347,15 +1396,17 @@ const ( PopupFlagsMouseButtonMiddle = 2 PopupFlagsMouseButtonMask = 31 PopupFlagsMouseButtonDefault = 1 + // For OpenPopup*(), BeginPopupContext*(): don't reopen same popup if already open (won't reposition, won't reinitialize navigation) + PopupFlagsNoReopen = 32 // For OpenPopup*(), BeginPopupContext*(): don't open if there's already a popup at the same level of the popup stack - PopupFlagsNoOpenOverExistingPopup = 32 + PopupFlagsNoOpenOverExistingPopup = 128 // For BeginPopupContextWindow(): don't return true when hovering items, only when hovering empty space - PopupFlagsNoOpenOverItems = 64 + PopupFlagsNoOpenOverItems = 256 // For IsPopupOpen(): ignore the ImGuiID parameter and test for any popup. - PopupFlagsAnyPopupId = 128 + PopupFlagsAnyPopupId = 1024 // For IsPopupOpen(): search/test at any level of the popup stack (default test in the current level) - PopupFlagsAnyPopupLevel = 256 - PopupFlagsAnyPopup = 384 + PopupFlagsAnyPopupLevel = 2048 + PopupFlagsAnyPopup = 3072 ) // original name: ImGuiPopupPositionPolicy @@ -1421,7 +1472,7 @@ const ( SelectableFlagsNone = 0 // Clicking this doesn't close parent popup window SelectableFlagsDontClosePopups = 1 - // Selectable frame can span all columns (text will still fit in current column) + // Frame will span all columns of its container table (text will still fit in current column) SelectableFlagsSpanAllColumns = 2 // Generate press events on double clicks too SelectableFlagsAllowDoubleClick = 4 @@ -1585,7 +1636,7 @@ const ( TabBarFlagsAutoSelectNewTabs = 2 // Disable buttons to open the tab list popup TabBarFlagsTabListPopupButton = 4 - // Disable behavior of closing tabs (that are submitted with p_open != NULL) with middle mouse button. You can still repro this behavior on user's side with if (IsItemHovered() && IsMouseClicked(2)) *p_open = false. + // Disable behavior of closing tabs (that are submitted with p_open != NULL) with middle mouse button. You may handle this behavior manually on user's side with if (IsItemHovered() && IsMouseClicked(2)) *p_open = false. TabBarFlagsNoCloseWithMiddleMouseButton = 8 // Disable scrolling buttons (apply when fitting policy is ImGuiTabBarFlags_FittingPolicyScroll) TabBarFlagsNoTabListScrollingButtons = 16 @@ -1619,13 +1670,13 @@ type TabItemFlags int32 const ( TabItemFlagsNone = 0 - // Display a dot next to the title + tab is selected when clicking the X + closure is not assumed (will wait for user to stop submitting the tab). Otherwise closure is assumed when pressing the X, so if you keep submitting the tab may reappear at end of tab bar. + // Display a dot next to the title + set ImGuiTabItemFlags_NoAssumedClosure. TabItemFlagsUnsavedDocument = 1 // Trigger flag to programmatically make the tab selected when calling BeginTabItem() TabItemFlagsSetSelected = 2 - // Disable behavior of closing tabs (that are submitted with p_open != NULL) with middle mouse button. You can still repro this behavior on user's side with if (IsItemHovered() && IsMouseClicked(2)) *p_open = false. + // Disable behavior of closing tabs (that are submitted with p_open != NULL) with middle mouse button. You may handle this behavior manually on user's side with if (IsItemHovered() && IsMouseClicked(2)) *p_open = false. TabItemFlagsNoCloseWithMiddleMouseButton = 4 - // Don't call PushID(tab->ID)/PopID() on BeginTabItem()/EndTabItem() + // Don't call PushID()/PopID() on BeginTabItem()/EndTabItem() TabItemFlagsNoPushId = 8 // Disable tooltip for the given tab TabItemFlagsNoTooltip = 16 @@ -1635,6 +1686,8 @@ const ( TabItemFlagsLeading = 64 // Enforce the tab position to the right of the tab bar (before the scrolling buttons) TabItemFlagsTrailing = 128 + // Tab is selected when trying to close + closure is not immediately assumed (will wait for user to stop submitting the tab). Otherwise closure is assumed when pressing the X, so if you keep submitting the tab may reappear at end of tab bar. + TabItemFlagsNoAssumedClosure = 256 ) // Enum for ImGui::TableSetBgColor() @@ -1690,7 +1743,7 @@ const ( TableColumnFlagsNoSortAscending = 1024 // Disable ability to sort in the descending direction. TableColumnFlagsNoSortDescending = 2048 - // TableHeadersRow() will not submit label for this column. Convenient for some small columns. Name will still appear in context menu. + // TableHeadersRow() will not submit horizontal label for this column. Convenient for some small columns. Name will still appear in context menu or in angled headers. TableColumnFlagsNoHeaderLabel = 4096 // Disable header text width contribution to automatic column width. TableColumnFlagsNoHeaderWidth = 8192 @@ -1702,6 +1755,8 @@ const ( TableColumnFlagsIndentEnable = 65536 // Ignore current Indent value when entering cell (default for columns > 0). Indentation changes _within_ the cell will still be honored. TableColumnFlagsIndentDisable = 131072 + // TableHeadersRow() will submit an angled header row for this column. Note this will add an extra row. + TableColumnFlagsAngledHeader = 262144 // Status: is enabled == not hidden by user/api (referred to as "Hide" in _DefaultHide and _NoHide) flags. TableColumnFlagsIsEnabled = 16777216 // Status: is visible == is enabled AND not clipped by scrolling. @@ -1813,7 +1868,9 @@ const ( TableFlagsSortMulti = 67108864 // Allow no sorting, disable default sorting. TableGetSortSpecs() may return specs where (SpecsCount == 0). TableFlagsSortTristate = 134217728 - TableFlagsSizingMask = 57344 + // Highlight column headers when hovered (may evolve into a fuller highlight) + TableFlagsHighlightHoveredColumn = 268435456 + TableFlagsSizingMask = 57344 ) // Flags for ImGui::TableNextRow() @@ -1885,8 +1942,10 @@ const ( TreeNodeFlagsSpanAvailWidth = 2048 // Extend hit box to the left-most and right-most edges (bypass the indented area). TreeNodeFlagsSpanFullWidth = 4096 + // Frame will span all columns of its container table (text will still fit in current column) + TreeNodeFlagsSpanAllColumns = 8192 // (WIP) Nav: left direction may move to this TreeNode() from any of its child (items submitted between TreeNode and TreePop) - TreeNodeFlagsNavLeftJumpsBackHere = 8192 + TreeNodeFlagsNavLeftJumpsBackHere = 16384 TreeNodeFlagsCollapsingHeader = 26 ) @@ -1994,20 +2053,18 @@ const ( WindowFlagsAlwaysVerticalScrollbar = 16384 // Always show horizontal scrollbar (even if ContentSize.x < Size.x) WindowFlagsAlwaysHorizontalScrollbar = 32768 - // Ensure child windows without border uses style.WindowPadding (ignored by default for non-bordered child windows, because more convenient) - WindowFlagsAlwaysUseWindowPadding = 65536 // No gamepad/keyboard navigation within the window - WindowFlagsNoNavInputs = 262144 + WindowFlagsNoNavInputs = 65536 // No focusing toward this window with gamepad/keyboard navigation (e.g. skipped by CTRL+TAB) - WindowFlagsNoNavFocus = 524288 + WindowFlagsNoNavFocus = 131072 // Display a dot next to the title. When used in a tab/docking context, tab is selected when clicking the X + closure is not assumed (will wait for user to stop submitting the tab). Otherwise closure is assumed when pressing the X, so if you keep submitting the tab may reappear at end of tab bar. - WindowFlagsUnsavedDocument = 1048576 + WindowFlagsUnsavedDocument = 262144 // Disable docking of this window - WindowFlagsNoDocking = 2097152 - WindowFlagsNoNav = 786432 + WindowFlagsNoDocking = 524288 + WindowFlagsNoNav = 196608 WindowFlagsNoDecoration = 43 - WindowFlagsNoInputs = 786944 - // [BETA] On child window: allow gamepad/keyboard navigation to cross over parent border to this child or between sibling child windows. + WindowFlagsNoInputs = 197120 + // [BETA] On child window: share focus scope, allow gamepad/keyboard navigation to cross over parent border to this child or between sibling child windows. WindowFlagsNavFlattened = 8388608 // Don't use! For internal use by BeginChild() WindowFlagsChildWindow = 16777216 diff --git a/cimgui_funcs.go b/cimgui_funcs.go index 8843ffa64..df2e7a031 100644 --- a/cimgui_funcs.go +++ b/cimgui_funcs.go @@ -1425,18 +1425,29 @@ func (self *ContextHook) Destroy() { // // DebugLogFlags = ImGuiDebugLogFlags_OutputToTTY; // DebugLocateId = 0; -// DebugLogClipperAutoDisableFrames = 0; +// DebugLogAutoDisableFlags = ImGuiDebugLogFlags_None; +// DebugLogAutoDisableFrames = 0; // DebugLocateFrames = 0; // DebugBeginReturnValueCullDepth = -1; // DebugItemPickerActive = false; // DebugItemPickerMouseButton = ImGuiMouseButton_Left; // DebugItemPickerBreakId = 0; +// DebugFlashStyleColorTime = 0.0f; +// DebugFlashStyleColorIdx = ImGuiCol_COUNT; // DebugHoveredDockNode = ((void *)0) ; // +// // Same as DebugBreakClearData(). Those fields are scattered in their respective subsystem to stay in hot-data locations +// DebugBreakInWindow = 0; +// DebugBreakInTable = 0; +// DebugBreakInLocateId = false; +// DebugBreakKeyChord = ImGuiKey_Pause; +// DebugBreakInShortcutRouting = ImGuiKey_None; +// // memset(FramerateSecPerFrame, 0, sizeof(FramerateSecPerFrame)); // FramerateSecPerFrameIdx = FramerateSecPerFrameCount = 0; // FramerateSecPerFrameAccum = 0.0f; // WantCaptureMouseNextFrame = WantCaptureKeyboardNextFrame = WantTextInputNextFrame = -1; +// memset(TempKeychordName, 0, sizeof(TempKeychordName)); // } func InternalNewContext(shared_font_atlas *FontAtlas) *Context { shared_font_atlasArg, shared_font_atlasFin := shared_font_atlas.handle() @@ -1463,6 +1474,17 @@ func (self *DataVarInfo) InternalVarPtr(parent uintptr) uintptr { return uintptr(C.wrap_ImGuiDataVarInfo_GetVarPtr(selfArg, C.uintptr_t(parent))) } +func InternalNewDebugAllocInfo() *DebugAllocInfo { + return newDebugAllocInfoFromC(C.ImGuiDebugAllocInfo_ImGuiDebugAllocInfo()) +} + +func (self *DebugAllocInfo) Destroy() { + selfArg, selfFin := self.handle() + C.ImGuiDebugAllocInfo_destroy(selfArg) + + selfFin() +} + func InternalNewDockContext() *DockContext { return newDockContextFromC(C.ImGuiDockContext_ImGuiDockContext()) } @@ -1600,6 +1622,17 @@ func (self *DockNode) InternalDestroy() { selfFin() } +func InternalNewIDStackTool() *IDStackTool { + return newIDStackToolFromC(C.ImGuiIDStackTool_ImGuiIDStackTool()) +} + +func (self *IDStackTool) Destroy() { + selfArg, selfFin := self.handle() + C.ImGuiIDStackTool_destroy(selfArg) + + selfFin() +} + // Queue a gain/loss of focus for the application (generally based on OS/platform focus of your window) func (self *IO) AddFocusEvent(focused bool) { selfArg, selfFin := self.handle() @@ -1919,6 +1952,27 @@ func (self *InputTextState) InternalOnKeyPressed(key int32) { selfFin() } +func (self *InputTextState) InternalReloadUserBufAndKeepSelection() { + selfArg, selfFin := self.handle() + C.ImGuiInputTextState_ReloadUserBufAndKeepSelection(selfArg) + + selfFin() +} + +func (self *InputTextState) InternalReloadUserBufAndMoveToEnd() { + selfArg, selfFin := self.handle() + C.ImGuiInputTextState_ReloadUserBufAndMoveToEnd(selfArg) + + selfFin() +} + +func (self *InputTextState) InternalReloadUserBufAndSelectAll() { + selfArg, selfFin := self.handle() + C.ImGuiInputTextState_ReloadUserBufAndSelectAll(selfArg) + + selfFin() +} + func (self *InputTextState) InternalSelectAll() { selfArg, selfFin := self.handle() C.ImGuiInputTextState_SelectAll(selfArg) @@ -2351,42 +2405,31 @@ func (self *StackSizes) Destroy() { selfFin() } -func InternalNewStackTool() *StackTool { - return newStackToolFromC(C.ImGuiStackTool_ImGuiStackTool()) -} - -func (self *StackTool) Destroy() { - selfArg, selfFin := self.handle() - C.ImGuiStackTool_destroy(selfArg) - - selfFin() -} - -func NewStoragePairFloat(_key ID, _val_f float32) *StoragePair { +func NewStoragePairFloat(_key ID, _val float32) *StoragePair { _keyArg, _keyFin := _key.c() defer func() { _keyFin() }() - return newStoragePairFromC(C.ImGuiStoragePair_ImGuiStoragePair_Float(_keyArg, C.float(_val_f))) + return newStoragePairFromC(C.ImGuiStoragePair_ImGuiStoragePair_Float(_keyArg, C.float(_val))) } -func NewStoragePairInt(_key ID, _val_i int32) *StoragePair { +func NewStoragePairInt(_key ID, _val int32) *StoragePair { _keyArg, _keyFin := _key.c() defer func() { _keyFin() }() - return newStoragePairFromC(C.ImGuiStoragePair_ImGuiStoragePair_Int(_keyArg, C.int(_val_i))) + return newStoragePairFromC(C.ImGuiStoragePair_ImGuiStoragePair_Int(_keyArg, C.int(_val))) } -func NewStoragePairPtr(_key ID, _val_p uintptr) *StoragePair { +func NewStoragePairPtr(_key ID, _val uintptr) *StoragePair { _keyArg, _keyFin := _key.c() defer func() { _keyFin() }() - return newStoragePairFromC(C.wrap_ImGuiStoragePair_ImGuiStoragePair_Ptr(_keyArg, C.uintptr_t(_val_p))) + return newStoragePairFromC(C.wrap_ImGuiStoragePair_ImGuiStoragePair_Ptr(_keyArg, C.uintptr_t(_val))) } func (self *StoragePair) Destroy() { @@ -3259,6 +3302,15 @@ func (self *Rect) InternalClipWithFull(r Rect) { selfFin() } +func (self *Rect) InternalContainsWithPad(p Vec2, pad Vec2) bool { + selfArg, selfFin := wrap[C.ImRect, *Rect](self) + + defer func() { + selfFin() + }() + return C.ImRect_ContainsWithPad(selfArg, p.toC(), pad.toC()) == C.bool(true) +} + func (self *Rect) InternalContainsRect(r Rect) bool { selfArg, selfFin := wrap[C.ImRect, *Rect](self) @@ -3573,7 +3625,7 @@ func BeginV(name string, p_open *bool, flags WindowFlags) bool { return C.igBegin(nameArg, p_openArg, C.ImGuiWindowFlags(flags)) == C.bool(true) } -func InternalBeginChildEx(name string, id ID, size_arg Vec2, border bool, flags WindowFlags) bool { +func InternalBeginChildEx(name string, id ID, size_arg Vec2, child_flags ChildFlags, window_flags WindowFlags) bool { nameArg, nameFin := WrapString(name) idArg, idFin := id.c() @@ -3581,45 +3633,33 @@ func InternalBeginChildEx(name string, id ID, size_arg Vec2, border bool, flags nameFin() idFin() }() - return C.igBeginChildEx(nameArg, idArg, size_arg.toC(), C.bool(border), C.ImGuiWindowFlags(flags)) == C.bool(true) -} - -// helper to create a child window / scrolling region that looks like a normal widget frame -// BeginChildFrameV parameter default value hint: -// flags: 0 -func BeginChildFrameV(id ID, size Vec2, flags WindowFlags) bool { - idArg, idFin := id.c() - - defer func() { - idFin() - }() - return C.igBeginChildFrame(idArg, size.toC(), C.ImGuiWindowFlags(flags)) == C.bool(true) + return C.igBeginChildEx(nameArg, idArg, size_arg.toC(), C.ImGuiChildFlags(child_flags), C.ImGuiWindowFlags(window_flags)) == C.bool(true) } // BeginChildIDV parameter default value hint: // size: ImVec2(0,0) -// border: false -// flags: 0 -func BeginChildIDV(id ID, size Vec2, border bool, flags WindowFlags) bool { +// child_flags: 0 +// window_flags: 0 +func BeginChildIDV(id ID, size Vec2, child_flags ChildFlags, window_flags WindowFlags) bool { idArg, idFin := id.c() defer func() { idFin() }() - return C.igBeginChild_ID(idArg, size.toC(), C.bool(border), C.ImGuiWindowFlags(flags)) == C.bool(true) + return C.igBeginChild_ID(idArg, size.toC(), C.ImGuiChildFlags(child_flags), C.ImGuiWindowFlags(window_flags)) == C.bool(true) } // BeginChildStrV parameter default value hint: // size: ImVec2(0,0) -// border: false -// flags: 0 -func BeginChildStrV(str_id string, size Vec2, border bool, flags WindowFlags) bool { +// child_flags: 0 +// window_flags: 0 +func BeginChildStrV(str_id string, size Vec2, child_flags ChildFlags, window_flags WindowFlags) bool { str_idArg, str_idFin := WrapString(str_id) defer func() { str_idFin() }() - return C.igBeginChild_Str(str_idArg, size.toC(), C.bool(border), C.ImGuiWindowFlags(flags)) == C.bool(true) + return C.igBeginChild_Str(str_idArg, size.toC(), C.ImGuiChildFlags(child_flags), C.ImGuiWindowFlags(window_flags)) == C.bool(true) } // setup number of columns. use an identifier to distinguish multiple column sets. close with EndColumns(). @@ -3913,6 +3953,10 @@ func InternalBeginTooltipEx(tooltip_flags TooltipFlags, extra_window_flags Windo return C.igBeginTooltipEx(C.ImGuiTooltipFlags(tooltip_flags), C.ImGuiWindowFlags(extra_window_flags)) == C.bool(true) } +func InternalBeginTooltipHidden() bool { + return C.igBeginTooltipHidden() == C.bool(true) +} + func InternalBeginViewportSideBar(name string, viewport *Viewport, dir Dir, size float32, window_flags WindowFlags) bool { nameArg, nameFin := WrapString(name) viewportArg, viewportFin := viewport.handle() @@ -4404,15 +4448,6 @@ func ComboStrarrV(label string, current_item *int32, items []string, items_count return C.igCombo_Str_arr(labelArg, current_itemArg, itemsArg, C.int(items_count), C.int(popup_max_height_in_items)) == C.bool(true) } -func InternalConvertShortcutMod(key_chord KeyChord) KeyChord { - key_chordArg, key_chordFin := key_chord.c() - - defer func() { - key_chordFin() - }() - return *newKeyChordFromC(func() *C.ImGuiKeyChord { result := C.igConvertShortcutMod(key_chordArg); return &result }()) -} - func InternalConvertSingleModFlagToKey(ctx *Context, key Key) Key { ctxArg, ctxFin := ctx.handle() @@ -4480,6 +4515,36 @@ func InternalDataTypeGetInfo(data_type DataType) *DataTypeInfo { return newDataTypeInfoFromC(C.igDataTypeGetInfo(C.ImGuiDataType(data_type))) } +// size >= 0 : alloc, size = -1 : free +func InternalDebugAllocHook(info *DebugAllocInfo, frame_count int32, ptr uintptr, size uint64) { + infoArg, infoFin := info.handle() + C.wrap_igDebugAllocHook(infoArg, C.int(frame_count), C.uintptr_t(ptr), C.xulong(size)) + + infoFin() +} + +func InternalDebugBreakButton(label string, description_of_location string) bool { + labelArg, labelFin := WrapString(label) + description_of_locationArg, description_of_locationFin := WrapString(description_of_location) + + defer func() { + labelFin() + description_of_locationFin() + }() + return C.igDebugBreakButton(labelArg, description_of_locationArg) == C.bool(true) +} + +func InternalDebugBreakButtonTooltip(keyboard_only bool, description_of_location string) { + description_of_locationArg, description_of_locationFin := WrapString(description_of_location) + C.igDebugBreakButtonTooltip(C.bool(keyboard_only), description_of_locationArg) + + description_of_locationFin() +} + +func InternalDebugBreakClearData() { + C.igDebugBreakClearData() +} + // This is called by IMGUI_CHECKVERSION() macro. func DebugCheckVersionAndDataLayout(version_str string, sz_io uint64, sz_style uint64, sz_vec2 uint64, sz_vec4 uint64, sz_drawvert uint64, sz_drawidx uint64) bool { version_strArg, version_strFin := WrapString(version_str) @@ -4508,6 +4573,10 @@ func InternalDebugDrawLineExtentsV(col uint32) { C.igDebugDrawLineExtents(C.ImU32(col)) } +func DebugFlashStyleColor(idx Col) { + C.igDebugFlashStyleColor(C.ImGuiCol(idx)) +} + func InternalDebugHookIdInfo(id ID, data_type DataType, data_id uintptr, data_id_end uintptr) { idArg, idFin := id.c() C.wrap_igDebugHookIdInfo(idArg, C.ImGuiDataType(data_type), C.uintptr_t(data_id), C.uintptr_t(data_id_end)) @@ -4683,7 +4752,7 @@ func InternalDebugRenderViewportThumbnail(draw_list *DrawList, viewport *Viewpor viewportFin() } -func InternalDebugStartItemPicker() { +func DebugStartItemPicker() { C.igDebugStartItemPicker() } @@ -5376,11 +5445,6 @@ func EndChild() { C.igEndChild() } -// always call EndChildFrame() regardless of BeginChildFrame() return values (which indicates a collapsed/clipped window) -func EndChildFrame() { - C.igEndChildFrame() -} - // close columns func InternalEndColumns() { C.igEndColumns() @@ -5594,6 +5658,17 @@ func InternalFindWindowSettingsByWindow(window *Window) *WindowSettings { return newWindowSettingsFromC(C.igFindWindowSettingsByWindow(windowArg)) } +func InternalFixupKeyChord(ctx *Context, key_chord KeyChord) KeyChord { + ctxArg, ctxFin := ctx.handle() + key_chordArg, key_chordFin := key_chord.c() + + defer func() { + ctxFin() + key_chordFin() + }() + return *newKeyChordFromC(func() *C.ImGuiKeyChord { result := C.igFixupKeyChord(ctxArg, key_chordArg); return &result }()) +} + // Focus last item (no selection/activation). func InternalFocusItem() { C.igFocusItem() @@ -5668,8 +5743,10 @@ func ColorU32ColV(idx Col, alpha_mul float32) uint32 { } // retrieve given color with style alpha applied, packed as a 32-bit value suitable for ImDrawList -func ColorU32U32(col uint32) uint32 { - return uint32(C.igGetColorU32_U32(C.ImU32(col))) +// ColorU32U32V parameter default value hint: +// alpha_mul: 1.0f +func ColorU32U32V(col uint32, alpha_mul float32) uint32 { + return uint32(C.igGetColorU32_U32(C.ImU32(col), C.float(alpha_mul))) } // retrieve given color with style alpha applied, packed as a 32-bit value suitable for ImDrawList @@ -5787,7 +5864,7 @@ func InternalCurrentWindowRead() *Window { return newWindowFromC(C.igGetCurrentWindowRead()) } -// cursor position in window coordinates (relative to window position) +// [window-local] cursor position in window coordinates (relative to window position) func CursorPos() Vec2 { pOut := new(Vec2) pOutArg, pOutFin := wrap[C.ImVec2, *Vec2](pOut) @@ -5799,17 +5876,17 @@ func CursorPos() Vec2 { return *pOut } -// (some functions are using window-relative coordinates, such as: GetCursorPos, GetCursorStartPos, GetContentRegionMax, GetWindowContentRegion* etc. +// [window-local] " func CursorPosX() float32 { return float32(C.igGetCursorPosX()) } -// other functions such as GetCursorScreenPos or everything in ImDrawList:: +// [window-local] " func CursorPosY() float32 { return float32(C.igGetCursorPosY()) } -// cursor position in absolute coordinates (useful to work with ImDrawList API). generally top-left == GetMainViewport()->Pos == (0,0) in single viewport mode, and bottom-right == GetMainViewport()->Pos+Size == io.DisplaySize in single-viewport mode. +// cursor position in absolute coordinates (prefer using this, also more useful to work with ImDrawList API). func CursorScreenPos() Vec2 { pOut := new(Vec2) pOutArg, pOutFin := wrap[C.ImVec2, *Vec2](pOut) @@ -5821,7 +5898,7 @@ func CursorScreenPos() Vec2 { return *pOut } -// initial cursor position in window coordinates +// [window-local] initial cursor position, in window coordinates func CursorStartPos() Vec2 { pOut := new(Vec2) pOutArg, pOutFin := wrap[C.ImVec2, *Vec2](pOut) @@ -5837,7 +5914,7 @@ func InternalDefaultFont() *Font { return newFontFromC(C.igGetDefaultFont()) } -// peek directly into the current payload from anywhere. may return NULL. use ImGuiPayload::IsDataType() to test for the payload type. +// peek directly into the current payload from anywhere. returns NULL when drag and drop is finished or inactive. use ImGuiPayload::IsDataType() to test for the payload type. func DragDropPayload() *Payload { return newPayloadFromC(C.igGetDragDropPayload()) } @@ -6035,13 +6112,13 @@ func InternalItemStatusFlags() ItemStatusFlags { return ItemStatusFlags(C.igGetItemStatusFlags()) } -func InternalKeyChordName(key_chord KeyChord, out_buf string, out_buf_size int32) { +func InternalKeyChordName(key_chord KeyChord) string { key_chordArg, key_chordFin := key_chord.c() - out_bufArg, out_bufFin := WrapString(out_buf) - C.igGetKeyChordName(key_chordArg, out_bufArg, C.int(out_buf_size)) - key_chordFin() - out_bufFin() + defer func() { + key_chordFin() + }() + return C.GoString(C.igGetKeyChordName(key_chordArg)) } func InternalKeyDataContextPtr(ctx *Context, key Key) *KeyData { @@ -6057,7 +6134,6 @@ func InternalKeyDataKey(key Key) *KeyData { return newKeyDataFromC(C.igGetKeyData_Key(C.ImGuiKey(key))) } -// map ImGuiKey_* values into legacy native key index. == io.KeyMap[key] func KeyIndex(key Key) Key { return Key(C.igGetKeyIndex(C.ImGuiKey(key))) } @@ -6205,7 +6281,7 @@ func StateStorage() *Storage { return newStorageFromC(C.igGetStateStorage()) } -// access the Style structure (colors, sizes). Always use PushStyleCol(), PushStyleVar() to modify style mid-frame! +// access the Style structure (colors, sizes). Always use PushStyleColor(), PushStyleVar() to modify style mid-frame! func CurrentStyle() *Style { return newStyleFromC(C.igGetStyle()) } @@ -6337,7 +6413,7 @@ func WindowHeight() float32 { return float32(C.igGetWindowHeight()) } -// get current window position in screen space (note: it is unlikely you need to use this. Consider using current layout pos instead, GetScreenCursorPos()) +// get current window position in screen space (note: it is unlikely you need to use this. Consider using current layout pos instead, GetCursorScreenPos()) func WindowPos() Vec2 { pOut := new(Vec2) pOutArg, pOutFin := wrap[C.ImVec2, *Vec2](pOut) @@ -6390,7 +6466,7 @@ func InternalWindowScrollbarRect(window *Window, axis Axis) Rect { return *pOut } -// get current window size (note: it is unlikely you need to use this. Consider using GetScreenCursorPos() and e.g. GetContentRegionAvail() instead) +// get current window size (note: it is unlikely you need to use this. Consider using GetCursorScreenPos() and e.g. GetContentRegionAvail() instead) func WindowSize() Vec2 { pOut := new(Vec2) pOutArg, pOutFin := wrap[C.ImVec2, *Vec2](pOut) @@ -6562,21 +6638,6 @@ func InternalImFileLoadToMemoryV(filename string, mode string, out_file_size *ui } // Decent replacement for floorf() -func InternalImFloorSignedFloat(f float32) float32 { - return float32(C.igImFloorSigned_Float(C.float(f))) -} - -func InternalImFloorSignedVec2(v Vec2) Vec2 { - pOut := new(Vec2) - pOutArg, pOutFin := wrap[C.ImVec2, *Vec2](pOut) - - C.igImFloorSigned_Vec2(pOutArg, v.toC()) - - pOutFin() - - return *pOut -} - func InternalImFloorFloat(f float32) float32 { return float32(C.igImFloor_Float(C.float(f))) } @@ -7174,6 +7235,21 @@ func InternalImTriangleContainsPoint(a Vec2, b Vec2, c Vec2, p Vec2) bool { return C.igImTriangleContainsPoint(a.toC(), b.toC(), c.toC(), p.toC()) == C.bool(true) } +func InternalImTruncFloat(f float32) float32 { + return float32(C.igImTrunc_Float(C.float(f))) +} + +func InternalImTruncVec2(v Vec2) Vec2 { + pOut := new(Vec2) + pOutArg, pOutFin := wrap[C.ImVec2, *Vec2](pOut) + + C.igImTrunc_Vec2(pOutArg, v.toC()) + + pOutFin() + + return *pOut +} + func InternalImUpperPowerOfTwo(v int32) int32 { return int32(C.igImUpperPowerOfTwo(C.int(v))) } @@ -7183,9 +7259,9 @@ func InternalImUpperPowerOfTwo(v int32) int32 { // uv1: ImVec2(1,1) // tint_col: ImVec4(1,1,1,1) // border_col: ImVec4(0,0,0,0) -func ImageV(user_texture_id TextureID, size Vec2, uv0 Vec2, uv1 Vec2, tint_col Vec4, border_col Vec4) { +func ImageV(user_texture_id TextureID, image_size Vec2, uv0 Vec2, uv1 Vec2, tint_col Vec4, border_col Vec4) { user_texture_idArg, user_texture_idFin := user_texture_id.c() - C.igImage(user_texture_idArg, size.toC(), uv0.toC(), uv1.toC(), tint_col.toC(), border_col.toC()) + C.igImage(user_texture_idArg, image_size.toC(), uv0.toC(), uv1.toC(), tint_col.toC(), border_col.toC()) user_texture_idFin() } @@ -7195,7 +7271,7 @@ func ImageV(user_texture_id TextureID, size Vec2, uv0 Vec2, uv1 Vec2, tint_col V // uv1: ImVec2(1,1) // bg_col: ImVec4(0,0,0,0) // tint_col: ImVec4(1,1,1,1) -func ImageButtonV(str_id string, user_texture_id TextureID, size Vec2, uv0 Vec2, uv1 Vec2, bg_col Vec4, tint_col Vec4) bool { +func ImageButtonV(str_id string, user_texture_id TextureID, image_size Vec2, uv0 Vec2, uv1 Vec2, bg_col Vec4, tint_col Vec4) bool { str_idArg, str_idFin := WrapString(str_id) user_texture_idArg, user_texture_idFin := user_texture_id.c() @@ -7203,12 +7279,12 @@ func ImageButtonV(str_id string, user_texture_id TextureID, size Vec2, uv0 Vec2, str_idFin() user_texture_idFin() }() - return C.igImageButton(str_idArg, user_texture_idArg, size.toC(), uv0.toC(), uv1.toC(), bg_col.toC(), tint_col.toC()) == C.bool(true) + return C.igImageButton(str_idArg, user_texture_idArg, image_size.toC(), uv0.toC(), uv1.toC(), bg_col.toC(), tint_col.toC()) == C.bool(true) } // InternalImageButtonExV parameter default value hint: // flags: 0 -func InternalImageButtonExV(id ID, texture_id TextureID, size Vec2, uv0 Vec2, uv1 Vec2, bg_col Vec4, tint_col Vec4, flags ButtonFlags) bool { +func InternalImageButtonExV(id ID, texture_id TextureID, image_size Vec2, uv0 Vec2, uv1 Vec2, bg_col Vec4, tint_col Vec4, flags ButtonFlags) bool { idArg, idFin := id.c() texture_idArg, texture_idFin := texture_id.c() @@ -7216,7 +7292,7 @@ func InternalImageButtonExV(id ID, texture_id TextureID, size Vec2, uv0 Vec2, uv idFin() texture_idFin() }() - return C.igImageButtonEx(idArg, texture_idArg, size.toC(), uv0.toC(), uv1.toC(), bg_col.toC(), tint_col.toC(), C.ImGuiButtonFlags(flags)) == C.bool(true) + return C.igImageButtonEx(idArg, texture_idArg, image_size.toC(), uv0.toC(), uv1.toC(), bg_col.toC(), tint_col.toC(), C.ImGuiButtonFlags(flags)) == C.bool(true) } // move content position toward the right, by indent_w, or style.IndentSpacing if indent_w <= 0 @@ -7572,6 +7648,29 @@ func IsItemVisible() bool { return C.igIsItemVisible() == C.bool(true) } +// InternalIsKeyChordPressedIDV parameter default value hint: +// flags: 0 +func InternalIsKeyChordPressedIDV(key_chord KeyChord, owner_id ID, flags InputFlags) bool { + key_chordArg, key_chordFin := key_chord.c() + owner_idArg, owner_idFin := owner_id.c() + + defer func() { + key_chordFin() + owner_idFin() + }() + return C.igIsKeyChordPressed_ID(key_chordArg, owner_idArg, C.ImGuiInputFlags(flags)) == C.bool(true) +} + +// was key chord (mods + key) pressed, e.g. you can pass 'ImGuiMod_Ctrl | ImGuiKey_S' as a key-chord. This doesn't do any routing or focus check, please consider using Shortcut() function instead. +func IsKeyChordPressedNil(key_chord KeyChord) bool { + key_chordArg, key_chordFin := key_chord.c() + + defer func() { + key_chordFin() + }() + return C.igIsKeyChordPressed_Nil(key_chordArg) == C.bool(true) +} + func InternalIsKeyDownID(key Key, owner_id ID) bool { owner_idArg, owner_idFin := owner_id.c() @@ -7586,13 +7685,6 @@ func IsKeyDownNil(key Key) bool { return C.igIsKeyDown_Nil(C.ImGuiKey(key)) == C.bool(true) } -// Removed in 1.87: Mapping from named key is always identity! -// InternalIsKeyPressedMapV parameter default value hint: -// repeat: true -func InternalIsKeyPressedMapV(key Key, repeat bool) bool { - return C.igIsKeyPressedMap(C.ImGuiKey(key), C.bool(repeat)) == C.bool(true) -} - // was key pressed (went from !Down to Down)? if repeat=true, uses io.KeyRepeatDelay / KeyRepeatRate // IsKeyPressedBoolV parameter default value hint: // repeat: true @@ -7634,6 +7726,10 @@ func InternalIsLegacyKey(key Key) bool { return C.igIsLegacyKey(C.ImGuiKey(key)) == C.bool(true) } +func InternalIsModKey(key Key) bool { + return C.igIsModKey(C.ImGuiKey(key)) == C.bool(true) +} + // did mouse button clicked? (went from !Down to Down). Same as GetMouseClickedCount() == 1. // IsMouseClickedBoolV parameter default value hint: // repeat: false @@ -7652,9 +7748,18 @@ func InternalIsMouseClickedIDV(button MouseButton, owner_id ID, flags InputFlags return C.igIsMouseClicked_ID(C.ImGuiMouseButton(button), owner_idArg, C.ImGuiInputFlags(flags)) == C.bool(true) } +func InternalIsMouseDoubleClickedID(button MouseButton, owner_id ID) bool { + owner_idArg, owner_idFin := owner_id.c() + + defer func() { + owner_idFin() + }() + return C.igIsMouseDoubleClicked_ID(C.ImGuiMouseButton(button), owner_idArg) == C.bool(true) +} + // did mouse button double-clicked? Same as GetMouseClickedCount() == 2. (note that a double-click will also report IsMouseClicked() == true) -func IsMouseDoubleClicked(button MouseButton) bool { - return C.igIsMouseDoubleClicked(C.ImGuiMouseButton(button)) == C.bool(true) +func IsMouseDoubleClickedNil(button MouseButton) bool { + return C.igIsMouseDoubleClicked_Nil(C.ImGuiMouseButton(button)) == C.bool(true) } func InternalIsMouseDownID(button MouseButton, owner_id ID) bool { @@ -7813,7 +7918,7 @@ func IsWindowFocusedV(flags FocusedFlags) bool { return C.igIsWindowFocused(C.ImGuiFocusedFlags(flags)) == C.bool(true) } -// is current window hovered (and typically: not blocked by a popup/modal)? see flags for options. NB: If you are trying to check whether your mouse should be dispatched to imgui or to your app, you should use the 'io.WantCaptureMouse' boolean for that! Please read the FAQ! +// 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. // IsWindowHoveredV parameter default value hint: // flags: 0 func IsWindowHoveredV(flags HoveredFlags) bool { @@ -8095,6 +8200,13 @@ func InternalNavClearPreferredPosForAxis(axis Axis) { C.igNavClearPreferredPosForAxis(C.ImGuiAxis(axis)) } +func InternalNavHighlightActivated(id ID) { + idArg, idFin := id.c() + C.igNavHighlightActivated(idArg) + + idFin() +} + func InternalNavInitRequestApplyResult() { C.igNavInitRequestApplyResult() } @@ -8509,8 +8621,8 @@ func InternalRenderColorRectWithAlphaCheckerboardV(draw_list *DrawList, p_min Ve draw_listFin() } -func InternalRenderDragDropTargetRect(bb Rect) { - C.igRenderDragDropTargetRect(bb.toC()) +func InternalRenderDragDropTargetRect(bb Rect, item_clip_rect Rect) { + C.igRenderDragDropTargetRect(bb.toC(), item_clip_rect.toC()) } // InternalRenderFrameV parameter default value hint: @@ -8532,7 +8644,7 @@ func InternalRenderMouseCursor(pos Vec2, scale float32, mouse_cursor MouseCursor // Navigation highlight // InternalRenderNavHighlightV parameter default value hint: -// flags: ImGuiNavHighlightFlags_TypeDefault +// flags: ImGuiNavHighlightFlags_None func InternalRenderNavHighlightV(bb Rect, id ID, flags NavHighlightFlags) { idArg, idFin := id.c() C.igRenderNavHighlight(bb.toC(), idArg, C.ImGuiNavHighlightFlags(flags)) @@ -8824,16 +8936,17 @@ func InternalSetCurrentViewport(window *Window, viewport *ViewportP) { viewportFin() } -// are using the main, absolute coordinate system. +// [window-local] " func SetCursorPos(local_pos Vec2) { C.igSetCursorPos(local_pos.toC()) } -// GetWindowPos() + GetCursorPos() == GetCursorScreenPos() etc.) +// [window-local] " func SetCursorPosX(local_x float32) { C.igSetCursorPosX(C.float(local_x)) } +// [window-local] " func SetCursorPosY(local_y float32) { C.igSetCursorPosY(C.float(local_y)) } @@ -8930,6 +9043,13 @@ func SetMouseCursor(cursor_type MouseCursor) { C.igSetMouseCursor(C.ImGuiMouseCursor(cursor_type)) } +func InternalSetNavFocusScope(focus_scope_id ID) { + focus_scope_idArg, focus_scope_idFin := focus_scope_id.c() + C.igSetNavFocusScope(focus_scope_idArg) + + focus_scope_idFin() +} + func InternalSetNavID(id ID, nav_layer NavLayer, focus_scope_id ID, rect_rel Rect) { idArg, idFin := id.c() focus_scope_idArg, focus_scope_idFin := focus_scope_id.c() @@ -8968,6 +9088,13 @@ func SetNextItemOpenV(is_open bool, cond Cond) { C.igSetNextItemOpen(C.bool(is_open), C.ImGuiCond(cond)) } +func InternalSetNextItemShortcut(key_chord KeyChord) { + key_chordArg, key_chordFin := key_chord.c() + C.igSetNextItemShortcut(key_chordArg) + + key_chordFin() +} + // set width of the _next_ common large "item+label" widget. >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) func SetNextItemWidth(item_width float32) { C.igSetNextItemWidth(C.float(item_width)) @@ -9107,8 +9234,8 @@ func InternalSetScrollYWindowPtr(window *Window, scroll_y float32) { windowFin() } +// owner_id needs to be explicit and cannot be 0 // InternalSetShortcutRoutingV parameter default value hint: -// owner_id: 0 // flags: 0 func InternalSetShortcutRoutingV(key_chord KeyChord, owner_id ID, flags InputFlags) bool { key_chordArg, key_chordFin := key_chord.c() @@ -9205,9 +9332,9 @@ func SetWindowFontScale(scale float32) { C.igSetWindowFontScale(C.float(scale)) } -func InternalSetWindowHiddendAndSkipItemsForCurrentFrame(window *Window) { +func InternalSetWindowHiddenAndSkipItemsForCurrentFrame(window *Window) { windowArg, windowFin := window.handle() - C.igSetWindowHiddendAndSkipItemsForCurrentFrame(windowArg) + C.igSetWindowHiddenAndSkipItemsForCurrentFrame(windowArg) windowFin() } @@ -9219,6 +9346,16 @@ func InternalSetWindowHitTestHole(window *Window, pos Vec2, size Vec2) { windowFin() } +// You may also use SetNextWindowClass()'s FocusRouteParentWindowId field. +func InternalSetWindowParentWindowForFocusRoute(window *Window, parent_window *Window) { + windowArg, windowFin := window.handle() + parent_windowArg, parent_windowFin := parent_window.handle() + C.igSetWindowParentWindowForFocusRoute(windowArg, parent_windowArg) + + windowFin() + parent_windowFin() +} + // set named window position. // SetWindowPosStrV parameter default value hint: // cond: 0 @@ -9294,6 +9431,13 @@ func InternalShadeVertsLinearUV(draw_list *DrawList, vert_start_idx int32, vert_ draw_listFin() } +func InternalShadeVertsTransformPos(draw_list *DrawList, vert_start_idx int32, vert_end_idx int32, pivot_in Vec2, cos_a float32, sin_a float32, pivot_out Vec2) { + draw_listArg, draw_listFin := draw_list.handle() + C.igShadeVertsTransformPos(draw_listArg, C.int(vert_start_idx), C.int(vert_end_idx), pivot_in.toC(), C.float(cos_a), C.float(sin_a), pivot_out.toC()) + + draw_listFin() +} + // InternalShortcutV parameter default value hint: // owner_id: 0 // flags: 0 @@ -9353,22 +9497,22 @@ func ShowFontSelector(label string) { labelFin() } -// create Metrics/Debugger window. display Dear ImGui internals: windows, draw commands, various internal state, etc. -// ShowMetricsWindowV parameter default value hint: +// create Stack Tool window. hover items with mouse to query information about the source of their unique ID. +// ShowIDStackToolWindowV parameter default value hint: // p_open: NULL -func ShowMetricsWindowV(p_open *bool) { +func ShowIDStackToolWindowV(p_open *bool) { p_openArg, p_openFin := WrapBool(p_open) - C.igShowMetricsWindow(p_openArg) + C.igShowIDStackToolWindow(p_openArg) p_openFin() } -// create Stack Tool window. hover items with mouse to query information about the source of their unique ID. -// ShowStackToolWindowV parameter default value hint: +// create Metrics/Debugger window. display Dear ImGui internals: windows, draw commands, various internal state, etc. +// ShowMetricsWindowV parameter default value hint: // p_open: NULL -func ShowStackToolWindowV(p_open *bool) { +func ShowMetricsWindowV(p_open *bool) { p_openArg, p_openFin := WrapBool(p_open) - C.igShowStackToolWindow(p_openArg) + C.igShowMetricsWindow(p_openArg) p_openFin() } @@ -9646,7 +9790,7 @@ func SliderScalarNV(label string, data_type DataType, p_data uintptr, components return C.wrap_igSliderScalarNV(labelArg, C.ImGuiDataType(data_type), C.uintptr_t(p_data), C.int(components), C.uintptr_t(p_min), C.uintptr_t(p_max), formatArg, C.ImGuiSliderFlags(flags)) == C.bool(true) } -// button with FramePadding=(0,0) to easily embed within text +// button with (FramePadding.y == 0) to easily embed within text func SmallButton(label string) bool { labelArg, labelFin := WrapString(label) @@ -9685,10 +9829,10 @@ func InternalStartMouseMovingWindow(window *Window) { windowFin() } -func InternalStartMouseMovingWindowOrNode(window *Window, node *DockNode, undock_floating_node bool) { +func InternalStartMouseMovingWindowOrNode(window *Window, node *DockNode, undock bool) { windowArg, windowFin := window.handle() nodeArg, nodeFin := node.handle() - C.igStartMouseMovingWindowOrNode(windowArg, nodeArg, C.bool(undock_floating_node)) + C.igStartMouseMovingWindowOrNode(windowArg, nodeArg, C.bool(undock)) windowFin() nodeFin() @@ -9924,6 +10068,17 @@ func InternalTabItemLabelAndCloseButton(draw_list *DrawList, bb Rect, flags TabI out_text_clippedFin() } +// submit a row with angled headers for every column with the ImGuiTableColumnFlags_AngledHeader flag. MUST BE FIRST ROW. +func TableAngledHeadersRow() { + C.igTableAngledHeadersRow() +} + +// InternalTableAngledHeadersRowExV parameter default value hint: +// max_label_width: 0.0f +func InternalTableAngledHeadersRowExV(angle float32, max_label_width float32) { + C.igTableAngledHeadersRowEx(C.float(angle), C.float(max_label_width)) +} + func InternalTableBeginApplyRequests(table *Table) { tableArg, tableFin := table.handle() C.igTableBeginApplyRequests(tableArg) @@ -9968,9 +10123,9 @@ func InternalTableDrawBorders(table *Table) { tableFin() } -func InternalTableDrawContextMenu(table *Table) { +func InternalTableDrawDefaultContextMenu(table *Table, flags_for_section_to_display TableFlags) { tableArg, tableFin := table.handle() - C.igTableDrawContextMenu(tableArg) + C.igTableDrawDefaultContextMenu(tableArg, C.ImGuiTableFlags(flags_for_section_to_display)) tableFin() } @@ -10114,6 +10269,10 @@ func InternalTableGetColumnWidthAuto(table *Table, column *TableColumn) float32 return float32(C.igTableGetColumnWidthAuto(tableArg, columnArg)) } +func InternalTableGetHeaderAngledMaxLabelWidth() float32 { + return float32(C.igTableGetHeaderAngledMaxLabelWidth()) +} + func InternalTableGetHeaderRowHeight() float32 { return float32(C.igTableGetHeaderRowHeight()) } @@ -10173,7 +10332,7 @@ func TableHeader(label string) { labelFin() } -// submit all headers cells based on data provided to TableSetupColumn() + submit context menu +// submit a row with headers cells based on data provided to TableSetupColumn() + submit context menu func TableHeadersRow() { C.igTableHeadersRow() } @@ -10575,7 +10734,7 @@ func TreeNodeStrStr(str_id string, fmt string) bool { return C.wrap_igTreeNode_StrStr(str_idArg, fmtArg) == C.bool(true) } -// ~ Unindent()+PopId() +// ~ Unindent()+PopID() func TreePop() { C.igTreePop() } @@ -10592,7 +10751,7 @@ func TreePushPtr(ptr_id uintptr) { C.wrap_igTreePush_Ptr(C.uintptr_t(ptr_id)) } -// ~ Indent()+PushId(). Already called by TreeNode() when returning true, but you can call TreePush/TreePop yourself if desired. +// ~ Indent()+PushID(). Already called by TreeNode() when returning true, but you can call TreePush/TreePop yourself if desired. func TreePushStr(str_id string) { str_idArg, str_idFin := WrapString(str_id) C.igTreePush_Str(str_idArg) @@ -11199,15 +11358,6 @@ func Begin(name string) bool { return C.wrap_igBegin(nameArg) == C.bool(true) } -func BeginChildFrame(id ID, size Vec2) bool { - idArg, idFin := id.c() - - defer func() { - idFin() - }() - return C.wrap_igBeginChildFrame(idArg, size.toC()) == C.bool(true) -} - func BeginChildID(id ID) bool { idArg, idFin := id.c() @@ -11771,6 +11921,10 @@ func ColorU32Col(idx Col) uint32 { return uint32(C.wrap_igGetColorU32_Col(C.ImGuiCol(idx))) } +func ColorU32U32(col uint32) uint32 { + return uint32(C.wrap_igGetColorU32_U32(C.ImU32(col))) +} + func ColumnOffset() float32 { return float32(C.wrap_igGetColumnOffset()) } @@ -11832,14 +11986,14 @@ func InternalImTextStrFromUtf8(out_buf *Wchar, out_buf_size int32, in_text strin return int32(C.wrap_igImTextStrFromUtf8((*C.ImWchar)(out_buf), C.int(out_buf_size), in_textArg, in_text_endArg)) } -func Image(user_texture_id TextureID, size Vec2) { +func Image(user_texture_id TextureID, image_size Vec2) { user_texture_idArg, user_texture_idFin := user_texture_id.c() - C.wrap_igImage(user_texture_idArg, size.toC()) + C.wrap_igImage(user_texture_idArg, image_size.toC()) user_texture_idFin() } -func ImageButton(str_id string, user_texture_id TextureID, size Vec2) bool { +func ImageButton(str_id string, user_texture_id TextureID, image_size Vec2) bool { str_idArg, str_idFin := WrapString(str_id) user_texture_idArg, user_texture_idFin := user_texture_id.c() @@ -11847,10 +12001,10 @@ func ImageButton(str_id string, user_texture_id TextureID, size Vec2) bool { str_idFin() user_texture_idFin() }() - return C.wrap_igImageButton(str_idArg, user_texture_idArg, size.toC()) == C.bool(true) + return C.wrap_igImageButton(str_idArg, user_texture_idArg, image_size.toC()) == C.bool(true) } -func InternalImageButtonEx(id ID, texture_id TextureID, size Vec2, uv0 Vec2, uv1 Vec2, bg_col Vec4, tint_col Vec4) bool { +func InternalImageButtonEx(id ID, texture_id TextureID, image_size Vec2, uv0 Vec2, uv1 Vec2, bg_col Vec4, tint_col Vec4) bool { idArg, idFin := id.c() texture_idArg, texture_idFin := texture_id.c() @@ -11858,7 +12012,7 @@ func InternalImageButtonEx(id ID, texture_id TextureID, size Vec2, uv0 Vec2, uv1 idFin() texture_idFin() }() - return C.wrap_igImageButtonEx(idArg, texture_idArg, size.toC(), uv0.toC(), uv1.toC(), bg_col.toC(), tint_col.toC()) == C.bool(true) + return C.wrap_igImageButtonEx(idArg, texture_idArg, image_size.toC(), uv0.toC(), uv1.toC(), bg_col.toC(), tint_col.toC()) == C.bool(true) } func Indent() { @@ -12054,8 +12208,15 @@ func IsItemHovered() bool { return C.wrap_igIsItemHovered() == C.bool(true) } -func InternalIsKeyPressedMap(key Key) bool { - return C.wrap_igIsKeyPressedMap(C.ImGuiKey(key)) == C.bool(true) +func InternalIsKeyChordPressedID(key_chord KeyChord, owner_id ID) bool { + key_chordArg, key_chordFin := key_chord.c() + owner_idArg, owner_idFin := owner_id.c() + + defer func() { + key_chordFin() + owner_idFin() + }() + return C.wrap_igIsKeyChordPressed_ID(key_chordArg, owner_idArg) == C.bool(true) } func IsKeyPressedBool(key Key) bool { @@ -12472,13 +12633,15 @@ func SetScrollHereY() { C.wrap_igSetScrollHereY() } -func InternalSetShortcutRouting(key_chord KeyChord) bool { +func InternalSetShortcutRouting(key_chord KeyChord, owner_id ID) bool { key_chordArg, key_chordFin := key_chord.c() + owner_idArg, owner_idFin := owner_id.c() defer func() { key_chordFin() + owner_idFin() }() - return C.wrap_igSetShortcutRouting(key_chordArg) == C.bool(true) + return C.wrap_igSetShortcutRouting(key_chordArg, owner_idArg) == C.bool(true) } func SetWindowCollapsedBool(collapsed bool) { @@ -12556,12 +12719,12 @@ func ShowDemoWindow() { C.wrap_igShowDemoWindow() } -func ShowMetricsWindow() { - C.wrap_igShowMetricsWindow() +func ShowIDStackToolWindow() { + C.wrap_igShowIDStackToolWindow() } -func ShowStackToolWindow() { - C.wrap_igShowStackToolWindow() +func ShowMetricsWindow() { + C.wrap_igShowMetricsWindow() } func ShowStyleEditor() { @@ -12761,6 +12924,10 @@ func TabItemButton(label string) bool { return C.wrap_igTabItemButton(labelArg) == C.bool(true) } +func InternalTableAngledHeadersRowEx(angle float32) { + C.wrap_igTableAngledHeadersRowEx(C.float(angle)) +} + func TableGetColumnFlags() TableColumnFlags { return TableColumnFlags(C.wrap_igTableGetColumnFlags()) } @@ -14675,6 +14842,21 @@ func (self *FontConfig) RasterizerMultiply() float32 { return float32(C.wrap_ImFontConfig_GetRasterizerMultiply(selfArg)) } +func (self FontConfig) SetRasterizerDensity(v float32) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImFontConfig_SetRasterizerDensity(selfArg, C.float(v)) +} + +func (self *FontConfig) RasterizerDensity() float32 { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return float32(C.wrap_ImFontConfig_GetRasterizerDensity(selfArg)) +} + func (self FontConfig) SetEllipsisChar(v Wchar) { selfArg, selfFin := self.handle() defer selfFin() @@ -15526,6 +15708,25 @@ func (self *Context) WindowsHoverPadding() Vec2 { return *(&Vec2{}).fromC(C.wrap_ImGuiContext_GetWindowsHoverPadding(selfArg)) } +func (self Context) SetDebugBreakInWindow(v ID) { + vArg, _ := v.c() + + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiContext_SetDebugBreakInWindow(selfArg, vArg) +} + +func (self *Context) DebugBreakInWindow() ID { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + + result := C.wrap_ImGuiContext_GetDebugBreakInWindow(selfArg) + return *newIDFromC(func() *C.ImGuiID { result := result; return &result }()) +} + func (self Context) SetCurrentWindow(v *Window) { vArg, _ := v.handle() @@ -15641,6 +15842,21 @@ func (self *Context) WheelingWindowStartFrame() int32 { return int32(C.wrap_ImGuiContext_GetWheelingWindowStartFrame(selfArg)) } +func (self Context) SetWheelingWindowScrolledFrame(v int32) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiContext_SetWheelingWindowScrolledFrame(selfArg, C.int(v)) +} + +func (self *Context) WheelingWindowScrolledFrame() int32 { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return int32(C.wrap_ImGuiContext_GetWheelingWindowScrolledFrame(selfArg)) +} + func (self Context) SetWheelingWindowReleaseTimer(v float32) { selfArg, selfFin := self.handle() defer selfFin() @@ -15946,6 +16162,36 @@ func (self *Context) ActiveIdHasBeenEditedThisFrame() bool { return C.wrap_ImGuiContext_GetActiveIdHasBeenEditedThisFrame(selfArg) == C.bool(true) } +func (self Context) SetActiveIdFromShortcut(v bool) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiContext_SetActiveIdFromShortcut(selfArg, C.bool(v)) +} + +func (self *Context) ActiveIdFromShortcut() bool { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return C.wrap_ImGuiContext_GetActiveIdFromShortcut(selfArg) == C.bool(true) +} + +func (self Context) SetActiveIdMouseButton(v int32) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiContext_SetActiveIdMouseButton(selfArg, C.int(v)) +} + +func (self *Context) ActiveIdMouseButton() int32 { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return int32(C.wrap_ImGuiContext_GetActiveIdMouseButton(selfArg)) +} + func (self Context) SetActiveIdClickOffset(v Vec2) { selfArg, selfFin := self.handle() defer selfFin() @@ -15993,21 +16239,6 @@ func (self *Context) ActiveIdSource() InputSource { return InputSource(C.wrap_ImGuiContext_GetActiveIdSource(selfArg)) } -func (self Context) SetActiveIdMouseButton(v int32) { - selfArg, selfFin := self.handle() - defer selfFin() - C.wrap_ImGuiContext_SetActiveIdMouseButton(selfArg, C.int(v)) -} - -func (self *Context) ActiveIdMouseButton() int32 { - selfArg, selfFin := self.handle() - - defer func() { - selfFin() - }() - return int32(C.wrap_ImGuiContext_GetActiveIdMouseButton(selfArg)) -} - func (self Context) SetActiveIdPreviousFrame(v ID) { vArg, _ := v.c() @@ -16108,6 +16339,51 @@ func (self *Context) LastActiveIdTimer() float32 { return float32(C.wrap_ImGuiContext_GetLastActiveIdTimer(selfArg)) } +func (self Context) SetLastKeyModsChangeTime(v float64) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiContext_SetLastKeyModsChangeTime(selfArg, C.double(v)) +} + +func (self *Context) LastKeyModsChangeTime() float64 { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return float64(C.wrap_ImGuiContext_GetLastKeyModsChangeTime(selfArg)) +} + +func (self Context) SetLastKeyModsChangeFromNoneTime(v float64) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiContext_SetLastKeyModsChangeFromNoneTime(selfArg, C.double(v)) +} + +func (self *Context) LastKeyModsChangeFromNoneTime() float64 { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return float64(C.wrap_ImGuiContext_GetLastKeyModsChangeFromNoneTime(selfArg)) +} + +func (self Context) SetLastKeyboardKeyPressTime(v float64) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiContext_SetLastKeyboardKeyPressTime(selfArg, C.double(v)) +} + +func (self *Context) LastKeyboardKeyPressTime() float64 { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return float64(C.wrap_ImGuiContext_GetLastKeyboardKeyPressTime(selfArg)) +} + func (self Context) SetKeysRoutingTable(v KeyRoutingTable) { vArg, _ := v.c() @@ -16157,19 +16433,23 @@ func (self *Context) ActiveIdUsingAllKeyboardKeys() bool { return C.wrap_ImGuiContext_GetActiveIdUsingAllKeyboardKeys(selfArg) == C.bool(true) } -func (self Context) SetActiveIdUsingNavInputMask(v uint32) { +func (self Context) SetDebugBreakInShortcutRouting(v KeyChord) { + vArg, _ := v.c() + selfArg, selfFin := self.handle() defer selfFin() - C.wrap_ImGuiContext_SetActiveIdUsingNavInputMask(selfArg, C.ImU32(v)) + C.wrap_ImGuiContext_SetDebugBreakInShortcutRouting(selfArg, vArg) } -func (self *Context) ActiveIdUsingNavInputMask() uint32 { +func (self *Context) DebugBreakInShortcutRouting() KeyChord { selfArg, selfFin := self.handle() defer func() { selfFin() }() - return uint32(C.wrap_ImGuiContext_GetActiveIdUsingNavInputMask(selfArg)) + + result := C.wrap_ImGuiContext_GetDebugBreakInShortcutRouting(selfArg) + return *newKeyChordFromC(func() *C.ImGuiKeyChord { result := result; return &result }()) } func (self Context) SetCurrentFocusScopeId(v ID) { @@ -16282,6 +16562,36 @@ func (self *Context) NextWindowData() NextWindowData { return *newNextWindowDataFromC(func() *C.ImGuiNextWindowData { result := result; return &result }()) } +func (self Context) SetDebugShowGroupRects(v bool) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiContext_SetDebugShowGroupRects(selfArg, C.bool(v)) +} + +func (self *Context) DebugShowGroupRects() bool { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return C.wrap_ImGuiContext_GetDebugShowGroupRects(selfArg) == C.bool(true) +} + +func (self Context) SetDebugFlashStyleColorIdx(v Col) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiContext_SetDebugFlashStyleColorIdx(selfArg, C.ImGuiCol(v)) +} + +func (self *Context) DebugFlashStyleColorIdx() Col { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return Col(C.wrap_ImGuiContext_GetDebugFlashStyleColorIdx(selfArg)) +} + func (self Context) SetColorStack(v Vector[*ColorMod]) { vData := v.Data vDataArg, _ := vData.handle() @@ -16328,10 +16638,10 @@ func (self *Context) StyleVarStack() Vector[*StyleMod] { return newVectorFromC(C.wrap_ImGuiContext_GetStyleVarStack(selfArg).Size, C.wrap_ImGuiContext_GetStyleVarStack(selfArg).Capacity, newStyleModFromC(C.wrap_ImGuiContext_GetStyleVarStack(selfArg).Data)) } -func (self Context) SetFocusScopeStack(v Vector[*ID]) { +func (self Context) SetFocusScopeStack(v Vector[*FocusScopeData]) { vData := v.Data vDataArg, _ := vData.handle() - vVecArg := new(C.ImVector_ImGuiID) + vVecArg := new(C.ImVector_ImGuiFocusScopeData) vVecArg.Size = C.int(v.Size) vVecArg.Capacity = C.int(v.Capacity) vVecArg.Data = vDataArg @@ -16342,13 +16652,13 @@ func (self Context) SetFocusScopeStack(v Vector[*ID]) { C.wrap_ImGuiContext_SetFocusScopeStack(selfArg, *vVecArg) } -func (self *Context) FocusScopeStack() Vector[*ID] { +func (self *Context) FocusScopeStack() Vector[*FocusScopeData] { selfArg, selfFin := self.handle() defer func() { selfFin() }() - return newVectorFromC(C.wrap_ImGuiContext_GetFocusScopeStack(selfArg).Size, C.wrap_ImGuiContext_GetFocusScopeStack(selfArg).Capacity, newIDFromC(C.wrap_ImGuiContext_GetFocusScopeStack(selfArg).Data)) + return newVectorFromC(C.wrap_ImGuiContext_GetFocusScopeStack(selfArg).Size, C.wrap_ImGuiContext_GetFocusScopeStack(selfArg).Capacity, newFocusScopeDataFromC(C.wrap_ImGuiContext_GetFocusScopeStack(selfArg).Data)) } func (self *Context) ItemFlagsStack() Vector[*ItemFlags] { @@ -16452,21 +16762,6 @@ func (self *Context) NavTreeNodeStack() Vector[*NavTreeNodeData] { return newVectorFromC(C.wrap_ImGuiContext_GetNavTreeNodeStack(selfArg).Size, C.wrap_ImGuiContext_GetNavTreeNodeStack(selfArg).Capacity, newNavTreeNodeDataFromC(C.wrap_ImGuiContext_GetNavTreeNodeStack(selfArg).Data)) } -func (self Context) SetBeginMenuCount(v int32) { - selfArg, selfFin := self.handle() - defer selfFin() - C.wrap_ImGuiContext_SetBeginMenuCount(selfArg, C.int(v)) -} - -func (self *Context) BeginMenuCount() int32 { - selfArg, selfFin := self.handle() - - defer func() { - selfFin() - }() - return int32(C.wrap_ImGuiContext_GetBeginMenuCount(selfArg)) -} - func (self Context) SetCurrentDpiScale(v float32) { selfArg, selfFin := self.handle() defer selfFin() @@ -16571,6 +16866,21 @@ func (self *Context) FallbackMonitor() PlatformMonitor { return *newPlatformMonitorFromC(func() *C.ImGuiPlatformMonitor { result := result; return &result }()) } +func (self Context) SetPlatformMonitorsFullWorkRect(v Rect) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiContext_SetPlatformMonitorsFullWorkRect(selfArg, v.toC()) +} + +func (self *Context) PlatformMonitorsFullWorkRect() Rect { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return *(&Rect{}).fromC(C.wrap_ImGuiContext_GetPlatformMonitorsFullWorkRect(selfArg)) +} + func (self Context) SetViewportCreatedCount(v int32) { selfArg, selfFin := self.handle() defer selfFin() @@ -16671,6 +16981,29 @@ func (self *Context) NavFocusScopeId() ID { return *newIDFromC(func() *C.ImGuiID { result := result; return &result }()) } +func (self Context) SetNavFocusRoute(v Vector[*FocusScopeData]) { + vData := v.Data + vDataArg, _ := vData.handle() + vVecArg := new(C.ImVector_ImGuiFocusScopeData) + vVecArg.Size = C.int(v.Size) + vVecArg.Capacity = C.int(v.Capacity) + vVecArg.Data = vDataArg + v.pinner.Pin(vVecArg.Data) + + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiContext_SetNavFocusRoute(selfArg, *vVecArg) +} + +func (self *Context) NavFocusRoute() Vector[*FocusScopeData] { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return newVectorFromC(C.wrap_ImGuiContext_GetNavFocusRoute(selfArg).Size, C.wrap_ImGuiContext_GetNavFocusRoute(selfArg).Capacity, newFocusScopeDataFromC(C.wrap_ImGuiContext_GetNavFocusRoute(selfArg).Data)) +} + func (self Context) SetNavActivateId(v ID) { vArg, _ := v.c() @@ -16743,6 +17076,40 @@ func (self *Context) NavActivateFlags() ActivateFlags { return ActivateFlags(C.wrap_ImGuiContext_GetNavActivateFlags(selfArg)) } +func (self Context) SetNavHighlightActivatedId(v ID) { + vArg, _ := v.c() + + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiContext_SetNavHighlightActivatedId(selfArg, vArg) +} + +func (self *Context) NavHighlightActivatedId() ID { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + + result := C.wrap_ImGuiContext_GetNavHighlightActivatedId(selfArg) + return *newIDFromC(func() *C.ImGuiID { result := result; return &result }()) +} + +func (self Context) SetNavHighlightActivatedTimer(v float32) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiContext_SetNavHighlightActivatedTimer(selfArg, C.float(v)) +} + +func (self *Context) NavHighlightActivatedTimer() float32 { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return float32(C.wrap_ImGuiContext_GetNavHighlightActivatedTimer(selfArg)) +} + func (self Context) SetNavJustMovedToId(v ID) { vArg, _ := v.c() @@ -17412,6 +17779,21 @@ func (self *Context) NavWindowingToggleLayer() bool { return C.wrap_ImGuiContext_GetNavWindowingToggleLayer(selfArg) == C.bool(true) } +func (self Context) SetNavWindowingToggleKey(v Key) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiContext_SetNavWindowingToggleKey(selfArg, C.ImGuiKey(v)) +} + +func (self *Context) NavWindowingToggleKey() Key { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return Key(C.wrap_ImGuiContext_GetNavWindowingToggleKey(selfArg)) +} + func (self Context) SetNavWindowingAccumDeltaPos(v Vec2) { selfArg, selfFin := self.handle() defer selfFin() @@ -17581,6 +17963,21 @@ func (self *Context) DragDropTargetRect() Rect { return *(&Rect{}).fromC(C.wrap_ImGuiContext_GetDragDropTargetRect(selfArg)) } +func (self Context) SetDragDropTargetClipRect(v Rect) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiContext_SetDragDropTargetClipRect(selfArg, v.toC()) +} + +func (self *Context) DragDropTargetClipRect() Rect { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return *(&Rect{}).fromC(C.wrap_ImGuiContext_GetDragDropTargetClipRect(selfArg)) +} + func (self Context) SetDragDropTargetId(v ID) { vArg, _ := v.c() @@ -17757,6 +18154,25 @@ func (self *Context) CurrentTable() *Table { return newTableFromC(C.wrap_ImGuiContext_GetCurrentTable(selfArg)) } +func (self Context) SetDebugBreakInTable(v ID) { + vArg, _ := v.c() + + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiContext_SetDebugBreakInTable(selfArg, vArg) +} + +func (self *Context) DebugBreakInTable() ID { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + + result := C.wrap_ImGuiContext_GetDebugBreakInTable(selfArg) + return *newIDFromC(func() *C.ImGuiID { result := result; return &result }()) +} + func (self Context) SetTablesTempDataStacked(v int32) { selfArg, selfFin := self.handle() defer selfFin() @@ -18131,6 +18547,36 @@ func (self *Context) TempInputId() ID { return *newIDFromC(func() *C.ImGuiID { result := result; return &result }()) } +func (self Context) SetBeginMenuDepth(v int32) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiContext_SetBeginMenuDepth(selfArg, C.int(v)) +} + +func (self *Context) BeginMenuDepth() int32 { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return int32(C.wrap_ImGuiContext_GetBeginMenuDepth(selfArg)) +} + +func (self Context) SetBeginComboDepth(v int32) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiContext_SetBeginComboDepth(selfArg, C.int(v)) +} + +func (self *Context) BeginComboDepth() int32 { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return int32(C.wrap_ImGuiContext_GetBeginComboDepth(selfArg)) +} + func (self Context) SetColorEditOptions(v ColorEditFlags) { selfArg, selfFin := self.handle() defer selfFin() @@ -18263,6 +18709,36 @@ func (self *Context) ComboPreviewData() ComboPreviewData { return *newComboPreviewDataFromC(func() *C.ImGuiComboPreviewData { result := result; return &result }()) } +func (self Context) SetWindowResizeBorderExpectedRect(v Rect) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiContext_SetWindowResizeBorderExpectedRect(selfArg, v.toC()) +} + +func (self *Context) WindowResizeBorderExpectedRect() Rect { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return *(&Rect{}).fromC(C.wrap_ImGuiContext_GetWindowResizeBorderExpectedRect(selfArg)) +} + +func (self Context) SetWindowResizeRelativeMode(v bool) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiContext_SetWindowResizeRelativeMode(selfArg, C.bool(v)) +} + +func (self *Context) WindowResizeRelativeMode() bool { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return C.wrap_ImGuiContext_GetWindowResizeRelativeMode(selfArg) == C.bool(true) +} + func (self Context) SetSliderGrabClickOffset(v float32) { selfArg, selfFin := self.handle() defer selfFin() @@ -18894,19 +19370,34 @@ func (self *Context) DebugLogIndex() TextIndex { return *newTextIndexFromC(func() *C.ImGuiTextIndex { result := result; return &result }()) } -func (self Context) SetDebugLogClipperAutoDisableFrames(v byte) { +func (self Context) SetDebugLogAutoDisableFlags(v DebugLogFlags) { selfArg, selfFin := self.handle() defer selfFin() - C.wrap_ImGuiContext_SetDebugLogClipperAutoDisableFrames(selfArg, C.ImU8(v)) + C.wrap_ImGuiContext_SetDebugLogAutoDisableFlags(selfArg, C.ImGuiDebugLogFlags(v)) } -func (self *Context) DebugLogClipperAutoDisableFrames() byte { +func (self *Context) DebugLogAutoDisableFlags() DebugLogFlags { selfArg, selfFin := self.handle() defer func() { selfFin() }() - return byte(C.wrap_ImGuiContext_GetDebugLogClipperAutoDisableFrames(selfArg)) + return DebugLogFlags(C.wrap_ImGuiContext_GetDebugLogAutoDisableFlags(selfArg)) +} + +func (self Context) SetDebugLogAutoDisableFrames(v byte) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiContext_SetDebugLogAutoDisableFrames(selfArg, C.ImU8(v)) +} + +func (self *Context) DebugLogAutoDisableFrames() byte { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return byte(C.wrap_ImGuiContext_GetDebugLogAutoDisableFrames(selfArg)) } func (self Context) SetDebugLocateFrames(v byte) { @@ -18924,6 +19415,40 @@ func (self *Context) DebugLocateFrames() byte { return byte(C.wrap_ImGuiContext_GetDebugLocateFrames(selfArg)) } +func (self Context) SetDebugBreakInLocateId(v bool) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiContext_SetDebugBreakInLocateId(selfArg, C.bool(v)) +} + +func (self *Context) DebugBreakInLocateId() bool { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return C.wrap_ImGuiContext_GetDebugBreakInLocateId(selfArg) == C.bool(true) +} + +func (self Context) SetDebugBreakKeyChord(v KeyChord) { + vArg, _ := v.c() + + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiContext_SetDebugBreakKeyChord(selfArg, vArg) +} + +func (self *Context) DebugBreakKeyChord() KeyChord { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + + result := C.wrap_ImGuiContext_GetDebugBreakKeyChord(selfArg) + return *newKeyChordFromC(func() *C.ImGuiKeyChord { result := result; return &result }()) +} + func (self Context) SetDebugBeginReturnValueCullDepth(v int) { selfArg, selfFin := self.handle() defer selfFin() @@ -18988,6 +19513,36 @@ func (self *Context) DebugItemPickerBreakId() ID { return *newIDFromC(func() *C.ImGuiID { result := result; return &result }()) } +func (self Context) SetDebugFlashStyleColorTime(v float32) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiContext_SetDebugFlashStyleColorTime(selfArg, C.float(v)) +} + +func (self *Context) DebugFlashStyleColorTime() float32 { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return float32(C.wrap_ImGuiContext_GetDebugFlashStyleColorTime(selfArg)) +} + +func (self Context) SetDebugFlashStyleColorBackup(v Vec4) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiContext_SetDebugFlashStyleColorBackup(selfArg, v.toC()) +} + +func (self *Context) DebugFlashStyleColorBackup() Vec4 { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return *(&Vec4{}).fromC(C.wrap_ImGuiContext_GetDebugFlashStyleColorBackup(selfArg)) +} + func (self Context) SetDebugMetricsConfig(v MetricsConfig) { vArg, _ := v.c() @@ -19007,23 +19562,42 @@ func (self *Context) DebugMetricsConfig() MetricsConfig { return *newMetricsConfigFromC(func() *C.ImGuiMetricsConfig { result := result; return &result }()) } -func (self Context) SetDebugStackTool(v StackTool) { +func (self Context) SetDebugIDStackTool(v IDStackTool) { + vArg, _ := v.c() + + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiContext_SetDebugIDStackTool(selfArg, vArg) +} + +func (self *Context) DebugIDStackTool() IDStackTool { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + + result := C.wrap_ImGuiContext_GetDebugIDStackTool(selfArg) + return *newIDStackToolFromC(func() *C.ImGuiIDStackTool { result := result; return &result }()) +} + +func (self Context) SetDebugAllocInfo(v DebugAllocInfo) { vArg, _ := v.c() selfArg, selfFin := self.handle() defer selfFin() - C.wrap_ImGuiContext_SetDebugStackTool(selfArg, vArg) + C.wrap_ImGuiContext_SetDebugAllocInfo(selfArg, vArg) } -func (self *Context) DebugStackTool() StackTool { +func (self *Context) DebugAllocInfo() DebugAllocInfo { selfArg, selfFin := self.handle() defer func() { selfFin() }() - result := C.wrap_ImGuiContext_GetDebugStackTool(selfArg) - return *newStackToolFromC(func() *C.ImGuiStackTool { result := result; return &result }()) + result := C.wrap_ImGuiContext_GetDebugAllocInfo(selfArg) + return *newDebugAllocInfoFromC(func() *C.ImGuiDebugAllocInfo { result := result; return &result }()) } func (self Context) SetDebugHoveredDockNode(v *DockNode) { @@ -19335,6 +19909,96 @@ func (self *DataVarInfo) Offset() uint32 { return uint32(C.wrap_ImGuiDataVarInfo_GetOffset(selfArg)) } +func (self DebugAllocEntry) SetFrameCount(v int32) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiDebugAllocEntry_SetFrameCount(selfArg, C.int(v)) +} + +func (self *DebugAllocEntry) FrameCount() int32 { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return int32(C.wrap_ImGuiDebugAllocEntry_GetFrameCount(selfArg)) +} + +func (self DebugAllocEntry) SetAllocCount(v int) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiDebugAllocEntry_SetAllocCount(selfArg, C.ImS16(v)) +} + +func (self *DebugAllocEntry) AllocCount() int { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return int(C.wrap_ImGuiDebugAllocEntry_GetAllocCount(selfArg)) +} + +func (self DebugAllocEntry) SetFreeCount(v int) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiDebugAllocEntry_SetFreeCount(selfArg, C.ImS16(v)) +} + +func (self *DebugAllocEntry) FreeCount() int { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return int(C.wrap_ImGuiDebugAllocEntry_GetFreeCount(selfArg)) +} + +func (self DebugAllocInfo) SetTotalAllocCount(v int32) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiDebugAllocInfo_SetTotalAllocCount(selfArg, C.int(v)) +} + +func (self *DebugAllocInfo) TotalAllocCount() int32 { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return int32(C.wrap_ImGuiDebugAllocInfo_GetTotalAllocCount(selfArg)) +} + +func (self DebugAllocInfo) SetTotalFreeCount(v int32) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiDebugAllocInfo_SetTotalFreeCount(selfArg, C.int(v)) +} + +func (self *DebugAllocInfo) TotalFreeCount() int32 { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return int32(C.wrap_ImGuiDebugAllocInfo_GetTotalFreeCount(selfArg)) +} + +func (self DebugAllocInfo) SetLastEntriesIdx(v int) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiDebugAllocInfo_SetLastEntriesIdx(selfArg, C.ImS16(v)) +} + +func (self *DebugAllocInfo) LastEntriesIdx() int { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return int(C.wrap_ImGuiDebugAllocInfo_GetLastEntriesIdx(selfArg)) +} + func (self DockContext) SetNodes(v Storage) { vArg, _ := v.c() @@ -20003,37 +20667,75 @@ func (self *DockNode) WantMouseMove() bool { defer func() { selfFin() }() - return C.wrap_ImGuiDockNode_GetWantMouseMove(selfArg) == C.bool(true) + return C.wrap_ImGuiDockNode_GetWantMouseMove(selfArg) == C.bool(true) +} + +func (self DockNode) SetWantHiddenTabBarUpdate(v bool) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiDockNode_SetWantHiddenTabBarUpdate(selfArg, C.bool(v)) +} + +func (self *DockNode) WantHiddenTabBarUpdate() bool { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return C.wrap_ImGuiDockNode_GetWantHiddenTabBarUpdate(selfArg) == C.bool(true) +} + +func (self DockNode) SetWantHiddenTabBarToggle(v bool) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiDockNode_SetWantHiddenTabBarToggle(selfArg, C.bool(v)) +} + +func (self *DockNode) WantHiddenTabBarToggle() bool { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return C.wrap_ImGuiDockNode_GetWantHiddenTabBarToggle(selfArg) == C.bool(true) } -func (self DockNode) SetWantHiddenTabBarUpdate(v bool) { +func (self FocusScopeData) SetID(v ID) { + vArg, _ := v.c() + selfArg, selfFin := self.handle() defer selfFin() - C.wrap_ImGuiDockNode_SetWantHiddenTabBarUpdate(selfArg, C.bool(v)) + C.wrap_ImGuiFocusScopeData_SetID(selfArg, vArg) } -func (self *DockNode) WantHiddenTabBarUpdate() bool { +func (self *FocusScopeData) ID() ID { selfArg, selfFin := self.handle() defer func() { selfFin() }() - return C.wrap_ImGuiDockNode_GetWantHiddenTabBarUpdate(selfArg) == C.bool(true) + + result := C.wrap_ImGuiFocusScopeData_GetID(selfArg) + return *newIDFromC(func() *C.ImGuiID { result := result; return &result }()) } -func (self DockNode) SetWantHiddenTabBarToggle(v bool) { +func (self FocusScopeData) SetWindowID(v ID) { + vArg, _ := v.c() + selfArg, selfFin := self.handle() defer selfFin() - C.wrap_ImGuiDockNode_SetWantHiddenTabBarToggle(selfArg, C.bool(v)) + C.wrap_ImGuiFocusScopeData_SetWindowID(selfArg, vArg) } -func (self *DockNode) WantHiddenTabBarToggle() bool { +func (self *FocusScopeData) WindowID() ID { selfArg, selfFin := self.handle() defer func() { selfFin() }() - return C.wrap_ImGuiDockNode_GetWantHiddenTabBarToggle(selfArg) == C.bool(true) + + result := C.wrap_ImGuiFocusScopeData_GetWindowID(selfArg) + return *newIDFromC(func() *C.ImGuiID { result := result; return &result }()) } func (self GroupData) SetWindowID(v ID) { @@ -20085,6 +20787,21 @@ func (self *GroupData) BackupCursorMaxPos() Vec2 { return *(&Vec2{}).fromC(C.wrap_ImGuiGroupData_GetBackupCursorMaxPos(selfArg)) } +func (self GroupData) SetBackupCursorPosPrevLine(v Vec2) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiGroupData_SetBackupCursorPosPrevLine(selfArg, v.toC()) +} + +func (self *GroupData) BackupCursorPosPrevLine() Vec2 { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return *(&Vec2{}).fromC(C.wrap_ImGuiGroupData_GetBackupCursorPosPrevLine(selfArg)) +} + func (self GroupData) SetBackupIndent(v Vec1) { vArg, _ := v.c() @@ -20202,6 +20919,21 @@ func (self *GroupData) BackupHoveredIdIsAlive() bool { return C.wrap_ImGuiGroupData_GetBackupHoveredIdIsAlive(selfArg) == C.bool(true) } +func (self GroupData) SetBackupIsSameLine(v bool) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiGroupData_SetBackupIsSameLine(selfArg, C.bool(v)) +} + +func (self *GroupData) BackupIsSameLine() bool { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return C.wrap_ImGuiGroupData_GetBackupIsSameLine(selfArg) == C.bool(true) +} + func (self GroupData) SetEmitItem(v bool) { selfArg, selfFin := self.handle() defer selfFin() @@ -20217,6 +20949,108 @@ func (self *GroupData) EmitItem() bool { return C.wrap_ImGuiGroupData_GetEmitItem(selfArg) == C.bool(true) } +func (self IDStackTool) SetLastActiveFrame(v int32) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiIDStackTool_SetLastActiveFrame(selfArg, C.int(v)) +} + +func (self *IDStackTool) LastActiveFrame() int32 { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return int32(C.wrap_ImGuiIDStackTool_GetLastActiveFrame(selfArg)) +} + +func (self IDStackTool) SetStackLevel(v int32) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiIDStackTool_SetStackLevel(selfArg, C.int(v)) +} + +func (self *IDStackTool) StackLevel() int32 { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return int32(C.wrap_ImGuiIDStackTool_GetStackLevel(selfArg)) +} + +func (self IDStackTool) SetQueryId(v ID) { + vArg, _ := v.c() + + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiIDStackTool_SetQueryId(selfArg, vArg) +} + +func (self *IDStackTool) QueryId() ID { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + + result := C.wrap_ImGuiIDStackTool_GetQueryId(selfArg) + return *newIDFromC(func() *C.ImGuiID { result := result; return &result }()) +} + +func (self IDStackTool) SetResults(v Vector[*StackLevelInfo]) { + vData := v.Data + vDataArg, _ := vData.handle() + vVecArg := new(C.ImVector_ImGuiStackLevelInfo) + vVecArg.Size = C.int(v.Size) + vVecArg.Capacity = C.int(v.Capacity) + vVecArg.Data = vDataArg + v.pinner.Pin(vVecArg.Data) + + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiIDStackTool_SetResults(selfArg, *vVecArg) +} + +func (self *IDStackTool) Results() Vector[*StackLevelInfo] { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return newVectorFromC(C.wrap_ImGuiIDStackTool_GetResults(selfArg).Size, C.wrap_ImGuiIDStackTool_GetResults(selfArg).Capacity, newStackLevelInfoFromC(C.wrap_ImGuiIDStackTool_GetResults(selfArg).Data)) +} + +func (self IDStackTool) SetCopyToClipboardOnCtrlC(v bool) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiIDStackTool_SetCopyToClipboardOnCtrlC(selfArg, C.bool(v)) +} + +func (self *IDStackTool) CopyToClipboardOnCtrlC() bool { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return C.wrap_ImGuiIDStackTool_GetCopyToClipboardOnCtrlC(selfArg) == C.bool(true) +} + +func (self IDStackTool) SetCopyToClipboardLastTime(v float32) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiIDStackTool_SetCopyToClipboardLastTime(selfArg, C.float(v)) +} + +func (self *IDStackTool) CopyToClipboardLastTime() float32 { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return float32(C.wrap_ImGuiIDStackTool_GetCopyToClipboardLastTime(selfArg)) +} + func (self IO) SetConfigFlags(v ConfigFlags) { selfArg, selfFin := self.handle() defer selfFin() @@ -20750,6 +21584,21 @@ func (self *IO) KeyRepeatRate() float32 { return float32(C.wrap_ImGuiIO_GetKeyRepeatRate(selfArg)) } +func (self IO) SetConfigDebugIsDebuggerPresent(v bool) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiIO_SetConfigDebugIsDebuggerPresent(selfArg, C.bool(v)) +} + +func (self *IO) ConfigDebugIsDebuggerPresent() bool { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return C.wrap_ImGuiIO_GetConfigDebugIsDebuggerPresent(selfArg) == C.bool(true) +} + func (self IO) SetConfigDebugBeginReturnValueOnce(v bool) { selfArg, selfFin := self.handle() defer selfFin() @@ -20904,21 +21753,6 @@ func (self *IO) ClipboardUserData() uintptr { return uintptr(C.wrap_ImGuiIO_GetClipboardUserData(selfArg)) } -func (self IO) SetUnusedPadding(v uintptr) { - selfArg, selfFin := self.handle() - defer selfFin() - C.wrap_ImGuiIO_Set_UnusedPadding(selfArg, C.uintptr_t(v)) -} - -func (self *IO) UnusedPadding() uintptr { - selfArg, selfFin := self.handle() - - defer func() { - selfFin() - }() - return uintptr(C.wrap_ImGuiIO_Get_UnusedPadding(selfArg)) -} - func (self IO) SetPlatformLocaleDecimalPoint(v Wchar) { selfArg, selfFin := self.handle() defer selfFin() @@ -21114,21 +21948,6 @@ func (self *IO) MetricsActiveWindows() int32 { return int32(C.wrap_ImGuiIO_GetMetricsActiveWindows(selfArg)) } -func (self IO) SetMetricsActiveAllocations(v int32) { - selfArg, selfFin := self.handle() - defer selfFin() - C.wrap_ImGuiIO_SetMetricsActiveAllocations(selfArg, C.int(v)) -} - -func (self *IO) MetricsActiveAllocations() int32 { - selfArg, selfFin := self.handle() - - defer func() { - selfFin() - }() - return int32(C.wrap_ImGuiIO_GetMetricsActiveAllocations(selfArg)) -} - func (self IO) SetMouseDelta(v Vec2) { selfArg, selfFin := self.handle() defer selfFin() @@ -22266,6 +23085,51 @@ func (self *InputTextState) Flags() InputTextFlags { return InputTextFlags(C.wrap_ImGuiInputTextState_GetFlags(selfArg)) } +func (self InputTextState) SetReloadUserBuf(v bool) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiInputTextState_SetReloadUserBuf(selfArg, C.bool(v)) +} + +func (self *InputTextState) ReloadUserBuf() bool { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return C.wrap_ImGuiInputTextState_GetReloadUserBuf(selfArg) == C.bool(true) +} + +func (self InputTextState) SetReloadSelectionStart(v int32) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiInputTextState_SetReloadSelectionStart(selfArg, C.int(v)) +} + +func (self *InputTextState) ReloadSelectionStart() int32 { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return int32(C.wrap_ImGuiInputTextState_GetReloadSelectionStart(selfArg)) +} + +func (self InputTextState) SetReloadSelectionEnd(v int32) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiInputTextState_SetReloadSelectionEnd(selfArg, C.int(v)) +} + +func (self *InputTextState) ReloadSelectionEnd() int32 { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return int32(C.wrap_ImGuiInputTextState_GetReloadSelectionEnd(selfArg)) +} + func (self KeyData) SetDown(v bool) { selfArg, selfFin := self.handle() defer selfFin() @@ -22409,6 +23273,21 @@ func (self *KeyRoutingData) Mods() uint16 { return uint16(C.wrap_ImGuiKeyRoutingData_GetMods(selfArg)) } +func (self KeyRoutingData) SetRoutingCurrScore(v byte) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiKeyRoutingData_SetRoutingCurrScore(selfArg, C.ImU8(v)) +} + +func (self *KeyRoutingData) RoutingCurrScore() byte { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return byte(C.wrap_ImGuiKeyRoutingData_GetRoutingCurrScore(selfArg)) +} + func (self KeyRoutingData) SetRoutingNextScore(v byte) { selfArg, selfFin := self.handle() defer selfFin() @@ -22602,6 +23481,21 @@ func (self *LastItemData) DisplayRect() Rect { return *(&Rect{}).fromC(C.wrap_ImGuiLastItemData_GetDisplayRect(selfArg)) } +func (self LastItemData) SetClipRect(v Rect) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiLastItemData_SetClipRect(selfArg, v.toC()) +} + +func (self *LastItemData) ClipRect() Rect { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return *(&Rect{}).fromC(C.wrap_ImGuiLastItemData_GetClipRect(selfArg)) +} + func (self ListClipper) SetCtx(v *Context) { vArg, _ := v.handle() @@ -23021,19 +23915,19 @@ func (self *MetricsConfig) ShowDebugLog() bool { return C.wrap_ImGuiMetricsConfig_GetShowDebugLog(selfArg) == C.bool(true) } -func (self MetricsConfig) SetShowStackTool(v bool) { +func (self MetricsConfig) SetShowIDStackTool(v bool) { selfArg, selfFin := self.handle() defer selfFin() - C.wrap_ImGuiMetricsConfig_SetShowStackTool(selfArg, C.bool(v)) + C.wrap_ImGuiMetricsConfig_SetShowIDStackTool(selfArg, C.bool(v)) } -func (self *MetricsConfig) ShowStackTool() bool { +func (self *MetricsConfig) ShowIDStackTool() bool { selfArg, selfFin := self.handle() defer func() { selfFin() }() - return C.wrap_ImGuiMetricsConfig_GetShowStackTool(selfArg) == C.bool(true) + return C.wrap_ImGuiMetricsConfig_GetShowIDStackTool(selfArg) == C.bool(true) } func (self MetricsConfig) SetShowWindowsRects(v bool) { @@ -23111,6 +24005,21 @@ func (self *MetricsConfig) ShowDrawCmdBoundingBoxes() bool { return C.wrap_ImGuiMetricsConfig_GetShowDrawCmdBoundingBoxes(selfArg) == C.bool(true) } +func (self MetricsConfig) SetShowTextEncodingViewer(v bool) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiMetricsConfig_SetShowTextEncodingViewer(selfArg, C.bool(v)) +} + +func (self *MetricsConfig) ShowTextEncodingViewer() bool { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return C.wrap_ImGuiMetricsConfig_GetShowTextEncodingViewer(selfArg) == C.bool(true) +} + func (self MetricsConfig) SetShowAtlasTintedWithTextColor(v bool) { selfArg, selfFin := self.handle() defer selfFin() @@ -23171,6 +24080,40 @@ func (self *MetricsConfig) ShowTablesRectsType() int32 { return int32(C.wrap_ImGuiMetricsConfig_GetShowTablesRectsType(selfArg)) } +func (self MetricsConfig) SetHighlightMonitorIdx(v int32) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiMetricsConfig_SetHighlightMonitorIdx(selfArg, C.int(v)) +} + +func (self *MetricsConfig) HighlightMonitorIdx() int32 { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return int32(C.wrap_ImGuiMetricsConfig_GetHighlightMonitorIdx(selfArg)) +} + +func (self MetricsConfig) SetHighlightViewportID(v ID) { + vArg, _ := v.c() + + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiMetricsConfig_SetHighlightViewportID(selfArg, vArg) +} + +func (self *MetricsConfig) HighlightViewportID() ID { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + + result := C.wrap_ImGuiMetricsConfig_GetHighlightViewportID(selfArg) + return *newIDFromC(func() *C.ImGuiID { result := result; return &result }()) +} + func (self NavItemData) SetWindow(v *Window) { vArg, _ := v.handle() @@ -23395,34 +24338,53 @@ func (self *NextItemData) Width() float32 { return float32(C.wrap_ImGuiNextItemData_GetWidth(selfArg)) } -func (self NextItemData) SetOpenCond(v Cond) { +func (self NextItemData) SetShortcut(v KeyChord) { + vArg, _ := v.c() + + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiNextItemData_SetShortcut(selfArg, vArg) +} + +func (self *NextItemData) Shortcut() KeyChord { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + + result := C.wrap_ImGuiNextItemData_GetShortcut(selfArg) + return *newKeyChordFromC(func() *C.ImGuiKeyChord { result := result; return &result }()) +} + +func (self NextItemData) SetOpenVal(v bool) { selfArg, selfFin := self.handle() defer selfFin() - C.wrap_ImGuiNextItemData_SetOpenCond(selfArg, C.ImGuiCond(v)) + C.wrap_ImGuiNextItemData_SetOpenVal(selfArg, C.bool(v)) } -func (self *NextItemData) OpenCond() Cond { +func (self *NextItemData) OpenVal() bool { selfArg, selfFin := self.handle() defer func() { selfFin() }() - return Cond(C.wrap_ImGuiNextItemData_GetOpenCond(selfArg)) + return C.wrap_ImGuiNextItemData_GetOpenVal(selfArg) == C.bool(true) } -func (self NextItemData) SetOpenVal(v bool) { +func (self NextItemData) SetOpenCond(v Cond) { selfArg, selfFin := self.handle() defer selfFin() - C.wrap_ImGuiNextItemData_SetOpenVal(selfArg, C.bool(v)) + C.wrap_ImGuiNextItemData_SetOpenCond(selfArg, C.ImGuiCond(v)) } -func (self *NextItemData) OpenVal() bool { +func (self *NextItemData) OpenCond() Cond { selfArg, selfFin := self.handle() defer func() { selfFin() }() - return C.wrap_ImGuiNextItemData_GetOpenVal(selfArg) == C.bool(true) + return Cond(C.wrap_ImGuiNextItemData_GetOpenCond(selfArg)) } func (self NextWindowData) SetFlags(v NextWindowDataFlags) { @@ -23575,6 +24537,21 @@ func (self *NextWindowData) ScrollVal() Vec2 { return *(&Vec2{}).fromC(C.wrap_ImGuiNextWindowData_GetScrollVal(selfArg)) } +func (self NextWindowData) SetChildFlags(v ChildFlags) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiNextWindowData_SetChildFlags(selfArg, C.ImGuiChildFlags(v)) +} + +func (self *NextWindowData) ChildFlags() ChildFlags { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return ChildFlags(C.wrap_ImGuiNextWindowData_GetChildFlags(selfArg)) +} + func (self NextWindowData) SetPosUndock(v bool) { selfArg, selfFin := self.handle() defer selfFin() @@ -24856,108 +25833,6 @@ func (self *StackSizes) SizeOfDisabledStack() int16 { return int16(C.wrap_ImGuiStackSizes_GetSizeOfDisabledStack(selfArg)) } -func (self StackTool) SetLastActiveFrame(v int32) { - selfArg, selfFin := self.handle() - defer selfFin() - C.wrap_ImGuiStackTool_SetLastActiveFrame(selfArg, C.int(v)) -} - -func (self *StackTool) LastActiveFrame() int32 { - selfArg, selfFin := self.handle() - - defer func() { - selfFin() - }() - return int32(C.wrap_ImGuiStackTool_GetLastActiveFrame(selfArg)) -} - -func (self StackTool) SetStackLevel(v int32) { - selfArg, selfFin := self.handle() - defer selfFin() - C.wrap_ImGuiStackTool_SetStackLevel(selfArg, C.int(v)) -} - -func (self *StackTool) StackLevel() int32 { - selfArg, selfFin := self.handle() - - defer func() { - selfFin() - }() - return int32(C.wrap_ImGuiStackTool_GetStackLevel(selfArg)) -} - -func (self StackTool) SetQueryId(v ID) { - vArg, _ := v.c() - - selfArg, selfFin := self.handle() - defer selfFin() - C.wrap_ImGuiStackTool_SetQueryId(selfArg, vArg) -} - -func (self *StackTool) QueryId() ID { - selfArg, selfFin := self.handle() - - defer func() { - selfFin() - }() - - result := C.wrap_ImGuiStackTool_GetQueryId(selfArg) - return *newIDFromC(func() *C.ImGuiID { result := result; return &result }()) -} - -func (self StackTool) SetResults(v Vector[*StackLevelInfo]) { - vData := v.Data - vDataArg, _ := vData.handle() - vVecArg := new(C.ImVector_ImGuiStackLevelInfo) - vVecArg.Size = C.int(v.Size) - vVecArg.Capacity = C.int(v.Capacity) - vVecArg.Data = vDataArg - v.pinner.Pin(vVecArg.Data) - - selfArg, selfFin := self.handle() - defer selfFin() - C.wrap_ImGuiStackTool_SetResults(selfArg, *vVecArg) -} - -func (self *StackTool) Results() Vector[*StackLevelInfo] { - selfArg, selfFin := self.handle() - - defer func() { - selfFin() - }() - return newVectorFromC(C.wrap_ImGuiStackTool_GetResults(selfArg).Size, C.wrap_ImGuiStackTool_GetResults(selfArg).Capacity, newStackLevelInfoFromC(C.wrap_ImGuiStackTool_GetResults(selfArg).Data)) -} - -func (self StackTool) SetCopyToClipboardOnCtrlC(v bool) { - selfArg, selfFin := self.handle() - defer selfFin() - C.wrap_ImGuiStackTool_SetCopyToClipboardOnCtrlC(selfArg, C.bool(v)) -} - -func (self *StackTool) CopyToClipboardOnCtrlC() bool { - selfArg, selfFin := self.handle() - - defer func() { - selfFin() - }() - return C.wrap_ImGuiStackTool_GetCopyToClipboardOnCtrlC(selfArg) == C.bool(true) -} - -func (self StackTool) SetCopyToClipboardLastTime(v float32) { - selfArg, selfFin := self.handle() - defer selfFin() - C.wrap_ImGuiStackTool_SetCopyToClipboardLastTime(selfArg, C.float(v)) -} - -func (self *StackTool) CopyToClipboardLastTime() float32 { - selfArg, selfFin := self.handle() - - defer func() { - selfFin() - }() - return float32(C.wrap_ImGuiStackTool_GetCopyToClipboardLastTime(selfArg)) -} - func (self Storage) SetData(v Vector[*StoragePair]) { vData := v.Data vDataArg, _ := vData.handle() @@ -25450,6 +26325,21 @@ func (self *Style) TabBarBorderSize() float32 { return float32(C.wrap_ImGuiStyle_GetTabBarBorderSize(selfArg)) } +func (self Style) SetTableAngledHeadersAngle(v float32) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiStyle_SetTableAngledHeadersAngle(selfArg, C.float(v)) +} + +func (self *Style) TableAngledHeadersAngle() float32 { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return float32(C.wrap_ImGuiStyle_GetTableAngledHeadersAngle(selfArg)) +} + func (self Style) SetColorButtonPosition(v Dir) { selfArg, selfFin := self.handle() defer selfFin() @@ -27126,6 +28016,36 @@ func (self *Table) RefScale() float32 { return float32(C.wrap_ImGuiTable_GetRefScale(selfArg)) } +func (self Table) SetAngledHeadersHeight(v float32) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiTable_SetAngledHeadersHeight(selfArg, C.float(v)) +} + +func (self *Table) AngledHeadersHeight() float32 { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return float32(C.wrap_ImGuiTable_GetAngledHeadersHeight(selfArg)) +} + +func (self Table) SetAngledHeadersSlope(v float32) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiTable_SetAngledHeadersSlope(selfArg, C.float(v)) +} + +func (self *Table) AngledHeadersSlope() float32 { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return float32(C.wrap_ImGuiTable_GetAngledHeadersSlope(selfArg)) +} + func (self Table) SetOuterRect(v Rect) { selfArg, selfFin := self.handle() defer selfFin() @@ -27581,6 +28501,21 @@ func (self *Table) IsContextPopupOpen() bool { return C.wrap_ImGuiTable_GetIsContextPopupOpen(selfArg) == C.bool(true) } +func (self Table) SetDisableDefaultContextMenu(v bool) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiTable_SetDisableDefaultContextMenu(selfArg, C.bool(v)) +} + +func (self *Table) DisableDefaultContextMenu() bool { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return C.wrap_ImGuiTable_GetDisableDefaultContextMenu(selfArg) == C.bool(true) +} + func (self Table) SetIsSettingsRequestLoad(v bool) { selfArg, selfFin := self.handle() defer selfFin() @@ -27686,6 +28621,36 @@ func (self *Table) IsDefaultSizingPolicy() bool { return C.wrap_ImGuiTable_GetIsDefaultSizingPolicy(selfArg) == C.bool(true) } +func (self Table) SetIsActiveIdAliveBeforeTable(v bool) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiTable_SetIsActiveIdAliveBeforeTable(selfArg, C.bool(v)) +} + +func (self *Table) IsActiveIdAliveBeforeTable() bool { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return C.wrap_ImGuiTable_GetIsActiveIdAliveBeforeTable(selfArg) == C.bool(true) +} + +func (self Table) SetIsActiveIdInTable(v bool) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiTable_SetIsActiveIdInTable(selfArg, C.bool(v)) +} + +func (self *Table) IsActiveIdInTable() bool { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return C.wrap_ImGuiTable_GetIsActiveIdInTable(selfArg) == C.bool(true) +} + func (self Table) SetHasScrollbarYCurr(v bool) { selfArg, selfFin := self.handle() defer selfFin() @@ -28494,19 +29459,19 @@ func (self *TableInstanceData) LastOuterHeight() float32 { return float32(C.wrap_ImGuiTableInstanceData_GetLastOuterHeight(selfArg)) } -func (self TableInstanceData) SetLastFirstRowHeight(v float32) { +func (self TableInstanceData) SetLastTopHeadersRowHeight(v float32) { selfArg, selfFin := self.handle() defer selfFin() - C.wrap_ImGuiTableInstanceData_SetLastFirstRowHeight(selfArg, C.float(v)) + C.wrap_ImGuiTableInstanceData_SetLastTopHeadersRowHeight(selfArg, C.float(v)) } -func (self *TableInstanceData) LastFirstRowHeight() float32 { +func (self *TableInstanceData) LastTopHeadersRowHeight() float32 { selfArg, selfFin := self.handle() defer func() { selfFin() }() - return float32(C.wrap_ImGuiTableInstanceData_GetLastFirstRowHeight(selfArg)) + return float32(C.wrap_ImGuiTableInstanceData_GetLastTopHeadersRowHeight(selfArg)) } func (self TableInstanceData) SetLastFrozenHeight(v float32) { @@ -28695,6 +29660,21 @@ func (self *TableTempData) LastTimeActive() float32 { return float32(C.wrap_ImGuiTableTempData_GetLastTimeActive(selfArg)) } +func (self TableTempData) SetAngledHeadersExtraWidth(v float32) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiTableTempData_SetAngledHeadersExtraWidth(selfArg, C.float(v)) +} + +func (self *TableTempData) AngledHeadersExtraWidth() float32 { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return float32(C.wrap_ImGuiTableTempData_GetAngledHeadersExtraWidth(selfArg)) +} + func (self TableTempData) SetUserOuterSize(v Vec2) { selfArg, selfFin := self.handle() defer selfFin() @@ -29838,6 +30818,21 @@ func (self *Window) FlagsPreviousFrame() WindowFlags { return WindowFlags(C.wrap_ImGuiWindow_GetFlagsPreviousFrame(selfArg)) } +func (self Window) SetChildFlags(v ChildFlags) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiWindow_SetChildFlags(selfArg, C.ImGuiChildFlags(v)) +} + +func (self *Window) ChildFlags() ChildFlags { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return ChildFlags(C.wrap_ImGuiWindow_GetChildFlags(selfArg)) +} + func (self Window) SetWindowClass(v WindowClass) { vArg, _ := v.c() @@ -30644,21 +31639,6 @@ func (self *Window) AutoFitFramesY() int { return int(C.wrap_ImGuiWindow_GetAutoFitFramesY(selfArg)) } -func (self Window) SetAutoFitChildAxises(v int) { - selfArg, selfFin := self.handle() - defer selfFin() - C.wrap_ImGuiWindow_SetAutoFitChildAxises(selfArg, C.ImS8(v)) -} - -func (self *Window) AutoFitChildAxises() int { - selfArg, selfFin := self.handle() - - defer func() { - selfFin() - }() - return int(C.wrap_ImGuiWindow_GetAutoFitChildAxises(selfArg)) -} - func (self Window) SetAutoFitOnlyGrows(v bool) { selfArg, selfFin := self.handle() defer selfFin() @@ -31288,6 +32268,23 @@ func (self *Window) RootWindowForNav() *Window { return newWindowFromC(C.wrap_ImGuiWindow_GetRootWindowForNav(selfArg)) } +func (self Window) SetParentWindowForFocusRoute(v *Window) { + vArg, _ := v.handle() + + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiWindow_SetParentWindowForFocusRoute(selfArg, vArg) +} + +func (self *Window) ParentWindowForFocusRoute() *Window { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return newWindowFromC(C.wrap_ImGuiWindow_GetParentWindowForFocusRoute(selfArg)) +} + func (self Window) SetNavLastChildNavWindow(v *Window) { vArg, _ := v.handle() @@ -31598,6 +32595,25 @@ func (self *WindowClass) ParentViewportId() ID { return *newIDFromC(func() *C.ImGuiID { result := result; return &result }()) } +func (self WindowClass) SetFocusRouteParentWindowId(v ID) { + vArg, _ := v.c() + + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiWindowClass_SetFocusRouteParentWindowId(selfArg, vArg) +} + +func (self *WindowClass) FocusRouteParentWindowId() ID { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + + result := C.wrap_ImGuiWindowClass_GetFocusRouteParentWindowId(selfArg) + return *newIDFromC(func() *C.ImGuiID { result := result; return &result }()) +} + func (self WindowClass) SetViewportFlagsOverrideSet(v ViewportFlags) { selfArg, selfFin := self.handle() defer selfFin() @@ -31794,6 +32810,21 @@ func (self *WindowSettings) Collapsed() bool { return C.wrap_ImGuiWindowSettings_GetCollapsed(selfArg) == C.bool(true) } +func (self WindowSettings) SetIsChild(v bool) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiWindowSettings_SetIsChild(selfArg, C.bool(v)) +} + +func (self *WindowSettings) IsChild() bool { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return C.wrap_ImGuiWindowSettings_GetIsChild(selfArg) == C.bool(true) +} + func (self WindowSettings) SetWantApply(v bool) { selfArg, selfFin := self.handle() defer selfFin() @@ -32364,6 +33395,21 @@ func (self *WindowTempData) ParentLayoutType() LayoutType { return LayoutType(C.wrap_ImGuiWindowTempData_GetParentLayoutType(selfArg)) } +func (self WindowTempData) SetModalDimBgColor(v uint32) { + selfArg, selfFin := self.handle() + defer selfFin() + C.wrap_ImGuiWindowTempData_SetModalDimBgColor(selfArg, C.ImU32(v)) +} + +func (self *WindowTempData) ModalDimBgColor() uint32 { + selfArg, selfFin := self.handle() + + defer func() { + selfFin() + }() + return uint32(C.wrap_ImGuiWindowTempData_GetModalDimBgColor(selfArg)) +} + func (self WindowTempData) SetItemWidth(v float32) { selfArg, selfFin := self.handle() defer selfFin() diff --git a/cimgui_structs_accessor.cpp b/cimgui_structs_accessor.cpp index 95c2f8966..f0e2b1fa4 100644 --- a/cimgui_structs_accessor.cpp +++ b/cimgui_structs_accessor.cpp @@ -252,6 +252,8 @@ void wrap_ImFontConfig_SetFontBuilderFlags(ImFontConfig *ImFontConfigPtr, unsign unsigned int wrap_ImFontConfig_GetFontBuilderFlags(ImFontConfig *self) { return self->FontBuilderFlags; } void wrap_ImFontConfig_SetRasterizerMultiply(ImFontConfig *ImFontConfigPtr, float v) { ImFontConfigPtr->RasterizerMultiply = v; } float wrap_ImFontConfig_GetRasterizerMultiply(ImFontConfig *self) { return self->RasterizerMultiply; } +void wrap_ImFontConfig_SetRasterizerDensity(ImFontConfig *ImFontConfigPtr, float v) { ImFontConfigPtr->RasterizerDensity = v; } +float wrap_ImFontConfig_GetRasterizerDensity(ImFontConfig *self) { return self->RasterizerDensity; } void wrap_ImFontConfig_SetEllipsisChar(ImFontConfig *ImFontConfigPtr, ImWchar v) { ImFontConfigPtr->EllipsisChar = v; } ImWchar wrap_ImFontConfig_GetEllipsisChar(ImFontConfig *self) { return self->EllipsisChar; } void wrap_ImFontConfig_SetName(ImFontConfig *ImFontConfigPtr, char* v) { memcpy(ImFontConfigPtr->Name, v, sizeof(char)*40); } @@ -366,6 +368,8 @@ void wrap_ImGuiContext_SetWindowsActiveCount(ImGuiContext *ImGuiContextPtr, int int wrap_ImGuiContext_GetWindowsActiveCount(ImGuiContext *self) { return self->WindowsActiveCount; } void wrap_ImGuiContext_SetWindowsHoverPadding(ImGuiContext *ImGuiContextPtr, ImVec2 v) { ImGuiContextPtr->WindowsHoverPadding = v; } ImVec2 wrap_ImGuiContext_GetWindowsHoverPadding(ImGuiContext *self) { return self->WindowsHoverPadding; } +void wrap_ImGuiContext_SetDebugBreakInWindow(ImGuiContext *ImGuiContextPtr, ImGuiID v) { ImGuiContextPtr->DebugBreakInWindow = v; } +ImGuiID wrap_ImGuiContext_GetDebugBreakInWindow(ImGuiContext *self) { return self->DebugBreakInWindow; } void wrap_ImGuiContext_SetCurrentWindow(ImGuiContext *ImGuiContextPtr, ImGuiWindow* v) { ImGuiContextPtr->CurrentWindow = v; } ImGuiWindow* wrap_ImGuiContext_GetCurrentWindow(ImGuiContext *self) { return self->CurrentWindow; } void wrap_ImGuiContext_SetHoveredWindow(ImGuiContext *ImGuiContextPtr, ImGuiWindow* v) { ImGuiContextPtr->HoveredWindow = v; } @@ -380,6 +384,8 @@ void wrap_ImGuiContext_SetWheelingWindowRefMousePos(ImGuiContext *ImGuiContextPt ImVec2 wrap_ImGuiContext_GetWheelingWindowRefMousePos(ImGuiContext *self) { return self->WheelingWindowRefMousePos; } void wrap_ImGuiContext_SetWheelingWindowStartFrame(ImGuiContext *ImGuiContextPtr, int v) { ImGuiContextPtr->WheelingWindowStartFrame = v; } int wrap_ImGuiContext_GetWheelingWindowStartFrame(ImGuiContext *self) { return self->WheelingWindowStartFrame; } +void wrap_ImGuiContext_SetWheelingWindowScrolledFrame(ImGuiContext *ImGuiContextPtr, int v) { ImGuiContextPtr->WheelingWindowScrolledFrame = v; } +int wrap_ImGuiContext_GetWheelingWindowScrolledFrame(ImGuiContext *self) { return self->WheelingWindowScrolledFrame; } void wrap_ImGuiContext_SetWheelingWindowReleaseTimer(ImGuiContext *ImGuiContextPtr, float v) { ImGuiContextPtr->WheelingWindowReleaseTimer = v; } float wrap_ImGuiContext_GetWheelingWindowReleaseTimer(ImGuiContext *self) { return self->WheelingWindowReleaseTimer; } void wrap_ImGuiContext_SetWheelingWindowWheelRemainder(ImGuiContext *ImGuiContextPtr, ImVec2 v) { ImGuiContextPtr->WheelingWindowWheelRemainder = v; } @@ -418,14 +424,16 @@ void wrap_ImGuiContext_SetActiveIdHasBeenEditedBefore(ImGuiContext *ImGuiContext bool wrap_ImGuiContext_GetActiveIdHasBeenEditedBefore(ImGuiContext *self) { return self->ActiveIdHasBeenEditedBefore; } void wrap_ImGuiContext_SetActiveIdHasBeenEditedThisFrame(ImGuiContext *ImGuiContextPtr, bool v) { ImGuiContextPtr->ActiveIdHasBeenEditedThisFrame = v; } bool wrap_ImGuiContext_GetActiveIdHasBeenEditedThisFrame(ImGuiContext *self) { return self->ActiveIdHasBeenEditedThisFrame; } +void wrap_ImGuiContext_SetActiveIdFromShortcut(ImGuiContext *ImGuiContextPtr, bool v) { ImGuiContextPtr->ActiveIdFromShortcut = v; } +bool wrap_ImGuiContext_GetActiveIdFromShortcut(ImGuiContext *self) { return self->ActiveIdFromShortcut; } +void wrap_ImGuiContext_SetActiveIdMouseButton(ImGuiContext *ImGuiContextPtr, int v) { ImGuiContextPtr->ActiveIdMouseButton = v; } +int wrap_ImGuiContext_GetActiveIdMouseButton(ImGuiContext *self) { return self->ActiveIdMouseButton; } void wrap_ImGuiContext_SetActiveIdClickOffset(ImGuiContext *ImGuiContextPtr, ImVec2 v) { ImGuiContextPtr->ActiveIdClickOffset = v; } ImVec2 wrap_ImGuiContext_GetActiveIdClickOffset(ImGuiContext *self) { return self->ActiveIdClickOffset; } void wrap_ImGuiContext_SetActiveIdWindow(ImGuiContext *ImGuiContextPtr, ImGuiWindow* v) { ImGuiContextPtr->ActiveIdWindow = v; } ImGuiWindow* wrap_ImGuiContext_GetActiveIdWindow(ImGuiContext *self) { return self->ActiveIdWindow; } void wrap_ImGuiContext_SetActiveIdSource(ImGuiContext *ImGuiContextPtr, ImGuiInputSource v) { ImGuiContextPtr->ActiveIdSource = v; } ImGuiInputSource wrap_ImGuiContext_GetActiveIdSource(ImGuiContext *self) { return self->ActiveIdSource; } -void wrap_ImGuiContext_SetActiveIdMouseButton(ImGuiContext *ImGuiContextPtr, int v) { ImGuiContextPtr->ActiveIdMouseButton = v; } -int wrap_ImGuiContext_GetActiveIdMouseButton(ImGuiContext *self) { return self->ActiveIdMouseButton; } void wrap_ImGuiContext_SetActiveIdPreviousFrame(ImGuiContext *ImGuiContextPtr, ImGuiID v) { ImGuiContextPtr->ActiveIdPreviousFrame = v; } ImGuiID wrap_ImGuiContext_GetActiveIdPreviousFrame(ImGuiContext *self) { return self->ActiveIdPreviousFrame; } void wrap_ImGuiContext_SetActiveIdPreviousFrameIsAlive(ImGuiContext *ImGuiContextPtr, bool v) { ImGuiContextPtr->ActiveIdPreviousFrameIsAlive = v; } @@ -438,7 +446,15 @@ void wrap_ImGuiContext_SetLastActiveId(ImGuiContext *ImGuiContextPtr, ImGuiID v) ImGuiID wrap_ImGuiContext_GetLastActiveId(ImGuiContext *self) { return self->LastActiveId; } void wrap_ImGuiContext_SetLastActiveIdTimer(ImGuiContext *ImGuiContextPtr, float v) { ImGuiContextPtr->LastActiveIdTimer = v; } float wrap_ImGuiContext_GetLastActiveIdTimer(ImGuiContext *self) { return self->LastActiveIdTimer; } -void wrap_ImGuiContext_SetKeysOwnerData(ImGuiContext *ImGuiContextPtr, ImGuiKeyOwnerData* v) { memcpy(ImGuiContextPtr->KeysOwnerData, v, sizeof(ImGuiKeyOwnerData)*140); } +void wrap_ImGuiContext_SetLastKeyModsChangeTime(ImGuiContext *ImGuiContextPtr, double v) { ImGuiContextPtr->LastKeyModsChangeTime = v; } +double wrap_ImGuiContext_GetLastKeyModsChangeTime(ImGuiContext *self) { return self->LastKeyModsChangeTime; } +void wrap_ImGuiContext_SetLastKeyModsChangeFromNoneTime(ImGuiContext *ImGuiContextPtr, double v) { ImGuiContextPtr->LastKeyModsChangeFromNoneTime = v; } +double wrap_ImGuiContext_GetLastKeyModsChangeFromNoneTime(ImGuiContext *self) { return self->LastKeyModsChangeFromNoneTime; } +void wrap_ImGuiContext_SetLastKeyboardKeyPressTime(ImGuiContext *ImGuiContextPtr, double v) { ImGuiContextPtr->LastKeyboardKeyPressTime = v; } +double wrap_ImGuiContext_GetLastKeyboardKeyPressTime(ImGuiContext *self) { return self->LastKeyboardKeyPressTime; } +void wrap_ImGuiContext_SetKeysMayBeCharInput(ImGuiContext *ImGuiContextPtr, ImBitArrayForNamedKeys v) { ImGuiContextPtr->KeysMayBeCharInput = v; } +ImBitArrayForNamedKeys wrap_ImGuiContext_GetKeysMayBeCharInput(ImGuiContext *self) { return self->KeysMayBeCharInput; } +void wrap_ImGuiContext_SetKeysOwnerData(ImGuiContext *ImGuiContextPtr, ImGuiKeyOwnerData* v) { memcpy(ImGuiContextPtr->KeysOwnerData, v, sizeof(ImGuiKeyOwnerData)*154); } ImGuiKeyOwnerData* wrap_ImGuiContext_GetKeysOwnerData(ImGuiContext *self) { return self->KeysOwnerData; } void wrap_ImGuiContext_SetKeysRoutingTable(ImGuiContext *ImGuiContextPtr, ImGuiKeyRoutingTable v) { ImGuiContextPtr->KeysRoutingTable = v; } ImGuiKeyRoutingTable wrap_ImGuiContext_GetKeysRoutingTable(ImGuiContext *self) { return self->KeysRoutingTable; } @@ -446,8 +462,8 @@ void wrap_ImGuiContext_SetActiveIdUsingNavDirMask(ImGuiContext *ImGuiContextPtr, ImU32 wrap_ImGuiContext_GetActiveIdUsingNavDirMask(ImGuiContext *self) { return self->ActiveIdUsingNavDirMask; } void wrap_ImGuiContext_SetActiveIdUsingAllKeyboardKeys(ImGuiContext *ImGuiContextPtr, bool v) { ImGuiContextPtr->ActiveIdUsingAllKeyboardKeys = v; } bool wrap_ImGuiContext_GetActiveIdUsingAllKeyboardKeys(ImGuiContext *self) { return self->ActiveIdUsingAllKeyboardKeys; } -void wrap_ImGuiContext_SetActiveIdUsingNavInputMask(ImGuiContext *ImGuiContextPtr, ImU32 v) { ImGuiContextPtr->ActiveIdUsingNavInputMask = v; } -ImU32 wrap_ImGuiContext_GetActiveIdUsingNavInputMask(ImGuiContext *self) { return self->ActiveIdUsingNavInputMask; } +void wrap_ImGuiContext_SetDebugBreakInShortcutRouting(ImGuiContext *ImGuiContextPtr, ImGuiKeyChord v) { ImGuiContextPtr->DebugBreakInShortcutRouting = v; } +ImGuiKeyChord wrap_ImGuiContext_GetDebugBreakInShortcutRouting(ImGuiContext *self) { return self->DebugBreakInShortcutRouting; } void wrap_ImGuiContext_SetCurrentFocusScopeId(ImGuiContext *ImGuiContextPtr, ImGuiID v) { ImGuiContextPtr->CurrentFocusScopeId = v; } ImGuiID wrap_ImGuiContext_GetCurrentFocusScopeId(ImGuiContext *self) { return self->CurrentFocusScopeId; } void wrap_ImGuiContext_SetCurrentItemFlags(ImGuiContext *ImGuiContextPtr, ImGuiItemFlags v) { ImGuiContextPtr->CurrentItemFlags = v; } @@ -460,14 +476,18 @@ void wrap_ImGuiContext_SetLastItemData(ImGuiContext *ImGuiContextPtr, ImGuiLastI ImGuiLastItemData wrap_ImGuiContext_GetLastItemData(ImGuiContext *self) { return self->LastItemData; } void wrap_ImGuiContext_SetNextWindowData(ImGuiContext *ImGuiContextPtr, ImGuiNextWindowData v) { ImGuiContextPtr->NextWindowData = v; } ImGuiNextWindowData wrap_ImGuiContext_GetNextWindowData(ImGuiContext *self) { return self->NextWindowData; } +void wrap_ImGuiContext_SetDebugShowGroupRects(ImGuiContext *ImGuiContextPtr, bool v) { ImGuiContextPtr->DebugShowGroupRects = v; } +bool wrap_ImGuiContext_GetDebugShowGroupRects(ImGuiContext *self) { return self->DebugShowGroupRects; } +void wrap_ImGuiContext_SetDebugFlashStyleColorIdx(ImGuiContext *ImGuiContextPtr, ImGuiCol v) { ImGuiContextPtr->DebugFlashStyleColorIdx = v; } +ImGuiCol wrap_ImGuiContext_GetDebugFlashStyleColorIdx(ImGuiContext *self) { return self->DebugFlashStyleColorIdx; } void wrap_ImGuiContext_SetColorStack(ImGuiContext *ImGuiContextPtr, ImVector_ImGuiColorMod v) { ImGuiContextPtr->ColorStack = v; } ImVector_ImGuiColorMod wrap_ImGuiContext_GetColorStack(ImGuiContext *self) { return self->ColorStack; } void wrap_ImGuiContext_SetStyleVarStack(ImGuiContext *ImGuiContextPtr, ImVector_ImGuiStyleMod v) { ImGuiContextPtr->StyleVarStack = v; } ImVector_ImGuiStyleMod wrap_ImGuiContext_GetStyleVarStack(ImGuiContext *self) { return self->StyleVarStack; } void wrap_ImGuiContext_SetFontStack(ImGuiContext *ImGuiContextPtr, ImVector_ImFontPtr v) { ImGuiContextPtr->FontStack = v; } ImVector_ImFontPtr wrap_ImGuiContext_GetFontStack(ImGuiContext *self) { return self->FontStack; } -void wrap_ImGuiContext_SetFocusScopeStack(ImGuiContext *ImGuiContextPtr, ImVector_ImGuiID v) { ImGuiContextPtr->FocusScopeStack = v; } -ImVector_ImGuiID wrap_ImGuiContext_GetFocusScopeStack(ImGuiContext *self) { return self->FocusScopeStack; } +void wrap_ImGuiContext_SetFocusScopeStack(ImGuiContext *ImGuiContextPtr, ImVector_ImGuiFocusScopeData v) { ImGuiContextPtr->FocusScopeStack = v; } +ImVector_ImGuiFocusScopeData wrap_ImGuiContext_GetFocusScopeStack(ImGuiContext *self) { return self->FocusScopeStack; } void wrap_ImGuiContext_SetItemFlagsStack(ImGuiContext *ImGuiContextPtr, ImVector_ImGuiItemFlags v) { ImGuiContextPtr->ItemFlagsStack = v; } ImVector_ImGuiItemFlags wrap_ImGuiContext_GetItemFlagsStack(ImGuiContext *self) { return self->ItemFlagsStack; } void wrap_ImGuiContext_SetGroupStack(ImGuiContext *ImGuiContextPtr, ImVector_ImGuiGroupData v) { ImGuiContextPtr->GroupStack = v; } @@ -478,8 +498,6 @@ void wrap_ImGuiContext_SetBeginPopupStack(ImGuiContext *ImGuiContextPtr, ImVecto ImVector_ImGuiPopupData wrap_ImGuiContext_GetBeginPopupStack(ImGuiContext *self) { return self->BeginPopupStack; } void wrap_ImGuiContext_SetNavTreeNodeStack(ImGuiContext *ImGuiContextPtr, ImVector_ImGuiNavTreeNodeData v) { ImGuiContextPtr->NavTreeNodeStack = v; } ImVector_ImGuiNavTreeNodeData wrap_ImGuiContext_GetNavTreeNodeStack(ImGuiContext *self) { return self->NavTreeNodeStack; } -void wrap_ImGuiContext_SetBeginMenuCount(ImGuiContext *ImGuiContextPtr, int v) { ImGuiContextPtr->BeginMenuCount = v; } -int wrap_ImGuiContext_GetBeginMenuCount(ImGuiContext *self) { return self->BeginMenuCount; } void wrap_ImGuiContext_SetViewports(ImGuiContext *ImGuiContextPtr, ImVector_ImGuiViewportPPtr v) { ImGuiContextPtr->Viewports = v; } ImVector_ImGuiViewportPPtr wrap_ImGuiContext_GetViewports(ImGuiContext *self) { return self->Viewports; } void wrap_ImGuiContext_SetCurrentDpiScale(ImGuiContext *ImGuiContextPtr, float v) { ImGuiContextPtr->CurrentDpiScale = v; } @@ -494,6 +512,8 @@ void wrap_ImGuiContext_SetPlatformLastFocusedViewportId(ImGuiContext *ImGuiConte ImGuiID wrap_ImGuiContext_GetPlatformLastFocusedViewportId(ImGuiContext *self) { return self->PlatformLastFocusedViewportId; } void wrap_ImGuiContext_SetFallbackMonitor(ImGuiContext *ImGuiContextPtr, ImGuiPlatformMonitor v) { ImGuiContextPtr->FallbackMonitor = v; } ImGuiPlatformMonitor wrap_ImGuiContext_GetFallbackMonitor(ImGuiContext *self) { return self->FallbackMonitor; } +void wrap_ImGuiContext_SetPlatformMonitorsFullWorkRect(ImGuiContext *ImGuiContextPtr, ImRect v) { ImGuiContextPtr->PlatformMonitorsFullWorkRect = v; } +ImRect wrap_ImGuiContext_GetPlatformMonitorsFullWorkRect(ImGuiContext *self) { return self->PlatformMonitorsFullWorkRect; } void wrap_ImGuiContext_SetViewportCreatedCount(ImGuiContext *ImGuiContextPtr, int v) { ImGuiContextPtr->ViewportCreatedCount = v; } int wrap_ImGuiContext_GetViewportCreatedCount(ImGuiContext *self) { return self->ViewportCreatedCount; } void wrap_ImGuiContext_SetPlatformWindowsCreatedCount(ImGuiContext *ImGuiContextPtr, int v) { ImGuiContextPtr->PlatformWindowsCreatedCount = v; } @@ -506,6 +526,8 @@ void wrap_ImGuiContext_SetNavId(ImGuiContext *ImGuiContextPtr, ImGuiID v) { ImGu ImGuiID wrap_ImGuiContext_GetNavId(ImGuiContext *self) { return self->NavId; } void wrap_ImGuiContext_SetNavFocusScopeId(ImGuiContext *ImGuiContextPtr, ImGuiID v) { ImGuiContextPtr->NavFocusScopeId = v; } ImGuiID wrap_ImGuiContext_GetNavFocusScopeId(ImGuiContext *self) { return self->NavFocusScopeId; } +void wrap_ImGuiContext_SetNavFocusRoute(ImGuiContext *ImGuiContextPtr, ImVector_ImGuiFocusScopeData v) { ImGuiContextPtr->NavFocusRoute = v; } +ImVector_ImGuiFocusScopeData wrap_ImGuiContext_GetNavFocusRoute(ImGuiContext *self) { return self->NavFocusRoute; } void wrap_ImGuiContext_SetNavActivateId(ImGuiContext *ImGuiContextPtr, ImGuiID v) { ImGuiContextPtr->NavActivateId = v; } ImGuiID wrap_ImGuiContext_GetNavActivateId(ImGuiContext *self) { return self->NavActivateId; } void wrap_ImGuiContext_SetNavActivateDownId(ImGuiContext *ImGuiContextPtr, ImGuiID v) { ImGuiContextPtr->NavActivateDownId = v; } @@ -514,6 +536,10 @@ void wrap_ImGuiContext_SetNavActivatePressedId(ImGuiContext *ImGuiContextPtr, Im ImGuiID wrap_ImGuiContext_GetNavActivatePressedId(ImGuiContext *self) { return self->NavActivatePressedId; } void wrap_ImGuiContext_SetNavActivateFlags(ImGuiContext *ImGuiContextPtr, ImGuiActivateFlags v) { ImGuiContextPtr->NavActivateFlags = v; } ImGuiActivateFlags wrap_ImGuiContext_GetNavActivateFlags(ImGuiContext *self) { return self->NavActivateFlags; } +void wrap_ImGuiContext_SetNavHighlightActivatedId(ImGuiContext *ImGuiContextPtr, ImGuiID v) { ImGuiContextPtr->NavHighlightActivatedId = v; } +ImGuiID wrap_ImGuiContext_GetNavHighlightActivatedId(ImGuiContext *self) { return self->NavHighlightActivatedId; } +void wrap_ImGuiContext_SetNavHighlightActivatedTimer(ImGuiContext *ImGuiContextPtr, float v) { ImGuiContextPtr->NavHighlightActivatedTimer = v; } +float wrap_ImGuiContext_GetNavHighlightActivatedTimer(ImGuiContext *self) { return self->NavHighlightActivatedTimer; } void wrap_ImGuiContext_SetNavJustMovedToId(ImGuiContext *ImGuiContextPtr, ImGuiID v) { ImGuiContextPtr->NavJustMovedToId = v; } ImGuiID wrap_ImGuiContext_GetNavJustMovedToId(ImGuiContext *self) { return self->NavJustMovedToId; } void wrap_ImGuiContext_SetNavJustMovedToFocusScopeId(ImGuiContext *ImGuiContextPtr, ImGuiID v) { ImGuiContextPtr->NavJustMovedToFocusScopeId = v; } @@ -598,6 +624,8 @@ void wrap_ImGuiContext_SetNavWindowingHighlightAlpha(ImGuiContext *ImGuiContextP float wrap_ImGuiContext_GetNavWindowingHighlightAlpha(ImGuiContext *self) { return self->NavWindowingHighlightAlpha; } void wrap_ImGuiContext_SetNavWindowingToggleLayer(ImGuiContext *ImGuiContextPtr, bool v) { ImGuiContextPtr->NavWindowingToggleLayer = v; } bool wrap_ImGuiContext_GetNavWindowingToggleLayer(ImGuiContext *self) { return self->NavWindowingToggleLayer; } +void wrap_ImGuiContext_SetNavWindowingToggleKey(ImGuiContext *ImGuiContextPtr, ImGuiKey v) { ImGuiContextPtr->NavWindowingToggleKey = v; } +ImGuiKey wrap_ImGuiContext_GetNavWindowingToggleKey(ImGuiContext *self) { return self->NavWindowingToggleKey; } void wrap_ImGuiContext_SetNavWindowingAccumDeltaPos(ImGuiContext *ImGuiContextPtr, ImVec2 v) { ImGuiContextPtr->NavWindowingAccumDeltaPos = v; } ImVec2 wrap_ImGuiContext_GetNavWindowingAccumDeltaPos(ImGuiContext *self) { return self->NavWindowingAccumDeltaPos; } void wrap_ImGuiContext_SetNavWindowingAccumDeltaSize(ImGuiContext *ImGuiContextPtr, ImVec2 v) { ImGuiContextPtr->NavWindowingAccumDeltaSize = v; } @@ -620,6 +648,8 @@ void wrap_ImGuiContext_SetDragDropPayload(ImGuiContext *ImGuiContextPtr, ImGuiPa ImGuiPayload wrap_ImGuiContext_GetDragDropPayload(ImGuiContext *self) { return self->DragDropPayload; } void wrap_ImGuiContext_SetDragDropTargetRect(ImGuiContext *ImGuiContextPtr, ImRect v) { ImGuiContextPtr->DragDropTargetRect = v; } ImRect wrap_ImGuiContext_GetDragDropTargetRect(ImGuiContext *self) { return self->DragDropTargetRect; } +void wrap_ImGuiContext_SetDragDropTargetClipRect(ImGuiContext *ImGuiContextPtr, ImRect v) { ImGuiContextPtr->DragDropTargetClipRect = v; } +ImRect wrap_ImGuiContext_GetDragDropTargetClipRect(ImGuiContext *self) { return self->DragDropTargetClipRect; } void wrap_ImGuiContext_SetDragDropTargetId(ImGuiContext *ImGuiContextPtr, ImGuiID v) { ImGuiContextPtr->DragDropTargetId = v; } ImGuiID wrap_ImGuiContext_GetDragDropTargetId(ImGuiContext *self) { return self->DragDropTargetId; } void wrap_ImGuiContext_SetDragDropAcceptFlags(ImGuiContext *ImGuiContextPtr, ImGuiDragDropFlags v) { ImGuiContextPtr->DragDropAcceptFlags = v; } @@ -644,6 +674,8 @@ void wrap_ImGuiContext_SetClipperTempData(ImGuiContext *ImGuiContextPtr, ImVecto ImVector_ImGuiListClipperData wrap_ImGuiContext_GetClipperTempData(ImGuiContext *self) { return self->ClipperTempData; } void wrap_ImGuiContext_SetCurrentTable(ImGuiContext *ImGuiContextPtr, ImGuiTable* v) { ImGuiContextPtr->CurrentTable = v; } ImGuiTable* wrap_ImGuiContext_GetCurrentTable(ImGuiContext *self) { return self->CurrentTable; } +void wrap_ImGuiContext_SetDebugBreakInTable(ImGuiContext *ImGuiContextPtr, ImGuiID v) { ImGuiContextPtr->DebugBreakInTable = v; } +ImGuiID wrap_ImGuiContext_GetDebugBreakInTable(ImGuiContext *self) { return self->DebugBreakInTable; } void wrap_ImGuiContext_SetTablesTempDataStacked(ImGuiContext *ImGuiContextPtr, int v) { ImGuiContextPtr->TablesTempDataStacked = v; } int wrap_ImGuiContext_GetTablesTempDataStacked(ImGuiContext *self) { return self->TablesTempDataStacked; } void wrap_ImGuiContext_SetTablesTempData(ImGuiContext *ImGuiContextPtr, ImVector_ImGuiTableTempData v) { ImGuiContextPtr->TablesTempData = v; } @@ -688,6 +720,10 @@ void wrap_ImGuiContext_SetInputTextPasswordFont(ImGuiContext *ImGuiContextPtr, I ImFont wrap_ImGuiContext_GetInputTextPasswordFont(ImGuiContext *self) { return self->InputTextPasswordFont; } void wrap_ImGuiContext_SetTempInputId(ImGuiContext *ImGuiContextPtr, ImGuiID v) { ImGuiContextPtr->TempInputId = v; } ImGuiID wrap_ImGuiContext_GetTempInputId(ImGuiContext *self) { return self->TempInputId; } +void wrap_ImGuiContext_SetBeginMenuDepth(ImGuiContext *ImGuiContextPtr, int v) { ImGuiContextPtr->BeginMenuDepth = v; } +int wrap_ImGuiContext_GetBeginMenuDepth(ImGuiContext *self) { return self->BeginMenuDepth; } +void wrap_ImGuiContext_SetBeginComboDepth(ImGuiContext *ImGuiContextPtr, int v) { ImGuiContextPtr->BeginComboDepth = v; } +int wrap_ImGuiContext_GetBeginComboDepth(ImGuiContext *self) { return self->BeginComboDepth; } void wrap_ImGuiContext_SetColorEditOptions(ImGuiContext *ImGuiContextPtr, ImGuiColorEditFlags v) { ImGuiContextPtr->ColorEditOptions = v; } ImGuiColorEditFlags wrap_ImGuiContext_GetColorEditOptions(ImGuiContext *self) { return self->ColorEditOptions; } void wrap_ImGuiContext_SetColorEditCurrentID(ImGuiContext *ImGuiContextPtr, ImGuiID v) { ImGuiContextPtr->ColorEditCurrentID = v; } @@ -704,6 +740,10 @@ void wrap_ImGuiContext_SetColorPickerRef(ImGuiContext *ImGuiContextPtr, ImVec4 v ImVec4 wrap_ImGuiContext_GetColorPickerRef(ImGuiContext *self) { return self->ColorPickerRef; } void wrap_ImGuiContext_SetComboPreviewData(ImGuiContext *ImGuiContextPtr, ImGuiComboPreviewData v) { ImGuiContextPtr->ComboPreviewData = v; } ImGuiComboPreviewData wrap_ImGuiContext_GetComboPreviewData(ImGuiContext *self) { return self->ComboPreviewData; } +void wrap_ImGuiContext_SetWindowResizeBorderExpectedRect(ImGuiContext *ImGuiContextPtr, ImRect v) { ImGuiContextPtr->WindowResizeBorderExpectedRect = v; } +ImRect wrap_ImGuiContext_GetWindowResizeBorderExpectedRect(ImGuiContext *self) { return self->WindowResizeBorderExpectedRect; } +void wrap_ImGuiContext_SetWindowResizeRelativeMode(ImGuiContext *ImGuiContextPtr, bool v) { ImGuiContextPtr->WindowResizeRelativeMode = v; } +bool wrap_ImGuiContext_GetWindowResizeRelativeMode(ImGuiContext *self) { return self->WindowResizeRelativeMode; } void wrap_ImGuiContext_SetSliderGrabClickOffset(ImGuiContext *ImGuiContextPtr, float v) { ImGuiContextPtr->SliderGrabClickOffset = v; } float wrap_ImGuiContext_GetSliderGrabClickOffset(ImGuiContext *self) { return self->SliderGrabClickOffset; } void wrap_ImGuiContext_SetSliderCurrentAccum(ImGuiContext *ImGuiContextPtr, float v) { ImGuiContextPtr->SliderCurrentAccum = v; } @@ -756,7 +796,7 @@ void wrap_ImGuiContext_SetHooks(ImGuiContext *ImGuiContextPtr, ImVector_ImGuiCon ImVector_ImGuiContextHook wrap_ImGuiContext_GetHooks(ImGuiContext *self) { return self->Hooks; } void wrap_ImGuiContext_SetHookIdNext(ImGuiContext *ImGuiContextPtr, ImGuiID v) { ImGuiContextPtr->HookIdNext = v; } ImGuiID wrap_ImGuiContext_GetHookIdNext(ImGuiContext *self) { return self->HookIdNext; } -void wrap_ImGuiContext_SetLocalizationTable(ImGuiContext *ImGuiContextPtr, const char** v) { memcpy(ImGuiContextPtr->LocalizationTable, v, sizeof(const char*)*10); } +void wrap_ImGuiContext_SetLocalizationTable(ImGuiContext *ImGuiContextPtr, const char** v) { memcpy(ImGuiContextPtr->LocalizationTable, v, sizeof(const char*)*11); } const char** wrap_ImGuiContext_GetLocalizationTable(ImGuiContext *self) { return self->LocalizationTable; } void wrap_ImGuiContext_SetLogEnabled(ImGuiContext *ImGuiContextPtr, bool v) { ImGuiContextPtr->LogEnabled = v; } bool wrap_ImGuiContext_GetLogEnabled(ImGuiContext *self) { return self->LogEnabled; } @@ -786,10 +826,16 @@ void wrap_ImGuiContext_SetDebugLogBuf(ImGuiContext *ImGuiContextPtr, ImGuiTextBu ImGuiTextBuffer wrap_ImGuiContext_GetDebugLogBuf(ImGuiContext *self) { return self->DebugLogBuf; } void wrap_ImGuiContext_SetDebugLogIndex(ImGuiContext *ImGuiContextPtr, ImGuiTextIndex v) { ImGuiContextPtr->DebugLogIndex = v; } ImGuiTextIndex wrap_ImGuiContext_GetDebugLogIndex(ImGuiContext *self) { return self->DebugLogIndex; } -void wrap_ImGuiContext_SetDebugLogClipperAutoDisableFrames(ImGuiContext *ImGuiContextPtr, ImU8 v) { ImGuiContextPtr->DebugLogClipperAutoDisableFrames = v; } -ImU8 wrap_ImGuiContext_GetDebugLogClipperAutoDisableFrames(ImGuiContext *self) { return self->DebugLogClipperAutoDisableFrames; } +void wrap_ImGuiContext_SetDebugLogAutoDisableFlags(ImGuiContext *ImGuiContextPtr, ImGuiDebugLogFlags v) { ImGuiContextPtr->DebugLogAutoDisableFlags = v; } +ImGuiDebugLogFlags wrap_ImGuiContext_GetDebugLogAutoDisableFlags(ImGuiContext *self) { return self->DebugLogAutoDisableFlags; } +void wrap_ImGuiContext_SetDebugLogAutoDisableFrames(ImGuiContext *ImGuiContextPtr, ImU8 v) { ImGuiContextPtr->DebugLogAutoDisableFrames = v; } +ImU8 wrap_ImGuiContext_GetDebugLogAutoDisableFrames(ImGuiContext *self) { return self->DebugLogAutoDisableFrames; } void wrap_ImGuiContext_SetDebugLocateFrames(ImGuiContext *ImGuiContextPtr, ImU8 v) { ImGuiContextPtr->DebugLocateFrames = v; } ImU8 wrap_ImGuiContext_GetDebugLocateFrames(ImGuiContext *self) { return self->DebugLocateFrames; } +void wrap_ImGuiContext_SetDebugBreakInLocateId(ImGuiContext *ImGuiContextPtr, bool v) { ImGuiContextPtr->DebugBreakInLocateId = v; } +bool wrap_ImGuiContext_GetDebugBreakInLocateId(ImGuiContext *self) { return self->DebugBreakInLocateId; } +void wrap_ImGuiContext_SetDebugBreakKeyChord(ImGuiContext *ImGuiContextPtr, ImGuiKeyChord v) { ImGuiContextPtr->DebugBreakKeyChord = v; } +ImGuiKeyChord wrap_ImGuiContext_GetDebugBreakKeyChord(ImGuiContext *self) { return self->DebugBreakKeyChord; } void wrap_ImGuiContext_SetDebugBeginReturnValueCullDepth(ImGuiContext *ImGuiContextPtr, ImS8 v) { ImGuiContextPtr->DebugBeginReturnValueCullDepth = v; } ImS8 wrap_ImGuiContext_GetDebugBeginReturnValueCullDepth(ImGuiContext *self) { return self->DebugBeginReturnValueCullDepth; } void wrap_ImGuiContext_SetDebugItemPickerActive(ImGuiContext *ImGuiContextPtr, bool v) { ImGuiContextPtr->DebugItemPickerActive = v; } @@ -798,10 +844,16 @@ void wrap_ImGuiContext_SetDebugItemPickerMouseButton(ImGuiContext *ImGuiContextP ImU8 wrap_ImGuiContext_GetDebugItemPickerMouseButton(ImGuiContext *self) { return self->DebugItemPickerMouseButton; } void wrap_ImGuiContext_SetDebugItemPickerBreakId(ImGuiContext *ImGuiContextPtr, ImGuiID v) { ImGuiContextPtr->DebugItemPickerBreakId = v; } ImGuiID wrap_ImGuiContext_GetDebugItemPickerBreakId(ImGuiContext *self) { return self->DebugItemPickerBreakId; } +void wrap_ImGuiContext_SetDebugFlashStyleColorTime(ImGuiContext *ImGuiContextPtr, float v) { ImGuiContextPtr->DebugFlashStyleColorTime = v; } +float wrap_ImGuiContext_GetDebugFlashStyleColorTime(ImGuiContext *self) { return self->DebugFlashStyleColorTime; } +void wrap_ImGuiContext_SetDebugFlashStyleColorBackup(ImGuiContext *ImGuiContextPtr, ImVec4 v) { ImGuiContextPtr->DebugFlashStyleColorBackup = v; } +ImVec4 wrap_ImGuiContext_GetDebugFlashStyleColorBackup(ImGuiContext *self) { return self->DebugFlashStyleColorBackup; } void wrap_ImGuiContext_SetDebugMetricsConfig(ImGuiContext *ImGuiContextPtr, ImGuiMetricsConfig v) { ImGuiContextPtr->DebugMetricsConfig = v; } ImGuiMetricsConfig wrap_ImGuiContext_GetDebugMetricsConfig(ImGuiContext *self) { return self->DebugMetricsConfig; } -void wrap_ImGuiContext_SetDebugStackTool(ImGuiContext *ImGuiContextPtr, ImGuiStackTool v) { ImGuiContextPtr->DebugStackTool = v; } -ImGuiStackTool wrap_ImGuiContext_GetDebugStackTool(ImGuiContext *self) { return self->DebugStackTool; } +void wrap_ImGuiContext_SetDebugIDStackTool(ImGuiContext *ImGuiContextPtr, ImGuiIDStackTool v) { ImGuiContextPtr->DebugIDStackTool = v; } +ImGuiIDStackTool wrap_ImGuiContext_GetDebugIDStackTool(ImGuiContext *self) { return self->DebugIDStackTool; } +void wrap_ImGuiContext_SetDebugAllocInfo(ImGuiContext *ImGuiContextPtr, ImGuiDebugAllocInfo v) { ImGuiContextPtr->DebugAllocInfo = v; } +ImGuiDebugAllocInfo wrap_ImGuiContext_GetDebugAllocInfo(ImGuiContext *self) { return self->DebugAllocInfo; } void wrap_ImGuiContext_SetDebugHoveredDockNode(ImGuiContext *ImGuiContextPtr, ImGuiDockNode* v) { ImGuiContextPtr->DebugHoveredDockNode = v; } ImGuiDockNode* wrap_ImGuiContext_GetDebugHoveredDockNode(ImGuiContext *self) { return self->DebugHoveredDockNode; } void wrap_ImGuiContext_SetFramerateSecPerFrame(ImGuiContext *ImGuiContextPtr, float* v) { memcpy(ImGuiContextPtr->FramerateSecPerFrame, v, sizeof(float)*60); } @@ -820,6 +872,8 @@ void wrap_ImGuiContext_SetWantTextInputNextFrame(ImGuiContext *ImGuiContextPtr, int wrap_ImGuiContext_GetWantTextInputNextFrame(ImGuiContext *self) { return self->WantTextInputNextFrame; } void wrap_ImGuiContext_SetTempBuffer(ImGuiContext *ImGuiContextPtr, ImVector_char v) { ImGuiContextPtr->TempBuffer = v; } ImVector_char wrap_ImGuiContext_GetTempBuffer(ImGuiContext *self) { return self->TempBuffer; } +void wrap_ImGuiContext_SetTempKeychordName(ImGuiContext *ImGuiContextPtr, char* v) { memcpy(ImGuiContextPtr->TempKeychordName, v, sizeof(char)*64); } +char* wrap_ImGuiContext_GetTempKeychordName(ImGuiContext *self) { return self->TempKeychordName; } void wrap_ImGuiContextHook_SetHookId(ImGuiContextHook *ImGuiContextHookPtr, ImGuiID v) { ImGuiContextHookPtr->HookId = v; } ImGuiID wrap_ImGuiContextHook_GetHookId(ImGuiContextHook *self) { return self->HookId; } void wrap_ImGuiContextHook_SetType(ImGuiContextHook *ImGuiContextHookPtr, ImGuiContextHookType v) { ImGuiContextHookPtr->Type = v; } @@ -846,6 +900,20 @@ void wrap_ImGuiDataVarInfo_SetCount(ImGuiDataVarInfo *ImGuiDataVarInfoPtr, ImU32 ImU32 wrap_ImGuiDataVarInfo_GetCount(ImGuiDataVarInfo *self) { return self->Count; } void wrap_ImGuiDataVarInfo_SetOffset(ImGuiDataVarInfo *ImGuiDataVarInfoPtr, ImU32 v) { ImGuiDataVarInfoPtr->Offset = v; } ImU32 wrap_ImGuiDataVarInfo_GetOffset(ImGuiDataVarInfo *self) { return self->Offset; } +void wrap_ImGuiDebugAllocEntry_SetFrameCount(ImGuiDebugAllocEntry *ImGuiDebugAllocEntryPtr, int v) { ImGuiDebugAllocEntryPtr->FrameCount = v; } +int wrap_ImGuiDebugAllocEntry_GetFrameCount(ImGuiDebugAllocEntry *self) { return self->FrameCount; } +void wrap_ImGuiDebugAllocEntry_SetAllocCount(ImGuiDebugAllocEntry *ImGuiDebugAllocEntryPtr, ImS16 v) { ImGuiDebugAllocEntryPtr->AllocCount = v; } +ImS16 wrap_ImGuiDebugAllocEntry_GetAllocCount(ImGuiDebugAllocEntry *self) { return self->AllocCount; } +void wrap_ImGuiDebugAllocEntry_SetFreeCount(ImGuiDebugAllocEntry *ImGuiDebugAllocEntryPtr, ImS16 v) { ImGuiDebugAllocEntryPtr->FreeCount = v; } +ImS16 wrap_ImGuiDebugAllocEntry_GetFreeCount(ImGuiDebugAllocEntry *self) { return self->FreeCount; } +void wrap_ImGuiDebugAllocInfo_SetTotalAllocCount(ImGuiDebugAllocInfo *ImGuiDebugAllocInfoPtr, int v) { ImGuiDebugAllocInfoPtr->TotalAllocCount = v; } +int wrap_ImGuiDebugAllocInfo_GetTotalAllocCount(ImGuiDebugAllocInfo *self) { return self->TotalAllocCount; } +void wrap_ImGuiDebugAllocInfo_SetTotalFreeCount(ImGuiDebugAllocInfo *ImGuiDebugAllocInfoPtr, int v) { ImGuiDebugAllocInfoPtr->TotalFreeCount = v; } +int wrap_ImGuiDebugAllocInfo_GetTotalFreeCount(ImGuiDebugAllocInfo *self) { return self->TotalFreeCount; } +void wrap_ImGuiDebugAllocInfo_SetLastEntriesIdx(ImGuiDebugAllocInfo *ImGuiDebugAllocInfoPtr, ImS16 v) { ImGuiDebugAllocInfoPtr->LastEntriesIdx = v; } +ImS16 wrap_ImGuiDebugAllocInfo_GetLastEntriesIdx(ImGuiDebugAllocInfo *self) { return self->LastEntriesIdx; } +void wrap_ImGuiDebugAllocInfo_SetLastEntriesBuf(ImGuiDebugAllocInfo *ImGuiDebugAllocInfoPtr, ImGuiDebugAllocEntry* v) { memcpy(ImGuiDebugAllocInfoPtr->LastEntriesBuf, v, sizeof(ImGuiDebugAllocEntry)*6); } +ImGuiDebugAllocEntry* wrap_ImGuiDebugAllocInfo_GetLastEntriesBuf(ImGuiDebugAllocInfo *self) { return self->LastEntriesBuf; } void wrap_ImGuiDockContext_SetNodes(ImGuiDockContext *ImGuiDockContextPtr, ImGuiStorage v) { ImGuiDockContextPtr->Nodes = v; } ImGuiStorage wrap_ImGuiDockContext_GetNodes(ImGuiDockContext *self) { return self->Nodes; } void wrap_ImGuiDockContext_SetRequests(ImGuiDockContext *ImGuiDockContextPtr, ImVector_ImGuiDockRequest v) { ImGuiDockContextPtr->Requests = v; } @@ -936,12 +1004,18 @@ void wrap_ImGuiDockNode_SetWantHiddenTabBarUpdate(ImGuiDockNode *ImGuiDockNodePt bool wrap_ImGuiDockNode_GetWantHiddenTabBarUpdate(ImGuiDockNode *self) { return self->WantHiddenTabBarUpdate; } void wrap_ImGuiDockNode_SetWantHiddenTabBarToggle(ImGuiDockNode *ImGuiDockNodePtr, bool v) { ImGuiDockNodePtr->WantHiddenTabBarToggle = v; } bool wrap_ImGuiDockNode_GetWantHiddenTabBarToggle(ImGuiDockNode *self) { return self->WantHiddenTabBarToggle; } +void wrap_ImGuiFocusScopeData_SetID(ImGuiFocusScopeData *ImGuiFocusScopeDataPtr, ImGuiID v) { ImGuiFocusScopeDataPtr->ID = v; } +ImGuiID wrap_ImGuiFocusScopeData_GetID(ImGuiFocusScopeData *self) { return self->ID; } +void wrap_ImGuiFocusScopeData_SetWindowID(ImGuiFocusScopeData *ImGuiFocusScopeDataPtr, ImGuiID v) { ImGuiFocusScopeDataPtr->WindowID = v; } +ImGuiID wrap_ImGuiFocusScopeData_GetWindowID(ImGuiFocusScopeData *self) { return self->WindowID; } void wrap_ImGuiGroupData_SetWindowID(ImGuiGroupData *ImGuiGroupDataPtr, ImGuiID v) { ImGuiGroupDataPtr->WindowID = v; } ImGuiID wrap_ImGuiGroupData_GetWindowID(ImGuiGroupData *self) { return self->WindowID; } void wrap_ImGuiGroupData_SetBackupCursorPos(ImGuiGroupData *ImGuiGroupDataPtr, ImVec2 v) { ImGuiGroupDataPtr->BackupCursorPos = v; } ImVec2 wrap_ImGuiGroupData_GetBackupCursorPos(ImGuiGroupData *self) { return self->BackupCursorPos; } void wrap_ImGuiGroupData_SetBackupCursorMaxPos(ImGuiGroupData *ImGuiGroupDataPtr, ImVec2 v) { ImGuiGroupDataPtr->BackupCursorMaxPos = v; } ImVec2 wrap_ImGuiGroupData_GetBackupCursorMaxPos(ImGuiGroupData *self) { return self->BackupCursorMaxPos; } +void wrap_ImGuiGroupData_SetBackupCursorPosPrevLine(ImGuiGroupData *ImGuiGroupDataPtr, ImVec2 v) { ImGuiGroupDataPtr->BackupCursorPosPrevLine = v; } +ImVec2 wrap_ImGuiGroupData_GetBackupCursorPosPrevLine(ImGuiGroupData *self) { return self->BackupCursorPosPrevLine; } void wrap_ImGuiGroupData_SetBackupIndent(ImGuiGroupData *ImGuiGroupDataPtr, ImVec1 v) { ImGuiGroupDataPtr->BackupIndent = v; } ImVec1 wrap_ImGuiGroupData_GetBackupIndent(ImGuiGroupData *self) { return self->BackupIndent; } void wrap_ImGuiGroupData_SetBackupGroupOffset(ImGuiGroupData *ImGuiGroupDataPtr, ImVec1 v) { ImGuiGroupDataPtr->BackupGroupOffset = v; } @@ -956,8 +1030,22 @@ void wrap_ImGuiGroupData_SetBackupActiveIdPreviousFrameIsAlive(ImGuiGroupData *I bool wrap_ImGuiGroupData_GetBackupActiveIdPreviousFrameIsAlive(ImGuiGroupData *self) { return self->BackupActiveIdPreviousFrameIsAlive; } void wrap_ImGuiGroupData_SetBackupHoveredIdIsAlive(ImGuiGroupData *ImGuiGroupDataPtr, bool v) { ImGuiGroupDataPtr->BackupHoveredIdIsAlive = v; } bool wrap_ImGuiGroupData_GetBackupHoveredIdIsAlive(ImGuiGroupData *self) { return self->BackupHoveredIdIsAlive; } +void wrap_ImGuiGroupData_SetBackupIsSameLine(ImGuiGroupData *ImGuiGroupDataPtr, bool v) { ImGuiGroupDataPtr->BackupIsSameLine = v; } +bool wrap_ImGuiGroupData_GetBackupIsSameLine(ImGuiGroupData *self) { return self->BackupIsSameLine; } void wrap_ImGuiGroupData_SetEmitItem(ImGuiGroupData *ImGuiGroupDataPtr, bool v) { ImGuiGroupDataPtr->EmitItem = v; } bool wrap_ImGuiGroupData_GetEmitItem(ImGuiGroupData *self) { return self->EmitItem; } +void wrap_ImGuiIDStackTool_SetLastActiveFrame(ImGuiIDStackTool *ImGuiIDStackToolPtr, int v) { ImGuiIDStackToolPtr->LastActiveFrame = v; } +int wrap_ImGuiIDStackTool_GetLastActiveFrame(ImGuiIDStackTool *self) { return self->LastActiveFrame; } +void wrap_ImGuiIDStackTool_SetStackLevel(ImGuiIDStackTool *ImGuiIDStackToolPtr, int v) { ImGuiIDStackToolPtr->StackLevel = v; } +int wrap_ImGuiIDStackTool_GetStackLevel(ImGuiIDStackTool *self) { return self->StackLevel; } +void wrap_ImGuiIDStackTool_SetQueryId(ImGuiIDStackTool *ImGuiIDStackToolPtr, ImGuiID v) { ImGuiIDStackToolPtr->QueryId = v; } +ImGuiID wrap_ImGuiIDStackTool_GetQueryId(ImGuiIDStackTool *self) { return self->QueryId; } +void wrap_ImGuiIDStackTool_SetResults(ImGuiIDStackTool *ImGuiIDStackToolPtr, ImVector_ImGuiStackLevelInfo v) { ImGuiIDStackToolPtr->Results = v; } +ImVector_ImGuiStackLevelInfo wrap_ImGuiIDStackTool_GetResults(ImGuiIDStackTool *self) { return self->Results; } +void wrap_ImGuiIDStackTool_SetCopyToClipboardOnCtrlC(ImGuiIDStackTool *ImGuiIDStackToolPtr, bool v) { ImGuiIDStackToolPtr->CopyToClipboardOnCtrlC = v; } +bool wrap_ImGuiIDStackTool_GetCopyToClipboardOnCtrlC(ImGuiIDStackTool *self) { return self->CopyToClipboardOnCtrlC; } +void wrap_ImGuiIDStackTool_SetCopyToClipboardLastTime(ImGuiIDStackTool *ImGuiIDStackToolPtr, float v) { ImGuiIDStackToolPtr->CopyToClipboardLastTime = v; } +float wrap_ImGuiIDStackTool_GetCopyToClipboardLastTime(ImGuiIDStackTool *self) { return self->CopyToClipboardLastTime; } void wrap_ImGuiIO_SetConfigFlags(ImGuiIO *ImGuiIOPtr, ImGuiConfigFlags v) { ImGuiIOPtr->ConfigFlags = v; } ImGuiConfigFlags wrap_ImGuiIO_GetConfigFlags(ImGuiIO *self) { return self->ConfigFlags; } void wrap_ImGuiIO_SetBackendFlags(ImGuiIO *ImGuiIOPtr, ImGuiBackendFlags v) { ImGuiIOPtr->BackendFlags = v; } @@ -1028,6 +1116,8 @@ void wrap_ImGuiIO_SetKeyRepeatDelay(ImGuiIO *ImGuiIOPtr, float v) { ImGuiIOPtr-> float wrap_ImGuiIO_GetKeyRepeatDelay(ImGuiIO *self) { return self->KeyRepeatDelay; } void wrap_ImGuiIO_SetKeyRepeatRate(ImGuiIO *ImGuiIOPtr, float v) { ImGuiIOPtr->KeyRepeatRate = v; } float wrap_ImGuiIO_GetKeyRepeatRate(ImGuiIO *self) { return self->KeyRepeatRate; } +void wrap_ImGuiIO_SetConfigDebugIsDebuggerPresent(ImGuiIO *ImGuiIOPtr, bool v) { ImGuiIOPtr->ConfigDebugIsDebuggerPresent = v; } +bool wrap_ImGuiIO_GetConfigDebugIsDebuggerPresent(ImGuiIO *self) { return self->ConfigDebugIsDebuggerPresent; } void wrap_ImGuiIO_SetConfigDebugBeginReturnValueOnce(ImGuiIO *ImGuiIOPtr, bool v) { ImGuiIOPtr->ConfigDebugBeginReturnValueOnce = v; } bool wrap_ImGuiIO_GetConfigDebugBeginReturnValueOnce(ImGuiIO *self) { return self->ConfigDebugBeginReturnValueOnce; } void wrap_ImGuiIO_SetConfigDebugBeginReturnValueLoop(ImGuiIO *ImGuiIOPtr, bool v) { ImGuiIOPtr->ConfigDebugBeginReturnValueLoop = v; } @@ -1048,8 +1138,6 @@ void wrap_ImGuiIO_SetBackendLanguageUserData(ImGuiIO *ImGuiIOPtr, uintptr_t v) { uintptr_t wrap_ImGuiIO_GetBackendLanguageUserData(ImGuiIO *self) { return (uintptr_t)self->BackendLanguageUserData; } void wrap_ImGuiIO_SetClipboardUserData(ImGuiIO *ImGuiIOPtr, uintptr_t v) { ImGuiIOPtr->ClipboardUserData = (void*)v; } uintptr_t wrap_ImGuiIO_GetClipboardUserData(ImGuiIO *self) { return (uintptr_t)self->ClipboardUserData; } -void wrap_ImGuiIO_Set_UnusedPadding(ImGuiIO *ImGuiIOPtr, uintptr_t v) { ImGuiIOPtr->_UnusedPadding = (void*)v; } -uintptr_t wrap_ImGuiIO_Get_UnusedPadding(ImGuiIO *self) { return (uintptr_t)self->_UnusedPadding; } void wrap_ImGuiIO_SetPlatformLocaleDecimalPoint(ImGuiIO *ImGuiIOPtr, ImWchar v) { ImGuiIOPtr->PlatformLocaleDecimalPoint = v; } ImWchar wrap_ImGuiIO_GetPlatformLocaleDecimalPoint(ImGuiIO *self) { return self->PlatformLocaleDecimalPoint; } void wrap_ImGuiIO_SetWantCaptureMouse(ImGuiIO *ImGuiIOPtr, bool v) { ImGuiIOPtr->WantCaptureMouse = v; } @@ -1076,16 +1164,8 @@ void wrap_ImGuiIO_SetMetricsRenderWindows(ImGuiIO *ImGuiIOPtr, int v) { ImGuiIOP int wrap_ImGuiIO_GetMetricsRenderWindows(ImGuiIO *self) { return self->MetricsRenderWindows; } void wrap_ImGuiIO_SetMetricsActiveWindows(ImGuiIO *ImGuiIOPtr, int v) { ImGuiIOPtr->MetricsActiveWindows = v; } int wrap_ImGuiIO_GetMetricsActiveWindows(ImGuiIO *self) { return self->MetricsActiveWindows; } -void wrap_ImGuiIO_SetMetricsActiveAllocations(ImGuiIO *ImGuiIOPtr, int v) { ImGuiIOPtr->MetricsActiveAllocations = v; } -int wrap_ImGuiIO_GetMetricsActiveAllocations(ImGuiIO *self) { return self->MetricsActiveAllocations; } void wrap_ImGuiIO_SetMouseDelta(ImGuiIO *ImGuiIOPtr, ImVec2 v) { ImGuiIOPtr->MouseDelta = v; } ImVec2 wrap_ImGuiIO_GetMouseDelta(ImGuiIO *self) { return self->MouseDelta; } -void wrap_ImGuiIO_SetKeyMap(ImGuiIO *ImGuiIOPtr, int* v) { memcpy(ImGuiIOPtr->KeyMap, v, sizeof(int)*652); } -int* wrap_ImGuiIO_GetKeyMap(ImGuiIO *self) { return self->KeyMap; } -void wrap_ImGuiIO_SetKeysDown(ImGuiIO *ImGuiIOPtr, bool* v) { memcpy(ImGuiIOPtr->KeysDown, v, sizeof(bool)*652); } -bool* wrap_ImGuiIO_GetKeysDown(ImGuiIO *self) { return self->KeysDown; } -void wrap_ImGuiIO_SetNavInputs(ImGuiIO *ImGuiIOPtr, float* v) { memcpy(ImGuiIOPtr->NavInputs, v, sizeof(float)*16); } -float* wrap_ImGuiIO_GetNavInputs(ImGuiIO *self) { return self->NavInputs; } void wrap_ImGuiIO_SetCtx(ImGuiIO *ImGuiIOPtr, ImGuiContext* v) { ImGuiIOPtr->Ctx = v; } ImGuiContext* wrap_ImGuiIO_GetCtx(ImGuiIO *self) { return self->Ctx; } void wrap_ImGuiIO_SetMousePos(ImGuiIO *ImGuiIOPtr, ImVec2 v) { ImGuiIOPtr->MousePos = v; } @@ -1110,7 +1190,7 @@ void wrap_ImGuiIO_SetKeySuper(ImGuiIO *ImGuiIOPtr, bool v) { ImGuiIOPtr->KeySupe bool wrap_ImGuiIO_GetKeySuper(ImGuiIO *self) { return self->KeySuper; } void wrap_ImGuiIO_SetKeyMods(ImGuiIO *ImGuiIOPtr, ImGuiKeyChord v) { ImGuiIOPtr->KeyMods = v; } ImGuiKeyChord wrap_ImGuiIO_GetKeyMods(ImGuiIO *self) { return self->KeyMods; } -void wrap_ImGuiIO_SetKeysData(ImGuiIO *ImGuiIOPtr, ImGuiKeyData* v) { memcpy(ImGuiIOPtr->KeysData, v, sizeof(ImGuiKeyData)*652); } +void wrap_ImGuiIO_SetKeysData(ImGuiIO *ImGuiIOPtr, ImGuiKeyData* v) { memcpy(ImGuiIOPtr->KeysData, v, sizeof(ImGuiKeyData)*154); } ImGuiKeyData* wrap_ImGuiIO_GetKeysData(ImGuiIO *self) { return self->KeysData; } void wrap_ImGuiIO_SetWantCaptureMouseUnlessPopupClose(ImGuiIO *ImGuiIOPtr, bool v) { ImGuiIOPtr->WantCaptureMouseUnlessPopupClose = v; } bool wrap_ImGuiIO_GetWantCaptureMouseUnlessPopupClose(ImGuiIO *self) { return self->WantCaptureMouseUnlessPopupClose; } @@ -1256,6 +1336,12 @@ void wrap_ImGuiInputTextState_SetEdited(ImGuiInputTextState *ImGuiInputTextState bool wrap_ImGuiInputTextState_GetEdited(ImGuiInputTextState *self) { return self->Edited; } void wrap_ImGuiInputTextState_SetFlags(ImGuiInputTextState *ImGuiInputTextStatePtr, ImGuiInputTextFlags v) { ImGuiInputTextStatePtr->Flags = v; } ImGuiInputTextFlags wrap_ImGuiInputTextState_GetFlags(ImGuiInputTextState *self) { return self->Flags; } +void wrap_ImGuiInputTextState_SetReloadUserBuf(ImGuiInputTextState *ImGuiInputTextStatePtr, bool v) { ImGuiInputTextStatePtr->ReloadUserBuf = v; } +bool wrap_ImGuiInputTextState_GetReloadUserBuf(ImGuiInputTextState *self) { return self->ReloadUserBuf; } +void wrap_ImGuiInputTextState_SetReloadSelectionStart(ImGuiInputTextState *ImGuiInputTextStatePtr, int v) { ImGuiInputTextStatePtr->ReloadSelectionStart = v; } +int wrap_ImGuiInputTextState_GetReloadSelectionStart(ImGuiInputTextState *self) { return self->ReloadSelectionStart; } +void wrap_ImGuiInputTextState_SetReloadSelectionEnd(ImGuiInputTextState *ImGuiInputTextStatePtr, int v) { ImGuiInputTextStatePtr->ReloadSelectionEnd = v; } +int wrap_ImGuiInputTextState_GetReloadSelectionEnd(ImGuiInputTextState *self) { return self->ReloadSelectionEnd; } void wrap_ImGuiKeyData_SetDown(ImGuiKeyData *ImGuiKeyDataPtr, bool v) { ImGuiKeyDataPtr->Down = v; } bool wrap_ImGuiKeyData_GetDown(ImGuiKeyData *self) { return self->Down; } void wrap_ImGuiKeyData_SetDownDuration(ImGuiKeyData *ImGuiKeyDataPtr, float v) { ImGuiKeyDataPtr->DownDuration = v; } @@ -1276,13 +1362,15 @@ void wrap_ImGuiKeyRoutingData_SetNextEntryIndex(ImGuiKeyRoutingData *ImGuiKeyRou ImGuiKeyRoutingIndex wrap_ImGuiKeyRoutingData_GetNextEntryIndex(ImGuiKeyRoutingData *self) { return self->NextEntryIndex; } void wrap_ImGuiKeyRoutingData_SetMods(ImGuiKeyRoutingData *ImGuiKeyRoutingDataPtr, ImU16 v) { ImGuiKeyRoutingDataPtr->Mods = v; } ImU16 wrap_ImGuiKeyRoutingData_GetMods(ImGuiKeyRoutingData *self) { return self->Mods; } +void wrap_ImGuiKeyRoutingData_SetRoutingCurrScore(ImGuiKeyRoutingData *ImGuiKeyRoutingDataPtr, ImU8 v) { ImGuiKeyRoutingDataPtr->RoutingCurrScore = v; } +ImU8 wrap_ImGuiKeyRoutingData_GetRoutingCurrScore(ImGuiKeyRoutingData *self) { return self->RoutingCurrScore; } void wrap_ImGuiKeyRoutingData_SetRoutingNextScore(ImGuiKeyRoutingData *ImGuiKeyRoutingDataPtr, ImU8 v) { ImGuiKeyRoutingDataPtr->RoutingNextScore = v; } ImU8 wrap_ImGuiKeyRoutingData_GetRoutingNextScore(ImGuiKeyRoutingData *self) { return self->RoutingNextScore; } void wrap_ImGuiKeyRoutingData_SetRoutingCurr(ImGuiKeyRoutingData *ImGuiKeyRoutingDataPtr, ImGuiID v) { ImGuiKeyRoutingDataPtr->RoutingCurr = v; } ImGuiID wrap_ImGuiKeyRoutingData_GetRoutingCurr(ImGuiKeyRoutingData *self) { return self->RoutingCurr; } void wrap_ImGuiKeyRoutingData_SetRoutingNext(ImGuiKeyRoutingData *ImGuiKeyRoutingDataPtr, ImGuiID v) { ImGuiKeyRoutingDataPtr->RoutingNext = v; } ImGuiID wrap_ImGuiKeyRoutingData_GetRoutingNext(ImGuiKeyRoutingData *self) { return self->RoutingNext; } -void wrap_ImGuiKeyRoutingTable_SetIndex(ImGuiKeyRoutingTable *ImGuiKeyRoutingTablePtr, ImGuiKeyRoutingIndex* v) { memcpy(ImGuiKeyRoutingTablePtr->Index, v, sizeof(ImGuiKeyRoutingIndex)*140); } +void wrap_ImGuiKeyRoutingTable_SetIndex(ImGuiKeyRoutingTable *ImGuiKeyRoutingTablePtr, ImGuiKeyRoutingIndex* v) { memcpy(ImGuiKeyRoutingTablePtr->Index, v, sizeof(ImGuiKeyRoutingIndex)*154); } ImGuiKeyRoutingIndex* wrap_ImGuiKeyRoutingTable_GetIndex(ImGuiKeyRoutingTable *self) { return self->Index; } void wrap_ImGuiKeyRoutingTable_SetEntries(ImGuiKeyRoutingTable *ImGuiKeyRoutingTablePtr, ImVector_ImGuiKeyRoutingData v) { ImGuiKeyRoutingTablePtr->Entries = v; } ImVector_ImGuiKeyRoutingData wrap_ImGuiKeyRoutingTable_GetEntries(ImGuiKeyRoutingTable *self) { return self->Entries; } @@ -1300,6 +1388,8 @@ void wrap_ImGuiLastItemData_SetNavRect(ImGuiLastItemData *ImGuiLastItemDataPtr, ImRect wrap_ImGuiLastItemData_GetNavRect(ImGuiLastItemData *self) { return self->NavRect; } void wrap_ImGuiLastItemData_SetDisplayRect(ImGuiLastItemData *ImGuiLastItemDataPtr, ImRect v) { ImGuiLastItemDataPtr->DisplayRect = v; } ImRect wrap_ImGuiLastItemData_GetDisplayRect(ImGuiLastItemData *self) { return self->DisplayRect; } +void wrap_ImGuiLastItemData_SetClipRect(ImGuiLastItemData *ImGuiLastItemDataPtr, ImRect v) { ImGuiLastItemDataPtr->ClipRect = v; } +ImRect wrap_ImGuiLastItemData_GetClipRect(ImGuiLastItemData *self) { return self->ClipRect; } void wrap_ImGuiListClipper_SetCtx(ImGuiListClipper *ImGuiListClipperPtr, ImGuiContext* v) { ImGuiListClipperPtr->Ctx = v; } ImGuiContext* wrap_ImGuiListClipper_GetCtx(ImGuiListClipper *self) { return self->Ctx; } void wrap_ImGuiListClipper_SetDisplayStart(ImGuiListClipper *ImGuiListClipperPtr, int v) { ImGuiListClipperPtr->DisplayStart = v; } @@ -1356,8 +1446,8 @@ void wrap_ImGuiMenuColumns_SetWidths(ImGuiMenuColumns *ImGuiMenuColumnsPtr, ImU1 ImU16* wrap_ImGuiMenuColumns_GetWidths(ImGuiMenuColumns *self) { return self->Widths; } void wrap_ImGuiMetricsConfig_SetShowDebugLog(ImGuiMetricsConfig *ImGuiMetricsConfigPtr, bool v) { ImGuiMetricsConfigPtr->ShowDebugLog = v; } bool wrap_ImGuiMetricsConfig_GetShowDebugLog(ImGuiMetricsConfig *self) { return self->ShowDebugLog; } -void wrap_ImGuiMetricsConfig_SetShowStackTool(ImGuiMetricsConfig *ImGuiMetricsConfigPtr, bool v) { ImGuiMetricsConfigPtr->ShowStackTool = v; } -bool wrap_ImGuiMetricsConfig_GetShowStackTool(ImGuiMetricsConfig *self) { return self->ShowStackTool; } +void wrap_ImGuiMetricsConfig_SetShowIDStackTool(ImGuiMetricsConfig *ImGuiMetricsConfigPtr, bool v) { ImGuiMetricsConfigPtr->ShowIDStackTool = v; } +bool wrap_ImGuiMetricsConfig_GetShowIDStackTool(ImGuiMetricsConfig *self) { return self->ShowIDStackTool; } void wrap_ImGuiMetricsConfig_SetShowWindowsRects(ImGuiMetricsConfig *ImGuiMetricsConfigPtr, bool v) { ImGuiMetricsConfigPtr->ShowWindowsRects = v; } bool wrap_ImGuiMetricsConfig_GetShowWindowsRects(ImGuiMetricsConfig *self) { return self->ShowWindowsRects; } void wrap_ImGuiMetricsConfig_SetShowWindowsBeginOrder(ImGuiMetricsConfig *ImGuiMetricsConfigPtr, bool v) { ImGuiMetricsConfigPtr->ShowWindowsBeginOrder = v; } @@ -1368,6 +1458,8 @@ void wrap_ImGuiMetricsConfig_SetShowDrawCmdMesh(ImGuiMetricsConfig *ImGuiMetrics bool wrap_ImGuiMetricsConfig_GetShowDrawCmdMesh(ImGuiMetricsConfig *self) { return self->ShowDrawCmdMesh; } void wrap_ImGuiMetricsConfig_SetShowDrawCmdBoundingBoxes(ImGuiMetricsConfig *ImGuiMetricsConfigPtr, bool v) { ImGuiMetricsConfigPtr->ShowDrawCmdBoundingBoxes = v; } bool wrap_ImGuiMetricsConfig_GetShowDrawCmdBoundingBoxes(ImGuiMetricsConfig *self) { return self->ShowDrawCmdBoundingBoxes; } +void wrap_ImGuiMetricsConfig_SetShowTextEncodingViewer(ImGuiMetricsConfig *ImGuiMetricsConfigPtr, bool v) { ImGuiMetricsConfigPtr->ShowTextEncodingViewer = v; } +bool wrap_ImGuiMetricsConfig_GetShowTextEncodingViewer(ImGuiMetricsConfig *self) { return self->ShowTextEncodingViewer; } void wrap_ImGuiMetricsConfig_SetShowAtlasTintedWithTextColor(ImGuiMetricsConfig *ImGuiMetricsConfigPtr, bool v) { ImGuiMetricsConfigPtr->ShowAtlasTintedWithTextColor = v; } bool wrap_ImGuiMetricsConfig_GetShowAtlasTintedWithTextColor(ImGuiMetricsConfig *self) { return self->ShowAtlasTintedWithTextColor; } void wrap_ImGuiMetricsConfig_SetShowDockingNodes(ImGuiMetricsConfig *ImGuiMetricsConfigPtr, bool v) { ImGuiMetricsConfigPtr->ShowDockingNodes = v; } @@ -1376,6 +1468,10 @@ void wrap_ImGuiMetricsConfig_SetShowWindowsRectsType(ImGuiMetricsConfig *ImGuiMe int wrap_ImGuiMetricsConfig_GetShowWindowsRectsType(ImGuiMetricsConfig *self) { return self->ShowWindowsRectsType; } void wrap_ImGuiMetricsConfig_SetShowTablesRectsType(ImGuiMetricsConfig *ImGuiMetricsConfigPtr, int v) { ImGuiMetricsConfigPtr->ShowTablesRectsType = v; } int wrap_ImGuiMetricsConfig_GetShowTablesRectsType(ImGuiMetricsConfig *self) { return self->ShowTablesRectsType; } +void wrap_ImGuiMetricsConfig_SetHighlightMonitorIdx(ImGuiMetricsConfig *ImGuiMetricsConfigPtr, int v) { ImGuiMetricsConfigPtr->HighlightMonitorIdx = v; } +int wrap_ImGuiMetricsConfig_GetHighlightMonitorIdx(ImGuiMetricsConfig *self) { return self->HighlightMonitorIdx; } +void wrap_ImGuiMetricsConfig_SetHighlightViewportID(ImGuiMetricsConfig *ImGuiMetricsConfigPtr, ImGuiID v) { ImGuiMetricsConfigPtr->HighlightViewportID = v; } +ImGuiID wrap_ImGuiMetricsConfig_GetHighlightViewportID(ImGuiMetricsConfig *self) { return self->HighlightViewportID; } void wrap_ImGuiNavItemData_SetWindow(ImGuiNavItemData *ImGuiNavItemDataPtr, ImGuiWindow* v) { ImGuiNavItemDataPtr->Window = v; } ImGuiWindow* wrap_ImGuiNavItemData_GetWindow(ImGuiNavItemData *self) { return self->Window; } void wrap_ImGuiNavItemData_SetID(ImGuiNavItemData *ImGuiNavItemDataPtr, ImGuiID v) { ImGuiNavItemDataPtr->ID = v; } @@ -1404,14 +1500,16 @@ void wrap_ImGuiNextItemData_SetFlags(ImGuiNextItemData *ImGuiNextItemDataPtr, Im ImGuiNextItemDataFlags wrap_ImGuiNextItemData_GetFlags(ImGuiNextItemData *self) { return self->Flags; } void wrap_ImGuiNextItemData_SetItemFlags(ImGuiNextItemData *ImGuiNextItemDataPtr, ImGuiItemFlags v) { ImGuiNextItemDataPtr->ItemFlags = v; } ImGuiItemFlags wrap_ImGuiNextItemData_GetItemFlags(ImGuiNextItemData *self) { return self->ItemFlags; } -void wrap_ImGuiNextItemData_SetWidth(ImGuiNextItemData *ImGuiNextItemDataPtr, float v) { ImGuiNextItemDataPtr->Width = v; } -float wrap_ImGuiNextItemData_GetWidth(ImGuiNextItemData *self) { return self->Width; } void wrap_ImGuiNextItemData_SetSelectionUserData(ImGuiNextItemData *ImGuiNextItemDataPtr, ImGuiSelectionUserData v) { ImGuiNextItemDataPtr->SelectionUserData = v; } ImGuiSelectionUserData wrap_ImGuiNextItemData_GetSelectionUserData(ImGuiNextItemData *self) { return self->SelectionUserData; } -void wrap_ImGuiNextItemData_SetOpenCond(ImGuiNextItemData *ImGuiNextItemDataPtr, ImGuiCond v) { ImGuiNextItemDataPtr->OpenCond = v; } -ImGuiCond wrap_ImGuiNextItemData_GetOpenCond(ImGuiNextItemData *self) { return self->OpenCond; } +void wrap_ImGuiNextItemData_SetWidth(ImGuiNextItemData *ImGuiNextItemDataPtr, float v) { ImGuiNextItemDataPtr->Width = v; } +float wrap_ImGuiNextItemData_GetWidth(ImGuiNextItemData *self) { return self->Width; } +void wrap_ImGuiNextItemData_SetShortcut(ImGuiNextItemData *ImGuiNextItemDataPtr, ImGuiKeyChord v) { ImGuiNextItemDataPtr->Shortcut = v; } +ImGuiKeyChord wrap_ImGuiNextItemData_GetShortcut(ImGuiNextItemData *self) { return self->Shortcut; } void wrap_ImGuiNextItemData_SetOpenVal(ImGuiNextItemData *ImGuiNextItemDataPtr, bool v) { ImGuiNextItemDataPtr->OpenVal = v; } bool wrap_ImGuiNextItemData_GetOpenVal(ImGuiNextItemData *self) { return self->OpenVal; } +void wrap_ImGuiNextItemData_SetOpenCond(ImGuiNextItemData *ImGuiNextItemDataPtr, ImGuiCond v) { ImGuiNextItemDataPtr->OpenCond = v; } +ImGuiCond wrap_ImGuiNextItemData_GetOpenCond(ImGuiNextItemData *self) { return self->OpenCond; } void wrap_ImGuiNextWindowData_SetFlags(ImGuiNextWindowData *ImGuiNextWindowDataPtr, ImGuiNextWindowDataFlags v) { ImGuiNextWindowDataPtr->Flags = v; } ImGuiNextWindowDataFlags wrap_ImGuiNextWindowData_GetFlags(ImGuiNextWindowData *self) { return self->Flags; } void wrap_ImGuiNextWindowData_SetPosCond(ImGuiNextWindowData *ImGuiNextWindowDataPtr, ImGuiCond v) { ImGuiNextWindowDataPtr->PosCond = v; } @@ -1432,6 +1530,8 @@ void wrap_ImGuiNextWindowData_SetContentSizeVal(ImGuiNextWindowData *ImGuiNextWi ImVec2 wrap_ImGuiNextWindowData_GetContentSizeVal(ImGuiNextWindowData *self) { return self->ContentSizeVal; } void wrap_ImGuiNextWindowData_SetScrollVal(ImGuiNextWindowData *ImGuiNextWindowDataPtr, ImVec2 v) { ImGuiNextWindowDataPtr->ScrollVal = v; } ImVec2 wrap_ImGuiNextWindowData_GetScrollVal(ImGuiNextWindowData *self) { return self->ScrollVal; } +void wrap_ImGuiNextWindowData_SetChildFlags(ImGuiNextWindowData *ImGuiNextWindowDataPtr, ImGuiChildFlags v) { ImGuiNextWindowDataPtr->ChildFlags = v; } +ImGuiChildFlags wrap_ImGuiNextWindowData_GetChildFlags(ImGuiNextWindowData *self) { return self->ChildFlags; } void wrap_ImGuiNextWindowData_SetPosUndock(ImGuiNextWindowData *ImGuiNextWindowDataPtr, bool v) { ImGuiNextWindowDataPtr->PosUndock = v; } bool wrap_ImGuiNextWindowData_GetPosUndock(ImGuiNextWindowData *self) { return self->PosUndock; } void wrap_ImGuiNextWindowData_SetCollapsedVal(ImGuiNextWindowData *ImGuiNextWindowDataPtr, bool v) { ImGuiNextWindowDataPtr->CollapsedVal = v; } @@ -1602,18 +1702,6 @@ void wrap_ImGuiStackSizes_SetSizeOfBeginPopupStack(ImGuiStackSizes *ImGuiStackSi short wrap_ImGuiStackSizes_GetSizeOfBeginPopupStack(ImGuiStackSizes *self) { return self->SizeOfBeginPopupStack; } void wrap_ImGuiStackSizes_SetSizeOfDisabledStack(ImGuiStackSizes *ImGuiStackSizesPtr, short v) { ImGuiStackSizesPtr->SizeOfDisabledStack = v; } short wrap_ImGuiStackSizes_GetSizeOfDisabledStack(ImGuiStackSizes *self) { return self->SizeOfDisabledStack; } -void wrap_ImGuiStackTool_SetLastActiveFrame(ImGuiStackTool *ImGuiStackToolPtr, int v) { ImGuiStackToolPtr->LastActiveFrame = v; } -int wrap_ImGuiStackTool_GetLastActiveFrame(ImGuiStackTool *self) { return self->LastActiveFrame; } -void wrap_ImGuiStackTool_SetStackLevel(ImGuiStackTool *ImGuiStackToolPtr, int v) { ImGuiStackToolPtr->StackLevel = v; } -int wrap_ImGuiStackTool_GetStackLevel(ImGuiStackTool *self) { return self->StackLevel; } -void wrap_ImGuiStackTool_SetQueryId(ImGuiStackTool *ImGuiStackToolPtr, ImGuiID v) { ImGuiStackToolPtr->QueryId = v; } -ImGuiID wrap_ImGuiStackTool_GetQueryId(ImGuiStackTool *self) { return self->QueryId; } -void wrap_ImGuiStackTool_SetResults(ImGuiStackTool *ImGuiStackToolPtr, ImVector_ImGuiStackLevelInfo v) { ImGuiStackToolPtr->Results = v; } -ImVector_ImGuiStackLevelInfo wrap_ImGuiStackTool_GetResults(ImGuiStackTool *self) { return self->Results; } -void wrap_ImGuiStackTool_SetCopyToClipboardOnCtrlC(ImGuiStackTool *ImGuiStackToolPtr, bool v) { ImGuiStackToolPtr->CopyToClipboardOnCtrlC = v; } -bool wrap_ImGuiStackTool_GetCopyToClipboardOnCtrlC(ImGuiStackTool *self) { return self->CopyToClipboardOnCtrlC; } -void wrap_ImGuiStackTool_SetCopyToClipboardLastTime(ImGuiStackTool *ImGuiStackToolPtr, float v) { ImGuiStackToolPtr->CopyToClipboardLastTime = v; } -float wrap_ImGuiStackTool_GetCopyToClipboardLastTime(ImGuiStackTool *self) { return self->CopyToClipboardLastTime; } void wrap_ImGuiStorage_SetData(ImGuiStorage *ImGuiStoragePtr, ImVector_ImGuiStoragePair v) { ImGuiStoragePtr->Data = v; } ImVector_ImGuiStoragePair wrap_ImGuiStorage_GetData(ImGuiStorage *self) { return self->Data; } void wrap_ImGuiStoragePair_SetKey(ImGuiStoragePair *ImGuiStoragePairPtr, ImGuiID v) { ImGuiStoragePairPtr->key = v; } @@ -1678,6 +1766,8 @@ void wrap_ImGuiStyle_SetTabMinWidthForCloseButton(ImGuiStyle *ImGuiStylePtr, flo float wrap_ImGuiStyle_GetTabMinWidthForCloseButton(ImGuiStyle *self) { return self->TabMinWidthForCloseButton; } void wrap_ImGuiStyle_SetTabBarBorderSize(ImGuiStyle *ImGuiStylePtr, float v) { ImGuiStylePtr->TabBarBorderSize = v; } float wrap_ImGuiStyle_GetTabBarBorderSize(ImGuiStyle *self) { return self->TabBarBorderSize; } +void wrap_ImGuiStyle_SetTableAngledHeadersAngle(ImGuiStyle *ImGuiStylePtr, float v) { ImGuiStylePtr->TableAngledHeadersAngle = v; } +float wrap_ImGuiStyle_GetTableAngledHeadersAngle(ImGuiStyle *self) { return self->TableAngledHeadersAngle; } void wrap_ImGuiStyle_SetColorButtonPosition(ImGuiStyle *ImGuiStylePtr, ImGuiDir v) { ImGuiStylePtr->ColorButtonPosition = v; } ImGuiDir wrap_ImGuiStyle_GetColorButtonPosition(ImGuiStyle *self) { return self->ColorButtonPosition; } void wrap_ImGuiStyle_SetButtonTextAlign(ImGuiStyle *ImGuiStylePtr, ImVec2 v) { ImGuiStylePtr->ButtonTextAlign = v; } @@ -1904,6 +1994,10 @@ void wrap_ImGuiTable_SetResizeLockMinContentsX2(ImGuiTable *ImGuiTablePtr, float float wrap_ImGuiTable_GetResizeLockMinContentsX2(ImGuiTable *self) { return self->ResizeLockMinContentsX2; } void wrap_ImGuiTable_SetRefScale(ImGuiTable *ImGuiTablePtr, float v) { ImGuiTablePtr->RefScale = v; } float wrap_ImGuiTable_GetRefScale(ImGuiTable *self) { return self->RefScale; } +void wrap_ImGuiTable_SetAngledHeadersHeight(ImGuiTable *ImGuiTablePtr, float v) { ImGuiTablePtr->AngledHeadersHeight = v; } +float wrap_ImGuiTable_GetAngledHeadersHeight(ImGuiTable *self) { return self->AngledHeadersHeight; } +void wrap_ImGuiTable_SetAngledHeadersSlope(ImGuiTable *ImGuiTablePtr, float v) { ImGuiTablePtr->AngledHeadersSlope = v; } +float wrap_ImGuiTable_GetAngledHeadersSlope(ImGuiTable *self) { return self->AngledHeadersSlope; } void wrap_ImGuiTable_SetOuterRect(ImGuiTable *ImGuiTablePtr, ImRect v) { ImGuiTablePtr->OuterRect = v; } ImRect wrap_ImGuiTable_GetOuterRect(ImGuiTable *self) { return self->OuterRect; } void wrap_ImGuiTable_SetInnerRect(ImGuiTable *ImGuiTablePtr, ImRect v) { ImGuiTablePtr->InnerRect = v; } @@ -1948,10 +2042,14 @@ void wrap_ImGuiTable_SetColumnsEnabledFixedCount(ImGuiTable *ImGuiTablePtr, ImGu ImGuiTableColumnIdx wrap_ImGuiTable_GetColumnsEnabledFixedCount(ImGuiTable *self) { return self->ColumnsEnabledFixedCount; } void wrap_ImGuiTable_SetDeclColumnsCount(ImGuiTable *ImGuiTablePtr, ImGuiTableColumnIdx v) { ImGuiTablePtr->DeclColumnsCount = v; } ImGuiTableColumnIdx wrap_ImGuiTable_GetDeclColumnsCount(ImGuiTable *self) { return self->DeclColumnsCount; } +void wrap_ImGuiTable_SetAngledHeadersCount(ImGuiTable *ImGuiTablePtr, ImGuiTableColumnIdx v) { ImGuiTablePtr->AngledHeadersCount = v; } +ImGuiTableColumnIdx wrap_ImGuiTable_GetAngledHeadersCount(ImGuiTable *self) { return self->AngledHeadersCount; } void wrap_ImGuiTable_SetHoveredColumnBody(ImGuiTable *ImGuiTablePtr, ImGuiTableColumnIdx v) { ImGuiTablePtr->HoveredColumnBody = v; } ImGuiTableColumnIdx wrap_ImGuiTable_GetHoveredColumnBody(ImGuiTable *self) { return self->HoveredColumnBody; } void wrap_ImGuiTable_SetHoveredColumnBorder(ImGuiTable *ImGuiTablePtr, ImGuiTableColumnIdx v) { ImGuiTablePtr->HoveredColumnBorder = v; } ImGuiTableColumnIdx wrap_ImGuiTable_GetHoveredColumnBorder(ImGuiTable *self) { return self->HoveredColumnBorder; } +void wrap_ImGuiTable_SetHighlightColumnHeader(ImGuiTable *ImGuiTablePtr, ImGuiTableColumnIdx v) { ImGuiTablePtr->HighlightColumnHeader = v; } +ImGuiTableColumnIdx wrap_ImGuiTable_GetHighlightColumnHeader(ImGuiTable *self) { return self->HighlightColumnHeader; } void wrap_ImGuiTable_SetAutoFitSingleColumn(ImGuiTable *ImGuiTablePtr, ImGuiTableColumnIdx v) { ImGuiTablePtr->AutoFitSingleColumn = v; } ImGuiTableColumnIdx wrap_ImGuiTable_GetAutoFitSingleColumn(ImGuiTable *self) { return self->AutoFitSingleColumn; } void wrap_ImGuiTable_SetResizedColumn(ImGuiTable *ImGuiTablePtr, ImGuiTableColumnIdx v) { ImGuiTablePtr->ResizedColumn = v; } @@ -2002,6 +2100,8 @@ void wrap_ImGuiTable_SetIsUsingHeaders(ImGuiTable *ImGuiTablePtr, bool v) { ImGu bool wrap_ImGuiTable_GetIsUsingHeaders(ImGuiTable *self) { return self->IsUsingHeaders; } void wrap_ImGuiTable_SetIsContextPopupOpen(ImGuiTable *ImGuiTablePtr, bool v) { ImGuiTablePtr->IsContextPopupOpen = v; } bool wrap_ImGuiTable_GetIsContextPopupOpen(ImGuiTable *self) { return self->IsContextPopupOpen; } +void wrap_ImGuiTable_SetDisableDefaultContextMenu(ImGuiTable *ImGuiTablePtr, bool v) { ImGuiTablePtr->DisableDefaultContextMenu = v; } +bool wrap_ImGuiTable_GetDisableDefaultContextMenu(ImGuiTable *self) { return self->DisableDefaultContextMenu; } void wrap_ImGuiTable_SetIsSettingsRequestLoad(ImGuiTable *ImGuiTablePtr, bool v) { ImGuiTablePtr->IsSettingsRequestLoad = v; } bool wrap_ImGuiTable_GetIsSettingsRequestLoad(ImGuiTable *self) { return self->IsSettingsRequestLoad; } void wrap_ImGuiTable_SetIsSettingsDirty(ImGuiTable *ImGuiTablePtr, bool v) { ImGuiTablePtr->IsSettingsDirty = v; } @@ -2016,6 +2116,10 @@ void wrap_ImGuiTable_SetIsUnfrozenRows(ImGuiTable *ImGuiTablePtr, bool v) { ImGu bool wrap_ImGuiTable_GetIsUnfrozenRows(ImGuiTable *self) { return self->IsUnfrozenRows; } void wrap_ImGuiTable_SetIsDefaultSizingPolicy(ImGuiTable *ImGuiTablePtr, bool v) { ImGuiTablePtr->IsDefaultSizingPolicy = v; } bool wrap_ImGuiTable_GetIsDefaultSizingPolicy(ImGuiTable *self) { return self->IsDefaultSizingPolicy; } +void wrap_ImGuiTable_SetIsActiveIdAliveBeforeTable(ImGuiTable *ImGuiTablePtr, bool v) { ImGuiTablePtr->IsActiveIdAliveBeforeTable = v; } +bool wrap_ImGuiTable_GetIsActiveIdAliveBeforeTable(ImGuiTable *self) { return self->IsActiveIdAliveBeforeTable; } +void wrap_ImGuiTable_SetIsActiveIdInTable(ImGuiTable *ImGuiTablePtr, bool v) { ImGuiTablePtr->IsActiveIdInTable = v; } +bool wrap_ImGuiTable_GetIsActiveIdInTable(ImGuiTable *self) { return self->IsActiveIdInTable; } void wrap_ImGuiTable_SetHasScrollbarYCurr(ImGuiTable *ImGuiTablePtr, bool v) { ImGuiTablePtr->HasScrollbarYCurr = v; } bool wrap_ImGuiTable_GetHasScrollbarYCurr(ImGuiTable *self) { return self->HasScrollbarYCurr; } void wrap_ImGuiTable_SetHasScrollbarYPrev(ImGuiTable *ImGuiTablePtr, bool v) { ImGuiTablePtr->HasScrollbarYPrev = v; } @@ -2138,8 +2242,8 @@ void wrap_ImGuiTableInstanceData_SetTableInstanceID(ImGuiTableInstanceData *ImGu ImGuiID wrap_ImGuiTableInstanceData_GetTableInstanceID(ImGuiTableInstanceData *self) { return self->TableInstanceID; } void wrap_ImGuiTableInstanceData_SetLastOuterHeight(ImGuiTableInstanceData *ImGuiTableInstanceDataPtr, float v) { ImGuiTableInstanceDataPtr->LastOuterHeight = v; } float wrap_ImGuiTableInstanceData_GetLastOuterHeight(ImGuiTableInstanceData *self) { return self->LastOuterHeight; } -void wrap_ImGuiTableInstanceData_SetLastFirstRowHeight(ImGuiTableInstanceData *ImGuiTableInstanceDataPtr, float v) { ImGuiTableInstanceDataPtr->LastFirstRowHeight = v; } -float wrap_ImGuiTableInstanceData_GetLastFirstRowHeight(ImGuiTableInstanceData *self) { return self->LastFirstRowHeight; } +void wrap_ImGuiTableInstanceData_SetLastTopHeadersRowHeight(ImGuiTableInstanceData *ImGuiTableInstanceDataPtr, float v) { ImGuiTableInstanceDataPtr->LastTopHeadersRowHeight = v; } +float wrap_ImGuiTableInstanceData_GetLastTopHeadersRowHeight(ImGuiTableInstanceData *self) { return self->LastTopHeadersRowHeight; } void wrap_ImGuiTableInstanceData_SetLastFrozenHeight(ImGuiTableInstanceData *ImGuiTableInstanceDataPtr, float v) { ImGuiTableInstanceDataPtr->LastFrozenHeight = v; } float wrap_ImGuiTableInstanceData_GetLastFrozenHeight(ImGuiTableInstanceData *self) { return self->LastFrozenHeight; } void wrap_ImGuiTableInstanceData_SetHoveredRowLast(ImGuiTableInstanceData *ImGuiTableInstanceDataPtr, int v) { ImGuiTableInstanceDataPtr->HoveredRowLast = v; } @@ -2168,6 +2272,8 @@ void wrap_ImGuiTableTempData_SetTableIndex(ImGuiTableTempData *ImGuiTableTempDat int wrap_ImGuiTableTempData_GetTableIndex(ImGuiTableTempData *self) { return self->TableIndex; } void wrap_ImGuiTableTempData_SetLastTimeActive(ImGuiTableTempData *ImGuiTableTempDataPtr, float v) { ImGuiTableTempDataPtr->LastTimeActive = v; } float wrap_ImGuiTableTempData_GetLastTimeActive(ImGuiTableTempData *self) { return self->LastTimeActive; } +void wrap_ImGuiTableTempData_SetAngledHeadersExtraWidth(ImGuiTableTempData *ImGuiTableTempDataPtr, float v) { ImGuiTableTempDataPtr->AngledHeadersExtraWidth = v; } +float wrap_ImGuiTableTempData_GetAngledHeadersExtraWidth(ImGuiTableTempData *self) { return self->AngledHeadersExtraWidth; } void wrap_ImGuiTableTempData_SetUserOuterSize(ImGuiTableTempData *ImGuiTableTempDataPtr, ImVec2 v) { ImGuiTableTempDataPtr->UserOuterSize = v; } ImVec2 wrap_ImGuiTableTempData_GetUserOuterSize(ImGuiTableTempData *self) { return self->UserOuterSize; } void wrap_ImGuiTableTempData_SetDrawSplitter(ImGuiTableTempData *ImGuiTableTempDataPtr, ImDrawListSplitter v) { ImGuiTableTempDataPtr->DrawSplitter = v; } @@ -2316,6 +2422,8 @@ void wrap_ImGuiWindow_SetFlags(ImGuiWindow *ImGuiWindowPtr, ImGuiWindowFlags v) ImGuiWindowFlags wrap_ImGuiWindow_GetFlags(ImGuiWindow *self) { return self->Flags; } void wrap_ImGuiWindow_SetFlagsPreviousFrame(ImGuiWindow *ImGuiWindowPtr, ImGuiWindowFlags v) { ImGuiWindowPtr->FlagsPreviousFrame = v; } ImGuiWindowFlags wrap_ImGuiWindow_GetFlagsPreviousFrame(ImGuiWindow *self) { return self->FlagsPreviousFrame; } +void wrap_ImGuiWindow_SetChildFlags(ImGuiWindow *ImGuiWindowPtr, ImGuiChildFlags v) { ImGuiWindowPtr->ChildFlags = v; } +ImGuiChildFlags wrap_ImGuiWindow_GetChildFlags(ImGuiWindow *self) { return self->ChildFlags; } void wrap_ImGuiWindow_SetWindowClass(ImGuiWindow *ImGuiWindowPtr, ImGuiWindowClass v) { ImGuiWindowPtr->WindowClass = v; } ImGuiWindowClass wrap_ImGuiWindow_GetWindowClass(ImGuiWindow *self) { return self->WindowClass; } void wrap_ImGuiWindow_SetViewport(ImGuiWindow *ImGuiWindowPtr, ImGuiViewportP* v) { ImGuiWindowPtr->Viewport = v; } @@ -2404,6 +2512,8 @@ void wrap_ImGuiWindow_SetIsExplicitChild(ImGuiWindow *ImGuiWindowPtr, bool v) { bool wrap_ImGuiWindow_GetIsExplicitChild(ImGuiWindow *self) { return self->IsExplicitChild; } void wrap_ImGuiWindow_SetHasCloseButton(ImGuiWindow *ImGuiWindowPtr, bool v) { ImGuiWindowPtr->HasCloseButton = v; } bool wrap_ImGuiWindow_GetHasCloseButton(ImGuiWindow *self) { return self->HasCloseButton; } +void wrap_ImGuiWindow_SetResizeBorderHovered(ImGuiWindow *ImGuiWindowPtr, signed char v) { ImGuiWindowPtr->ResizeBorderHovered = v; } +signed char wrap_ImGuiWindow_GetResizeBorderHovered(ImGuiWindow *self) { return self->ResizeBorderHovered; } void wrap_ImGuiWindow_SetResizeBorderHeld(ImGuiWindow *ImGuiWindowPtr, signed char v) { ImGuiWindowPtr->ResizeBorderHeld = v; } signed char wrap_ImGuiWindow_GetResizeBorderHeld(ImGuiWindow *self) { return self->ResizeBorderHeld; } void wrap_ImGuiWindow_SetBeginCount(ImGuiWindow *ImGuiWindowPtr, short v) { ImGuiWindowPtr->BeginCount = v; } @@ -2422,8 +2532,6 @@ void wrap_ImGuiWindow_SetAutoFitFramesX(ImGuiWindow *ImGuiWindowPtr, ImS8 v) { I ImS8 wrap_ImGuiWindow_GetAutoFitFramesX(ImGuiWindow *self) { return self->AutoFitFramesX; } void wrap_ImGuiWindow_SetAutoFitFramesY(ImGuiWindow *ImGuiWindowPtr, ImS8 v) { ImGuiWindowPtr->AutoFitFramesY = v; } ImS8 wrap_ImGuiWindow_GetAutoFitFramesY(ImGuiWindow *self) { return self->AutoFitFramesY; } -void wrap_ImGuiWindow_SetAutoFitChildAxises(ImGuiWindow *ImGuiWindowPtr, ImS8 v) { ImGuiWindowPtr->AutoFitChildAxises = v; } -ImS8 wrap_ImGuiWindow_GetAutoFitChildAxises(ImGuiWindow *self) { return self->AutoFitChildAxises; } void wrap_ImGuiWindow_SetAutoFitOnlyGrows(ImGuiWindow *ImGuiWindowPtr, bool v) { ImGuiWindowPtr->AutoFitOnlyGrows = v; } bool wrap_ImGuiWindow_GetAutoFitOnlyGrows(ImGuiWindow *self) { return self->AutoFitOnlyGrows; } void wrap_ImGuiWindow_SetAutoPosLastDirection(ImGuiWindow *ImGuiWindowPtr, ImGuiDir v) { ImGuiWindowPtr->AutoPosLastDirection = v; } @@ -2506,6 +2614,8 @@ void wrap_ImGuiWindow_SetRootWindowForTitleBarHighlight(ImGuiWindow *ImGuiWindow ImGuiWindow* wrap_ImGuiWindow_GetRootWindowForTitleBarHighlight(ImGuiWindow *self) { return self->RootWindowForTitleBarHighlight; } void wrap_ImGuiWindow_SetRootWindowForNav(ImGuiWindow *ImGuiWindowPtr, ImGuiWindow* v) { ImGuiWindowPtr->RootWindowForNav = v; } ImGuiWindow* wrap_ImGuiWindow_GetRootWindowForNav(ImGuiWindow *self) { return self->RootWindowForNav; } +void wrap_ImGuiWindow_SetParentWindowForFocusRoute(ImGuiWindow *ImGuiWindowPtr, ImGuiWindow* v) { ImGuiWindowPtr->ParentWindowForFocusRoute = v; } +ImGuiWindow* wrap_ImGuiWindow_GetParentWindowForFocusRoute(ImGuiWindow *self) { return self->ParentWindowForFocusRoute; } void wrap_ImGuiWindow_SetNavLastChildNavWindow(ImGuiWindow *ImGuiWindowPtr, ImGuiWindow* v) { ImGuiWindowPtr->NavLastChildNavWindow = v; } ImGuiWindow* wrap_ImGuiWindow_GetNavLastChildNavWindow(ImGuiWindow *self) { return self->NavLastChildNavWindow; } void wrap_ImGuiWindow_SetNavLastIds(ImGuiWindow *ImGuiWindowPtr, ImGuiID* v) { memcpy(ImGuiWindowPtr->NavLastIds, v, sizeof(ImGuiID)*2); } @@ -2548,6 +2658,8 @@ void wrap_ImGuiWindowClass_SetClassId(ImGuiWindowClass *ImGuiWindowClassPtr, ImG ImGuiID wrap_ImGuiWindowClass_GetClassId(ImGuiWindowClass *self) { return self->ClassId; } void wrap_ImGuiWindowClass_SetParentViewportId(ImGuiWindowClass *ImGuiWindowClassPtr, ImGuiID v) { ImGuiWindowClassPtr->ParentViewportId = v; } ImGuiID wrap_ImGuiWindowClass_GetParentViewportId(ImGuiWindowClass *self) { return self->ParentViewportId; } +void wrap_ImGuiWindowClass_SetFocusRouteParentWindowId(ImGuiWindowClass *ImGuiWindowClassPtr, ImGuiID v) { ImGuiWindowClassPtr->FocusRouteParentWindowId = v; } +ImGuiID wrap_ImGuiWindowClass_GetFocusRouteParentWindowId(ImGuiWindowClass *self) { return self->FocusRouteParentWindowId; } void wrap_ImGuiWindowClass_SetViewportFlagsOverrideSet(ImGuiWindowClass *ImGuiWindowClassPtr, ImGuiViewportFlags v) { ImGuiWindowClassPtr->ViewportFlagsOverrideSet = v; } ImGuiViewportFlags wrap_ImGuiWindowClass_GetViewportFlagsOverrideSet(ImGuiWindowClass *self) { return self->ViewportFlagsOverrideSet; } void wrap_ImGuiWindowClass_SetViewportFlagsOverrideClear(ImGuiWindowClass *ImGuiWindowClassPtr, ImGuiViewportFlags v) { ImGuiWindowClassPtr->ViewportFlagsOverrideClear = v; } @@ -2580,6 +2692,8 @@ void wrap_ImGuiWindowSettings_SetDockOrder(ImGuiWindowSettings *ImGuiWindowSetti short wrap_ImGuiWindowSettings_GetDockOrder(ImGuiWindowSettings *self) { return self->DockOrder; } void wrap_ImGuiWindowSettings_SetCollapsed(ImGuiWindowSettings *ImGuiWindowSettingsPtr, bool v) { ImGuiWindowSettingsPtr->Collapsed = v; } bool wrap_ImGuiWindowSettings_GetCollapsed(ImGuiWindowSettings *self) { return self->Collapsed; } +void wrap_ImGuiWindowSettings_SetIsChild(ImGuiWindowSettings *ImGuiWindowSettingsPtr, bool v) { ImGuiWindowSettingsPtr->IsChild = v; } +bool wrap_ImGuiWindowSettings_GetIsChild(ImGuiWindowSettings *self) { return self->IsChild; } void wrap_ImGuiWindowSettings_SetWantApply(ImGuiWindowSettings *ImGuiWindowSettingsPtr, bool v) { ImGuiWindowSettingsPtr->WantApply = v; } bool wrap_ImGuiWindowSettings_GetWantApply(ImGuiWindowSettings *self) { return self->WantApply; } void wrap_ImGuiWindowSettings_SetWantDelete(ImGuiWindowSettings *ImGuiWindowSettingsPtr, bool v) { ImGuiWindowSettingsPtr->WantDelete = v; } @@ -2654,6 +2768,8 @@ void wrap_ImGuiWindowTempData_SetLayoutType(ImGuiWindowTempData *ImGuiWindowTemp ImGuiLayoutType wrap_ImGuiWindowTempData_GetLayoutType(ImGuiWindowTempData *self) { return self->LayoutType; } void wrap_ImGuiWindowTempData_SetParentLayoutType(ImGuiWindowTempData *ImGuiWindowTempDataPtr, ImGuiLayoutType v) { ImGuiWindowTempDataPtr->ParentLayoutType = v; } ImGuiLayoutType wrap_ImGuiWindowTempData_GetParentLayoutType(ImGuiWindowTempData *self) { return self->ParentLayoutType; } +void wrap_ImGuiWindowTempData_SetModalDimBgColor(ImGuiWindowTempData *ImGuiWindowTempDataPtr, ImU32 v) { ImGuiWindowTempDataPtr->ModalDimBgColor = v; } +ImU32 wrap_ImGuiWindowTempData_GetModalDimBgColor(ImGuiWindowTempData *self) { return self->ModalDimBgColor; } void wrap_ImGuiWindowTempData_SetItemWidth(ImGuiWindowTempData *ImGuiWindowTempDataPtr, float v) { ImGuiWindowTempDataPtr->ItemWidth = v; } float wrap_ImGuiWindowTempData_GetItemWidth(ImGuiWindowTempData *self) { return self->ItemWidth; } void wrap_ImGuiWindowTempData_SetTextWrapPos(ImGuiWindowTempData *ImGuiWindowTempDataPtr, float v) { ImGuiWindowTempDataPtr->TextWrapPos = v; } diff --git a/cimgui_structs_accessor.h b/cimgui_structs_accessor.h index 2a706dfa3..03037baad 100644 --- a/cimgui_structs_accessor.h +++ b/cimgui_structs_accessor.h @@ -255,6 +255,8 @@ extern void wrap_ImFontConfig_SetFontBuilderFlags(ImFontConfig *ImFontConfigPtr, extern unsigned int wrap_ImFontConfig_GetFontBuilderFlags(ImFontConfig *self); extern void wrap_ImFontConfig_SetRasterizerMultiply(ImFontConfig *ImFontConfigPtr, float v); extern float wrap_ImFontConfig_GetRasterizerMultiply(ImFontConfig *self); +extern void wrap_ImFontConfig_SetRasterizerDensity(ImFontConfig *ImFontConfigPtr, float v); +extern float wrap_ImFontConfig_GetRasterizerDensity(ImFontConfig *self); extern void wrap_ImFontConfig_SetEllipsisChar(ImFontConfig *ImFontConfigPtr, ImWchar v); extern ImWchar wrap_ImFontConfig_GetEllipsisChar(ImFontConfig *self); extern void wrap_ImFontConfig_SetName(ImFontConfig *ImFontConfigPtr, char* v); @@ -369,6 +371,8 @@ extern void wrap_ImGuiContext_SetWindowsActiveCount(ImGuiContext *ImGuiContextPt extern int wrap_ImGuiContext_GetWindowsActiveCount(ImGuiContext *self); extern void wrap_ImGuiContext_SetWindowsHoverPadding(ImGuiContext *ImGuiContextPtr, ImVec2 v); extern ImVec2 wrap_ImGuiContext_GetWindowsHoverPadding(ImGuiContext *self); +extern void wrap_ImGuiContext_SetDebugBreakInWindow(ImGuiContext *ImGuiContextPtr, ImGuiID v); +extern ImGuiID wrap_ImGuiContext_GetDebugBreakInWindow(ImGuiContext *self); extern void wrap_ImGuiContext_SetCurrentWindow(ImGuiContext *ImGuiContextPtr, ImGuiWindow* v); extern ImGuiWindow* wrap_ImGuiContext_GetCurrentWindow(ImGuiContext *self); extern void wrap_ImGuiContext_SetHoveredWindow(ImGuiContext *ImGuiContextPtr, ImGuiWindow* v); @@ -383,6 +387,8 @@ extern void wrap_ImGuiContext_SetWheelingWindowRefMousePos(ImGuiContext *ImGuiCo extern ImVec2 wrap_ImGuiContext_GetWheelingWindowRefMousePos(ImGuiContext *self); extern void wrap_ImGuiContext_SetWheelingWindowStartFrame(ImGuiContext *ImGuiContextPtr, int v); extern int wrap_ImGuiContext_GetWheelingWindowStartFrame(ImGuiContext *self); +extern void wrap_ImGuiContext_SetWheelingWindowScrolledFrame(ImGuiContext *ImGuiContextPtr, int v); +extern int wrap_ImGuiContext_GetWheelingWindowScrolledFrame(ImGuiContext *self); extern void wrap_ImGuiContext_SetWheelingWindowReleaseTimer(ImGuiContext *ImGuiContextPtr, float v); extern float wrap_ImGuiContext_GetWheelingWindowReleaseTimer(ImGuiContext *self); extern void wrap_ImGuiContext_SetWheelingWindowWheelRemainder(ImGuiContext *ImGuiContextPtr, ImVec2 v); @@ -421,14 +427,16 @@ extern void wrap_ImGuiContext_SetActiveIdHasBeenEditedBefore(ImGuiContext *ImGui extern bool wrap_ImGuiContext_GetActiveIdHasBeenEditedBefore(ImGuiContext *self); extern void wrap_ImGuiContext_SetActiveIdHasBeenEditedThisFrame(ImGuiContext *ImGuiContextPtr, bool v); extern bool wrap_ImGuiContext_GetActiveIdHasBeenEditedThisFrame(ImGuiContext *self); +extern void wrap_ImGuiContext_SetActiveIdFromShortcut(ImGuiContext *ImGuiContextPtr, bool v); +extern bool wrap_ImGuiContext_GetActiveIdFromShortcut(ImGuiContext *self); +extern void wrap_ImGuiContext_SetActiveIdMouseButton(ImGuiContext *ImGuiContextPtr, int v); +extern int wrap_ImGuiContext_GetActiveIdMouseButton(ImGuiContext *self); extern void wrap_ImGuiContext_SetActiveIdClickOffset(ImGuiContext *ImGuiContextPtr, ImVec2 v); extern ImVec2 wrap_ImGuiContext_GetActiveIdClickOffset(ImGuiContext *self); extern void wrap_ImGuiContext_SetActiveIdWindow(ImGuiContext *ImGuiContextPtr, ImGuiWindow* v); extern ImGuiWindow* wrap_ImGuiContext_GetActiveIdWindow(ImGuiContext *self); extern void wrap_ImGuiContext_SetActiveIdSource(ImGuiContext *ImGuiContextPtr, ImGuiInputSource v); extern ImGuiInputSource wrap_ImGuiContext_GetActiveIdSource(ImGuiContext *self); -extern void wrap_ImGuiContext_SetActiveIdMouseButton(ImGuiContext *ImGuiContextPtr, int v); -extern int wrap_ImGuiContext_GetActiveIdMouseButton(ImGuiContext *self); extern void wrap_ImGuiContext_SetActiveIdPreviousFrame(ImGuiContext *ImGuiContextPtr, ImGuiID v); extern ImGuiID wrap_ImGuiContext_GetActiveIdPreviousFrame(ImGuiContext *self); extern void wrap_ImGuiContext_SetActiveIdPreviousFrameIsAlive(ImGuiContext *ImGuiContextPtr, bool v); @@ -441,6 +449,14 @@ extern void wrap_ImGuiContext_SetLastActiveId(ImGuiContext *ImGuiContextPtr, ImG extern ImGuiID wrap_ImGuiContext_GetLastActiveId(ImGuiContext *self); extern void wrap_ImGuiContext_SetLastActiveIdTimer(ImGuiContext *ImGuiContextPtr, float v); extern float wrap_ImGuiContext_GetLastActiveIdTimer(ImGuiContext *self); +extern void wrap_ImGuiContext_SetLastKeyModsChangeTime(ImGuiContext *ImGuiContextPtr, double v); +extern double wrap_ImGuiContext_GetLastKeyModsChangeTime(ImGuiContext *self); +extern void wrap_ImGuiContext_SetLastKeyModsChangeFromNoneTime(ImGuiContext *ImGuiContextPtr, double v); +extern double wrap_ImGuiContext_GetLastKeyModsChangeFromNoneTime(ImGuiContext *self); +extern void wrap_ImGuiContext_SetLastKeyboardKeyPressTime(ImGuiContext *ImGuiContextPtr, double v); +extern double wrap_ImGuiContext_GetLastKeyboardKeyPressTime(ImGuiContext *self); +extern void wrap_ImGuiContext_SetKeysMayBeCharInput(ImGuiContext *ImGuiContextPtr, ImBitArrayForNamedKeys v); +extern ImBitArrayForNamedKeys wrap_ImGuiContext_GetKeysMayBeCharInput(ImGuiContext *self); extern void wrap_ImGuiContext_SetKeysOwnerData(ImGuiContext *ImGuiContextPtr, ImGuiKeyOwnerData* v); extern ImGuiKeyOwnerData* wrap_ImGuiContext_GetKeysOwnerData(ImGuiContext *self); extern void wrap_ImGuiContext_SetKeysRoutingTable(ImGuiContext *ImGuiContextPtr, ImGuiKeyRoutingTable v); @@ -449,8 +465,8 @@ extern void wrap_ImGuiContext_SetActiveIdUsingNavDirMask(ImGuiContext *ImGuiCont extern ImU32 wrap_ImGuiContext_GetActiveIdUsingNavDirMask(ImGuiContext *self); extern void wrap_ImGuiContext_SetActiveIdUsingAllKeyboardKeys(ImGuiContext *ImGuiContextPtr, bool v); extern bool wrap_ImGuiContext_GetActiveIdUsingAllKeyboardKeys(ImGuiContext *self); -extern void wrap_ImGuiContext_SetActiveIdUsingNavInputMask(ImGuiContext *ImGuiContextPtr, ImU32 v); -extern ImU32 wrap_ImGuiContext_GetActiveIdUsingNavInputMask(ImGuiContext *self); +extern void wrap_ImGuiContext_SetDebugBreakInShortcutRouting(ImGuiContext *ImGuiContextPtr, ImGuiKeyChord v); +extern ImGuiKeyChord wrap_ImGuiContext_GetDebugBreakInShortcutRouting(ImGuiContext *self); extern void wrap_ImGuiContext_SetCurrentFocusScopeId(ImGuiContext *ImGuiContextPtr, ImGuiID v); extern ImGuiID wrap_ImGuiContext_GetCurrentFocusScopeId(ImGuiContext *self); extern void wrap_ImGuiContext_SetCurrentItemFlags(ImGuiContext *ImGuiContextPtr, ImGuiItemFlags v); @@ -463,14 +479,18 @@ extern void wrap_ImGuiContext_SetLastItemData(ImGuiContext *ImGuiContextPtr, ImG extern ImGuiLastItemData wrap_ImGuiContext_GetLastItemData(ImGuiContext *self); extern void wrap_ImGuiContext_SetNextWindowData(ImGuiContext *ImGuiContextPtr, ImGuiNextWindowData v); extern ImGuiNextWindowData wrap_ImGuiContext_GetNextWindowData(ImGuiContext *self); +extern void wrap_ImGuiContext_SetDebugShowGroupRects(ImGuiContext *ImGuiContextPtr, bool v); +extern bool wrap_ImGuiContext_GetDebugShowGroupRects(ImGuiContext *self); +extern void wrap_ImGuiContext_SetDebugFlashStyleColorIdx(ImGuiContext *ImGuiContextPtr, ImGuiCol v); +extern ImGuiCol wrap_ImGuiContext_GetDebugFlashStyleColorIdx(ImGuiContext *self); extern void wrap_ImGuiContext_SetColorStack(ImGuiContext *ImGuiContextPtr, ImVector_ImGuiColorMod v); extern ImVector_ImGuiColorMod wrap_ImGuiContext_GetColorStack(ImGuiContext *self); extern void wrap_ImGuiContext_SetStyleVarStack(ImGuiContext *ImGuiContextPtr, ImVector_ImGuiStyleMod v); extern ImVector_ImGuiStyleMod wrap_ImGuiContext_GetStyleVarStack(ImGuiContext *self); extern void wrap_ImGuiContext_SetFontStack(ImGuiContext *ImGuiContextPtr, ImVector_ImFontPtr v); extern ImVector_ImFontPtr wrap_ImGuiContext_GetFontStack(ImGuiContext *self); -extern void wrap_ImGuiContext_SetFocusScopeStack(ImGuiContext *ImGuiContextPtr, ImVector_ImGuiID v); -extern ImVector_ImGuiID wrap_ImGuiContext_GetFocusScopeStack(ImGuiContext *self); +extern void wrap_ImGuiContext_SetFocusScopeStack(ImGuiContext *ImGuiContextPtr, ImVector_ImGuiFocusScopeData v); +extern ImVector_ImGuiFocusScopeData wrap_ImGuiContext_GetFocusScopeStack(ImGuiContext *self); extern void wrap_ImGuiContext_SetItemFlagsStack(ImGuiContext *ImGuiContextPtr, ImVector_ImGuiItemFlags v); extern ImVector_ImGuiItemFlags wrap_ImGuiContext_GetItemFlagsStack(ImGuiContext *self); extern void wrap_ImGuiContext_SetGroupStack(ImGuiContext *ImGuiContextPtr, ImVector_ImGuiGroupData v); @@ -481,8 +501,6 @@ extern void wrap_ImGuiContext_SetBeginPopupStack(ImGuiContext *ImGuiContextPtr, extern ImVector_ImGuiPopupData wrap_ImGuiContext_GetBeginPopupStack(ImGuiContext *self); extern void wrap_ImGuiContext_SetNavTreeNodeStack(ImGuiContext *ImGuiContextPtr, ImVector_ImGuiNavTreeNodeData v); extern ImVector_ImGuiNavTreeNodeData wrap_ImGuiContext_GetNavTreeNodeStack(ImGuiContext *self); -extern void wrap_ImGuiContext_SetBeginMenuCount(ImGuiContext *ImGuiContextPtr, int v); -extern int wrap_ImGuiContext_GetBeginMenuCount(ImGuiContext *self); extern void wrap_ImGuiContext_SetViewports(ImGuiContext *ImGuiContextPtr, ImVector_ImGuiViewportPPtr v); extern ImVector_ImGuiViewportPPtr wrap_ImGuiContext_GetViewports(ImGuiContext *self); extern void wrap_ImGuiContext_SetCurrentDpiScale(ImGuiContext *ImGuiContextPtr, float v); @@ -497,6 +515,8 @@ extern void wrap_ImGuiContext_SetPlatformLastFocusedViewportId(ImGuiContext *ImG extern ImGuiID wrap_ImGuiContext_GetPlatformLastFocusedViewportId(ImGuiContext *self); extern void wrap_ImGuiContext_SetFallbackMonitor(ImGuiContext *ImGuiContextPtr, ImGuiPlatformMonitor v); extern ImGuiPlatformMonitor wrap_ImGuiContext_GetFallbackMonitor(ImGuiContext *self); +extern void wrap_ImGuiContext_SetPlatformMonitorsFullWorkRect(ImGuiContext *ImGuiContextPtr, ImRect v); +extern ImRect wrap_ImGuiContext_GetPlatformMonitorsFullWorkRect(ImGuiContext *self); extern void wrap_ImGuiContext_SetViewportCreatedCount(ImGuiContext *ImGuiContextPtr, int v); extern int wrap_ImGuiContext_GetViewportCreatedCount(ImGuiContext *self); extern void wrap_ImGuiContext_SetPlatformWindowsCreatedCount(ImGuiContext *ImGuiContextPtr, int v); @@ -509,6 +529,8 @@ extern void wrap_ImGuiContext_SetNavId(ImGuiContext *ImGuiContextPtr, ImGuiID v) extern ImGuiID wrap_ImGuiContext_GetNavId(ImGuiContext *self); extern void wrap_ImGuiContext_SetNavFocusScopeId(ImGuiContext *ImGuiContextPtr, ImGuiID v); extern ImGuiID wrap_ImGuiContext_GetNavFocusScopeId(ImGuiContext *self); +extern void wrap_ImGuiContext_SetNavFocusRoute(ImGuiContext *ImGuiContextPtr, ImVector_ImGuiFocusScopeData v); +extern ImVector_ImGuiFocusScopeData wrap_ImGuiContext_GetNavFocusRoute(ImGuiContext *self); extern void wrap_ImGuiContext_SetNavActivateId(ImGuiContext *ImGuiContextPtr, ImGuiID v); extern ImGuiID wrap_ImGuiContext_GetNavActivateId(ImGuiContext *self); extern void wrap_ImGuiContext_SetNavActivateDownId(ImGuiContext *ImGuiContextPtr, ImGuiID v); @@ -517,6 +539,10 @@ extern void wrap_ImGuiContext_SetNavActivatePressedId(ImGuiContext *ImGuiContext extern ImGuiID wrap_ImGuiContext_GetNavActivatePressedId(ImGuiContext *self); extern void wrap_ImGuiContext_SetNavActivateFlags(ImGuiContext *ImGuiContextPtr, ImGuiActivateFlags v); extern ImGuiActivateFlags wrap_ImGuiContext_GetNavActivateFlags(ImGuiContext *self); +extern void wrap_ImGuiContext_SetNavHighlightActivatedId(ImGuiContext *ImGuiContextPtr, ImGuiID v); +extern ImGuiID wrap_ImGuiContext_GetNavHighlightActivatedId(ImGuiContext *self); +extern void wrap_ImGuiContext_SetNavHighlightActivatedTimer(ImGuiContext *ImGuiContextPtr, float v); +extern float wrap_ImGuiContext_GetNavHighlightActivatedTimer(ImGuiContext *self); extern void wrap_ImGuiContext_SetNavJustMovedToId(ImGuiContext *ImGuiContextPtr, ImGuiID v); extern ImGuiID wrap_ImGuiContext_GetNavJustMovedToId(ImGuiContext *self); extern void wrap_ImGuiContext_SetNavJustMovedToFocusScopeId(ImGuiContext *ImGuiContextPtr, ImGuiID v); @@ -601,6 +627,8 @@ extern void wrap_ImGuiContext_SetNavWindowingHighlightAlpha(ImGuiContext *ImGuiC extern float wrap_ImGuiContext_GetNavWindowingHighlightAlpha(ImGuiContext *self); extern void wrap_ImGuiContext_SetNavWindowingToggleLayer(ImGuiContext *ImGuiContextPtr, bool v); extern bool wrap_ImGuiContext_GetNavWindowingToggleLayer(ImGuiContext *self); +extern void wrap_ImGuiContext_SetNavWindowingToggleKey(ImGuiContext *ImGuiContextPtr, ImGuiKey v); +extern ImGuiKey wrap_ImGuiContext_GetNavWindowingToggleKey(ImGuiContext *self); extern void wrap_ImGuiContext_SetNavWindowingAccumDeltaPos(ImGuiContext *ImGuiContextPtr, ImVec2 v); extern ImVec2 wrap_ImGuiContext_GetNavWindowingAccumDeltaPos(ImGuiContext *self); extern void wrap_ImGuiContext_SetNavWindowingAccumDeltaSize(ImGuiContext *ImGuiContextPtr, ImVec2 v); @@ -623,6 +651,8 @@ extern void wrap_ImGuiContext_SetDragDropPayload(ImGuiContext *ImGuiContextPtr, extern ImGuiPayload wrap_ImGuiContext_GetDragDropPayload(ImGuiContext *self); extern void wrap_ImGuiContext_SetDragDropTargetRect(ImGuiContext *ImGuiContextPtr, ImRect v); extern ImRect wrap_ImGuiContext_GetDragDropTargetRect(ImGuiContext *self); +extern void wrap_ImGuiContext_SetDragDropTargetClipRect(ImGuiContext *ImGuiContextPtr, ImRect v); +extern ImRect wrap_ImGuiContext_GetDragDropTargetClipRect(ImGuiContext *self); extern void wrap_ImGuiContext_SetDragDropTargetId(ImGuiContext *ImGuiContextPtr, ImGuiID v); extern ImGuiID wrap_ImGuiContext_GetDragDropTargetId(ImGuiContext *self); extern void wrap_ImGuiContext_SetDragDropAcceptFlags(ImGuiContext *ImGuiContextPtr, ImGuiDragDropFlags v); @@ -647,6 +677,8 @@ extern void wrap_ImGuiContext_SetClipperTempData(ImGuiContext *ImGuiContextPtr, extern ImVector_ImGuiListClipperData wrap_ImGuiContext_GetClipperTempData(ImGuiContext *self); extern void wrap_ImGuiContext_SetCurrentTable(ImGuiContext *ImGuiContextPtr, ImGuiTable* v); extern ImGuiTable* wrap_ImGuiContext_GetCurrentTable(ImGuiContext *self); +extern void wrap_ImGuiContext_SetDebugBreakInTable(ImGuiContext *ImGuiContextPtr, ImGuiID v); +extern ImGuiID wrap_ImGuiContext_GetDebugBreakInTable(ImGuiContext *self); extern void wrap_ImGuiContext_SetTablesTempDataStacked(ImGuiContext *ImGuiContextPtr, int v); extern int wrap_ImGuiContext_GetTablesTempDataStacked(ImGuiContext *self); extern void wrap_ImGuiContext_SetTablesTempData(ImGuiContext *ImGuiContextPtr, ImVector_ImGuiTableTempData v); @@ -691,6 +723,10 @@ extern void wrap_ImGuiContext_SetInputTextPasswordFont(ImGuiContext *ImGuiContex extern ImFont wrap_ImGuiContext_GetInputTextPasswordFont(ImGuiContext *self); extern void wrap_ImGuiContext_SetTempInputId(ImGuiContext *ImGuiContextPtr, ImGuiID v); extern ImGuiID wrap_ImGuiContext_GetTempInputId(ImGuiContext *self); +extern void wrap_ImGuiContext_SetBeginMenuDepth(ImGuiContext *ImGuiContextPtr, int v); +extern int wrap_ImGuiContext_GetBeginMenuDepth(ImGuiContext *self); +extern void wrap_ImGuiContext_SetBeginComboDepth(ImGuiContext *ImGuiContextPtr, int v); +extern int wrap_ImGuiContext_GetBeginComboDepth(ImGuiContext *self); extern void wrap_ImGuiContext_SetColorEditOptions(ImGuiContext *ImGuiContextPtr, ImGuiColorEditFlags v); extern ImGuiColorEditFlags wrap_ImGuiContext_GetColorEditOptions(ImGuiContext *self); extern void wrap_ImGuiContext_SetColorEditCurrentID(ImGuiContext *ImGuiContextPtr, ImGuiID v); @@ -707,6 +743,10 @@ extern void wrap_ImGuiContext_SetColorPickerRef(ImGuiContext *ImGuiContextPtr, I extern ImVec4 wrap_ImGuiContext_GetColorPickerRef(ImGuiContext *self); extern void wrap_ImGuiContext_SetComboPreviewData(ImGuiContext *ImGuiContextPtr, ImGuiComboPreviewData v); extern ImGuiComboPreviewData wrap_ImGuiContext_GetComboPreviewData(ImGuiContext *self); +extern void wrap_ImGuiContext_SetWindowResizeBorderExpectedRect(ImGuiContext *ImGuiContextPtr, ImRect v); +extern ImRect wrap_ImGuiContext_GetWindowResizeBorderExpectedRect(ImGuiContext *self); +extern void wrap_ImGuiContext_SetWindowResizeRelativeMode(ImGuiContext *ImGuiContextPtr, bool v); +extern bool wrap_ImGuiContext_GetWindowResizeRelativeMode(ImGuiContext *self); extern void wrap_ImGuiContext_SetSliderGrabClickOffset(ImGuiContext *ImGuiContextPtr, float v); extern float wrap_ImGuiContext_GetSliderGrabClickOffset(ImGuiContext *self); extern void wrap_ImGuiContext_SetSliderCurrentAccum(ImGuiContext *ImGuiContextPtr, float v); @@ -789,10 +829,16 @@ extern void wrap_ImGuiContext_SetDebugLogBuf(ImGuiContext *ImGuiContextPtr, ImGu extern ImGuiTextBuffer wrap_ImGuiContext_GetDebugLogBuf(ImGuiContext *self); extern void wrap_ImGuiContext_SetDebugLogIndex(ImGuiContext *ImGuiContextPtr, ImGuiTextIndex v); extern ImGuiTextIndex wrap_ImGuiContext_GetDebugLogIndex(ImGuiContext *self); -extern void wrap_ImGuiContext_SetDebugLogClipperAutoDisableFrames(ImGuiContext *ImGuiContextPtr, ImU8 v); -extern ImU8 wrap_ImGuiContext_GetDebugLogClipperAutoDisableFrames(ImGuiContext *self); +extern void wrap_ImGuiContext_SetDebugLogAutoDisableFlags(ImGuiContext *ImGuiContextPtr, ImGuiDebugLogFlags v); +extern ImGuiDebugLogFlags wrap_ImGuiContext_GetDebugLogAutoDisableFlags(ImGuiContext *self); +extern void wrap_ImGuiContext_SetDebugLogAutoDisableFrames(ImGuiContext *ImGuiContextPtr, ImU8 v); +extern ImU8 wrap_ImGuiContext_GetDebugLogAutoDisableFrames(ImGuiContext *self); extern void wrap_ImGuiContext_SetDebugLocateFrames(ImGuiContext *ImGuiContextPtr, ImU8 v); extern ImU8 wrap_ImGuiContext_GetDebugLocateFrames(ImGuiContext *self); +extern void wrap_ImGuiContext_SetDebugBreakInLocateId(ImGuiContext *ImGuiContextPtr, bool v); +extern bool wrap_ImGuiContext_GetDebugBreakInLocateId(ImGuiContext *self); +extern void wrap_ImGuiContext_SetDebugBreakKeyChord(ImGuiContext *ImGuiContextPtr, ImGuiKeyChord v); +extern ImGuiKeyChord wrap_ImGuiContext_GetDebugBreakKeyChord(ImGuiContext *self); extern void wrap_ImGuiContext_SetDebugBeginReturnValueCullDepth(ImGuiContext *ImGuiContextPtr, ImS8 v); extern ImS8 wrap_ImGuiContext_GetDebugBeginReturnValueCullDepth(ImGuiContext *self); extern void wrap_ImGuiContext_SetDebugItemPickerActive(ImGuiContext *ImGuiContextPtr, bool v); @@ -801,10 +847,16 @@ extern void wrap_ImGuiContext_SetDebugItemPickerMouseButton(ImGuiContext *ImGuiC extern ImU8 wrap_ImGuiContext_GetDebugItemPickerMouseButton(ImGuiContext *self); extern void wrap_ImGuiContext_SetDebugItemPickerBreakId(ImGuiContext *ImGuiContextPtr, ImGuiID v); extern ImGuiID wrap_ImGuiContext_GetDebugItemPickerBreakId(ImGuiContext *self); +extern void wrap_ImGuiContext_SetDebugFlashStyleColorTime(ImGuiContext *ImGuiContextPtr, float v); +extern float wrap_ImGuiContext_GetDebugFlashStyleColorTime(ImGuiContext *self); +extern void wrap_ImGuiContext_SetDebugFlashStyleColorBackup(ImGuiContext *ImGuiContextPtr, ImVec4 v); +extern ImVec4 wrap_ImGuiContext_GetDebugFlashStyleColorBackup(ImGuiContext *self); extern void wrap_ImGuiContext_SetDebugMetricsConfig(ImGuiContext *ImGuiContextPtr, ImGuiMetricsConfig v); extern ImGuiMetricsConfig wrap_ImGuiContext_GetDebugMetricsConfig(ImGuiContext *self); -extern void wrap_ImGuiContext_SetDebugStackTool(ImGuiContext *ImGuiContextPtr, ImGuiStackTool v); -extern ImGuiStackTool wrap_ImGuiContext_GetDebugStackTool(ImGuiContext *self); +extern void wrap_ImGuiContext_SetDebugIDStackTool(ImGuiContext *ImGuiContextPtr, ImGuiIDStackTool v); +extern ImGuiIDStackTool wrap_ImGuiContext_GetDebugIDStackTool(ImGuiContext *self); +extern void wrap_ImGuiContext_SetDebugAllocInfo(ImGuiContext *ImGuiContextPtr, ImGuiDebugAllocInfo v); +extern ImGuiDebugAllocInfo wrap_ImGuiContext_GetDebugAllocInfo(ImGuiContext *self); extern void wrap_ImGuiContext_SetDebugHoveredDockNode(ImGuiContext *ImGuiContextPtr, ImGuiDockNode* v); extern ImGuiDockNode* wrap_ImGuiContext_GetDebugHoveredDockNode(ImGuiContext *self); extern void wrap_ImGuiContext_SetFramerateSecPerFrame(ImGuiContext *ImGuiContextPtr, float* v); @@ -823,6 +875,8 @@ extern void wrap_ImGuiContext_SetWantTextInputNextFrame(ImGuiContext *ImGuiConte extern int wrap_ImGuiContext_GetWantTextInputNextFrame(ImGuiContext *self); extern void wrap_ImGuiContext_SetTempBuffer(ImGuiContext *ImGuiContextPtr, ImVector_char v); extern ImVector_char wrap_ImGuiContext_GetTempBuffer(ImGuiContext *self); +extern void wrap_ImGuiContext_SetTempKeychordName(ImGuiContext *ImGuiContextPtr, char* v); +extern char* wrap_ImGuiContext_GetTempKeychordName(ImGuiContext *self); extern void wrap_ImGuiContextHook_SetHookId(ImGuiContextHook *ImGuiContextHookPtr, ImGuiID v); extern ImGuiID wrap_ImGuiContextHook_GetHookId(ImGuiContextHook *self); extern void wrap_ImGuiContextHook_SetType(ImGuiContextHook *ImGuiContextHookPtr, ImGuiContextHookType v); @@ -849,6 +903,20 @@ extern void wrap_ImGuiDataVarInfo_SetCount(ImGuiDataVarInfo *ImGuiDataVarInfoPtr extern ImU32 wrap_ImGuiDataVarInfo_GetCount(ImGuiDataVarInfo *self); extern void wrap_ImGuiDataVarInfo_SetOffset(ImGuiDataVarInfo *ImGuiDataVarInfoPtr, ImU32 v); extern ImU32 wrap_ImGuiDataVarInfo_GetOffset(ImGuiDataVarInfo *self); +extern void wrap_ImGuiDebugAllocEntry_SetFrameCount(ImGuiDebugAllocEntry *ImGuiDebugAllocEntryPtr, int v); +extern int wrap_ImGuiDebugAllocEntry_GetFrameCount(ImGuiDebugAllocEntry *self); +extern void wrap_ImGuiDebugAllocEntry_SetAllocCount(ImGuiDebugAllocEntry *ImGuiDebugAllocEntryPtr, ImS16 v); +extern ImS16 wrap_ImGuiDebugAllocEntry_GetAllocCount(ImGuiDebugAllocEntry *self); +extern void wrap_ImGuiDebugAllocEntry_SetFreeCount(ImGuiDebugAllocEntry *ImGuiDebugAllocEntryPtr, ImS16 v); +extern ImS16 wrap_ImGuiDebugAllocEntry_GetFreeCount(ImGuiDebugAllocEntry *self); +extern void wrap_ImGuiDebugAllocInfo_SetTotalAllocCount(ImGuiDebugAllocInfo *ImGuiDebugAllocInfoPtr, int v); +extern int wrap_ImGuiDebugAllocInfo_GetTotalAllocCount(ImGuiDebugAllocInfo *self); +extern void wrap_ImGuiDebugAllocInfo_SetTotalFreeCount(ImGuiDebugAllocInfo *ImGuiDebugAllocInfoPtr, int v); +extern int wrap_ImGuiDebugAllocInfo_GetTotalFreeCount(ImGuiDebugAllocInfo *self); +extern void wrap_ImGuiDebugAllocInfo_SetLastEntriesIdx(ImGuiDebugAllocInfo *ImGuiDebugAllocInfoPtr, ImS16 v); +extern ImS16 wrap_ImGuiDebugAllocInfo_GetLastEntriesIdx(ImGuiDebugAllocInfo *self); +extern void wrap_ImGuiDebugAllocInfo_SetLastEntriesBuf(ImGuiDebugAllocInfo *ImGuiDebugAllocInfoPtr, ImGuiDebugAllocEntry* v); +extern ImGuiDebugAllocEntry* wrap_ImGuiDebugAllocInfo_GetLastEntriesBuf(ImGuiDebugAllocInfo *self); extern void wrap_ImGuiDockContext_SetNodes(ImGuiDockContext *ImGuiDockContextPtr, ImGuiStorage v); extern ImGuiStorage wrap_ImGuiDockContext_GetNodes(ImGuiDockContext *self); extern void wrap_ImGuiDockContext_SetRequests(ImGuiDockContext *ImGuiDockContextPtr, ImVector_ImGuiDockRequest v); @@ -939,12 +1007,18 @@ extern void wrap_ImGuiDockNode_SetWantHiddenTabBarUpdate(ImGuiDockNode *ImGuiDoc extern bool wrap_ImGuiDockNode_GetWantHiddenTabBarUpdate(ImGuiDockNode *self); extern void wrap_ImGuiDockNode_SetWantHiddenTabBarToggle(ImGuiDockNode *ImGuiDockNodePtr, bool v); extern bool wrap_ImGuiDockNode_GetWantHiddenTabBarToggle(ImGuiDockNode *self); +extern void wrap_ImGuiFocusScopeData_SetID(ImGuiFocusScopeData *ImGuiFocusScopeDataPtr, ImGuiID v); +extern ImGuiID wrap_ImGuiFocusScopeData_GetID(ImGuiFocusScopeData *self); +extern void wrap_ImGuiFocusScopeData_SetWindowID(ImGuiFocusScopeData *ImGuiFocusScopeDataPtr, ImGuiID v); +extern ImGuiID wrap_ImGuiFocusScopeData_GetWindowID(ImGuiFocusScopeData *self); extern void wrap_ImGuiGroupData_SetWindowID(ImGuiGroupData *ImGuiGroupDataPtr, ImGuiID v); extern ImGuiID wrap_ImGuiGroupData_GetWindowID(ImGuiGroupData *self); extern void wrap_ImGuiGroupData_SetBackupCursorPos(ImGuiGroupData *ImGuiGroupDataPtr, ImVec2 v); extern ImVec2 wrap_ImGuiGroupData_GetBackupCursorPos(ImGuiGroupData *self); extern void wrap_ImGuiGroupData_SetBackupCursorMaxPos(ImGuiGroupData *ImGuiGroupDataPtr, ImVec2 v); extern ImVec2 wrap_ImGuiGroupData_GetBackupCursorMaxPos(ImGuiGroupData *self); +extern void wrap_ImGuiGroupData_SetBackupCursorPosPrevLine(ImGuiGroupData *ImGuiGroupDataPtr, ImVec2 v); +extern ImVec2 wrap_ImGuiGroupData_GetBackupCursorPosPrevLine(ImGuiGroupData *self); extern void wrap_ImGuiGroupData_SetBackupIndent(ImGuiGroupData *ImGuiGroupDataPtr, ImVec1 v); extern ImVec1 wrap_ImGuiGroupData_GetBackupIndent(ImGuiGroupData *self); extern void wrap_ImGuiGroupData_SetBackupGroupOffset(ImGuiGroupData *ImGuiGroupDataPtr, ImVec1 v); @@ -959,8 +1033,22 @@ extern void wrap_ImGuiGroupData_SetBackupActiveIdPreviousFrameIsAlive(ImGuiGroup extern bool wrap_ImGuiGroupData_GetBackupActiveIdPreviousFrameIsAlive(ImGuiGroupData *self); extern void wrap_ImGuiGroupData_SetBackupHoveredIdIsAlive(ImGuiGroupData *ImGuiGroupDataPtr, bool v); extern bool wrap_ImGuiGroupData_GetBackupHoveredIdIsAlive(ImGuiGroupData *self); +extern void wrap_ImGuiGroupData_SetBackupIsSameLine(ImGuiGroupData *ImGuiGroupDataPtr, bool v); +extern bool wrap_ImGuiGroupData_GetBackupIsSameLine(ImGuiGroupData *self); extern void wrap_ImGuiGroupData_SetEmitItem(ImGuiGroupData *ImGuiGroupDataPtr, bool v); extern bool wrap_ImGuiGroupData_GetEmitItem(ImGuiGroupData *self); +extern void wrap_ImGuiIDStackTool_SetLastActiveFrame(ImGuiIDStackTool *ImGuiIDStackToolPtr, int v); +extern int wrap_ImGuiIDStackTool_GetLastActiveFrame(ImGuiIDStackTool *self); +extern void wrap_ImGuiIDStackTool_SetStackLevel(ImGuiIDStackTool *ImGuiIDStackToolPtr, int v); +extern int wrap_ImGuiIDStackTool_GetStackLevel(ImGuiIDStackTool *self); +extern void wrap_ImGuiIDStackTool_SetQueryId(ImGuiIDStackTool *ImGuiIDStackToolPtr, ImGuiID v); +extern ImGuiID wrap_ImGuiIDStackTool_GetQueryId(ImGuiIDStackTool *self); +extern void wrap_ImGuiIDStackTool_SetResults(ImGuiIDStackTool *ImGuiIDStackToolPtr, ImVector_ImGuiStackLevelInfo v); +extern ImVector_ImGuiStackLevelInfo wrap_ImGuiIDStackTool_GetResults(ImGuiIDStackTool *self); +extern void wrap_ImGuiIDStackTool_SetCopyToClipboardOnCtrlC(ImGuiIDStackTool *ImGuiIDStackToolPtr, bool v); +extern bool wrap_ImGuiIDStackTool_GetCopyToClipboardOnCtrlC(ImGuiIDStackTool *self); +extern void wrap_ImGuiIDStackTool_SetCopyToClipboardLastTime(ImGuiIDStackTool *ImGuiIDStackToolPtr, float v); +extern float wrap_ImGuiIDStackTool_GetCopyToClipboardLastTime(ImGuiIDStackTool *self); extern void wrap_ImGuiIO_SetConfigFlags(ImGuiIO *ImGuiIOPtr, ImGuiConfigFlags v); extern ImGuiConfigFlags wrap_ImGuiIO_GetConfigFlags(ImGuiIO *self); extern void wrap_ImGuiIO_SetBackendFlags(ImGuiIO *ImGuiIOPtr, ImGuiBackendFlags v); @@ -1031,6 +1119,8 @@ extern void wrap_ImGuiIO_SetKeyRepeatDelay(ImGuiIO *ImGuiIOPtr, float v); extern float wrap_ImGuiIO_GetKeyRepeatDelay(ImGuiIO *self); extern void wrap_ImGuiIO_SetKeyRepeatRate(ImGuiIO *ImGuiIOPtr, float v); extern float wrap_ImGuiIO_GetKeyRepeatRate(ImGuiIO *self); +extern void wrap_ImGuiIO_SetConfigDebugIsDebuggerPresent(ImGuiIO *ImGuiIOPtr, bool v); +extern bool wrap_ImGuiIO_GetConfigDebugIsDebuggerPresent(ImGuiIO *self); extern void wrap_ImGuiIO_SetConfigDebugBeginReturnValueOnce(ImGuiIO *ImGuiIOPtr, bool v); extern bool wrap_ImGuiIO_GetConfigDebugBeginReturnValueOnce(ImGuiIO *self); extern void wrap_ImGuiIO_SetConfigDebugBeginReturnValueLoop(ImGuiIO *ImGuiIOPtr, bool v); @@ -1051,8 +1141,6 @@ extern void wrap_ImGuiIO_SetBackendLanguageUserData(ImGuiIO *ImGuiIOPtr, uintptr extern uintptr_t wrap_ImGuiIO_GetBackendLanguageUserData(ImGuiIO *self); extern void wrap_ImGuiIO_SetClipboardUserData(ImGuiIO *ImGuiIOPtr, uintptr_t v); extern uintptr_t wrap_ImGuiIO_GetClipboardUserData(ImGuiIO *self); -extern void wrap_ImGuiIO_Set_UnusedPadding(ImGuiIO *ImGuiIOPtr, uintptr_t v); -extern uintptr_t wrap_ImGuiIO_Get_UnusedPadding(ImGuiIO *self); extern void wrap_ImGuiIO_SetPlatformLocaleDecimalPoint(ImGuiIO *ImGuiIOPtr, ImWchar v); extern ImWchar wrap_ImGuiIO_GetPlatformLocaleDecimalPoint(ImGuiIO *self); extern void wrap_ImGuiIO_SetWantCaptureMouse(ImGuiIO *ImGuiIOPtr, bool v); @@ -1079,16 +1167,8 @@ extern void wrap_ImGuiIO_SetMetricsRenderWindows(ImGuiIO *ImGuiIOPtr, int v); extern int wrap_ImGuiIO_GetMetricsRenderWindows(ImGuiIO *self); extern void wrap_ImGuiIO_SetMetricsActiveWindows(ImGuiIO *ImGuiIOPtr, int v); extern int wrap_ImGuiIO_GetMetricsActiveWindows(ImGuiIO *self); -extern void wrap_ImGuiIO_SetMetricsActiveAllocations(ImGuiIO *ImGuiIOPtr, int v); -extern int wrap_ImGuiIO_GetMetricsActiveAllocations(ImGuiIO *self); extern void wrap_ImGuiIO_SetMouseDelta(ImGuiIO *ImGuiIOPtr, ImVec2 v); extern ImVec2 wrap_ImGuiIO_GetMouseDelta(ImGuiIO *self); -extern void wrap_ImGuiIO_SetKeyMap(ImGuiIO *ImGuiIOPtr, int* v); -extern int* wrap_ImGuiIO_GetKeyMap(ImGuiIO *self); -extern void wrap_ImGuiIO_SetKeysDown(ImGuiIO *ImGuiIOPtr, bool* v); -extern bool* wrap_ImGuiIO_GetKeysDown(ImGuiIO *self); -extern void wrap_ImGuiIO_SetNavInputs(ImGuiIO *ImGuiIOPtr, float* v); -extern float* wrap_ImGuiIO_GetNavInputs(ImGuiIO *self); extern void wrap_ImGuiIO_SetCtx(ImGuiIO *ImGuiIOPtr, ImGuiContext* v); extern ImGuiContext* wrap_ImGuiIO_GetCtx(ImGuiIO *self); extern void wrap_ImGuiIO_SetMousePos(ImGuiIO *ImGuiIOPtr, ImVec2 v); @@ -1259,6 +1339,12 @@ extern void wrap_ImGuiInputTextState_SetEdited(ImGuiInputTextState *ImGuiInputTe extern bool wrap_ImGuiInputTextState_GetEdited(ImGuiInputTextState *self); extern void wrap_ImGuiInputTextState_SetFlags(ImGuiInputTextState *ImGuiInputTextStatePtr, ImGuiInputTextFlags v); extern ImGuiInputTextFlags wrap_ImGuiInputTextState_GetFlags(ImGuiInputTextState *self); +extern void wrap_ImGuiInputTextState_SetReloadUserBuf(ImGuiInputTextState *ImGuiInputTextStatePtr, bool v); +extern bool wrap_ImGuiInputTextState_GetReloadUserBuf(ImGuiInputTextState *self); +extern void wrap_ImGuiInputTextState_SetReloadSelectionStart(ImGuiInputTextState *ImGuiInputTextStatePtr, int v); +extern int wrap_ImGuiInputTextState_GetReloadSelectionStart(ImGuiInputTextState *self); +extern void wrap_ImGuiInputTextState_SetReloadSelectionEnd(ImGuiInputTextState *ImGuiInputTextStatePtr, int v); +extern int wrap_ImGuiInputTextState_GetReloadSelectionEnd(ImGuiInputTextState *self); extern void wrap_ImGuiKeyData_SetDown(ImGuiKeyData *ImGuiKeyDataPtr, bool v); extern bool wrap_ImGuiKeyData_GetDown(ImGuiKeyData *self); extern void wrap_ImGuiKeyData_SetDownDuration(ImGuiKeyData *ImGuiKeyDataPtr, float v); @@ -1279,6 +1365,8 @@ extern void wrap_ImGuiKeyRoutingData_SetNextEntryIndex(ImGuiKeyRoutingData *ImGu extern ImGuiKeyRoutingIndex wrap_ImGuiKeyRoutingData_GetNextEntryIndex(ImGuiKeyRoutingData *self); extern void wrap_ImGuiKeyRoutingData_SetMods(ImGuiKeyRoutingData *ImGuiKeyRoutingDataPtr, ImU16 v); extern ImU16 wrap_ImGuiKeyRoutingData_GetMods(ImGuiKeyRoutingData *self); +extern void wrap_ImGuiKeyRoutingData_SetRoutingCurrScore(ImGuiKeyRoutingData *ImGuiKeyRoutingDataPtr, ImU8 v); +extern ImU8 wrap_ImGuiKeyRoutingData_GetRoutingCurrScore(ImGuiKeyRoutingData *self); extern void wrap_ImGuiKeyRoutingData_SetRoutingNextScore(ImGuiKeyRoutingData *ImGuiKeyRoutingDataPtr, ImU8 v); extern ImU8 wrap_ImGuiKeyRoutingData_GetRoutingNextScore(ImGuiKeyRoutingData *self); extern void wrap_ImGuiKeyRoutingData_SetRoutingCurr(ImGuiKeyRoutingData *ImGuiKeyRoutingDataPtr, ImGuiID v); @@ -1303,6 +1391,8 @@ extern void wrap_ImGuiLastItemData_SetNavRect(ImGuiLastItemData *ImGuiLastItemDa extern ImRect wrap_ImGuiLastItemData_GetNavRect(ImGuiLastItemData *self); extern void wrap_ImGuiLastItemData_SetDisplayRect(ImGuiLastItemData *ImGuiLastItemDataPtr, ImRect v); extern ImRect wrap_ImGuiLastItemData_GetDisplayRect(ImGuiLastItemData *self); +extern void wrap_ImGuiLastItemData_SetClipRect(ImGuiLastItemData *ImGuiLastItemDataPtr, ImRect v); +extern ImRect wrap_ImGuiLastItemData_GetClipRect(ImGuiLastItemData *self); extern void wrap_ImGuiListClipper_SetCtx(ImGuiListClipper *ImGuiListClipperPtr, ImGuiContext* v); extern ImGuiContext* wrap_ImGuiListClipper_GetCtx(ImGuiListClipper *self); extern void wrap_ImGuiListClipper_SetDisplayStart(ImGuiListClipper *ImGuiListClipperPtr, int v); @@ -1359,8 +1449,8 @@ extern void wrap_ImGuiMenuColumns_SetWidths(ImGuiMenuColumns *ImGuiMenuColumnsPt extern ImU16* wrap_ImGuiMenuColumns_GetWidths(ImGuiMenuColumns *self); extern void wrap_ImGuiMetricsConfig_SetShowDebugLog(ImGuiMetricsConfig *ImGuiMetricsConfigPtr, bool v); extern bool wrap_ImGuiMetricsConfig_GetShowDebugLog(ImGuiMetricsConfig *self); -extern void wrap_ImGuiMetricsConfig_SetShowStackTool(ImGuiMetricsConfig *ImGuiMetricsConfigPtr, bool v); -extern bool wrap_ImGuiMetricsConfig_GetShowStackTool(ImGuiMetricsConfig *self); +extern void wrap_ImGuiMetricsConfig_SetShowIDStackTool(ImGuiMetricsConfig *ImGuiMetricsConfigPtr, bool v); +extern bool wrap_ImGuiMetricsConfig_GetShowIDStackTool(ImGuiMetricsConfig *self); extern void wrap_ImGuiMetricsConfig_SetShowWindowsRects(ImGuiMetricsConfig *ImGuiMetricsConfigPtr, bool v); extern bool wrap_ImGuiMetricsConfig_GetShowWindowsRects(ImGuiMetricsConfig *self); extern void wrap_ImGuiMetricsConfig_SetShowWindowsBeginOrder(ImGuiMetricsConfig *ImGuiMetricsConfigPtr, bool v); @@ -1371,6 +1461,8 @@ extern void wrap_ImGuiMetricsConfig_SetShowDrawCmdMesh(ImGuiMetricsConfig *ImGui extern bool wrap_ImGuiMetricsConfig_GetShowDrawCmdMesh(ImGuiMetricsConfig *self); extern void wrap_ImGuiMetricsConfig_SetShowDrawCmdBoundingBoxes(ImGuiMetricsConfig *ImGuiMetricsConfigPtr, bool v); extern bool wrap_ImGuiMetricsConfig_GetShowDrawCmdBoundingBoxes(ImGuiMetricsConfig *self); +extern void wrap_ImGuiMetricsConfig_SetShowTextEncodingViewer(ImGuiMetricsConfig *ImGuiMetricsConfigPtr, bool v); +extern bool wrap_ImGuiMetricsConfig_GetShowTextEncodingViewer(ImGuiMetricsConfig *self); extern void wrap_ImGuiMetricsConfig_SetShowAtlasTintedWithTextColor(ImGuiMetricsConfig *ImGuiMetricsConfigPtr, bool v); extern bool wrap_ImGuiMetricsConfig_GetShowAtlasTintedWithTextColor(ImGuiMetricsConfig *self); extern void wrap_ImGuiMetricsConfig_SetShowDockingNodes(ImGuiMetricsConfig *ImGuiMetricsConfigPtr, bool v); @@ -1379,6 +1471,10 @@ extern void wrap_ImGuiMetricsConfig_SetShowWindowsRectsType(ImGuiMetricsConfig * extern int wrap_ImGuiMetricsConfig_GetShowWindowsRectsType(ImGuiMetricsConfig *self); extern void wrap_ImGuiMetricsConfig_SetShowTablesRectsType(ImGuiMetricsConfig *ImGuiMetricsConfigPtr, int v); extern int wrap_ImGuiMetricsConfig_GetShowTablesRectsType(ImGuiMetricsConfig *self); +extern void wrap_ImGuiMetricsConfig_SetHighlightMonitorIdx(ImGuiMetricsConfig *ImGuiMetricsConfigPtr, int v); +extern int wrap_ImGuiMetricsConfig_GetHighlightMonitorIdx(ImGuiMetricsConfig *self); +extern void wrap_ImGuiMetricsConfig_SetHighlightViewportID(ImGuiMetricsConfig *ImGuiMetricsConfigPtr, ImGuiID v); +extern ImGuiID wrap_ImGuiMetricsConfig_GetHighlightViewportID(ImGuiMetricsConfig *self); extern void wrap_ImGuiNavItemData_SetWindow(ImGuiNavItemData *ImGuiNavItemDataPtr, ImGuiWindow* v); extern ImGuiWindow* wrap_ImGuiNavItemData_GetWindow(ImGuiNavItemData *self); extern void wrap_ImGuiNavItemData_SetID(ImGuiNavItemData *ImGuiNavItemDataPtr, ImGuiID v); @@ -1407,14 +1503,16 @@ extern void wrap_ImGuiNextItemData_SetFlags(ImGuiNextItemData *ImGuiNextItemData extern ImGuiNextItemDataFlags wrap_ImGuiNextItemData_GetFlags(ImGuiNextItemData *self); extern void wrap_ImGuiNextItemData_SetItemFlags(ImGuiNextItemData *ImGuiNextItemDataPtr, ImGuiItemFlags v); extern ImGuiItemFlags wrap_ImGuiNextItemData_GetItemFlags(ImGuiNextItemData *self); -extern void wrap_ImGuiNextItemData_SetWidth(ImGuiNextItemData *ImGuiNextItemDataPtr, float v); -extern float wrap_ImGuiNextItemData_GetWidth(ImGuiNextItemData *self); extern void wrap_ImGuiNextItemData_SetSelectionUserData(ImGuiNextItemData *ImGuiNextItemDataPtr, ImGuiSelectionUserData v); extern ImGuiSelectionUserData wrap_ImGuiNextItemData_GetSelectionUserData(ImGuiNextItemData *self); -extern void wrap_ImGuiNextItemData_SetOpenCond(ImGuiNextItemData *ImGuiNextItemDataPtr, ImGuiCond v); -extern ImGuiCond wrap_ImGuiNextItemData_GetOpenCond(ImGuiNextItemData *self); +extern void wrap_ImGuiNextItemData_SetWidth(ImGuiNextItemData *ImGuiNextItemDataPtr, float v); +extern float wrap_ImGuiNextItemData_GetWidth(ImGuiNextItemData *self); +extern void wrap_ImGuiNextItemData_SetShortcut(ImGuiNextItemData *ImGuiNextItemDataPtr, ImGuiKeyChord v); +extern ImGuiKeyChord wrap_ImGuiNextItemData_GetShortcut(ImGuiNextItemData *self); extern void wrap_ImGuiNextItemData_SetOpenVal(ImGuiNextItemData *ImGuiNextItemDataPtr, bool v); extern bool wrap_ImGuiNextItemData_GetOpenVal(ImGuiNextItemData *self); +extern void wrap_ImGuiNextItemData_SetOpenCond(ImGuiNextItemData *ImGuiNextItemDataPtr, ImGuiCond v); +extern ImGuiCond wrap_ImGuiNextItemData_GetOpenCond(ImGuiNextItemData *self); extern void wrap_ImGuiNextWindowData_SetFlags(ImGuiNextWindowData *ImGuiNextWindowDataPtr, ImGuiNextWindowDataFlags v); extern ImGuiNextWindowDataFlags wrap_ImGuiNextWindowData_GetFlags(ImGuiNextWindowData *self); extern void wrap_ImGuiNextWindowData_SetPosCond(ImGuiNextWindowData *ImGuiNextWindowDataPtr, ImGuiCond v); @@ -1435,6 +1533,8 @@ extern void wrap_ImGuiNextWindowData_SetContentSizeVal(ImGuiNextWindowData *ImGu extern ImVec2 wrap_ImGuiNextWindowData_GetContentSizeVal(ImGuiNextWindowData *self); extern void wrap_ImGuiNextWindowData_SetScrollVal(ImGuiNextWindowData *ImGuiNextWindowDataPtr, ImVec2 v); extern ImVec2 wrap_ImGuiNextWindowData_GetScrollVal(ImGuiNextWindowData *self); +extern void wrap_ImGuiNextWindowData_SetChildFlags(ImGuiNextWindowData *ImGuiNextWindowDataPtr, ImGuiChildFlags v); +extern ImGuiChildFlags wrap_ImGuiNextWindowData_GetChildFlags(ImGuiNextWindowData *self); extern void wrap_ImGuiNextWindowData_SetPosUndock(ImGuiNextWindowData *ImGuiNextWindowDataPtr, bool v); extern bool wrap_ImGuiNextWindowData_GetPosUndock(ImGuiNextWindowData *self); extern void wrap_ImGuiNextWindowData_SetCollapsedVal(ImGuiNextWindowData *ImGuiNextWindowDataPtr, bool v); @@ -1605,18 +1705,6 @@ extern void wrap_ImGuiStackSizes_SetSizeOfBeginPopupStack(ImGuiStackSizes *ImGui extern short wrap_ImGuiStackSizes_GetSizeOfBeginPopupStack(ImGuiStackSizes *self); extern void wrap_ImGuiStackSizes_SetSizeOfDisabledStack(ImGuiStackSizes *ImGuiStackSizesPtr, short v); extern short wrap_ImGuiStackSizes_GetSizeOfDisabledStack(ImGuiStackSizes *self); -extern void wrap_ImGuiStackTool_SetLastActiveFrame(ImGuiStackTool *ImGuiStackToolPtr, int v); -extern int wrap_ImGuiStackTool_GetLastActiveFrame(ImGuiStackTool *self); -extern void wrap_ImGuiStackTool_SetStackLevel(ImGuiStackTool *ImGuiStackToolPtr, int v); -extern int wrap_ImGuiStackTool_GetStackLevel(ImGuiStackTool *self); -extern void wrap_ImGuiStackTool_SetQueryId(ImGuiStackTool *ImGuiStackToolPtr, ImGuiID v); -extern ImGuiID wrap_ImGuiStackTool_GetQueryId(ImGuiStackTool *self); -extern void wrap_ImGuiStackTool_SetResults(ImGuiStackTool *ImGuiStackToolPtr, ImVector_ImGuiStackLevelInfo v); -extern ImVector_ImGuiStackLevelInfo wrap_ImGuiStackTool_GetResults(ImGuiStackTool *self); -extern void wrap_ImGuiStackTool_SetCopyToClipboardOnCtrlC(ImGuiStackTool *ImGuiStackToolPtr, bool v); -extern bool wrap_ImGuiStackTool_GetCopyToClipboardOnCtrlC(ImGuiStackTool *self); -extern void wrap_ImGuiStackTool_SetCopyToClipboardLastTime(ImGuiStackTool *ImGuiStackToolPtr, float v); -extern float wrap_ImGuiStackTool_GetCopyToClipboardLastTime(ImGuiStackTool *self); extern void wrap_ImGuiStorage_SetData(ImGuiStorage *ImGuiStoragePtr, ImVector_ImGuiStoragePair v); extern ImVector_ImGuiStoragePair wrap_ImGuiStorage_GetData(ImGuiStorage *self); extern void wrap_ImGuiStoragePair_SetKey(ImGuiStoragePair *ImGuiStoragePairPtr, ImGuiID v); @@ -1681,6 +1769,8 @@ extern void wrap_ImGuiStyle_SetTabMinWidthForCloseButton(ImGuiStyle *ImGuiStyleP extern float wrap_ImGuiStyle_GetTabMinWidthForCloseButton(ImGuiStyle *self); extern void wrap_ImGuiStyle_SetTabBarBorderSize(ImGuiStyle *ImGuiStylePtr, float v); extern float wrap_ImGuiStyle_GetTabBarBorderSize(ImGuiStyle *self); +extern void wrap_ImGuiStyle_SetTableAngledHeadersAngle(ImGuiStyle *ImGuiStylePtr, float v); +extern float wrap_ImGuiStyle_GetTableAngledHeadersAngle(ImGuiStyle *self); extern void wrap_ImGuiStyle_SetColorButtonPosition(ImGuiStyle *ImGuiStylePtr, ImGuiDir v); extern ImGuiDir wrap_ImGuiStyle_GetColorButtonPosition(ImGuiStyle *self); extern void wrap_ImGuiStyle_SetButtonTextAlign(ImGuiStyle *ImGuiStylePtr, ImVec2 v); @@ -1907,6 +1997,10 @@ extern void wrap_ImGuiTable_SetResizeLockMinContentsX2(ImGuiTable *ImGuiTablePtr extern float wrap_ImGuiTable_GetResizeLockMinContentsX2(ImGuiTable *self); extern void wrap_ImGuiTable_SetRefScale(ImGuiTable *ImGuiTablePtr, float v); extern float wrap_ImGuiTable_GetRefScale(ImGuiTable *self); +extern void wrap_ImGuiTable_SetAngledHeadersHeight(ImGuiTable *ImGuiTablePtr, float v); +extern float wrap_ImGuiTable_GetAngledHeadersHeight(ImGuiTable *self); +extern void wrap_ImGuiTable_SetAngledHeadersSlope(ImGuiTable *ImGuiTablePtr, float v); +extern float wrap_ImGuiTable_GetAngledHeadersSlope(ImGuiTable *self); extern void wrap_ImGuiTable_SetOuterRect(ImGuiTable *ImGuiTablePtr, ImRect v); extern ImRect wrap_ImGuiTable_GetOuterRect(ImGuiTable *self); extern void wrap_ImGuiTable_SetInnerRect(ImGuiTable *ImGuiTablePtr, ImRect v); @@ -1951,10 +2045,14 @@ extern void wrap_ImGuiTable_SetColumnsEnabledFixedCount(ImGuiTable *ImGuiTablePt extern ImGuiTableColumnIdx wrap_ImGuiTable_GetColumnsEnabledFixedCount(ImGuiTable *self); extern void wrap_ImGuiTable_SetDeclColumnsCount(ImGuiTable *ImGuiTablePtr, ImGuiTableColumnIdx v); extern ImGuiTableColumnIdx wrap_ImGuiTable_GetDeclColumnsCount(ImGuiTable *self); +extern void wrap_ImGuiTable_SetAngledHeadersCount(ImGuiTable *ImGuiTablePtr, ImGuiTableColumnIdx v); +extern ImGuiTableColumnIdx wrap_ImGuiTable_GetAngledHeadersCount(ImGuiTable *self); extern void wrap_ImGuiTable_SetHoveredColumnBody(ImGuiTable *ImGuiTablePtr, ImGuiTableColumnIdx v); extern ImGuiTableColumnIdx wrap_ImGuiTable_GetHoveredColumnBody(ImGuiTable *self); extern void wrap_ImGuiTable_SetHoveredColumnBorder(ImGuiTable *ImGuiTablePtr, ImGuiTableColumnIdx v); extern ImGuiTableColumnIdx wrap_ImGuiTable_GetHoveredColumnBorder(ImGuiTable *self); +extern void wrap_ImGuiTable_SetHighlightColumnHeader(ImGuiTable *ImGuiTablePtr, ImGuiTableColumnIdx v); +extern ImGuiTableColumnIdx wrap_ImGuiTable_GetHighlightColumnHeader(ImGuiTable *self); extern void wrap_ImGuiTable_SetAutoFitSingleColumn(ImGuiTable *ImGuiTablePtr, ImGuiTableColumnIdx v); extern ImGuiTableColumnIdx wrap_ImGuiTable_GetAutoFitSingleColumn(ImGuiTable *self); extern void wrap_ImGuiTable_SetResizedColumn(ImGuiTable *ImGuiTablePtr, ImGuiTableColumnIdx v); @@ -2005,6 +2103,8 @@ extern void wrap_ImGuiTable_SetIsUsingHeaders(ImGuiTable *ImGuiTablePtr, bool v) extern bool wrap_ImGuiTable_GetIsUsingHeaders(ImGuiTable *self); extern void wrap_ImGuiTable_SetIsContextPopupOpen(ImGuiTable *ImGuiTablePtr, bool v); extern bool wrap_ImGuiTable_GetIsContextPopupOpen(ImGuiTable *self); +extern void wrap_ImGuiTable_SetDisableDefaultContextMenu(ImGuiTable *ImGuiTablePtr, bool v); +extern bool wrap_ImGuiTable_GetDisableDefaultContextMenu(ImGuiTable *self); extern void wrap_ImGuiTable_SetIsSettingsRequestLoad(ImGuiTable *ImGuiTablePtr, bool v); extern bool wrap_ImGuiTable_GetIsSettingsRequestLoad(ImGuiTable *self); extern void wrap_ImGuiTable_SetIsSettingsDirty(ImGuiTable *ImGuiTablePtr, bool v); @@ -2019,6 +2119,10 @@ extern void wrap_ImGuiTable_SetIsUnfrozenRows(ImGuiTable *ImGuiTablePtr, bool v) extern bool wrap_ImGuiTable_GetIsUnfrozenRows(ImGuiTable *self); extern void wrap_ImGuiTable_SetIsDefaultSizingPolicy(ImGuiTable *ImGuiTablePtr, bool v); extern bool wrap_ImGuiTable_GetIsDefaultSizingPolicy(ImGuiTable *self); +extern void wrap_ImGuiTable_SetIsActiveIdAliveBeforeTable(ImGuiTable *ImGuiTablePtr, bool v); +extern bool wrap_ImGuiTable_GetIsActiveIdAliveBeforeTable(ImGuiTable *self); +extern void wrap_ImGuiTable_SetIsActiveIdInTable(ImGuiTable *ImGuiTablePtr, bool v); +extern bool wrap_ImGuiTable_GetIsActiveIdInTable(ImGuiTable *self); extern void wrap_ImGuiTable_SetHasScrollbarYCurr(ImGuiTable *ImGuiTablePtr, bool v); extern bool wrap_ImGuiTable_GetHasScrollbarYCurr(ImGuiTable *self); extern void wrap_ImGuiTable_SetHasScrollbarYPrev(ImGuiTable *ImGuiTablePtr, bool v); @@ -2141,8 +2245,8 @@ extern void wrap_ImGuiTableInstanceData_SetTableInstanceID(ImGuiTableInstanceDat extern ImGuiID wrap_ImGuiTableInstanceData_GetTableInstanceID(ImGuiTableInstanceData *self); extern void wrap_ImGuiTableInstanceData_SetLastOuterHeight(ImGuiTableInstanceData *ImGuiTableInstanceDataPtr, float v); extern float wrap_ImGuiTableInstanceData_GetLastOuterHeight(ImGuiTableInstanceData *self); -extern void wrap_ImGuiTableInstanceData_SetLastFirstRowHeight(ImGuiTableInstanceData *ImGuiTableInstanceDataPtr, float v); -extern float wrap_ImGuiTableInstanceData_GetLastFirstRowHeight(ImGuiTableInstanceData *self); +extern void wrap_ImGuiTableInstanceData_SetLastTopHeadersRowHeight(ImGuiTableInstanceData *ImGuiTableInstanceDataPtr, float v); +extern float wrap_ImGuiTableInstanceData_GetLastTopHeadersRowHeight(ImGuiTableInstanceData *self); extern void wrap_ImGuiTableInstanceData_SetLastFrozenHeight(ImGuiTableInstanceData *ImGuiTableInstanceDataPtr, float v); extern float wrap_ImGuiTableInstanceData_GetLastFrozenHeight(ImGuiTableInstanceData *self); extern void wrap_ImGuiTableInstanceData_SetHoveredRowLast(ImGuiTableInstanceData *ImGuiTableInstanceDataPtr, int v); @@ -2171,6 +2275,8 @@ extern void wrap_ImGuiTableTempData_SetTableIndex(ImGuiTableTempData *ImGuiTable extern int wrap_ImGuiTableTempData_GetTableIndex(ImGuiTableTempData *self); extern void wrap_ImGuiTableTempData_SetLastTimeActive(ImGuiTableTempData *ImGuiTableTempDataPtr, float v); extern float wrap_ImGuiTableTempData_GetLastTimeActive(ImGuiTableTempData *self); +extern void wrap_ImGuiTableTempData_SetAngledHeadersExtraWidth(ImGuiTableTempData *ImGuiTableTempDataPtr, float v); +extern float wrap_ImGuiTableTempData_GetAngledHeadersExtraWidth(ImGuiTableTempData *self); extern void wrap_ImGuiTableTempData_SetUserOuterSize(ImGuiTableTempData *ImGuiTableTempDataPtr, ImVec2 v); extern ImVec2 wrap_ImGuiTableTempData_GetUserOuterSize(ImGuiTableTempData *self); extern void wrap_ImGuiTableTempData_SetDrawSplitter(ImGuiTableTempData *ImGuiTableTempDataPtr, ImDrawListSplitter v); @@ -2319,6 +2425,8 @@ extern void wrap_ImGuiWindow_SetFlags(ImGuiWindow *ImGuiWindowPtr, ImGuiWindowFl extern ImGuiWindowFlags wrap_ImGuiWindow_GetFlags(ImGuiWindow *self); extern void wrap_ImGuiWindow_SetFlagsPreviousFrame(ImGuiWindow *ImGuiWindowPtr, ImGuiWindowFlags v); extern ImGuiWindowFlags wrap_ImGuiWindow_GetFlagsPreviousFrame(ImGuiWindow *self); +extern void wrap_ImGuiWindow_SetChildFlags(ImGuiWindow *ImGuiWindowPtr, ImGuiChildFlags v); +extern ImGuiChildFlags wrap_ImGuiWindow_GetChildFlags(ImGuiWindow *self); extern void wrap_ImGuiWindow_SetWindowClass(ImGuiWindow *ImGuiWindowPtr, ImGuiWindowClass v); extern ImGuiWindowClass wrap_ImGuiWindow_GetWindowClass(ImGuiWindow *self); extern void wrap_ImGuiWindow_SetViewport(ImGuiWindow *ImGuiWindowPtr, ImGuiViewportP* v); @@ -2407,6 +2515,8 @@ extern void wrap_ImGuiWindow_SetIsExplicitChild(ImGuiWindow *ImGuiWindowPtr, boo extern bool wrap_ImGuiWindow_GetIsExplicitChild(ImGuiWindow *self); extern void wrap_ImGuiWindow_SetHasCloseButton(ImGuiWindow *ImGuiWindowPtr, bool v); extern bool wrap_ImGuiWindow_GetHasCloseButton(ImGuiWindow *self); +extern void wrap_ImGuiWindow_SetResizeBorderHovered(ImGuiWindow *ImGuiWindowPtr, signed char v); +extern signed char wrap_ImGuiWindow_GetResizeBorderHovered(ImGuiWindow *self); extern void wrap_ImGuiWindow_SetResizeBorderHeld(ImGuiWindow *ImGuiWindowPtr, signed char v); extern signed char wrap_ImGuiWindow_GetResizeBorderHeld(ImGuiWindow *self); extern void wrap_ImGuiWindow_SetBeginCount(ImGuiWindow *ImGuiWindowPtr, short v); @@ -2425,8 +2535,6 @@ extern void wrap_ImGuiWindow_SetAutoFitFramesX(ImGuiWindow *ImGuiWindowPtr, ImS8 extern ImS8 wrap_ImGuiWindow_GetAutoFitFramesX(ImGuiWindow *self); extern void wrap_ImGuiWindow_SetAutoFitFramesY(ImGuiWindow *ImGuiWindowPtr, ImS8 v); extern ImS8 wrap_ImGuiWindow_GetAutoFitFramesY(ImGuiWindow *self); -extern void wrap_ImGuiWindow_SetAutoFitChildAxises(ImGuiWindow *ImGuiWindowPtr, ImS8 v); -extern ImS8 wrap_ImGuiWindow_GetAutoFitChildAxises(ImGuiWindow *self); extern void wrap_ImGuiWindow_SetAutoFitOnlyGrows(ImGuiWindow *ImGuiWindowPtr, bool v); extern bool wrap_ImGuiWindow_GetAutoFitOnlyGrows(ImGuiWindow *self); extern void wrap_ImGuiWindow_SetAutoPosLastDirection(ImGuiWindow *ImGuiWindowPtr, ImGuiDir v); @@ -2509,6 +2617,8 @@ extern void wrap_ImGuiWindow_SetRootWindowForTitleBarHighlight(ImGuiWindow *ImGu extern ImGuiWindow* wrap_ImGuiWindow_GetRootWindowForTitleBarHighlight(ImGuiWindow *self); extern void wrap_ImGuiWindow_SetRootWindowForNav(ImGuiWindow *ImGuiWindowPtr, ImGuiWindow* v); extern ImGuiWindow* wrap_ImGuiWindow_GetRootWindowForNav(ImGuiWindow *self); +extern void wrap_ImGuiWindow_SetParentWindowForFocusRoute(ImGuiWindow *ImGuiWindowPtr, ImGuiWindow* v); +extern ImGuiWindow* wrap_ImGuiWindow_GetParentWindowForFocusRoute(ImGuiWindow *self); extern void wrap_ImGuiWindow_SetNavLastChildNavWindow(ImGuiWindow *ImGuiWindowPtr, ImGuiWindow* v); extern ImGuiWindow* wrap_ImGuiWindow_GetNavLastChildNavWindow(ImGuiWindow *self); extern void wrap_ImGuiWindow_SetNavLastIds(ImGuiWindow *ImGuiWindowPtr, ImGuiID* v); @@ -2551,6 +2661,8 @@ extern void wrap_ImGuiWindowClass_SetClassId(ImGuiWindowClass *ImGuiWindowClassP extern ImGuiID wrap_ImGuiWindowClass_GetClassId(ImGuiWindowClass *self); extern void wrap_ImGuiWindowClass_SetParentViewportId(ImGuiWindowClass *ImGuiWindowClassPtr, ImGuiID v); extern ImGuiID wrap_ImGuiWindowClass_GetParentViewportId(ImGuiWindowClass *self); +extern void wrap_ImGuiWindowClass_SetFocusRouteParentWindowId(ImGuiWindowClass *ImGuiWindowClassPtr, ImGuiID v); +extern ImGuiID wrap_ImGuiWindowClass_GetFocusRouteParentWindowId(ImGuiWindowClass *self); extern void wrap_ImGuiWindowClass_SetViewportFlagsOverrideSet(ImGuiWindowClass *ImGuiWindowClassPtr, ImGuiViewportFlags v); extern ImGuiViewportFlags wrap_ImGuiWindowClass_GetViewportFlagsOverrideSet(ImGuiWindowClass *self); extern void wrap_ImGuiWindowClass_SetViewportFlagsOverrideClear(ImGuiWindowClass *ImGuiWindowClassPtr, ImGuiViewportFlags v); @@ -2583,6 +2695,8 @@ extern void wrap_ImGuiWindowSettings_SetDockOrder(ImGuiWindowSettings *ImGuiWind extern short wrap_ImGuiWindowSettings_GetDockOrder(ImGuiWindowSettings *self); extern void wrap_ImGuiWindowSettings_SetCollapsed(ImGuiWindowSettings *ImGuiWindowSettingsPtr, bool v); extern bool wrap_ImGuiWindowSettings_GetCollapsed(ImGuiWindowSettings *self); +extern void wrap_ImGuiWindowSettings_SetIsChild(ImGuiWindowSettings *ImGuiWindowSettingsPtr, bool v); +extern bool wrap_ImGuiWindowSettings_GetIsChild(ImGuiWindowSettings *self); extern void wrap_ImGuiWindowSettings_SetWantApply(ImGuiWindowSettings *ImGuiWindowSettingsPtr, bool v); extern bool wrap_ImGuiWindowSettings_GetWantApply(ImGuiWindowSettings *self); extern void wrap_ImGuiWindowSettings_SetWantDelete(ImGuiWindowSettings *ImGuiWindowSettingsPtr, bool v); @@ -2657,6 +2771,8 @@ extern void wrap_ImGuiWindowTempData_SetLayoutType(ImGuiWindowTempData *ImGuiWin extern ImGuiLayoutType wrap_ImGuiWindowTempData_GetLayoutType(ImGuiWindowTempData *self); extern void wrap_ImGuiWindowTempData_SetParentLayoutType(ImGuiWindowTempData *ImGuiWindowTempDataPtr, ImGuiLayoutType v); extern ImGuiLayoutType wrap_ImGuiWindowTempData_GetParentLayoutType(ImGuiWindowTempData *self); +extern void wrap_ImGuiWindowTempData_SetModalDimBgColor(ImGuiWindowTempData *ImGuiWindowTempDataPtr, ImU32 v); +extern ImU32 wrap_ImGuiWindowTempData_GetModalDimBgColor(ImGuiWindowTempData *self); extern void wrap_ImGuiWindowTempData_SetItemWidth(ImGuiWindowTempData *ImGuiWindowTempDataPtr, float v); extern float wrap_ImGuiWindowTempData_GetItemWidth(ImGuiWindowTempData *self); extern void wrap_ImGuiWindowTempData_SetTextWrapPos(ImGuiWindowTempData *ImGuiWindowTempDataPtr, float v); diff --git a/cimgui_typedefs.go b/cimgui_typedefs.go index 9b12bb672..b54bdfe3c 100644 --- a/cimgui_typedefs.go +++ b/cimgui_typedefs.go @@ -438,6 +438,40 @@ func newDataVarInfoFromC(cvalue *C.ImGuiDataVarInfo) *DataVarInfo { return &DataVarInfo{CData: cvalue} } +type DebugAllocEntry struct { + CData *C.ImGuiDebugAllocEntry +} + +func (self *DebugAllocEntry) handle() (result *C.ImGuiDebugAllocEntry, fin func()) { + return self.CData, func() {} +} + +func (self DebugAllocEntry) c() (C.ImGuiDebugAllocEntry, func()) { + result, fn := self.handle() + return *result, fn +} + +func newDebugAllocEntryFromC(cvalue *C.ImGuiDebugAllocEntry) *DebugAllocEntry { + return &DebugAllocEntry{CData: cvalue} +} + +type DebugAllocInfo struct { + CData *C.ImGuiDebugAllocInfo +} + +func (self *DebugAllocInfo) handle() (result *C.ImGuiDebugAllocInfo, fin func()) { + return self.CData, func() {} +} + +func (self DebugAllocInfo) c() (C.ImGuiDebugAllocInfo, func()) { + result, fn := self.handle() + return *result, fn +} + +func newDebugAllocInfoFromC(cvalue *C.ImGuiDebugAllocInfo) *DebugAllocInfo { + return &DebugAllocInfo{CData: cvalue} +} + type DockContext struct { CData *C.ImGuiDockContext } @@ -496,6 +530,23 @@ func newDockRequestFromC(cvalue *C.ImGuiDockRequest) *DockRequest { return &DockRequest{CData: cvalue} } +type FocusScopeData struct { + CData *C.ImGuiFocusScopeData +} + +func (self *FocusScopeData) handle() (result *C.ImGuiFocusScopeData, fin func()) { + return self.CData, func() {} +} + +func (self FocusScopeData) c() (C.ImGuiFocusScopeData, func()) { + result, fn := self.handle() + return *result, fn +} + +func newFocusScopeDataFromC(cvalue *C.ImGuiFocusScopeData) *FocusScopeData { + return &FocusScopeData{CData: cvalue} +} + type GroupData struct { CData *C.ImGuiGroupData } @@ -529,6 +580,23 @@ func newIDFromC(cvalue *C.ImGuiID) *ID { return (*ID)((*uint32)(cvalue)) } +type IDStackTool struct { + CData *C.ImGuiIDStackTool +} + +func (self *IDStackTool) handle() (result *C.ImGuiIDStackTool, fin func()) { + return self.CData, func() {} +} + +func (self IDStackTool) c() (C.ImGuiIDStackTool, func()) { + result, fn := self.handle() + return *result, fn +} + +func newIDStackToolFromC(cvalue *C.ImGuiIDStackTool) *IDStackTool { + return &IDStackTool{CData: cvalue} +} + type IO struct { CData *C.ImGuiIO } @@ -1254,23 +1322,6 @@ func newStackSizesFromC(cvalue *C.ImGuiStackSizes) *StackSizes { return &StackSizes{CData: cvalue} } -type StackTool struct { - CData *C.ImGuiStackTool -} - -func (self *StackTool) handle() (result *C.ImGuiStackTool, fin func()) { - return self.CData, func() {} -} - -func (self StackTool) c() (C.ImGuiStackTool, func()) { - result, fn := self.handle() - return *result, fn -} - -func newStackToolFromC(cvalue *C.ImGuiStackTool) *StackTool { - return &StackTool{CData: cvalue} -} - type Storage struct { CData *C.ImGuiStorage } diff --git a/cimgui_wrapper.cpp b/cimgui_wrapper.cpp index cf503cf6a..4bd6a07a7 100644 --- a/cimgui_wrapper.cpp +++ b/cimgui_wrapper.cpp @@ -16,7 +16,7 @@ void wrap_ImFont_RenderTextV(ImFont* self,ImDrawList* draw_list,float size,const uintptr_t wrap_ImGuiDataVarInfo_GetVarPtr(ImGuiDataVarInfo* self,uintptr_t parent) { return (uintptr_t)ImGuiDataVarInfo_GetVarPtr(self,(void*)(uintptr_t)parent); } void wrap_ImGuiInputTextCallbackData_InsertCharsV(ImGuiInputTextCallbackData* self,int pos,const char* text,const int text_len) { ImGuiInputTextCallbackData_InsertChars(self,pos,text,(text_len > 0) ? text + text_len*sizeof(char)-1 : 0); } ImGuiPtrOrIndex* wrap_ImGuiPtrOrIndex_ImGuiPtrOrIndex_Ptr(uintptr_t ptr) { return ImGuiPtrOrIndex_ImGuiPtrOrIndex_Ptr((void*)(uintptr_t)ptr); } -ImGuiStoragePair* wrap_ImGuiStoragePair_ImGuiStoragePair_Ptr(ImGuiID _key,uintptr_t _val_p) { return ImGuiStoragePair_ImGuiStoragePair_Ptr(_key,(void*)(uintptr_t)_val_p); } +ImGuiStoragePair* wrap_ImGuiStoragePair_ImGuiStoragePair_Ptr(ImGuiID _key,uintptr_t _val) { return ImGuiStoragePair_ImGuiStoragePair_Ptr(_key,(void*)(uintptr_t)_val); } uintptr_t wrap_ImGuiStorage_GetVoidPtr(ImGuiStorage* self,ImGuiID key) { return (uintptr_t)ImGuiStorage_GetVoidPtr(self,key); } void** wrap_ImGuiStorage_GetVoidPtrRefV(ImGuiStorage* self,ImGuiID key,uintptr_t default_val) { return ImGuiStorage_GetVoidPtrRef(self,key,(void*)(uintptr_t)default_val); } void wrap_ImGuiStorage_SetVoidPtr(ImGuiStorage* self,ImGuiID key,uintptr_t val) { ImGuiStorage_SetVoidPtr(self,key,(void*)(uintptr_t)val); } @@ -31,6 +31,7 @@ void wrap_igDataTypeApplyOp(ImGuiDataType data_type,int op,uintptr_t output,cons bool wrap_igDataTypeClamp(ImGuiDataType data_type,uintptr_t p_data,const uintptr_t p_min,const uintptr_t p_max) { return igDataTypeClamp(data_type,(void*)(uintptr_t)p_data,(const void*)(uintptr_t)p_min,(const void*)(uintptr_t)p_max); } int wrap_igDataTypeCompare(ImGuiDataType data_type,const uintptr_t arg_1,const uintptr_t arg_2) { return igDataTypeCompare(data_type,(const void*)(uintptr_t)arg_1,(const void*)(uintptr_t)arg_2); } int wrap_igDataTypeFormatString(char* buf,int buf_size,ImGuiDataType data_type,const uintptr_t p_data,const char* format) { return igDataTypeFormatString(buf,buf_size,data_type,(const void*)(uintptr_t)p_data,format); } +void wrap_igDebugAllocHook(ImGuiDebugAllocInfo* info,int frame_count,uintptr_t ptr,size_t size) { igDebugAllocHook(info,frame_count,(void*)(uintptr_t)ptr,size); } void wrap_igDebugHookIdInfo(ImGuiID id,ImGuiDataType data_type,const uintptr_t data_id,const uintptr_t data_id_end) { igDebugHookIdInfo(id,data_type,(const void*)(uintptr_t)data_id,(const void*)(uintptr_t)data_id_end); } void wrap_igDebugLog(const char* fmt) { igDebugLog(fmt); } bool wrap_igDragBehavior(ImGuiID id,ImGuiDataType data_type,uintptr_t p_v,float v_speed,const uintptr_t p_min,const uintptr_t p_max,const char* format,ImGuiSliderFlags flags) { return igDragBehavior(id,data_type,(void*)(uintptr_t)p_v,v_speed,(const void*)(uintptr_t)p_min,(const void*)(uintptr_t)p_max,format,flags); } @@ -150,9 +151,8 @@ ImGuiID wrap_ImGuiWindow_GetID_Str(ImGuiWindow* self,const char* str) { return I const ImGuiPayload* wrap_igAcceptDragDropPayload(const char* type) { return igAcceptDragDropPayload(type,0); } bool wrap_igArrowButtonEx(const char* str_id,ImGuiDir dir,ImVec2 size_arg) { return igArrowButtonEx(str_id,dir,size_arg,0); } bool wrap_igBegin(const char* name) { return igBegin(name,0,0); } -bool wrap_igBeginChildFrame(ImGuiID id,const ImVec2 size) { return igBeginChildFrame(id,size,0); } -bool wrap_igBeginChild_ID(ImGuiID id) { return igBeginChild_ID(id,(ImVec2){.x=0, .y=0},false,0); } -bool wrap_igBeginChild_Str(const char* str_id) { return igBeginChild_Str(str_id,(ImVec2){.x=0, .y=0},false,0); } +bool wrap_igBeginChild_ID(ImGuiID id) { return igBeginChild_ID(id,(ImVec2){.x=0, .y=0},0,0); } +bool wrap_igBeginChild_Str(const char* str_id) { return igBeginChild_Str(str_id,(ImVec2){.x=0, .y=0},0,0); } void wrap_igBeginColumns(const char* str_id,int count) { igBeginColumns(str_id,count,0); } bool wrap_igBeginCombo(const char* label,const char* preview_value) { return igBeginCombo(label,preview_value,0); } void wrap_igBeginDisabled() { igBeginDisabled(true); } @@ -210,6 +210,7 @@ void wrap_igErrorCheckEndWindowRecover(ImGuiErrorLogCallback log_callback) { wra const char* wrap_igFindRenderedTextEnd(const char* text,const int text_len) { return wrap_igFindRenderedTextEndV(text,text_len); } void wrap_igFocusWindow(ImGuiWindow* window) { igFocusWindow(window,0); } ImU32 wrap_igGetColorU32_Col(ImGuiCol idx) { return igGetColorU32_Col(idx,1.0f); } +ImU32 wrap_igGetColorU32_U32(ImU32 col) { return igGetColorU32_U32(col,1.0f); } float wrap_igGetColumnOffset() { return igGetColumnOffset(-1); } float wrap_igGetColumnWidth() { return igGetColumnWidth(-1); } void wrap_igGetMouseDragDelta(ImVec2* pOut) { igGetMouseDragDelta(pOut,0,-1.0f); } @@ -218,9 +219,9 @@ uintptr_t wrap_igImFileLoadToMemory(const char* filename,const char* mode) { ret ImGuiID wrap_igImHashData(uintptr_t data,size_t data_size) { return wrap_igImHashDataV(data,data_size,0); } ImGuiID wrap_igImHashStr(const char* data) { return igImHashStr(data,0,0); } int wrap_igImTextStrFromUtf8(ImWchar* out_buf,int out_buf_size,const char* in_text,const char* in_text_end) { return igImTextStrFromUtf8(out_buf,out_buf_size,in_text,in_text_end,0); } -void wrap_igImage(ImTextureID user_texture_id,const ImVec2 size) { igImage(user_texture_id,size,(ImVec2){.x=0, .y=0},(ImVec2){.x=1, .y=1},(ImVec4){.x=1, .y=1, .z=1, .w=1},(ImVec4){.x=0, .y=0, .z=0, .w=0}); } -bool wrap_igImageButton(const char* str_id,ImTextureID user_texture_id,const ImVec2 size) { return igImageButton(str_id,user_texture_id,size,(ImVec2){.x=0, .y=0},(ImVec2){.x=1, .y=1},(ImVec4){.x=0, .y=0, .z=0, .w=0},(ImVec4){.x=1, .y=1, .z=1, .w=1}); } -bool wrap_igImageButtonEx(ImGuiID id,ImTextureID texture_id,const ImVec2 size,const ImVec2 uv0,const ImVec2 uv1,const ImVec4 bg_col,const ImVec4 tint_col) { return igImageButtonEx(id,texture_id,size,uv0,uv1,bg_col,tint_col,0); } +void wrap_igImage(ImTextureID user_texture_id,const ImVec2 image_size) { igImage(user_texture_id,image_size,(ImVec2){.x=0, .y=0},(ImVec2){.x=1, .y=1},(ImVec4){.x=1, .y=1, .z=1, .w=1},(ImVec4){.x=0, .y=0, .z=0, .w=0}); } +bool wrap_igImageButton(const char* str_id,ImTextureID user_texture_id,const ImVec2 image_size) { return igImageButton(str_id,user_texture_id,image_size,(ImVec2){.x=0, .y=0},(ImVec2){.x=1, .y=1},(ImVec4){.x=0, .y=0, .z=0, .w=0},(ImVec4){.x=1, .y=1, .z=1, .w=1}); } +bool wrap_igImageButtonEx(ImGuiID id,ImTextureID texture_id,const ImVec2 image_size,const ImVec2 uv0,const ImVec2 uv1,const ImVec4 bg_col,const ImVec4 tint_col) { return igImageButtonEx(id,texture_id,image_size,uv0,uv1,bg_col,tint_col,0); } void wrap_igIndent() { igIndent(0.0f); } bool wrap_igInputDouble(const char* label,double* v) { return igInputDouble(label,v,0.0,0.0,"%.6f",0); } bool wrap_igInputFloat(const char* label,float* v) { return igInputFloat(label,v,0.0f,0.0f,"%.3f",0); } @@ -240,7 +241,7 @@ bool wrap_igInputTextWithHint(const char* label,const char* hint,char* buf,size_ bool wrap_igInvisibleButton(const char* str_id,const ImVec2 size) { return igInvisibleButton(str_id,size,0); } bool wrap_igIsItemClicked() { return igIsItemClicked(0); } bool wrap_igIsItemHovered() { return igIsItemHovered(0); } -bool wrap_igIsKeyPressedMap(ImGuiKey key) { return igIsKeyPressedMap(key,true); } +bool wrap_igIsKeyChordPressed_ID(ImGuiKeyChord key_chord,ImGuiID owner_id) { return igIsKeyChordPressed_ID(key_chord,owner_id,0); } bool wrap_igIsKeyPressed_Bool(ImGuiKey key) { return igIsKeyPressed_Bool(key,true); } bool wrap_igIsKeyPressed_ID(ImGuiKey key,ImGuiID owner_id) { return igIsKeyPressed_ID(key,owner_id,0); } bool wrap_igIsMouseClicked_Bool(ImGuiMouseButton button) { return igIsMouseClicked_Bool(button,false); } @@ -280,7 +281,7 @@ void wrap_igRenderArrow(ImDrawList* draw_list,ImVec2 pos,ImU32 col,ImGuiDir dir) void wrap_igRenderColorRectWithAlphaCheckerboard(ImDrawList* draw_list,ImVec2 p_min,ImVec2 p_max,ImU32 fill_col,float grid_step,ImVec2 grid_off) { igRenderColorRectWithAlphaCheckerboard(draw_list,p_min,p_max,fill_col,grid_step,grid_off,0.0f,0); } void wrap_igRenderFrame(ImVec2 p_min,ImVec2 p_max,ImU32 fill_col) { igRenderFrame(p_min,p_max,fill_col,true,0.0f); } void wrap_igRenderFrameBorder(ImVec2 p_min,ImVec2 p_max) { igRenderFrameBorder(p_min,p_max,0.0f); } -void wrap_igRenderNavHighlight(const ImRect bb,ImGuiID id) { igRenderNavHighlight(bb,id,ImGuiNavHighlightFlags_TypeDefault); } +void wrap_igRenderNavHighlight(const ImRect bb,ImGuiID id) { igRenderNavHighlight(bb,id,ImGuiNavHighlightFlags_None); } void wrap_igRenderPlatformWindowsDefault() { wrap_igRenderPlatformWindowsDefaultV(0,0); } void wrap_igRenderText(ImVec2 pos,const char* text,const int text_len) { wrap_igRenderTextV(pos,text,text_len,true); } void wrap_igRenderTextClipped(const ImVec2 pos_min,const ImVec2 pos_max,const char* text,const int text_len,const ImVec2* text_size_if_known) { wrap_igRenderTextClippedV(pos_min,pos_max,text,text_len,text_size_if_known,(ImVec2){.x=0, .y=0},0); } @@ -310,7 +311,7 @@ void wrap_igSetScrollFromPosX_Float(float local_x) { igSetScrollFromPosX_Float(l void wrap_igSetScrollFromPosY_Float(float local_y) { igSetScrollFromPosY_Float(local_y,0.5f); } void wrap_igSetScrollHereX() { igSetScrollHereX(0.5f); } void wrap_igSetScrollHereY() { igSetScrollHereY(0.5f); } -bool wrap_igSetShortcutRouting(ImGuiKeyChord key_chord) { return igSetShortcutRouting(key_chord,0,0); } +bool wrap_igSetShortcutRouting(ImGuiKeyChord key_chord,ImGuiID owner_id) { return igSetShortcutRouting(key_chord,owner_id,0); } void wrap_igSetWindowCollapsed_Bool(bool collapsed) { igSetWindowCollapsed_Bool(collapsed,0); } void wrap_igSetWindowCollapsed_Str(const char* name,bool collapsed) { igSetWindowCollapsed_Str(name,collapsed,0); } void wrap_igSetWindowCollapsed_WindowPtr(ImGuiWindow* window,bool collapsed) { igSetWindowCollapsed_WindowPtr(window,collapsed,0); } @@ -324,8 +325,8 @@ bool wrap_igShortcut(ImGuiKeyChord key_chord) { return igShortcut(key_chord,0,0) void wrap_igShowAboutWindow() { igShowAboutWindow(0); } void wrap_igShowDebugLogWindow() { igShowDebugLogWindow(0); } void wrap_igShowDemoWindow() { igShowDemoWindow(0); } +void wrap_igShowIDStackToolWindow() { igShowIDStackToolWindow(0); } void wrap_igShowMetricsWindow() { igShowMetricsWindow(0); } -void wrap_igShowStackToolWindow() { igShowStackToolWindow(0); } void wrap_igShowStyleEditor() { igShowStyleEditor(0); } bool wrap_igSliderAngle(const char* label,float* v_rad) { return igSliderAngle(label,v_rad,-360.0f,+360.0f,"%.0f deg",0); } bool wrap_igSliderFloat(const char* label,float* v,float v_min,float v_max) { return igSliderFloat(label,v,v_min,v_max,"%.3f",0); } @@ -343,6 +344,7 @@ void wrap_igStyleColorsClassic() { igStyleColorsClassic(0); } void wrap_igStyleColorsDark() { igStyleColorsDark(0); } void wrap_igStyleColorsLight() { igStyleColorsLight(0); } bool wrap_igTabItemButton(const char* label) { return igTabItemButton(label,0); } +void wrap_igTableAngledHeadersRowEx(float angle) { igTableAngledHeadersRowEx(angle,0.0f); } ImGuiTableColumnFlags wrap_igTableGetColumnFlags() { return igTableGetColumnFlags(-1); } const char* wrap_igTableGetColumnName_Int() { return igTableGetColumnName_Int(-1); } ImGuiID wrap_igTableGetColumnResizeID(ImGuiTable* table,int column_n) { return igTableGetColumnResizeID(table,column_n,0); } diff --git a/cimgui_wrapper.h b/cimgui_wrapper.h index aae8cdfa0..359770198 100644 --- a/cimgui_wrapper.h +++ b/cimgui_wrapper.h @@ -21,7 +21,7 @@ extern void wrap_ImFont_RenderTextV(ImFont* self,ImDrawList* draw_list,float siz extern uintptr_t wrap_ImGuiDataVarInfo_GetVarPtr(ImGuiDataVarInfo* self,uintptr_t parent); extern void wrap_ImGuiInputTextCallbackData_InsertCharsV(ImGuiInputTextCallbackData* self,int pos,const char* text,const int text_len); extern ImGuiPtrOrIndex* wrap_ImGuiPtrOrIndex_ImGuiPtrOrIndex_Ptr(uintptr_t ptr); -extern ImGuiStoragePair* wrap_ImGuiStoragePair_ImGuiStoragePair_Ptr(ImGuiID _key,uintptr_t _val_p); +extern ImGuiStoragePair* wrap_ImGuiStoragePair_ImGuiStoragePair_Ptr(ImGuiID _key,uintptr_t _val); extern uintptr_t wrap_ImGuiStorage_GetVoidPtr(ImGuiStorage* self,ImGuiID key); extern void** wrap_ImGuiStorage_GetVoidPtrRefV(ImGuiStorage* self,ImGuiID key,uintptr_t default_val); extern void wrap_ImGuiStorage_SetVoidPtr(ImGuiStorage* self,ImGuiID key,uintptr_t val); @@ -36,6 +36,7 @@ extern void wrap_igDataTypeApplyOp(ImGuiDataType data_type,int op,uintptr_t outp extern bool wrap_igDataTypeClamp(ImGuiDataType data_type,uintptr_t p_data,const uintptr_t p_min,const uintptr_t p_max); extern int wrap_igDataTypeCompare(ImGuiDataType data_type,const uintptr_t arg_1,const uintptr_t arg_2); extern int wrap_igDataTypeFormatString(char* buf,int buf_size,ImGuiDataType data_type,const uintptr_t p_data,const char* format); +extern void wrap_igDebugAllocHook(ImGuiDebugAllocInfo* info,int frame_count,uintptr_t ptr,size_t size); extern void wrap_igDebugHookIdInfo(ImGuiID id,ImGuiDataType data_type,const uintptr_t data_id,const uintptr_t data_id_end); extern void wrap_igDebugLog(const char* fmt); extern bool wrap_igDragBehavior(ImGuiID id,ImGuiDataType data_type,uintptr_t p_v,float v_speed,const uintptr_t p_min,const uintptr_t p_max,const char* format,ImGuiSliderFlags flags); @@ -155,7 +156,6 @@ extern ImGuiID wrap_ImGuiWindow_GetID_Str(ImGuiWindow* self,const char* str); extern const ImGuiPayload* wrap_igAcceptDragDropPayload(const char* type); extern bool wrap_igArrowButtonEx(const char* str_id,ImGuiDir dir,ImVec2 size_arg); extern bool wrap_igBegin(const char* name); -extern bool wrap_igBeginChildFrame(ImGuiID id,const ImVec2 size); extern bool wrap_igBeginChild_ID(ImGuiID id); extern bool wrap_igBeginChild_Str(const char* str_id); extern void wrap_igBeginColumns(const char* str_id,int count); @@ -215,6 +215,7 @@ extern void wrap_igErrorCheckEndWindowRecover(ImGuiErrorLogCallback log_callback extern const char* wrap_igFindRenderedTextEnd(const char* text,const int text_len); extern void wrap_igFocusWindow(ImGuiWindow* window); extern ImU32 wrap_igGetColorU32_Col(ImGuiCol idx); +extern ImU32 wrap_igGetColorU32_U32(ImU32 col); extern float wrap_igGetColumnOffset(); extern float wrap_igGetColumnWidth(); extern void wrap_igGetMouseDragDelta(ImVec2* pOut); @@ -223,9 +224,9 @@ extern uintptr_t wrap_igImFileLoadToMemory(const char* filename,const char* mode extern ImGuiID wrap_igImHashData(uintptr_t data,size_t data_size); extern ImGuiID wrap_igImHashStr(const char* data); extern int wrap_igImTextStrFromUtf8(ImWchar* out_buf,int out_buf_size,const char* in_text,const char* in_text_end); -extern void wrap_igImage(ImTextureID user_texture_id,const ImVec2 size); -extern bool wrap_igImageButton(const char* str_id,ImTextureID user_texture_id,const ImVec2 size); -extern bool wrap_igImageButtonEx(ImGuiID id,ImTextureID texture_id,const ImVec2 size,const ImVec2 uv0,const ImVec2 uv1,const ImVec4 bg_col,const ImVec4 tint_col); +extern void wrap_igImage(ImTextureID user_texture_id,const ImVec2 image_size); +extern bool wrap_igImageButton(const char* str_id,ImTextureID user_texture_id,const ImVec2 image_size); +extern bool wrap_igImageButtonEx(ImGuiID id,ImTextureID texture_id,const ImVec2 image_size,const ImVec2 uv0,const ImVec2 uv1,const ImVec4 bg_col,const ImVec4 tint_col); extern void wrap_igIndent(); extern bool wrap_igInputDouble(const char* label,double* v); extern bool wrap_igInputFloat(const char* label,float* v); @@ -245,7 +246,7 @@ extern bool wrap_igInputTextWithHint(const char* label,const char* hint,char* bu extern bool wrap_igInvisibleButton(const char* str_id,const ImVec2 size); extern bool wrap_igIsItemClicked(); extern bool wrap_igIsItemHovered(); -extern bool wrap_igIsKeyPressedMap(ImGuiKey key); +extern bool wrap_igIsKeyChordPressed_ID(ImGuiKeyChord key_chord,ImGuiID owner_id); extern bool wrap_igIsKeyPressed_Bool(ImGuiKey key); extern bool wrap_igIsKeyPressed_ID(ImGuiKey key,ImGuiID owner_id); extern bool wrap_igIsMouseClicked_Bool(ImGuiMouseButton button); @@ -315,7 +316,7 @@ extern void wrap_igSetScrollFromPosX_Float(float local_x); extern void wrap_igSetScrollFromPosY_Float(float local_y); extern void wrap_igSetScrollHereX(); extern void wrap_igSetScrollHereY(); -extern bool wrap_igSetShortcutRouting(ImGuiKeyChord key_chord); +extern bool wrap_igSetShortcutRouting(ImGuiKeyChord key_chord,ImGuiID owner_id); extern void wrap_igSetWindowCollapsed_Bool(bool collapsed); extern void wrap_igSetWindowCollapsed_Str(const char* name,bool collapsed); extern void wrap_igSetWindowCollapsed_WindowPtr(ImGuiWindow* window,bool collapsed); @@ -329,8 +330,8 @@ extern bool wrap_igShortcut(ImGuiKeyChord key_chord); extern void wrap_igShowAboutWindow(); extern void wrap_igShowDebugLogWindow(); extern void wrap_igShowDemoWindow(); +extern void wrap_igShowIDStackToolWindow(); extern void wrap_igShowMetricsWindow(); -extern void wrap_igShowStackToolWindow(); extern void wrap_igShowStyleEditor(); extern bool wrap_igSliderAngle(const char* label,float* v_rad); extern bool wrap_igSliderFloat(const char* label,float* v,float v_min,float v_max); @@ -348,6 +349,7 @@ extern void wrap_igStyleColorsClassic(); extern void wrap_igStyleColorsDark(); extern void wrap_igStyleColorsLight(); extern bool wrap_igTabItemButton(const char* label); +extern void wrap_igTableAngledHeadersRowEx(float angle); extern ImGuiTableColumnFlags wrap_igTableGetColumnFlags(); extern const char* wrap_igTableGetColumnName_Int(); extern ImGuiID wrap_igTableGetColumnResizeID(ImGuiTable* table,int column_n); diff --git a/cimplot_enums.go b/cimplot_enums.go index 9ea412b02..a29748de8 100644 --- a/cimplot_enums.go +++ b/cimplot_enums.go @@ -317,8 +317,9 @@ const ( type PlotPieChartFlags int32 const ( - PlotPieChartFlagsNone = 0 - PlotPieChartFlagsNormalize = 1024 + PlotPieChartFlagsNone = 0 + PlotPieChartFlagsNormalize = 1024 + PlotPieChartFlagsIgnoreHidden = 2048 ) // original name: ImPlotScale_ diff --git a/cimplot_funcs.go b/cimplot_funcs.go index 677ed4432..2fa1c4dfb 100644 --- a/cimplot_funcs.go +++ b/cimplot_funcs.go @@ -6164,24 +6164,24 @@ func PlotPlotLinedoublePtrdoublePtrV(label_id string, xs *[]float64, ys *[]float } } -// PlotPlotPieChartFloatPtrV parameter default value hint: +// PlotPlotPieChartFloatPtrStrV parameter default value hint: // label_fmt: "%.1f" // angle0: 90 // flags: 0 -func PlotPlotPieChartFloatPtrV(label_ids []string, values []float32, count int32, x float64, y float64, radius float64, label_fmt string, angle0 float64, flags PlotPieChartFlags) { +func PlotPlotPieChartFloatPtrStrV(label_ids []string, values []float32, count int32, x float64, y float64, radius float64, label_fmt string, angle0 float64, flags PlotPieChartFlags) { label_idsArg, label_idsFin := WrapStringList(label_ids) label_fmtArg, label_fmtFin := WrapString(label_fmt) - C.ImPlot_PlotPieChart_FloatPtr(label_idsArg, (*C.float)(&(values[0])), C.int(count), C.double(x), C.double(y), C.double(radius), label_fmtArg, C.double(angle0), C.ImPlotPieChartFlags(flags)) + C.ImPlot_PlotPieChart_FloatPtrStr(label_idsArg, (*C.float)(&(values[0])), C.int(count), C.double(x), C.double(y), C.double(radius), label_fmtArg, C.double(angle0), C.ImPlotPieChartFlags(flags)) label_idsFin() label_fmtFin() } -// PlotPlotPieChartS16PtrV parameter default value hint: +// PlotPlotPieChartS16PtrStrV parameter default value hint: // label_fmt: "%.1f" // angle0: 90 // flags: 0 -func PlotPlotPieChartS16PtrV(label_ids []string, values *[]int, count int32, x float64, y float64, radius float64, label_fmt string, angle0 float64, flags PlotPieChartFlags) { +func PlotPlotPieChartS16PtrStrV(label_ids []string, values *[]int, count int32, x float64, y float64, radius float64, label_fmt string, angle0 float64, flags PlotPieChartFlags) { label_idsArg, label_idsFin := WrapStringList(label_ids) valuesArg := make([]C.ImS16, len(*values)) for i, valuesV := range *values { @@ -6189,7 +6189,7 @@ func PlotPlotPieChartS16PtrV(label_ids []string, values *[]int, count int32, x f } label_fmtArg, label_fmtFin := WrapString(label_fmt) - C.ImPlot_PlotPieChart_S16Ptr(label_idsArg, (*C.ImS16)(&valuesArg[0]), C.int(count), C.double(x), C.double(y), C.double(radius), label_fmtArg, C.double(angle0), C.ImPlotPieChartFlags(flags)) + C.ImPlot_PlotPieChart_S16PtrStr(label_idsArg, (*C.ImS16)(&valuesArg[0]), C.int(count), C.double(x), C.double(y), C.double(radius), label_fmtArg, C.double(angle0), C.ImPlotPieChartFlags(flags)) label_idsFin() @@ -6200,11 +6200,11 @@ func PlotPlotPieChartS16PtrV(label_ids []string, values *[]int, count int32, x f label_fmtFin() } -// PlotPlotPieChartS32PtrV parameter default value hint: +// PlotPlotPieChartS32PtrStrV parameter default value hint: // label_fmt: "%.1f" // angle0: 90 // flags: 0 -func PlotPlotPieChartS32PtrV(label_ids []string, values *[]int32, count int32, x float64, y float64, radius float64, label_fmt string, angle0 float64, flags PlotPieChartFlags) { +func PlotPlotPieChartS32PtrStrV(label_ids []string, values *[]int32, count int32, x float64, y float64, radius float64, label_fmt string, angle0 float64, flags PlotPieChartFlags) { label_idsArg, label_idsFin := WrapStringList(label_ids) valuesArg := make([]C.ImS32, len(*values)) for i, valuesV := range *values { @@ -6212,7 +6212,7 @@ func PlotPlotPieChartS32PtrV(label_ids []string, values *[]int32, count int32, x } label_fmtArg, label_fmtFin := WrapString(label_fmt) - C.ImPlot_PlotPieChart_S32Ptr(label_idsArg, (*C.ImS32)(&valuesArg[0]), C.int(count), C.double(x), C.double(y), C.double(radius), label_fmtArg, C.double(angle0), C.ImPlotPieChartFlags(flags)) + C.ImPlot_PlotPieChart_S32PtrStr(label_idsArg, (*C.ImS32)(&valuesArg[0]), C.int(count), C.double(x), C.double(y), C.double(radius), label_fmtArg, C.double(angle0), C.ImPlotPieChartFlags(flags)) label_idsFin() @@ -6223,24 +6223,24 @@ func PlotPlotPieChartS32PtrV(label_ids []string, values *[]int32, count int32, x label_fmtFin() } -// PlotPlotPieChartS64PtrV parameter default value hint: +// PlotPlotPieChartS64PtrStrV parameter default value hint: // label_fmt: "%.1f" // angle0: 90 // flags: 0 -func PlotPlotPieChartS64PtrV(label_ids []string, values []int64, count int32, x float64, y float64, radius float64, label_fmt string, angle0 float64, flags PlotPieChartFlags) { +func PlotPlotPieChartS64PtrStrV(label_ids []string, values []int64, count int32, x float64, y float64, radius float64, label_fmt string, angle0 float64, flags PlotPieChartFlags) { label_idsArg, label_idsFin := WrapStringList(label_ids) label_fmtArg, label_fmtFin := WrapString(label_fmt) - C.ImPlot_PlotPieChart_S64Ptr(label_idsArg, (*C.longlong)(&(values[0])), C.int(count), C.double(x), C.double(y), C.double(radius), label_fmtArg, C.double(angle0), C.ImPlotPieChartFlags(flags)) + C.ImPlot_PlotPieChart_S64PtrStr(label_idsArg, (*C.longlong)(&(values[0])), C.int(count), C.double(x), C.double(y), C.double(radius), label_fmtArg, C.double(angle0), C.ImPlotPieChartFlags(flags)) label_idsFin() label_fmtFin() } -// PlotPlotPieChartS8PtrV parameter default value hint: +// PlotPlotPieChartS8PtrStrV parameter default value hint: // label_fmt: "%.1f" // angle0: 90 // flags: 0 -func PlotPlotPieChartS8PtrV(label_ids []string, values *[]int8, count int32, x float64, y float64, radius float64, label_fmt string, angle0 float64, flags PlotPieChartFlags) { +func PlotPlotPieChartS8PtrStrV(label_ids []string, values *[]int8, count int32, x float64, y float64, radius float64, label_fmt string, angle0 float64, flags PlotPieChartFlags) { label_idsArg, label_idsFin := WrapStringList(label_ids) valuesArg := make([]C.ImS8, len(*values)) for i, valuesV := range *values { @@ -6248,7 +6248,7 @@ func PlotPlotPieChartS8PtrV(label_ids []string, values *[]int8, count int32, x f } label_fmtArg, label_fmtFin := WrapString(label_fmt) - C.ImPlot_PlotPieChart_S8Ptr(label_idsArg, (*C.ImS8)(&valuesArg[0]), C.int(count), C.double(x), C.double(y), C.double(radius), label_fmtArg, C.double(angle0), C.ImPlotPieChartFlags(flags)) + C.ImPlot_PlotPieChart_S8PtrStr(label_idsArg, (*C.ImS8)(&valuesArg[0]), C.int(count), C.double(x), C.double(y), C.double(radius), label_fmtArg, C.double(angle0), C.ImPlotPieChartFlags(flags)) label_idsFin() @@ -6259,11 +6259,11 @@ func PlotPlotPieChartS8PtrV(label_ids []string, values *[]int8, count int32, x f label_fmtFin() } -// PlotPlotPieChartU16PtrV parameter default value hint: +// PlotPlotPieChartU16PtrStrV parameter default value hint: // label_fmt: "%.1f" // angle0: 90 // flags: 0 -func PlotPlotPieChartU16PtrV(label_ids []string, values *[]uint16, count int32, x float64, y float64, radius float64, label_fmt string, angle0 float64, flags PlotPieChartFlags) { +func PlotPlotPieChartU16PtrStrV(label_ids []string, values *[]uint16, count int32, x float64, y float64, radius float64, label_fmt string, angle0 float64, flags PlotPieChartFlags) { label_idsArg, label_idsFin := WrapStringList(label_ids) valuesArg := make([]C.ImU16, len(*values)) for i, valuesV := range *values { @@ -6271,7 +6271,7 @@ func PlotPlotPieChartU16PtrV(label_ids []string, values *[]uint16, count int32, } label_fmtArg, label_fmtFin := WrapString(label_fmt) - C.ImPlot_PlotPieChart_U16Ptr(label_idsArg, (*C.ImU16)(&valuesArg[0]), C.int(count), C.double(x), C.double(y), C.double(radius), label_fmtArg, C.double(angle0), C.ImPlotPieChartFlags(flags)) + C.ImPlot_PlotPieChart_U16PtrStr(label_idsArg, (*C.ImU16)(&valuesArg[0]), C.int(count), C.double(x), C.double(y), C.double(radius), label_fmtArg, C.double(angle0), C.ImPlotPieChartFlags(flags)) label_idsFin() @@ -6282,11 +6282,11 @@ func PlotPlotPieChartU16PtrV(label_ids []string, values *[]uint16, count int32, label_fmtFin() } -// PlotPlotPieChartU32PtrV parameter default value hint: +// PlotPlotPieChartU32PtrStrV parameter default value hint: // label_fmt: "%.1f" // angle0: 90 // flags: 0 -func PlotPlotPieChartU32PtrV(label_ids []string, values *[]uint32, count int32, x float64, y float64, radius float64, label_fmt string, angle0 float64, flags PlotPieChartFlags) { +func PlotPlotPieChartU32PtrStrV(label_ids []string, values *[]uint32, count int32, x float64, y float64, radius float64, label_fmt string, angle0 float64, flags PlotPieChartFlags) { label_idsArg, label_idsFin := WrapStringList(label_ids) valuesArg := make([]C.ImU32, len(*values)) for i, valuesV := range *values { @@ -6294,7 +6294,7 @@ func PlotPlotPieChartU32PtrV(label_ids []string, values *[]uint32, count int32, } label_fmtArg, label_fmtFin := WrapString(label_fmt) - C.ImPlot_PlotPieChart_U32Ptr(label_idsArg, (*C.ImU32)(&valuesArg[0]), C.int(count), C.double(x), C.double(y), C.double(radius), label_fmtArg, C.double(angle0), C.ImPlotPieChartFlags(flags)) + C.ImPlot_PlotPieChart_U32PtrStr(label_idsArg, (*C.ImU32)(&valuesArg[0]), C.int(count), C.double(x), C.double(y), C.double(radius), label_fmtArg, C.double(angle0), C.ImPlotPieChartFlags(flags)) label_idsFin() @@ -6305,24 +6305,24 @@ func PlotPlotPieChartU32PtrV(label_ids []string, values *[]uint32, count int32, label_fmtFin() } -// PlotPlotPieChartU64PtrV parameter default value hint: +// PlotPlotPieChartU64PtrStrV parameter default value hint: // label_fmt: "%.1f" // angle0: 90 // flags: 0 -func PlotPlotPieChartU64PtrV(label_ids []string, values []uint64, count int32, x float64, y float64, radius float64, label_fmt string, angle0 float64, flags PlotPieChartFlags) { +func PlotPlotPieChartU64PtrStrV(label_ids []string, values []uint64, count int32, x float64, y float64, radius float64, label_fmt string, angle0 float64, flags PlotPieChartFlags) { label_idsArg, label_idsFin := WrapStringList(label_ids) label_fmtArg, label_fmtFin := WrapString(label_fmt) - C.ImPlot_PlotPieChart_U64Ptr(label_idsArg, (*C.ulonglong)(&(values[0])), C.int(count), C.double(x), C.double(y), C.double(radius), label_fmtArg, C.double(angle0), C.ImPlotPieChartFlags(flags)) + C.ImPlot_PlotPieChart_U64PtrStr(label_idsArg, (*C.ulonglong)(&(values[0])), C.int(count), C.double(x), C.double(y), C.double(radius), label_fmtArg, C.double(angle0), C.ImPlotPieChartFlags(flags)) label_idsFin() label_fmtFin() } -// PlotPlotPieChartU8PtrV parameter default value hint: +// PlotPlotPieChartU8PtrStrV parameter default value hint: // label_fmt: "%.1f" // angle0: 90 // flags: 0 -func PlotPlotPieChartU8PtrV(label_ids []string, values *[]byte, count int32, x float64, y float64, radius float64, label_fmt string, angle0 float64, flags PlotPieChartFlags) { +func PlotPlotPieChartU8PtrStrV(label_ids []string, values *[]byte, count int32, x float64, y float64, radius float64, label_fmt string, angle0 float64, flags PlotPieChartFlags) { label_idsArg, label_idsFin := WrapStringList(label_ids) valuesArg := make([]C.ImU8, len(*values)) for i, valuesV := range *values { @@ -6330,7 +6330,7 @@ func PlotPlotPieChartU8PtrV(label_ids []string, values *[]byte, count int32, x f } label_fmtArg, label_fmtFin := WrapString(label_fmt) - C.ImPlot_PlotPieChart_U8Ptr(label_idsArg, (*C.ImU8)(&valuesArg[0]), C.int(count), C.double(x), C.double(y), C.double(radius), label_fmtArg, C.double(angle0), C.ImPlotPieChartFlags(flags)) + C.ImPlot_PlotPieChart_U8PtrStr(label_idsArg, (*C.ImU8)(&valuesArg[0]), C.int(count), C.double(x), C.double(y), C.double(radius), label_fmtArg, C.double(angle0), C.ImPlotPieChartFlags(flags)) label_idsFin() @@ -6341,11 +6341,11 @@ func PlotPlotPieChartU8PtrV(label_ids []string, values *[]byte, count int32, x f label_fmtFin() } -// PlotPlotPieChartdoublePtrV parameter default value hint: +// PlotPlotPieChartdoublePtrStrV parameter default value hint: // label_fmt: "%.1f" // angle0: 90 // flags: 0 -func PlotPlotPieChartdoublePtrV(label_ids []string, values *[]float64, count int32, x float64, y float64, radius float64, label_fmt string, angle0 float64, flags PlotPieChartFlags) { +func PlotPlotPieChartdoublePtrStrV(label_ids []string, values *[]float64, count int32, x float64, y float64, radius float64, label_fmt string, angle0 float64, flags PlotPieChartFlags) { label_idsArg, label_idsFin := WrapStringList(label_ids) valuesArg := make([]C.double, len(*values)) for i, valuesV := range *values { @@ -6353,7 +6353,7 @@ func PlotPlotPieChartdoublePtrV(label_ids []string, values *[]float64, count int } label_fmtArg, label_fmtFin := WrapString(label_fmt) - C.ImPlot_PlotPieChart_doublePtr(label_idsArg, (*C.double)(&valuesArg[0]), C.int(count), C.double(x), C.double(y), C.double(radius), label_fmtArg, C.double(angle0), C.ImPlotPieChartFlags(flags)) + C.ImPlot_PlotPieChart_doublePtrStr(label_idsArg, (*C.double)(&valuesArg[0]), C.int(count), C.double(x), C.double(y), C.double(radius), label_fmtArg, C.double(angle0), C.ImPlotPieChartFlags(flags)) label_idsFin() @@ -11573,21 +11573,21 @@ func PlotPlotLinedoublePtrdoublePtr(label_id string, xs *[]float64, ys *[]float6 } } -func PlotPlotPieChartFloatPtr(label_ids []string, values []float32, count int32, x float64, y float64, radius float64) { +func PlotPlotPieChartFloatPtrStr(label_ids []string, values []float32, count int32, x float64, y float64, radius float64) { label_idsArg, label_idsFin := WrapStringList(label_ids) - C.wrap_ImPlot_PlotPieChart_FloatPtr(label_idsArg, (*C.float)(&(values[0])), C.int(count), C.double(x), C.double(y), C.double(radius)) + C.wrap_ImPlot_PlotPieChart_FloatPtrStr(label_idsArg, (*C.float)(&(values[0])), C.int(count), C.double(x), C.double(y), C.double(radius)) label_idsFin() } -func PlotPlotPieChartS16Ptr(label_ids []string, values *[]int, count int32, x float64, y float64, radius float64) { +func PlotPlotPieChartS16PtrStr(label_ids []string, values *[]int, count int32, x float64, y float64, radius float64) { label_idsArg, label_idsFin := WrapStringList(label_ids) valuesArg := make([]C.ImS16, len(*values)) for i, valuesV := range *values { valuesArg[i] = C.ImS16(valuesV) } - C.wrap_ImPlot_PlotPieChart_S16Ptr(label_idsArg, (*C.ImS16)(&valuesArg[0]), C.int(count), C.double(x), C.double(y), C.double(radius)) + C.wrap_ImPlot_PlotPieChart_S16PtrStr(label_idsArg, (*C.ImS16)(&valuesArg[0]), C.int(count), C.double(x), C.double(y), C.double(radius)) label_idsFin() @@ -11596,14 +11596,14 @@ func PlotPlotPieChartS16Ptr(label_ids []string, values *[]int, count int32, x fl } } -func PlotPlotPieChartS32Ptr(label_ids []string, values *[]int32, count int32, x float64, y float64, radius float64) { +func PlotPlotPieChartS32PtrStr(label_ids []string, values *[]int32, count int32, x float64, y float64, radius float64) { label_idsArg, label_idsFin := WrapStringList(label_ids) valuesArg := make([]C.ImS32, len(*values)) for i, valuesV := range *values { valuesArg[i] = C.ImS32(valuesV) } - C.wrap_ImPlot_PlotPieChart_S32Ptr(label_idsArg, (*C.ImS32)(&valuesArg[0]), C.int(count), C.double(x), C.double(y), C.double(radius)) + C.wrap_ImPlot_PlotPieChart_S32PtrStr(label_idsArg, (*C.ImS32)(&valuesArg[0]), C.int(count), C.double(x), C.double(y), C.double(radius)) label_idsFin() @@ -11612,21 +11612,21 @@ func PlotPlotPieChartS32Ptr(label_ids []string, values *[]int32, count int32, x } } -func PlotPlotPieChartS64Ptr(label_ids []string, values []int64, count int32, x float64, y float64, radius float64) { +func PlotPlotPieChartS64PtrStr(label_ids []string, values []int64, count int32, x float64, y float64, radius float64) { label_idsArg, label_idsFin := WrapStringList(label_ids) - C.wrap_ImPlot_PlotPieChart_S64Ptr(label_idsArg, (*C.longlong)(&(values[0])), C.int(count), C.double(x), C.double(y), C.double(radius)) + C.wrap_ImPlot_PlotPieChart_S64PtrStr(label_idsArg, (*C.longlong)(&(values[0])), C.int(count), C.double(x), C.double(y), C.double(radius)) label_idsFin() } -func PlotPlotPieChartS8Ptr(label_ids []string, values *[]int8, count int32, x float64, y float64, radius float64) { +func PlotPlotPieChartS8PtrStr(label_ids []string, values *[]int8, count int32, x float64, y float64, radius float64) { label_idsArg, label_idsFin := WrapStringList(label_ids) valuesArg := make([]C.ImS8, len(*values)) for i, valuesV := range *values { valuesArg[i] = C.ImS8(valuesV) } - C.wrap_ImPlot_PlotPieChart_S8Ptr(label_idsArg, (*C.ImS8)(&valuesArg[0]), C.int(count), C.double(x), C.double(y), C.double(radius)) + C.wrap_ImPlot_PlotPieChart_S8PtrStr(label_idsArg, (*C.ImS8)(&valuesArg[0]), C.int(count), C.double(x), C.double(y), C.double(radius)) label_idsFin() @@ -11635,14 +11635,14 @@ func PlotPlotPieChartS8Ptr(label_ids []string, values *[]int8, count int32, x fl } } -func PlotPlotPieChartU16Ptr(label_ids []string, values *[]uint16, count int32, x float64, y float64, radius float64) { +func PlotPlotPieChartU16PtrStr(label_ids []string, values *[]uint16, count int32, x float64, y float64, radius float64) { label_idsArg, label_idsFin := WrapStringList(label_ids) valuesArg := make([]C.ImU16, len(*values)) for i, valuesV := range *values { valuesArg[i] = C.ImU16(valuesV) } - C.wrap_ImPlot_PlotPieChart_U16Ptr(label_idsArg, (*C.ImU16)(&valuesArg[0]), C.int(count), C.double(x), C.double(y), C.double(radius)) + C.wrap_ImPlot_PlotPieChart_U16PtrStr(label_idsArg, (*C.ImU16)(&valuesArg[0]), C.int(count), C.double(x), C.double(y), C.double(radius)) label_idsFin() @@ -11651,14 +11651,14 @@ func PlotPlotPieChartU16Ptr(label_ids []string, values *[]uint16, count int32, x } } -func PlotPlotPieChartU32Ptr(label_ids []string, values *[]uint32, count int32, x float64, y float64, radius float64) { +func PlotPlotPieChartU32PtrStr(label_ids []string, values *[]uint32, count int32, x float64, y float64, radius float64) { label_idsArg, label_idsFin := WrapStringList(label_ids) valuesArg := make([]C.ImU32, len(*values)) for i, valuesV := range *values { valuesArg[i] = C.ImU32(valuesV) } - C.wrap_ImPlot_PlotPieChart_U32Ptr(label_idsArg, (*C.ImU32)(&valuesArg[0]), C.int(count), C.double(x), C.double(y), C.double(radius)) + C.wrap_ImPlot_PlotPieChart_U32PtrStr(label_idsArg, (*C.ImU32)(&valuesArg[0]), C.int(count), C.double(x), C.double(y), C.double(radius)) label_idsFin() @@ -11667,21 +11667,21 @@ func PlotPlotPieChartU32Ptr(label_ids []string, values *[]uint32, count int32, x } } -func PlotPlotPieChartU64Ptr(label_ids []string, values []uint64, count int32, x float64, y float64, radius float64) { +func PlotPlotPieChartU64PtrStr(label_ids []string, values []uint64, count int32, x float64, y float64, radius float64) { label_idsArg, label_idsFin := WrapStringList(label_ids) - C.wrap_ImPlot_PlotPieChart_U64Ptr(label_idsArg, (*C.ulonglong)(&(values[0])), C.int(count), C.double(x), C.double(y), C.double(radius)) + C.wrap_ImPlot_PlotPieChart_U64PtrStr(label_idsArg, (*C.ulonglong)(&(values[0])), C.int(count), C.double(x), C.double(y), C.double(radius)) label_idsFin() } -func PlotPlotPieChartU8Ptr(label_ids []string, values *[]byte, count int32, x float64, y float64, radius float64) { +func PlotPlotPieChartU8PtrStr(label_ids []string, values *[]byte, count int32, x float64, y float64, radius float64) { label_idsArg, label_idsFin := WrapStringList(label_ids) valuesArg := make([]C.ImU8, len(*values)) for i, valuesV := range *values { valuesArg[i] = C.ImU8(valuesV) } - C.wrap_ImPlot_PlotPieChart_U8Ptr(label_idsArg, (*C.ImU8)(&valuesArg[0]), C.int(count), C.double(x), C.double(y), C.double(radius)) + C.wrap_ImPlot_PlotPieChart_U8PtrStr(label_idsArg, (*C.ImU8)(&valuesArg[0]), C.int(count), C.double(x), C.double(y), C.double(radius)) label_idsFin() @@ -11690,14 +11690,14 @@ func PlotPlotPieChartU8Ptr(label_ids []string, values *[]byte, count int32, x fl } } -func PlotPlotPieChartdoublePtr(label_ids []string, values *[]float64, count int32, x float64, y float64, radius float64) { +func PlotPlotPieChartdoublePtrStr(label_ids []string, values *[]float64, count int32, x float64, y float64, radius float64) { label_idsArg, label_idsFin := WrapStringList(label_ids) valuesArg := make([]C.double, len(*values)) for i, valuesV := range *values { valuesArg[i] = C.double(valuesV) } - C.wrap_ImPlot_PlotPieChart_doublePtr(label_idsArg, (*C.double)(&valuesArg[0]), C.int(count), C.double(x), C.double(y), C.double(radius)) + C.wrap_ImPlot_PlotPieChart_doublePtrStr(label_idsArg, (*C.double)(&valuesArg[0]), C.int(count), C.double(x), C.double(y), C.double(radius)) label_idsFin() diff --git a/cimplot_wrapper.cpp b/cimplot_wrapper.cpp index fd652872e..100c12ab2 100644 --- a/cimplot_wrapper.cpp +++ b/cimplot_wrapper.cpp @@ -20,6 +20,16 @@ void wrap_ImPlot_Locator_Time(ImPlotTicker* ticker,const ImPlotRange range,float void wrap_ImPlot_PlotBarsGV(const char* label_id,ImPlotPoint_getter getter,uintptr_t data,int count,double bar_size,ImPlotBarsFlags flags) { ImPlot_PlotBarsG(label_id,getter,(void*)(uintptr_t)data,count,bar_size,flags); } void wrap_ImPlot_PlotDigitalGV(const char* label_id,ImPlotPoint_getter getter,uintptr_t data,int count,ImPlotDigitalFlags flags) { ImPlot_PlotDigitalG(label_id,getter,(void*)(uintptr_t)data,count,flags); } void wrap_ImPlot_PlotLineGV(const char* label_id,ImPlotPoint_getter getter,uintptr_t data,int count,ImPlotLineFlags flags) { ImPlot_PlotLineG(label_id,getter,(void*)(uintptr_t)data,count,flags); } +void wrap_ImPlot_PlotPieChart_FloatPtrPlotFormatterV(const char* const label_ids[],const float* values,int count,double x,double y,double radius,ImPlotFormatter fmt,uintptr_t fmt_data,double angle0,ImPlotPieChartFlags flags) { ImPlot_PlotPieChart_FloatPtrPlotFormatter(label_ids,values,count,x,y,radius,fmt,(void*)(uintptr_t)fmt_data,angle0,flags); } +void wrap_ImPlot_PlotPieChart_S16PtrPlotFormatterV(const char* const label_ids[],const ImS16* values,int count,double x,double y,double radius,ImPlotFormatter fmt,uintptr_t fmt_data,double angle0,ImPlotPieChartFlags flags) { ImPlot_PlotPieChart_S16PtrPlotFormatter(label_ids,values,count,x,y,radius,fmt,(void*)(uintptr_t)fmt_data,angle0,flags); } +void wrap_ImPlot_PlotPieChart_S32PtrPlotFormatterV(const char* const label_ids[],const ImS32* values,int count,double x,double y,double radius,ImPlotFormatter fmt,uintptr_t fmt_data,double angle0,ImPlotPieChartFlags flags) { ImPlot_PlotPieChart_S32PtrPlotFormatter(label_ids,values,count,x,y,radius,fmt,(void*)(uintptr_t)fmt_data,angle0,flags); } +void wrap_ImPlot_PlotPieChart_S64PtrPlotFormatterV(const char* const label_ids[],const ImS64* values,int count,double x,double y,double radius,ImPlotFormatter fmt,uintptr_t fmt_data,double angle0,ImPlotPieChartFlags flags) { ImPlot_PlotPieChart_S64PtrPlotFormatter(label_ids,values,count,x,y,radius,fmt,(void*)(uintptr_t)fmt_data,angle0,flags); } +void wrap_ImPlot_PlotPieChart_S8PtrPlotFormatterV(const char* const label_ids[],const ImS8* values,int count,double x,double y,double radius,ImPlotFormatter fmt,uintptr_t fmt_data,double angle0,ImPlotPieChartFlags flags) { ImPlot_PlotPieChart_S8PtrPlotFormatter(label_ids,values,count,x,y,radius,fmt,(void*)(uintptr_t)fmt_data,angle0,flags); } +void wrap_ImPlot_PlotPieChart_U16PtrPlotFormatterV(const char* const label_ids[],const ImU16* values,int count,double x,double y,double radius,ImPlotFormatter fmt,uintptr_t fmt_data,double angle0,ImPlotPieChartFlags flags) { ImPlot_PlotPieChart_U16PtrPlotFormatter(label_ids,values,count,x,y,radius,fmt,(void*)(uintptr_t)fmt_data,angle0,flags); } +void wrap_ImPlot_PlotPieChart_U32PtrPlotFormatterV(const char* const label_ids[],const ImU32* values,int count,double x,double y,double radius,ImPlotFormatter fmt,uintptr_t fmt_data,double angle0,ImPlotPieChartFlags flags) { ImPlot_PlotPieChart_U32PtrPlotFormatter(label_ids,values,count,x,y,radius,fmt,(void*)(uintptr_t)fmt_data,angle0,flags); } +void wrap_ImPlot_PlotPieChart_U64PtrPlotFormatterV(const char* const label_ids[],const ImU64* values,int count,double x,double y,double radius,ImPlotFormatter fmt,uintptr_t fmt_data,double angle0,ImPlotPieChartFlags flags) { ImPlot_PlotPieChart_U64PtrPlotFormatter(label_ids,values,count,x,y,radius,fmt,(void*)(uintptr_t)fmt_data,angle0,flags); } +void wrap_ImPlot_PlotPieChart_U8PtrPlotFormatterV(const char* const label_ids[],const ImU8* values,int count,double x,double y,double radius,ImPlotFormatter fmt,uintptr_t fmt_data,double angle0,ImPlotPieChartFlags flags) { ImPlot_PlotPieChart_U8PtrPlotFormatter(label_ids,values,count,x,y,radius,fmt,(void*)(uintptr_t)fmt_data,angle0,flags); } +void wrap_ImPlot_PlotPieChart_doublePtrPlotFormatterV(const char* const label_ids[],const double* values,int count,double x,double y,double radius,ImPlotFormatter fmt,uintptr_t fmt_data,double angle0,ImPlotPieChartFlags flags) { ImPlot_PlotPieChart_doublePtrPlotFormatter(label_ids,values,count,x,y,radius,fmt,(void*)(uintptr_t)fmt_data,angle0,flags); } void wrap_ImPlot_PlotScatterGV(const char* label_id,ImPlotPoint_getter getter,uintptr_t data,int count,ImPlotScatterFlags flags) { ImPlot_PlotScatterG(label_id,getter,(void*)(uintptr_t)data,count,flags); } void wrap_ImPlot_PlotShadedGV(const char* label_id,ImPlotPoint_getter getter1,uintptr_t data1,ImPlotPoint_getter getter2,uintptr_t data2,int count,ImPlotShadedFlags flags) { ImPlot_PlotShadedG(label_id,getter1,(void*)(uintptr_t)data1,getter2,(void*)(uintptr_t)data2,count,flags); } void wrap_ImPlot_PlotStairsGV(const char* label_id,ImPlotPoint_getter getter,uintptr_t data,int count,ImPlotStairsFlags flags) { ImPlot_PlotStairsG(label_id,getter,(void*)(uintptr_t)data,count,flags); } @@ -196,16 +206,26 @@ void wrap_ImPlot_PlotLine_U8PtrInt(const char* label_id,const ImU8* values,int c void wrap_ImPlot_PlotLine_U8PtrU8Ptr(const char* label_id,const ImU8* xs,const ImU8* ys,int count) { ImPlot_PlotLine_U8PtrU8Ptr(label_id,xs,ys,count,0,0,sizeof(ImU8)); } void wrap_ImPlot_PlotLine_doublePtrInt(const char* label_id,const double* values,int count) { ImPlot_PlotLine_doublePtrInt(label_id,values,count,1,0,0,0,sizeof(double)); } void wrap_ImPlot_PlotLine_doublePtrdoublePtr(const char* label_id,const double* xs,const double* ys,int count) { ImPlot_PlotLine_doublePtrdoublePtr(label_id,xs,ys,count,0,0,sizeof(double)); } -void wrap_ImPlot_PlotPieChart_FloatPtr(const char* const label_ids[],const float* values,int count,double x,double y,double radius) { ImPlot_PlotPieChart_FloatPtr(label_ids,values,count,x,y,radius,"%.1f",90,0); } -void wrap_ImPlot_PlotPieChart_S16Ptr(const char* const label_ids[],const ImS16* values,int count,double x,double y,double radius) { ImPlot_PlotPieChart_S16Ptr(label_ids,values,count,x,y,radius,"%.1f",90,0); } -void wrap_ImPlot_PlotPieChart_S32Ptr(const char* const label_ids[],const ImS32* values,int count,double x,double y,double radius) { ImPlot_PlotPieChart_S32Ptr(label_ids,values,count,x,y,radius,"%.1f",90,0); } -void wrap_ImPlot_PlotPieChart_S64Ptr(const char* const label_ids[],const ImS64* values,int count,double x,double y,double radius) { ImPlot_PlotPieChart_S64Ptr(label_ids,values,count,x,y,radius,"%.1f",90,0); } -void wrap_ImPlot_PlotPieChart_S8Ptr(const char* const label_ids[],const ImS8* values,int count,double x,double y,double radius) { ImPlot_PlotPieChart_S8Ptr(label_ids,values,count,x,y,radius,"%.1f",90,0); } -void wrap_ImPlot_PlotPieChart_U16Ptr(const char* const label_ids[],const ImU16* values,int count,double x,double y,double radius) { ImPlot_PlotPieChart_U16Ptr(label_ids,values,count,x,y,radius,"%.1f",90,0); } -void wrap_ImPlot_PlotPieChart_U32Ptr(const char* const label_ids[],const ImU32* values,int count,double x,double y,double radius) { ImPlot_PlotPieChart_U32Ptr(label_ids,values,count,x,y,radius,"%.1f",90,0); } -void wrap_ImPlot_PlotPieChart_U64Ptr(const char* const label_ids[],const ImU64* values,int count,double x,double y,double radius) { ImPlot_PlotPieChart_U64Ptr(label_ids,values,count,x,y,radius,"%.1f",90,0); } -void wrap_ImPlot_PlotPieChart_U8Ptr(const char* const label_ids[],const ImU8* values,int count,double x,double y,double radius) { ImPlot_PlotPieChart_U8Ptr(label_ids,values,count,x,y,radius,"%.1f",90,0); } -void wrap_ImPlot_PlotPieChart_doublePtr(const char* const label_ids[],const double* values,int count,double x,double y,double radius) { ImPlot_PlotPieChart_doublePtr(label_ids,values,count,x,y,radius,"%.1f",90,0); } +void wrap_ImPlot_PlotPieChart_FloatPtrPlotFormatter(const char* const label_ids[],const float* values,int count,double x,double y,double radius,ImPlotFormatter fmt) { wrap_ImPlot_PlotPieChart_FloatPtrPlotFormatterV(label_ids,values,count,x,y,radius,fmt,0,90,0); } +void wrap_ImPlot_PlotPieChart_FloatPtrStr(const char* const label_ids[],const float* values,int count,double x,double y,double radius) { ImPlot_PlotPieChart_FloatPtrStr(label_ids,values,count,x,y,radius,"%.1f",90,0); } +void wrap_ImPlot_PlotPieChart_S16PtrPlotFormatter(const char* const label_ids[],const ImS16* values,int count,double x,double y,double radius,ImPlotFormatter fmt) { wrap_ImPlot_PlotPieChart_S16PtrPlotFormatterV(label_ids,values,count,x,y,radius,fmt,0,90,0); } +void wrap_ImPlot_PlotPieChart_S16PtrStr(const char* const label_ids[],const ImS16* values,int count,double x,double y,double radius) { ImPlot_PlotPieChart_S16PtrStr(label_ids,values,count,x,y,radius,"%.1f",90,0); } +void wrap_ImPlot_PlotPieChart_S32PtrPlotFormatter(const char* const label_ids[],const ImS32* values,int count,double x,double y,double radius,ImPlotFormatter fmt) { wrap_ImPlot_PlotPieChart_S32PtrPlotFormatterV(label_ids,values,count,x,y,radius,fmt,0,90,0); } +void wrap_ImPlot_PlotPieChart_S32PtrStr(const char* const label_ids[],const ImS32* values,int count,double x,double y,double radius) { ImPlot_PlotPieChart_S32PtrStr(label_ids,values,count,x,y,radius,"%.1f",90,0); } +void wrap_ImPlot_PlotPieChart_S64PtrPlotFormatter(const char* const label_ids[],const ImS64* values,int count,double x,double y,double radius,ImPlotFormatter fmt) { wrap_ImPlot_PlotPieChart_S64PtrPlotFormatterV(label_ids,values,count,x,y,radius,fmt,0,90,0); } +void wrap_ImPlot_PlotPieChart_S64PtrStr(const char* const label_ids[],const ImS64* values,int count,double x,double y,double radius) { ImPlot_PlotPieChart_S64PtrStr(label_ids,values,count,x,y,radius,"%.1f",90,0); } +void wrap_ImPlot_PlotPieChart_S8PtrPlotFormatter(const char* const label_ids[],const ImS8* values,int count,double x,double y,double radius,ImPlotFormatter fmt) { wrap_ImPlot_PlotPieChart_S8PtrPlotFormatterV(label_ids,values,count,x,y,radius,fmt,0,90,0); } +void wrap_ImPlot_PlotPieChart_S8PtrStr(const char* const label_ids[],const ImS8* values,int count,double x,double y,double radius) { ImPlot_PlotPieChart_S8PtrStr(label_ids,values,count,x,y,radius,"%.1f",90,0); } +void wrap_ImPlot_PlotPieChart_U16PtrPlotFormatter(const char* const label_ids[],const ImU16* values,int count,double x,double y,double radius,ImPlotFormatter fmt) { wrap_ImPlot_PlotPieChart_U16PtrPlotFormatterV(label_ids,values,count,x,y,radius,fmt,0,90,0); } +void wrap_ImPlot_PlotPieChart_U16PtrStr(const char* const label_ids[],const ImU16* values,int count,double x,double y,double radius) { ImPlot_PlotPieChart_U16PtrStr(label_ids,values,count,x,y,radius,"%.1f",90,0); } +void wrap_ImPlot_PlotPieChart_U32PtrPlotFormatter(const char* const label_ids[],const ImU32* values,int count,double x,double y,double radius,ImPlotFormatter fmt) { wrap_ImPlot_PlotPieChart_U32PtrPlotFormatterV(label_ids,values,count,x,y,radius,fmt,0,90,0); } +void wrap_ImPlot_PlotPieChart_U32PtrStr(const char* const label_ids[],const ImU32* values,int count,double x,double y,double radius) { ImPlot_PlotPieChart_U32PtrStr(label_ids,values,count,x,y,radius,"%.1f",90,0); } +void wrap_ImPlot_PlotPieChart_U64PtrPlotFormatter(const char* const label_ids[],const ImU64* values,int count,double x,double y,double radius,ImPlotFormatter fmt) { wrap_ImPlot_PlotPieChart_U64PtrPlotFormatterV(label_ids,values,count,x,y,radius,fmt,0,90,0); } +void wrap_ImPlot_PlotPieChart_U64PtrStr(const char* const label_ids[],const ImU64* values,int count,double x,double y,double radius) { ImPlot_PlotPieChart_U64PtrStr(label_ids,values,count,x,y,radius,"%.1f",90,0); } +void wrap_ImPlot_PlotPieChart_U8PtrPlotFormatter(const char* const label_ids[],const ImU8* values,int count,double x,double y,double radius,ImPlotFormatter fmt) { wrap_ImPlot_PlotPieChart_U8PtrPlotFormatterV(label_ids,values,count,x,y,radius,fmt,0,90,0); } +void wrap_ImPlot_PlotPieChart_U8PtrStr(const char* const label_ids[],const ImU8* values,int count,double x,double y,double radius) { ImPlot_PlotPieChart_U8PtrStr(label_ids,values,count,x,y,radius,"%.1f",90,0); } +void wrap_ImPlot_PlotPieChart_doublePtrPlotFormatter(const char* const label_ids[],const double* values,int count,double x,double y,double radius,ImPlotFormatter fmt) { wrap_ImPlot_PlotPieChart_doublePtrPlotFormatterV(label_ids,values,count,x,y,radius,fmt,0,90,0); } +void wrap_ImPlot_PlotPieChart_doublePtrStr(const char* const label_ids[],const double* values,int count,double x,double y,double radius) { ImPlot_PlotPieChart_doublePtrStr(label_ids,values,count,x,y,radius,"%.1f",90,0); } void wrap_ImPlot_PlotScatterG(const char* label_id,ImPlotPoint_getter getter,uintptr_t data,int count) { wrap_ImPlot_PlotScatterGV(label_id,getter,data,count,0); } void wrap_ImPlot_PlotScatter_FloatPtrFloatPtr(const char* label_id,const float* xs,const float* ys,int count) { ImPlot_PlotScatter_FloatPtrFloatPtr(label_id,xs,ys,count,0,0,sizeof(float)); } void wrap_ImPlot_PlotScatter_FloatPtrInt(const char* label_id,const float* values,int count) { ImPlot_PlotScatter_FloatPtrInt(label_id,values,count,1,0,0,0,sizeof(float)); } diff --git a/cimplot_wrapper.h b/cimplot_wrapper.h index b4403183a..418c84060 100644 --- a/cimplot_wrapper.h +++ b/cimplot_wrapper.h @@ -25,6 +25,16 @@ extern void wrap_ImPlot_Locator_Time(ImPlotTicker* ticker,const ImPlotRange rang extern void wrap_ImPlot_PlotBarsGV(const char* label_id,ImPlotPoint_getter getter,uintptr_t data,int count,double bar_size,ImPlotBarsFlags flags); extern void wrap_ImPlot_PlotDigitalGV(const char* label_id,ImPlotPoint_getter getter,uintptr_t data,int count,ImPlotDigitalFlags flags); extern void wrap_ImPlot_PlotLineGV(const char* label_id,ImPlotPoint_getter getter,uintptr_t data,int count,ImPlotLineFlags flags); +extern void wrap_ImPlot_PlotPieChart_FloatPtrPlotFormatterV(const char* const label_ids[],const float* values,int count,double x,double y,double radius,ImPlotFormatter fmt,uintptr_t fmt_data,double angle0,ImPlotPieChartFlags flags); +extern void wrap_ImPlot_PlotPieChart_S16PtrPlotFormatterV(const char* const label_ids[],const ImS16* values,int count,double x,double y,double radius,ImPlotFormatter fmt,uintptr_t fmt_data,double angle0,ImPlotPieChartFlags flags); +extern void wrap_ImPlot_PlotPieChart_S32PtrPlotFormatterV(const char* const label_ids[],const ImS32* values,int count,double x,double y,double radius,ImPlotFormatter fmt,uintptr_t fmt_data,double angle0,ImPlotPieChartFlags flags); +extern void wrap_ImPlot_PlotPieChart_S64PtrPlotFormatterV(const char* const label_ids[],const ImS64* values,int count,double x,double y,double radius,ImPlotFormatter fmt,uintptr_t fmt_data,double angle0,ImPlotPieChartFlags flags); +extern void wrap_ImPlot_PlotPieChart_S8PtrPlotFormatterV(const char* const label_ids[],const ImS8* values,int count,double x,double y,double radius,ImPlotFormatter fmt,uintptr_t fmt_data,double angle0,ImPlotPieChartFlags flags); +extern void wrap_ImPlot_PlotPieChart_U16PtrPlotFormatterV(const char* const label_ids[],const ImU16* values,int count,double x,double y,double radius,ImPlotFormatter fmt,uintptr_t fmt_data,double angle0,ImPlotPieChartFlags flags); +extern void wrap_ImPlot_PlotPieChart_U32PtrPlotFormatterV(const char* const label_ids[],const ImU32* values,int count,double x,double y,double radius,ImPlotFormatter fmt,uintptr_t fmt_data,double angle0,ImPlotPieChartFlags flags); +extern void wrap_ImPlot_PlotPieChart_U64PtrPlotFormatterV(const char* const label_ids[],const ImU64* values,int count,double x,double y,double radius,ImPlotFormatter fmt,uintptr_t fmt_data,double angle0,ImPlotPieChartFlags flags); +extern void wrap_ImPlot_PlotPieChart_U8PtrPlotFormatterV(const char* const label_ids[],const ImU8* values,int count,double x,double y,double radius,ImPlotFormatter fmt,uintptr_t fmt_data,double angle0,ImPlotPieChartFlags flags); +extern void wrap_ImPlot_PlotPieChart_doublePtrPlotFormatterV(const char* const label_ids[],const double* values,int count,double x,double y,double radius,ImPlotFormatter fmt,uintptr_t fmt_data,double angle0,ImPlotPieChartFlags flags); extern void wrap_ImPlot_PlotScatterGV(const char* label_id,ImPlotPoint_getter getter,uintptr_t data,int count,ImPlotScatterFlags flags); extern void wrap_ImPlot_PlotShadedGV(const char* label_id,ImPlotPoint_getter getter1,uintptr_t data1,ImPlotPoint_getter getter2,uintptr_t data2,int count,ImPlotShadedFlags flags); extern void wrap_ImPlot_PlotStairsGV(const char* label_id,ImPlotPoint_getter getter,uintptr_t data,int count,ImPlotStairsFlags flags); @@ -201,16 +211,26 @@ extern void wrap_ImPlot_PlotLine_U8PtrInt(const char* label_id,const ImU8* value extern void wrap_ImPlot_PlotLine_U8PtrU8Ptr(const char* label_id,const ImU8* xs,const ImU8* ys,int count); extern void wrap_ImPlot_PlotLine_doublePtrInt(const char* label_id,const double* values,int count); extern void wrap_ImPlot_PlotLine_doublePtrdoublePtr(const char* label_id,const double* xs,const double* ys,int count); -extern void wrap_ImPlot_PlotPieChart_FloatPtr(const char* const label_ids[],const float* values,int count,double x,double y,double radius); -extern void wrap_ImPlot_PlotPieChart_S16Ptr(const char* const label_ids[],const ImS16* values,int count,double x,double y,double radius); -extern void wrap_ImPlot_PlotPieChart_S32Ptr(const char* const label_ids[],const ImS32* values,int count,double x,double y,double radius); -extern void wrap_ImPlot_PlotPieChart_S64Ptr(const char* const label_ids[],const ImS64* values,int count,double x,double y,double radius); -extern void wrap_ImPlot_PlotPieChart_S8Ptr(const char* const label_ids[],const ImS8* values,int count,double x,double y,double radius); -extern void wrap_ImPlot_PlotPieChart_U16Ptr(const char* const label_ids[],const ImU16* values,int count,double x,double y,double radius); -extern void wrap_ImPlot_PlotPieChart_U32Ptr(const char* const label_ids[],const ImU32* values,int count,double x,double y,double radius); -extern void wrap_ImPlot_PlotPieChart_U64Ptr(const char* const label_ids[],const ImU64* values,int count,double x,double y,double radius); -extern void wrap_ImPlot_PlotPieChart_U8Ptr(const char* const label_ids[],const ImU8* values,int count,double x,double y,double radius); -extern void wrap_ImPlot_PlotPieChart_doublePtr(const char* const label_ids[],const double* values,int count,double x,double y,double radius); +extern void wrap_ImPlot_PlotPieChart_FloatPtrPlotFormatter(const char* const label_ids[],const float* values,int count,double x,double y,double radius,ImPlotFormatter fmt); +extern void wrap_ImPlot_PlotPieChart_FloatPtrStr(const char* const label_ids[],const float* values,int count,double x,double y,double radius); +extern void wrap_ImPlot_PlotPieChart_S16PtrPlotFormatter(const char* const label_ids[],const ImS16* values,int count,double x,double y,double radius,ImPlotFormatter fmt); +extern void wrap_ImPlot_PlotPieChart_S16PtrStr(const char* const label_ids[],const ImS16* values,int count,double x,double y,double radius); +extern void wrap_ImPlot_PlotPieChart_S32PtrPlotFormatter(const char* const label_ids[],const ImS32* values,int count,double x,double y,double radius,ImPlotFormatter fmt); +extern void wrap_ImPlot_PlotPieChart_S32PtrStr(const char* const label_ids[],const ImS32* values,int count,double x,double y,double radius); +extern void wrap_ImPlot_PlotPieChart_S64PtrPlotFormatter(const char* const label_ids[],const ImS64* values,int count,double x,double y,double radius,ImPlotFormatter fmt); +extern void wrap_ImPlot_PlotPieChart_S64PtrStr(const char* const label_ids[],const ImS64* values,int count,double x,double y,double radius); +extern void wrap_ImPlot_PlotPieChart_S8PtrPlotFormatter(const char* const label_ids[],const ImS8* values,int count,double x,double y,double radius,ImPlotFormatter fmt); +extern void wrap_ImPlot_PlotPieChart_S8PtrStr(const char* const label_ids[],const ImS8* values,int count,double x,double y,double radius); +extern void wrap_ImPlot_PlotPieChart_U16PtrPlotFormatter(const char* const label_ids[],const ImU16* values,int count,double x,double y,double radius,ImPlotFormatter fmt); +extern void wrap_ImPlot_PlotPieChart_U16PtrStr(const char* const label_ids[],const ImU16* values,int count,double x,double y,double radius); +extern void wrap_ImPlot_PlotPieChart_U32PtrPlotFormatter(const char* const label_ids[],const ImU32* values,int count,double x,double y,double radius,ImPlotFormatter fmt); +extern void wrap_ImPlot_PlotPieChart_U32PtrStr(const char* const label_ids[],const ImU32* values,int count,double x,double y,double radius); +extern void wrap_ImPlot_PlotPieChart_U64PtrPlotFormatter(const char* const label_ids[],const ImU64* values,int count,double x,double y,double radius,ImPlotFormatter fmt); +extern void wrap_ImPlot_PlotPieChart_U64PtrStr(const char* const label_ids[],const ImU64* values,int count,double x,double y,double radius); +extern void wrap_ImPlot_PlotPieChart_U8PtrPlotFormatter(const char* const label_ids[],const ImU8* values,int count,double x,double y,double radius,ImPlotFormatter fmt); +extern void wrap_ImPlot_PlotPieChart_U8PtrStr(const char* const label_ids[],const ImU8* values,int count,double x,double y,double radius); +extern void wrap_ImPlot_PlotPieChart_doublePtrPlotFormatter(const char* const label_ids[],const double* values,int count,double x,double y,double radius,ImPlotFormatter fmt); +extern void wrap_ImPlot_PlotPieChart_doublePtrStr(const char* const label_ids[],const double* values,int count,double x,double y,double radius); extern void wrap_ImPlot_PlotScatterG(const char* label_id,ImPlotPoint_getter getter,uintptr_t data,int count); extern void wrap_ImPlot_PlotScatter_FloatPtrFloatPtr(const char* label_id,const float* xs,const float* ys,int count); extern void wrap_ImPlot_PlotScatter_FloatPtrInt(const char* label_id,const float* values,int count); diff --git a/lib/linux/x64/cimgui.a b/lib/linux/x64/cimgui.a index b26c0a11a..b643f1e97 100644 Binary files a/lib/linux/x64/cimgui.a and b/lib/linux/x64/cimgui.a differ diff --git a/lib/linux/x64/libSDL2.a b/lib/linux/x64/libSDL2.a index aa778b680..5742c5471 100644 Binary files a/lib/linux/x64/libSDL2.a and b/lib/linux/x64/libSDL2.a differ diff --git a/lib/macos/arm64/cimgui.a b/lib/macos/arm64/cimgui.a index 52464677a..5a4938800 100644 Binary files a/lib/macos/arm64/cimgui.a and b/lib/macos/arm64/cimgui.a differ diff --git a/lib/macos/arm64/libSDL2.a b/lib/macos/arm64/libSDL2.a index 47a3474a2..2db353f04 100644 Binary files a/lib/macos/arm64/libSDL2.a and b/lib/macos/arm64/libSDL2.a differ diff --git a/lib/macos/arm64/libglfw3.a b/lib/macos/arm64/libglfw3.a index 4f62e6219..8fdc68869 100644 Binary files a/lib/macos/arm64/libglfw3.a and b/lib/macos/arm64/libglfw3.a differ diff --git a/lib/macos/x64/cimgui.a b/lib/macos/x64/cimgui.a index 2c14c813b..1573dc2f8 100644 Binary files a/lib/macos/x64/cimgui.a and b/lib/macos/x64/cimgui.a differ diff --git a/lib/macos/x64/libSDL2.a b/lib/macos/x64/libSDL2.a index f107e105d..dd7191d84 100644 Binary files a/lib/macos/x64/libSDL2.a and b/lib/macos/x64/libSDL2.a differ diff --git a/lib/macos/x64/libglfw3.a b/lib/macos/x64/libglfw3.a index 95565eace..f345b30d8 100644 Binary files a/lib/macos/x64/libglfw3.a and b/lib/macos/x64/libglfw3.a differ diff --git a/lib/windows/x64/cimgui.a b/lib/windows/x64/cimgui.a index f57914b6c..8d71b5eb4 100644 Binary files a/lib/windows/x64/cimgui.a and b/lib/windows/x64/cimgui.a differ diff --git a/lib/windows/x64/libSDL2.a b/lib/windows/x64/libSDL2.a index 9e9757efe..d2fd863d3 100644 Binary files a/lib/windows/x64/libSDL2.a and b/lib/windows/x64/libSDL2.a differ diff --git a/lib/windows/x64/libglfw3.a b/lib/windows/x64/libglfw3.a index c65feed90..ad1cd0b14 100644 Binary files a/lib/windows/x64/libglfw3.a and b/lib/windows/x64/libglfw3.a differ