build: Updated ImGui to v1.91.0
This commit is contained in:
parent
075ece2da7
commit
63c6028522
2
lib/third_party/fmt
vendored
2
lib/third_party/fmt
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 0041a40c1350ba702d475b9c4ad62da77caea164
|
Subproject commit 0c9fce2ffefecfdce794e1859584e25877b7b592
|
@ -834,7 +834,7 @@ void TextEditor::Render() {
|
|||||||
|
|
||||||
assert(mLineBuffer.empty());
|
assert(mLineBuffer.empty());
|
||||||
|
|
||||||
auto contentSize = ImGui::GetWindowContentRegionMax() - ImVec2(0,mTopMargin);
|
auto contentSize = ImGui::GetCurrentWindowRead()->ContentRegionRect.Max - ImGui::GetWindowPos() - ImVec2(0,mTopMargin);
|
||||||
auto drawList = ImGui::GetWindowDrawList();
|
auto drawList = ImGui::GetWindowDrawList();
|
||||||
float longest(mTextStart);
|
float longest(mTextStart);
|
||||||
|
|
||||||
@ -1164,7 +1164,7 @@ void TextEditor::Render(const char *aTitle, const ImVec2 &aSize, bool aBorder) {
|
|||||||
|
|
||||||
if (mHandleKeyboardInputs) {
|
if (mHandleKeyboardInputs) {
|
||||||
HandleKeyboardInputs();
|
HandleKeyboardInputs();
|
||||||
ImGui::PushTabStop(true);
|
ImGui::PushItemFlag(ImGuiItemFlags_NoTabStop, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mHandleMouseInputs)
|
if (mHandleMouseInputs)
|
||||||
@ -1174,7 +1174,7 @@ void TextEditor::Render(const char *aTitle, const ImVec2 &aSize, bool aBorder) {
|
|||||||
Render();
|
Render();
|
||||||
|
|
||||||
if (mHandleKeyboardInputs)
|
if (mHandleKeyboardInputs)
|
||||||
ImGui::PopTabStop();
|
ImGui::PopItemFlag();
|
||||||
|
|
||||||
if (!mIgnoreImGuiChild)
|
if (!mIgnoreImGuiChild)
|
||||||
ImGui::EndChild();
|
ImGui::EndChild();
|
||||||
|
726
lib/third_party/imgui/cimgui/include/cimgui.h
vendored
726
lib/third_party/imgui/cimgui/include/cimgui.h
vendored
File diff suppressed because it is too large
Load Diff
526
lib/third_party/imgui/cimgui/source/cimgui.cpp
vendored
526
lib/third_party/imgui/cimgui/source/cimgui.cpp
vendored
@ -1,5 +1,5 @@
|
|||||||
//This file is automatically generated by generator.lua from https://github.com/cimgui/cimgui
|
//This file is automatically generated by generator.lua from https://github.com/cimgui/cimgui
|
||||||
//based on imgui.h file version "1.90.4" 19040 from Dear ImGui https://github.com/ocornut/imgui
|
//based on imgui.h file version "1.91.0" 19100 from Dear ImGui https://github.com/ocornut/imgui
|
||||||
//with imgui_internal.h api
|
//with imgui_internal.h api
|
||||||
//docking branch
|
//docking branch
|
||||||
#ifdef IMGUI_ENABLE_FREETYPE
|
#ifdef IMGUI_ENABLE_FREETYPE
|
||||||
@ -11,10 +11,10 @@
|
|||||||
#error "IMGUI_FREETYPE should not be defined without freetype generated cimgui"
|
#error "IMGUI_FREETYPE should not be defined without freetype generated cimgui"
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#ifdef IMGUI_ENABLE_FREETYPE
|
|
||||||
#include "./imgui/misc/freetype/imgui_freetype.h"
|
|
||||||
#endif
|
|
||||||
#include "imgui.h"
|
#include "imgui.h"
|
||||||
|
#ifdef IMGUI_ENABLE_FREETYPE
|
||||||
|
#include "misc/freetype/imgui_freetype.h"
|
||||||
|
#endif
|
||||||
#include "imgui_internal.h"
|
#include "imgui_internal.h"
|
||||||
#include "cimgui.h"
|
#include "cimgui.h"
|
||||||
|
|
||||||
@ -272,22 +272,6 @@ CIMGUI_API void igSetWindowFocus_Str(const char* name)
|
|||||||
{
|
{
|
||||||
return ImGui::SetWindowFocus(name);
|
return ImGui::SetWindowFocus(name);
|
||||||
}
|
}
|
||||||
CIMGUI_API void igGetContentRegionAvail(ImVec2 *pOut)
|
|
||||||
{
|
|
||||||
*pOut = ImGui::GetContentRegionAvail();
|
|
||||||
}
|
|
||||||
CIMGUI_API void igGetContentRegionMax(ImVec2 *pOut)
|
|
||||||
{
|
|
||||||
*pOut = ImGui::GetContentRegionMax();
|
|
||||||
}
|
|
||||||
CIMGUI_API void igGetWindowContentRegionMin(ImVec2 *pOut)
|
|
||||||
{
|
|
||||||
*pOut = ImGui::GetWindowContentRegionMin();
|
|
||||||
}
|
|
||||||
CIMGUI_API void igGetWindowContentRegionMax(ImVec2 *pOut)
|
|
||||||
{
|
|
||||||
*pOut = ImGui::GetWindowContentRegionMax();
|
|
||||||
}
|
|
||||||
CIMGUI_API float igGetScrollX()
|
CIMGUI_API float igGetScrollX()
|
||||||
{
|
{
|
||||||
return ImGui::GetScrollX();
|
return ImGui::GetScrollX();
|
||||||
@ -360,21 +344,13 @@ CIMGUI_API void igPopStyleVar(int count)
|
|||||||
{
|
{
|
||||||
return ImGui::PopStyleVar(count);
|
return ImGui::PopStyleVar(count);
|
||||||
}
|
}
|
||||||
CIMGUI_API void igPushTabStop(bool tab_stop)
|
CIMGUI_API void igPushItemFlag(ImGuiItemFlags option,bool enabled)
|
||||||
{
|
{
|
||||||
return ImGui::PushTabStop(tab_stop);
|
return ImGui::PushItemFlag(option,enabled);
|
||||||
}
|
}
|
||||||
CIMGUI_API void igPopTabStop()
|
CIMGUI_API void igPopItemFlag()
|
||||||
{
|
{
|
||||||
return ImGui::PopTabStop();
|
return ImGui::PopItemFlag();
|
||||||
}
|
|
||||||
CIMGUI_API void igPushButtonRepeat(bool repeat)
|
|
||||||
{
|
|
||||||
return ImGui::PushButtonRepeat(repeat);
|
|
||||||
}
|
|
||||||
CIMGUI_API void igPopButtonRepeat()
|
|
||||||
{
|
|
||||||
return ImGui::PopButtonRepeat();
|
|
||||||
}
|
}
|
||||||
CIMGUI_API void igPushItemWidth(float item_width)
|
CIMGUI_API void igPushItemWidth(float item_width)
|
||||||
{
|
{
|
||||||
@ -436,6 +412,10 @@ CIMGUI_API void igSetCursorScreenPos(const ImVec2 pos)
|
|||||||
{
|
{
|
||||||
return ImGui::SetCursorScreenPos(pos);
|
return ImGui::SetCursorScreenPos(pos);
|
||||||
}
|
}
|
||||||
|
CIMGUI_API void igGetContentRegionAvail(ImVec2 *pOut)
|
||||||
|
{
|
||||||
|
*pOut = ImGui::GetContentRegionAvail();
|
||||||
|
}
|
||||||
CIMGUI_API void igGetCursorPos(ImVec2 *pOut)
|
CIMGUI_API void igGetCursorPos(ImVec2 *pOut)
|
||||||
{
|
{
|
||||||
*pOut = ImGui::GetCursorPos();
|
*pOut = ImGui::GetCursorPos();
|
||||||
@ -552,6 +532,10 @@ CIMGUI_API ImGuiID igGetID_Ptr(const void* ptr_id)
|
|||||||
{
|
{
|
||||||
return ImGui::GetID(ptr_id);
|
return ImGui::GetID(ptr_id);
|
||||||
}
|
}
|
||||||
|
CIMGUI_API ImGuiID igGetID_Int(int int_id)
|
||||||
|
{
|
||||||
|
return ImGui::GetID(int_id);
|
||||||
|
}
|
||||||
CIMGUI_API void igTextUnformatted(const char* text,const char* text_end)
|
CIMGUI_API void igTextUnformatted(const char* text,const char* text_end)
|
||||||
{
|
{
|
||||||
return ImGui::TextUnformatted(text,text_end);
|
return ImGui::TextUnformatted(text,text_end);
|
||||||
@ -670,6 +654,14 @@ CIMGUI_API void igBullet()
|
|||||||
{
|
{
|
||||||
return ImGui::Bullet();
|
return ImGui::Bullet();
|
||||||
}
|
}
|
||||||
|
CIMGUI_API bool igTextLink(const char* label)
|
||||||
|
{
|
||||||
|
return ImGui::TextLink(label);
|
||||||
|
}
|
||||||
|
CIMGUI_API void igTextLinkOpenURL(const char* label,const char* url)
|
||||||
|
{
|
||||||
|
return ImGui::TextLinkOpenURL(label,url);
|
||||||
|
}
|
||||||
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 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,image_size,uv0,uv1,tint_col,border_col);
|
return ImGui::Image(user_texture_id,image_size,uv0,uv1,tint_col,border_col);
|
||||||
@ -966,6 +958,10 @@ CIMGUI_API void igSetNextItemOpen(bool is_open,ImGuiCond cond)
|
|||||||
{
|
{
|
||||||
return ImGui::SetNextItemOpen(is_open,cond);
|
return ImGui::SetNextItemOpen(is_open,cond);
|
||||||
}
|
}
|
||||||
|
CIMGUI_API void igSetNextItemStorageID(ImGuiID storage_id)
|
||||||
|
{
|
||||||
|
return ImGui::SetNextItemStorageID(storage_id);
|
||||||
|
}
|
||||||
CIMGUI_API bool igSelectable_Bool(const char* label,bool selected,ImGuiSelectableFlags flags,const ImVec2 size)
|
CIMGUI_API bool igSelectable_Bool(const char* label,bool selected,ImGuiSelectableFlags flags,const ImVec2 size)
|
||||||
{
|
{
|
||||||
return ImGui::Selectable(label,selected,flags,size);
|
return ImGui::Selectable(label,selected,flags,size);
|
||||||
@ -974,6 +970,22 @@ CIMGUI_API bool igSelectable_BoolPtr(const char* label,bool* p_selected,ImGuiSel
|
|||||||
{
|
{
|
||||||
return ImGui::Selectable(label,p_selected,flags,size);
|
return ImGui::Selectable(label,p_selected,flags,size);
|
||||||
}
|
}
|
||||||
|
CIMGUI_API ImGuiMultiSelectIO* igBeginMultiSelect(ImGuiMultiSelectFlags flags,int selection_size,int items_count)
|
||||||
|
{
|
||||||
|
return ImGui::BeginMultiSelect(flags,selection_size,items_count);
|
||||||
|
}
|
||||||
|
CIMGUI_API ImGuiMultiSelectIO* igEndMultiSelect()
|
||||||
|
{
|
||||||
|
return ImGui::EndMultiSelect();
|
||||||
|
}
|
||||||
|
CIMGUI_API void igSetNextItemSelectionUserData(ImGuiSelectionUserData selection_user_data)
|
||||||
|
{
|
||||||
|
return ImGui::SetNextItemSelectionUserData(selection_user_data);
|
||||||
|
}
|
||||||
|
CIMGUI_API bool igIsItemToggledSelection()
|
||||||
|
{
|
||||||
|
return ImGui::IsItemToggledSelection();
|
||||||
|
}
|
||||||
CIMGUI_API bool igBeginListBox(const char* label,const ImVec2 size)
|
CIMGUI_API bool igBeginListBox(const char* label,const ImVec2 size)
|
||||||
{
|
{
|
||||||
return ImGui::BeginListBox(label,size);
|
return ImGui::BeginListBox(label,size);
|
||||||
@ -1132,9 +1144,9 @@ CIMGUI_API bool igIsPopupOpen_Str(const char* str_id,ImGuiPopupFlags flags)
|
|||||||
{
|
{
|
||||||
return ImGui::IsPopupOpen(str_id,flags);
|
return ImGui::IsPopupOpen(str_id,flags);
|
||||||
}
|
}
|
||||||
CIMGUI_API bool igBeginTable(const char* str_id,int column,ImGuiTableFlags flags,const ImVec2 outer_size,float inner_width)
|
CIMGUI_API bool igBeginTable(const char* str_id,int columns,ImGuiTableFlags flags,const ImVec2 outer_size,float inner_width)
|
||||||
{
|
{
|
||||||
return ImGui::BeginTable(str_id,column,flags,outer_size,inner_width);
|
return ImGui::BeginTable(str_id,columns,flags,outer_size,inner_width);
|
||||||
}
|
}
|
||||||
CIMGUI_API void igEndTable()
|
CIMGUI_API void igEndTable()
|
||||||
{
|
{
|
||||||
@ -1200,6 +1212,10 @@ CIMGUI_API void igTableSetColumnEnabled(int column_n,bool v)
|
|||||||
{
|
{
|
||||||
return ImGui::TableSetColumnEnabled(column_n,v);
|
return ImGui::TableSetColumnEnabled(column_n,v);
|
||||||
}
|
}
|
||||||
|
CIMGUI_API int igTableGetHoveredColumn()
|
||||||
|
{
|
||||||
|
return ImGui::TableGetHoveredColumn();
|
||||||
|
}
|
||||||
CIMGUI_API void igTableSetBgColor(ImGuiTableBgTarget target,ImU32 color,int column_n)
|
CIMGUI_API void igTableSetBgColor(ImGuiTableBgTarget target,ImU32 color,int column_n)
|
||||||
{
|
{
|
||||||
return ImGui::TableSetBgColor(target,color,column_n);
|
return ImGui::TableSetBgColor(target,color,column_n);
|
||||||
@ -1260,11 +1276,11 @@ CIMGUI_API void igSetTabItemClosed(const char* tab_or_docked_window_label)
|
|||||||
{
|
{
|
||||||
return ImGui::SetTabItemClosed(tab_or_docked_window_label);
|
return ImGui::SetTabItemClosed(tab_or_docked_window_label);
|
||||||
}
|
}
|
||||||
CIMGUI_API ImGuiID igDockSpace(ImGuiID id,const ImVec2 size,ImGuiDockNodeFlags flags,const ImGuiWindowClass* window_class)
|
CIMGUI_API ImGuiID igDockSpace(ImGuiID dockspace_id,const ImVec2 size,ImGuiDockNodeFlags flags,const ImGuiWindowClass* window_class)
|
||||||
{
|
{
|
||||||
return ImGui::DockSpace(id,size,flags,window_class);
|
return ImGui::DockSpace(dockspace_id,size,flags,window_class);
|
||||||
}
|
}
|
||||||
CIMGUI_API ImGuiID igDockSpaceOverViewport(ImGuiID dockspace_id, const ImGuiViewport* viewport,ImGuiDockNodeFlags flags,const ImGuiWindowClass* window_class)
|
CIMGUI_API ImGuiID igDockSpaceOverViewport(ImGuiID dockspace_id,const ImGuiViewport* viewport,ImGuiDockNodeFlags flags,const ImGuiWindowClass* window_class)
|
||||||
{
|
{
|
||||||
return ImGui::DockSpaceOverViewport(dockspace_id,viewport,flags,window_class);
|
return ImGui::DockSpaceOverViewport(dockspace_id,viewport,flags,window_class);
|
||||||
}
|
}
|
||||||
@ -1436,15 +1452,7 @@ CIMGUI_API ImGuiViewport* igGetMainViewport()
|
|||||||
{
|
{
|
||||||
return ImGui::GetMainViewport();
|
return ImGui::GetMainViewport();
|
||||||
}
|
}
|
||||||
CIMGUI_API ImDrawList* igGetBackgroundDrawList_Nil()
|
CIMGUI_API ImDrawList* igGetBackgroundDrawList(ImGuiViewport* viewport)
|
||||||
{
|
|
||||||
return ImGui::GetBackgroundDrawList();
|
|
||||||
}
|
|
||||||
CIMGUI_API ImDrawList* igGetForegroundDrawList_Nil()
|
|
||||||
{
|
|
||||||
return ImGui::GetForegroundDrawList();
|
|
||||||
}
|
|
||||||
CIMGUI_API ImDrawList* igGetBackgroundDrawList_ViewportPtr(ImGuiViewport* viewport)
|
|
||||||
{
|
{
|
||||||
return ImGui::GetBackgroundDrawList(viewport);
|
return ImGui::GetBackgroundDrawList(viewport);
|
||||||
}
|
}
|
||||||
@ -1532,6 +1540,18 @@ CIMGUI_API void igSetNextFrameWantCaptureKeyboard(bool want_capture_keyboard)
|
|||||||
{
|
{
|
||||||
return ImGui::SetNextFrameWantCaptureKeyboard(want_capture_keyboard);
|
return ImGui::SetNextFrameWantCaptureKeyboard(want_capture_keyboard);
|
||||||
}
|
}
|
||||||
|
CIMGUI_API bool igShortcut_Nil(ImGuiKeyChord key_chord,ImGuiInputFlags flags)
|
||||||
|
{
|
||||||
|
return ImGui::Shortcut(key_chord,flags);
|
||||||
|
}
|
||||||
|
CIMGUI_API void igSetNextItemShortcut(ImGuiKeyChord key_chord,ImGuiInputFlags flags)
|
||||||
|
{
|
||||||
|
return ImGui::SetNextItemShortcut(key_chord,flags);
|
||||||
|
}
|
||||||
|
CIMGUI_API void igSetItemKeyOwner_Nil(ImGuiKey key)
|
||||||
|
{
|
||||||
|
return ImGui::SetItemKeyOwner(key);
|
||||||
|
}
|
||||||
CIMGUI_API bool igIsMouseDown_Nil(ImGuiMouseButton button)
|
CIMGUI_API bool igIsMouseDown_Nil(ImGuiMouseButton button)
|
||||||
{
|
{
|
||||||
return ImGui::IsMouseDown(button);
|
return ImGui::IsMouseDown(button);
|
||||||
@ -1636,6 +1656,17 @@ CIMGUI_API bool igDebugCheckVersionAndDataLayout(const char* version_str,size_t
|
|||||||
{
|
{
|
||||||
return ImGui::DebugCheckVersionAndDataLayout(version_str,sz_io,sz_style,sz_vec2,sz_vec4,sz_drawvert,sz_drawidx);
|
return ImGui::DebugCheckVersionAndDataLayout(version_str,sz_io,sz_style,sz_vec2,sz_vec4,sz_drawvert,sz_drawidx);
|
||||||
}
|
}
|
||||||
|
CIMGUI_API void igDebugLog(const char* fmt,...)
|
||||||
|
{
|
||||||
|
va_list args;
|
||||||
|
va_start(args, fmt);
|
||||||
|
ImGui::DebugLogV(fmt,args);
|
||||||
|
va_end(args);
|
||||||
|
}
|
||||||
|
CIMGUI_API void igDebugLogV(const char* fmt,va_list args)
|
||||||
|
{
|
||||||
|
return ImGui::DebugLogV(fmt,args);
|
||||||
|
}
|
||||||
CIMGUI_API void igSetAllocatorFunctions(ImGuiMemAllocFunc alloc_func,ImGuiMemFreeFunc free_func,void* user_data)
|
CIMGUI_API void igSetAllocatorFunctions(ImGuiMemAllocFunc alloc_func,ImGuiMemFreeFunc free_func,void* user_data)
|
||||||
{
|
{
|
||||||
return ImGui::SetAllocatorFunctions(alloc_func,free_func,user_data);
|
return ImGui::SetAllocatorFunctions(alloc_func,free_func,user_data);
|
||||||
@ -1764,6 +1795,10 @@ CIMGUI_API void ImGuiIO_ClearInputKeys(ImGuiIO* self)
|
|||||||
{
|
{
|
||||||
return self->ClearInputKeys();
|
return self->ClearInputKeys();
|
||||||
}
|
}
|
||||||
|
CIMGUI_API void ImGuiIO_ClearInputMouse(ImGuiIO* self)
|
||||||
|
{
|
||||||
|
return self->ClearInputMouse();
|
||||||
|
}
|
||||||
CIMGUI_API ImGuiIO* ImGuiIO_ImGuiIO(void)
|
CIMGUI_API ImGuiIO* ImGuiIO_ImGuiIO(void)
|
||||||
{
|
{
|
||||||
return IM_NEW(ImGuiIO)();
|
return IM_NEW(ImGuiIO)();
|
||||||
@ -2036,6 +2071,10 @@ CIMGUI_API void ImGuiListClipper_IncludeItemsByIndex(ImGuiListClipper* self,int
|
|||||||
{
|
{
|
||||||
return self->IncludeItemsByIndex(item_begin,item_end);
|
return self->IncludeItemsByIndex(item_begin,item_end);
|
||||||
}
|
}
|
||||||
|
CIMGUI_API void ImGuiListClipper_SeekCursorForItem(ImGuiListClipper* self,int item_index)
|
||||||
|
{
|
||||||
|
return self->SeekCursorForItem(item_index);
|
||||||
|
}
|
||||||
CIMGUI_API ImColor* ImColor_ImColor_Nil(void)
|
CIMGUI_API ImColor* ImColor_ImColor_Nil(void)
|
||||||
{
|
{
|
||||||
return IM_NEW(ImColor)();
|
return IM_NEW(ImColor)();
|
||||||
@ -2068,6 +2107,54 @@ CIMGUI_API void ImColor_HSV(ImColor *pOut,float h,float s,float v,float a)
|
|||||||
{
|
{
|
||||||
*pOut = ImColor::HSV(h,s,v,a);
|
*pOut = ImColor::HSV(h,s,v,a);
|
||||||
}
|
}
|
||||||
|
CIMGUI_API ImGuiSelectionBasicStorage* ImGuiSelectionBasicStorage_ImGuiSelectionBasicStorage(void)
|
||||||
|
{
|
||||||
|
return IM_NEW(ImGuiSelectionBasicStorage)();
|
||||||
|
}
|
||||||
|
CIMGUI_API void ImGuiSelectionBasicStorage_destroy(ImGuiSelectionBasicStorage* self)
|
||||||
|
{
|
||||||
|
IM_DELETE(self);
|
||||||
|
}
|
||||||
|
CIMGUI_API void ImGuiSelectionBasicStorage_ApplyRequests(ImGuiSelectionBasicStorage* self,ImGuiMultiSelectIO* ms_io)
|
||||||
|
{
|
||||||
|
return self->ApplyRequests(ms_io);
|
||||||
|
}
|
||||||
|
CIMGUI_API bool ImGuiSelectionBasicStorage_Contains(ImGuiSelectionBasicStorage* self,ImGuiID id)
|
||||||
|
{
|
||||||
|
return self->Contains(id);
|
||||||
|
}
|
||||||
|
CIMGUI_API void ImGuiSelectionBasicStorage_Clear(ImGuiSelectionBasicStorage* self)
|
||||||
|
{
|
||||||
|
return self->Clear();
|
||||||
|
}
|
||||||
|
CIMGUI_API void ImGuiSelectionBasicStorage_Swap(ImGuiSelectionBasicStorage* self,ImGuiSelectionBasicStorage* r)
|
||||||
|
{
|
||||||
|
return self->Swap(*r);
|
||||||
|
}
|
||||||
|
CIMGUI_API void ImGuiSelectionBasicStorage_SetItemSelected(ImGuiSelectionBasicStorage* self,ImGuiID id,bool selected)
|
||||||
|
{
|
||||||
|
return self->SetItemSelected(id,selected);
|
||||||
|
}
|
||||||
|
CIMGUI_API bool ImGuiSelectionBasicStorage_GetNextSelectedItem(ImGuiSelectionBasicStorage* self,void** opaque_it,ImGuiID* out_id)
|
||||||
|
{
|
||||||
|
return self->GetNextSelectedItem(opaque_it,out_id);
|
||||||
|
}
|
||||||
|
CIMGUI_API ImGuiID ImGuiSelectionBasicStorage_GetStorageIdFromIndex(ImGuiSelectionBasicStorage* self,int idx)
|
||||||
|
{
|
||||||
|
return self->GetStorageIdFromIndex(idx);
|
||||||
|
}
|
||||||
|
CIMGUI_API ImGuiSelectionExternalStorage* ImGuiSelectionExternalStorage_ImGuiSelectionExternalStorage(void)
|
||||||
|
{
|
||||||
|
return IM_NEW(ImGuiSelectionExternalStorage)();
|
||||||
|
}
|
||||||
|
CIMGUI_API void ImGuiSelectionExternalStorage_destroy(ImGuiSelectionExternalStorage* self)
|
||||||
|
{
|
||||||
|
IM_DELETE(self);
|
||||||
|
}
|
||||||
|
CIMGUI_API void ImGuiSelectionExternalStorage_ApplyRequests(ImGuiSelectionExternalStorage* self,ImGuiMultiSelectIO* ms_io)
|
||||||
|
{
|
||||||
|
return self->ApplyRequests(ms_io);
|
||||||
|
}
|
||||||
CIMGUI_API ImDrawCmd* ImDrawCmd_ImDrawCmd(void)
|
CIMGUI_API ImDrawCmd* ImDrawCmd_ImDrawCmd(void)
|
||||||
{
|
{
|
||||||
return IM_NEW(ImDrawCmd)();
|
return IM_NEW(ImDrawCmd)();
|
||||||
@ -2192,11 +2279,11 @@ CIMGUI_API void ImDrawList_AddNgonFilled(ImDrawList* self,const ImVec2 center,fl
|
|||||||
{
|
{
|
||||||
return self->AddNgonFilled(center,radius,col,num_segments);
|
return self->AddNgonFilled(center,radius,col,num_segments);
|
||||||
}
|
}
|
||||||
CIMGUI_API void ImDrawList_AddEllipse(ImDrawList* self,const ImVec2 center,ImVec2 radius,ImU32 col,float rot,int num_segments,float thickness)
|
CIMGUI_API void ImDrawList_AddEllipse(ImDrawList* self,const ImVec2 center,const ImVec2 radius,ImU32 col,float rot,int num_segments,float thickness)
|
||||||
{
|
{
|
||||||
return self->AddEllipse(center,radius,col,rot,num_segments,thickness);
|
return self->AddEllipse(center,radius,col,rot,num_segments,thickness);
|
||||||
}
|
}
|
||||||
CIMGUI_API void ImDrawList_AddEllipseFilled(ImDrawList* self,const ImVec2 center,ImVec2 radius,ImU32 col,float rot,int num_segments)
|
CIMGUI_API void ImDrawList_AddEllipseFilled(ImDrawList* self,const ImVec2 center,const ImVec2 radius,ImU32 col,float rot,int num_segments)
|
||||||
{
|
{
|
||||||
return self->AddEllipseFilled(center,radius,col,rot,num_segments);
|
return self->AddEllipseFilled(center,radius,col,rot,num_segments);
|
||||||
}
|
}
|
||||||
@ -2208,6 +2295,14 @@ CIMGUI_API void ImDrawList_AddText_FontPtr(ImDrawList* self,const ImFont* font,f
|
|||||||
{
|
{
|
||||||
return self->AddText(font,font_size,pos,col,text_begin,text_end,wrap_width,cpu_fine_clip_rect);
|
return self->AddText(font,font_size,pos,col,text_begin,text_end,wrap_width,cpu_fine_clip_rect);
|
||||||
}
|
}
|
||||||
|
CIMGUI_API void ImDrawList_AddBezierCubic(ImDrawList* self,const ImVec2 p1,const ImVec2 p2,const ImVec2 p3,const ImVec2 p4,ImU32 col,float thickness,int num_segments)
|
||||||
|
{
|
||||||
|
return self->AddBezierCubic(p1,p2,p3,p4,col,thickness,num_segments);
|
||||||
|
}
|
||||||
|
CIMGUI_API void ImDrawList_AddBezierQuadratic(ImDrawList* self,const ImVec2 p1,const ImVec2 p2,const ImVec2 p3,ImU32 col,float thickness,int num_segments)
|
||||||
|
{
|
||||||
|
return self->AddBezierQuadratic(p1,p2,p3,col,thickness,num_segments);
|
||||||
|
}
|
||||||
CIMGUI_API void ImDrawList_AddPolyline(ImDrawList* self,const ImVec2* points,int num_points,ImU32 col,ImDrawFlags flags,float thickness)
|
CIMGUI_API void ImDrawList_AddPolyline(ImDrawList* self,const ImVec2* points,int num_points,ImU32 col,ImDrawFlags flags,float thickness)
|
||||||
{
|
{
|
||||||
return self->AddPolyline(points,num_points,col,flags,thickness);
|
return self->AddPolyline(points,num_points,col,flags,thickness);
|
||||||
@ -2216,13 +2311,9 @@ CIMGUI_API void ImDrawList_AddConvexPolyFilled(ImDrawList* self,const ImVec2* po
|
|||||||
{
|
{
|
||||||
return self->AddConvexPolyFilled(points,num_points,col);
|
return self->AddConvexPolyFilled(points,num_points,col);
|
||||||
}
|
}
|
||||||
CIMGUI_API void ImDrawList_AddBezierCubic(ImDrawList* self,const ImVec2 p1,const ImVec2 p2,const ImVec2 p3,const ImVec2 p4,ImU32 col,float thickness,int num_segments)
|
CIMGUI_API void ImDrawList_AddConcavePolyFilled(ImDrawList* self,const ImVec2* points,int num_points,ImU32 col)
|
||||||
{
|
{
|
||||||
return self->AddBezierCubic(p1,p2,p3,p4,col,thickness,num_segments);
|
return self->AddConcavePolyFilled(points,num_points,col);
|
||||||
}
|
|
||||||
CIMGUI_API void ImDrawList_AddBezierQuadratic(ImDrawList* self,const ImVec2 p1,const ImVec2 p2,const ImVec2 p3,ImU32 col,float thickness,int num_segments)
|
|
||||||
{
|
|
||||||
return self->AddBezierQuadratic(p1,p2,p3,col,thickness,num_segments);
|
|
||||||
}
|
}
|
||||||
CIMGUI_API void ImDrawList_AddImage(ImDrawList* self,ImTextureID user_texture_id,const ImVec2 p_min,const ImVec2 p_max,const ImVec2 uv_min,const ImVec2 uv_max,ImU32 col)
|
CIMGUI_API void ImDrawList_AddImage(ImDrawList* self,ImTextureID user_texture_id,const ImVec2 p_min,const ImVec2 p_max,const ImVec2 uv_min,const ImVec2 uv_max,ImU32 col)
|
||||||
{
|
{
|
||||||
@ -2236,22 +2327,6 @@ CIMGUI_API void ImDrawList_AddImageRounded(ImDrawList* self,ImTextureID user_tex
|
|||||||
{
|
{
|
||||||
return self->AddImageRounded(user_texture_id,p_min,p_max,uv_min,uv_max,col,rounding,flags);
|
return self->AddImageRounded(user_texture_id,p_min,p_max,uv_min,uv_max,col,rounding,flags);
|
||||||
}
|
}
|
||||||
CIMGUI_API void ImDrawList_AddShadowRect(ImDrawList* self,const ImVec2 obj_min,const ImVec2 obj_max,ImU32 shadow_col,float shadow_thickness,const ImVec2 shadow_offset,ImDrawFlags flags,float obj_rounding)
|
|
||||||
{
|
|
||||||
return self->AddShadowRect(obj_min,obj_max,shadow_col,shadow_thickness,shadow_offset,flags,obj_rounding);
|
|
||||||
}
|
|
||||||
CIMGUI_API void ImDrawList_AddShadowCircle(ImDrawList* self,const ImVec2 obj_center,float obj_radius,ImU32 shadow_col,float shadow_thickness,const ImVec2 shadow_offset,ImDrawFlags flags,int obj_num_segments)
|
|
||||||
{
|
|
||||||
return self->AddShadowCircle(obj_center,obj_radius,shadow_col,shadow_thickness,shadow_offset,flags,obj_num_segments);
|
|
||||||
}
|
|
||||||
CIMGUI_API void ImDrawList_AddShadowConvexPoly(ImDrawList* self,const ImVec2* points,int points_count,ImU32 shadow_col,float shadow_thickness,const ImVec2 shadow_offset,ImDrawFlags flags)
|
|
||||||
{
|
|
||||||
return self->AddShadowConvexPoly(points,points_count,shadow_col,shadow_thickness,shadow_offset,flags);
|
|
||||||
}
|
|
||||||
CIMGUI_API void ImDrawList_AddShadowNGon(ImDrawList* self,const ImVec2 obj_center,float obj_radius,ImU32 shadow_col,float shadow_thickness,const ImVec2 shadow_offset,ImDrawFlags flags,int obj_num_segments)
|
|
||||||
{
|
|
||||||
return self->AddShadowNGon(obj_center,obj_radius,shadow_col,shadow_thickness,shadow_offset,flags,obj_num_segments);
|
|
||||||
}
|
|
||||||
CIMGUI_API void ImDrawList_PathClear(ImDrawList* self)
|
CIMGUI_API void ImDrawList_PathClear(ImDrawList* self)
|
||||||
{
|
{
|
||||||
return self->PathClear();
|
return self->PathClear();
|
||||||
@ -2268,6 +2343,10 @@ CIMGUI_API void ImDrawList_PathFillConvex(ImDrawList* self,ImU32 col)
|
|||||||
{
|
{
|
||||||
return self->PathFillConvex(col);
|
return self->PathFillConvex(col);
|
||||||
}
|
}
|
||||||
|
CIMGUI_API void ImDrawList_PathFillConcave(ImDrawList* self,ImU32 col)
|
||||||
|
{
|
||||||
|
return self->PathFillConcave(col);
|
||||||
|
}
|
||||||
CIMGUI_API void ImDrawList_PathStroke(ImDrawList* self,ImU32 col,ImDrawFlags flags,float thickness)
|
CIMGUI_API void ImDrawList_PathStroke(ImDrawList* self,ImU32 col,ImDrawFlags flags,float thickness)
|
||||||
{
|
{
|
||||||
return self->PathStroke(col,flags,thickness);
|
return self->PathStroke(col,flags,thickness);
|
||||||
@ -2280,7 +2359,7 @@ CIMGUI_API void ImDrawList_PathArcToFast(ImDrawList* self,const ImVec2 center,fl
|
|||||||
{
|
{
|
||||||
return self->PathArcToFast(center,radius,a_min_of_12,a_max_of_12);
|
return self->PathArcToFast(center,radius,a_min_of_12,a_max_of_12);
|
||||||
}
|
}
|
||||||
CIMGUI_API void ImDrawList_PathEllipticalArcTo(ImDrawList* self,const ImVec2 center,ImVec2 radius,float rot,float a_min,float a_max,int num_segments)
|
CIMGUI_API void ImDrawList_PathEllipticalArcTo(ImDrawList* self,const ImVec2 center,const ImVec2 radius,float rot,float a_min,float a_max,int num_segments)
|
||||||
{
|
{
|
||||||
return self->PathEllipticalArcTo(center,radius,rot,a_min,a_max,num_segments);
|
return self->PathEllipticalArcTo(center,radius,rot,a_min,a_max,num_segments);
|
||||||
}
|
}
|
||||||
@ -2344,7 +2423,7 @@ CIMGUI_API void ImDrawList_PrimWriteVtx(ImDrawList* self,const ImVec2 pos,const
|
|||||||
{
|
{
|
||||||
return self->PrimWriteVtx(pos,uv,col);
|
return self->PrimWriteVtx(pos,uv,col);
|
||||||
}
|
}
|
||||||
CIMGUI_API void ImDrawList_PrimWriteIdx(ImDrawList* self,unsigned int idx)
|
CIMGUI_API void ImDrawList_PrimWriteIdx(ImDrawList* self,ImDrawIdx idx)
|
||||||
{
|
{
|
||||||
return self->PrimWriteIdx(idx);
|
return self->PrimWriteIdx(idx);
|
||||||
}
|
}
|
||||||
@ -2416,38 +2495,6 @@ CIMGUI_API void ImDrawData_ScaleClipRects(ImDrawData* self,const ImVec2 fb_scale
|
|||||||
{
|
{
|
||||||
return self->ScaleClipRects(fb_scale);
|
return self->ScaleClipRects(fb_scale);
|
||||||
}
|
}
|
||||||
CIMGUI_API ImFontAtlasShadowTexConfig* ImFontAtlasShadowTexConfig_ImFontAtlasShadowTexConfig(void)
|
|
||||||
{
|
|
||||||
return IM_NEW(ImFontAtlasShadowTexConfig)();
|
|
||||||
}
|
|
||||||
CIMGUI_API void ImFontAtlasShadowTexConfig_destroy(ImFontAtlasShadowTexConfig* self)
|
|
||||||
{
|
|
||||||
IM_DELETE(self);
|
|
||||||
}
|
|
||||||
CIMGUI_API void ImFontAtlasShadowTexConfig_SetupDefaults(ImFontAtlasShadowTexConfig* self)
|
|
||||||
{
|
|
||||||
return self->SetupDefaults();
|
|
||||||
}
|
|
||||||
CIMGUI_API int ImFontAtlasShadowTexConfig_GetRectTexPadding(ImFontAtlasShadowTexConfig* self)
|
|
||||||
{
|
|
||||||
return self->GetRectTexPadding();
|
|
||||||
}
|
|
||||||
CIMGUI_API int ImFontAtlasShadowTexConfig_CalcRectTexSize(ImFontAtlasShadowTexConfig* self)
|
|
||||||
{
|
|
||||||
return self->CalcRectTexSize();
|
|
||||||
}
|
|
||||||
CIMGUI_API int ImFontAtlasShadowTexConfig_GetConvexTexPadding(ImFontAtlasShadowTexConfig* self)
|
|
||||||
{
|
|
||||||
return self->GetConvexTexPadding();
|
|
||||||
}
|
|
||||||
CIMGUI_API int ImFontAtlasShadowTexConfig_CalcConvexTexWidth(ImFontAtlasShadowTexConfig* self)
|
|
||||||
{
|
|
||||||
return self->CalcConvexTexWidth();
|
|
||||||
}
|
|
||||||
CIMGUI_API int ImFontAtlasShadowTexConfig_CalcConvexTexHeight(ImFontAtlasShadowTexConfig* self)
|
|
||||||
{
|
|
||||||
return self->CalcConvexTexHeight();
|
|
||||||
}
|
|
||||||
CIMGUI_API ImFontConfig* ImFontConfig_ImFontConfig(void)
|
CIMGUI_API ImFontConfig* ImFontConfig_ImFontConfig(void)
|
||||||
{
|
{
|
||||||
return IM_NEW(ImFontConfig)();
|
return IM_NEW(ImFontConfig)();
|
||||||
@ -2748,7 +2795,7 @@ CIMGUI_API ImGuiID igImHashStr(const char* data,size_t data_size,ImGuiID seed)
|
|||||||
{
|
{
|
||||||
return ImHashStr(data,data_size,seed);
|
return ImHashStr(data,data_size,seed);
|
||||||
}
|
}
|
||||||
CIMGUI_API void igImQsort(void* base,size_t count,size_t size_of_element,int(*compare_func)(const void*,const void*))
|
CIMGUI_API void igImQsort(void* base,size_t count,size_t size_of_element,int(*compare_func)(void const*,void const*))
|
||||||
{
|
{
|
||||||
return ImQsort(base,count,size_of_element,compare_func);
|
return ImQsort(base,count,size_of_element,compare_func);
|
||||||
}
|
}
|
||||||
@ -2828,6 +2875,10 @@ CIMGUI_API bool igImCharIsBlankW(unsigned int c)
|
|||||||
{
|
{
|
||||||
return ImCharIsBlankW(c);
|
return ImCharIsBlankW(c);
|
||||||
}
|
}
|
||||||
|
CIMGUI_API bool igImCharIsXdigitA(char c)
|
||||||
|
{
|
||||||
|
return ImCharIsXdigitA(c);
|
||||||
|
}
|
||||||
CIMGUI_API int igImFormatString(char* buf,size_t buf_size,const char* fmt,...)
|
CIMGUI_API int igImFormatString(char* buf,size_t buf_size,const char* fmt,...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
@ -2907,6 +2958,10 @@ CIMGUI_API const char* igImTextFindPreviousUtf8Codepoint(const char* in_text_sta
|
|||||||
{
|
{
|
||||||
return ImTextFindPreviousUtf8Codepoint(in_text_start,in_text_curr);
|
return ImTextFindPreviousUtf8Codepoint(in_text_start,in_text_curr);
|
||||||
}
|
}
|
||||||
|
CIMGUI_API int igImTextCountLines(const char* in_text,const char* in_text_end)
|
||||||
|
{
|
||||||
|
return ImTextCountLines(in_text,in_text_end);
|
||||||
|
}
|
||||||
CIMGUI_API ImFileHandle igImFileOpen(const char* filename,const char* mode)
|
CIMGUI_API ImFileHandle igImFileOpen(const char* filename,const char* mode)
|
||||||
{
|
{
|
||||||
return ImFileOpen(filename,mode);
|
return ImFileOpen(filename,mode);
|
||||||
@ -2983,7 +3038,7 @@ CIMGUI_API void igImMax(ImVec2 *pOut,const ImVec2 lhs,const ImVec2 rhs)
|
|||||||
{
|
{
|
||||||
*pOut = ImMax(lhs,rhs);
|
*pOut = ImMax(lhs,rhs);
|
||||||
}
|
}
|
||||||
CIMGUI_API void igImClamp(ImVec2 *pOut,const ImVec2 v,const ImVec2 mn,ImVec2 mx)
|
CIMGUI_API void igImClamp(ImVec2 *pOut,const ImVec2 v,const ImVec2 mn,const ImVec2 mx)
|
||||||
{
|
{
|
||||||
*pOut = ImClamp(v,mn,mx);
|
*pOut = ImClamp(v,mn,mx);
|
||||||
}
|
}
|
||||||
@ -3011,10 +3066,6 @@ CIMGUI_API float igImLengthSqr_Vec4(const ImVec4 lhs)
|
|||||||
{
|
{
|
||||||
return ImLengthSqr(lhs);
|
return ImLengthSqr(lhs);
|
||||||
}
|
}
|
||||||
CIMGUI_API float igImLength(const ImVec2 lhs,float fail_value)
|
|
||||||
{
|
|
||||||
return ImLength(lhs,fail_value);
|
|
||||||
}
|
|
||||||
CIMGUI_API float igImInvLength(const ImVec2 lhs,float fail_value)
|
CIMGUI_API float igImInvLength(const ImVec2 lhs,float fail_value)
|
||||||
{
|
{
|
||||||
return ImInvLength(lhs,fail_value);
|
return ImInvLength(lhs,fail_value);
|
||||||
@ -3051,6 +3102,10 @@ CIMGUI_API float igImLinearSweep(float current,float target,float speed)
|
|||||||
{
|
{
|
||||||
return ImLinearSweep(current,target,speed);
|
return ImLinearSweep(current,target,speed);
|
||||||
}
|
}
|
||||||
|
CIMGUI_API float igImLinearRemapClamp(float s0,float s1,float d0,float d1,float x)
|
||||||
|
{
|
||||||
|
return ImLinearRemapClamp(s0,s1,d0,d1,x);
|
||||||
|
}
|
||||||
CIMGUI_API void igImMul(ImVec2 *pOut,const ImVec2 lhs,const ImVec2 rhs)
|
CIMGUI_API void igImMul(ImVec2 *pOut,const ImVec2 lhs,const ImVec2 rhs)
|
||||||
{
|
{
|
||||||
*pOut = ImMul(lhs,rhs);
|
*pOut = ImMul(lhs,rhs);
|
||||||
@ -3099,6 +3154,10 @@ CIMGUI_API float igImTriangleArea(const ImVec2 a,const ImVec2 b,const ImVec2 c)
|
|||||||
{
|
{
|
||||||
return ImTriangleArea(a,b,c);
|
return ImTriangleArea(a,b,c);
|
||||||
}
|
}
|
||||||
|
CIMGUI_API bool igImTriangleIsClockwise(const ImVec2 a,const ImVec2 b,const ImVec2 c)
|
||||||
|
{
|
||||||
|
return ImTriangleIsClockwise(a,b,c);
|
||||||
|
}
|
||||||
CIMGUI_API ImVec1* ImVec1_ImVec1_Nil(void)
|
CIMGUI_API ImVec1* ImVec1_ImVec1_Nil(void)
|
||||||
{
|
{
|
||||||
return IM_NEW(ImVec1)();
|
return IM_NEW(ImVec1)();
|
||||||
@ -3311,6 +3370,10 @@ CIMGUI_API void ImGuiTextIndex_append(ImGuiTextIndex* self,const char* base,int
|
|||||||
{
|
{
|
||||||
return self->append(base,old_size,new_size);
|
return self->append(base,old_size,new_size);
|
||||||
}
|
}
|
||||||
|
CIMGUI_API ImGuiStoragePair* igImLowerBound(ImGuiStoragePair* in_begin,ImGuiStoragePair* in_end,ImGuiID key)
|
||||||
|
{
|
||||||
|
return ImLowerBound(in_begin,in_end,key);
|
||||||
|
}
|
||||||
CIMGUI_API ImDrawListSharedData* ImDrawListSharedData_ImDrawListSharedData(void)
|
CIMGUI_API ImDrawListSharedData* ImDrawListSharedData_ImDrawListSharedData(void)
|
||||||
{
|
{
|
||||||
return IM_NEW(ImDrawListSharedData)();
|
return IM_NEW(ImDrawListSharedData)();
|
||||||
@ -3331,6 +3394,10 @@ CIMGUI_API void ImDrawDataBuilder_destroy(ImDrawDataBuilder* self)
|
|||||||
{
|
{
|
||||||
IM_DELETE(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)
|
CIMGUI_API ImGuiStyleMod* ImGuiStyleMod_ImGuiStyleMod_Int(ImGuiStyleVar idx,int v)
|
||||||
{
|
{
|
||||||
return IM_NEW(ImGuiStyleMod)(idx,v);
|
return IM_NEW(ImGuiStyleMod)(idx,v);
|
||||||
@ -3519,10 +3586,6 @@ CIMGUI_API ImGuiPtrOrIndex* ImGuiPtrOrIndex_ImGuiPtrOrIndex_Int(int index)
|
|||||||
{
|
{
|
||||||
return IM_NEW(ImGuiPtrOrIndex)(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)
|
CIMGUI_API ImGuiPopupData* ImGuiPopupData_ImGuiPopupData(void)
|
||||||
{
|
{
|
||||||
return IM_NEW(ImGuiPopupData)();
|
return IM_NEW(ImGuiPopupData)();
|
||||||
@ -3627,6 +3690,38 @@ CIMGUI_API void ImGuiOldColumns_destroy(ImGuiOldColumns* self)
|
|||||||
{
|
{
|
||||||
IM_DELETE(self);
|
IM_DELETE(self);
|
||||||
}
|
}
|
||||||
|
CIMGUI_API ImGuiBoxSelectState* ImGuiBoxSelectState_ImGuiBoxSelectState(void)
|
||||||
|
{
|
||||||
|
return IM_NEW(ImGuiBoxSelectState)();
|
||||||
|
}
|
||||||
|
CIMGUI_API void ImGuiBoxSelectState_destroy(ImGuiBoxSelectState* self)
|
||||||
|
{
|
||||||
|
IM_DELETE(self);
|
||||||
|
}
|
||||||
|
CIMGUI_API ImGuiMultiSelectTempData* ImGuiMultiSelectTempData_ImGuiMultiSelectTempData(void)
|
||||||
|
{
|
||||||
|
return IM_NEW(ImGuiMultiSelectTempData)();
|
||||||
|
}
|
||||||
|
CIMGUI_API void ImGuiMultiSelectTempData_destroy(ImGuiMultiSelectTempData* self)
|
||||||
|
{
|
||||||
|
IM_DELETE(self);
|
||||||
|
}
|
||||||
|
CIMGUI_API void ImGuiMultiSelectTempData_Clear(ImGuiMultiSelectTempData* self)
|
||||||
|
{
|
||||||
|
return self->Clear();
|
||||||
|
}
|
||||||
|
CIMGUI_API void ImGuiMultiSelectTempData_ClearIO(ImGuiMultiSelectTempData* self)
|
||||||
|
{
|
||||||
|
return self->ClearIO();
|
||||||
|
}
|
||||||
|
CIMGUI_API ImGuiMultiSelectState* ImGuiMultiSelectState_ImGuiMultiSelectState(void)
|
||||||
|
{
|
||||||
|
return IM_NEW(ImGuiMultiSelectState)();
|
||||||
|
}
|
||||||
|
CIMGUI_API void ImGuiMultiSelectState_destroy(ImGuiMultiSelectState* self)
|
||||||
|
{
|
||||||
|
IM_DELETE(self);
|
||||||
|
}
|
||||||
CIMGUI_API ImGuiDockNode* ImGuiDockNode_ImGuiDockNode(ImGuiID id)
|
CIMGUI_API ImGuiDockNode* ImGuiDockNode_ImGuiDockNode(ImGuiID id)
|
||||||
{
|
{
|
||||||
return IM_NEW(ImGuiDockNode)(id);
|
return IM_NEW(ImGuiDockNode)(id);
|
||||||
@ -3819,18 +3914,10 @@ CIMGUI_API float ImGuiWindow_CalcFontSize(ImGuiWindow* self)
|
|||||||
{
|
{
|
||||||
return self->CalcFontSize();
|
return self->CalcFontSize();
|
||||||
}
|
}
|
||||||
CIMGUI_API float ImGuiWindow_TitleBarHeight(ImGuiWindow* self)
|
|
||||||
{
|
|
||||||
return self->TitleBarHeight;
|
|
||||||
}
|
|
||||||
CIMGUI_API void ImGuiWindow_TitleBarRect(ImRect *pOut,ImGuiWindow* self)
|
CIMGUI_API void ImGuiWindow_TitleBarRect(ImRect *pOut,ImGuiWindow* self)
|
||||||
{
|
{
|
||||||
*pOut = self->TitleBarRect();
|
*pOut = self->TitleBarRect();
|
||||||
}
|
}
|
||||||
CIMGUI_API float ImGuiWindow_MenuBarHeight(ImGuiWindow* self)
|
|
||||||
{
|
|
||||||
return self->MenuBarHeight;
|
|
||||||
}
|
|
||||||
CIMGUI_API void ImGuiWindow_MenuBarRect(ImRect *pOut,ImGuiWindow* self)
|
CIMGUI_API void ImGuiWindow_MenuBarRect(ImRect *pOut,ImGuiWindow* self)
|
||||||
{
|
{
|
||||||
*pOut = self->MenuBarRect();
|
*pOut = self->MenuBarRect();
|
||||||
@ -3923,6 +4010,10 @@ CIMGUI_API void igUpdateWindowParentAndRootLinks(ImGuiWindow* window,ImGuiWindow
|
|||||||
{
|
{
|
||||||
return ImGui::UpdateWindowParentAndRootLinks(window,flags,parent_window);
|
return ImGui::UpdateWindowParentAndRootLinks(window,flags,parent_window);
|
||||||
}
|
}
|
||||||
|
CIMGUI_API void igUpdateWindowSkipRefresh(ImGuiWindow* window)
|
||||||
|
{
|
||||||
|
return ImGui::UpdateWindowSkipRefresh(window);
|
||||||
|
}
|
||||||
CIMGUI_API void igCalcWindowNextAutoFitSize(ImVec2 *pOut,ImGuiWindow* window)
|
CIMGUI_API void igCalcWindowNextAutoFitSize(ImVec2 *pOut,ImGuiWindow* window)
|
||||||
{
|
{
|
||||||
*pOut = ImGui::CalcWindowNextAutoFitSize(window);
|
*pOut = ImGui::CalcWindowNextAutoFitSize(window);
|
||||||
@ -3979,6 +4070,10 @@ CIMGUI_API void igWindowPosRelToAbs(ImVec2 *pOut,ImGuiWindow* window,const ImVec
|
|||||||
{
|
{
|
||||||
*pOut = ImGui::WindowPosRelToAbs(window,p);
|
*pOut = ImGui::WindowPosRelToAbs(window,p);
|
||||||
}
|
}
|
||||||
|
CIMGUI_API void igWindowPosAbsToRel(ImVec2 *pOut,ImGuiWindow* window,const ImVec2 p)
|
||||||
|
{
|
||||||
|
*pOut = ImGui::WindowPosAbsToRel(window,p);
|
||||||
|
}
|
||||||
CIMGUI_API void igFocusWindow(ImGuiWindow* window,ImGuiFocusRequestFlags flags)
|
CIMGUI_API void igFocusWindow(ImGuiWindow* window,ImGuiFocusRequestFlags flags)
|
||||||
{
|
{
|
||||||
return ImGui::FocusWindow(window,flags);
|
return ImGui::FocusWindow(window,flags);
|
||||||
@ -4011,6 +4106,10 @@ CIMGUI_API ImGuiWindow* igFindBottomMostVisibleWindowWithinBeginStack(ImGuiWindo
|
|||||||
{
|
{
|
||||||
return ImGui::FindBottomMostVisibleWindowWithinBeginStack(window);
|
return ImGui::FindBottomMostVisibleWindowWithinBeginStack(window);
|
||||||
}
|
}
|
||||||
|
CIMGUI_API void igSetNextWindowRefreshPolicy(ImGuiWindowRefreshFlags flags)
|
||||||
|
{
|
||||||
|
return ImGui::SetNextWindowRefreshPolicy(flags);
|
||||||
|
}
|
||||||
CIMGUI_API void igSetCurrentFont(ImFont* font)
|
CIMGUI_API void igSetCurrentFont(ImFont* font)
|
||||||
{
|
{
|
||||||
return ImGui::SetCurrentFont(font);
|
return ImGui::SetCurrentFont(font);
|
||||||
@ -4043,6 +4142,10 @@ CIMGUI_API void igUpdateHoveredWindowAndCaptureFlags()
|
|||||||
{
|
{
|
||||||
return ImGui::UpdateHoveredWindowAndCaptureFlags();
|
return ImGui::UpdateHoveredWindowAndCaptureFlags();
|
||||||
}
|
}
|
||||||
|
CIMGUI_API void igFindHoveredWindowEx(const ImVec2 pos,bool find_first_and_in_any_viewport,ImGuiWindow** out_hovered_window,ImGuiWindow** out_hovered_window_under_moving_window)
|
||||||
|
{
|
||||||
|
return ImGui::FindHoveredWindowEx(pos,find_first_and_in_any_viewport,out_hovered_window,out_hovered_window_under_moving_window);
|
||||||
|
}
|
||||||
CIMGUI_API void igStartMouseMovingWindow(ImGuiWindow* window)
|
CIMGUI_API void igStartMouseMovingWindow(ImGuiWindow* window)
|
||||||
{
|
{
|
||||||
return ImGui::StartMouseMovingWindow(window);
|
return ImGui::StartMouseMovingWindow(window);
|
||||||
@ -4275,30 +4378,22 @@ CIMGUI_API void igPushMultiItemsWidths(int components,float width_full)
|
|||||||
{
|
{
|
||||||
return ImGui::PushMultiItemsWidths(components,width_full);
|
return ImGui::PushMultiItemsWidths(components,width_full);
|
||||||
}
|
}
|
||||||
CIMGUI_API bool igIsItemToggledSelection()
|
|
||||||
{
|
|
||||||
return ImGui::IsItemToggledSelection();
|
|
||||||
}
|
|
||||||
CIMGUI_API void igGetContentRegionMaxAbs(ImVec2 *pOut)
|
|
||||||
{
|
|
||||||
*pOut = ImGui::GetContentRegionMaxAbs();
|
|
||||||
}
|
|
||||||
CIMGUI_API void igShrinkWidths(ImGuiShrinkWidthItem* items,int count,float width_excess)
|
CIMGUI_API void igShrinkWidths(ImGuiShrinkWidthItem* items,int count,float width_excess)
|
||||||
{
|
{
|
||||||
return ImGui::ShrinkWidths(items,count,width_excess);
|
return ImGui::ShrinkWidths(items,count,width_excess);
|
||||||
}
|
}
|
||||||
CIMGUI_API void igPushItemFlag(ImGuiItemFlags option,bool enabled)
|
|
||||||
{
|
|
||||||
return ImGui::PushItemFlag(option,enabled);
|
|
||||||
}
|
|
||||||
CIMGUI_API void igPopItemFlag()
|
|
||||||
{
|
|
||||||
return ImGui::PopItemFlag();
|
|
||||||
}
|
|
||||||
CIMGUI_API const ImGuiDataVarInfo* igGetStyleVarInfo(ImGuiStyleVar idx)
|
CIMGUI_API const ImGuiDataVarInfo* igGetStyleVarInfo(ImGuiStyleVar idx)
|
||||||
{
|
{
|
||||||
return ImGui::GetStyleVarInfo(idx);
|
return ImGui::GetStyleVarInfo(idx);
|
||||||
}
|
}
|
||||||
|
CIMGUI_API void igBeginDisabledOverrideReenable()
|
||||||
|
{
|
||||||
|
return ImGui::BeginDisabledOverrideReenable();
|
||||||
|
}
|
||||||
|
CIMGUI_API void igEndDisabledOverrideReenable()
|
||||||
|
{
|
||||||
|
return ImGui::EndDisabledOverrideReenable();
|
||||||
|
}
|
||||||
CIMGUI_API void igLogBegin(ImGuiLogType type,int auto_open_depth)
|
CIMGUI_API void igLogBegin(ImGuiLogType type,int auto_open_depth)
|
||||||
{
|
{
|
||||||
return ImGui::LogBegin(type,auto_open_depth);
|
return ImGui::LogBegin(type,auto_open_depth);
|
||||||
@ -4319,6 +4414,10 @@ CIMGUI_API bool igBeginChildEx(const char* name,ImGuiID id,const ImVec2 size_arg
|
|||||||
{
|
{
|
||||||
return ImGui::BeginChildEx(name,id,size_arg,child_flags,window_flags);
|
return ImGui::BeginChildEx(name,id,size_arg,child_flags,window_flags);
|
||||||
}
|
}
|
||||||
|
CIMGUI_API bool igBeginPopupEx(ImGuiID id,ImGuiWindowFlags extra_window_flags)
|
||||||
|
{
|
||||||
|
return ImGui::BeginPopupEx(id,extra_window_flags);
|
||||||
|
}
|
||||||
CIMGUI_API void igOpenPopupEx(ImGuiID id,ImGuiPopupFlags popup_flags)
|
CIMGUI_API void igOpenPopupEx(ImGuiID id,ImGuiPopupFlags popup_flags)
|
||||||
{
|
{
|
||||||
return ImGui::OpenPopupEx(id,popup_flags);
|
return ImGui::OpenPopupEx(id,popup_flags);
|
||||||
@ -4339,18 +4438,6 @@ CIMGUI_API bool igIsPopupOpen_ID(ImGuiID id,ImGuiPopupFlags popup_flags)
|
|||||||
{
|
{
|
||||||
return ImGui::IsPopupOpen(id,popup_flags);
|
return ImGui::IsPopupOpen(id,popup_flags);
|
||||||
}
|
}
|
||||||
CIMGUI_API bool igBeginPopupEx(ImGuiID id,ImGuiWindowFlags extra_flags)
|
|
||||||
{
|
|
||||||
return ImGui::BeginPopupEx(id,extra_flags);
|
|
||||||
}
|
|
||||||
CIMGUI_API bool igBeginTooltipEx(ImGuiTooltipFlags tooltip_flags,ImGuiWindowFlags extra_window_flags)
|
|
||||||
{
|
|
||||||
return ImGui::BeginTooltipEx(tooltip_flags,extra_window_flags);
|
|
||||||
}
|
|
||||||
CIMGUI_API bool igBeginTooltipHidden()
|
|
||||||
{
|
|
||||||
return ImGui::BeginTooltipHidden();
|
|
||||||
}
|
|
||||||
CIMGUI_API void igGetPopupAllowedExtentRect(ImRect *pOut,ImGuiWindow* window)
|
CIMGUI_API void igGetPopupAllowedExtentRect(ImRect *pOut,ImGuiWindow* window)
|
||||||
{
|
{
|
||||||
*pOut = ImGui::GetPopupAllowedExtentRect(window);
|
*pOut = ImGui::GetPopupAllowedExtentRect(window);
|
||||||
@ -4375,6 +4462,14 @@ CIMGUI_API void igFindBestWindowPosForPopupEx(ImVec2 *pOut,const ImVec2 ref_pos,
|
|||||||
{
|
{
|
||||||
*pOut = ImGui::FindBestWindowPosForPopupEx(ref_pos,size,last_dir,r_outer,r_avoid,policy);
|
*pOut = ImGui::FindBestWindowPosForPopupEx(ref_pos,size,last_dir,r_outer,r_avoid,policy);
|
||||||
}
|
}
|
||||||
|
CIMGUI_API bool igBeginTooltipEx(ImGuiTooltipFlags tooltip_flags,ImGuiWindowFlags extra_window_flags)
|
||||||
|
{
|
||||||
|
return ImGui::BeginTooltipEx(tooltip_flags,extra_window_flags);
|
||||||
|
}
|
||||||
|
CIMGUI_API bool igBeginTooltipHidden()
|
||||||
|
{
|
||||||
|
return ImGui::BeginTooltipHidden();
|
||||||
|
}
|
||||||
CIMGUI_API bool igBeginViewportSideBar(const char* name,ImGuiViewport* viewport,ImGuiDir dir,float size,ImGuiWindowFlags window_flags)
|
CIMGUI_API bool igBeginViewportSideBar(const char* name,ImGuiViewport* viewport,ImGuiDir dir,float size,ImGuiWindowFlags window_flags)
|
||||||
{
|
{
|
||||||
return ImGui::BeginViewportSideBar(name,viewport,dir,size,window_flags);
|
return ImGui::BeginViewportSideBar(name,viewport,dir,size,window_flags);
|
||||||
@ -4423,7 +4518,7 @@ CIMGUI_API void igNavMoveRequestResolveWithLastItem(ImGuiNavItemData* result)
|
|||||||
{
|
{
|
||||||
return ImGui::NavMoveRequestResolveWithLastItem(result);
|
return ImGui::NavMoveRequestResolveWithLastItem(result);
|
||||||
}
|
}
|
||||||
CIMGUI_API void igNavMoveRequestResolveWithPastTreeNode(ImGuiNavItemData* result,ImGuiNavTreeNodeData* tree_node_data)
|
CIMGUI_API void igNavMoveRequestResolveWithPastTreeNode(ImGuiNavItemData* result,ImGuiTreeNodeStackData* tree_node_data)
|
||||||
{
|
{
|
||||||
return ImGui::NavMoveRequestResolveWithPastTreeNode(result,tree_node_data);
|
return ImGui::NavMoveRequestResolveWithPastTreeNode(result,tree_node_data);
|
||||||
}
|
}
|
||||||
@ -4575,7 +4670,7 @@ CIMGUI_API void igSetKeyOwnersForKeyChord(ImGuiKeyChord key,ImGuiID owner_id,ImG
|
|||||||
{
|
{
|
||||||
return ImGui::SetKeyOwnersForKeyChord(key,owner_id,flags);
|
return ImGui::SetKeyOwnersForKeyChord(key,owner_id,flags);
|
||||||
}
|
}
|
||||||
CIMGUI_API void igSetItemKeyOwner(ImGuiKey key,ImGuiInputFlags flags)
|
CIMGUI_API void igSetItemKeyOwner_InputFlags(ImGuiKey key,ImGuiInputFlags flags)
|
||||||
{
|
{
|
||||||
return ImGui::SetItemKeyOwner(key,flags);
|
return ImGui::SetItemKeyOwner(key,flags);
|
||||||
}
|
}
|
||||||
@ -4591,21 +4686,25 @@ CIMGUI_API bool igIsKeyDown_ID(ImGuiKey key,ImGuiID owner_id)
|
|||||||
{
|
{
|
||||||
return ImGui::IsKeyDown(key,owner_id);
|
return ImGui::IsKeyDown(key,owner_id);
|
||||||
}
|
}
|
||||||
CIMGUI_API bool igIsKeyPressed_ID(ImGuiKey key,ImGuiID owner_id,ImGuiInputFlags flags)
|
CIMGUI_API bool igIsKeyPressed_InputFlags(ImGuiKey key,ImGuiInputFlags flags,ImGuiID owner_id)
|
||||||
{
|
{
|
||||||
return ImGui::IsKeyPressed(key,owner_id,flags);
|
return ImGui::IsKeyPressed(key,flags,owner_id);
|
||||||
}
|
}
|
||||||
CIMGUI_API bool igIsKeyReleased_ID(ImGuiKey key,ImGuiID owner_id)
|
CIMGUI_API bool igIsKeyReleased_ID(ImGuiKey key,ImGuiID owner_id)
|
||||||
{
|
{
|
||||||
return ImGui::IsKeyReleased(key,owner_id);
|
return ImGui::IsKeyReleased(key,owner_id);
|
||||||
}
|
}
|
||||||
|
CIMGUI_API bool igIsKeyChordPressed_InputFlags(ImGuiKeyChord key_chord,ImGuiInputFlags flags,ImGuiID owner_id)
|
||||||
|
{
|
||||||
|
return ImGui::IsKeyChordPressed(key_chord,flags,owner_id);
|
||||||
|
}
|
||||||
CIMGUI_API bool igIsMouseDown_ID(ImGuiMouseButton button,ImGuiID owner_id)
|
CIMGUI_API bool igIsMouseDown_ID(ImGuiMouseButton button,ImGuiID owner_id)
|
||||||
{
|
{
|
||||||
return ImGui::IsMouseDown(button,owner_id);
|
return ImGui::IsMouseDown(button,owner_id);
|
||||||
}
|
}
|
||||||
CIMGUI_API bool igIsMouseClicked_ID(ImGuiMouseButton button,ImGuiID owner_id,ImGuiInputFlags flags)
|
CIMGUI_API bool igIsMouseClicked_InputFlags(ImGuiMouseButton button,ImGuiInputFlags flags,ImGuiID owner_id)
|
||||||
{
|
{
|
||||||
return ImGui::IsMouseClicked(button,owner_id,flags);
|
return ImGui::IsMouseClicked(button,flags,owner_id);
|
||||||
}
|
}
|
||||||
CIMGUI_API bool igIsMouseReleased_ID(ImGuiMouseButton button,ImGuiID owner_id)
|
CIMGUI_API bool igIsMouseReleased_ID(ImGuiMouseButton button,ImGuiID owner_id)
|
||||||
{
|
{
|
||||||
@ -4615,21 +4714,13 @@ CIMGUI_API bool igIsMouseDoubleClicked_ID(ImGuiMouseButton button,ImGuiID owner_
|
|||||||
{
|
{
|
||||||
return ImGui::IsMouseDoubleClicked(button,owner_id);
|
return ImGui::IsMouseDoubleClicked(button,owner_id);
|
||||||
}
|
}
|
||||||
CIMGUI_API bool igIsKeyChordPressed_ID(ImGuiKeyChord key_chord,ImGuiID owner_id,ImGuiInputFlags flags)
|
CIMGUI_API bool igShortcut_ID(ImGuiKeyChord key_chord,ImGuiInputFlags flags,ImGuiID owner_id)
|
||||||
{
|
{
|
||||||
return ImGui::IsKeyChordPressed(key_chord,owner_id,flags);
|
return ImGui::Shortcut(key_chord,flags,owner_id);
|
||||||
}
|
}
|
||||||
CIMGUI_API void igSetNextItemShortcut(ImGuiKeyChord key_chord)
|
CIMGUI_API bool igSetShortcutRouting(ImGuiKeyChord key_chord,ImGuiInputFlags flags,ImGuiID owner_id)
|
||||||
{
|
{
|
||||||
return ImGui::SetNextItemShortcut(key_chord);
|
return ImGui::SetShortcutRouting(key_chord,flags,owner_id);
|
||||||
}
|
|
||||||
CIMGUI_API bool igShortcut(ImGuiKeyChord key_chord,ImGuiID owner_id,ImGuiInputFlags flags)
|
|
||||||
{
|
|
||||||
return ImGui::Shortcut(key_chord,owner_id,flags);
|
|
||||||
}
|
|
||||||
CIMGUI_API bool igSetShortcutRouting(ImGuiKeyChord key_chord,ImGuiID owner_id,ImGuiInputFlags flags)
|
|
||||||
{
|
|
||||||
return ImGui::SetShortcutRouting(key_chord,owner_id,flags);
|
|
||||||
}
|
}
|
||||||
CIMGUI_API bool igTestShortcutRouting(ImGuiKeyChord key_chord,ImGuiID owner_id)
|
CIMGUI_API bool igTestShortcutRouting(ImGuiKeyChord key_chord,ImGuiID owner_id)
|
||||||
{
|
{
|
||||||
@ -4855,6 +4946,38 @@ CIMGUI_API int igTypingSelectFindBestLeadingMatch(ImGuiTypingSelectRequest* req,
|
|||||||
{
|
{
|
||||||
return ImGui::TypingSelectFindBestLeadingMatch(req,items_count,get_item_name_func,user_data);
|
return ImGui::TypingSelectFindBestLeadingMatch(req,items_count,get_item_name_func,user_data);
|
||||||
}
|
}
|
||||||
|
CIMGUI_API bool igBeginBoxSelect(const ImRect scope_rect,ImGuiWindow* window,ImGuiID box_select_id,ImGuiMultiSelectFlags ms_flags)
|
||||||
|
{
|
||||||
|
return ImGui::BeginBoxSelect(scope_rect,window,box_select_id,ms_flags);
|
||||||
|
}
|
||||||
|
CIMGUI_API void igEndBoxSelect(const ImRect scope_rect,ImGuiMultiSelectFlags ms_flags)
|
||||||
|
{
|
||||||
|
return ImGui::EndBoxSelect(scope_rect,ms_flags);
|
||||||
|
}
|
||||||
|
CIMGUI_API void igMultiSelectItemHeader(ImGuiID id,bool* p_selected,ImGuiButtonFlags* p_button_flags)
|
||||||
|
{
|
||||||
|
return ImGui::MultiSelectItemHeader(id,p_selected,p_button_flags);
|
||||||
|
}
|
||||||
|
CIMGUI_API void igMultiSelectItemFooter(ImGuiID id,bool* p_selected,bool* p_pressed)
|
||||||
|
{
|
||||||
|
return ImGui::MultiSelectItemFooter(id,p_selected,p_pressed);
|
||||||
|
}
|
||||||
|
CIMGUI_API void igMultiSelectAddSetAll(ImGuiMultiSelectTempData* ms,bool selected)
|
||||||
|
{
|
||||||
|
return ImGui::MultiSelectAddSetAll(ms,selected);
|
||||||
|
}
|
||||||
|
CIMGUI_API void igMultiSelectAddSetRange(ImGuiMultiSelectTempData* ms,bool selected,int range_dir,ImGuiSelectionUserData first_item,ImGuiSelectionUserData last_item)
|
||||||
|
{
|
||||||
|
return ImGui::MultiSelectAddSetRange(ms,selected,range_dir,first_item,last_item);
|
||||||
|
}
|
||||||
|
CIMGUI_API ImGuiBoxSelectState* igGetBoxSelectState(ImGuiID id)
|
||||||
|
{
|
||||||
|
return ImGui::GetBoxSelectState(id);
|
||||||
|
}
|
||||||
|
CIMGUI_API ImGuiMultiSelectState* igGetMultiSelectState(ImGuiID id)
|
||||||
|
{
|
||||||
|
return ImGui::GetMultiSelectState(id);
|
||||||
|
}
|
||||||
CIMGUI_API void igSetWindowClipRectBeforeSetChannel(ImGuiWindow* window,const ImRect clip_rect)
|
CIMGUI_API void igSetWindowClipRectBeforeSetChannel(ImGuiWindow* window,const ImRect clip_rect)
|
||||||
{
|
{
|
||||||
return ImGui::SetWindowClipRectBeforeSetChannel(window,clip_rect);
|
return ImGui::SetWindowClipRectBeforeSetChannel(window,clip_rect);
|
||||||
@ -4907,10 +5030,6 @@ CIMGUI_API void igTableSetColumnSortDirection(int column_n,ImGuiSortDirection so
|
|||||||
{
|
{
|
||||||
return ImGui::TableSetColumnSortDirection(column_n,sort_direction,append_to_sort_specs);
|
return ImGui::TableSetColumnSortDirection(column_n,sort_direction,append_to_sort_specs);
|
||||||
}
|
}
|
||||||
CIMGUI_API int igTableGetHoveredColumn()
|
|
||||||
{
|
|
||||||
return ImGui::TableGetHoveredColumn();
|
|
||||||
}
|
|
||||||
CIMGUI_API int igTableGetHoveredRow()
|
CIMGUI_API int igTableGetHoveredRow()
|
||||||
{
|
{
|
||||||
return ImGui::TableGetHoveredRow();
|
return ImGui::TableGetHoveredRow();
|
||||||
@ -4931,7 +5050,7 @@ CIMGUI_API void igTablePopBackgroundChannel()
|
|||||||
{
|
{
|
||||||
return ImGui::TablePopBackgroundChannel();
|
return ImGui::TablePopBackgroundChannel();
|
||||||
}
|
}
|
||||||
CIMGUI_API void igTableAngledHeadersRowEx(ImGuiID row_id, float angle,float max_label_width, const ImGuiTableHeaderData *data, int data_count)
|
CIMGUI_API void igTableAngledHeadersRowEx(ImGuiID row_id,float angle,float max_label_width,const ImGuiTableHeaderData* data,int data_count)
|
||||||
{
|
{
|
||||||
return ImGui::TableAngledHeadersRowEx(row_id,angle,max_label_width,data,data_count);
|
return ImGui::TableAngledHeadersRowEx(row_id,angle,max_label_width,data,data_count);
|
||||||
}
|
}
|
||||||
@ -5343,17 +5462,17 @@ CIMGUI_API void igTreePushOverrideID(ImGuiID id)
|
|||||||
{
|
{
|
||||||
return ImGui::TreePushOverrideID(id);
|
return ImGui::TreePushOverrideID(id);
|
||||||
}
|
}
|
||||||
CIMGUI_API void igTreeNodeSetOpen(ImGuiID id,bool open)
|
CIMGUI_API bool igTreeNodeGetOpen(ImGuiID storage_id)
|
||||||
{
|
{
|
||||||
return ImGui::TreeNodeSetOpen(id,open);
|
return ImGui::TreeNodeGetOpen(storage_id);
|
||||||
}
|
}
|
||||||
CIMGUI_API bool igTreeNodeUpdateNextOpen(ImGuiID id,ImGuiTreeNodeFlags flags)
|
CIMGUI_API void igTreeNodeSetOpen(ImGuiID storage_id,bool open)
|
||||||
{
|
{
|
||||||
return ImGui::TreeNodeUpdateNextOpen(id,flags);
|
return ImGui::TreeNodeSetOpen(storage_id,open);
|
||||||
}
|
}
|
||||||
CIMGUI_API void igSetNextItemSelectionUserData(ImGuiSelectionUserData selection_user_data)
|
CIMGUI_API bool igTreeNodeUpdateNextOpen(ImGuiID storage_id,ImGuiTreeNodeFlags flags)
|
||||||
{
|
{
|
||||||
return ImGui::SetNextItemSelectionUserData(selection_user_data);
|
return ImGui::TreeNodeUpdateNextOpen(storage_id,flags);
|
||||||
}
|
}
|
||||||
CIMGUI_API const ImGuiDataTypeInfo* igDataTypeGetInfo(ImGuiDataType data_type)
|
CIMGUI_API const ImGuiDataTypeInfo* igDataTypeGetInfo(ImGuiDataType data_type)
|
||||||
{
|
{
|
||||||
@ -5367,9 +5486,9 @@ CIMGUI_API void igDataTypeApplyOp(ImGuiDataType data_type,int op,void* output,co
|
|||||||
{
|
{
|
||||||
return ImGui::DataTypeApplyOp(data_type,op,output,arg_1,arg_2);
|
return ImGui::DataTypeApplyOp(data_type,op,output,arg_1,arg_2);
|
||||||
}
|
}
|
||||||
CIMGUI_API bool igDataTypeApplyFromText(const char* buf,ImGuiDataType data_type,void* p_data,const char* format)
|
CIMGUI_API bool igDataTypeApplyFromText(const char* buf,ImGuiDataType data_type,void* p_data,const char* format,void* p_data_when_empty)
|
||||||
{
|
{
|
||||||
return ImGui::DataTypeApplyFromText(buf,data_type,p_data,format);
|
return ImGui::DataTypeApplyFromText(buf,data_type,p_data,format,p_data_when_empty);
|
||||||
}
|
}
|
||||||
CIMGUI_API int igDataTypeCompare(ImGuiDataType data_type,const void* arg_1,const void* arg_2)
|
CIMGUI_API int igDataTypeCompare(ImGuiDataType data_type,const void* arg_1,const void* arg_2)
|
||||||
{
|
{
|
||||||
@ -5403,6 +5522,10 @@ CIMGUI_API ImGuiInputTextState* igGetInputTextState(ImGuiID id)
|
|||||||
{
|
{
|
||||||
return ImGui::GetInputTextState(id);
|
return ImGui::GetInputTextState(id);
|
||||||
}
|
}
|
||||||
|
CIMGUI_API void igSetNextItemRefVal(ImGuiDataType data_type,void* p_data)
|
||||||
|
{
|
||||||
|
return ImGui::SetNextItemRefVal(data_type,p_data);
|
||||||
|
}
|
||||||
CIMGUI_API void igColorTooltip(const char* text,const float* col,ImGuiColorEditFlags flags)
|
CIMGUI_API void igColorTooltip(const char* text,const float* col,ImGuiColorEditFlags flags)
|
||||||
{
|
{
|
||||||
return ImGui::ColorTooltip(text,col,flags);
|
return ImGui::ColorTooltip(text,col,flags);
|
||||||
@ -5443,17 +5566,6 @@ CIMGUI_API void igGcAwakeTransientWindowBuffers(ImGuiWindow* window)
|
|||||||
{
|
{
|
||||||
return ImGui::GcAwakeTransientWindowBuffers(window);
|
return ImGui::GcAwakeTransientWindowBuffers(window);
|
||||||
}
|
}
|
||||||
CIMGUI_API void igDebugLog(const char* fmt,...)
|
|
||||||
{
|
|
||||||
va_list args;
|
|
||||||
va_start(args, fmt);
|
|
||||||
ImGui::DebugLogV(fmt,args);
|
|
||||||
va_end(args);
|
|
||||||
}
|
|
||||||
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)
|
CIMGUI_API void igDebugAllocHook(ImGuiDebugAllocInfo* info,int frame_count,void* ptr,size_t size)
|
||||||
{
|
{
|
||||||
return ImGui::DebugAllocHook(info,frame_count,ptr,size);
|
return ImGui::DebugAllocHook(info,frame_count,ptr,size);
|
||||||
@ -5482,6 +5594,10 @@ CIMGUI_API void igDebugDrawItemRect(ImU32 col)
|
|||||||
{
|
{
|
||||||
return ImGui::DebugDrawItemRect(col);
|
return ImGui::DebugDrawItemRect(col);
|
||||||
}
|
}
|
||||||
|
CIMGUI_API void igDebugTextUnformattedWithLocateItem(const char* line_begin,const char* line_end)
|
||||||
|
{
|
||||||
|
return ImGui::DebugTextUnformattedWithLocateItem(line_begin,line_end);
|
||||||
|
}
|
||||||
CIMGUI_API void igDebugLocateItem(ImGuiID target_id)
|
CIMGUI_API void igDebugLocateItem(ImGuiID target_id)
|
||||||
{
|
{
|
||||||
return ImGui::DebugLocateItem(target_id);
|
return ImGui::DebugLocateItem(target_id);
|
||||||
@ -5562,6 +5678,10 @@ CIMGUI_API void igDebugNodeTypingSelectState(ImGuiTypingSelectState* state)
|
|||||||
{
|
{
|
||||||
return ImGui::DebugNodeTypingSelectState(state);
|
return ImGui::DebugNodeTypingSelectState(state);
|
||||||
}
|
}
|
||||||
|
CIMGUI_API void igDebugNodeMultiSelectState(ImGuiMultiSelectState* state)
|
||||||
|
{
|
||||||
|
return ImGui::DebugNodeMultiSelectState(state);
|
||||||
|
}
|
||||||
CIMGUI_API void igDebugNodeWindow(ImGuiWindow* window,const char* label)
|
CIMGUI_API void igDebugNodeWindow(ImGuiWindow* window,const char* label)
|
||||||
{
|
{
|
||||||
return ImGui::DebugNodeWindow(window,label);
|
return ImGui::DebugNodeWindow(window,label);
|
||||||
@ -5582,6 +5702,10 @@ CIMGUI_API void igDebugNodeViewport(ImGuiViewportP* viewport)
|
|||||||
{
|
{
|
||||||
return ImGui::DebugNodeViewport(viewport);
|
return ImGui::DebugNodeViewport(viewport);
|
||||||
}
|
}
|
||||||
|
CIMGUI_API void igDebugNodePlatformMonitor(ImGuiPlatformMonitor* monitor,const char* label,int idx)
|
||||||
|
{
|
||||||
|
return ImGui::DebugNodePlatformMonitor(monitor,label,idx);
|
||||||
|
}
|
||||||
CIMGUI_API void igDebugRenderKeyboardPreview(ImDrawList* draw_list)
|
CIMGUI_API void igDebugRenderKeyboardPreview(ImDrawList* draw_list)
|
||||||
{
|
{
|
||||||
return ImGui::DebugRenderKeyboardPreview(draw_list);
|
return ImGui::DebugRenderKeyboardPreview(draw_list);
|
||||||
@ -5626,22 +5750,6 @@ CIMGUI_API void igImFontAtlasBuildMultiplyRectAlpha8(const unsigned char table[2
|
|||||||
{
|
{
|
||||||
return ImFontAtlasBuildMultiplyRectAlpha8(table,pixels,x,y,w,h,stride);
|
return ImFontAtlasBuildMultiplyRectAlpha8(table,pixels,x,y,w,h,stride);
|
||||||
}
|
}
|
||||||
CIMGUI_API void igImGuiTestEngineHook_ItemAdd(ImGuiContext* ctx,ImGuiID id,const ImRect bb,const ImGuiLastItemData* item_data)
|
|
||||||
{
|
|
||||||
return ImGuiTestEngineHook_ItemAdd(ctx,id,bb,item_data);
|
|
||||||
}
|
|
||||||
CIMGUI_API void igImGuiTestEngineHook_ItemInfo(ImGuiContext* ctx,ImGuiID id,const char* label,ImGuiItemStatusFlags flags)
|
|
||||||
{
|
|
||||||
return ImGuiTestEngineHook_ItemInfo(ctx,id,label,flags);
|
|
||||||
}
|
|
||||||
CIMGUI_API void igImGuiTestEngineHook_Log(ImGuiContext* ctx,const char* fmt,...)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
CIMGUI_API const char* igImGuiTestEngine_FindItemDebugLabel(ImGuiContext* ctx,ImGuiID id)
|
|
||||||
{
|
|
||||||
return ImGuiTestEngine_FindItemDebugLabel(ctx,id);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -5715,7 +5823,7 @@ CimguiStorage& GetCimguiStorage()
|
|||||||
ImGuiIO& io = ImGui::GetIO();
|
ImGuiIO& io = ImGui::GetIO();
|
||||||
if (io.BackendLanguageUserData == NULL)
|
if (io.BackendLanguageUserData == NULL)
|
||||||
{
|
{
|
||||||
io.BackendLanguageUserData = new CimguiStorage();
|
io.BackendLanguageUserData = IM_NEW(CimguiStorage)();
|
||||||
}
|
}
|
||||||
|
|
||||||
return *(CimguiStorage*)io.BackendLanguageUserData;
|
return *(CimguiStorage*)io.BackendLanguageUserData;
|
||||||
|
312
lib/third_party/imgui/imgui/include/imgui.h
vendored
312
lib/third_party/imgui/imgui/include/imgui.h
vendored
@ -1,4 +1,4 @@
|
|||||||
// dear imgui, v1.90.9
|
// dear imgui, v1.91.0
|
||||||
// (headers)
|
// (headers)
|
||||||
|
|
||||||
// Help:
|
// Help:
|
||||||
@ -27,8 +27,8 @@
|
|||||||
|
|
||||||
// Library Version
|
// Library Version
|
||||||
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM >= 12345')
|
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM >= 12345')
|
||||||
#define IMGUI_VERSION "1.90.9"
|
#define IMGUI_VERSION "1.91.0"
|
||||||
#define IMGUI_VERSION_NUM 19090
|
#define IMGUI_VERSION_NUM 19100
|
||||||
#define IMGUI_HAS_TABLE
|
#define IMGUI_HAS_TABLE
|
||||||
#define IMGUI_HAS_VIEWPORT // Viewport WIP branch
|
#define IMGUI_HAS_VIEWPORT // Viewport WIP branch
|
||||||
#define IMGUI_HAS_DOCK // Docking WIP branch
|
#define IMGUI_HAS_DOCK // Docking WIP branch
|
||||||
@ -41,11 +41,12 @@ Index of this file:
|
|||||||
// [SECTION] Dear ImGui end-user API functions
|
// [SECTION] Dear ImGui end-user API functions
|
||||||
// [SECTION] Flags & Enumerations
|
// [SECTION] Flags & Enumerations
|
||||||
// [SECTION] Tables API flags and structures (ImGuiTableFlags, ImGuiTableColumnFlags, ImGuiTableRowFlags, ImGuiTableBgTarget, ImGuiTableSortSpecs, ImGuiTableColumnSortSpecs)
|
// [SECTION] Tables API flags and structures (ImGuiTableFlags, ImGuiTableColumnFlags, ImGuiTableRowFlags, ImGuiTableBgTarget, ImGuiTableSortSpecs, ImGuiTableColumnSortSpecs)
|
||||||
// [SECTION] Helpers: Memory allocations macros, ImVector<>
|
// [SECTION] Helpers: Debug log, Memory allocations macros, ImVector<>
|
||||||
// [SECTION] ImGuiStyle
|
// [SECTION] ImGuiStyle
|
||||||
// [SECTION] ImGuiIO
|
// [SECTION] ImGuiIO
|
||||||
// [SECTION] Misc data structures (ImGuiInputTextCallbackData, ImGuiSizeCallbackData, ImGuiWindowClass, ImGuiPayload)
|
// [SECTION] Misc data structures (ImGuiInputTextCallbackData, ImGuiSizeCallbackData, ImGuiWindowClass, ImGuiPayload)
|
||||||
// [SECTION] Helpers (ImGuiOnceUponAFrame, ImGuiTextFilter, ImGuiTextBuffer, ImGuiStorage, ImGuiListClipper, Math Operators, ImColor)
|
// [SECTION] Helpers (ImGuiOnceUponAFrame, ImGuiTextFilter, ImGuiTextBuffer, ImGuiStorage, ImGuiListClipper, Math Operators, ImColor)
|
||||||
|
// [SECTION] Multi-Select API flags and structures (ImGuiMultiSelectFlags, ImGuiMultiSelectIO, ImGuiSelectionRequest, ImGuiSelectionBasicStorage, ImGuiSelectionExternalStorage)
|
||||||
// [SECTION] Drawing API (ImDrawCallback, ImDrawCmd, ImDrawIdx, ImDrawVert, ImDrawChannel, ImDrawListSplitter, ImDrawFlags, ImDrawListFlags, ImDrawList, ImDrawData)
|
// [SECTION] Drawing API (ImDrawCallback, ImDrawCmd, ImDrawIdx, ImDrawVert, ImDrawChannel, ImDrawListSplitter, ImDrawFlags, ImDrawListFlags, ImDrawList, ImDrawData)
|
||||||
// [SECTION] Font API (ImFontConfig, ImFontGlyph, ImFontGlyphRangesBuilder, ImFontAtlasFlags, ImFontAtlas, ImFont)
|
// [SECTION] Font API (ImFontConfig, ImFontGlyph, ImFontGlyphRangesBuilder, ImFontAtlasFlags, ImFontAtlas, ImFont)
|
||||||
// [SECTION] Viewports (ImGuiViewportFlags, ImGuiViewport)
|
// [SECTION] Viewports (ImGuiViewportFlags, ImGuiViewport)
|
||||||
@ -176,11 +177,15 @@ struct ImGuiIO; // Main configuration and I/O between your a
|
|||||||
struct ImGuiInputTextCallbackData; // Shared state of InputText() when using custom ImGuiInputTextCallback (rare/advanced use)
|
struct ImGuiInputTextCallbackData; // Shared state of InputText() when using custom ImGuiInputTextCallback (rare/advanced use)
|
||||||
struct ImGuiKeyData; // Storage for ImGuiIO and IsKeyDown(), IsKeyPressed() etc functions.
|
struct ImGuiKeyData; // Storage for ImGuiIO and IsKeyDown(), IsKeyPressed() etc functions.
|
||||||
struct ImGuiListClipper; // Helper to manually clip large list of items
|
struct ImGuiListClipper; // Helper to manually clip large list of items
|
||||||
|
struct ImGuiMultiSelectIO; // Structure to interact with a BeginMultiSelect()/EndMultiSelect() block
|
||||||
struct ImGuiOnceUponAFrame; // Helper for running a block of code not more than once a frame
|
struct ImGuiOnceUponAFrame; // Helper for running a block of code not more than once a frame
|
||||||
struct ImGuiPayload; // User data payload for drag and drop operations
|
struct ImGuiPayload; // User data payload for drag and drop operations
|
||||||
struct ImGuiPlatformIO; // Multi-viewport support: interface for Platform/Renderer backends + viewports to render
|
struct ImGuiPlatformIO; // Multi-viewport support: interface for Platform/Renderer backends + viewports to render
|
||||||
struct ImGuiPlatformMonitor; // Multi-viewport support: user-provided bounds for each connected monitor/display. Used when positioning popups and tooltips to avoid them straddling monitors
|
struct ImGuiPlatformMonitor; // Multi-viewport support: user-provided bounds for each connected monitor/display. Used when positioning popups and tooltips to avoid them straddling monitors
|
||||||
struct ImGuiPlatformImeData; // Platform IME data for io.SetPlatformImeDataFn() function.
|
struct ImGuiPlatformImeData; // Platform IME data for io.PlatformSetImeDataFn() function.
|
||||||
|
struct ImGuiSelectionBasicStorage; // Optional helper to store multi-selection state + apply multi-selection requests.
|
||||||
|
struct ImGuiSelectionExternalStorage;//Optional helper to apply multi-selection requests to existing randomly accessible storage.
|
||||||
|
struct ImGuiSelectionRequest; // A selection request (stored in ImGuiMultiSelectIO)
|
||||||
struct ImGuiSizeCallbackData; // Callback data when using SetNextWindowSizeConstraints() (rare/advanced use)
|
struct ImGuiSizeCallbackData; // Callback data when using SetNextWindowSizeConstraints() (rare/advanced use)
|
||||||
struct ImGuiStorage; // Helper for key->value storage (container sorted by key)
|
struct ImGuiStorage; // Helper for key->value storage (container sorted by key)
|
||||||
struct ImGuiStoragePair; // Helper for key->value storage (pair)
|
struct ImGuiStoragePair; // Helper for key->value storage (pair)
|
||||||
@ -230,8 +235,10 @@ typedef int ImGuiFocusedFlags; // -> enum ImGuiFocusedFlags_ // Flags: f
|
|||||||
typedef int ImGuiHoveredFlags; // -> enum ImGuiHoveredFlags_ // Flags: for IsItemHovered(), IsWindowHovered() etc.
|
typedef int ImGuiHoveredFlags; // -> enum ImGuiHoveredFlags_ // Flags: for IsItemHovered(), IsWindowHovered() etc.
|
||||||
typedef int ImGuiInputFlags; // -> enum ImGuiInputFlags_ // Flags: for Shortcut(), SetNextItemShortcut()
|
typedef int ImGuiInputFlags; // -> enum ImGuiInputFlags_ // Flags: for Shortcut(), SetNextItemShortcut()
|
||||||
typedef int ImGuiInputTextFlags; // -> enum ImGuiInputTextFlags_ // Flags: for InputText(), InputTextMultiline()
|
typedef int ImGuiInputTextFlags; // -> enum ImGuiInputTextFlags_ // Flags: for InputText(), InputTextMultiline()
|
||||||
|
typedef int ImGuiItemFlags; // -> enum ImGuiItemFlags_ // Flags: for PushItemFlag(), shared by all items
|
||||||
typedef int ImGuiKeyChord; // -> ImGuiKey | ImGuiMod_XXX // Flags: for IsKeyChordPressed(), Shortcut() etc. an ImGuiKey optionally OR-ed with one or more ImGuiMod_XXX values.
|
typedef int 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 ImGuiPopupFlags; // -> enum ImGuiPopupFlags_ // Flags: for OpenPopup*(), BeginPopupContext*(), IsPopupOpen()
|
||||||
|
typedef int ImGuiMultiSelectFlags; // -> enum ImGuiMultiSelectFlags_// Flags: for BeginMultiSelect()
|
||||||
typedef int ImGuiSelectableFlags; // -> enum ImGuiSelectableFlags_ // Flags: for Selectable()
|
typedef int ImGuiSelectableFlags; // -> enum ImGuiSelectableFlags_ // Flags: for Selectable()
|
||||||
typedef int ImGuiSliderFlags; // -> enum ImGuiSliderFlags_ // Flags: for DragFloat(), DragInt(), SliderFloat(), SliderInt() etc.
|
typedef int ImGuiSliderFlags; // -> enum ImGuiSliderFlags_ // Flags: for DragFloat(), DragInt(), SliderFloat(), SliderInt() etc.
|
||||||
typedef int ImGuiTabBarFlags; // -> enum ImGuiTabBarFlags_ // Flags: for BeginTabBar()
|
typedef int ImGuiTabBarFlags; // -> enum ImGuiTabBarFlags_ // Flags: for BeginTabBar()
|
||||||
@ -267,6 +274,11 @@ typedef ImWchar32 ImWchar;
|
|||||||
typedef ImWchar16 ImWchar;
|
typedef ImWchar16 ImWchar;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Multi-Selection item index or identifier when using BeginMultiSelect()
|
||||||
|
// - Used by SetNextItemSelectionUserData() + and inside ImGuiMultiSelectIO structure.
|
||||||
|
// - Most users are likely to use this store an item INDEX but this may be used to store a POINTER/ID as well. Read comments near ImGuiMultiSelectIO for details.
|
||||||
|
typedef ImS64 ImGuiSelectionUserData;
|
||||||
|
|
||||||
// Callback and functions types
|
// Callback and functions types
|
||||||
typedef int (*ImGuiInputTextCallback)(ImGuiInputTextCallbackData* data); // Callback function for ImGui::InputText()
|
typedef int (*ImGuiInputTextCallback)(ImGuiInputTextCallbackData* data); // Callback function for ImGui::InputText()
|
||||||
typedef void (*ImGuiSizeCallback)(ImGuiSizeCallbackData* data); // Callback function for ImGui::SetNextWindowSizeConstraints()
|
typedef void (*ImGuiSizeCallback)(ImGuiSizeCallbackData* data); // Callback function for ImGui::SetNextWindowSizeConstraints()
|
||||||
@ -387,10 +399,10 @@ namespace ImGui
|
|||||||
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 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 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 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, GetCursorScreenPos())
|
IMGUI_API ImVec2 GetWindowPos(); // get current window position in screen space (IT IS UNLIKELY YOU EVER NEED TO USE THIS. Consider always using GetCursorScreenPos() and GetContentRegionAvail() instead)
|
||||||
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 ImVec2 GetWindowSize(); // get current window size (IT IS UNLIKELY YOU EVER NEED TO USE THIS. Consider always using GetCursorScreenPos() and GetContentRegionAvail() instead)
|
||||||
IMGUI_API float GetWindowWidth(); // get current window width (shortcut for GetWindowSize().x)
|
IMGUI_API float GetWindowWidth(); // get current window width (IT IS UNLIKELY YOU EVER NEED TO USE THIS). Shortcut for GetWindowSize().x.
|
||||||
IMGUI_API float GetWindowHeight(); // get current window height (shortcut for GetWindowSize().y)
|
IMGUI_API float GetWindowHeight(); // get current window height (IT IS UNLIKELY YOU EVER NEED TO USE THIS). Shortcut for GetWindowSize().y.
|
||||||
IMGUI_API ImGuiViewport*GetWindowViewport(); // get viewport currently associated to the current window.
|
IMGUI_API ImGuiViewport*GetWindowViewport(); // get viewport currently associated to the current window.
|
||||||
|
|
||||||
// Window manipulation
|
// Window manipulation
|
||||||
@ -414,14 +426,6 @@ namespace ImGui
|
|||||||
IMGUI_API void SetWindowCollapsed(const char* name, bool collapsed, ImGuiCond cond = 0); // set named window collapsed state
|
IMGUI_API void SetWindowCollapsed(const char* name, bool collapsed, ImGuiCond cond = 0); // set named window collapsed state
|
||||||
IMGUI_API void SetWindowFocus(const char* name); // set named window to be focused / top-most. use NULL to remove focus.
|
IMGUI_API void SetWindowFocus(const char* name); // set named window to be focused / top-most. use NULL to remove focus.
|
||||||
|
|
||||||
// Content region
|
|
||||||
// - Retrieve available space from a given point. GetContentRegionAvail() is frequently useful.
|
|
||||||
// - Those functions are bound to be redesigned (they are confusing, incomplete and the Min/Max return values are in local window coordinates which increases confusion)
|
|
||||||
IMGUI_API ImVec2 GetContentRegionAvail(); // == GetContentRegionMax() - GetCursorPos()
|
|
||||||
IMGUI_API ImVec2 GetContentRegionMax(); // current content boundaries (typically window boundaries including scrolling, or current column boundaries), in windows coordinates
|
|
||||||
IMGUI_API ImVec2 GetWindowContentRegionMin(); // content boundaries min for the full window (roughly (0,0)-Scroll), in window coordinates
|
|
||||||
IMGUI_API ImVec2 GetWindowContentRegionMax(); // content boundaries max for the full window (roughly (0,0)+Size-Scroll) where Size can be overridden with SetNextWindowContentSize(), in window coordinates
|
|
||||||
|
|
||||||
// Windows Scrolling
|
// Windows Scrolling
|
||||||
// - Any change of Scroll will be applied at the beginning of next frame in the first call to Begin().
|
// - Any change of Scroll will be applied at the beginning of next frame in the first call to Begin().
|
||||||
// - You may instead use SetNextWindowScroll() prior to calling Begin() to avoid this delay, as an alternative to using SetScrollX()/SetScrollY().
|
// - You may instead use SetNextWindowScroll() prior to calling Begin() to avoid this delay, as an alternative to using SetScrollX()/SetScrollY().
|
||||||
@ -445,10 +449,8 @@ namespace ImGui
|
|||||||
IMGUI_API void PushStyleVar(ImGuiStyleVar idx, float val); // modify a style float variable. always use this if you modify the style after NewFrame().
|
IMGUI_API void PushStyleVar(ImGuiStyleVar idx, float val); // modify a style float variable. always use this if you modify the style after NewFrame().
|
||||||
IMGUI_API void PushStyleVar(ImGuiStyleVar idx, const ImVec2& val); // modify a style ImVec2 variable. always use this if you modify the style after NewFrame().
|
IMGUI_API void PushStyleVar(ImGuiStyleVar idx, const ImVec2& val); // modify a style ImVec2 variable. always use this if you modify the style after NewFrame().
|
||||||
IMGUI_API void PopStyleVar(int count = 1);
|
IMGUI_API void PopStyleVar(int count = 1);
|
||||||
IMGUI_API void PushTabStop(bool tab_stop); // == tab stop enable. Allow focusing using TAB/Shift-TAB, enabled by default but you can disable it for certain widgets
|
IMGUI_API void PushItemFlag(ImGuiItemFlags option, bool enabled); // modify specified shared item flag, e.g. PushItemFlag(ImGuiItemFlags_NoTabStop, true)
|
||||||
IMGUI_API void PopTabStop();
|
IMGUI_API void PopItemFlag();
|
||||||
IMGUI_API void PushButtonRepeat(bool repeat); // in 'repeat' mode, Button*() functions return repeated true in a typematic manner (using io.KeyRepeatDelay/io.KeyRepeatRate setting). Note that you can call IsItemActive() after any Button() to tell if the button is held in the current frame.
|
|
||||||
IMGUI_API void PopButtonRepeat();
|
|
||||||
|
|
||||||
// Parameters stacks (current window)
|
// Parameters stacks (current window)
|
||||||
IMGUI_API void PushItemWidth(float item_width); // push width of items for common large "item+label" widgets. >0.0f: width in pixels, <0.0f align xx pixels to the right of window (so -FLT_MIN always align width to the right side).
|
IMGUI_API void PushItemWidth(float item_width); // push width of items for common large "item+label" widgets. >0.0f: width in pixels, <0.0f align xx pixels to the right of window (so -FLT_MIN always align width to the right side).
|
||||||
@ -472,19 +474,22 @@ namespace ImGui
|
|||||||
// - By "cursor" we mean the current output position.
|
// - 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.
|
// - The typical widget behavior is to output themselves at the current cursor position, then move the cursor one line down.
|
||||||
// - You can call SameLine() between widgets to undo the last carriage return and output at the right of the preceding widget.
|
// - You can call SameLine() between widgets to undo the last carriage return and output at the right of the preceding widget.
|
||||||
|
// - YOU CAN DO 99% OF WHAT YOU NEED WITH ONLY GetCursorScreenPos() and GetContentRegionAvail().
|
||||||
// - Attention! We currently have inconsistencies between window-local and absolute positions we will aim to fix with future API:
|
// - Attention! We currently have inconsistencies between window-local and absolute positions we will aim to fix with future API:
|
||||||
// - Absolute coordinate: GetCursorScreenPos(), SetCursorScreenPos(), all ImDrawList:: functions. -> this is the preferred way forward.
|
// - Absolute coordinate: GetCursorScreenPos(), SetCursorScreenPos(), all ImDrawList:: functions. -> this is the preferred way forward.
|
||||||
// - Window-local coordinates: SameLine(), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), GetContentRegionMax(), GetWindowContentRegion*(), PushTextWrapPos()
|
// - Window-local coordinates: SameLine(offset), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), PushTextWrapPos()
|
||||||
// - GetCursorScreenPos() = GetCursorPos() + GetWindowPos(). GetWindowPos() is almost only ever useful to convert from window-local to absolute coordinates.
|
// - Window-local coordinates: GetContentRegionMax(), GetWindowContentRegionMin(), GetWindowContentRegionMax() --> all obsoleted. YOU DON'T NEED THEM.
|
||||||
IMGUI_API ImVec2 GetCursorScreenPos(); // cursor position in absolute coordinates (prefer using this, also more useful to work with ImDrawList API).
|
// - GetCursorScreenPos() = GetCursorPos() + GetWindowPos(). GetWindowPos() is almost only ever useful to convert from window-local to absolute coordinates. Try not to use it.
|
||||||
IMGUI_API void SetCursorScreenPos(const ImVec2& pos); // cursor position in absolute coordinates
|
IMGUI_API ImVec2 GetCursorScreenPos(); // cursor position, absolute coordinates. THIS IS YOUR BEST FRIEND (prefer using this rather than GetCursorPos(), also more useful to work with ImDrawList API).
|
||||||
IMGUI_API ImVec2 GetCursorPos(); // [window-local] cursor position in window coordinates (relative to window position)
|
IMGUI_API void SetCursorScreenPos(const ImVec2& pos); // cursor position, absolute coordinates. THIS IS YOUR BEST FRIEND.
|
||||||
|
IMGUI_API ImVec2 GetContentRegionAvail(); // available space from current position. THIS IS YOUR BEST FRIEND.
|
||||||
|
IMGUI_API ImVec2 GetCursorPos(); // [window-local] cursor position in window-local coordinates. This is not your best friend.
|
||||||
IMGUI_API float GetCursorPosX(); // [window-local] "
|
IMGUI_API float GetCursorPosX(); // [window-local] "
|
||||||
IMGUI_API float GetCursorPosY(); // [window-local] "
|
IMGUI_API float GetCursorPosY(); // [window-local] "
|
||||||
IMGUI_API void SetCursorPos(const ImVec2& local_pos); // [window-local] "
|
IMGUI_API void SetCursorPos(const ImVec2& local_pos); // [window-local] "
|
||||||
IMGUI_API void SetCursorPosX(float local_x); // [window-local] "
|
IMGUI_API void SetCursorPosX(float local_x); // [window-local] "
|
||||||
IMGUI_API void SetCursorPosY(float local_y); // [window-local] "
|
IMGUI_API void SetCursorPosY(float local_y); // [window-local] "
|
||||||
IMGUI_API ImVec2 GetCursorStartPos(); // [window-local] initial cursor position, in window coordinates
|
IMGUI_API ImVec2 GetCursorStartPos(); // [window-local] initial cursor position, in window-local coordinates. Call GetCursorScreenPos() after Begin() to get the absolute coordinates version.
|
||||||
|
|
||||||
// Other layout functions
|
// 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 Separator(); // separator, generally horizontal. inside a menu bar or in horizontal layout mode, this becomes a vertical separator.
|
||||||
@ -521,6 +526,7 @@ namespace ImGui
|
|||||||
IMGUI_API ImGuiID GetID(const char* str_id); // calculate unique ID (hash of whole ID stack + given parameter). e.g. if you want to query into ImGuiStorage yourself
|
IMGUI_API ImGuiID GetID(const char* str_id); // calculate unique ID (hash of whole ID stack + given parameter). e.g. if you want to query into ImGuiStorage yourself
|
||||||
IMGUI_API ImGuiID GetID(const char* str_id_begin, const char* str_id_end);
|
IMGUI_API ImGuiID GetID(const char* str_id_begin, const char* str_id_end);
|
||||||
IMGUI_API ImGuiID GetID(const void* ptr_id);
|
IMGUI_API ImGuiID GetID(const void* ptr_id);
|
||||||
|
IMGUI_API ImGuiID GetID(int int_id);
|
||||||
|
|
||||||
// Widgets: Text
|
// Widgets: Text
|
||||||
IMGUI_API void TextUnformatted(const char* text, const char* text_end = NULL); // raw text without formatting. Roughly equivalent to Text("%s", text) but: A) doesn't require null terminated string if 'text_end' is specified, B) it's faster, no memory copy is done, no buffer size limits, recommended for long chunks of text.
|
IMGUI_API void TextUnformatted(const char* text, const char* text_end = NULL); // raw text without formatting. Roughly equivalent to Text("%s", text) but: A) doesn't require null terminated string if 'text_end' is specified, B) it's faster, no memory copy is done, no buffer size limits, recommended for long chunks of text.
|
||||||
@ -552,6 +558,8 @@ namespace ImGui
|
|||||||
IMGUI_API bool RadioButton(const char* label, int* v, int v_button); // shortcut to handle the above pattern when value is an integer
|
IMGUI_API bool RadioButton(const char* label, int* v, int v_button); // shortcut to handle the above pattern when value is an integer
|
||||||
IMGUI_API void ProgressBar(float fraction, const ImVec2& size_arg = ImVec2(-FLT_MIN, 0), const char* overlay = NULL);
|
IMGUI_API void ProgressBar(float fraction, const ImVec2& size_arg = ImVec2(-FLT_MIN, 0), const char* overlay = NULL);
|
||||||
IMGUI_API void Bullet(); // draw a small circle + keep the cursor on the same line. advance cursor x position by GetTreeNodeToLabelSpacing(), same distance that TreeNode() uses
|
IMGUI_API void Bullet(); // draw a small circle + keep the cursor on the same line. advance cursor x position by GetTreeNodeToLabelSpacing(), same distance that TreeNode() uses
|
||||||
|
IMGUI_API bool TextLink(const char* label); // hyperlink text button, return true when clicked
|
||||||
|
IMGUI_API void TextLinkOpenURL(const char* label, const char* url = NULL); // hyperlink text button, automatically open file/url when clicked
|
||||||
|
|
||||||
// Widgets: Images
|
// Widgets: Images
|
||||||
// - Read about ImTextureID here: https://github.com/ocornut/imgui/wiki/Image-Loading-and-Displaying-Examples
|
// - Read about ImTextureID here: https://github.com/ocornut/imgui/wiki/Image-Loading-and-Displaying-Examples
|
||||||
@ -662,6 +670,7 @@ namespace ImGui
|
|||||||
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, 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.
|
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.
|
||||||
IMGUI_API void SetNextItemOpen(bool is_open, ImGuiCond cond = 0); // set next TreeNode/CollapsingHeader open state.
|
IMGUI_API void SetNextItemOpen(bool is_open, ImGuiCond cond = 0); // set next TreeNode/CollapsingHeader open state.
|
||||||
|
IMGUI_API void SetNextItemStorageID(ImGuiID storage_id); // set id to use for open/close storage (default to same as item id).
|
||||||
|
|
||||||
// Widgets: Selectables
|
// Widgets: Selectables
|
||||||
// - A selectable highlights when hovered, and can display another color when selected.
|
// - A selectable highlights when hovered, and can display another color when selected.
|
||||||
@ -669,6 +678,18 @@ namespace ImGui
|
|||||||
IMGUI_API bool Selectable(const char* label, bool selected = false, ImGuiSelectableFlags flags = 0, const ImVec2& size = ImVec2(0, 0)); // "bool selected" carry the selection state (read-only). Selectable() is clicked is returns true so you can modify your selection state. size.x==0.0: use remaining width, size.x>0.0: specify width. size.y==0.0: use label height, size.y>0.0: specify height
|
IMGUI_API bool Selectable(const char* label, bool selected = false, ImGuiSelectableFlags flags = 0, const ImVec2& size = ImVec2(0, 0)); // "bool selected" carry the selection state (read-only). Selectable() is clicked is returns true so you can modify your selection state. size.x==0.0: use remaining width, size.x>0.0: specify width. size.y==0.0: use label height, size.y>0.0: specify height
|
||||||
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.
|
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.
|
||||||
|
|
||||||
|
// Multi-selection system for Selectable(), Checkbox(), TreeNode() functions [BETA]
|
||||||
|
// - This enables standard multi-selection/range-selection idioms (CTRL+Mouse/Keyboard, SHIFT+Mouse/Keyboard, etc.) in a way that also allow a clipper to be used.
|
||||||
|
// - ImGuiSelectionUserData is often used to store your item index within the current view (but may store something else).
|
||||||
|
// - Read comments near ImGuiMultiSelectIO for instructions/details and see 'Demo->Widgets->Selection State & Multi-Select' for demo.
|
||||||
|
// - TreeNode() is technically supported but... using this correctly is more complicated. You need some sort of linear/random access to your tree,
|
||||||
|
// which is suited to advanced trees setups already implementing filters and clipper. We will work simplifying the current demo.
|
||||||
|
// - 'selection_size' and 'items_count' parameters are optional and used by a few features. If they are costly for you to compute, you may avoid them.
|
||||||
|
IMGUI_API ImGuiMultiSelectIO* BeginMultiSelect(ImGuiMultiSelectFlags flags, int selection_size = -1, int items_count = -1);
|
||||||
|
IMGUI_API ImGuiMultiSelectIO* EndMultiSelect();
|
||||||
|
IMGUI_API void SetNextItemSelectionUserData(ImGuiSelectionUserData selection_user_data);
|
||||||
|
IMGUI_API bool IsItemToggledSelection(); // Was the last item selection state toggled? Useful if you need the per-item information _before_ reaching EndMultiSelect(). We only returns toggle _event_ in order to handle clipping correctly.
|
||||||
|
|
||||||
// Widgets: List Boxes
|
// Widgets: List Boxes
|
||||||
// - This is essentially a thin wrapper to using BeginChild/EndChild with the ImGuiChildFlags_FrameStyle flag for stylistic changes + displaying a label.
|
// - 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.
|
// - You can submit contents and manage your selection state however you want it, by creating e.g. Selectable() or any other items.
|
||||||
@ -989,6 +1010,14 @@ namespace ImGui
|
|||||||
IMGUI_API bool Shortcut(ImGuiKeyChord key_chord, ImGuiInputFlags flags = 0);
|
IMGUI_API bool Shortcut(ImGuiKeyChord key_chord, ImGuiInputFlags flags = 0);
|
||||||
IMGUI_API void SetNextItemShortcut(ImGuiKeyChord key_chord, ImGuiInputFlags flags = 0);
|
IMGUI_API void SetNextItemShortcut(ImGuiKeyChord key_chord, ImGuiInputFlags flags = 0);
|
||||||
|
|
||||||
|
// Inputs Utilities: Key/Input Ownership [BETA]
|
||||||
|
// - One common use case would be to allow your items to disable standard inputs behaviors such
|
||||||
|
// as Tab or Alt key handling, Mouse Wheel scrolling, etc.
|
||||||
|
// e.g. Button(...); SetItemKeyOwner(ImGuiKey_MouseWheelY); to make hovering/activating a button disable wheel for scrolling.
|
||||||
|
// - Reminder ImGuiKey enum include access to mouse buttons and gamepad, so key ownership can apply to them.
|
||||||
|
// - Many related features are still in imgui_internal.h. For instance, most IsKeyXXX()/IsMouseXXX() functions have an owner-id-aware version.
|
||||||
|
IMGUI_API void SetItemKeyOwner(ImGuiKey key); // Set key owner to last item ID if it is hovered or active. Equivalent to 'if (IsItemHovered() || IsItemActive()) { SetKeyOwner(key, GetItemID());'.
|
||||||
|
|
||||||
// Inputs Utilities: Mouse specific
|
// Inputs Utilities: Mouse specific
|
||||||
// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right.
|
// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right.
|
||||||
// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle.
|
// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle.
|
||||||
@ -1030,6 +1059,10 @@ namespace ImGui
|
|||||||
IMGUI_API void DebugFlashStyleColor(ImGuiCol idx);
|
IMGUI_API void DebugFlashStyleColor(ImGuiCol idx);
|
||||||
IMGUI_API void DebugStartItemPicker();
|
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.
|
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.
|
||||||
|
#ifndef IMGUI_DISABLE_DEBUG_TOOLS
|
||||||
|
IMGUI_API void DebugLog(const char* fmt, ...) IM_FMTARGS(1); // Call via IMGUI_DEBUG_LOG() for maximum stripping in caller code!
|
||||||
|
IMGUI_API void DebugLogV(const char* fmt, va_list args) IM_FMTLIST(1);
|
||||||
|
#endif
|
||||||
|
|
||||||
// Memory Allocators
|
// Memory Allocators
|
||||||
// - Those functions are not reliant on the current context.
|
// - Those functions are not reliant on the current context.
|
||||||
@ -1095,7 +1128,7 @@ enum ImGuiWindowFlags_
|
|||||||
|
|
||||||
// Obsolete names
|
// Obsolete names
|
||||||
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||||
ImGuiWindowFlags_AlwaysUseWindowPadding = 1 << 30, // Obsoleted in 1.90: Use ImGuiChildFlags_AlwaysUseWindowPadding in BeginChild() call.
|
ImGuiWindowFlags_AlwaysUseWindowPadding = 1 << 30, // Obsoleted in 1.90.0: Use ImGuiChildFlags_AlwaysUseWindowPadding in BeginChild() call.
|
||||||
ImGuiWindowFlags_NavFlattened = 1 << 31, // Obsoleted in 1.90.9: Use ImGuiChildFlags_NavFlattened in BeginChild() call.
|
ImGuiWindowFlags_NavFlattened = 1 << 31, // Obsoleted in 1.90.9: Use ImGuiChildFlags_NavFlattened in BeginChild() call.
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
@ -1120,7 +1153,19 @@ enum ImGuiChildFlags_
|
|||||||
ImGuiChildFlags_AutoResizeY = 1 << 5, // Enable auto-resizing height. 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_AlwaysAutoResize = 1 << 6, // Combined with AutoResizeX/AutoResizeY. Always measure size even when child is hidden, always return true, always disable clipping optimization! NOT RECOMMENDED.
|
||||||
ImGuiChildFlags_FrameStyle = 1 << 7, // Style the child window like a framed item: use FrameBg, FrameRounding, FrameBorderSize, FramePadding instead of ChildBg, ChildRounding, ChildBorderSize, WindowPadding.
|
ImGuiChildFlags_FrameStyle = 1 << 7, // Style the child window like a framed item: use FrameBg, FrameRounding, FrameBorderSize, FramePadding instead of ChildBg, ChildRounding, ChildBorderSize, WindowPadding.
|
||||||
ImGuiChildFlags_NavFlattened = 1 << 8, // Share focus scope, allow gamepad/keyboard navigation to cross over parent border to this child or between sibling child windows.
|
ImGuiChildFlags_NavFlattened = 1 << 8, // [BETA] Share focus scope, allow gamepad/keyboard navigation to cross over parent border to this child or between sibling child windows.
|
||||||
|
};
|
||||||
|
|
||||||
|
// Flags for ImGui::PushItemFlag()
|
||||||
|
// (Those are shared by all items)
|
||||||
|
enum ImGuiItemFlags_
|
||||||
|
{
|
||||||
|
ImGuiItemFlags_None = 0, // (Default)
|
||||||
|
ImGuiItemFlags_NoTabStop = 1 << 0, // false // Disable keyboard tabbing. This is a "lighter" version of ImGuiItemFlags_NoNav.
|
||||||
|
ImGuiItemFlags_NoNav = 1 << 1, // false // Disable any form of focusing (keyboard/gamepad directional navigation and SetKeyboardFocusHere() calls).
|
||||||
|
ImGuiItemFlags_NoNavDefaultFocus = 1 << 2, // false // Disable item being a candidate for default focus (e.g. used by title bar items).
|
||||||
|
ImGuiItemFlags_ButtonRepeat = 1 << 3, // false // Any button-like behavior will have repeat mode enabled (based on io.KeyRepeatDelay and io.KeyRepeatRate values). Note that you can also call IsItemActive() after any button to tell if it is being held.
|
||||||
|
ImGuiItemFlags_AutoClosePopups = 1 << 4, // true // MenuItem()/Selectable() automatically close their parent popup window.
|
||||||
};
|
};
|
||||||
|
|
||||||
// Flags for ImGui::InputText()
|
// Flags for ImGui::InputText()
|
||||||
@ -1220,13 +1265,15 @@ enum ImGuiPopupFlags_
|
|||||||
enum ImGuiSelectableFlags_
|
enum ImGuiSelectableFlags_
|
||||||
{
|
{
|
||||||
ImGuiSelectableFlags_None = 0,
|
ImGuiSelectableFlags_None = 0,
|
||||||
ImGuiSelectableFlags_DontClosePopups = 1 << 0, // Clicking this doesn't close parent popup window
|
ImGuiSelectableFlags_NoAutoClosePopups = 1 << 0, // Clicking this doesn't close parent popup window (overrides ImGuiItemFlags_AutoClosePopups)
|
||||||
ImGuiSelectableFlags_SpanAllColumns = 1 << 1, // Frame will span all columns of its container table (text will still fit in current column)
|
ImGuiSelectableFlags_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_AllowDoubleClick = 1 << 2, // Generate press events on double clicks too
|
||||||
ImGuiSelectableFlags_Disabled = 1 << 3, // Cannot be selected, display grayed out text
|
ImGuiSelectableFlags_Disabled = 1 << 3, // Cannot be selected, display grayed out text
|
||||||
ImGuiSelectableFlags_AllowOverlap = 1 << 4, // (WIP) Hit testing to allow subsequent widgets to overlap this one
|
ImGuiSelectableFlags_AllowOverlap = 1 << 4, // (WIP) Hit testing to allow subsequent widgets to overlap this one
|
||||||
|
ImGuiSelectableFlags_Highlight = 1 << 5, // Make the item be displayed as if it is hovered
|
||||||
|
|
||||||
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||||
|
ImGuiSelectableFlags_DontClosePopups = ImGuiSelectableFlags_NoAutoClosePopups, // Renamed in 1.91.0
|
||||||
ImGuiSelectableFlags_AllowItemOverlap = ImGuiSelectableFlags_AllowOverlap, // Renamed in 1.89.7
|
ImGuiSelectableFlags_AllowItemOverlap = ImGuiSelectableFlags_AllowOverlap, // Renamed in 1.89.7
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
@ -1392,6 +1439,7 @@ enum ImGuiDataType_
|
|||||||
ImGuiDataType_U64, // unsigned long long / unsigned __int64
|
ImGuiDataType_U64, // unsigned long long / unsigned __int64
|
||||||
ImGuiDataType_Float, // float
|
ImGuiDataType_Float, // float
|
||||||
ImGuiDataType_Double, // double
|
ImGuiDataType_Double, // double
|
||||||
|
ImGuiDataType_Bool, // bool (provided for user convenience, not supported by scalar widgets)
|
||||||
ImGuiDataType_COUNT
|
ImGuiDataType_COUNT
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1687,6 +1735,7 @@ enum ImGuiCol_
|
|||||||
ImGuiCol_TableBorderLight, // Table inner borders (prefer using Alpha=1.0 here)
|
ImGuiCol_TableBorderLight, // Table inner borders (prefer using Alpha=1.0 here)
|
||||||
ImGuiCol_TableRowBg, // Table row background (even rows)
|
ImGuiCol_TableRowBg, // Table row background (even rows)
|
||||||
ImGuiCol_TableRowBgAlt, // Table row background (odd rows)
|
ImGuiCol_TableRowBgAlt, // Table row background (odd rows)
|
||||||
|
ImGuiCol_TextLink, // Hyperlink color
|
||||||
ImGuiCol_TextSelectedBg,
|
ImGuiCol_TextSelectedBg,
|
||||||
ImGuiCol_DragDropTarget, // Rectangle highlighting a drop target
|
ImGuiCol_DragDropTarget, // Rectangle highlighting a drop target
|
||||||
ImGuiCol_NavHighlight, // Gamepad/keyboard: current highlighted item
|
ImGuiCol_NavHighlight, // Gamepad/keyboard: current highlighted item
|
||||||
@ -1739,6 +1788,7 @@ enum ImGuiStyleVar_
|
|||||||
ImGuiStyleVar_TabRounding, // float TabRounding
|
ImGuiStyleVar_TabRounding, // float TabRounding
|
||||||
ImGuiStyleVar_TabBorderSize, // float TabBorderSize
|
ImGuiStyleVar_TabBorderSize, // float TabBorderSize
|
||||||
ImGuiStyleVar_TabBarBorderSize, // float TabBarBorderSize
|
ImGuiStyleVar_TabBarBorderSize, // float TabBarBorderSize
|
||||||
|
ImGuiStyleVar_TabBarOverlineSize, // float TabBarOverlineSize
|
||||||
ImGuiStyleVar_TableAngledHeadersAngle, // float TableAngledHeadersAngle
|
ImGuiStyleVar_TableAngledHeadersAngle, // float TableAngledHeadersAngle
|
||||||
ImGuiStyleVar_TableAngledHeadersTextAlign,// ImVec2 TableAngledHeadersTextAlign
|
ImGuiStyleVar_TableAngledHeadersTextAlign,// ImVec2 TableAngledHeadersTextAlign
|
||||||
ImGuiStyleVar_ButtonTextAlign, // ImVec2 ButtonTextAlign
|
ImGuiStyleVar_ButtonTextAlign, // ImVec2 ButtonTextAlign
|
||||||
@ -2038,9 +2088,19 @@ struct ImGuiTableColumnSortSpecs
|
|||||||
};
|
};
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// [SECTION] Helpers: Memory allocations macros, ImVector<>
|
// [SECTION] Helpers: Debug log, memory allocations macros, ImVector<>
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// Debug Logging into ShowDebugLogWindow(), tty and more.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifndef IMGUI_DISABLE_DEBUG_TOOLS
|
||||||
|
#define IMGUI_DEBUG_LOG(...) ImGui::DebugLog(__VA_ARGS__)
|
||||||
|
#else
|
||||||
|
#define IMGUI_DEBUG_LOG(...) ((void)0)
|
||||||
|
#endif
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// IM_MALLOC(), IM_FREE(), IM_NEW(), IM_PLACEMENT_NEW(), IM_DELETE()
|
// IM_MALLOC(), IM_FREE(), IM_NEW(), IM_PLACEMENT_NEW(), IM_DELETE()
|
||||||
// We call C++ constructor on own allocated memory via the placement "new(ptr) Type()" syntax.
|
// We call C++ constructor on own allocated memory via the placement "new(ptr) Type()" syntax.
|
||||||
@ -2173,12 +2233,13 @@ struct ImGuiStyle
|
|||||||
float TabBorderSize; // Thickness of border around tabs.
|
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 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 TabBarBorderSize; // Thickness of tab-bar separator, which takes on the tab active color to denote focus.
|
||||||
|
float TabBarOverlineSize; // Thickness of tab-bar overline, which highlights the selected tab-bar.
|
||||||
float TableAngledHeadersAngle; // Angle of angled headers (supported values range from -50.0f degrees to +50.0f degrees).
|
float TableAngledHeadersAngle; // Angle of angled headers (supported values range from -50.0f degrees to +50.0f degrees).
|
||||||
ImVec2 TableAngledHeadersTextAlign;// Alignment of angled headers within the cell
|
ImVec2 TableAngledHeadersTextAlign;// Alignment of angled headers within the cell
|
||||||
ImGuiDir ColorButtonPosition; // Side of the color button in the ColorEdit4 widget (left/right). Defaults to ImGuiDir_Right.
|
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 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.
|
ImVec2 SelectableTextAlign; // Alignment of selectable text. Defaults to (0.0f, 0.0f) (top-left aligned). It's generally important to keep this left-aligned if you want to lay multiple items on a same line.
|
||||||
float SeparatorTextBorderSize; // Thickkness of border in SeparatorText()
|
float SeparatorTextBorderSize; // Thickness of border in SeparatorText()
|
||||||
ImVec2 SeparatorTextAlign; // Alignment of text within the separator. Defaults to (0.0f, 0.5f) (left aligned, center).
|
ImVec2 SeparatorTextAlign; // Alignment of text within the separator. Defaults to (0.0f, 0.5f) (left aligned, center).
|
||||||
ImVec2 SeparatorTextPadding; // Horizontal offset of text from each edge of the separator + spacing on other axis. Generally small values. .y is recommended to be == FramePadding.y.
|
ImVec2 SeparatorTextPadding; // Horizontal offset of text from each edge of the separator + spacing on other axis. Generally small values. .y is recommended to be == FramePadding.y.
|
||||||
ImVec2 DisplayWindowPadding; // Apply to regular windows: amount which we enforce to keep visible when moving near edges of your screen.
|
ImVec2 DisplayWindowPadding; // Apply to regular windows: amount which we enforce to keep visible when moving near edges of your screen.
|
||||||
@ -2263,6 +2324,7 @@ struct ImGuiIO
|
|||||||
// Miscellaneous options
|
// Miscellaneous options
|
||||||
bool MouseDrawCursor; // = false // Request ImGui to draw a mouse cursor for you (if you are on a platform without a mouse cursor). Cannot be easily renamed to 'io.ConfigXXX' because this is frequently used by backend implementations.
|
bool MouseDrawCursor; // = false // Request ImGui to draw a mouse cursor for you (if you are on a platform without a mouse cursor). Cannot be easily renamed to 'io.ConfigXXX' because this is frequently used by backend implementations.
|
||||||
bool ConfigMacOSXBehaviors; // = defined(__APPLE__) // Swap Cmd<>Ctrl keys + OS X style text editing cursor movement using Alt instead of Ctrl, Shortcuts using Cmd/Super instead of Ctrl, Line/Text Start and End using Cmd+Arrows instead of Home/End, Double click selects by word instead of selecting whole text, Multi-selection in lists uses Cmd/Super instead of Ctrl.
|
bool ConfigMacOSXBehaviors; // = defined(__APPLE__) // Swap Cmd<>Ctrl keys + OS X style text editing cursor movement using Alt instead of Ctrl, Shortcuts using Cmd/Super instead of Ctrl, Line/Text Start and End using Cmd+Arrows instead of Home/End, Double click selects by word instead of selecting whole text, Multi-selection in lists uses Cmd/Super instead of Ctrl.
|
||||||
|
bool ConfigNavSwapGamepadButtons; // = false // Swap Activate<>Cancel (A<>B) buttons, matching typical "Nintendo/Japanese style" gamepad layout.
|
||||||
bool ConfigInputTrickleEventQueue; // = true // Enable input queue trickling: some types of events submitted during the same frame (e.g. button down + up) will be spread over multiple frames, improving interactions with low framerates.
|
bool ConfigInputTrickleEventQueue; // = true // Enable input queue trickling: some types of events submitted during the same frame (e.g. button down + up) will be spread over multiple frames, improving interactions with low framerates.
|
||||||
bool ConfigInputTextCursorBlink; // = true // Enable blinking cursor (optional as some users consider it to be distracting).
|
bool ConfigInputTextCursorBlink; // = true // Enable blinking cursor (optional as some users consider it to be distracting).
|
||||||
bool ConfigInputTextEnterKeepActive; // = false // [BETA] Pressing Enter will keep item active and select contents (single-line only).
|
bool ConfigInputTextEnterKeepActive; // = false // [BETA] Pressing Enter will keep item active and select contents (single-line only).
|
||||||
@ -2322,9 +2384,15 @@ struct ImGuiIO
|
|||||||
void (*SetClipboardTextFn)(void* user_data, const char* text);
|
void (*SetClipboardTextFn)(void* user_data, const char* text);
|
||||||
void* ClipboardUserData;
|
void* ClipboardUserData;
|
||||||
|
|
||||||
|
// Optional: Open link/folder/file in OS Shell
|
||||||
|
// (default to use ShellExecuteA() on Windows, system() on Linux/Mac)
|
||||||
|
bool (*PlatformOpenInShellFn)(ImGuiContext* ctx, const char* path);
|
||||||
|
void* PlatformOpenInShellUserData;
|
||||||
|
|
||||||
// Optional: Notify OS Input Method Editor of the screen position of your cursor for text input position (e.g. when using Japanese/Chinese IME on Windows)
|
// Optional: Notify OS Input Method Editor of the screen position of your cursor for text input position (e.g. when using Japanese/Chinese IME on Windows)
|
||||||
// (default to use native imm32 api on Windows)
|
// (default to use native imm32 api on Windows)
|
||||||
void (*SetPlatformImeDataFn)(ImGuiViewport* viewport, ImGuiPlatformImeData* data);
|
void (*PlatformSetImeDataFn)(ImGuiContext* ctx, ImGuiViewport* viewport, ImGuiPlatformImeData* data);
|
||||||
|
//void (*SetPlatformImeDataFn)(ImGuiViewport* viewport, ImGuiPlatformImeData* data); // [Renamed to io.PlatformSetImeDataFn in 1.91.0]
|
||||||
|
|
||||||
// Optional: Platform locale
|
// 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
|
ImWchar PlatformLocaleDecimalPoint; // '.' // [Experimental] Configure decimal point e.g. '.' or ',' useful for some languages (e.g. German), generally pulled from *localeconv()->decimal_point
|
||||||
@ -2686,9 +2754,10 @@ struct ImGuiListClipper
|
|||||||
int ItemsCount; // [Internal] Number of items
|
int ItemsCount; // [Internal] Number of items
|
||||||
float ItemsHeight; // [Internal] Height of item after a first step and item submission can calculate it
|
float ItemsHeight; // [Internal] Height of item after a first step and item submission can calculate it
|
||||||
float StartPosY; // [Internal] Cursor position at the time of Begin() or after table frozen rows are all processed
|
float StartPosY; // [Internal] Cursor position at the time of Begin() or after table frozen rows are all processed
|
||||||
|
double StartSeekOffsetY; // [Internal] Account for frozen rows in a table and initial loss of precision in very large windows.
|
||||||
void* TempData; // [Internal] Internal data
|
void* TempData; // [Internal] Internal data
|
||||||
|
|
||||||
// items_count: Use INT_MAX if you don't know how many items you have (in which case the cursor won't be advanced in the final step)
|
// items_count: Use INT_MAX if you don't know how many items you have (in which case the cursor won't be advanced in the final step, and you can call SeekCursorForItem() manually if you need)
|
||||||
// items_height: Use -1.0f to be calculated automatically on first step. Otherwise pass in the distance between your items, typically GetTextLineHeightWithSpacing() or GetFrameHeightWithSpacing().
|
// items_height: Use -1.0f to be calculated automatically on first step. Otherwise pass in the distance between your items, typically GetTextLineHeightWithSpacing() or GetFrameHeightWithSpacing().
|
||||||
IMGUI_API ImGuiListClipper();
|
IMGUI_API ImGuiListClipper();
|
||||||
IMGUI_API ~ImGuiListClipper();
|
IMGUI_API ~ImGuiListClipper();
|
||||||
@ -2701,6 +2770,11 @@ struct ImGuiListClipper
|
|||||||
inline void IncludeItemByIndex(int item_index) { IncludeItemsByIndex(item_index, item_index + 1); }
|
inline void IncludeItemByIndex(int item_index) { IncludeItemsByIndex(item_index, item_index + 1); }
|
||||||
IMGUI_API void IncludeItemsByIndex(int item_begin, int item_end); // item_end is exclusive e.g. use (42, 42+1) to make item 42 never clipped.
|
IMGUI_API void IncludeItemsByIndex(int item_begin, int item_end); // item_end is exclusive e.g. use (42, 42+1) to make item 42 never clipped.
|
||||||
|
|
||||||
|
// Seek cursor toward given item. This is automatically called while stepping.
|
||||||
|
// - The only reason to call this is: you can use ImGuiListClipper::Begin(INT_MAX) if you don't know item count ahead of time.
|
||||||
|
// - In this case, after all steps are done, you'll want to call SeekCursorForItem(item_count).
|
||||||
|
IMGUI_API void SeekCursorForItem(int item_index);
|
||||||
|
|
||||||
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||||
inline void IncludeRangeByIndices(int item_begin, int item_end) { IncludeItemsByIndex(item_begin, item_end); } // [renamed in 1.89.9]
|
inline void IncludeRangeByIndices(int item_begin, int item_end) { IncludeItemsByIndex(item_begin, item_end); } // [renamed in 1.89.9]
|
||||||
inline void ForceDisplayRangeByIndices(int item_begin, int item_end) { IncludeItemsByIndex(item_begin, item_end); } // [renamed in 1.89.6]
|
inline void ForceDisplayRangeByIndices(int item_begin, int item_end) { IncludeItemsByIndex(item_begin, item_end); } // [renamed in 1.89.6]
|
||||||
@ -2781,6 +2855,154 @@ struct ImColor
|
|||||||
static ImColor HSV(float h, float s, float v, float a = 1.0f) { float r, g, b; ImGui::ColorConvertHSVtoRGB(h, s, v, r, g, b); return ImColor(r, g, b, a); }
|
static ImColor HSV(float h, float s, float v, float a = 1.0f) { float r, g, b; ImGui::ColorConvertHSVtoRGB(h, s, v, r, g, b); return ImColor(r, g, b, a); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// [SECTION] Multi-Select API flags and structures (ImGuiMultiSelectFlags, ImGuiSelectionRequestType, ImGuiSelectionRequest, ImGuiMultiSelectIO, ImGuiSelectionBasicStorage)
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// Multi-selection system
|
||||||
|
// Documentation at: https://github.com/ocornut/imgui/wiki/Multi-Select
|
||||||
|
// - Refer to 'Demo->Widgets->Selection State & Multi-Select' for demos using this.
|
||||||
|
// - This system implements standard multi-selection idioms (CTRL+Mouse/Keyboard, SHIFT+Mouse/Keyboard, etc)
|
||||||
|
// with support for clipper (skipping non-visible items), box-select and many other details.
|
||||||
|
// - Selectable(), Checkbox() are supported but custom widgets may use it as well.
|
||||||
|
// - TreeNode() is technically supported but... using this correctly is more complicated: you need some sort of linear/random access to your tree,
|
||||||
|
// which is suited to advanced trees setups also implementing filters and clipper. We will work toward simplifying and demoing it.
|
||||||
|
// - In the spirit of Dear ImGui design, your code owns actual selection data.
|
||||||
|
// This is designed to allow all kinds of selection storage you may use in your application e.g. set/map/hash.
|
||||||
|
// About ImGuiSelectionBasicStorage:
|
||||||
|
// - This is an optional helper to store a selection state and apply selection requests.
|
||||||
|
// - It is used by our demos and provided as a convenience to quickly implement multi-selection.
|
||||||
|
// Usage:
|
||||||
|
// - Identify submitted items with SetNextItemSelectionUserData(), most likely using an index into your current data-set.
|
||||||
|
// - Store and maintain actual selection data using persistent object identifiers.
|
||||||
|
// - Usage flow:
|
||||||
|
// BEGIN - (1) Call BeginMultiSelect() and retrieve the ImGuiMultiSelectIO* result.
|
||||||
|
// - (2) Honor request list (SetAll/SetRange requests) by updating your selection data. Same code as Step 6.
|
||||||
|
// - (3) [If using clipper] You need to make sure RangeSrcItem is always submitted. Calculate its index and pass to clipper.IncludeItemByIndex(). If storing indices in ImGuiSelectionUserData, a simple clipper.IncludeItemByIndex(ms_io->RangeSrcItem) call will work.
|
||||||
|
// LOOP - (4) Submit your items with SetNextItemSelectionUserData() + Selectable()/TreeNode() calls.
|
||||||
|
// END - (5) Call EndMultiSelect() and retrieve the ImGuiMultiSelectIO* result.
|
||||||
|
// - (6) Honor request list (SetAll/SetRange requests) by updating your selection data. Same code as Step 2.
|
||||||
|
// If you submit all items (no clipper), Step 2 and 3 are optional and will be handled by each item themselves. It is fine to always honor those steps.
|
||||||
|
// About ImGuiSelectionUserData:
|
||||||
|
// - This can store an application-defined identifier (e.g. index or pointer) submitted via SetNextItemSelectionUserData().
|
||||||
|
// - In return we store them into RangeSrcItem/RangeFirstItem/RangeLastItem and other fields in ImGuiMultiSelectIO.
|
||||||
|
// - Most applications will store an object INDEX, hence the chosen name and type. Storing an index is natural, because
|
||||||
|
// SetRange requests will give you two end-points and you will need to iterate/interpolate between them to update your selection.
|
||||||
|
// - However it is perfectly possible to store a POINTER or another IDENTIFIER inside ImGuiSelectionUserData.
|
||||||
|
// Our system never assume that you identify items by indices, it never attempts to interpolate between two values.
|
||||||
|
// - If you enable ImGuiMultiSelectFlags_NoRangeSelect then it is guaranteed that you will never have to interpolate
|
||||||
|
// between two ImGuiSelectionUserData, which may be a convenient way to use part of the feature with less code work.
|
||||||
|
// - As most users will want to store an index, for convenience and to reduce confusion we use ImS64 instead of void*,
|
||||||
|
// being syntactically easier to downcast. Feel free to reinterpret_cast and store a pointer inside.
|
||||||
|
|
||||||
|
// Flags for BeginMultiSelect()
|
||||||
|
enum ImGuiMultiSelectFlags_
|
||||||
|
{
|
||||||
|
ImGuiMultiSelectFlags_None = 0,
|
||||||
|
ImGuiMultiSelectFlags_SingleSelect = 1 << 0, // Disable selecting more than one item. This is available to allow single-selection code to share same code/logic if desired. It essentially disables the main purpose of BeginMultiSelect() tho!
|
||||||
|
ImGuiMultiSelectFlags_NoSelectAll = 1 << 1, // Disable CTRL+A shortcut to select all.
|
||||||
|
ImGuiMultiSelectFlags_NoRangeSelect = 1 << 2, // Disable Shift+selection mouse/keyboard support (useful for unordered 2D selection). With BoxSelect is also ensure contiguous SetRange requests are not combined into one. This allows not handling interpolation in SetRange requests.
|
||||||
|
ImGuiMultiSelectFlags_NoAutoSelect = 1 << 3, // Disable selecting items when navigating (useful for e.g. supporting range-select in a list of checkboxes).
|
||||||
|
ImGuiMultiSelectFlags_NoAutoClear = 1 << 4, // Disable clearing selection when navigating or selecting another one (generally used with ImGuiMultiSelectFlags_NoAutoSelect. useful for e.g. supporting range-select in a list of checkboxes).
|
||||||
|
ImGuiMultiSelectFlags_NoAutoClearOnReselect = 1 << 5, // Disable clearing selection when clicking/selecting an already selected item.
|
||||||
|
ImGuiMultiSelectFlags_BoxSelect1d = 1 << 6, // Enable box-selection with same width and same x pos items (e.g. full row Selectable()). Box-selection works better with little bit of spacing between items hit-box in order to be able to aim at empty space.
|
||||||
|
ImGuiMultiSelectFlags_BoxSelect2d = 1 << 7, // Enable box-selection with varying width or varying x pos items support (e.g. different width labels, or 2D layout/grid). This is slower: alters clipping logic so that e.g. horizontal movements will update selection of normally clipped items.
|
||||||
|
ImGuiMultiSelectFlags_BoxSelectNoScroll = 1 << 8, // Disable scrolling when box-selecting near edges of scope.
|
||||||
|
ImGuiMultiSelectFlags_ClearOnEscape = 1 << 9, // Clear selection when pressing Escape while scope is focused.
|
||||||
|
ImGuiMultiSelectFlags_ClearOnClickVoid = 1 << 10, // Clear selection when clicking on empty location within scope.
|
||||||
|
ImGuiMultiSelectFlags_ScopeWindow = 1 << 11, // Scope for _BoxSelect and _ClearOnClickVoid is whole window (Default). Use if BeginMultiSelect() covers a whole window or used a single time in same window.
|
||||||
|
ImGuiMultiSelectFlags_ScopeRect = 1 << 12, // Scope for _BoxSelect and _ClearOnClickVoid is rectangle encompassing BeginMultiSelect()/EndMultiSelect(). Use if BeginMultiSelect() is called multiple times in same window.
|
||||||
|
ImGuiMultiSelectFlags_SelectOnClick = 1 << 13, // Apply selection on mouse down when clicking on unselected item. (Default)
|
||||||
|
ImGuiMultiSelectFlags_SelectOnClickRelease = 1 << 14, // Apply selection on mouse release when clicking an unselected item. Allow dragging an unselected item without altering selection.
|
||||||
|
//ImGuiMultiSelectFlags_RangeSelect2d = 1 << 15, // Shift+Selection uses 2d geometry instead of linear sequence, so possible to use Shift+up/down to select vertically in grid. Analogous to what BoxSelect does.
|
||||||
|
ImGuiMultiSelectFlags_NavWrapX = 1 << 16, // [Temporary] Enable navigation wrapping on X axis. Provided as a convenience because we don't have a design for the general Nav API for this yet. When the more general feature be public we may obsolete this flag in favor of new one.
|
||||||
|
};
|
||||||
|
|
||||||
|
// Main IO structure returned by BeginMultiSelect()/EndMultiSelect().
|
||||||
|
// This mainly contains a list of selection requests.
|
||||||
|
// - Use 'Demo->Tools->Debug Log->Selection' to see requests as they happen.
|
||||||
|
// - Some fields are only useful if your list is dynamic and allows deletion (getting post-deletion focus/state right is shown in the demo)
|
||||||
|
// - Below: who reads/writes each fields? 'r'=read, 'w'=write, 'ms'=multi-select code, 'app'=application/user code.
|
||||||
|
struct ImGuiMultiSelectIO
|
||||||
|
{
|
||||||
|
//------------------------------------------// BeginMultiSelect / EndMultiSelect
|
||||||
|
ImVector<ImGuiSelectionRequest> Requests; // ms:w, app:r / ms:w app:r // Requests to apply to your selection data.
|
||||||
|
ImGuiSelectionUserData RangeSrcItem; // ms:w app:r / // (If using clipper) Begin: Source item (often the first selected item) must never be clipped: use clipper.IncludeItemByIndex() to ensure it is submitted.
|
||||||
|
ImGuiSelectionUserData NavIdItem; // ms:w, app:r / // (If using deletion) Last known SetNextItemSelectionUserData() value for NavId (if part of submitted items).
|
||||||
|
bool NavIdSelected; // ms:w, app:r / app:r // (If using deletion) Last known selection state for NavId (if part of submitted items).
|
||||||
|
bool RangeSrcReset; // app:w / ms:r // (If using deletion) Set before EndMultiSelect() to reset ResetSrcItem (e.g. if deleted selection).
|
||||||
|
int ItemsCount; // ms:w, app:r / app:r // 'int items_count' parameter to BeginMultiSelect() is copied here for convenience, allowing simpler calls to your ApplyRequests handler. Not used internally.
|
||||||
|
};
|
||||||
|
|
||||||
|
// Selection request type
|
||||||
|
enum ImGuiSelectionRequestType
|
||||||
|
{
|
||||||
|
ImGuiSelectionRequestType_None = 0,
|
||||||
|
ImGuiSelectionRequestType_SetAll, // Request app to clear selection (if Selected==false) or select all items (if Selected==true). We cannot set RangeFirstItem/RangeLastItem as its contents is entirely up to user (not necessarily an index)
|
||||||
|
ImGuiSelectionRequestType_SetRange, // Request app to select/unselect [RangeFirstItem..RangeLastItem] items (inclusive) based on value of Selected. Only EndMultiSelect() request this, app code can read after BeginMultiSelect() and it will always be false.
|
||||||
|
};
|
||||||
|
|
||||||
|
// Selection request item
|
||||||
|
struct ImGuiSelectionRequest
|
||||||
|
{
|
||||||
|
//------------------------------------------// BeginMultiSelect / EndMultiSelect
|
||||||
|
ImGuiSelectionRequestType Type; // ms:w, app:r / ms:w, app:r // Request type. You'll most often receive 1 Clear + 1 SetRange with a single-item range.
|
||||||
|
bool Selected; // ms:w, app:r / ms:w, app:r // Parameter for SetAll/SetRange requests (true = select, false = unselect)
|
||||||
|
ImS8 RangeDirection; // / ms:w app:r // Parameter for SetRange request: +1 when RangeFirstItem comes before RangeLastItem, -1 otherwise. Useful if you want to preserve selection order on a backward Shift+Click.
|
||||||
|
ImGuiSelectionUserData RangeFirstItem; // / ms:w, app:r // Parameter for SetRange request (this is generally == RangeSrcItem when shift selecting from top to bottom).
|
||||||
|
ImGuiSelectionUserData RangeLastItem; // / ms:w, app:r // Parameter for SetRange request (this is generally == RangeSrcItem when shift selecting from bottom to top). Inclusive!
|
||||||
|
};
|
||||||
|
|
||||||
|
// Optional helper to store multi-selection state + apply multi-selection requests.
|
||||||
|
// - Used by our demos and provided as a convenience to easily implement basic multi-selection.
|
||||||
|
// - Iterate selection with 'void* it = NULL; ImGuiID id; while (selection.GetNextSelectedItem(&it, &id)) { ... }'
|
||||||
|
// Or you can check 'if (Contains(id)) { ... }' for each possible object if their number is not too high to iterate.
|
||||||
|
// - USING THIS IS NOT MANDATORY. This is only a helper and not a required API.
|
||||||
|
// To store a multi-selection, in your application you could:
|
||||||
|
// - Use this helper as a convenience. We use our simple key->value ImGuiStorage as a std::set<ImGuiID> replacement.
|
||||||
|
// - Use your own external storage: e.g. std::set<MyObjectId>, std::vector<MyObjectId>, interval trees, intrusively stored selection etc.
|
||||||
|
// In ImGuiSelectionBasicStorage we:
|
||||||
|
// - always use indices in the multi-selection API (passed to SetNextItemSelectionUserData(), retrieved in ImGuiMultiSelectIO)
|
||||||
|
// - use the AdapterIndexToStorageId() indirection layer to abstract how persistent selection data is derived from an index.
|
||||||
|
// - use decently optimized logic to allow queries and insertion of very large selection sets.
|
||||||
|
// - do not preserve selection order.
|
||||||
|
// Many combinations are possible depending on how you prefer to store your items and how you prefer to store your selection.
|
||||||
|
// Large applications are likely to eventually want to get rid of this indirection layer and do their own thing.
|
||||||
|
// See https://github.com/ocornut/imgui/wiki/Multi-Select for details and pseudo-code using this helper.
|
||||||
|
struct ImGuiSelectionBasicStorage
|
||||||
|
{
|
||||||
|
// Members
|
||||||
|
int Size; // // Number of selected items, maintained by this helper.
|
||||||
|
bool PreserveOrder; // = false // GetNextSelectedItem() will return ordered selection (currently implemented by two additional sorts of selection. Could be improved)
|
||||||
|
void* UserData; // = NULL // User data for use by adapter function // e.g. selection.UserData = (void*)my_items;
|
||||||
|
ImGuiID (*AdapterIndexToStorageId)(ImGuiSelectionBasicStorage* self, int idx); // e.g. selection.AdapterIndexToStorageId = [](ImGuiSelectionBasicStorage* self, int idx) { return ((MyItems**)self->UserData)[idx]->ID; };
|
||||||
|
int _SelectionOrder;// [Internal] Increasing counter to store selection order
|
||||||
|
ImGuiStorage _Storage; // [Internal] Selection set. Think of this as similar to e.g. std::set<ImGuiID>. Prefer not accessing directly: iterate with GetNextSelectedItem().
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
ImGuiSelectionBasicStorage();
|
||||||
|
IMGUI_API void ApplyRequests(ImGuiMultiSelectIO* ms_io); // Apply selection requests coming from BeginMultiSelect() and EndMultiSelect() functions. It uses 'items_count' passed to BeginMultiSelect()
|
||||||
|
IMGUI_API bool Contains(ImGuiID id) const; // Query if an item id is in selection.
|
||||||
|
IMGUI_API void Clear(); // Clear selection
|
||||||
|
IMGUI_API void Swap(ImGuiSelectionBasicStorage& r); // Swap two selections
|
||||||
|
IMGUI_API void SetItemSelected(ImGuiID id, bool selected); // Add/remove an item from selection (generally done by ApplyRequests() function)
|
||||||
|
IMGUI_API bool GetNextSelectedItem(void** opaque_it, ImGuiID* out_id); // Iterate selection with 'void* it = NULL; ImGuiId id; while (selection.GetNextSelectedItem(&it, &id)) { ... }'
|
||||||
|
inline ImGuiID GetStorageIdFromIndex(int idx) { return AdapterIndexToStorageId(this, idx); } // Convert index to item id based on provided adapter.
|
||||||
|
};
|
||||||
|
|
||||||
|
// Optional helper to apply multi-selection requests to existing randomly accessible storage.
|
||||||
|
// Convenient if you want to quickly wire multi-select API on e.g. an array of bool or items storing their own selection state.
|
||||||
|
struct ImGuiSelectionExternalStorage
|
||||||
|
{
|
||||||
|
// Members
|
||||||
|
void* UserData; // User data for use by adapter function // e.g. selection.UserData = (void*)my_items;
|
||||||
|
void (*AdapterSetItemSelected)(ImGuiSelectionExternalStorage* self, int idx, bool selected); // e.g. AdapterSetItemSelected = [](ImGuiSelectionExternalStorage* self, int idx, bool selected) { ((MyItems**)self->UserData)[idx]->Selected = selected; }
|
||||||
|
|
||||||
|
// Methods
|
||||||
|
IMGUI_API ImGuiSelectionExternalStorage();
|
||||||
|
IMGUI_API void ApplyRequests(ImGuiMultiSelectIO* ms_io); // Apply selection requests by using AdapterSetItemSelected() calls
|
||||||
|
};
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// [SECTION] Drawing API (ImDrawCmd, ImDrawIdx, ImDrawVert, ImDrawChannel, ImDrawListSplitter, ImDrawListFlags, ImDrawList, ImDrawData)
|
// [SECTION] Drawing API (ImDrawCmd, ImDrawIdx, ImDrawVert, ImDrawChannel, ImDrawListSplitter, ImDrawListFlags, ImDrawList, ImDrawData)
|
||||||
// Hold a series of drawing commands. The user provides a renderer for ImDrawData which essentially contains an array of ImDrawList.
|
// Hold a series of drawing commands. The user provides a renderer for ImDrawData which essentially contains an array of ImDrawList.
|
||||||
@ -3345,7 +3567,7 @@ struct ImFont
|
|||||||
float EllipsisCharStep; // 4 // out // Step between characters when EllipsisCount > 0
|
float EllipsisCharStep; // 4 // out // Step between characters when EllipsisCount > 0
|
||||||
bool DirtyLookupTables; // 1 // out //
|
bool DirtyLookupTables; // 1 // out //
|
||||||
float Scale; // 4 // in // = 1.f // Base font scale, multiplied by the per-window font scale which you can adjust with SetWindowFontScale()
|
float Scale; // 4 // in // = 1.f // Base font scale, multiplied by the per-window font scale which you can adjust with SetWindowFontScale()
|
||||||
float Ascent, Descent; // 4+4 // out // // Ascent: distance from top to bottom of e.g. 'A' [0..FontSize]
|
float Ascent, Descent; // 4+4 // out // // Ascent: distance from top to bottom of e.g. 'A' [0..FontSize] (unscaled)
|
||||||
int MetricsTotalSurface;// 4 // out // // Total surface in pixels to get an idea of the font rasterization/texture cost (not exact, we approximate the cost of padding between glyphs)
|
int MetricsTotalSurface;// 4 // out // // Total surface in pixels to get an idea of the font rasterization/texture cost (not exact, we approximate the cost of padding between glyphs)
|
||||||
ImU8 Used4kPagesMap[(IM_UNICODE_CODEPOINT_MAX+1)/4096/8]; // 2 bytes if ImWchar=ImWchar16, 34 bytes if ImWchar==ImWchar32. Store 1-bit for each block of 4K codepoints that has one active glyph. This is mainly used to facilitate iterations across all used codepoints.
|
ImU8 Used4kPagesMap[(IM_UNICODE_CODEPOINT_MAX+1)/4096/8]; // 2 bytes if ImWchar=ImWchar16, 34 bytes if ImWchar==ImWchar32. Store 1-bit for each block of 4K codepoints that has one active glyph. This is mainly used to facilitate iterations across all used codepoints.
|
||||||
|
|
||||||
@ -3564,7 +3786,7 @@ struct ImGuiPlatformMonitor
|
|||||||
ImGuiPlatformMonitor() { MainPos = MainSize = WorkPos = WorkSize = ImVec2(0, 0); DpiScale = 1.0f; PlatformHandle = NULL; }
|
ImGuiPlatformMonitor() { MainPos = MainSize = WorkPos = WorkSize = ImVec2(0, 0); DpiScale = 1.0f; PlatformHandle = NULL; }
|
||||||
};
|
};
|
||||||
|
|
||||||
// (Optional) Support for IME (Input Method Editor) via the io.SetPlatformImeDataFn() function.
|
// (Optional) Support for IME (Input Method Editor) via the io.PlatformSetImeDataFn() function.
|
||||||
struct ImGuiPlatformImeData
|
struct ImGuiPlatformImeData
|
||||||
{
|
{
|
||||||
bool WantVisible; // A widget wants the IME to be visible
|
bool WantVisible; // A widget wants the IME to be visible
|
||||||
@ -3583,19 +3805,27 @@ struct ImGuiPlatformImeData
|
|||||||
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||||
namespace ImGui
|
namespace ImGui
|
||||||
{
|
{
|
||||||
|
// OBSOLETED in 1.91.0 (from July 2024)
|
||||||
|
static inline void PushButtonRepeat(bool repeat) { PushItemFlag(ImGuiItemFlags_ButtonRepeat, repeat); }
|
||||||
|
static inline void PopButtonRepeat() { PopItemFlag(); }
|
||||||
|
static inline void PushTabStop(bool tab_stop) { PushItemFlag(ImGuiItemFlags_NoTabStop, !tab_stop); }
|
||||||
|
static inline void PopTabStop() { PopItemFlag(); }
|
||||||
|
IMGUI_API ImVec2 GetContentRegionMax(); // Content boundaries max (e.g. window boundaries including scrolling, or current column boundaries). You should never need this. Always use GetCursorScreenPos() and GetContentRegionAvail()!
|
||||||
|
IMGUI_API ImVec2 GetWindowContentRegionMin(); // Content boundaries min for the window (roughly (0,0)-Scroll), in window-local coordinates. You should never need this. Always use GetCursorScreenPos() and GetContentRegionAvail()!
|
||||||
|
IMGUI_API ImVec2 GetWindowContentRegionMax(); // Content boundaries max for the window (roughly (0,0)+Size-Scroll), in window-local coordinates. You should never need this. Always use GetCursorScreenPos() and GetContentRegionAvail()!
|
||||||
// OBSOLETED in 1.90.0 (from September 2023)
|
// 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 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 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(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 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); }
|
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);
|
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);
|
||||||
|
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);
|
||||||
// OBSOLETED in 1.89.7 (from June 2023)
|
// OBSOLETED in 1.89.7 (from June 2023)
|
||||||
IMGUI_API void SetItemAllowOverlap(); // Use SetNextItemAllowOverlap() before item.
|
IMGUI_API void SetItemAllowOverlap(); // Use SetNextItemAllowOverlap() before item.
|
||||||
// OBSOLETED in 1.89.4 (from March 2023)
|
// OBSOLETED in 1.89.4 (from March 2023)
|
||||||
static inline void PushAllowKeyboardFocus(bool tab_stop) { PushTabStop(tab_stop); }
|
static inline void PushAllowKeyboardFocus(bool tab_stop) { PushItemFlag(ImGuiItemFlags_NoTabStop, !tab_stop); }
|
||||||
static inline void PopAllowKeyboardFocus() { PopTabStop(); }
|
static inline void PopAllowKeyboardFocus() { PopItemFlag(); }
|
||||||
// OBSOLETED in 1.89 (from August 2022)
|
// OBSOLETED in 1.89 (from August 2022)
|
||||||
IMGUI_API bool ImageButton(ImTextureID user_texture_id, const ImVec2& size, const ImVec2& uv0 = ImVec2(0, 0), const ImVec2& uv1 = ImVec2(1, 1), int frame_padding = -1, const ImVec4& bg_col = ImVec4(0, 0, 0, 0), const ImVec4& tint_col = ImVec4(1, 1, 1, 1)); // Use new ImageButton() signature (explicit item id, regular FramePadding)
|
IMGUI_API bool ImageButton(ImTextureID user_texture_id, const ImVec2& size, const ImVec2& uv0 = ImVec2(0, 0), const ImVec2& uv1 = ImVec2(1, 1), int frame_padding = -1, const ImVec4& bg_col = ImVec4(0, 0, 0, 0), const ImVec4& tint_col = ImVec4(1, 1, 1, 1)); // Use new ImageButton() signature (explicit item id, regular FramePadding)
|
||||||
// OBSOLETED in 1.87 (from February 2022 but more formally obsoleted April 2024)
|
// OBSOLETED in 1.87 (from February 2022 but more formally obsoleted April 2024)
|
||||||
@ -3678,8 +3908,8 @@ namespace ImGui
|
|||||||
|
|
||||||
// RENAMED and MERGED both ImGuiKey_ModXXX and ImGuiModFlags_XXX into ImGuiMod_XXX (from September 2022)
|
// RENAMED and MERGED both ImGuiKey_ModXXX and ImGuiModFlags_XXX into ImGuiMod_XXX (from September 2022)
|
||||||
// RENAMED ImGuiKeyModFlags -> ImGuiModFlags in 1.88 (from April 2022). Exceptionally commented out ahead of obscolescence schedule to reduce confusion and because they were not meant to be used in the first place.
|
// RENAMED ImGuiKeyModFlags -> ImGuiModFlags in 1.88 (from April 2022). Exceptionally commented out ahead of obscolescence schedule to reduce confusion and because they were not meant to be used in the first place.
|
||||||
typedef ImGuiKeyChord ImGuiModFlags; // == int. We generally use ImGuiKeyChord to mean "a ImGuiKey or-ed with any number of ImGuiMod_XXX value", but you may store only mods in there.
|
//typedef ImGuiKeyChord ImGuiModFlags; // == int. We generally use ImGuiKeyChord to mean "a ImGuiKey or-ed with any number of ImGuiMod_XXX value", so you may store mods in there.
|
||||||
enum ImGuiModFlags_ { ImGuiModFlags_None = 0, ImGuiModFlags_Ctrl = ImGuiMod_Ctrl, ImGuiModFlags_Shift = ImGuiMod_Shift, ImGuiModFlags_Alt = ImGuiMod_Alt, ImGuiModFlags_Super = ImGuiMod_Super };
|
//enum ImGuiModFlags_ { ImGuiModFlags_None = 0, ImGuiModFlags_Ctrl = ImGuiMod_Ctrl, ImGuiModFlags_Shift = ImGuiMod_Shift, ImGuiModFlags_Alt = ImGuiMod_Alt, ImGuiModFlags_Super = ImGuiMod_Super };
|
||||||
//typedef ImGuiKeyChord ImGuiKeyModFlags; // == int
|
//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 };
|
//enum ImGuiKeyModFlags_ { ImGuiKeyModFlags_None = 0, ImGuiKeyModFlags_Ctrl = ImGuiMod_Ctrl, ImGuiKeyModFlags_Shift = ImGuiMod_Shift, ImGuiKeyModFlags_Alt = ImGuiMod_Alt, ImGuiKeyModFlags_Super = ImGuiMod_Super };
|
||||||
|
|
||||||
|
210
lib/third_party/imgui/imgui/include/imgui_internal.h
vendored
210
lib/third_party/imgui/imgui/include/imgui_internal.h
vendored
@ -1,4 +1,4 @@
|
|||||||
// dear imgui, v1.90.9
|
// dear imgui, v1.91.0
|
||||||
// (internal structures/api)
|
// (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.
|
// You may use this file to debug, understand or extend Dear ImGui features but we don't provide any guarantee of forward compatibility.
|
||||||
@ -22,6 +22,7 @@ Index of this file:
|
|||||||
// [SECTION] Navigation support
|
// [SECTION] Navigation support
|
||||||
// [SECTION] Typing-select support
|
// [SECTION] Typing-select support
|
||||||
// [SECTION] Columns support
|
// [SECTION] Columns support
|
||||||
|
// [SECTION] Box-select support
|
||||||
// [SECTION] Multi-select support
|
// [SECTION] Multi-select support
|
||||||
// [SECTION] Docking support
|
// [SECTION] Docking support
|
||||||
// [SECTION] Viewport support
|
// [SECTION] Viewport support
|
||||||
@ -124,6 +125,7 @@ struct ImBitVector; // Store 1-bit per value
|
|||||||
struct ImRect; // An axis-aligned rectangle (2 points)
|
struct ImRect; // An axis-aligned rectangle (2 points)
|
||||||
struct ImDrawDataBuilder; // Helper to build a ImDrawData instance
|
struct ImDrawDataBuilder; // Helper to build a ImDrawData instance
|
||||||
struct ImDrawListSharedData; // Data shared between all ImDrawList instances
|
struct ImDrawListSharedData; // Data shared between all ImDrawList instances
|
||||||
|
struct ImGuiBoxSelectState; // Box-selection state (currently used by multi-selection, could potentially be used by others)
|
||||||
struct ImGuiColorMod; // Stacked color modifier, backup of modified data so we can restore it
|
struct ImGuiColorMod; // Stacked color modifier, backup of modified data so we can restore it
|
||||||
struct ImGuiContext; // Main Dear ImGui context
|
struct ImGuiContext; // Main Dear ImGui context
|
||||||
struct ImGuiContextHook; // Hook for extensions like ImGuiTestEngine
|
struct ImGuiContextHook; // Hook for extensions like ImGuiTestEngine
|
||||||
@ -139,8 +141,9 @@ struct ImGuiInputTextDeactivateData;// Short term storage to backup text of a de
|
|||||||
struct ImGuiLastItemData; // Status storage for last submitted items
|
struct ImGuiLastItemData; // Status storage for last submitted items
|
||||||
struct ImGuiLocEntry; // A localization entry.
|
struct ImGuiLocEntry; // A localization entry.
|
||||||
struct ImGuiMenuColumns; // Simple column measurement, currently used for MenuItem() only
|
struct ImGuiMenuColumns; // Simple column measurement, currently used for MenuItem() only
|
||||||
|
struct ImGuiMultiSelectState; // Multi-selection persistent state (for focused selection).
|
||||||
|
struct ImGuiMultiSelectTempData; // Multi-selection temporary state (while traversing).
|
||||||
struct ImGuiNavItemData; // Result of a gamepad/keyboard directional navigation move query result
|
struct ImGuiNavItemData; // Result of a gamepad/keyboard directional navigation move query result
|
||||||
struct ImGuiNavTreeNodeData; // Temporary storage for last TreeNode() being a Left arrow landing candidate.
|
|
||||||
struct ImGuiMetricsConfig; // Storage for ShowMetricsWindow() and DebugNodeXXX() functions
|
struct ImGuiMetricsConfig; // Storage for ShowMetricsWindow() and DebugNodeXXX() functions
|
||||||
struct ImGuiNextWindowData; // Storage for SetNextWindow** functions
|
struct ImGuiNextWindowData; // Storage for SetNextWindow** functions
|
||||||
struct ImGuiNextItemData; // Storage for SetNextItem** functions
|
struct ImGuiNextItemData; // Storage for SetNextItem** functions
|
||||||
@ -160,6 +163,7 @@ struct ImGuiTableInstanceData; // Storage for one instance of a same table
|
|||||||
struct ImGuiTableTempData; // Temporary storage for one table (one per table in the stack), shared between tables.
|
struct ImGuiTableTempData; // Temporary storage for one table (one per table in the stack), shared between tables.
|
||||||
struct ImGuiTableSettings; // Storage for a table .ini settings
|
struct ImGuiTableSettings; // Storage for a table .ini settings
|
||||||
struct ImGuiTableColumnsSettings; // Storage for a column .ini settings
|
struct ImGuiTableColumnsSettings; // Storage for a column .ini settings
|
||||||
|
struct ImGuiTreeNodeStackData; // Temporary storage for TreeNode().
|
||||||
struct ImGuiTypingSelectState; // Storage for GetTypingSelectRequest()
|
struct ImGuiTypingSelectState; // Storage for GetTypingSelectRequest()
|
||||||
struct ImGuiTypingSelectRequest; // Storage for GetTypingSelectRequest() (aimed to be public)
|
struct ImGuiTypingSelectRequest; // Storage for GetTypingSelectRequest() (aimed to be public)
|
||||||
struct ImGuiWindow; // Storage for one window
|
struct ImGuiWindow; // Storage for one window
|
||||||
@ -177,7 +181,6 @@ typedef int ImGuiLayoutType; // -> enum ImGuiLayoutType_ // E
|
|||||||
typedef int ImGuiActivateFlags; // -> enum ImGuiActivateFlags_ // Flags: for navigation/focus function (will be for ActivateItem() later)
|
typedef int ImGuiActivateFlags; // -> enum ImGuiActivateFlags_ // Flags: for navigation/focus function (will be for ActivateItem() later)
|
||||||
typedef int ImGuiDebugLogFlags; // -> enum ImGuiDebugLogFlags_ // Flags: for ShowDebugLogWindow(), g.DebugLogFlags
|
typedef int ImGuiDebugLogFlags; // -> enum ImGuiDebugLogFlags_ // Flags: for ShowDebugLogWindow(), g.DebugLogFlags
|
||||||
typedef int ImGuiFocusRequestFlags; // -> enum ImGuiFocusRequestFlags_ // Flags: for FocusWindow();
|
typedef int ImGuiFocusRequestFlags; // -> enum ImGuiFocusRequestFlags_ // Flags: for FocusWindow();
|
||||||
typedef int ImGuiItemFlags; // -> enum ImGuiItemFlags_ // Flags: for PushItemFlag(), g.LastItemData.InFlags
|
|
||||||
typedef int ImGuiItemStatusFlags; // -> enum ImGuiItemStatusFlags_ // Flags: for g.LastItemData.StatusFlags
|
typedef int ImGuiItemStatusFlags; // -> enum ImGuiItemStatusFlags_ // Flags: for g.LastItemData.StatusFlags
|
||||||
typedef int ImGuiOldColumnFlags; // -> enum ImGuiOldColumnFlags_ // Flags: for BeginColumns()
|
typedef int ImGuiOldColumnFlags; // -> enum ImGuiOldColumnFlags_ // Flags: for BeginColumns()
|
||||||
typedef int ImGuiNavHighlightFlags; // -> enum ImGuiNavHighlightFlags_ // Flags: for RenderNavHighlight()
|
typedef int ImGuiNavHighlightFlags; // -> enum ImGuiNavHighlightFlags_ // Flags: for RenderNavHighlight()
|
||||||
@ -398,6 +401,7 @@ IM_MSVC_RUNTIME_CHECKS_OFF
|
|||||||
static inline char ImToUpper(char c) { return (c >= 'a' && c <= 'z') ? c &= ~32 : c; }
|
static inline char ImToUpper(char c) { return (c >= 'a' && c <= 'z') ? c &= ~32 : c; }
|
||||||
static inline bool ImCharIsBlankA(char c) { return c == ' ' || c == '\t'; }
|
static inline bool ImCharIsBlankA(char c) { return c == ' ' || c == '\t'; }
|
||||||
static inline bool ImCharIsBlankW(unsigned int c) { return c == ' ' || c == '\t' || c == 0x3000; }
|
static inline bool ImCharIsBlankW(unsigned int c) { return c == ' ' || c == '\t' || c == 0x3000; }
|
||||||
|
static inline bool ImCharIsXdigitA(char c) { return (c >= '0' && c <= '9') || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f'); }
|
||||||
IM_MSVC_RUNTIME_CHECKS_RESTORE
|
IM_MSVC_RUNTIME_CHECKS_RESTORE
|
||||||
|
|
||||||
// Helpers: Formatting
|
// Helpers: Formatting
|
||||||
@ -503,6 +507,7 @@ static inline int ImModPositive(int a, int b)
|
|||||||
static inline float ImDot(const ImVec2& a, const ImVec2& b) { return a.x * b.x + a.y * b.y; }
|
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); }
|
static inline ImVec2 ImRotate(const ImVec2& v, float cos_a, float sin_a) { return ImVec2(v.x * cos_a - v.y * sin_a, v.x * sin_a + v.y * cos_a); }
|
||||||
static inline float ImLinearSweep(float current, float target, float speed) { if (current < target) return ImMin(current + speed, target); if (current > target) return ImMax(current - speed, target); return current; }
|
static inline float ImLinearSweep(float current, float target, float speed) { if (current < target) return ImMin(current + speed, target); if (current > target) return ImMax(current - speed, target); return current; }
|
||||||
|
static inline float ImLinearRemapClamp(float s0, float s1, float d0, float d1, float x) { return ImSaturate((x - s0) / (s1 - s0)) * (d1 - d0) + d0; }
|
||||||
static inline ImVec2 ImMul(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(lhs.x * rhs.x, lhs.y * rhs.y); }
|
static inline ImVec2 ImMul(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(lhs.x * rhs.x, lhs.y * rhs.y); }
|
||||||
static inline bool ImIsFloatAboveGuaranteedIntegerPrecision(float f) { return f <= -16777216 || f >= 16777216; }
|
static inline bool ImIsFloatAboveGuaranteedIntegerPrecision(float f) { return f <= -16777216 || f >= 16777216; }
|
||||||
static inline float ImExponentialMovingAverage(float avg, float sample, int n) { avg -= avg / n; avg += sample / n; return avg; }
|
static inline float ImExponentialMovingAverage(float avg, float sample, int n) { avg -= avg / n; avg += sample / n; return avg; }
|
||||||
@ -789,6 +794,7 @@ struct IMGUI_API ImDrawListSharedData
|
|||||||
ImVec2 TexUvWhitePixel; // UV of white pixel in the atlas
|
ImVec2 TexUvWhitePixel; // UV of white pixel in the atlas
|
||||||
ImFont* Font; // Current/default font (optional, for simplified AddText overload)
|
ImFont* Font; // Current/default font (optional, for simplified AddText overload)
|
||||||
float FontSize; // Current/default font size (optional, for simplified AddText overload)
|
float FontSize; // Current/default font size (optional, for simplified AddText overload)
|
||||||
|
float FontScale; // Current/default font scale (== FontSize / Font->FontSize)
|
||||||
float CurveTessellationTol; // Tessellation tolerance when using PathBezierCurveTo()
|
float CurveTessellationTol; // Tessellation tolerance when using PathBezierCurveTo()
|
||||||
float CircleSegmentMaxError; // Number of circle segments to use per pixel of radius for AddCircle() etc
|
float CircleSegmentMaxError; // Number of circle segments to use per pixel of radius for AddCircle() etc
|
||||||
ImVec4 ClipRectFullscreen; // Value for PushClipRectFullscreen()
|
ImVec4 ClipRectFullscreen; // Value for PushClipRectFullscreen()
|
||||||
@ -856,29 +862,27 @@ enum ImGuiDataTypePrivate_
|
|||||||
// [SECTION] Widgets support: flags, enums, data structures
|
// [SECTION] Widgets support: flags, enums, data structures
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
// Flags used by upcoming items
|
// Extend ImGuiItemFlags
|
||||||
// - input: PushItemFlag() manipulates g.CurrentItemFlags, ItemAdd() calls may add extra flags.
|
// - input: PushItemFlag() manipulates g.CurrentItemFlags, ItemAdd() calls may add extra flags.
|
||||||
// - output: stored in g.LastItemData.InFlags
|
// - output: stored in g.LastItemData.InFlags
|
||||||
// Current window shared by all windows.
|
enum ImGuiItemFlagsPrivate_
|
||||||
// This is going to be exposed in imgui.h when stabilized enough.
|
|
||||||
enum ImGuiItemFlags_
|
|
||||||
{
|
{
|
||||||
// Controlled by user
|
// Controlled by user
|
||||||
ImGuiItemFlags_None = 0,
|
ImGuiItemFlags_Disabled = 1 << 10, // false // Disable interactions (DOES NOT affect visuals, see BeginDisabled()/EndDisabled() for full disable feature, and github #211).
|
||||||
ImGuiItemFlags_NoTabStop = 1 << 0, // false // Disable keyboard tabbing. This is a "lighter" version of ImGuiItemFlags_NoNav.
|
ImGuiItemFlags_ReadOnly = 1 << 11, // false // [ALPHA] Allow hovering interactions but underlying value is not changed.
|
||||||
ImGuiItemFlags_ButtonRepeat = 1 << 1, // false // Button() will return true multiple times based on io.KeyRepeatDelay and io.KeyRepeatRate settings.
|
ImGuiItemFlags_MixedValue = 1 << 12, // false // [BETA] Represent a mixed/indeterminate value, generally multi-selection where values differ. Currently only supported by Checkbox() (later should support all sorts of widgets)
|
||||||
ImGuiItemFlags_Disabled = 1 << 2, // false // Disable interactions but doesn't affect visuals. See BeginDisabled()/EndDisabled(). See github.com/ocornut/imgui/issues/211
|
ImGuiItemFlags_NoWindowHoverableCheck = 1 << 13, // false // Disable hoverable check in ItemHoverable()
|
||||||
ImGuiItemFlags_NoNav = 1 << 3, // false // Disable any form of focusing (keyboard/gamepad directional navigation and SetKeyboardFocusHere() calls)
|
ImGuiItemFlags_AllowOverlap = 1 << 14, // false // Allow being overlapped by another widget. Not-hovered to Hovered transition deferred by a frame.
|
||||||
ImGuiItemFlags_NoNavDefaultFocus = 1 << 4, // false // Disable item being a candidate for default focus (e.g. used by title bar items)
|
|
||||||
ImGuiItemFlags_SelectableDontClosePopup = 1 << 5, // false // Disable MenuItem/Selectable() automatically closing their popup window
|
|
||||||
ImGuiItemFlags_MixedValue = 1 << 6, // false // [BETA] Represent a mixed/indeterminate value, generally multi-selection where values differ. Currently only supported by Checkbox() (later should support all sorts of widgets)
|
|
||||||
ImGuiItemFlags_ReadOnly = 1 << 7, // false // [ALPHA] Allow hovering interactions but underlying value is not changed.
|
|
||||||
ImGuiItemFlags_NoWindowHoverableCheck = 1 << 8, // false // Disable hoverable check in ItemHoverable()
|
|
||||||
ImGuiItemFlags_AllowOverlap = 1 << 9, // false // Allow being overlapped by another widget. Not-hovered to Hovered transition deferred by a frame.
|
|
||||||
|
|
||||||
// Controlled by widget code
|
// Controlled by widget code
|
||||||
ImGuiItemFlags_Inputable = 1 << 10, // false // [WIP] Auto-activate input mode when tab focused. Currently only used and supported by a few items before it becomes a generic feature.
|
ImGuiItemFlags_Inputable = 1 << 20, // false // [WIP] Auto-activate input mode when tab focused. Currently only used and supported by a few items before it becomes a generic feature.
|
||||||
ImGuiItemFlags_HasSelectionUserData = 1 << 11, // false // Set by SetNextItemSelectionUserData()
|
ImGuiItemFlags_HasSelectionUserData = 1 << 21, // false // Set by SetNextItemSelectionUserData()
|
||||||
|
ImGuiItemFlags_IsMultiSelect = 1 << 22, // false // Set by SetNextItemSelectionUserData()
|
||||||
|
|
||||||
|
ImGuiItemFlags_Default_ = ImGuiItemFlags_AutoClosePopups, // Please don't change, use PushItemFlag() instead.
|
||||||
|
|
||||||
|
// Obsolete
|
||||||
|
//ImGuiItemFlags_SelectableDontClosePopup = !ImGuiItemFlags_AutoClosePopups, // Can't have a redirect as we inverted the behavior
|
||||||
};
|
};
|
||||||
|
|
||||||
// Status flags for an already submitted item
|
// Status flags for an already submitted item
|
||||||
@ -981,8 +985,8 @@ enum ImGuiSelectableFlagsPrivate_
|
|||||||
// Extend ImGuiTreeNodeFlags_
|
// Extend ImGuiTreeNodeFlags_
|
||||||
enum ImGuiTreeNodeFlagsPrivate_
|
enum ImGuiTreeNodeFlagsPrivate_
|
||||||
{
|
{
|
||||||
ImGuiTreeNodeFlags_ClipLabelForTrailingButton = 1 << 20,
|
ImGuiTreeNodeFlags_ClipLabelForTrailingButton = 1 << 28,// FIXME-WIP: Hard-coded for CollapsingHeader()
|
||||||
ImGuiTreeNodeFlags_UpsideDownArrow = 1 << 21,// (FIXME-WIP) Turn Down arrow into an Up arrow, but reversed trees (#6517)
|
ImGuiTreeNodeFlags_UpsideDownArrow = 1 << 29,// FIXME-WIP: Turn Down arrow into an Up arrow, but reversed trees (#6517)
|
||||||
};
|
};
|
||||||
|
|
||||||
enum ImGuiSeparatorFlags_
|
enum ImGuiSeparatorFlags_
|
||||||
@ -1229,10 +1233,6 @@ struct ImGuiNextWindowData
|
|||||||
inline void ClearFlags() { Flags = ImGuiNextWindowDataFlags_None; }
|
inline void ClearFlags() { Flags = ImGuiNextWindowDataFlags_None; }
|
||||||
};
|
};
|
||||||
|
|
||||||
// Multi-Selection item index or identifier when using SetNextItemSelectionUserData()/BeginMultiSelect()
|
|
||||||
// (Most users are likely to use this store an item INDEX but this may be used to store a POINTER as well.)
|
|
||||||
typedef ImS64 ImGuiSelectionUserData;
|
|
||||||
|
|
||||||
enum ImGuiNextItemDataFlags_
|
enum ImGuiNextItemDataFlags_
|
||||||
{
|
{
|
||||||
ImGuiNextItemDataFlags_None = 0,
|
ImGuiNextItemDataFlags_None = 0,
|
||||||
@ -1240,13 +1240,15 @@ enum ImGuiNextItemDataFlags_
|
|||||||
ImGuiNextItemDataFlags_HasOpen = 1 << 1,
|
ImGuiNextItemDataFlags_HasOpen = 1 << 1,
|
||||||
ImGuiNextItemDataFlags_HasShortcut = 1 << 2,
|
ImGuiNextItemDataFlags_HasShortcut = 1 << 2,
|
||||||
ImGuiNextItemDataFlags_HasRefVal = 1 << 3,
|
ImGuiNextItemDataFlags_HasRefVal = 1 << 3,
|
||||||
|
ImGuiNextItemDataFlags_HasStorageID = 1 << 4,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ImGuiNextItemData
|
struct ImGuiNextItemData
|
||||||
{
|
{
|
||||||
ImGuiNextItemDataFlags Flags;
|
ImGuiNextItemDataFlags Flags;
|
||||||
ImGuiItemFlags ItemFlags; // Currently only tested/used for ImGuiItemFlags_AllowOverlap.
|
ImGuiItemFlags ItemFlags; // Currently only tested/used for ImGuiItemFlags_AllowOverlap and ImGuiItemFlags_HasSelectionUserData.
|
||||||
// Non-flags members are NOT cleared by ItemAdd() meaning they are still valid during NavProcessItem()
|
// Non-flags members are NOT cleared by ItemAdd() meaning they are still valid during NavProcessItem()
|
||||||
|
ImGuiID FocusScopeId; // Set by SetNextItemSelectionUserData()
|
||||||
ImGuiSelectionUserData SelectionUserData; // Set by SetNextItemSelectionUserData() (note that NULL/0 is a valid value, we use -1 == ImGuiSelectionUserData_Invalid to mark invalid values)
|
ImGuiSelectionUserData SelectionUserData; // Set by SetNextItemSelectionUserData() (note that NULL/0 is a valid value, we use -1 == ImGuiSelectionUserData_Invalid to mark invalid values)
|
||||||
float Width; // Set by SetNextItemWidth()
|
float Width; // Set by SetNextItemWidth()
|
||||||
ImGuiKeyChord Shortcut; // Set by SetNextItemShortcut()
|
ImGuiKeyChord Shortcut; // Set by SetNextItemShortcut()
|
||||||
@ -1254,6 +1256,7 @@ struct ImGuiNextItemData
|
|||||||
bool OpenVal; // Set by SetNextItemOpen()
|
bool OpenVal; // Set by SetNextItemOpen()
|
||||||
ImU8 OpenCond; // Set by SetNextItemOpen()
|
ImU8 OpenCond; // Set by SetNextItemOpen()
|
||||||
ImGuiDataTypeStorage RefVal; // Not exposed yet, for ImGuiInputTextFlags_ParseEmptyAsRefVal
|
ImGuiDataTypeStorage RefVal; // Not exposed yet, for ImGuiInputTextFlags_ParseEmptyAsRefVal
|
||||||
|
ImGuiID StorageId; // Set by SetNextItemStorageID()
|
||||||
|
|
||||||
ImGuiNextItemData() { memset(this, 0, sizeof(*this)); SelectionUserData = -1; }
|
ImGuiNextItemData() { memset(this, 0, sizeof(*this)); SelectionUserData = -1; }
|
||||||
inline void ClearFlags() { Flags = ImGuiNextItemDataFlags_None; ItemFlags = ImGuiItemFlags_None; } // Also cleared manually by ItemAdd()!
|
inline void ClearFlags() { Flags = ImGuiNextItemDataFlags_None; ItemFlags = ImGuiItemFlags_None; } // Also cleared manually by ItemAdd()!
|
||||||
@ -1275,14 +1278,16 @@ struct ImGuiLastItemData
|
|||||||
ImGuiLastItemData() { memset(this, 0, sizeof(*this)); }
|
ImGuiLastItemData() { memset(this, 0, sizeof(*this)); }
|
||||||
};
|
};
|
||||||
|
|
||||||
// Store data emitted by TreeNode() for usage by TreePop() to implement ImGuiTreeNodeFlags_NavLeftJumpsBackHere.
|
// Store data emitted by TreeNode() for usage by TreePop()
|
||||||
// This is the minimum amount of data that we need to perform the equivalent of NavApplyItemToResult() and which we can't infer in TreePop()
|
// - To implement ImGuiTreeNodeFlags_NavLeftJumpsBackHere: store the minimum amount of data
|
||||||
|
// which we can't infer in TreePop(), to perform the equivalent of NavApplyItemToResult().
|
||||||
// Only stored when the node is a potential candidate for landing on a Left arrow jump.
|
// Only stored when the node is a potential candidate for landing on a Left arrow jump.
|
||||||
struct ImGuiNavTreeNodeData
|
struct ImGuiTreeNodeStackData
|
||||||
{
|
{
|
||||||
ImGuiID ID;
|
ImGuiID ID;
|
||||||
ImGuiItemFlags InFlags;
|
ImGuiTreeNodeFlags TreeFlags;
|
||||||
ImRect NavRect;
|
ImGuiItemFlags InFlags; // Used for nav landing
|
||||||
|
ImRect NavRect; // Used for nav landing
|
||||||
};
|
};
|
||||||
|
|
||||||
struct IMGUI_API ImGuiStackSizes
|
struct IMGUI_API ImGuiStackSizes
|
||||||
@ -1377,8 +1382,8 @@ typedef ImBitArray<ImGuiKey_NamedKey_COUNT, -ImGuiKey_NamedKey_BEGIN> ImBitAr
|
|||||||
#define ImGuiKey_NavKeyboardTweakFast ImGuiMod_Shift
|
#define ImGuiKey_NavKeyboardTweakFast ImGuiMod_Shift
|
||||||
#define ImGuiKey_NavGamepadTweakSlow ImGuiKey_GamepadL1
|
#define ImGuiKey_NavGamepadTweakSlow ImGuiKey_GamepadL1
|
||||||
#define ImGuiKey_NavGamepadTweakFast ImGuiKey_GamepadR1
|
#define ImGuiKey_NavGamepadTweakFast ImGuiKey_GamepadR1
|
||||||
#define ImGuiKey_NavGamepadActivate ImGuiKey_GamepadFaceDown
|
#define ImGuiKey_NavGamepadActivate (g.IO.ConfigNavSwapGamepadButtons ? ImGuiKey_GamepadFaceRight : ImGuiKey_GamepadFaceDown)
|
||||||
#define ImGuiKey_NavGamepadCancel ImGuiKey_GamepadFaceRight
|
#define ImGuiKey_NavGamepadCancel (g.IO.ConfigNavSwapGamepadButtons ? ImGuiKey_GamepadFaceDown : ImGuiKey_GamepadFaceRight)
|
||||||
#define ImGuiKey_NavGamepadMenu ImGuiKey_GamepadFaceLeft
|
#define ImGuiKey_NavGamepadMenu ImGuiKey_GamepadFaceLeft
|
||||||
#define ImGuiKey_NavGamepadInput ImGuiKey_GamepadFaceUp
|
#define ImGuiKey_NavGamepadInput ImGuiKey_GamepadFaceUp
|
||||||
|
|
||||||
@ -1733,6 +1738,34 @@ struct ImGuiOldColumns
|
|||||||
ImGuiOldColumns() { memset(this, 0, sizeof(*this)); }
|
ImGuiOldColumns() { memset(this, 0, sizeof(*this)); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// [SECTION] Box-select support
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
struct ImGuiBoxSelectState
|
||||||
|
{
|
||||||
|
// Active box-selection data (persistent, 1 active at a time)
|
||||||
|
ImGuiID ID;
|
||||||
|
bool IsActive;
|
||||||
|
bool IsStarting;
|
||||||
|
bool IsStartedFromVoid; // Starting click was not from an item.
|
||||||
|
bool IsStartedSetNavIdOnce;
|
||||||
|
bool RequestClear;
|
||||||
|
ImGuiKeyChord KeyMods : 16; // Latched key-mods for box-select logic.
|
||||||
|
ImVec2 StartPosRel; // Start position in window-contents relative space (to support scrolling)
|
||||||
|
ImVec2 EndPosRel; // End position in window-contents relative space
|
||||||
|
ImVec2 ScrollAccum; // Scrolling accumulator (to behave at high-frame spaces)
|
||||||
|
ImGuiWindow* Window;
|
||||||
|
|
||||||
|
// Temporary/Transient data
|
||||||
|
bool UnclipMode; // (Temp/Transient, here in hot area). Set/cleared by the BeginMultiSelect()/EndMultiSelect() owning active box-select.
|
||||||
|
ImRect UnclipRect; // Rectangle where ItemAdd() clipping may be temporarily disabled. Need support by multi-select supporting widgets.
|
||||||
|
ImRect BoxSelectRectPrev; // Selection rectangle in absolute coordinates (derived every frame from BoxSelectStartPosRel and MousePos)
|
||||||
|
ImRect BoxSelectRectCurr;
|
||||||
|
|
||||||
|
ImGuiBoxSelectState() { memset(this, 0, sizeof(*this)); }
|
||||||
|
};
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// [SECTION] Multi-select support
|
// [SECTION] Multi-select support
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@ -1740,9 +1773,45 @@ struct ImGuiOldColumns
|
|||||||
// We always assume that -1 is an invalid value (which works for indices and pointers)
|
// We always assume that -1 is an invalid value (which works for indices and pointers)
|
||||||
#define ImGuiSelectionUserData_Invalid ((ImGuiSelectionUserData)-1)
|
#define ImGuiSelectionUserData_Invalid ((ImGuiSelectionUserData)-1)
|
||||||
|
|
||||||
#ifdef IMGUI_HAS_MULTI_SELECT
|
// Temporary storage for multi-select
|
||||||
// <this is filled in 'range_select' branch>
|
struct IMGUI_API ImGuiMultiSelectTempData
|
||||||
#endif // #ifdef IMGUI_HAS_MULTI_SELECT
|
{
|
||||||
|
ImGuiMultiSelectIO IO; // MUST BE FIRST FIELD. Requests are set and returned by BeginMultiSelect()/EndMultiSelect() + written to by user during the loop.
|
||||||
|
ImGuiMultiSelectState* Storage;
|
||||||
|
ImGuiID FocusScopeId; // Copied from g.CurrentFocusScopeId (unless another selection scope was pushed manually)
|
||||||
|
ImGuiMultiSelectFlags Flags;
|
||||||
|
ImVec2 ScopeRectMin;
|
||||||
|
ImVec2 BackupCursorMaxPos;
|
||||||
|
ImGuiSelectionUserData LastSubmittedItem; // Copy of last submitted item data, used to merge output ranges.
|
||||||
|
ImGuiID BoxSelectId;
|
||||||
|
ImGuiKeyChord KeyMods;
|
||||||
|
ImS8 LoopRequestSetAll; // -1: no operation, 0: clear all, 1: select all.
|
||||||
|
bool IsEndIO; // Set when switching IO from BeginMultiSelect() to EndMultiSelect() state.
|
||||||
|
bool IsFocused; // Set if currently focusing the selection scope (any item of the selection). May be used if you have custom shortcut associated to selection.
|
||||||
|
bool IsKeyboardSetRange; // Set by BeginMultiSelect() when using Shift+Navigation. Because scrolling may be affected we can't afford a frame of lag with Shift+Navigation.
|
||||||
|
bool NavIdPassedBy;
|
||||||
|
bool RangeSrcPassedBy; // Set by the item that matches RangeSrcItem.
|
||||||
|
bool RangeDstPassedBy; // Set by the item that matches NavJustMovedToId when IsSetRange is set.
|
||||||
|
|
||||||
|
ImGuiMultiSelectTempData() { Clear(); }
|
||||||
|
void Clear() { size_t io_sz = sizeof(IO); ClearIO(); memset((void*)(&IO + 1), 0, sizeof(*this) - io_sz); } // Zero-clear except IO as we preserve IO.Requests[] buffer allocation.
|
||||||
|
void ClearIO() { IO.Requests.resize(0); IO.RangeSrcItem = IO.NavIdItem = ImGuiSelectionUserData_Invalid; IO.NavIdSelected = IO.RangeSrcReset = false; }
|
||||||
|
};
|
||||||
|
|
||||||
|
// Persistent storage for multi-select (as long as selection is alive)
|
||||||
|
struct IMGUI_API ImGuiMultiSelectState
|
||||||
|
{
|
||||||
|
ImGuiWindow* Window;
|
||||||
|
ImGuiID ID;
|
||||||
|
int LastFrameActive; // Last used frame-count, for GC.
|
||||||
|
int LastSelectionSize; // Set by BeginMultiSelect() based on optional info provided by user. May be -1 if unknown.
|
||||||
|
ImS8 RangeSelected; // -1 (don't have) or true/false
|
||||||
|
ImS8 NavIdSelected; // -1 (don't have) or true/false
|
||||||
|
ImGuiSelectionUserData RangeSrcItem; //
|
||||||
|
ImGuiSelectionUserData NavIdItem; // SetNextItemSelectionUserData() value for NavId (if part of submitted items)
|
||||||
|
|
||||||
|
ImGuiMultiSelectState() { Window = NULL; ID = 0; LastFrameActive = LastSelectionSize = 0; RangeSelected = NavIdSelected = -1; RangeSrcItem = NavIdItem = ImGuiSelectionUserData_Invalid; }
|
||||||
|
};
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// [SECTION] Docking support
|
// [SECTION] Docking support
|
||||||
@ -1997,6 +2066,7 @@ enum ImGuiLocKey : int
|
|||||||
ImGuiLocKey_WindowingMainMenuBar,
|
ImGuiLocKey_WindowingMainMenuBar,
|
||||||
ImGuiLocKey_WindowingPopup,
|
ImGuiLocKey_WindowingPopup,
|
||||||
ImGuiLocKey_WindowingUntitled,
|
ImGuiLocKey_WindowingUntitled,
|
||||||
|
ImGuiLocKey_CopyLink,
|
||||||
ImGuiLocKey_DockingHideTabBar,
|
ImGuiLocKey_DockingHideTabBar,
|
||||||
ImGuiLocKey_DockingHoldShiftToDock,
|
ImGuiLocKey_DockingHoldShiftToDock,
|
||||||
ImGuiLocKey_DockingDragToUndockOrMoveNode,
|
ImGuiLocKey_DockingDragToUndockOrMoveNode,
|
||||||
@ -2127,6 +2197,7 @@ struct ImGuiContext
|
|||||||
ImFont* Font; // (Shortcut) == FontStack.empty() ? IO.Font : FontStack.back()
|
ImFont* Font; // (Shortcut) == FontStack.empty() ? IO.Font : FontStack.back()
|
||||||
float FontSize; // (Shortcut) == FontBaseSize * g.CurrentWindow->FontWindowScale == window->FontSize(). Text height for current window.
|
float FontSize; // (Shortcut) == FontBaseSize * g.CurrentWindow->FontWindowScale == window->FontSize(). Text height for current window.
|
||||||
float FontBaseSize; // (Shortcut) == IO.FontGlobalScale * Font->Scale * Font->FontSize. Base text height.
|
float FontBaseSize; // (Shortcut) == IO.FontGlobalScale * Font->Scale * Font->FontSize. Base text height.
|
||||||
|
float FontScale; // == FontSize / Font->FontSize
|
||||||
float CurrentDpiScale; // Current window/viewport DpiScale == CurrentViewport->DpiScale
|
float CurrentDpiScale; // Current window/viewport DpiScale == CurrentViewport->DpiScale
|
||||||
ImDrawListSharedData DrawListSharedData;
|
ImDrawListSharedData DrawListSharedData;
|
||||||
double Time;
|
double Time;
|
||||||
@ -2211,11 +2282,9 @@ struct ImGuiContext
|
|||||||
ImGuiKeyOwnerData KeysOwnerData[ImGuiKey_NamedKey_COUNT];
|
ImGuiKeyOwnerData KeysOwnerData[ImGuiKey_NamedKey_COUNT];
|
||||||
ImGuiKeyRoutingTable KeysRoutingTable;
|
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)
|
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)
|
bool ActiveIdUsingAllKeyboardKeys; // Active widget will want to read all keyboard keys inputs. (this is a shortcut for not taking ownership of 100+ keys, frequently used by drag operations)
|
||||||
ImGuiKeyChord DebugBreakInShortcutRouting; // Set to break in SetShortcutRouting()/Shortcut() calls.
|
ImGuiKeyChord DebugBreakInShortcutRouting; // Set to break in SetShortcutRouting()/Shortcut() calls.
|
||||||
#ifndef IMGUI_DISABLE_OBSOLETE_KEYIO
|
//ImU32 ActiveIdUsingNavInputMask; // [OBSOLETE] Since (IMGUI_VERSION_NUM >= 18804) : 'g.ActiveIdUsingNavInputMask |= (1 << ImGuiNavInput_Cancel);' becomes --> 'SetKeyOwner(ImGuiKey_Escape, g.ActiveId) and/or SetKeyOwner(ImGuiKey_NavGamepadCancel, g.ActiveId);'
|
||||||
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
|
// Next window/item data
|
||||||
ImGuiID CurrentFocusScopeId; // Value for currently appending items == g.FocusScopeStack.back(). Not to be mistaken with g.NavFocusScopeId.
|
ImGuiID CurrentFocusScopeId; // Value for currently appending items == g.FocusScopeStack.back(). Not to be mistaken with g.NavFocusScopeId.
|
||||||
@ -2236,7 +2305,7 @@ struct ImGuiContext
|
|||||||
ImVector<ImGuiGroupData> GroupStack; // Stack for BeginGroup()/EndGroup() - not inherited by Begin()
|
ImVector<ImGuiGroupData> GroupStack; // Stack for BeginGroup()/EndGroup() - not inherited by Begin()
|
||||||
ImVector<ImGuiPopupData> OpenPopupStack; // Which popups are open (persistent)
|
ImVector<ImGuiPopupData> OpenPopupStack; // Which popups are open (persistent)
|
||||||
ImVector<ImGuiPopupData> BeginPopupStack; // Which level of BeginPopup() we are in (reset every frame)
|
ImVector<ImGuiPopupData> BeginPopupStack; // Which level of BeginPopup() we are in (reset every frame)
|
||||||
ImVector<ImGuiNavTreeNodeData> NavTreeNodeStack; // Stack for TreeNode() when a NavLeft requested is emitted.
|
ImVector<ImGuiTreeNodeStackData>TreeNodeStack; // Stack for TreeNode()
|
||||||
|
|
||||||
// Viewports
|
// Viewports
|
||||||
ImVector<ImGuiViewportP*> Viewports; // Active viewports (always 1+, and generally 1 unless multi-viewports are enabled). Each viewports hold their copy of ImDrawData.
|
ImVector<ImGuiViewportP*> Viewports; // Active viewports (always 1+, and generally 1 unless multi-viewports are enabled). Each viewports hold their copy of ImDrawData.
|
||||||
@ -2358,6 +2427,13 @@ struct ImGuiContext
|
|||||||
ImVector<ImGuiPtrOrIndex> CurrentTabBarStack;
|
ImVector<ImGuiPtrOrIndex> CurrentTabBarStack;
|
||||||
ImVector<ImGuiShrinkWidthItem> ShrinkWidthBuffer;
|
ImVector<ImGuiShrinkWidthItem> ShrinkWidthBuffer;
|
||||||
|
|
||||||
|
// Multi-Select state
|
||||||
|
ImGuiBoxSelectState BoxSelectState;
|
||||||
|
ImGuiMultiSelectTempData* CurrentMultiSelect;
|
||||||
|
int MultiSelectTempDataStacked; // Temporary multi-select data size (because we leave previous instances undestructed, we generally don't use MultiSelectTempData.Size)
|
||||||
|
ImVector<ImGuiMultiSelectTempData> MultiSelectTempData;
|
||||||
|
ImPool<ImGuiMultiSelectState> MultiSelectStorage;
|
||||||
|
|
||||||
// Hover Delay system
|
// Hover Delay system
|
||||||
ImGuiID HoverItemDelayId;
|
ImGuiID HoverItemDelayId;
|
||||||
ImGuiID HoverItemDelayIdPreviousFrame;
|
ImGuiID HoverItemDelayIdPreviousFrame;
|
||||||
@ -2407,7 +2483,7 @@ struct ImGuiContext
|
|||||||
|
|
||||||
// Platform support
|
// Platform support
|
||||||
ImGuiPlatformImeData PlatformImeData; // Data updated by current frame
|
ImGuiPlatformImeData PlatformImeData; // Data updated by current frame
|
||||||
ImGuiPlatformImeData PlatformImeDataPrev; // Previous frame data (when changing we will call io.SetPlatformImeDataFn
|
ImGuiPlatformImeData PlatformImeDataPrev; // Previous frame data. When changed we call the io.PlatformSetImeDataFn() handler.
|
||||||
ImGuiID PlatformImeViewport;
|
ImGuiID PlatformImeViewport;
|
||||||
|
|
||||||
// Extensions
|
// Extensions
|
||||||
@ -2482,7 +2558,7 @@ struct ImGuiContext
|
|||||||
ConfigFlagsCurrFrame = ConfigFlagsLastFrame = ImGuiConfigFlags_None;
|
ConfigFlagsCurrFrame = ConfigFlagsLastFrame = ImGuiConfigFlags_None;
|
||||||
FontAtlasOwnedByContext = shared_font_atlas ? false : true;
|
FontAtlasOwnedByContext = shared_font_atlas ? false : true;
|
||||||
Font = NULL;
|
Font = NULL;
|
||||||
FontSize = FontBaseSize = CurrentDpiScale = 0.0f;
|
FontSize = FontBaseSize = FontScale = CurrentDpiScale = 0.0f;
|
||||||
IO.Fonts = shared_font_atlas ? shared_font_atlas : IM_NEW(ImFontAtlas)();
|
IO.Fonts = shared_font_atlas ? shared_font_atlas : IM_NEW(ImFontAtlas)();
|
||||||
Time = 0.0f;
|
Time = 0.0f;
|
||||||
FrameCount = 0;
|
FrameCount = 0;
|
||||||
@ -2537,9 +2613,6 @@ struct ImGuiContext
|
|||||||
|
|
||||||
ActiveIdUsingNavDirMask = 0x00;
|
ActiveIdUsingNavDirMask = 0x00;
|
||||||
ActiveIdUsingAllKeyboardKeys = false;
|
ActiveIdUsingAllKeyboardKeys = false;
|
||||||
#ifndef IMGUI_DISABLE_OBSOLETE_KEYIO
|
|
||||||
ActiveIdUsingNavInputMask = 0x00;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
CurrentFocusScopeId = 0;
|
CurrentFocusScopeId = 0;
|
||||||
CurrentItemFlags = ImGuiItemFlags_None;
|
CurrentItemFlags = ImGuiItemFlags_None;
|
||||||
@ -2612,6 +2685,8 @@ struct ImGuiContext
|
|||||||
CurrentTable = NULL;
|
CurrentTable = NULL;
|
||||||
TablesTempDataStacked = 0;
|
TablesTempDataStacked = 0;
|
||||||
CurrentTabBar = NULL;
|
CurrentTabBar = NULL;
|
||||||
|
CurrentMultiSelect = NULL;
|
||||||
|
MultiSelectTempDataStacked = 0;
|
||||||
|
|
||||||
HoverItemDelayId = HoverItemDelayIdPreviousFrame = HoverItemUnlockedStationaryId = HoverWindowUnlockedStationaryId = 0;
|
HoverItemDelayId = HoverItemDelayIdPreviousFrame = HoverItemUnlockedStationaryId = HoverWindowUnlockedStationaryId = 0;
|
||||||
HoverItemDelayTimer = HoverItemDelayClearTimer = 0.0f;
|
HoverItemDelayTimer = HoverItemDelayClearTimer = 0.0f;
|
||||||
@ -2728,7 +2803,7 @@ struct IMGUI_API ImGuiWindowTempData
|
|||||||
ImVec2 MenuBarOffset; // MenuBarOffset.x is sort of equivalent of a per-layer CursorPos.x, saved/restored as we switch to the menu bar. The only situation when MenuBarOffset.y is > 0 if when (SafeAreaPadding.y > FramePadding.y), often used on TVs.
|
ImVec2 MenuBarOffset; // MenuBarOffset.x is sort of equivalent of a per-layer CursorPos.x, saved/restored as we switch to the menu bar. The only situation when MenuBarOffset.y is > 0 if when (SafeAreaPadding.y > FramePadding.y), often used on TVs.
|
||||||
ImGuiMenuColumns MenuColumns; // Simplified columns storage for menu items measurement
|
ImGuiMenuColumns MenuColumns; // Simplified columns storage for menu items measurement
|
||||||
int TreeDepth; // Current tree depth.
|
int TreeDepth; // Current tree depth.
|
||||||
ImU32 TreeJumpToParentOnPopMask; // Store a copy of !g.NavIdIsAlive for TreeDepth 0..31.. Could be turned into a ImU64 if necessary.
|
ImU32 TreeHasStackDataDepthMask; // Store whether given depth has ImGuiTreeNodeStackData data. Could be turned into a ImU64 if necessary.
|
||||||
ImVector<ImGuiWindow*> ChildWindows;
|
ImVector<ImGuiWindow*> ChildWindows;
|
||||||
ImGuiStorage* StateStorage; // Current persistent per-window storage (store e.g. tree node open/close state)
|
ImGuiStorage* StateStorage; // Current persistent per-window storage (store e.g. tree node open/close state)
|
||||||
ImGuiOldColumns* CurrentColumns; // Current columns set
|
ImGuiOldColumns* CurrentColumns; // Current columns set
|
||||||
@ -3295,6 +3370,7 @@ namespace ImGui
|
|||||||
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 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 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); }
|
inline ImVec2 WindowPosRelToAbs(ImGuiWindow* window, const ImVec2& p) { ImVec2 off = window->DC.CursorStartPos; return ImVec2(p.x + off.x, p.y + off.y); }
|
||||||
|
inline ImVec2 WindowPosAbsToRel(ImGuiWindow* window, const ImVec2& p) { ImVec2 off = window->DC.CursorStartPos; return ImVec2(p.x - off.x, p.y - off.y); }
|
||||||
|
|
||||||
// Windows: Display Order and Focus Order
|
// Windows: Display Order and Focus Order
|
||||||
IMGUI_API void FocusWindow(ImGuiWindow* window, ImGuiFocusRequestFlags flags = 0);
|
IMGUI_API void FocusWindow(ImGuiWindow* window, ImGuiFocusRequestFlags flags = 0);
|
||||||
@ -3375,7 +3451,7 @@ namespace ImGui
|
|||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
// Basic Accessors
|
// Basic Accessors
|
||||||
inline ImGuiItemStatusFlags GetItemStatusFlags(){ ImGuiContext& g = *GImGui; return g.LastItemData.StatusFlags; }
|
inline ImGuiItemStatusFlags GetItemStatusFlags() { ImGuiContext& g = *GImGui; return g.LastItemData.StatusFlags; }
|
||||||
inline ImGuiItemFlags GetItemFlags() { ImGuiContext& g = *GImGui; return g.LastItemData.InFlags; }
|
inline ImGuiItemFlags GetItemFlags() { ImGuiContext& g = *GImGui; return g.LastItemData.InFlags; }
|
||||||
inline ImGuiID GetActiveID() { ImGuiContext& g = *GImGui; return g.ActiveId; }
|
inline ImGuiID GetActiveID() { ImGuiContext& g = *GImGui; return g.ActiveId; }
|
||||||
inline ImGuiID GetFocusID() { ImGuiContext& g = *GImGui; return g.NavId; }
|
inline ImGuiID GetFocusID() { ImGuiContext& g = *GImGui; return g.NavId; }
|
||||||
@ -3401,13 +3477,9 @@ namespace ImGui
|
|||||||
IMGUI_API ImVec2 CalcItemSize(ImVec2 size, float default_w, float default_h);
|
IMGUI_API ImVec2 CalcItemSize(ImVec2 size, float default_w, float default_h);
|
||||||
IMGUI_API float CalcWrapWidthForPos(const ImVec2& pos, float wrap_pos_x);
|
IMGUI_API float CalcWrapWidthForPos(const ImVec2& pos, float wrap_pos_x);
|
||||||
IMGUI_API void PushMultiItemsWidths(int components, float width_full);
|
IMGUI_API void PushMultiItemsWidths(int components, float width_full);
|
||||||
IMGUI_API bool IsItemToggledSelection(); // Was the last item selection toggled? (after Selectable(), TreeNode() etc. We only returns toggle _event_ in order to handle clipping correctly)
|
|
||||||
IMGUI_API ImVec2 GetContentRegionMaxAbs();
|
|
||||||
IMGUI_API void ShrinkWidths(ImGuiShrinkWidthItem* items, int count, float width_excess);
|
IMGUI_API void ShrinkWidths(ImGuiShrinkWidthItem* items, int count, float width_excess);
|
||||||
|
|
||||||
// Parameter stacks (shared)
|
// Parameter stacks (shared)
|
||||||
IMGUI_API void PushItemFlag(ImGuiItemFlags option, bool enabled);
|
|
||||||
IMGUI_API void PopItemFlag();
|
|
||||||
IMGUI_API const ImGuiDataVarInfo* GetStyleVarInfo(ImGuiStyleVar idx);
|
IMGUI_API const ImGuiDataVarInfo* GetStyleVarInfo(ImGuiStyleVar idx);
|
||||||
IMGUI_API void BeginDisabledOverrideReenable();
|
IMGUI_API void BeginDisabledOverrideReenable();
|
||||||
IMGUI_API void EndDisabledOverrideReenable();
|
IMGUI_API void EndDisabledOverrideReenable();
|
||||||
@ -3456,7 +3528,7 @@ namespace ImGui
|
|||||||
IMGUI_API void NavMoveRequestSubmit(ImGuiDir move_dir, ImGuiDir clip_dir, ImGuiNavMoveFlags move_flags, ImGuiScrollFlags scroll_flags);
|
IMGUI_API void NavMoveRequestSubmit(ImGuiDir move_dir, ImGuiDir clip_dir, ImGuiNavMoveFlags move_flags, ImGuiScrollFlags scroll_flags);
|
||||||
IMGUI_API void NavMoveRequestForward(ImGuiDir move_dir, ImGuiDir clip_dir, ImGuiNavMoveFlags move_flags, ImGuiScrollFlags scroll_flags);
|
IMGUI_API void NavMoveRequestForward(ImGuiDir move_dir, ImGuiDir clip_dir, ImGuiNavMoveFlags move_flags, ImGuiScrollFlags scroll_flags);
|
||||||
IMGUI_API void NavMoveRequestResolveWithLastItem(ImGuiNavItemData* result);
|
IMGUI_API void NavMoveRequestResolveWithLastItem(ImGuiNavItemData* result);
|
||||||
IMGUI_API void NavMoveRequestResolveWithPastTreeNode(ImGuiNavItemData* result, ImGuiNavTreeNodeData* tree_node_data);
|
IMGUI_API void NavMoveRequestResolveWithPastTreeNode(ImGuiNavItemData* result, ImGuiTreeNodeStackData* tree_node_data);
|
||||||
IMGUI_API void NavMoveRequestCancel();
|
IMGUI_API void NavMoveRequestCancel();
|
||||||
IMGUI_API void NavMoveRequestApplyResult();
|
IMGUI_API void NavMoveRequestApplyResult();
|
||||||
IMGUI_API void NavMoveRequestTryWrapping(ImGuiWindow* window, ImGuiNavMoveFlags move_flags);
|
IMGUI_API void NavMoveRequestTryWrapping(ImGuiWindow* window, ImGuiNavMoveFlags move_flags);
|
||||||
@ -3521,7 +3593,7 @@ namespace ImGui
|
|||||||
IMGUI_API ImGuiID GetKeyOwner(ImGuiKey key);
|
IMGUI_API ImGuiID GetKeyOwner(ImGuiKey key);
|
||||||
IMGUI_API void SetKeyOwner(ImGuiKey key, ImGuiID owner_id, ImGuiInputFlags flags = 0);
|
IMGUI_API void SetKeyOwner(ImGuiKey key, ImGuiID owner_id, ImGuiInputFlags flags = 0);
|
||||||
IMGUI_API void SetKeyOwnersForKeyChord(ImGuiKeyChord key, ImGuiID owner_id, ImGuiInputFlags flags = 0);
|
IMGUI_API void SetKeyOwnersForKeyChord(ImGuiKeyChord key, ImGuiID owner_id, ImGuiInputFlags flags = 0);
|
||||||
IMGUI_API void SetItemKeyOwner(ImGuiKey key, ImGuiInputFlags flags = 0); // Set key owner to last item if it is hovered or active. Equivalent to 'if (IsItemHovered() || IsItemActive()) { SetKeyOwner(key, GetItemID());'.
|
IMGUI_API void SetItemKeyOwner(ImGuiKey key, ImGuiInputFlags flags); // Set key owner to last item if it is hovered or active. Equivalent to 'if (IsItemHovered() || IsItemActive()) { SetKeyOwner(key, GetItemID());'.
|
||||||
IMGUI_API bool TestKeyOwner(ImGuiKey key, ImGuiID owner_id); // Test that key is either not owned, either owned by 'owner_id'
|
IMGUI_API bool TestKeyOwner(ImGuiKey key, ImGuiID owner_id); // Test that key is either not owned, either owned by 'owner_id'
|
||||||
inline ImGuiKeyOwnerData* GetKeyOwnerData(ImGuiContext* ctx, ImGuiKey key) { if (key & ImGuiMod_Mask_) key = ConvertSingleModFlagToKey(key); IM_ASSERT(IsNamedKey(key)); return &ctx->KeysOwnerData[key - ImGuiKey_NamedKey_BEGIN]; }
|
inline ImGuiKeyOwnerData* GetKeyOwnerData(ImGuiContext* ctx, ImGuiKey key) { if (key & ImGuiMod_Mask_) key = ConvertSingleModFlagToKey(key); IM_ASSERT(IsNamedKey(key)); return &ctx->KeysOwnerData[key - ImGuiKey_NamedKey_BEGIN]; }
|
||||||
|
|
||||||
@ -3639,6 +3711,18 @@ namespace ImGui
|
|||||||
IMGUI_API int TypingSelectFindNextSingleCharMatch(ImGuiTypingSelectRequest* req, int items_count, const char* (*get_item_name_func)(void*, int), void* user_data, int nav_item_idx);
|
IMGUI_API int TypingSelectFindNextSingleCharMatch(ImGuiTypingSelectRequest* req, int items_count, const char* (*get_item_name_func)(void*, int), void* user_data, int nav_item_idx);
|
||||||
IMGUI_API int TypingSelectFindBestLeadingMatch(ImGuiTypingSelectRequest* req, int items_count, const char* (*get_item_name_func)(void*, int), void* user_data);
|
IMGUI_API int TypingSelectFindBestLeadingMatch(ImGuiTypingSelectRequest* req, int items_count, const char* (*get_item_name_func)(void*, int), void* user_data);
|
||||||
|
|
||||||
|
// Box-Select API
|
||||||
|
IMGUI_API bool BeginBoxSelect(const ImRect& scope_rect, ImGuiWindow* window, ImGuiID box_select_id, ImGuiMultiSelectFlags ms_flags);
|
||||||
|
IMGUI_API void EndBoxSelect(const ImRect& scope_rect, ImGuiMultiSelectFlags ms_flags);
|
||||||
|
|
||||||
|
// Multi-Select API
|
||||||
|
IMGUI_API void MultiSelectItemHeader(ImGuiID id, bool* p_selected, ImGuiButtonFlags* p_button_flags);
|
||||||
|
IMGUI_API void MultiSelectItemFooter(ImGuiID id, bool* p_selected, bool* p_pressed);
|
||||||
|
IMGUI_API void MultiSelectAddSetAll(ImGuiMultiSelectTempData* ms, bool selected);
|
||||||
|
IMGUI_API void MultiSelectAddSetRange(ImGuiMultiSelectTempData* ms, bool selected, int range_dir, ImGuiSelectionUserData first_item, ImGuiSelectionUserData last_item);
|
||||||
|
inline ImGuiBoxSelectState* GetBoxSelectState(ImGuiID id) { ImGuiContext& g = *GImGui; return (id != 0 && g.BoxSelectState.ID == id && g.BoxSelectState.IsActive) ? &g.BoxSelectState : NULL; }
|
||||||
|
inline ImGuiMultiSelectState* GetMultiSelectState(ImGuiID id) { ImGuiContext& g = *GImGui; return g.MultiSelectStorage.GetByKey(id); }
|
||||||
|
|
||||||
// Internal Columns API (this is not exposed because we will encourage transitioning to the Tables API)
|
// Internal Columns API (this is not exposed because we will encourage transitioning to the Tables API)
|
||||||
IMGUI_API void SetWindowClipRectBeforeSetChannel(ImGuiWindow* window, const ImRect& clip_rect);
|
IMGUI_API void SetWindowClipRectBeforeSetChannel(ImGuiWindow* window, const ImRect& clip_rect);
|
||||||
IMGUI_API void BeginColumns(const char* str_id, int count, ImGuiOldColumnFlags flags = 0); // setup number of columns. use an identifier to distinguish multiple column sets. close with EndColumns().
|
IMGUI_API void BeginColumns(const char* str_id, int count, ImGuiOldColumnFlags flags = 0); // setup number of columns. use an identifier to distinguish multiple column sets. close with EndColumns().
|
||||||
@ -3779,11 +3863,13 @@ namespace ImGui
|
|||||||
IMGUI_API bool DragBehavior(ImGuiID id, ImGuiDataType data_type, void* p_v, float v_speed, const void* p_min, const void* p_max, const char* format, ImGuiSliderFlags flags);
|
IMGUI_API bool DragBehavior(ImGuiID id, ImGuiDataType data_type, void* p_v, float v_speed, const void* p_min, const void* p_max, const char* format, ImGuiSliderFlags flags);
|
||||||
IMGUI_API bool SliderBehavior(const ImRect& bb, ImGuiID id, ImGuiDataType data_type, void* p_v, const void* p_min, const void* p_max, const char* format, ImGuiSliderFlags flags, ImRect* out_grab_bb);
|
IMGUI_API bool SliderBehavior(const ImRect& bb, ImGuiID id, ImGuiDataType data_type, void* p_v, const void* p_min, const void* p_max, const char* format, ImGuiSliderFlags flags, ImRect* out_grab_bb);
|
||||||
IMGUI_API bool SplitterBehavior(const ImRect& bb, ImGuiID id, ImGuiAxis axis, float* size1, float* size2, float min_size1, float min_size2, float hover_extend = 0.0f, float hover_visibility_delay = 0.0f, ImU32 bg_col = 0);
|
IMGUI_API bool SplitterBehavior(const ImRect& bb, ImGuiID id, ImGuiAxis axis, float* size1, float* size2, float min_size1, float min_size2, float hover_extend = 0.0f, float hover_visibility_delay = 0.0f, ImU32 bg_col = 0);
|
||||||
|
|
||||||
|
// Widgets: Tree Nodes
|
||||||
IMGUI_API bool TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* label, const char* label_end = NULL);
|
IMGUI_API bool TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* label, const char* label_end = NULL);
|
||||||
IMGUI_API void TreePushOverrideID(ImGuiID id);
|
IMGUI_API void TreePushOverrideID(ImGuiID id);
|
||||||
IMGUI_API void TreeNodeSetOpen(ImGuiID id, bool open);
|
IMGUI_API bool TreeNodeGetOpen(ImGuiID storage_id);
|
||||||
IMGUI_API bool TreeNodeUpdateNextOpen(ImGuiID id, ImGuiTreeNodeFlags flags); // Return open state. Consume previous SetNextItemOpen() data, if any. May return true when logging.
|
IMGUI_API void TreeNodeSetOpen(ImGuiID storage_id, bool open);
|
||||||
IMGUI_API void SetNextItemSelectionUserData(ImGuiSelectionUserData selection_user_data);
|
IMGUI_API bool TreeNodeUpdateNextOpen(ImGuiID storage_id, ImGuiTreeNodeFlags flags); // Return open state. Consume previous SetNextItemOpen() data, if any. May return true when logging.
|
||||||
|
|
||||||
// Template functions are instantiated in imgui_widgets.cpp for a finite number of types.
|
// Template functions are instantiated in imgui_widgets.cpp for a finite number of types.
|
||||||
// To use them externally (for custom widget) you may need an "extern template" statement in your code in order to link to existing instances and silence Clang warnings (see #2036).
|
// To use them externally (for custom widget) you may need an "extern template" statement in your code in order to link to existing instances and silence Clang warnings (see #2036).
|
||||||
@ -3830,12 +3916,8 @@ namespace ImGui
|
|||||||
IMGUI_API void GcCompactTransientWindowBuffers(ImGuiWindow* window);
|
IMGUI_API void GcCompactTransientWindowBuffers(ImGuiWindow* window);
|
||||||
IMGUI_API void GcAwakeTransientWindowBuffers(ImGuiWindow* window);
|
IMGUI_API void GcAwakeTransientWindowBuffers(ImGuiWindow* window);
|
||||||
|
|
||||||
// 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
|
// Debug Tools
|
||||||
|
IMGUI_API void DebugAllocHook(ImGuiDebugAllocInfo* info, int frame_count, void* ptr, size_t size); // size >= 0 : alloc, size = -1 : free
|
||||||
IMGUI_API void ErrorCheckEndFrameRecover(ImGuiErrorLogCallback log_callback, void* user_data = NULL);
|
IMGUI_API void ErrorCheckEndFrameRecover(ImGuiErrorLogCallback log_callback, void* user_data = NULL);
|
||||||
IMGUI_API void ErrorCheckEndWindowRecover(ImGuiErrorLogCallback log_callback, void* user_data = NULL);
|
IMGUI_API void ErrorCheckEndWindowRecover(ImGuiErrorLogCallback log_callback, void* user_data = NULL);
|
||||||
IMGUI_API void ErrorCheckUsingSetCursorPosToExtendParentBoundaries();
|
IMGUI_API void ErrorCheckUsingSetCursorPosToExtendParentBoundaries();
|
||||||
@ -3863,11 +3945,13 @@ namespace ImGui
|
|||||||
IMGUI_API void DebugNodeTableSettings(ImGuiTableSettings* settings);
|
IMGUI_API void DebugNodeTableSettings(ImGuiTableSettings* settings);
|
||||||
IMGUI_API void DebugNodeInputTextState(ImGuiInputTextState* state);
|
IMGUI_API void DebugNodeInputTextState(ImGuiInputTextState* state);
|
||||||
IMGUI_API void DebugNodeTypingSelectState(ImGuiTypingSelectState* state);
|
IMGUI_API void DebugNodeTypingSelectState(ImGuiTypingSelectState* state);
|
||||||
|
IMGUI_API void DebugNodeMultiSelectState(ImGuiMultiSelectState* state);
|
||||||
IMGUI_API void DebugNodeWindow(ImGuiWindow* window, const char* label);
|
IMGUI_API void DebugNodeWindow(ImGuiWindow* window, const char* label);
|
||||||
IMGUI_API void DebugNodeWindowSettings(ImGuiWindowSettings* settings);
|
IMGUI_API void DebugNodeWindowSettings(ImGuiWindowSettings* settings);
|
||||||
IMGUI_API void DebugNodeWindowsList(ImVector<ImGuiWindow*>* windows, const char* label);
|
IMGUI_API void DebugNodeWindowsList(ImVector<ImGuiWindow*>* windows, const char* label);
|
||||||
IMGUI_API void DebugNodeWindowsListByBeginStackParent(ImGuiWindow** windows, int windows_size, ImGuiWindow* parent_in_begin_stack);
|
IMGUI_API void DebugNodeWindowsListByBeginStackParent(ImGuiWindow** windows, int windows_size, ImGuiWindow* parent_in_begin_stack);
|
||||||
IMGUI_API void DebugNodeViewport(ImGuiViewportP* viewport);
|
IMGUI_API void DebugNodeViewport(ImGuiViewportP* viewport);
|
||||||
|
IMGUI_API void DebugNodePlatformMonitor(ImGuiPlatformMonitor* monitor, const char* label, int idx);
|
||||||
IMGUI_API void DebugRenderKeyboardPreview(ImDrawList* draw_list);
|
IMGUI_API void DebugRenderKeyboardPreview(ImDrawList* draw_list);
|
||||||
IMGUI_API void DebugRenderViewportThumbnail(ImDrawList* draw_list, ImGuiViewportP* viewport, const ImRect& bb);
|
IMGUI_API void DebugRenderViewportThumbnail(ImDrawList* draw_list, ImGuiViewportP* viewport, const ImRect& bb);
|
||||||
|
|
||||||
|
425
lib/third_party/imgui/imgui/source/imgui.cpp
vendored
425
lib/third_party/imgui/imgui/source/imgui.cpp
vendored
@ -1,4 +1,4 @@
|
|||||||
// dear imgui, v1.90.9
|
// dear imgui, v1.91.0
|
||||||
// (main code and documentation)
|
// (main code and documentation)
|
||||||
|
|
||||||
// Help:
|
// Help:
|
||||||
@ -438,6 +438,25 @@ CODE
|
|||||||
- likewise io.MousePos and GetMousePos() will use OS coordinates.
|
- 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.
|
If you query mouse positions to interact with non-imgui coordinates you will need to offset them, e.g. subtract GetWindowViewport()->Pos.
|
||||||
|
|
||||||
|
- 2024/07/25 (1.91.0) - obsoleted GetContentRegionMax(), GetWindowContentRegionMin() and GetWindowContentRegionMax(). (see #7838 on GitHub for more info)
|
||||||
|
you should never need those functions. you can do everything with GetCursorScreenPos() and GetContentRegionAvail() in a more simple way.
|
||||||
|
- instead of: GetWindowContentRegionMax().x - GetCursorPos().x
|
||||||
|
- you can use: GetContentRegionAvail().x
|
||||||
|
- instead of: GetWindowContentRegionMax().x + GetWindowPos().x
|
||||||
|
- you can use: GetCursorScreenPos().x + GetContentRegionAvail().x // when called from left edge of window
|
||||||
|
- instead of: GetContentRegionMax()
|
||||||
|
- you can use: GetContentRegionAvail() + GetCursorScreenPos() - GetWindowPos() // right edge in local coordinates
|
||||||
|
- instead of: GetWindowContentRegionMax().x - GetWindowContentRegionMin().x
|
||||||
|
- you can use: GetContentRegionAvail() // when called from left edge of window
|
||||||
|
- 2024/07/15 (1.91.0) - renamed ImGuiSelectableFlags_DontClosePopups to ImGuiSelectableFlags_NoAutoClosePopups. (#1379, #1468, #2200, #4936, #5216, #7302, #7573)
|
||||||
|
(internals: also renamed ImGuiItemFlags_SelectableDontClosePopup into ImGuiItemFlags_AutoClosePopups with inverted behaviors)
|
||||||
|
- 2024/07/15 (1.91.0) - obsoleted PushButtonRepeat()/PopButtonRepeat() in favor of using new PushItemFlag(ImGuiItemFlags_ButtonRepeat, ...)/PopItemFlag().
|
||||||
|
- 2024/07/02 (1.91.0) - commented out obsolete ImGuiModFlags (renamed to ImGuiKeyChord in 1.89). (#4921, #456)
|
||||||
|
- commented out obsolete ImGuiModFlags_XXX values (renamed to ImGuiMod_XXX in 1.89). (#4921, #456)
|
||||||
|
- ImGuiModFlags_Ctrl -> ImGuiMod_Ctrl, ImGuiModFlags_Shift -> ImGuiMod_Shift etc.
|
||||||
|
- 2024/07/02 (1.91.0) - IO, IME: renamed platform IME hook and added explicit context for consistency and future-proofness.
|
||||||
|
- old: io.SetPlatformImeDataFn(ImGuiViewport* viewport, ImGuiPlatformImeData* data);
|
||||||
|
- new: io.PlatformSetImeDataFn(ImGuiContext* ctx, ImGuiViewport* viewport, ImGuiPlatformImeData* data);
|
||||||
- 2024/06/21 (1.90.9) - BeginChild: added ImGuiChildFlags_NavFlattened as a replacement for the window flag ImGuiWindowFlags_NavFlattened: the feature only ever made sense for BeginChild() anyhow.
|
- 2024/06/21 (1.90.9) - BeginChild: added ImGuiChildFlags_NavFlattened as a replacement for the window flag ImGuiWindowFlags_NavFlattened: the feature only ever made sense for BeginChild() anyhow.
|
||||||
- old: BeginChild("Name", size, 0, ImGuiWindowFlags_NavFlattened);
|
- old: BeginChild("Name", size, 0, ImGuiWindowFlags_NavFlattened);
|
||||||
- new: BeginChild("Name", size, ImGuiChildFlags_NavFlattened, 0);
|
- new: BeginChild("Name", size, ImGuiChildFlags_NavFlattened, 0);
|
||||||
@ -1026,7 +1045,7 @@ CODE
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// [Windows] OS specific includes (optional)
|
// [Windows] OS specific includes (optional)
|
||||||
#if defined(_WIN32) && defined(IMGUI_DISABLE_DEFAULT_FILE_FUNCTIONS) && defined(IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS) && defined(IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS) && !defined(IMGUI_DISABLE_WIN32_FUNCTIONS)
|
#if defined(_WIN32) && defined(IMGUI_DISABLE_DEFAULT_FILE_FUNCTIONS) && defined(IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS) && defined(IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS) && defined(IMGUI_DISABLE_DEFAULT_SHELL_FUNCTIONS) && !defined(IMGUI_DISABLE_WIN32_FUNCTIONS)
|
||||||
#define IMGUI_DISABLE_WIN32_FUNCTIONS
|
#define IMGUI_DISABLE_WIN32_FUNCTIONS
|
||||||
#endif
|
#endif
|
||||||
#if defined(_WIN32) && !defined(IMGUI_DISABLE_WIN32_FUNCTIONS)
|
#if defined(_WIN32) && !defined(IMGUI_DISABLE_WIN32_FUNCTIONS)
|
||||||
@ -1045,6 +1064,7 @@ CODE
|
|||||||
// The UWP and GDK Win32 API subsets don't support clipboard nor IME functions
|
// The UWP and GDK Win32 API subsets don't support clipboard nor IME functions
|
||||||
#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS
|
#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS
|
||||||
#define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS
|
#define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS
|
||||||
|
#define IMGUI_DISABLE_DEFAULT_SHELL_FUNCTIONS
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1097,7 +1117,7 @@ CODE
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Debug options
|
// Debug options
|
||||||
#define IMGUI_DEBUG_NAV_SCORING 0 // Display navigation scoring preview when hovering items. Display last moving direction matches when holding CTRL
|
#define IMGUI_DEBUG_NAV_SCORING 0 // Display navigation scoring preview when hovering items. Hold CTRL to display for all candidates. CTRL+Arrow to change last direction.
|
||||||
#define IMGUI_DEBUG_NAV_RECTS 0 // Display the reference navigation rectangle for each window
|
#define IMGUI_DEBUG_NAV_RECTS 0 // Display the reference navigation rectangle for each window
|
||||||
|
|
||||||
// When using CTRL+TAB (or Gamepad Square+L/R) we delay the visual a little in order to reduce visual noise doing a fast switch.
|
// When using CTRL+TAB (or Gamepad Square+L/R) we delay the visual a little in order to reduce visual noise doing a fast switch.
|
||||||
@ -1137,7 +1157,8 @@ static void WindowSettingsHandler_WriteAll(ImGuiContext*, ImGuiSetti
|
|||||||
// Platform Dependents default implementation for IO functions
|
// Platform Dependents default implementation for IO functions
|
||||||
static const char* GetClipboardTextFn_DefaultImpl(void* user_data_ctx);
|
static const char* GetClipboardTextFn_DefaultImpl(void* user_data_ctx);
|
||||||
static void SetClipboardTextFn_DefaultImpl(void* user_data_ctx, const char* text);
|
static void SetClipboardTextFn_DefaultImpl(void* user_data_ctx, const char* text);
|
||||||
static void SetPlatformImeDataFn_DefaultImpl(ImGuiViewport* viewport, ImGuiPlatformImeData* data);
|
static void PlatformSetImeDataFn_DefaultImpl(ImGuiContext* ctx, ImGuiViewport* viewport, ImGuiPlatformImeData* data);
|
||||||
|
static bool PlatformOpenInShellFn_DefaultImpl(ImGuiContext* ctx, const char* path);
|
||||||
|
|
||||||
namespace ImGui
|
namespace ImGui
|
||||||
{
|
{
|
||||||
@ -1284,12 +1305,13 @@ ImGuiStyle::ImGuiStyle()
|
|||||||
TabBorderSize = 0.0f; // Thickness of border around tabs.
|
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.
|
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.
|
TabBarBorderSize = 1.0f; // Thickness of tab-bar separator, which takes on the tab active color to denote focus.
|
||||||
|
TabBarOverlineSize = 2.0f; // Thickness of tab-bar overline, which highlights the selected tab-bar.
|
||||||
TableAngledHeadersAngle = 35.0f * (IM_PI / 180.0f); // Angle of angled headers (supported values range from -50 degrees to +50 degrees).
|
TableAngledHeadersAngle = 35.0f * (IM_PI / 180.0f); // Angle of angled headers (supported values range from -50 degrees to +50 degrees).
|
||||||
TableAngledHeadersTextAlign = ImVec2(0.5f,0.0f);// Alignment of angled headers within the cell
|
TableAngledHeadersTextAlign = ImVec2(0.5f,0.0f);// Alignment of angled headers within the cell
|
||||||
ColorButtonPosition = ImGuiDir_Right; // Side of the color button in the ColorEdit4 widget (left/right). Defaults to ImGuiDir_Right.
|
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.
|
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.
|
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.
|
||||||
SeparatorTextBorderSize = 3.0f; // Thickkness of border in SeparatorText()
|
SeparatorTextBorderSize = 3.0f; // Thickness of border in SeparatorText()
|
||||||
SeparatorTextAlign = ImVec2(0.0f,0.5f);// Alignment of text within the separator. Defaults to (0.0f, 0.5f) (left aligned, center).
|
SeparatorTextAlign = ImVec2(0.0f,0.5f);// Alignment of text within the separator. Defaults to (0.0f, 0.5f) (left aligned, center).
|
||||||
SeparatorTextPadding = ImVec2(20.0f,3.f);// Horizontal offset of text from each edge of the separator + spacing on other axis. Generally small values. .y is recommended to be == FramePadding.y.
|
SeparatorTextPadding = ImVec2(20.0f,3.f);// Horizontal offset of text from each edge of the separator + spacing on other axis. Generally small values. .y is recommended to be == FramePadding.y.
|
||||||
DisplayWindowPadding = ImVec2(19,19); // Window position are clamped to be visible within the display area or monitors by at least this amount. Only applies to regular windows.
|
DisplayWindowPadding = ImVec2(19,19); // Window position are clamped to be visible within the display area or monitors by at least this amount. Only applies to regular windows.
|
||||||
@ -1340,6 +1362,7 @@ void ImGuiStyle::ScaleAllSizes(float scale_factor)
|
|||||||
LogSliderDeadzone = ImTrunc(LogSliderDeadzone * scale_factor);
|
LogSliderDeadzone = ImTrunc(LogSliderDeadzone * scale_factor);
|
||||||
TabRounding = ImTrunc(TabRounding * scale_factor);
|
TabRounding = ImTrunc(TabRounding * scale_factor);
|
||||||
TabMinWidthForCloseButton = (TabMinWidthForCloseButton != FLT_MAX) ? ImTrunc(TabMinWidthForCloseButton * scale_factor) : FLT_MAX;
|
TabMinWidthForCloseButton = (TabMinWidthForCloseButton != FLT_MAX) ? ImTrunc(TabMinWidthForCloseButton * scale_factor) : FLT_MAX;
|
||||||
|
TabBarOverlineSize = ImTrunc(TabBarOverlineSize * scale_factor);
|
||||||
SeparatorTextPadding = ImTrunc(SeparatorTextPadding * scale_factor);
|
SeparatorTextPadding = ImTrunc(SeparatorTextPadding * scale_factor);
|
||||||
DockingSeparatorSize = ImTrunc(DockingSeparatorSize * scale_factor);
|
DockingSeparatorSize = ImTrunc(DockingSeparatorSize * scale_factor);
|
||||||
DisplayWindowPadding = ImTrunc(DisplayWindowPadding * scale_factor);
|
DisplayWindowPadding = ImTrunc(DisplayWindowPadding * scale_factor);
|
||||||
@ -1392,6 +1415,7 @@ ImGuiIO::ImGuiIO()
|
|||||||
#else
|
#else
|
||||||
ConfigMacOSXBehaviors = false;
|
ConfigMacOSXBehaviors = false;
|
||||||
#endif
|
#endif
|
||||||
|
ConfigNavSwapGamepadButtons = false;
|
||||||
ConfigInputTrickleEventQueue = true;
|
ConfigInputTrickleEventQueue = true;
|
||||||
ConfigInputTextCursorBlink = true;
|
ConfigInputTextCursorBlink = true;
|
||||||
ConfigInputTextEnterKeepActive = false;
|
ConfigInputTextEnterKeepActive = false;
|
||||||
@ -1413,6 +1437,7 @@ ImGuiIO::ImGuiIO()
|
|||||||
// Note: Initialize() will setup default clipboard/ime handlers.
|
// Note: Initialize() will setup default clipboard/ime handlers.
|
||||||
BackendPlatformName = BackendRendererName = NULL;
|
BackendPlatformName = BackendRendererName = NULL;
|
||||||
BackendPlatformUserData = BackendRendererUserData = BackendLanguageUserData = NULL;
|
BackendPlatformUserData = BackendRendererUserData = BackendLanguageUserData = NULL;
|
||||||
|
PlatformOpenInShellUserData = NULL;
|
||||||
PlatformLocaleDecimalPoint = '.';
|
PlatformLocaleDecimalPoint = '.';
|
||||||
|
|
||||||
// Input (NB: we already have memset zero the entire structure!)
|
// Input (NB: we already have memset zero the entire structure!)
|
||||||
@ -2110,6 +2135,10 @@ void ImFormatStringToTempBuffer(const char** out_buf, const char** out_buf_end,
|
|||||||
va_end(args);
|
va_end(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: Should rework API toward allowing multiple in-flight temp buffers (easier and safer for caller)
|
||||||
|
// by making the caller acquire a temp buffer token, with either explicit or destructor release, e.g.
|
||||||
|
// ImGuiTempBufferToken token;
|
||||||
|
// ImFormatStringToTempBuffer(token, ...);
|
||||||
void ImFormatStringToTempBufferV(const char** out_buf, const char** out_buf_end, const char* fmt, va_list args)
|
void ImFormatStringToTempBufferV(const char** out_buf, const char** out_buf_end, const char* fmt, va_list args)
|
||||||
{
|
{
|
||||||
ImGuiContext& g = *GImGui;
|
ImGuiContext& g = *GImGui;
|
||||||
@ -2607,6 +2636,7 @@ ImGuiStoragePair* ImLowerBound(ImGuiStoragePair* in_begin, ImGuiStoragePair* in_
|
|||||||
return in_p;
|
return in_p;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IM_MSVC_RUNTIME_CHECKS_OFF
|
||||||
static int IMGUI_CDECL PairComparerByID(const void* lhs, const void* rhs)
|
static int IMGUI_CDECL PairComparerByID(const void* lhs, const void* rhs)
|
||||||
{
|
{
|
||||||
// We can't just do a subtraction because qsort uses signed integers and subtracting our ID doesn't play well with that.
|
// We can't just do a subtraction because qsort uses signed integers and subtracting our ID doesn't play well with that.
|
||||||
@ -2624,7 +2654,7 @@ void ImGuiStorage::BuildSortByKey()
|
|||||||
int ImGuiStorage::GetInt(ImGuiID key, int default_val) const
|
int ImGuiStorage::GetInt(ImGuiID key, int default_val) const
|
||||||
{
|
{
|
||||||
ImGuiStoragePair* it = ImLowerBound(const_cast<ImGuiStoragePair*>(Data.Data), const_cast<ImGuiStoragePair*>(Data.Data + Data.Size), key);
|
ImGuiStoragePair* it = ImLowerBound(const_cast<ImGuiStoragePair*>(Data.Data), const_cast<ImGuiStoragePair*>(Data.Data + Data.Size), key);
|
||||||
if (it == Data.end() || it->key != key)
|
if (it == Data.Data + Data.Size || it->key != key)
|
||||||
return default_val;
|
return default_val;
|
||||||
return it->val_i;
|
return it->val_i;
|
||||||
}
|
}
|
||||||
@ -2637,7 +2667,7 @@ bool ImGuiStorage::GetBool(ImGuiID key, bool default_val) const
|
|||||||
float ImGuiStorage::GetFloat(ImGuiID key, float default_val) const
|
float ImGuiStorage::GetFloat(ImGuiID key, float default_val) const
|
||||||
{
|
{
|
||||||
ImGuiStoragePair* it = ImLowerBound(const_cast<ImGuiStoragePair*>(Data.Data), const_cast<ImGuiStoragePair*>(Data.Data + Data.Size), key);
|
ImGuiStoragePair* it = ImLowerBound(const_cast<ImGuiStoragePair*>(Data.Data), const_cast<ImGuiStoragePair*>(Data.Data + Data.Size), key);
|
||||||
if (it == Data.end() || it->key != key)
|
if (it == Data.Data + Data.Size || it->key != key)
|
||||||
return default_val;
|
return default_val;
|
||||||
return it->val_f;
|
return it->val_f;
|
||||||
}
|
}
|
||||||
@ -2645,7 +2675,7 @@ float ImGuiStorage::GetFloat(ImGuiID key, float default_val) const
|
|||||||
void* ImGuiStorage::GetVoidPtr(ImGuiID key) const
|
void* ImGuiStorage::GetVoidPtr(ImGuiID key) const
|
||||||
{
|
{
|
||||||
ImGuiStoragePair* it = ImLowerBound(const_cast<ImGuiStoragePair*>(Data.Data), const_cast<ImGuiStoragePair*>(Data.Data + Data.Size), key);
|
ImGuiStoragePair* it = ImLowerBound(const_cast<ImGuiStoragePair*>(Data.Data), const_cast<ImGuiStoragePair*>(Data.Data + Data.Size), key);
|
||||||
if (it == Data.end() || it->key != key)
|
if (it == Data.Data + Data.Size || it->key != key)
|
||||||
return NULL;
|
return NULL;
|
||||||
return it->val_p;
|
return it->val_p;
|
||||||
}
|
}
|
||||||
@ -2654,7 +2684,7 @@ void* ImGuiStorage::GetVoidPtr(ImGuiID key) const
|
|||||||
int* ImGuiStorage::GetIntRef(ImGuiID key, int default_val)
|
int* ImGuiStorage::GetIntRef(ImGuiID key, int default_val)
|
||||||
{
|
{
|
||||||
ImGuiStoragePair* it = ImLowerBound(Data.Data, Data.Data + Data.Size, key);
|
ImGuiStoragePair* it = ImLowerBound(Data.Data, Data.Data + Data.Size, key);
|
||||||
if (it == Data.end() || it->key != key)
|
if (it == Data.Data + Data.Size || it->key != key)
|
||||||
it = Data.insert(it, ImGuiStoragePair(key, default_val));
|
it = Data.insert(it, ImGuiStoragePair(key, default_val));
|
||||||
return &it->val_i;
|
return &it->val_i;
|
||||||
}
|
}
|
||||||
@ -2667,7 +2697,7 @@ bool* ImGuiStorage::GetBoolRef(ImGuiID key, bool default_val)
|
|||||||
float* ImGuiStorage::GetFloatRef(ImGuiID key, float default_val)
|
float* ImGuiStorage::GetFloatRef(ImGuiID key, float default_val)
|
||||||
{
|
{
|
||||||
ImGuiStoragePair* it = ImLowerBound(Data.Data, Data.Data + Data.Size, key);
|
ImGuiStoragePair* it = ImLowerBound(Data.Data, Data.Data + Data.Size, key);
|
||||||
if (it == Data.end() || it->key != key)
|
if (it == Data.Data + Data.Size || it->key != key)
|
||||||
it = Data.insert(it, ImGuiStoragePair(key, default_val));
|
it = Data.insert(it, ImGuiStoragePair(key, default_val));
|
||||||
return &it->val_f;
|
return &it->val_f;
|
||||||
}
|
}
|
||||||
@ -2675,7 +2705,7 @@ float* ImGuiStorage::GetFloatRef(ImGuiID key, float default_val)
|
|||||||
void** ImGuiStorage::GetVoidPtrRef(ImGuiID key, void* default_val)
|
void** ImGuiStorage::GetVoidPtrRef(ImGuiID key, void* default_val)
|
||||||
{
|
{
|
||||||
ImGuiStoragePair* it = ImLowerBound(Data.Data, Data.Data + Data.Size, key);
|
ImGuiStoragePair* it = ImLowerBound(Data.Data, Data.Data + Data.Size, key);
|
||||||
if (it == Data.end() || it->key != key)
|
if (it == Data.Data + Data.Size || it->key != key)
|
||||||
it = Data.insert(it, ImGuiStoragePair(key, default_val));
|
it = Data.insert(it, ImGuiStoragePair(key, default_val));
|
||||||
return &it->val_p;
|
return &it->val_p;
|
||||||
}
|
}
|
||||||
@ -2684,7 +2714,7 @@ void** ImGuiStorage::GetVoidPtrRef(ImGuiID key, void* default_val)
|
|||||||
void ImGuiStorage::SetInt(ImGuiID key, int val)
|
void ImGuiStorage::SetInt(ImGuiID key, int val)
|
||||||
{
|
{
|
||||||
ImGuiStoragePair* it = ImLowerBound(Data.Data, Data.Data + Data.Size, key);
|
ImGuiStoragePair* it = ImLowerBound(Data.Data, Data.Data + Data.Size, key);
|
||||||
if (it == Data.end() || it->key != key)
|
if (it == Data.Data + Data.Size || it->key != key)
|
||||||
Data.insert(it, ImGuiStoragePair(key, val));
|
Data.insert(it, ImGuiStoragePair(key, val));
|
||||||
else
|
else
|
||||||
it->val_i = val;
|
it->val_i = val;
|
||||||
@ -2698,7 +2728,7 @@ void ImGuiStorage::SetBool(ImGuiID key, bool val)
|
|||||||
void ImGuiStorage::SetFloat(ImGuiID key, float val)
|
void ImGuiStorage::SetFloat(ImGuiID key, float val)
|
||||||
{
|
{
|
||||||
ImGuiStoragePair* it = ImLowerBound(Data.Data, Data.Data + Data.Size, key);
|
ImGuiStoragePair* it = ImLowerBound(Data.Data, Data.Data + Data.Size, key);
|
||||||
if (it == Data.end() || it->key != key)
|
if (it == Data.Data + Data.Size || it->key != key)
|
||||||
Data.insert(it, ImGuiStoragePair(key, val));
|
Data.insert(it, ImGuiStoragePair(key, val));
|
||||||
else
|
else
|
||||||
it->val_f = val;
|
it->val_f = val;
|
||||||
@ -2707,7 +2737,7 @@ void ImGuiStorage::SetFloat(ImGuiID key, float val)
|
|||||||
void ImGuiStorage::SetVoidPtr(ImGuiID key, void* val)
|
void ImGuiStorage::SetVoidPtr(ImGuiID key, void* val)
|
||||||
{
|
{
|
||||||
ImGuiStoragePair* it = ImLowerBound(Data.Data, Data.Data + Data.Size, key);
|
ImGuiStoragePair* it = ImLowerBound(Data.Data, Data.Data + Data.Size, key);
|
||||||
if (it == Data.end() || it->key != key)
|
if (it == Data.Data + Data.Size || it->key != key)
|
||||||
Data.insert(it, ImGuiStoragePair(key, val));
|
Data.insert(it, ImGuiStoragePair(key, val));
|
||||||
else
|
else
|
||||||
it->val_p = val;
|
it->val_p = val;
|
||||||
@ -2718,6 +2748,7 @@ void ImGuiStorage::SetAllInt(int v)
|
|||||||
for (int i = 0; i < Data.Size; i++)
|
for (int i = 0; i < Data.Size; i++)
|
||||||
Data[i].val_i = v;
|
Data[i].val_i = v;
|
||||||
}
|
}
|
||||||
|
IM_MSVC_RUNTIME_CHECKS_RESTORE
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// [SECTION] ImGuiTextFilter
|
// [SECTION] ImGuiTextFilter
|
||||||
@ -2785,15 +2816,15 @@ void ImGuiTextFilter::Build()
|
|||||||
|
|
||||||
bool ImGuiTextFilter::PassFilter(const char* text, const char* text_end) const
|
bool ImGuiTextFilter::PassFilter(const char* text, const char* text_end) const
|
||||||
{
|
{
|
||||||
if (Filters.empty())
|
if (Filters.Size == 0)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (text == NULL)
|
if (text == NULL)
|
||||||
text = "";
|
text = text_end = "";
|
||||||
|
|
||||||
for (const ImGuiTextRange& f : Filters)
|
for (const ImGuiTextRange& f : Filters)
|
||||||
{
|
{
|
||||||
if (f.empty())
|
if (f.b == f.e)
|
||||||
continue;
|
continue;
|
||||||
if (f.b[0] == '-')
|
if (f.b[0] == '-')
|
||||||
{
|
{
|
||||||
@ -2960,15 +2991,6 @@ static void ImGuiListClipper_SeekCursorAndSetupPrevLine(float pos_y, float line_
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ImGuiListClipper_SeekCursorForItem(ImGuiListClipper* clipper, int item_n)
|
|
||||||
{
|
|
||||||
// StartPosY starts from ItemsFrozen hence the subtraction
|
|
||||||
// Perform the add and multiply with double to allow seeking through larger ranges
|
|
||||||
ImGuiListClipperData* data = (ImGuiListClipperData*)clipper->TempData;
|
|
||||||
float pos_y = (float)((double)clipper->StartPosY + data->LossynessOffset + (double)(item_n - data->ItemsFrozen) * clipper->ItemsHeight);
|
|
||||||
ImGuiListClipper_SeekCursorAndSetupPrevLine(pos_y, clipper->ItemsHeight);
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGuiListClipper::ImGuiListClipper()
|
ImGuiListClipper::ImGuiListClipper()
|
||||||
{
|
{
|
||||||
memset(this, 0, sizeof(*this));
|
memset(this, 0, sizeof(*this));
|
||||||
@ -3005,6 +3027,7 @@ void ImGuiListClipper::Begin(int items_count, float items_height)
|
|||||||
data->Reset(this);
|
data->Reset(this);
|
||||||
data->LossynessOffset = window->DC.CursorStartPosLossyness.y;
|
data->LossynessOffset = window->DC.CursorStartPosLossyness.y;
|
||||||
TempData = data;
|
TempData = data;
|
||||||
|
StartSeekOffsetY = data->LossynessOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ImGuiListClipper::End()
|
void ImGuiListClipper::End()
|
||||||
@ -3015,7 +3038,7 @@ void ImGuiListClipper::End()
|
|||||||
ImGuiContext& g = *Ctx;
|
ImGuiContext& g = *Ctx;
|
||||||
IMGUI_DEBUG_LOG_CLIPPER("Clipper: End() in '%s'\n", g.CurrentWindow->Name);
|
IMGUI_DEBUG_LOG_CLIPPER("Clipper: End() in '%s'\n", g.CurrentWindow->Name);
|
||||||
if (ItemsCount >= 0 && ItemsCount < INT_MAX && DisplayStart >= 0)
|
if (ItemsCount >= 0 && ItemsCount < INT_MAX && DisplayStart >= 0)
|
||||||
ImGuiListClipper_SeekCursorForItem(this, ItemsCount);
|
SeekCursorForItem(ItemsCount);
|
||||||
|
|
||||||
// Restore temporary buffer and fix back pointers which may be invalidated when nesting
|
// Restore temporary buffer and fix back pointers which may be invalidated when nesting
|
||||||
IM_ASSERT(data->ListClipper == this);
|
IM_ASSERT(data->ListClipper == this);
|
||||||
@ -3039,6 +3062,17 @@ void ImGuiListClipper::IncludeItemsByIndex(int item_begin, int item_end)
|
|||||||
data->Ranges.push_back(ImGuiListClipperRange::FromIndices(item_begin, item_end));
|
data->Ranges.push_back(ImGuiListClipperRange::FromIndices(item_begin, item_end));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This is already called while stepping.
|
||||||
|
// The ONLY reason you may want to call this is if you passed INT_MAX to ImGuiListClipper::Begin() because you couldn't step item count beforehand.
|
||||||
|
void ImGuiListClipper::SeekCursorForItem(int item_n)
|
||||||
|
{
|
||||||
|
// - Perform the add and multiply with double to allow seeking through larger ranges.
|
||||||
|
// - StartPosY starts from ItemsFrozen, by adding SeekOffsetY we generally cancel that out (SeekOffsetY == LossynessOffset - ItemsFrozen * ItemsHeight).
|
||||||
|
// - The reason we store SeekOffsetY instead of inferring it, is because we want to allow user to perform Seek after the last step, where ImGuiListClipperData is already done.
|
||||||
|
float pos_y = (float)((double)StartPosY + StartSeekOffsetY + (double)item_n * ItemsHeight);
|
||||||
|
ImGuiListClipper_SeekCursorAndSetupPrevLine(pos_y, ItemsHeight);
|
||||||
|
}
|
||||||
|
|
||||||
static bool ImGuiListClipper_StepInternal(ImGuiListClipper* clipper)
|
static bool ImGuiListClipper_StepInternal(ImGuiListClipper* clipper)
|
||||||
{
|
{
|
||||||
ImGuiContext& g = *clipper->Ctx;
|
ImGuiContext& g = *clipper->Ctx;
|
||||||
@ -3093,7 +3127,8 @@ static bool ImGuiListClipper_StepInternal(ImGuiListClipper* clipper)
|
|||||||
bool affected_by_floating_point_precision = ImIsFloatAboveGuaranteedIntegerPrecision(clipper->StartPosY) || ImIsFloatAboveGuaranteedIntegerPrecision(window->DC.CursorPos.y);
|
bool affected_by_floating_point_precision = ImIsFloatAboveGuaranteedIntegerPrecision(clipper->StartPosY) || ImIsFloatAboveGuaranteedIntegerPrecision(window->DC.CursorPos.y);
|
||||||
if (affected_by_floating_point_precision)
|
if (affected_by_floating_point_precision)
|
||||||
clipper->ItemsHeight = window->DC.PrevLineSize.y + g.Style.ItemSpacing.y; // FIXME: Technically wouldn't allow multi-line entries.
|
clipper->ItemsHeight = window->DC.PrevLineSize.y + g.Style.ItemSpacing.y; // FIXME: Technically wouldn't allow multi-line entries.
|
||||||
|
if (clipper->ItemsHeight == 0.0f && clipper->ItemsCount == INT_MAX) // Accept that no item have been submitted if in indeterminate mode.
|
||||||
|
return false;
|
||||||
IM_ASSERT(clipper->ItemsHeight > 0.0f && "Unable to calculate item height! First item hasn't moved the cursor vertically!");
|
IM_ASSERT(clipper->ItemsHeight > 0.0f && "Unable to calculate item height! First item hasn't moved the cursor vertically!");
|
||||||
calc_clipping = true; // If item height had to be calculated, calculate clipping afterwards.
|
calc_clipping = true; // If item height had to be calculated, calculate clipping afterwards.
|
||||||
}
|
}
|
||||||
@ -3102,6 +3137,9 @@ static bool ImGuiListClipper_StepInternal(ImGuiListClipper* clipper)
|
|||||||
const int already_submitted = clipper->DisplayEnd;
|
const int already_submitted = clipper->DisplayEnd;
|
||||||
if (calc_clipping)
|
if (calc_clipping)
|
||||||
{
|
{
|
||||||
|
// Record seek offset, this is so ImGuiListClipper::Seek() can be called after ImGuiListClipperData is done
|
||||||
|
clipper->StartSeekOffsetY = (double)data->LossynessOffset - data->ItemsFrozen * (double)clipper->ItemsHeight;
|
||||||
|
|
||||||
if (g.LogEnabled)
|
if (g.LogEnabled)
|
||||||
{
|
{
|
||||||
// If logging is active, do not perform any clipping
|
// If logging is active, do not perform any clipping
|
||||||
@ -3122,9 +3160,27 @@ static bool ImGuiListClipper_StepInternal(ImGuiListClipper* clipper)
|
|||||||
data->Ranges.push_back(ImGuiListClipperRange::FromPositions(nav_rect_abs.Min.y, nav_rect_abs.Max.y, 0, 0));
|
data->Ranges.push_back(ImGuiListClipperRange::FromPositions(nav_rect_abs.Min.y, nav_rect_abs.Max.y, 0, 0));
|
||||||
|
|
||||||
// Add visible range
|
// Add visible range
|
||||||
|
float min_y = window->ClipRect.Min.y;
|
||||||
|
float max_y = window->ClipRect.Max.y;
|
||||||
|
|
||||||
|
// Add box selection range
|
||||||
|
ImGuiBoxSelectState* bs = &g.BoxSelectState;
|
||||||
|
if (bs->IsActive && bs->Window == window)
|
||||||
|
{
|
||||||
|
// FIXME: Selectable() use of half-ItemSpacing isn't consistent in matter of layout, as ItemAdd(bb) stray above ItemSize()'s CursorPos.
|
||||||
|
// RangeSelect's BoxSelect relies on comparing overlap of previous and current rectangle and is sensitive to that.
|
||||||
|
// As a workaround we currently half ItemSpacing worth on each side.
|
||||||
|
min_y -= g.Style.ItemSpacing.y;
|
||||||
|
max_y += g.Style.ItemSpacing.y;
|
||||||
|
|
||||||
|
// Box-select on 2D area requires different clipping.
|
||||||
|
if (bs->UnclipMode)
|
||||||
|
data->Ranges.push_back(ImGuiListClipperRange::FromPositions(bs->UnclipRect.Min.y, bs->UnclipRect.Max.y, 0, 0));
|
||||||
|
}
|
||||||
|
|
||||||
const int off_min = (is_nav_request && g.NavMoveClipDir == ImGuiDir_Up) ? -1 : 0;
|
const int off_min = (is_nav_request && g.NavMoveClipDir == ImGuiDir_Up) ? -1 : 0;
|
||||||
const int off_max = (is_nav_request && g.NavMoveClipDir == ImGuiDir_Down) ? 1 : 0;
|
const int off_max = (is_nav_request && g.NavMoveClipDir == ImGuiDir_Down) ? 1 : 0;
|
||||||
data->Ranges.push_back(ImGuiListClipperRange::FromPositions(window->ClipRect.Min.y, window->ClipRect.Max.y, off_min, off_max));
|
data->Ranges.push_back(ImGuiListClipperRange::FromPositions(min_y, max_y, off_min, off_max));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert position ranges to item index ranges
|
// Convert position ranges to item index ranges
|
||||||
@ -3149,7 +3205,7 @@ static bool ImGuiListClipper_StepInternal(ImGuiListClipper* clipper)
|
|||||||
clipper->DisplayStart = ImMax(data->Ranges[data->StepNo].Min, already_submitted);
|
clipper->DisplayStart = ImMax(data->Ranges[data->StepNo].Min, already_submitted);
|
||||||
clipper->DisplayEnd = ImMin(data->Ranges[data->StepNo].Max, clipper->ItemsCount);
|
clipper->DisplayEnd = ImMin(data->Ranges[data->StepNo].Max, clipper->ItemsCount);
|
||||||
if (clipper->DisplayStart > already_submitted) //-V1051
|
if (clipper->DisplayStart > already_submitted) //-V1051
|
||||||
ImGuiListClipper_SeekCursorForItem(clipper, clipper->DisplayStart);
|
clipper->SeekCursorForItem(clipper->DisplayStart);
|
||||||
data->StepNo++;
|
data->StepNo++;
|
||||||
if (clipper->DisplayStart == clipper->DisplayEnd && data->StepNo < data->Ranges.Size)
|
if (clipper->DisplayStart == clipper->DisplayEnd && data->StepNo < data->Ranges.Size)
|
||||||
continue;
|
continue;
|
||||||
@ -3159,7 +3215,7 @@ static bool ImGuiListClipper_StepInternal(ImGuiListClipper* clipper)
|
|||||||
// After the last step: Let the clipper validate that we have reached the expected Y position (corresponding to element DisplayEnd),
|
// After the last step: Let the clipper validate that we have reached the expected Y position (corresponding to element DisplayEnd),
|
||||||
// Advance the cursor to the end of the list and then returns 'false' to end the loop.
|
// Advance the cursor to the end of the list and then returns 'false' to end the loop.
|
||||||
if (clipper->ItemsCount < INT_MAX)
|
if (clipper->ItemsCount < INT_MAX)
|
||||||
ImGuiListClipper_SeekCursorForItem(clipper, clipper->ItemsCount);
|
clipper->SeekCursorForItem(clipper->ItemsCount);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -3302,6 +3358,7 @@ static const ImGuiDataVarInfo GStyleVarInfo[] =
|
|||||||
{ ImGuiDataType_Float, 1, (ImU32)offsetof(ImGuiStyle, TabRounding) }, // ImGuiStyleVar_TabRounding
|
{ ImGuiDataType_Float, 1, (ImU32)offsetof(ImGuiStyle, TabRounding) }, // ImGuiStyleVar_TabRounding
|
||||||
{ ImGuiDataType_Float, 1, (ImU32)offsetof(ImGuiStyle, TabBorderSize) }, // ImGuiStyleVar_TabBorderSize
|
{ ImGuiDataType_Float, 1, (ImU32)offsetof(ImGuiStyle, TabBorderSize) }, // ImGuiStyleVar_TabBorderSize
|
||||||
{ ImGuiDataType_Float, 1, (ImU32)offsetof(ImGuiStyle, TabBarBorderSize) }, // ImGuiStyleVar_TabBarBorderSize
|
{ ImGuiDataType_Float, 1, (ImU32)offsetof(ImGuiStyle, TabBarBorderSize) }, // ImGuiStyleVar_TabBarBorderSize
|
||||||
|
{ ImGuiDataType_Float, 1, (ImU32)offsetof(ImGuiStyle, TabBarOverlineSize) }, // ImGuiStyleVar_TabBarOverlineSize
|
||||||
{ ImGuiDataType_Float, 1, (ImU32)offsetof(ImGuiStyle, TableAngledHeadersAngle)}, // ImGuiStyleVar_TableAngledHeadersAngle
|
{ ImGuiDataType_Float, 1, (ImU32)offsetof(ImGuiStyle, TableAngledHeadersAngle)}, // ImGuiStyleVar_TableAngledHeadersAngle
|
||||||
{ ImGuiDataType_Float, 2, (ImU32)offsetof(ImGuiStyle, TableAngledHeadersTextAlign)},// ImGuiStyleVar_TableAngledHeadersTextAlign
|
{ ImGuiDataType_Float, 2, (ImU32)offsetof(ImGuiStyle, TableAngledHeadersTextAlign)},// ImGuiStyleVar_TableAngledHeadersTextAlign
|
||||||
{ ImGuiDataType_Float, 2, (ImU32)offsetof(ImGuiStyle, ButtonTextAlign) }, // ImGuiStyleVar_ButtonTextAlign
|
{ ImGuiDataType_Float, 2, (ImU32)offsetof(ImGuiStyle, ButtonTextAlign) }, // ImGuiStyleVar_ButtonTextAlign
|
||||||
@ -3424,6 +3481,7 @@ const char* ImGui::GetStyleColorName(ImGuiCol idx)
|
|||||||
case ImGuiCol_TableBorderLight: return "TableBorderLight";
|
case ImGuiCol_TableBorderLight: return "TableBorderLight";
|
||||||
case ImGuiCol_TableRowBg: return "TableRowBg";
|
case ImGuiCol_TableRowBg: return "TableRowBg";
|
||||||
case ImGuiCol_TableRowBgAlt: return "TableRowBgAlt";
|
case ImGuiCol_TableRowBgAlt: return "TableRowBgAlt";
|
||||||
|
case ImGuiCol_TextLink: return "TextLink";
|
||||||
case ImGuiCol_TextSelectedBg: return "TextSelectedBg";
|
case ImGuiCol_TextSelectedBg: return "TextSelectedBg";
|
||||||
case ImGuiCol_DragDropTarget: return "DragDropTarget";
|
case ImGuiCol_DragDropTarget: return "DragDropTarget";
|
||||||
case ImGuiCol_NavHighlight: return "NavHighlight";
|
case ImGuiCol_NavHighlight: return "NavHighlight";
|
||||||
@ -3570,7 +3628,7 @@ void ImGui::RenderTextEllipsis(ImDrawList* draw_list, const ImVec2& pos_min, con
|
|||||||
|
|
||||||
const ImFont* font = draw_list->_Data->Font;
|
const ImFont* font = draw_list->_Data->Font;
|
||||||
const float font_size = draw_list->_Data->FontSize;
|
const float font_size = draw_list->_Data->FontSize;
|
||||||
const float font_scale = font_size / font->FontSize;
|
const float font_scale = draw_list->_Data->FontScale;
|
||||||
const char* text_end_ellipsis = NULL;
|
const char* text_end_ellipsis = NULL;
|
||||||
const float ellipsis_width = font->EllipsisWidth * font_scale;
|
const float ellipsis_width = font->EllipsisWidth * font_scale;
|
||||||
|
|
||||||
@ -3747,7 +3805,7 @@ void ImGui::DestroyContext(ImGuiContext* ctx)
|
|||||||
IM_DELETE(ctx);
|
IM_DELETE(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
// IMPORTANT: ###xxx suffixes must be same in ALL languages
|
// IMPORTANT: ###xxx suffixes must be same in ALL languages to allow for automation.
|
||||||
static const ImGuiLocEntry GLocalizationEntriesEnUS[] =
|
static const ImGuiLocEntry GLocalizationEntriesEnUS[] =
|
||||||
{
|
{
|
||||||
{ ImGuiLocKey_VersionStr, "Dear ImGui " IMGUI_VERSION " (" IM_STRINGIFY(IMGUI_VERSION_NUM) ")" },
|
{ ImGuiLocKey_VersionStr, "Dear ImGui " IMGUI_VERSION " (" IM_STRINGIFY(IMGUI_VERSION_NUM) ")" },
|
||||||
@ -3758,6 +3816,7 @@ static const ImGuiLocEntry GLocalizationEntriesEnUS[] =
|
|||||||
{ ImGuiLocKey_WindowingMainMenuBar, "(Main menu bar)" },
|
{ ImGuiLocKey_WindowingMainMenuBar, "(Main menu bar)" },
|
||||||
{ ImGuiLocKey_WindowingPopup, "(Popup)" },
|
{ ImGuiLocKey_WindowingPopup, "(Popup)" },
|
||||||
{ ImGuiLocKey_WindowingUntitled, "(Untitled)" },
|
{ ImGuiLocKey_WindowingUntitled, "(Untitled)" },
|
||||||
|
{ ImGuiLocKey_CopyLink, "Copy Link###CopyLink" },
|
||||||
{ ImGuiLocKey_DockingHideTabBar, "Hide tab bar###HideTabBar" },
|
{ 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." },
|
{ ImGuiLocKey_DockingDragToUndockOrMoveNode,"Click and drag to move or undock whole node." },
|
||||||
@ -3789,7 +3848,8 @@ void ImGui::Initialize()
|
|||||||
g.IO.GetClipboardTextFn = GetClipboardTextFn_DefaultImpl; // Platform dependent default implementations
|
g.IO.GetClipboardTextFn = GetClipboardTextFn_DefaultImpl; // Platform dependent default implementations
|
||||||
g.IO.SetClipboardTextFn = SetClipboardTextFn_DefaultImpl;
|
g.IO.SetClipboardTextFn = SetClipboardTextFn_DefaultImpl;
|
||||||
g.IO.ClipboardUserData = (void*)&g; // Default implementation use the ImGuiContext as user data (ideally those would be arguments to the function)
|
g.IO.ClipboardUserData = (void*)&g; // Default implementation use the ImGuiContext as user data (ideally those would be arguments to the function)
|
||||||
g.IO.SetPlatformImeDataFn = SetPlatformImeDataFn_DefaultImpl;
|
g.IO.PlatformOpenInShellFn = PlatformOpenInShellFn_DefaultImpl;
|
||||||
|
g.IO.PlatformSetImeDataFn = PlatformSetImeDataFn_DefaultImpl;
|
||||||
|
|
||||||
// Create default viewport
|
// Create default viewport
|
||||||
ImGuiViewportP* viewport = IM_NEW(ImGuiViewportP)();
|
ImGuiViewportP* viewport = IM_NEW(ImGuiViewportP)();
|
||||||
@ -3869,7 +3929,7 @@ void ImGui::Shutdown()
|
|||||||
g.FontStack.clear();
|
g.FontStack.clear();
|
||||||
g.OpenPopupStack.clear();
|
g.OpenPopupStack.clear();
|
||||||
g.BeginPopupStack.clear();
|
g.BeginPopupStack.clear();
|
||||||
g.NavTreeNodeStack.clear();
|
g.TreeNodeStack.clear();
|
||||||
|
|
||||||
g.CurrentViewport = g.MouseViewport = g.MouseLastHoveredViewport = NULL;
|
g.CurrentViewport = g.MouseViewport = g.MouseLastHoveredViewport = NULL;
|
||||||
g.Viewports.clear_delete();
|
g.Viewports.clear_delete();
|
||||||
@ -3884,6 +3944,9 @@ void ImGui::Shutdown()
|
|||||||
g.TablesTempData.clear_destruct();
|
g.TablesTempData.clear_destruct();
|
||||||
g.DrawChannelsTempMergeBuffer.clear();
|
g.DrawChannelsTempMergeBuffer.clear();
|
||||||
|
|
||||||
|
g.MultiSelectStorage.Clear();
|
||||||
|
g.MultiSelectTempData.clear_destruct();
|
||||||
|
|
||||||
g.ClipboardHandlerData.clear();
|
g.ClipboardHandlerData.clear();
|
||||||
g.MenusIdSubmittedThisFrame.clear();
|
g.MenusIdSubmittedThisFrame.clear();
|
||||||
g.InputTextState.ClearFreeMemory();
|
g.InputTextState.ClearFreeMemory();
|
||||||
@ -3989,6 +4052,7 @@ static void SetCurrentWindow(ImGuiWindow* window)
|
|||||||
if (window)
|
if (window)
|
||||||
{
|
{
|
||||||
g.FontSize = g.DrawListSharedData.FontSize = window->CalcFontSize();
|
g.FontSize = g.DrawListSharedData.FontSize = window->CalcFontSize();
|
||||||
|
g.FontScale = g.FontSize / g.Font->FontSize;
|
||||||
ImGui::NavUpdateCurrentWindowIsScrollPushableX();
|
ImGui::NavUpdateCurrentWindowIsScrollPushableX();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3998,6 +4062,8 @@ void ImGui::GcCompactTransientMiscBuffers()
|
|||||||
ImGuiContext& g = *GImGui;
|
ImGuiContext& g = *GImGui;
|
||||||
g.ItemFlagsStack.clear();
|
g.ItemFlagsStack.clear();
|
||||||
g.GroupStack.clear();
|
g.GroupStack.clear();
|
||||||
|
g.MultiSelectTempDataStacked = 0;
|
||||||
|
g.MultiSelectTempData.clear_destruct();
|
||||||
TableGcCompactSettings();
|
TableGcCompactSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4082,9 +4148,6 @@ void ImGui::SetActiveID(ImGuiID id, ImGuiWindow* window)
|
|||||||
// (Please note that this is WIP and not all keys/inputs are thoroughly declared by all widgets yet)
|
// (Please note that this is WIP and not all keys/inputs are thoroughly declared by all widgets yet)
|
||||||
g.ActiveIdUsingNavDirMask = 0x00;
|
g.ActiveIdUsingNavDirMask = 0x00;
|
||||||
g.ActiveIdUsingAllKeyboardKeys = false;
|
g.ActiveIdUsingAllKeyboardKeys = false;
|
||||||
#ifndef IMGUI_DISABLE_OBSOLETE_KEYIO
|
|
||||||
g.ActiveIdUsingNavInputMask = 0x00;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ImGui::ClearActiveID()
|
void ImGui::ClearActiveID()
|
||||||
@ -4122,7 +4185,7 @@ void ImGui::MarkItemEdited(ImGuiID id)
|
|||||||
|
|
||||||
// We accept a MarkItemEdited() on drag and drop targets (see https://github.com/ocornut/imgui/issues/1875#issuecomment-978243343)
|
// We accept a MarkItemEdited() on drag and drop targets (see https://github.com/ocornut/imgui/issues/1875#issuecomment-978243343)
|
||||||
// We accept 'ActiveIdPreviousFrame == id' for InputText() returning an edit after it has been taken ActiveId away (#4714)
|
// We accept 'ActiveIdPreviousFrame == id' for InputText() returning an edit after it has been taken ActiveId away (#4714)
|
||||||
IM_ASSERT(g.DragDropActive || g.ActiveId == id || g.ActiveId == 0 || g.ActiveIdPreviousFrame == id);
|
IM_ASSERT(g.DragDropActive || g.ActiveId == id || g.ActiveId == 0 || g.ActiveIdPreviousFrame == id || (g.CurrentMultiSelect != NULL && g.BoxSelectState.IsActive));
|
||||||
|
|
||||||
//IM_ASSERT(g.CurrentWindow->DC.LastItemId == id);
|
//IM_ASSERT(g.CurrentWindow->DC.LastItemId == id);
|
||||||
g.LastItemData.StatusFlags |= ImGuiItemStatusFlags_Edited;
|
g.LastItemData.StatusFlags |= ImGuiItemStatusFlags_Edited;
|
||||||
@ -4938,25 +5001,8 @@ void ImGui::NewFrame()
|
|||||||
{
|
{
|
||||||
g.ActiveIdUsingNavDirMask = 0x00;
|
g.ActiveIdUsingNavDirMask = 0x00;
|
||||||
g.ActiveIdUsingAllKeyboardKeys = false;
|
g.ActiveIdUsingAllKeyboardKeys = false;
|
||||||
#ifndef IMGUI_DISABLE_OBSOLETE_KEYIO
|
|
||||||
g.ActiveIdUsingNavInputMask = 0x00;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef IMGUI_DISABLE_OBSOLETE_KEYIO
|
|
||||||
if (g.ActiveId == 0)
|
|
||||||
g.ActiveIdUsingNavInputMask = 0;
|
|
||||||
else if (g.ActiveIdUsingNavInputMask != 0)
|
|
||||||
{
|
|
||||||
// If your custom widget code used: { g.ActiveIdUsingNavInputMask |= (1 << ImGuiNavInput_Cancel); }
|
|
||||||
// Since IMGUI_VERSION_NUM >= 18804 it should be: { SetKeyOwner(ImGuiKey_Escape, g.ActiveId); SetKeyOwner(ImGuiKey_NavGamepadCancel, g.ActiveId); }
|
|
||||||
if (g.ActiveIdUsingNavInputMask & (1 << ImGuiNavInput_Cancel))
|
|
||||||
SetKeyOwner(ImGuiKey_Escape, g.ActiveId);
|
|
||||||
if (g.ActiveIdUsingNavInputMask & ~(1 << ImGuiNavInput_Cancel))
|
|
||||||
IM_ASSERT(0); // Other values unsupported
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Record when we have been stationary as this state is preserved while over same item.
|
// Record when we have been stationary as this state is preserved while over same item.
|
||||||
// FIXME: The way this is expressed means user cannot alter HoverStationaryDelay during the frame to use varying values.
|
// FIXME: The way this is expressed means user cannot alter HoverStationaryDelay during the frame to use varying values.
|
||||||
// To allow this we should store HoverItemMaxStationaryTime+ID and perform the >= check in IsItemHovered() function.
|
// To allow this we should store HoverItemMaxStationaryTime+ID and perform the >= check in IsItemHovered() function.
|
||||||
@ -5075,7 +5121,8 @@ void ImGui::NewFrame()
|
|||||||
g.CurrentWindowStack.resize(0);
|
g.CurrentWindowStack.resize(0);
|
||||||
g.BeginPopupStack.resize(0);
|
g.BeginPopupStack.resize(0);
|
||||||
g.ItemFlagsStack.resize(0);
|
g.ItemFlagsStack.resize(0);
|
||||||
g.ItemFlagsStack.push_back(ImGuiItemFlags_None);
|
g.ItemFlagsStack.push_back(ImGuiItemFlags_AutoClosePopups); // Default flags
|
||||||
|
g.CurrentItemFlags = g.ItemFlagsStack.back();
|
||||||
g.GroupStack.resize(0);
|
g.GroupStack.resize(0);
|
||||||
|
|
||||||
// Docking
|
// Docking
|
||||||
@ -5377,13 +5424,13 @@ void ImGui::EndFrame()
|
|||||||
|
|
||||||
// Notify Platform/OS when our Input Method Editor cursor has moved (e.g. CJK inputs using Microsoft IME)
|
// Notify Platform/OS when our Input Method Editor cursor has moved (e.g. CJK inputs using Microsoft IME)
|
||||||
ImGuiPlatformImeData* ime_data = &g.PlatformImeData;
|
ImGuiPlatformImeData* ime_data = &g.PlatformImeData;
|
||||||
if (g.IO.SetPlatformImeDataFn && memcmp(ime_data, &g.PlatformImeDataPrev, sizeof(ImGuiPlatformImeData)) != 0)
|
if (g.IO.PlatformSetImeDataFn != NULL && memcmp(ime_data, &g.PlatformImeDataPrev, sizeof(ImGuiPlatformImeData)) != 0)
|
||||||
{
|
{
|
||||||
ImGuiViewport* viewport = FindViewportByID(g.PlatformImeViewport);
|
ImGuiViewport* viewport = FindViewportByID(g.PlatformImeViewport);
|
||||||
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);
|
IMGUI_DEBUG_LOG_IO("[io] Calling io.PlatformSetImeDataFn(): WantVisible: %d, InputPos (%.2f,%.2f)\n", ime_data->WantVisible, ime_data->InputPos.x, ime_data->InputPos.y);
|
||||||
if (viewport == NULL)
|
if (viewport == NULL)
|
||||||
viewport = GetMainViewport();
|
viewport = GetMainViewport();
|
||||||
g.IO.SetPlatformImeDataFn(viewport, ime_data);
|
g.IO.PlatformSetImeDataFn(&g, viewport, ime_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hide implicit/fallback "Debug" window if it hasn't been used
|
// Hide implicit/fallback "Debug" window if it hasn't been used
|
||||||
@ -5691,9 +5738,15 @@ bool ImGui::IsItemToggledOpen()
|
|||||||
return (g.LastItemData.StatusFlags & ImGuiItemStatusFlags_ToggledOpen) ? true : false;
|
return (g.LastItemData.StatusFlags & ImGuiItemStatusFlags_ToggledOpen) ? true : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Call after a Selectable() or TreeNode() involved in multi-selection.
|
||||||
|
// Useful if you need the per-item information before reaching EndMultiSelect(), e.g. for rendering purpose.
|
||||||
|
// This is only meant to be called inside a BeginMultiSelect()/EndMultiSelect() block.
|
||||||
|
// (Outside of multi-select, it would be misleading/ambiguous to report this signal, as widgets
|
||||||
|
// return e.g. a pressed event and user code is in charge of altering selection in ways we cannot predict.)
|
||||||
bool ImGui::IsItemToggledSelection()
|
bool ImGui::IsItemToggledSelection()
|
||||||
{
|
{
|
||||||
ImGuiContext& g = *GImGui;
|
ImGuiContext& g = *GImGui;
|
||||||
|
IM_ASSERT(g.CurrentMultiSelect != NULL); // Can only be used inside a BeginMultiSelect()/EndMultiSelect()
|
||||||
return (g.LastItemData.StatusFlags & ImGuiItemStatusFlags_ToggledSelection) ? true : false;
|
return (g.LastItemData.StatusFlags & ImGuiItemStatusFlags_ToggledSelection) ? true : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5753,7 +5806,8 @@ void ImGui::SetItemAllowOverlap()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// FIXME: It might be undesirable that this will likely disable KeyOwner-aware shortcuts systems. Consider a more fine-tuned version for the two users of this function.
|
// This is a shortcut for not taking ownership of 100+ keys, frequently used by drag operations.
|
||||||
|
// FIXME: It might be undesirable that this will likely disable KeyOwner-aware shortcuts systems. Consider a more fine-tuned version if needed?
|
||||||
void ImGui::SetActiveIdUsingAllKeyboardKeys()
|
void ImGui::SetActiveIdUsingAllKeyboardKeys()
|
||||||
{
|
{
|
||||||
ImGuiContext& g = *GImGui;
|
ImGuiContext& g = *GImGui;
|
||||||
@ -7634,7 +7688,7 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
|||||||
window->DC.MenuBarAppending = false;
|
window->DC.MenuBarAppending = false;
|
||||||
window->DC.MenuColumns.Update(style.ItemSpacing.x, window_just_activated_by_user);
|
window->DC.MenuColumns.Update(style.ItemSpacing.x, window_just_activated_by_user);
|
||||||
window->DC.TreeDepth = 0;
|
window->DC.TreeDepth = 0;
|
||||||
window->DC.TreeJumpToParentOnPopMask = 0x00;
|
window->DC.TreeHasStackDataDepthMask = 0x00;
|
||||||
window->DC.ChildWindows.resize(0);
|
window->DC.ChildWindows.resize(0);
|
||||||
window->DC.StateStorage = &window->StateStorage;
|
window->DC.StateStorage = &window->StateStorage;
|
||||||
window->DC.CurrentColumns = NULL;
|
window->DC.CurrentColumns = NULL;
|
||||||
@ -8090,12 +8144,14 @@ void ImGui::SetCurrentFont(ImFont* font)
|
|||||||
g.Font = font;
|
g.Font = font;
|
||||||
g.FontBaseSize = ImMax(1.0f, g.IO.FontGlobalScale * g.Font->FontSize * g.Font->Scale);
|
g.FontBaseSize = ImMax(1.0f, g.IO.FontGlobalScale * g.Font->FontSize * g.Font->Scale);
|
||||||
g.FontSize = g.CurrentWindow ? g.CurrentWindow->CalcFontSize() : 0.0f;
|
g.FontSize = g.CurrentWindow ? g.CurrentWindow->CalcFontSize() : 0.0f;
|
||||||
|
g.FontScale = g.FontSize / g.Font->FontSize;
|
||||||
|
|
||||||
ImFontAtlas* atlas = g.Font->ContainerAtlas;
|
ImFontAtlas* atlas = g.Font->ContainerAtlas;
|
||||||
g.DrawListSharedData.TexUvWhitePixel = atlas->TexUvWhitePixel;
|
g.DrawListSharedData.TexUvWhitePixel = atlas->TexUvWhitePixel;
|
||||||
g.DrawListSharedData.TexUvLines = atlas->TexUvLines;
|
g.DrawListSharedData.TexUvLines = atlas->TexUvLines;
|
||||||
g.DrawListSharedData.Font = g.Font;
|
g.DrawListSharedData.Font = g.Font;
|
||||||
g.DrawListSharedData.FontSize = g.FontSize;
|
g.DrawListSharedData.FontSize = g.FontSize;
|
||||||
|
g.DrawListSharedData.FontScale = g.FontScale;
|
||||||
g.DrawListSharedData.ShadowRectIds = &atlas->ShadowRectIds[0];
|
g.DrawListSharedData.ShadowRectIds = &atlas->ShadowRectIds[0];
|
||||||
g.DrawListSharedData.ShadowRectUvs = &atlas->ShadowRectUvs[0];
|
g.DrawListSharedData.ShadowRectUvs = &atlas->ShadowRectUvs[0];
|
||||||
}
|
}
|
||||||
@ -8196,26 +8252,6 @@ void ImGui::EndDisabledOverrideReenable()
|
|||||||
g.Style.Alpha = g.DisabledAlphaBackup * g.Style.DisabledAlpha;
|
g.Style.Alpha = g.DisabledAlphaBackup * g.Style.DisabledAlpha;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ImGui::PushTabStop(bool tab_stop)
|
|
||||||
{
|
|
||||||
PushItemFlag(ImGuiItemFlags_NoTabStop, !tab_stop);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ImGui::PopTabStop()
|
|
||||||
{
|
|
||||||
PopItemFlag();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ImGui::PushButtonRepeat(bool repeat)
|
|
||||||
{
|
|
||||||
PushItemFlag(ImGuiItemFlags_ButtonRepeat, repeat);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ImGui::PopButtonRepeat()
|
|
||||||
{
|
|
||||||
PopItemFlag();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ImGui::PushTextWrapPos(float wrap_pos_x)
|
void ImGui::PushTextWrapPos(float wrap_pos_x)
|
||||||
{
|
{
|
||||||
ImGuiWindow* window = GetCurrentWindow();
|
ImGuiWindow* window = GetCurrentWindow();
|
||||||
@ -8696,6 +8732,7 @@ void ImGui::SetWindowFontScale(float scale)
|
|||||||
ImGuiWindow* window = GetCurrentWindow();
|
ImGuiWindow* window = GetCurrentWindow();
|
||||||
window->FontWindowScale = scale;
|
window->FontWindowScale = scale;
|
||||||
g.FontSize = g.DrawListSharedData.FontSize = window->CalcFontSize();
|
g.FontSize = g.DrawListSharedData.FontSize = window->CalcFontSize();
|
||||||
|
g.FontScale = g.DrawListSharedData.FontScale = g.FontSize / g.Font->FontSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ImGui::PushFocusScope(ImGuiID id)
|
void ImGui::PushFocusScope(ImGuiID id)
|
||||||
@ -8856,6 +8893,7 @@ bool ImGui::IsRectVisible(const ImVec2& rect_min, const ImVec2& rect_max)
|
|||||||
|
|
||||||
// This is one of the very rare legacy case where we use ImGuiWindow methods,
|
// This is one of the very rare legacy case where we use ImGuiWindow methods,
|
||||||
// it should ideally be flattened at some point but it's been used a lots by widgets.
|
// it should ideally be flattened at some point but it's been used a lots by widgets.
|
||||||
|
IM_MSVC_RUNTIME_CHECKS_OFF
|
||||||
ImGuiID ImGuiWindow::GetID(const char* str, const char* str_end)
|
ImGuiID ImGuiWindow::GetID(const char* str, const char* str_end)
|
||||||
{
|
{
|
||||||
ImGuiID seed = IDStack.back();
|
ImGuiID seed = IDStack.back();
|
||||||
@ -8995,6 +9033,13 @@ ImGuiID ImGui::GetID(const void* ptr_id)
|
|||||||
return window->GetID(ptr_id);
|
return window->GetID(ptr_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImGuiID ImGui::GetID(int int_id)
|
||||||
|
{
|
||||||
|
ImGuiWindow* window = GImGui->CurrentWindow;
|
||||||
|
return window->GetID(int_id);
|
||||||
|
}
|
||||||
|
IM_MSVC_RUNTIME_CHECKS_RESTORE
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// [SECTION] INPUTS
|
// [SECTION] INPUTS
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@ -10422,6 +10467,11 @@ void ImGui::SetItemKeyOwner(ImGuiKey key, ImGuiInputFlags flags)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ImGui::SetItemKeyOwner(ImGuiKey key)
|
||||||
|
{
|
||||||
|
SetItemKeyOwner(key, ImGuiInputFlags_None);
|
||||||
|
}
|
||||||
|
|
||||||
// This is the only public API until we expose owner_id versions of the API as replacements.
|
// This is the only public API until we expose owner_id versions of the API as replacements.
|
||||||
bool ImGui::IsKeyChordPressed(ImGuiKeyChord key_chord)
|
bool ImGui::IsKeyChordPressed(ImGuiKeyChord key_chord)
|
||||||
{
|
{
|
||||||
@ -10748,6 +10798,11 @@ void ImGui::ErrorCheckEndWindowRecover(ImGuiErrorLogCallback log_callback, vo
|
|||||||
if (log_callback) log_callback(user_data, "Recovered from missing EndTabBar() in '%s'", window->Name);
|
if (log_callback) log_callback(user_data, "Recovered from missing EndTabBar() in '%s'", window->Name);
|
||||||
EndTabBar();
|
EndTabBar();
|
||||||
}
|
}
|
||||||
|
while (g.CurrentMultiSelect != NULL && g.CurrentMultiSelect->Storage->Window == window)
|
||||||
|
{
|
||||||
|
if (log_callback) log_callback(user_data, "Recovered from missing EndMultiSelect() in '%s'", window->Name);
|
||||||
|
EndMultiSelect();
|
||||||
|
}
|
||||||
while (window->DC.TreeDepth > 0)
|
while (window->DC.TreeDepth > 0)
|
||||||
{
|
{
|
||||||
if (log_callback) log_callback(user_data, "Recovered from missing TreePop() in '%s'", window->Name);
|
if (log_callback) log_callback(user_data, "Recovered from missing TreePop() in '%s'", window->Name);
|
||||||
@ -10971,9 +11026,7 @@ IM_MSVC_RUNTIME_CHECKS_RESTORE
|
|||||||
// - GetFrameHeight()
|
// - GetFrameHeight()
|
||||||
// - GetFrameHeightWithSpacing()
|
// - GetFrameHeightWithSpacing()
|
||||||
// - GetContentRegionMax()
|
// - GetContentRegionMax()
|
||||||
// - GetContentRegionMaxAbs() [Internal]
|
|
||||||
// - GetContentRegionAvail(),
|
// - GetContentRegionAvail(),
|
||||||
// - GetWindowContentRegionMin(), GetWindowContentRegionMax()
|
|
||||||
// - BeginGroup()
|
// - BeginGroup()
|
||||||
// - EndGroup()
|
// - EndGroup()
|
||||||
// Also see in imgui_widgets: tab bars, and in imgui_tables: tables, columns.
|
// Also see in imgui_widgets: tab bars, and in imgui_tables: tables, columns.
|
||||||
@ -11189,8 +11242,8 @@ float ImGui::CalcItemWidth()
|
|||||||
w = window->DC.ItemWidth;
|
w = window->DC.ItemWidth;
|
||||||
if (w < 0.0f)
|
if (w < 0.0f)
|
||||||
{
|
{
|
||||||
float region_max_x = GetContentRegionMaxAbs().x;
|
float region_avail_x = GetContentRegionAvail().x;
|
||||||
w = ImMax(1.0f, region_max_x - window->DC.CursorPos.x + w);
|
w = ImMax(1.0f, region_avail_x + w);
|
||||||
}
|
}
|
||||||
w = IM_TRUNC(w);
|
w = IM_TRUNC(w);
|
||||||
return w;
|
return w;
|
||||||
@ -11202,22 +11255,19 @@ float ImGui::CalcItemWidth()
|
|||||||
// The 4.0f here may be changed to match CalcItemWidth() and/or BeginChild() (right now we have a mismatch which is harmless but undesirable)
|
// The 4.0f here may be changed to match CalcItemWidth() and/or BeginChild() (right now we have a mismatch which is harmless but undesirable)
|
||||||
ImVec2 ImGui::CalcItemSize(ImVec2 size, float default_w, float default_h)
|
ImVec2 ImGui::CalcItemSize(ImVec2 size, float default_w, float default_h)
|
||||||
{
|
{
|
||||||
ImGuiContext& g = *GImGui;
|
ImVec2 avail;
|
||||||
ImGuiWindow* window = g.CurrentWindow;
|
|
||||||
|
|
||||||
ImVec2 region_max;
|
|
||||||
if (size.x < 0.0f || size.y < 0.0f)
|
if (size.x < 0.0f || size.y < 0.0f)
|
||||||
region_max = GetContentRegionMaxAbs();
|
avail = GetContentRegionAvail();
|
||||||
|
|
||||||
if (size.x == 0.0f)
|
if (size.x == 0.0f)
|
||||||
size.x = default_w;
|
size.x = default_w;
|
||||||
else if (size.x < 0.0f)
|
else if (size.x < 0.0f)
|
||||||
size.x = ImMax(4.0f, region_max.x - window->DC.CursorPos.x + size.x);
|
size.x = ImMax(4.0f, avail.x + size.x); // <-- size.x is negative here so we are subtracting
|
||||||
|
|
||||||
if (size.y == 0.0f)
|
if (size.y == 0.0f)
|
||||||
size.y = default_h;
|
size.y = default_h;
|
||||||
else if (size.y < 0.0f)
|
else if (size.y < 0.0f)
|
||||||
size.y = ImMax(4.0f, region_max.y - window->DC.CursorPos.y + size.y);
|
size.y = ImMax(4.0f, avail.y + size.y); // <-- size.y is negative here so we are subtracting
|
||||||
|
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
@ -11246,33 +11296,23 @@ float ImGui::GetFrameHeightWithSpacing()
|
|||||||
return g.FontSize + g.Style.FramePadding.y * 2.0f + g.Style.ItemSpacing.y;
|
return g.FontSize + g.Style.FramePadding.y * 2.0f + g.Style.ItemSpacing.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: All the Contents Region function are messy or misleading. WE WILL AIM TO OBSOLETE ALL OF THEM WITH A NEW "WORK RECT" API. Thanks for your patience!
|
|
||||||
|
|
||||||
// FIXME: This is in window space (not screen space!).
|
|
||||||
ImVec2 ImGui::GetContentRegionMax()
|
|
||||||
{
|
|
||||||
ImGuiContext& g = *GImGui;
|
|
||||||
ImGuiWindow* window = g.CurrentWindow;
|
|
||||||
ImVec2 mx = (window->DC.CurrentColumns || g.CurrentTable) ? window->WorkRect.Max : window->ContentRegionRect.Max;
|
|
||||||
return mx - window->Pos;
|
|
||||||
}
|
|
||||||
|
|
||||||
// [Internal] Absolute coordinate. Saner. This is not exposed until we finishing refactoring work rect features.
|
|
||||||
ImVec2 ImGui::GetContentRegionMaxAbs()
|
|
||||||
{
|
|
||||||
ImGuiContext& g = *GImGui;
|
|
||||||
ImGuiWindow* window = g.CurrentWindow;
|
|
||||||
ImVec2 mx = (window->DC.CurrentColumns || g.CurrentTable) ? window->WorkRect.Max : window->ContentRegionRect.Max;
|
|
||||||
return mx;
|
|
||||||
}
|
|
||||||
|
|
||||||
ImVec2 ImGui::GetContentRegionAvail()
|
ImVec2 ImGui::GetContentRegionAvail()
|
||||||
{
|
{
|
||||||
ImGuiWindow* window = GImGui->CurrentWindow;
|
ImGuiContext& g = *GImGui;
|
||||||
return GetContentRegionMaxAbs() - window->DC.CursorPos;
|
ImGuiWindow* window = g.CurrentWindow;
|
||||||
|
ImVec2 mx = (window->DC.CurrentColumns || g.CurrentTable) ? window->WorkRect.Max : window->ContentRegionRect.Max;
|
||||||
|
return mx - window->DC.CursorPos;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||||
|
|
||||||
|
// You should never need those functions. Always use GetCursorScreenPos() and GetContentRegionAvail()!
|
||||||
|
// They are bizarre local-coordinates which don't play well with scrolling.
|
||||||
|
ImVec2 ImGui::GetContentRegionMax()
|
||||||
|
{
|
||||||
|
return GetContentRegionAvail() + GetCursorScreenPos() - GetWindowPos();
|
||||||
}
|
}
|
||||||
|
|
||||||
// In window space (not screen space!)
|
|
||||||
ImVec2 ImGui::GetWindowContentRegionMin()
|
ImVec2 ImGui::GetWindowContentRegionMin()
|
||||||
{
|
{
|
||||||
ImGuiWindow* window = GImGui->CurrentWindow;
|
ImGuiWindow* window = GImGui->CurrentWindow;
|
||||||
@ -11284,6 +11324,7 @@ ImVec2 ImGui::GetWindowContentRegionMax()
|
|||||||
ImGuiWindow* window = GImGui->CurrentWindow;
|
ImGuiWindow* window = GImGui->CurrentWindow;
|
||||||
return window->ContentRegionRect.Max - window->Pos;
|
return window->ContentRegionRect.Max - window->Pos;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Lock horizontal starting position + capture group bounding box into one "item" (so you can use IsItemHovered() or layout primitives such as SameLine() on whole group, etc.)
|
// Lock horizontal starting position + capture group bounding box into one "item" (so you can use IsItemHovered() or layout primitives such as SameLine() on whole group, etc.)
|
||||||
// Groups are currently a mishmash of functionalities which should perhaps be clarified and separated.
|
// Groups are currently a mishmash of functionalities which should perhaps be clarified and separated.
|
||||||
@ -11329,11 +11370,11 @@ void ImGui::EndGroup()
|
|||||||
if (window->DC.IsSetPos)
|
if (window->DC.IsSetPos)
|
||||||
ErrorCheckUsingSetCursorPosToExtendParentBoundaries();
|
ErrorCheckUsingSetCursorPosToExtendParentBoundaries();
|
||||||
|
|
||||||
ImRect group_bb(group_data.BackupCursorPos, ImMax(window->DC.CursorMaxPos, group_data.BackupCursorPos));
|
// Include LastItemData.Rect.Max as a workaround for e.g. EndTable() undershooting with CursorMaxPos report. (#7543)
|
||||||
|
ImRect group_bb(group_data.BackupCursorPos, ImMax(ImMax(window->DC.CursorMaxPos, g.LastItemData.Rect.Max), group_data.BackupCursorPos));
|
||||||
window->DC.CursorPos = group_data.BackupCursorPos;
|
window->DC.CursorPos = group_data.BackupCursorPos;
|
||||||
window->DC.CursorPosPrevLine = group_data.BackupCursorPosPrevLine;
|
window->DC.CursorPosPrevLine = group_data.BackupCursorPosPrevLine;
|
||||||
window->DC.CursorMaxPos = ImMax(group_data.BackupCursorMaxPos, window->DC.CursorMaxPos);
|
window->DC.CursorMaxPos = ImMax(group_data.BackupCursorMaxPos, group_bb.Max);
|
||||||
window->DC.Indent = group_data.BackupIndent;
|
window->DC.Indent = group_data.BackupIndent;
|
||||||
window->DC.GroupOffset = group_data.BackupGroupOffset;
|
window->DC.GroupOffset = group_data.BackupGroupOffset;
|
||||||
window->DC.CurrLineSize = group_data.BackupCurrLineSize;
|
window->DC.CurrLineSize = group_data.BackupCurrLineSize;
|
||||||
@ -12421,6 +12462,9 @@ static bool ImGui::NavScoreItem(ImGuiNavItemData* result)
|
|||||||
if (dbx != 0.0f || dby != 0.0f)
|
if (dbx != 0.0f || dby != 0.0f)
|
||||||
{
|
{
|
||||||
// For non-overlapping boxes, use distance between boxes
|
// For non-overlapping boxes, use distance between boxes
|
||||||
|
// FIXME-NAV: Quadrant may be incorrect because of (1) dbx bias and (2) curr.Max.y bias applied by NavBiasScoringRect() where typically curr.Max.y==curr.Min.y
|
||||||
|
// One typical case where this happens, with style.WindowMenuButtonPosition == ImGuiDir_Right, pressing Left to navigate from Close to Collapse tends to fail.
|
||||||
|
// Also see #6344. Calling ImGetDirQuadrantFromDelta() with unbiased values may be good but side-effects are plenty.
|
||||||
dax = dbx;
|
dax = dbx;
|
||||||
day = dby;
|
day = dby;
|
||||||
dist_axial = dist_box;
|
dist_axial = dist_box;
|
||||||
@ -12699,6 +12743,7 @@ void ImGui::NavMoveRequestSubmit(ImGuiDir move_dir, ImGuiDir clip_dir, ImGuiNavM
|
|||||||
{
|
{
|
||||||
ImGuiContext& g = *GImGui;
|
ImGuiContext& g = *GImGui;
|
||||||
IM_ASSERT(g.NavWindow != NULL);
|
IM_ASSERT(g.NavWindow != NULL);
|
||||||
|
//IMGUI_DEBUG_LOG_NAV("[nav] NavMoveRequestSubmit: dir %c, window \"%s\"\n", "-WENS"[move_dir + 1], g.NavWindow->Name);
|
||||||
|
|
||||||
if (move_flags & ImGuiNavMoveFlags_IsTabbing)
|
if (move_flags & ImGuiNavMoveFlags_IsTabbing)
|
||||||
move_flags |= ImGuiNavMoveFlags_AllowCurrentNavId;
|
move_flags |= ImGuiNavMoveFlags_AllowCurrentNavId;
|
||||||
@ -12728,7 +12773,7 @@ void ImGui::NavMoveRequestResolveWithLastItem(ImGuiNavItemData* result)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Called by TreePop() to implement ImGuiTreeNodeFlags_NavLeftJumpsBackHere
|
// Called by TreePop() to implement ImGuiTreeNodeFlags_NavLeftJumpsBackHere
|
||||||
void ImGui::NavMoveRequestResolveWithPastTreeNode(ImGuiNavItemData* result, ImGuiNavTreeNodeData* tree_node_data)
|
void ImGui::NavMoveRequestResolveWithPastTreeNode(ImGuiNavItemData* result, ImGuiTreeNodeStackData* tree_node_data)
|
||||||
{
|
{
|
||||||
ImGuiContext& g = *GImGui;
|
ImGuiContext& g = *GImGui;
|
||||||
g.NavMoveScoringItems = false;
|
g.NavMoveScoringItems = false;
|
||||||
@ -12951,6 +12996,7 @@ static void ImGui::NavUpdate()
|
|||||||
|
|
||||||
// Process navigation init request (select first/default focus)
|
// Process navigation init request (select first/default focus)
|
||||||
g.NavJustMovedToId = 0;
|
g.NavJustMovedToId = 0;
|
||||||
|
g.NavJustMovedToFocusScopeId = g.NavJustMovedFromFocusScopeId = 0;
|
||||||
if (g.NavInitResult.ID != 0)
|
if (g.NavInitResult.ID != 0)
|
||||||
NavInitRequestApplyResult();
|
NavInitRequestApplyResult();
|
||||||
g.NavInitRequest = false;
|
g.NavInitRequest = false;
|
||||||
@ -13103,6 +13149,7 @@ void ImGui::NavInitRequestApplyResult()
|
|||||||
ImGuiNavItemData* result = &g.NavInitResult;
|
ImGuiNavItemData* result = &g.NavInitResult;
|
||||||
if (g.NavId != result->ID)
|
if (g.NavId != result->ID)
|
||||||
{
|
{
|
||||||
|
g.NavJustMovedFromFocusScopeId = g.NavFocusScopeId;
|
||||||
g.NavJustMovedToId = result->ID;
|
g.NavJustMovedToId = result->ID;
|
||||||
g.NavJustMovedToFocusScopeId = result->FocusScopeId;
|
g.NavJustMovedToFocusScopeId = result->FocusScopeId;
|
||||||
g.NavJustMovedToKeyMods = 0;
|
g.NavJustMovedToKeyMods = 0;
|
||||||
@ -13361,6 +13408,7 @@ void ImGui::NavMoveRequestApplyResult()
|
|||||||
// PageUp/PageDown however sets always set NavJustMovedTo (vs Home/End which doesn't) mimicking Windows behavior.
|
// PageUp/PageDown however sets always set NavJustMovedTo (vs Home/End which doesn't) mimicking Windows behavior.
|
||||||
if ((g.NavId != result->ID || (g.NavMoveFlags & ImGuiNavMoveFlags_IsPageMove)) && (g.NavMoveFlags & ImGuiNavMoveFlags_NoSelect) == 0)
|
if ((g.NavId != result->ID || (g.NavMoveFlags & ImGuiNavMoveFlags_IsPageMove)) && (g.NavMoveFlags & ImGuiNavMoveFlags_NoSelect) == 0)
|
||||||
{
|
{
|
||||||
|
g.NavJustMovedFromFocusScopeId = g.NavFocusScopeId;
|
||||||
g.NavJustMovedToId = result->ID;
|
g.NavJustMovedToId = result->ID;
|
||||||
g.NavJustMovedToFocusScopeId = result->FocusScopeId;
|
g.NavJustMovedToFocusScopeId = result->FocusScopeId;
|
||||||
g.NavJustMovedToKeyMods = g.NavMoveKeyMods;
|
g.NavJustMovedToKeyMods = g.NavMoveKeyMods;
|
||||||
@ -14129,7 +14177,7 @@ bool ImGui::BeginDragDropTargetCustom(const ImRect& bb, ImGuiID id)
|
|||||||
|
|
||||||
IM_ASSERT(g.DragDropWithinTarget == false && g.DragDropWithinSource == false); // Can't nest BeginDragDropSource() and BeginDragDropTarget()
|
IM_ASSERT(g.DragDropWithinTarget == false && g.DragDropWithinSource == false); // Can't nest BeginDragDropSource() and BeginDragDropTarget()
|
||||||
g.DragDropTargetRect = bb;
|
g.DragDropTargetRect = bb;
|
||||||
g.DragDropTargetClipRect = window->ClipRect; // May want to be overriden by user depending on use case?
|
g.DragDropTargetClipRect = window->ClipRect; // May want to be overridden by user depending on use case?
|
||||||
g.DragDropTargetId = id;
|
g.DragDropTargetId = id;
|
||||||
g.DragDropWithinTarget = true;
|
g.DragDropWithinTarget = true;
|
||||||
return true;
|
return true;
|
||||||
@ -14482,10 +14530,10 @@ void ImGui::LogButtons()
|
|||||||
#endif
|
#endif
|
||||||
const bool log_to_file = Button("Log To File"); SameLine();
|
const bool log_to_file = Button("Log To File"); SameLine();
|
||||||
const bool log_to_clipboard = Button("Log To Clipboard"); SameLine();
|
const bool log_to_clipboard = Button("Log To Clipboard"); SameLine();
|
||||||
PushTabStop(false);
|
PushItemFlag(ImGuiItemFlags_NoTabStop, true);
|
||||||
SetNextItemWidth(80.0f);
|
SetNextItemWidth(80.0f);
|
||||||
SliderInt("Default Depth", &g.LogDepthToExpandDefault, 0, 9, NULL);
|
SliderInt("Default Depth", &g.LogDepthToExpandDefault, 0, 9, NULL);
|
||||||
PopTabStop();
|
PopItemFlag();
|
||||||
PopID();
|
PopID();
|
||||||
|
|
||||||
// Start logging at the end of the function so that the buttons don't appear in the log
|
// Start logging at the end of the function so that the buttons don't appear in the log
|
||||||
@ -15265,6 +15313,10 @@ static void ImGui::UpdateViewportsNewFrame()
|
|||||||
g.PlatformMonitorsFullWorkRect.Add(monitor->WorkPos);
|
g.PlatformMonitorsFullWorkRect.Add(monitor->WorkPos);
|
||||||
g.PlatformMonitorsFullWorkRect.Add(monitor->WorkPos + monitor->WorkSize);
|
g.PlatformMonitorsFullWorkRect.Add(monitor->WorkPos + monitor->WorkSize);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
g.FallbackMonitor = g.PlatformIO.Monitors[0];
|
||||||
|
}
|
||||||
for (ImGuiPlatformMonitor& monitor : g.PlatformIO.Monitors)
|
for (ImGuiPlatformMonitor& monitor : g.PlatformIO.Monitors)
|
||||||
{
|
{
|
||||||
g.PlatformMonitorsFullWorkRect.Add(monitor.WorkPos);
|
g.PlatformMonitorsFullWorkRect.Add(monitor.WorkPos);
|
||||||
@ -19846,6 +19898,10 @@ static void ImGui::DockSettingsHandler_WriteAll(ImGuiContext* ctx, ImGuiSettings
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// [SECTION] PLATFORM DEPENDENT HELPERS
|
// [SECTION] PLATFORM DEPENDENT HELPERS
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
// - Default clipboard handlers
|
||||||
|
// - Default shell function handlers
|
||||||
|
// - Default IME handlers
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
#if defined(_WIN32) && !defined(IMGUI_DISABLE_WIN32_FUNCTIONS) && !defined(IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS)
|
#if defined(_WIN32) && !defined(IMGUI_DISABLE_WIN32_FUNCTIONS) && !defined(IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS)
|
||||||
|
|
||||||
@ -19971,8 +20027,62 @@ static void SetClipboardTextFn_DefaultImpl(void* user_data_ctx, const char* text
|
|||||||
g.ClipboardHandlerData[(int)(text_end - text)] = 0;
|
g.ClipboardHandlerData[(int)(text_end - text)] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // Default clipboard handlers
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifndef IMGUI_DISABLE_DEFAULT_SHELL_FUNCTIONS
|
||||||
|
#if defined(__APPLE__) && TARGET_OS_IPHONE
|
||||||
|
#define IMGUI_DISABLE_DEFAULT_SHELL_FUNCTIONS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(_WIN32) && defined(IMGUI_DISABLE_WIN32_FUNCTIONS)
|
||||||
|
#define IMGUI_DISABLE_DEFAULT_SHELL_FUNCTIONS
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef IMGUI_DISABLE_DEFAULT_SHELL_FUNCTIONS
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include <shellapi.h> // ShellExecuteA()
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma comment(lib, "shell32")
|
||||||
|
#endif
|
||||||
|
static bool PlatformOpenInShellFn_DefaultImpl(ImGuiContext*, const char* path)
|
||||||
|
{
|
||||||
|
return (INT_PTR)::ShellExecuteA(NULL, "open", path, NULL, NULL, SW_SHOWDEFAULT) > 32;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
#include <sys/wait.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
static bool PlatformOpenInShellFn_DefaultImpl(ImGuiContext*, const char* path)
|
||||||
|
{
|
||||||
|
#if defined(__APPLE__)
|
||||||
|
const char* args[] { "open", "--", path, NULL };
|
||||||
|
#else
|
||||||
|
const char* args[] { "xdg-open", path, NULL };
|
||||||
|
#endif
|
||||||
|
pid_t pid = fork();
|
||||||
|
if (pid < 0)
|
||||||
|
return false;
|
||||||
|
if (!pid)
|
||||||
|
{
|
||||||
|
execvp(args[0], const_cast<char **>(args));
|
||||||
|
exit(-1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int status;
|
||||||
|
waitpid(pid, &status, 0);
|
||||||
|
return WEXITSTATUS(status) == 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
static bool PlatformOpenInShellFn_DefaultImpl(ImGuiContext*, const char*) { return false; }
|
||||||
|
#endif // Default shell handlers
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
// Win32 API IME support (for Asian languages, etc.)
|
// Win32 API IME support (for Asian languages, etc.)
|
||||||
#if defined(_WIN32) && !defined(IMGUI_DISABLE_WIN32_FUNCTIONS) && !defined(IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS)
|
#if defined(_WIN32) && !defined(IMGUI_DISABLE_WIN32_FUNCTIONS) && !defined(IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS)
|
||||||
|
|
||||||
@ -19981,7 +20091,7 @@ static void SetClipboardTextFn_DefaultImpl(void* user_data_ctx, const char* text
|
|||||||
#pragma comment(lib, "imm32")
|
#pragma comment(lib, "imm32")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void SetPlatformImeDataFn_DefaultImpl(ImGuiViewport* viewport, ImGuiPlatformImeData* data)
|
static void PlatformSetImeDataFn_DefaultImpl(ImGuiContext*, ImGuiViewport* viewport, ImGuiPlatformImeData* data)
|
||||||
{
|
{
|
||||||
// Notify OS Input Method Editor of text input position
|
// Notify OS Input Method Editor of text input position
|
||||||
HWND hwnd = (HWND)viewport->PlatformHandleRaw;
|
HWND hwnd = (HWND)viewport->PlatformHandleRaw;
|
||||||
@ -20007,9 +20117,9 @@ static void SetPlatformImeDataFn_DefaultImpl(ImGuiViewport* viewport, ImGuiPlatf
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
static void SetPlatformImeDataFn_DefaultImpl(ImGuiViewport*, ImGuiPlatformImeData*) {}
|
static void PlatformSetImeDataFn_DefaultImpl(ImGuiContext*, ImGuiViewport*, ImGuiPlatformImeData*) {}
|
||||||
|
|
||||||
#endif
|
#endif // Default IME handlers
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// [SECTION] METRICS/DEBUGGER WINDOW
|
// [SECTION] METRICS/DEBUGGER WINDOW
|
||||||
@ -20496,14 +20606,11 @@ void ImGui::ShowMetricsWindow(bool* p_open)
|
|||||||
{
|
{
|
||||||
for (int i = 0; i < g.PlatformIO.Monitors.Size; i++)
|
for (int i = 0; i < g.PlatformIO.Monitors.Size; i++)
|
||||||
{
|
{
|
||||||
const ImGuiPlatformMonitor& mon = g.PlatformIO.Monitors[i];
|
DebugNodePlatformMonitor(&g.PlatformIO.Monitors[i], "Monitor", i);
|
||||||
BulletText("Monitor #%d: DPI %.0f%%\n MainMin (%.0f,%.0f), MainMax (%.0f,%.0f), MainSize (%.0f,%.0f)\n WorkMin (%.0f,%.0f), WorkMax (%.0f,%.0f), WorkSize (%.0f,%.0f)",
|
|
||||||
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())
|
if (IsItemHovered())
|
||||||
cfg->HighlightMonitorIdx = i;
|
cfg->HighlightMonitorIdx = i;
|
||||||
}
|
}
|
||||||
|
DebugNodePlatformMonitor(&g.FallbackMonitor, "Fallback", 0);
|
||||||
TreePop();
|
TreePop();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -20598,6 +20705,17 @@ void ImGui::ShowMetricsWindow(bool* p_open)
|
|||||||
TreePop();
|
TreePop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Details for MultiSelect
|
||||||
|
if (TreeNode("MultiSelect", "MultiSelect (%d)", g.MultiSelectStorage.GetAliveCount()))
|
||||||
|
{
|
||||||
|
ImGuiBoxSelectState* bs = &g.BoxSelectState;
|
||||||
|
BulletText("BoxSelect ID=0x%08X, Starting = %d, Active %d", bs->ID, bs->IsStarting, bs->IsActive);
|
||||||
|
for (int n = 0; n < g.MultiSelectStorage.GetMapSize(); n++)
|
||||||
|
if (ImGuiMultiSelectState* state = g.MultiSelectStorage.TryGetMapData(n))
|
||||||
|
DebugNodeMultiSelectState(state);
|
||||||
|
TreePop();
|
||||||
|
}
|
||||||
|
|
||||||
// Details for Docking
|
// Details for Docking
|
||||||
#ifdef IMGUI_HAS_DOCK
|
#ifdef IMGUI_HAS_DOCK
|
||||||
if (TreeNode("Docking"))
|
if (TreeNode("Docking"))
|
||||||
@ -20700,7 +20818,12 @@ void ImGui::ShowMetricsWindow(bool* p_open)
|
|||||||
for (int n = buf_size - 1; n >= 0; n--)
|
for (int n = buf_size - 1; n >= 0; n--)
|
||||||
{
|
{
|
||||||
ImGuiDebugAllocEntry* entry = &info->LastEntriesBuf[(info->LastEntriesIdx - n + buf_size) % buf_size];
|
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)" : "");
|
BulletText("Frame %06d: %+3d ( %2d alloc, %2d free )", entry->FrameCount, entry->AllocCount - entry->FreeCount, entry->AllocCount, entry->FreeCount);
|
||||||
|
if (n == 0)
|
||||||
|
{
|
||||||
|
SameLine();
|
||||||
|
Text("<- %d frames ago", g.FrameCount - entry->FrameCount);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
TreePop();
|
TreePop();
|
||||||
}
|
}
|
||||||
@ -21409,6 +21532,14 @@ void ImGui::DebugNodeViewport(ImGuiViewportP* viewport)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ImGui::DebugNodePlatformMonitor(ImGuiPlatformMonitor* monitor, const char* label, int idx)
|
||||||
|
{
|
||||||
|
BulletText("%s %d: DPI %.0f%%\n MainMin (%.0f,%.0f), MainMax (%.0f,%.0f), MainSize (%.0f,%.0f)\n WorkMin (%.0f,%.0f), WorkMax (%.0f,%.0f), WorkSize (%.0f,%.0f)",
|
||||||
|
label, idx, monitor->DpiScale * 100.0f,
|
||||||
|
monitor->MainPos.x, monitor->MainPos.y, monitor->MainPos.x + monitor->MainSize.x, monitor->MainPos.y + monitor->MainSize.y, monitor->MainSize.x, monitor->MainSize.y,
|
||||||
|
monitor->WorkPos.x, monitor->WorkPos.y, monitor->WorkPos.x + monitor->WorkSize.x, monitor->WorkPos.y + monitor->WorkSize.y, monitor->WorkSize.x, monitor->WorkSize.y);
|
||||||
|
}
|
||||||
|
|
||||||
void ImGui::DebugNodeWindow(ImGuiWindow* window, const char* label)
|
void ImGui::DebugNodeWindow(ImGuiWindow* window, const char* label)
|
||||||
{
|
{
|
||||||
if (window == NULL)
|
if (window == NULL)
|
||||||
@ -21441,6 +21572,12 @@ void ImGui::DebugNodeWindow(ImGuiWindow* window, const char* label)
|
|||||||
(flags & ImGuiWindowFlags_ChildWindow) ? "Child " : "", (flags & ImGuiWindowFlags_Tooltip) ? "Tooltip " : "", (flags & ImGuiWindowFlags_Popup) ? "Popup " : "",
|
(flags & ImGuiWindowFlags_ChildWindow) ? "Child " : "", (flags & ImGuiWindowFlags_Tooltip) ? "Tooltip " : "", (flags & ImGuiWindowFlags_Popup) ? "Popup " : "",
|
||||||
(flags & ImGuiWindowFlags_Modal) ? "Modal " : "", (flags & ImGuiWindowFlags_ChildMenu) ? "ChildMenu " : "", (flags & ImGuiWindowFlags_NoSavedSettings) ? "NoSavedSettings " : "",
|
(flags & ImGuiWindowFlags_Modal) ? "Modal " : "", (flags & ImGuiWindowFlags_ChildMenu) ? "ChildMenu " : "", (flags & ImGuiWindowFlags_NoSavedSettings) ? "NoSavedSettings " : "",
|
||||||
(flags & ImGuiWindowFlags_NoMouseInputs)? "NoMouseInputs":"", (flags & ImGuiWindowFlags_NoNavInputs) ? "NoNavInputs" : "", (flags & ImGuiWindowFlags_AlwaysAutoResize) ? "AlwaysAutoResize" : "");
|
(flags & ImGuiWindowFlags_NoMouseInputs)? "NoMouseInputs":"", (flags & ImGuiWindowFlags_NoNavInputs) ? "NoNavInputs" : "", (flags & ImGuiWindowFlags_AlwaysAutoResize) ? "AlwaysAutoResize" : "");
|
||||||
|
if (flags & ImGuiWindowFlags_ChildWindow)
|
||||||
|
BulletText("ChildFlags: 0x%08X (%s%s%s%s..)", window->ChildFlags,
|
||||||
|
(window->ChildFlags & ImGuiChildFlags_Border) ? "Border " : "",
|
||||||
|
(window->ChildFlags & ImGuiChildFlags_ResizeX) ? "ResizeX " : "",
|
||||||
|
(window->ChildFlags & ImGuiChildFlags_ResizeY) ? "ResizeY " : "",
|
||||||
|
(window->ChildFlags & ImGuiChildFlags_NavFlattened) ? "NavFlattened " : "");
|
||||||
BulletText("WindowClassId: 0x%08X", window->WindowClass.ClassId);
|
BulletText("WindowClassId: 0x%08X", window->WindowClass.ClassId);
|
||||||
BulletText("Scroll: (%.2f/%.2f,%.2f/%.2f) Scrollbar:%s%s", window->Scroll.x, window->ScrollMax.x, window->Scroll.y, window->ScrollMax.y, window->ScrollbarX ? "X" : "", window->ScrollbarY ? "Y" : "");
|
BulletText("Scroll: (%.2f/%.2f,%.2f/%.2f) Scrollbar:%s%s", window->Scroll.x, window->ScrollMax.x, window->Scroll.y, window->ScrollMax.y, window->ScrollbarX ? "X" : "", window->ScrollbarY ? "Y" : "");
|
||||||
BulletText("Active: %d/%d, WriteAccessed: %d, BeginOrderWithinContext: %d", window->Active, window->WasActive, window->WriteAccessed, (window->Active || window->WasActive) ? window->BeginOrderWithinContext : -1);
|
BulletText("Active: %d/%d, WriteAccessed: %d, BeginOrderWithinContext: %d", window->Active, window->WasActive, window->WriteAccessed, (window->Active || window->WasActive) ? window->BeginOrderWithinContext : -1);
|
||||||
@ -21560,7 +21697,7 @@ static void SameLineOrWrap(const ImVec2& size)
|
|||||||
ImGuiContext& g = *GImGui;
|
ImGuiContext& g = *GImGui;
|
||||||
ImGuiWindow* window = g.CurrentWindow;
|
ImGuiWindow* window = g.CurrentWindow;
|
||||||
ImVec2 pos(window->DC.CursorPosPrevLine.x + g.Style.ItemSpacing.x, window->DC.CursorPosPrevLine.y);
|
ImVec2 pos(window->DC.CursorPosPrevLine.x + g.Style.ItemSpacing.x, window->DC.CursorPosPrevLine.y);
|
||||||
if (window->ClipRect.Contains(ImRect(pos, pos + size)))
|
if (window->WorkRect.Contains(ImRect(pos, pos + size)))
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -21599,7 +21736,7 @@ void ImGui::ShowDebugLogWindow(bool* p_open)
|
|||||||
ShowDebugLogFlag("IO", ImGuiDebugLogFlags_EventIO);
|
ShowDebugLogFlag("IO", ImGuiDebugLogFlags_EventIO);
|
||||||
ShowDebugLogFlag("Nav", ImGuiDebugLogFlags_EventNav);
|
ShowDebugLogFlag("Nav", ImGuiDebugLogFlags_EventNav);
|
||||||
ShowDebugLogFlag("Popup", ImGuiDebugLogFlags_EventPopup);
|
ShowDebugLogFlag("Popup", ImGuiDebugLogFlags_EventPopup);
|
||||||
//ShowDebugLogFlag("Selection", ImGuiDebugLogFlags_EventSelection);
|
ShowDebugLogFlag("Selection", ImGuiDebugLogFlags_EventSelection);
|
||||||
ShowDebugLogFlag("Viewport", ImGuiDebugLogFlags_EventViewport);
|
ShowDebugLogFlag("Viewport", ImGuiDebugLogFlags_EventViewport);
|
||||||
ShowDebugLogFlag("InputRouting", ImGuiDebugLogFlags_EventInputRouting);
|
ShowDebugLogFlag("InputRouting", ImGuiDebugLogFlags_EventInputRouting);
|
||||||
|
|
||||||
@ -21611,6 +21748,22 @@ void ImGui::ShowDebugLogWindow(bool* p_open)
|
|||||||
SameLine();
|
SameLine();
|
||||||
if (SmallButton("Copy"))
|
if (SmallButton("Copy"))
|
||||||
SetClipboardText(g.DebugLogBuf.c_str());
|
SetClipboardText(g.DebugLogBuf.c_str());
|
||||||
|
SameLine();
|
||||||
|
if (SmallButton("Configure Outputs.."))
|
||||||
|
OpenPopup("Outputs");
|
||||||
|
if (BeginPopup("Outputs"))
|
||||||
|
{
|
||||||
|
CheckboxFlags("OutputToTTY", &g.DebugLogFlags, ImGuiDebugLogFlags_OutputToTTY);
|
||||||
|
#ifndef IMGUI_ENABLE_TEST_ENGINE
|
||||||
|
BeginDisabled();
|
||||||
|
#endif
|
||||||
|
CheckboxFlags("OutputToTestEngine", &g.DebugLogFlags, ImGuiDebugLogFlags_OutputToTestEngine);
|
||||||
|
#ifndef IMGUI_ENABLE_TEST_ENGINE
|
||||||
|
EndDisabled();
|
||||||
|
#endif
|
||||||
|
EndPopup();
|
||||||
|
}
|
||||||
|
|
||||||
BeginChild("##log", ImVec2(0.0f, 0.0f), ImGuiChildFlags_Border, ImGuiWindowFlags_AlwaysVerticalScrollbar | ImGuiWindowFlags_AlwaysHorizontalScrollbar);
|
BeginChild("##log", ImVec2(0.0f, 0.0f), ImGuiChildFlags_Border, ImGuiWindowFlags_AlwaysVerticalScrollbar | ImGuiWindowFlags_AlwaysHorizontalScrollbar);
|
||||||
|
|
||||||
const ImGuiDebugLogFlags backup_log_flags = g.DebugLogFlags;
|
const ImGuiDebugLogFlags backup_log_flags = g.DebugLogFlags;
|
||||||
@ -21640,7 +21793,7 @@ void ImGui::DebugTextUnformattedWithLocateItem(const char* line_begin, const cha
|
|||||||
for (const char* p = line_begin; p <= line_end - 10; p++)
|
for (const char* p = line_begin; p <= line_end - 10; p++)
|
||||||
{
|
{
|
||||||
ImGuiID id = 0;
|
ImGuiID id = 0;
|
||||||
if (p[0] != '0' || (p[1] != 'x' && p[1] != 'X') || sscanf(p + 2, "%X", &id) != 1)
|
if (p[0] != '0' || (p[1] != 'x' && p[1] != 'X') || sscanf(p + 2, "%X", &id) != 1 || ImCharIsXdigitA(p[10]))
|
||||||
continue;
|
continue;
|
||||||
ImVec2 p0 = CalcTextSize(line_begin, p);
|
ImVec2 p0 = CalcTextSize(line_begin, p);
|
||||||
ImVec2 p1 = CalcTextSize(p, p + 10);
|
ImVec2 p1 = CalcTextSize(p, p + 10);
|
||||||
@ -21971,8 +22124,6 @@ void ImGui::DebugNodeWindowSettings(ImGuiWindowSettings*) {}
|
|||||||
void ImGui::DebugNodeWindowsList(ImVector<ImGuiWindow*>*, const char*) {}
|
void ImGui::DebugNodeWindowsList(ImVector<ImGuiWindow*>*, const char*) {}
|
||||||
void ImGui::DebugNodeViewport(ImGuiViewportP*) {}
|
void ImGui::DebugNodeViewport(ImGuiViewportP*) {}
|
||||||
|
|
||||||
void ImGui::DebugLog(const char*, ...) {}
|
|
||||||
void ImGui::DebugLogV(const char*, va_list) {}
|
|
||||||
void ImGui::ShowDebugLogWindow(bool*) {}
|
void ImGui::ShowDebugLogWindow(bool*) {}
|
||||||
void ImGui::ShowIDStackToolWindow(bool*) {}
|
void ImGui::ShowIDStackToolWindow(bool*) {}
|
||||||
void ImGui::DebugStartItemPicker() {}
|
void ImGui::DebugStartItemPicker() {}
|
||||||
|
2033
lib/third_party/imgui/imgui/source/imgui_demo.cpp
vendored
2033
lib/third_party/imgui/imgui/source/imgui_demo.cpp
vendored
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
|||||||
// dear imgui, v1.90.9
|
// dear imgui, v1.91.0
|
||||||
// (drawing and font code)
|
// (drawing and font code)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -231,6 +231,7 @@ void ImGui::StyleColorsDark(ImGuiStyle* dst)
|
|||||||
colors[ImGuiCol_TableBorderLight] = ImVec4(0.23f, 0.23f, 0.25f, 1.00f); // Prefer using Alpha=1.0 here
|
colors[ImGuiCol_TableBorderLight] = ImVec4(0.23f, 0.23f, 0.25f, 1.00f); // Prefer using Alpha=1.0 here
|
||||||
colors[ImGuiCol_TableRowBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
|
colors[ImGuiCol_TableRowBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
|
||||||
colors[ImGuiCol_TableRowBgAlt] = ImVec4(1.00f, 1.00f, 1.00f, 0.06f);
|
colors[ImGuiCol_TableRowBgAlt] = ImVec4(1.00f, 1.00f, 1.00f, 0.06f);
|
||||||
|
colors[ImGuiCol_TextLink] = colors[ImGuiCol_HeaderActive];
|
||||||
colors[ImGuiCol_TextSelectedBg] = ImVec4(0.26f, 0.59f, 0.98f, 0.35f);
|
colors[ImGuiCol_TextSelectedBg] = ImVec4(0.26f, 0.59f, 0.98f, 0.35f);
|
||||||
colors[ImGuiCol_DragDropTarget] = ImVec4(1.00f, 1.00f, 0.00f, 0.90f);
|
colors[ImGuiCol_DragDropTarget] = ImVec4(1.00f, 1.00f, 0.00f, 0.90f);
|
||||||
colors[ImGuiCol_NavHighlight] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f);
|
colors[ImGuiCol_NavHighlight] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f);
|
||||||
@ -296,6 +297,7 @@ void ImGui::StyleColorsClassic(ImGuiStyle* dst)
|
|||||||
colors[ImGuiCol_TableBorderLight] = ImVec4(0.26f, 0.26f, 0.28f, 1.00f); // Prefer using Alpha=1.0 here
|
colors[ImGuiCol_TableBorderLight] = ImVec4(0.26f, 0.26f, 0.28f, 1.00f); // Prefer using Alpha=1.0 here
|
||||||
colors[ImGuiCol_TableRowBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
|
colors[ImGuiCol_TableRowBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
|
||||||
colors[ImGuiCol_TableRowBgAlt] = ImVec4(1.00f, 1.00f, 1.00f, 0.07f);
|
colors[ImGuiCol_TableRowBgAlt] = ImVec4(1.00f, 1.00f, 1.00f, 0.07f);
|
||||||
|
colors[ImGuiCol_TextLink] = colors[ImGuiCol_HeaderActive];
|
||||||
colors[ImGuiCol_TextSelectedBg] = ImVec4(0.00f, 0.00f, 1.00f, 0.35f);
|
colors[ImGuiCol_TextSelectedBg] = ImVec4(0.00f, 0.00f, 1.00f, 0.35f);
|
||||||
colors[ImGuiCol_DragDropTarget] = ImVec4(1.00f, 1.00f, 0.00f, 0.90f);
|
colors[ImGuiCol_DragDropTarget] = ImVec4(1.00f, 1.00f, 0.00f, 0.90f);
|
||||||
colors[ImGuiCol_NavHighlight] = colors[ImGuiCol_HeaderHovered];
|
colors[ImGuiCol_NavHighlight] = colors[ImGuiCol_HeaderHovered];
|
||||||
@ -362,6 +364,7 @@ void ImGui::StyleColorsLight(ImGuiStyle* dst)
|
|||||||
colors[ImGuiCol_TableBorderLight] = ImVec4(0.68f, 0.68f, 0.74f, 1.00f); // Prefer using Alpha=1.0 here
|
colors[ImGuiCol_TableBorderLight] = ImVec4(0.68f, 0.68f, 0.74f, 1.00f); // Prefer using Alpha=1.0 here
|
||||||
colors[ImGuiCol_TableRowBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
|
colors[ImGuiCol_TableRowBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
|
||||||
colors[ImGuiCol_TableRowBgAlt] = ImVec4(0.30f, 0.30f, 0.30f, 0.09f);
|
colors[ImGuiCol_TableRowBgAlt] = ImVec4(0.30f, 0.30f, 0.30f, 0.09f);
|
||||||
|
colors[ImGuiCol_TextLink] = colors[ImGuiCol_HeaderActive];
|
||||||
colors[ImGuiCol_TextSelectedBg] = ImVec4(0.26f, 0.59f, 0.98f, 0.35f);
|
colors[ImGuiCol_TextSelectedBg] = ImVec4(0.26f, 0.59f, 0.98f, 0.35f);
|
||||||
colors[ImGuiCol_DragDropTarget] = ImVec4(0.26f, 0.59f, 0.98f, 0.95f);
|
colors[ImGuiCol_DragDropTarget] = ImVec4(0.26f, 0.59f, 0.98f, 0.95f);
|
||||||
colors[ImGuiCol_NavHighlight] = colors[ImGuiCol_HeaderHovered];
|
colors[ImGuiCol_NavHighlight] = colors[ImGuiCol_HeaderHovered];
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// dear imgui, v1.90.9
|
// dear imgui, v1.91.0
|
||||||
// (tables and columns code)
|
// (tables and columns code)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -412,8 +412,8 @@ bool ImGui::BeginTableEx(const char* name, ImGuiID id, int columns_count, ImG
|
|||||||
SetNextWindowScroll(ImVec2(0.0f, 0.0f));
|
SetNextWindowScroll(ImVec2(0.0f, 0.0f));
|
||||||
|
|
||||||
// Create scrolling region (without border and zero window padding)
|
// Create scrolling region (without border and zero window padding)
|
||||||
ImGuiWindowFlags child_flags = (flags & ImGuiTableFlags_ScrollX) ? ImGuiWindowFlags_HorizontalScrollbar : ImGuiWindowFlags_None;
|
ImGuiWindowFlags child_window_flags = (flags & ImGuiTableFlags_ScrollX) ? ImGuiWindowFlags_HorizontalScrollbar : ImGuiWindowFlags_None;
|
||||||
BeginChildEx(name, instance_id, outer_rect.GetSize(), false, child_flags);
|
BeginChildEx(name, instance_id, outer_rect.GetSize(), ImGuiChildFlags_None, child_window_flags);
|
||||||
table->InnerWindow = g.CurrentWindow;
|
table->InnerWindow = g.CurrentWindow;
|
||||||
table->WorkRect = table->InnerWindow->WorkRect;
|
table->WorkRect = table->InnerWindow->WorkRect;
|
||||||
table->OuterRect = table->InnerWindow->Rect();
|
table->OuterRect = table->InnerWindow->Rect();
|
||||||
@ -1996,14 +1996,16 @@ void ImGui::TableEndRow(ImGuiTable* table)
|
|||||||
// We need to do that in TableEndRow() instead of TableBeginRow() so the list clipper can mark end of row and
|
// We need to do that in TableEndRow() instead of TableBeginRow() so the list clipper can mark end of row and
|
||||||
// get the new cursor position.
|
// get the new cursor position.
|
||||||
if (unfreeze_rows_request)
|
if (unfreeze_rows_request)
|
||||||
|
{
|
||||||
for (int column_n = 0; column_n < table->ColumnsCount; column_n++)
|
for (int column_n = 0; column_n < table->ColumnsCount; column_n++)
|
||||||
table->Columns[column_n].NavLayerCurrent = ImGuiNavLayer_Main;
|
table->Columns[column_n].NavLayerCurrent = ImGuiNavLayer_Main;
|
||||||
|
const float y0 = ImMax(table->RowPosY2 + 1, window->InnerClipRect.Min.y);
|
||||||
|
table_instance->LastFrozenHeight = y0 - table->OuterRect.Min.y;
|
||||||
|
|
||||||
if (unfreeze_rows_actual)
|
if (unfreeze_rows_actual)
|
||||||
{
|
{
|
||||||
IM_ASSERT(table->IsUnfrozenRows == false);
|
IM_ASSERT(table->IsUnfrozenRows == false);
|
||||||
const float y0 = ImMax(table->RowPosY2 + 1, window->InnerClipRect.Min.y);
|
|
||||||
table->IsUnfrozenRows = true;
|
table->IsUnfrozenRows = true;
|
||||||
table_instance->LastFrozenHeight = y0 - table->OuterRect.Min.y;
|
|
||||||
|
|
||||||
// BgClipRect starts as table->InnerClipRect, reduce it now and make BgClipRectForDrawCmd == BgClipRect
|
// 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);
|
table->BgClipRect.Min.y = table->Bg2ClipRectForDrawCmd.Min.y = ImMin(y0, window->InnerClipRect.Max.y);
|
||||||
@ -2025,6 +2027,7 @@ void ImGui::TableEndRow(ImGuiTable* table)
|
|||||||
SetWindowClipRectBeforeSetChannel(window, table->Columns[0].ClipRect);
|
SetWindowClipRectBeforeSetChannel(window, table->Columns[0].ClipRect);
|
||||||
table->DrawSplitter->SetCurrentChannel(window->DrawList, table->Columns[0].DrawChannelCurrent);
|
table->DrawSplitter->SetCurrentChannel(window->DrawList, table->Columns[0].DrawChannelCurrent);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!(table->RowFlags & ImGuiTableRowFlags_Headers))
|
if (!(table->RowFlags & ImGuiTableRowFlags_Headers))
|
||||||
table->RowBgColorCounter++;
|
table->RowBgColorCounter++;
|
||||||
@ -3269,7 +3272,7 @@ void ImGui::TableAngledHeadersRowEx(ImGuiID row_id, float angle, float max_label
|
|||||||
ButtonBehavior(row_r, row_id, NULL, NULL);
|
ButtonBehavior(row_r, row_id, NULL, NULL);
|
||||||
KeepAliveID(row_id);
|
KeepAliveID(row_id);
|
||||||
|
|
||||||
const float ascent_scaled = g.Font->Ascent * (g.FontSize / g.Font->FontSize); // FIXME: Standardize those scaling factors better
|
const float ascent_scaled = g.Font->Ascent * g.FontScale; // FIXME: Standardize those scaling factors better
|
||||||
const float line_off_for_ascent_x = (ImMax((g.FontSize - ascent_scaled) * 0.5f, 0.0f) / -sin_a) * (flip_label ? -1.0f : 1.0f);
|
const float line_off_for_ascent_x = (ImMax((g.FontSize - ascent_scaled) * 0.5f, 0.0f) / -sin_a) * (flip_label ? -1.0f : 1.0f);
|
||||||
const ImVec2 padding = g.Style.CellPadding; // We will always use swapped component
|
const ImVec2 padding = g.Style.CellPadding; // We will always use swapped component
|
||||||
const ImVec2 align = g.Style.TableAngledHeadersTextAlign;
|
const ImVec2 align = g.Style.TableAngledHeadersTextAlign;
|
||||||
@ -3471,7 +3474,7 @@ void ImGui::TableDrawDefaultContextMenu(ImGuiTable* table, ImGuiTableFlags flags
|
|||||||
Separator();
|
Separator();
|
||||||
want_separator = true;
|
want_separator = true;
|
||||||
|
|
||||||
PushItemFlag(ImGuiItemFlags_SelectableDontClosePopup, true);
|
PushItemFlag(ImGuiItemFlags_AutoClosePopups, false);
|
||||||
for (int other_column_n = 0; other_column_n < table->ColumnsCount; other_column_n++)
|
for (int other_column_n = 0; other_column_n < table->ColumnsCount; other_column_n++)
|
||||||
{
|
{
|
||||||
ImGuiTableColumn* other_column = &table->Columns[other_column_n];
|
ImGuiTableColumn* other_column = &table->Columns[other_column_n];
|
||||||
|
1305
lib/third_party/imgui/imgui/source/imgui_widgets.cpp
vendored
1305
lib/third_party/imgui/imgui/source/imgui_widgets.cpp
vendored
File diff suppressed because it is too large
Load Diff
@ -100,7 +100,7 @@ namespace hex::plugin::builtin {
|
|||||||
displayValue = fileName;
|
displayValue = fileName;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ImGui::Selectable(displayValue.c_str(), index == m_selectedPatternFile, ImGuiSelectableFlags_DontClosePopups))
|
if (ImGui::Selectable(displayValue.c_str(), index == m_selectedPatternFile, ImGuiSelectableFlags_NoAutoClosePopups))
|
||||||
m_selectedPatternFile = index;
|
m_selectedPatternFile = index;
|
||||||
|
|
||||||
if (ImGui::IsItemHovered(ImGuiHoveredFlags_Stationary | ImGuiHoveredFlags_DelayNormal)) {
|
if (ImGui::IsItemHovered(ImGuiHoveredFlags_Stationary | ImGuiHoveredFlags_DelayNormal)) {
|
||||||
|
@ -105,11 +105,11 @@ namespace hex::plugin::builtin {
|
|||||||
// Draw the results
|
// Draw the results
|
||||||
if (ImGui::BeginChild("##results", ImGui::GetContentRegionAvail(), ImGuiChildFlags_NavFlattened, ImGuiWindowFlags_AlwaysVerticalScrollbar)) {
|
if (ImGui::BeginChild("##results", ImGui::GetContentRegionAvail(), ImGuiChildFlags_NavFlattened, ImGuiWindowFlags_AlwaysVerticalScrollbar)) {
|
||||||
for (const auto &[displayResult, matchedCommand, callback] : m_lastResults) {
|
for (const auto &[displayResult, matchedCommand, callback] : m_lastResults) {
|
||||||
ImGui::PushTabStop(true);
|
ImGui::PushItemFlag(ImGuiItemFlags_NoTabStop, false);
|
||||||
ON_SCOPE_EXIT { ImGui::PopTabStop(); };
|
ON_SCOPE_EXIT { ImGui::PopItemFlag(); };
|
||||||
|
|
||||||
// Allow executing a command by clicking on it or selecting it with the keyboard and pressing enter
|
// Allow executing a command by clicking on it or selecting it with the keyboard and pressing enter
|
||||||
if (ImGui::Selectable(displayResult.c_str(), false, ImGuiSelectableFlags_DontClosePopups)) {
|
if (ImGui::Selectable(displayResult.c_str(), false, ImGuiSelectableFlags_NoAutoClosePopups)) {
|
||||||
callback(matchedCommand);
|
callback(matchedCommand);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -574,7 +574,7 @@ namespace hex::plugin::builtin {
|
|||||||
void ViewHexEditor::drawPopup() {
|
void ViewHexEditor::drawPopup() {
|
||||||
bool open = true;
|
bool open = true;
|
||||||
|
|
||||||
ImGui::SetNextWindowPos(ImGui::GetWindowPos() + ImGui::GetWindowContentRegionMin() - ImGui::GetStyle().WindowPadding, ImGuiCond_Once);
|
ImGui::SetNextWindowPos(ImGui::GetCurrentWindowRead()->ContentRegionRect.Min - ImGui::GetStyle().WindowPadding, ImGuiCond_Once);
|
||||||
const auto configuredAlpha = ImGuiExt::GetCustomStyle().PopupWindowAlpha;
|
const auto configuredAlpha = ImGuiExt::GetCustomStyle().PopupWindowAlpha;
|
||||||
bool alphaIsChanged = false;
|
bool alphaIsChanged = false;
|
||||||
if (m_currPopup != nullptr && !m_currentPopupHover && m_currentPopupHasHovered && m_currentPopupDetached && configuredAlpha < 0.99F && configuredAlpha > 0.01F) {
|
if (m_currPopup != nullptr && !m_currentPopupHover && m_currentPopupHasHovered && m_currentPopupDetached && configuredAlpha < 0.99F && configuredAlpha > 0.01F) {
|
||||||
|
@ -66,7 +66,7 @@ namespace hex::plugin::builtin {
|
|||||||
if (category.subCategories.empty())
|
if (category.subCategories.empty())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (ImGui::Selectable(Lang(category.unlocalizedName), m_selectedCategory == &category, ImGuiSelectableFlags_DontClosePopups) || m_selectedCategory == nullptr)
|
if (ImGui::Selectable(Lang(category.unlocalizedName), m_selectedCategory == &category, ImGuiSelectableFlags_NoAutoClosePopups) || m_selectedCategory == nullptr)
|
||||||
m_selectedCategory = &category;
|
m_selectedCategory = &category;
|
||||||
|
|
||||||
if (m_selectedCategory == &category)
|
if (m_selectedCategory == &category)
|
||||||
|
@ -68,7 +68,7 @@ namespace hex::ui {
|
|||||||
ImGui::PushID(&*fileIt);
|
ImGui::PushID(&*fileIt);
|
||||||
|
|
||||||
bool selected = m_selectedFiles.contains(fileIt);
|
bool selected = m_selectedFiles.contains(fileIt);
|
||||||
if (ImGui::Selectable(pathNameString.c_str(), selected, ImGuiSelectableFlags_DontClosePopups)) {
|
if (ImGui::Selectable(pathNameString.c_str(), selected, ImGuiSelectableFlags_NoAutoClosePopups)) {
|
||||||
if (!m_multiple) {
|
if (!m_multiple) {
|
||||||
m_selectedFiles.clear();
|
m_selectedFiles.clear();
|
||||||
m_selectedFiles.insert(fileIt);
|
m_selectedFiles.insert(fileIt);
|
||||||
|
Loading…
Reference in New Issue
Block a user