Skip to content

Commit

Permalink
Merge branch 'docking_inter'
Browse files Browse the repository at this point in the history
  • Loading branch information
sonoro1234 committed May 10, 2024
2 parents d222bc5 + 67cf8c9 commit 481cd32
Show file tree
Hide file tree
Showing 10 changed files with 3,544 additions and 3,220 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ History:
Initially cimgui was developed by Stephan Dilly as hand-written code but lately turned into an auto-generated version by sonoro1234 in order to keep up with imgui more easily (letting the user select the desired branch and commit)

Notes:
* currently this wrapper is based on version [1.90.5 of Dear ImGui with internal api]
* currently this wrapper is based on version [1.90.6 of Dear ImGui with internal api]
* only functions, structs and enums from imgui.h (an optionally imgui_internal.h) are wrapped.
* if you are interested in imgui backends you should look [LuaJIT-ImGui](https://github.com/sonoro1234/LuaJIT-ImGui) project.
* All naming is algorithmic except for those names that were coded in cimgui_overloads table (https://github.com/cimgui/cimgui/blob/master/generator/generator.lua#L60). In the official version this table is empty.
Expand Down
18 changes: 15 additions & 3 deletions cimgui.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//This file is automatically generated by generator.lua from https://github.com/cimgui/cimgui
//based on imgui.h file version "1.90.5" 19050 from Dear ImGui https://github.com/ocornut/imgui
//based on imgui.h file version "1.90.6" 19060 from Dear ImGui https://github.com/ocornut/imgui
//with imgui_internal.h api
#ifdef IMGUI_ENABLE_FREETYPE
#ifndef CIMGUI_FREETYPE
Expand Down Expand Up @@ -2770,6 +2770,10 @@ CIMGUI_API const char* igImTextFindPreviousUtf8Codepoint(const char* in_text_sta
{
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)
{
return ImFileOpen(filename,mode);
Expand Down Expand Up @@ -3718,6 +3722,10 @@ CIMGUI_API void igUpdateWindowParentAndRootLinks(ImGuiWindow* window,ImGuiWindow
{
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)
{
*pOut = ImGui::CalcWindowNextAutoFitSize(window);
Expand Down Expand Up @@ -3806,6 +3814,10 @@ CIMGUI_API ImGuiWindow* igFindBottomMostVisibleWindowWithinBeginStack(ImGuiWindo
{
return ImGui::FindBottomMostVisibleWindowWithinBeginStack(window);
}
CIMGUI_API void igSetNextWindowRefreshPolicy(ImGuiWindowRefreshFlags flags)
{
return ImGui::SetNextWindowRefreshPolicy(flags);
}
CIMGUI_API void igSetCurrentFont(ImFont* font)
{
return ImGui::SetCurrentFont(font);
Expand Down Expand Up @@ -4538,9 +4550,9 @@ CIMGUI_API void igTablePopBackgroundChannel()
{
return ImGui::TablePopBackgroundChannel();
}
CIMGUI_API void igTableAngledHeadersRowEx(float angle,float max_label_width)
CIMGUI_API void igTableAngledHeadersRowEx(ImGuiID row_id,float angle,float max_label_width,const ImGuiTableHeaderData* data,int data_count)
{
return ImGui::TableAngledHeadersRowEx(angle,max_label_width);
return ImGui::TableAngledHeadersRowEx(row_id,angle,max_label_width,data,data_count);
}
CIMGUI_API ImGuiTable* igGetCurrentTable()
{
Expand Down
49 changes: 39 additions & 10 deletions cimgui.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//This file is automatically generated by generator.lua from https://github.com/cimgui/cimgui
//based on imgui.h file version "1.90.5" 19050 from Dear ImGui https://github.com/ocornut/imgui
//based on imgui.h file version "1.90.6" 19060 from Dear ImGui https://github.com/ocornut/imgui
//with imgui_internal.h api
#ifndef CIMGUI_INCLUDED
#define CIMGUI_INCLUDED
Expand Down Expand Up @@ -97,6 +97,7 @@ typedef struct ImGuiStyleMod ImGuiStyleMod;
typedef struct ImGuiTabBar ImGuiTabBar;
typedef struct ImGuiTabItem ImGuiTabItem;
typedef struct ImGuiTable ImGuiTable;
typedef struct ImGuiTableHeaderData ImGuiTableHeaderData;
typedef struct ImGuiTableColumn ImGuiTableColumn;
typedef struct ImGuiTableInstanceData ImGuiTableInstanceData;
typedef struct ImGuiTableTempData ImGuiTableTempData;
Expand Down Expand Up @@ -280,8 +281,9 @@ typedef enum {
ImGuiTreeNodeFlags_FramePadding = 1 << 10,
ImGuiTreeNodeFlags_SpanAvailWidth = 1 << 11,
ImGuiTreeNodeFlags_SpanFullWidth = 1 << 12,
ImGuiTreeNodeFlags_SpanAllColumns = 1 << 13,
ImGuiTreeNodeFlags_NavLeftJumpsBackHere = 1 << 14,
ImGuiTreeNodeFlags_SpanTextWidth = 1 << 13,
ImGuiTreeNodeFlags_SpanAllColumns = 1 << 14,
ImGuiTreeNodeFlags_NavLeftJumpsBackHere = 1 << 15,
ImGuiTreeNodeFlags_CollapsingHeader = ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoTreePushOnOpen | ImGuiTreeNodeFlags_NoAutoOpenOnLog,
}ImGuiTreeNodeFlags_;
typedef enum {
Expand Down Expand Up @@ -683,6 +685,7 @@ typedef enum {
ImGuiStyleVar_TabBorderSize,
ImGuiStyleVar_TabBarBorderSize,
ImGuiStyleVar_TableAngledHeadersAngle,
ImGuiStyleVar_TableAngledHeadersTextAlign,
ImGuiStyleVar_ButtonTextAlign,
ImGuiStyleVar_SelectableTextAlign,
ImGuiStyleVar_SeparatorTextBorderSize,
Expand Down Expand Up @@ -894,6 +897,7 @@ struct ImGuiStyle
float TabMinWidthForCloseButton;
float TabBarBorderSize;
float TableAngledHeadersAngle;
ImVec2 TableAngledHeadersTextAlign;
ImGuiDir ColorButtonPosition;
ImVec2 ButtonTextAlign;
ImVec2 SelectableTextAlign;
Expand Down Expand Up @@ -1170,12 +1174,12 @@ typedef enum {
}ImDrawListFlags_;
typedef struct ImVector_ImDrawVert {int Size;int Capacity;ImDrawVert* Data;} ImVector_ImDrawVert;

typedef struct ImVector_ImVec2 {int Size;int Capacity;ImVec2* Data;} ImVector_ImVec2;

typedef struct ImVector_ImVec4 {int Size;int Capacity;ImVec4* Data;} ImVector_ImVec4;

typedef struct ImVector_ImTextureID {int Size;int Capacity;ImTextureID* Data;} ImVector_ImTextureID;

typedef struct ImVector_ImVec2 {int Size;int Capacity;ImVec2* Data;} ImVector_ImVec2;

struct ImDrawList
{
ImVector_ImDrawCmd CmdBuffer;
Expand All @@ -1184,15 +1188,15 @@ struct ImDrawList
ImDrawListFlags Flags;
unsigned int _VtxCurrentIdx;
ImDrawListSharedData* _Data;
const char* _OwnerName;
ImDrawVert* _VtxWritePtr;
ImDrawIdx* _IdxWritePtr;
ImVector_ImVec4 _ClipRectStack;
ImVector_ImTextureID _TextureIdStack;
ImVector_ImVec2 _Path;
ImDrawCmdHeader _CmdHeader;
ImDrawListSplitter _Splitter;
ImVector_ImVec4 _ClipRectStack;
ImVector_ImTextureID _TextureIdStack;
float _FringeScale;
const char* _OwnerName;
};
typedef struct ImVector_ImDrawListPtr {int Size;int Capacity;ImDrawList** Data;} ImVector_ImDrawListPtr;

Expand Down Expand Up @@ -1370,6 +1374,7 @@ struct ImGuiStyleMod;
struct ImGuiTabBar;
struct ImGuiTabItem;
struct ImGuiTable;
struct ImGuiTableHeaderData;
struct ImGuiTableColumn;
struct ImGuiTableInstanceData;
struct ImGuiTableTempData;
Expand Down Expand Up @@ -1397,6 +1402,7 @@ typedef int ImGuiSeparatorFlags;
typedef int ImGuiTextFlags;
typedef int ImGuiTooltipFlags;
typedef int ImGuiTypingSelectFlags;
typedef int ImGuiWindowRefreshFlags;
typedef void (*ImGuiErrorLogCallback)(void* user_data, const char* fmt, ...);
extern ImGuiContext* GImGui;
typedef struct StbUndoRecord StbUndoRecord;
Expand Down Expand Up @@ -1683,6 +1689,12 @@ struct ImGuiInputTextState
int ReloadSelectionStart;
int ReloadSelectionEnd;
};
typedef enum {
ImGuiWindowRefreshFlags_None = 0,
ImGuiWindowRefreshFlags_TryToAvoidRefresh = 1 << 0,
ImGuiWindowRefreshFlags_RefreshOnHover = 1 << 1,
ImGuiWindowRefreshFlags_RefreshOnFocus = 1 << 2,
}ImGuiWindowRefreshFlags_;
typedef enum {
ImGuiNextWindowDataFlags_None = 0,
ImGuiNextWindowDataFlags_HasPos = 1 << 0,
Expand All @@ -1694,6 +1706,7 @@ typedef enum {
ImGuiNextWindowDataFlags_HasBgAlpha = 1 << 6,
ImGuiNextWindowDataFlags_HasScroll = 1 << 7,
ImGuiNextWindowDataFlags_HasChildFlags = 1 << 8,
ImGuiNextWindowDataFlags_HasRefreshPolicy = 1 << 9,
}ImGuiNextWindowDataFlags_;
struct ImGuiNextWindowData
{
Expand All @@ -1713,6 +1726,7 @@ struct ImGuiNextWindowData
void* SizeCallbackUserData;
float BgAlphaVal;
ImVec2 MenuBarOffsetMinVal;
ImGuiWindowRefreshFlags RefreshFlagsVal;
};
typedef ImS64 ImGuiSelectionUserData;
typedef enum {
Expand Down Expand Up @@ -2017,10 +2031,10 @@ struct ImGuiNavItemData
ImGuiID FocusScopeId;
ImRect RectRel;
ImGuiItemFlags InFlags;
ImGuiSelectionUserData SelectionUserData;
float DistBox;
float DistCenter;
float DistAxial;
ImGuiSelectionUserData SelectionUserData;
};
typedef struct ImGuiFocusScopeData ImGuiFocusScopeData;
struct ImGuiFocusScopeData
Expand Down Expand Up @@ -2613,6 +2627,7 @@ struct ImGuiWindow
bool Collapsed;
bool WantCollapseToggle;
bool SkipItems;
bool SkipRefresh;
bool Appearing;
bool Hidden;
bool IsFallbackWindow;
Expand Down Expand Up @@ -2789,6 +2804,13 @@ struct ImGuiTableCellData
ImU32 BgColor;
ImGuiTableColumnIdx Column;
};
struct ImGuiTableHeaderData
{
ImGuiTableColumnIdx Index;
ImU32 TextColor;
ImU32 BgColor0;
ImU32 BgColor1;
};
struct ImGuiTableInstanceData
{
ImGuiID TableInstanceID;
Expand Down Expand Up @@ -2923,11 +2945,14 @@ struct ImGuiTable
bool MemoryCompacted;
bool HostSkipItems;
};
typedef struct ImVector_ImGuiTableHeaderData {int Size;int Capacity;ImGuiTableHeaderData* Data;} ImVector_ImGuiTableHeaderData;

struct ImGuiTableTempData
{
int TableIndex;
float LastTimeActive;
float AngledHeadersExtraWidth;
ImVector_ImGuiTableHeaderData AngledHeadersRequests;
ImVec2 UserOuterSize;
ImDrawListSplitter DrawSplitter;
ImRect HostBackupWorkRect;
Expand Down Expand Up @@ -3017,6 +3042,7 @@ typedef ImVector<ImGuiStoragePair> ImVector_ImGuiStoragePair;
typedef ImVector<ImGuiStyleMod> ImVector_ImGuiStyleMod;
typedef ImVector<ImGuiTabItem> ImVector_ImGuiTabItem;
typedef ImVector<ImGuiTableColumnSortSpecs> ImVector_ImGuiTableColumnSortSpecs;
typedef ImVector<ImGuiTableHeaderData> ImVector_ImGuiTableHeaderData;
typedef ImVector<ImGuiTableInstanceData> ImVector_ImGuiTableInstanceData;
typedef ImVector<ImGuiTableTempData> ImVector_ImGuiTableTempData;
typedef ImVector<ImGuiTextRange> ImVector_ImGuiTextRange;
Expand Down Expand Up @@ -3709,6 +3735,7 @@ CIMGUI_API int igImTextCountCharsFromUtf8(const char* in_text,const char* in_tex
CIMGUI_API int igImTextCountUtf8BytesFromChar(const char* in_text,const char* in_text_end);
CIMGUI_API int igImTextCountUtf8BytesFromStr(const ImWchar* in_text,const ImWchar* in_text_end);
CIMGUI_API const char* igImTextFindPreviousUtf8Codepoint(const char* in_text_start,const char* in_text_curr);
CIMGUI_API int igImTextCountLines(const char* in_text,const char* in_text_end);
CIMGUI_API ImFileHandle igImFileOpen(const char* filename,const char* mode);
CIMGUI_API bool igImFileClose(ImFileHandle file);
CIMGUI_API ImU64 igImFileGetSize(ImFileHandle file);
Expand Down Expand Up @@ -3946,6 +3973,7 @@ CIMGUI_API ImGuiWindow* igGetCurrentWindow(void);
CIMGUI_API ImGuiWindow* igFindWindowByID(ImGuiID id);
CIMGUI_API ImGuiWindow* igFindWindowByName(const char* name);
CIMGUI_API void igUpdateWindowParentAndRootLinks(ImGuiWindow* window,ImGuiWindowFlags flags,ImGuiWindow* parent_window);
CIMGUI_API void igUpdateWindowSkipRefresh(ImGuiWindow* window);
CIMGUI_API void igCalcWindowNextAutoFitSize(ImVec2 *pOut,ImGuiWindow* window);
CIMGUI_API bool igIsWindowChildOf(ImGuiWindow* window,ImGuiWindow* potential_parent,bool popup_hierarchy);
CIMGUI_API bool igIsWindowWithinBeginStackOf(ImGuiWindow* window,ImGuiWindow* potential_parent);
Expand All @@ -3968,6 +3996,7 @@ CIMGUI_API void igBringWindowToDisplayBack(ImGuiWindow* window);
CIMGUI_API void igBringWindowToDisplayBehind(ImGuiWindow* window,ImGuiWindow* above_window);
CIMGUI_API int igFindWindowDisplayIndex(ImGuiWindow* window);
CIMGUI_API ImGuiWindow* igFindBottomMostVisibleWindowWithinBeginStack(ImGuiWindow* window);
CIMGUI_API void igSetNextWindowRefreshPolicy(ImGuiWindowRefreshFlags flags);
CIMGUI_API void igSetCurrentFont(ImFont* font);
CIMGUI_API ImFont* igGetDefaultFont(void);
CIMGUI_API ImDrawList* igGetForegroundDrawList_WindowPtr(ImGuiWindow* window);
Expand Down Expand Up @@ -4151,7 +4180,7 @@ CIMGUI_API float igTableGetHeaderRowHeight(void);
CIMGUI_API float igTableGetHeaderAngledMaxLabelWidth(void);
CIMGUI_API void igTablePushBackgroundChannel(void);
CIMGUI_API void igTablePopBackgroundChannel(void);
CIMGUI_API void igTableAngledHeadersRowEx(float angle,float max_label_width);
CIMGUI_API void igTableAngledHeadersRowEx(ImGuiID row_id,float angle,float max_label_width,const ImGuiTableHeaderData* data,int data_count);
CIMGUI_API ImGuiTable* igGetCurrentTable(void);
CIMGUI_API ImGuiTable* igTableFindByID(ImGuiID id);
CIMGUI_API bool igBeginTableEx(const char* name,ImGuiID id,int columns_count,ImGuiTableFlags flags,const ImVec2 outer_size,float inner_width);
Expand Down
Loading

0 comments on commit 481cd32

Please sign in to comment.