Skip to content

Commit d2a2dcf

Browse files
committed
Updated to Dear ImGui 1.92.2b and added ImPlot3D
1 parent 0b263b5 commit d2a2dcf

File tree

301 files changed

+128596
-8586
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

301 files changed

+128596
-8586
lines changed

Examples/AotStaticLinkExample/Program.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using Hexa.NET.ImGui.Backends.GLFW;
55
using Hexa.NET.ImGui.Backends.OpenGL3;
66
using Hexa.NET.OpenGL;
7+
using HexaGen.Runtime;
78
using System.Runtime.CompilerServices;
89
using GLFWwindowPtr = Hexa.NET.GLFW.GLFWwindowPtr;
910

Generator/Generator.csproj

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,24 @@
8888
<None Update="backends\include\cimgui_impl_win32.h">
8989
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
9090
</None>
91+
<None Update="cimplot3d\cimgui.h">
92+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
93+
</None>
94+
<None Update="cimplot3d\cimplot3d.h">
95+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
96+
</None>
97+
<None Update="cimplot3d\definitions.json">
98+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
99+
</None>
100+
<None Update="cimplot3d\generator.json">
101+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
102+
</None>
103+
<None Update="cimplot3d\structs_and_enums.json">
104+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
105+
</None>
106+
<None Update="cimplot3d\typedefs_dict.json">
107+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
108+
</None>
91109
<None Update="config.backends.base.json">
92110
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
93111
</None>

Generator/Program.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
.AddImPlot()
99
.AddImNodes()
1010
.AddImGuizmo()
11+
.AddImPlot3D()
1112
.AddImGuiBackends()
1213
.AddImGuiNodeEditor(false);
1314

Generator/Targets/ImGuiAddonTarget.cs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,17 @@ public static class ImGuiAddonTargetExtensions
2020
private const string CImGuizmoConfig = "cimguizmo/generator.json";
2121
private const string CImNodesConfig = "cimnodes/generator.json";
2222
private const string CImPlotConfig = "cimplot/generator.json";
23+
private const string CImPlot3DConfig = "cimplot3d/generator.json";
2324

2425
private const string CImGuizmoHeader = "cimguizmo/cimguizmo.h";
2526
private const string CImNodesHeader = "cimnodes/cimnodes.h";
2627
private const string CImPlotHeader = "cimplot/cimplot.h";
28+
private const string CImPlot3DHeader = "cimplot3d/cimplot3d.h";
2729

2830
private const string ImGuizmoOutputPath = "../../../../Hexa.NET.ImGuizmo/Generated";
2931
private const string ImNodesOutputPath = "../../../../Hexa.NET.ImNodes/Generated";
3032
private const string ImPlotOutputPath = "../../../../Hexa.NET.ImPlot/Generated";
33+
private const string ImPlot3DOutputPath = "../../../../Hexa.NET.ImPlot3D/Generated";
3134

3235
public static BuildSystemBuilder AddImGuizmo(this BuildSystemBuilder builder, string configPath = CImGuizmoConfig, string outputPath = ImGuizmoOutputPath)
3336
{
@@ -64,6 +67,18 @@ public static BuildSystemBuilder AddImPlot(this BuildSystemBuilder builder, stri
6467
});
6568
return builder;
6669
}
70+
71+
public static BuildSystemBuilder AddImPlot3D(this BuildSystemBuilder builder, string configPath = CImPlot3DConfig, string outputPath = ImPlot3DOutputPath)
72+
{
73+
builder.AddTarget<ImPlot3DTarget, ImPlot3DTargetOptions>(options =>
74+
{
75+
options.Name = "implot3d";
76+
options.Headers = [CImPlot3DHeader];
77+
options.ConfigPath = configPath;
78+
options.OutputPath = outputPath;
79+
});
80+
return builder;
81+
}
6782
}
6883

6984
public class ImPlotTarget(IOptions<ImPlotTargetOptions> options) : ImGuiAddonTarget(options)
@@ -75,6 +90,9 @@ public class ImNodesTarget(IOptions<ImNodesTargetOptions> options) : ImGuiAddonT
7590
public class ImGuizmoTarget(IOptions<ImGuizmoTargetOptions> options) : ImGuiAddonTarget(options)
7691
{ }
7792

93+
public class ImPlot3DTarget(IOptions<ImPlot3DTargetOptions> options) : ImGuiAddonTarget(options)
94+
{ }
95+
7896
public class ImPlotTargetOptions() : ImGuiAddonTargetOptions()
7997
{ }
8098

@@ -85,6 +103,9 @@ public class ImGuizmoTargetOptions() : ImGuiAddonTargetOptions()
85103

86104
{ }
87105

106+
public class ImPlot3DTargetOptions() : ImGuiAddonTargetOptions()
107+
{ }
108+
88109
public class ImGuiAddonTarget : ImGuiBaseTarget
89110
{
90111
private readonly List<string> headers;

Generator/Targets/ImGuiTarget.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ public override void Execute(BuildContext context)
2626
{
2727
// don't worry about "NoInternals" internals will be generated in a substep (post-patch) when generating. see ImGuiPostPatch.cs
2828
Generate([CImGuiHeader], CImGuiConfig, ImGuiOutputPath, null, out var metadata, InternalsGenerationType.NoInternals);
29+
metadata.CppDefinedFunctions.Remove("igSetAllocatorFunctions");
30+
metadata.CppDefinedFunctions.Remove("igGetAllocatorFunctions");
31+
metadata.DefinedFunctions.RemoveAll(x => x.Name == "SetAllocatorFunctions" || x.Name == "GetAllocatorFunctions");
2932
context.SetVar(ImGuiMetadataKey, metadata);
3033
}
3134
}

Generator/cimgui/cimgui.h

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//This file is automatically generated by generator.lua from https://github.com/cimgui/cimgui
2-
//based on imgui.h file version "1.92.1" 19210 from Dear ImGui https://github.com/ocornut/imgui
2+
//based on imgui.h file version "1.92.2b" 19222 from Dear ImGui https://github.com/ocornut/imgui
33
//with imgui_internal.h api
44
//with imgui_freetype.h api
55
//docking branch
@@ -434,10 +434,15 @@ typedef enum {
434434
ImGuiTabBarFlags_NoTabListScrollingButtons = 1 << 4,
435435
ImGuiTabBarFlags_NoTooltip = 1 << 5,
436436
ImGuiTabBarFlags_DrawSelectedOverline = 1 << 6,
437-
ImGuiTabBarFlags_FittingPolicyResizeDown = 1 << 7,
438-
ImGuiTabBarFlags_FittingPolicyScroll = 1 << 8,
439-
ImGuiTabBarFlags_FittingPolicyMask_ = ImGuiTabBarFlags_FittingPolicyResizeDown | ImGuiTabBarFlags_FittingPolicyScroll,
440-
ImGuiTabBarFlags_FittingPolicyDefault_ = ImGuiTabBarFlags_FittingPolicyResizeDown,
437+
ImGuiTabBarFlags_FittingPolicyMixed = 1 << 7,
438+
ImGuiTabBarFlags_FittingPolicyShrink = 1 << 8,
439+
ImGuiTabBarFlags_FittingPolicyScroll = 1 << 9,
440+
ImGuiTabBarFlags_FittingPolicyMask_ = ImGuiTabBarFlags_FittingPolicyMixed | ImGuiTabBarFlags_FittingPolicyShrink | ImGuiTabBarFlags_FittingPolicyScroll,
441+
ImGuiTabBarFlags_FittingPolicyDefault_ = ImGuiTabBarFlags_FittingPolicyMixed,
442+
443+
444+
445+
441446
}ImGuiTabBarFlags_;
442447
typedef enum {
443448
ImGuiTabItemFlags_None = 0,
@@ -851,6 +856,8 @@ typedef enum {
851856
ImGuiStyleVar_ImageBorderSize,
852857
ImGuiStyleVar_TabRounding,
853858
ImGuiStyleVar_TabBorderSize,
859+
ImGuiStyleVar_TabMinWidthBase,
860+
ImGuiStyleVar_TabMinWidthShrink,
854861
ImGuiStyleVar_TabBarBorderSize,
855862
ImGuiStyleVar_TabBarOverlineSize,
856863
ImGuiStyleVar_TableAngledHeadersAngle,
@@ -1078,6 +1085,8 @@ struct ImGuiStyle
10781085
float ImageBorderSize;
10791086
float TabRounding;
10801087
float TabBorderSize;
1088+
float TabMinWidthBase;
1089+
float TabMinWidthShrink;
10811090
float TabCloseButtonMinWidthSelected;
10821091
float TabCloseButtonMinWidthUnselected;
10831092
float TabBarBorderSize;
@@ -1148,6 +1157,7 @@ struct ImGuiIO
11481157
bool ConfigViewportsNoTaskBarIcon;
11491158
bool ConfigViewportsNoDecoration;
11501159
bool ConfigViewportsNoDefaultParent;
1160+
bool ConfigViewportPlatformFocusSetsImGuiFocus;
11511161
bool ConfigDpiScaleFonts;
11521162
bool ConfigDpiScaleViewports;
11531163
bool MouseDrawCursor;
@@ -1647,7 +1657,8 @@ struct ImFontBaked
16471657
float Ascent, Descent;
16481658
unsigned int MetricsTotalSurface:26;
16491659
unsigned int WantDestroy:1;
1650-
unsigned int LockLoadingFallback:1;
1660+
unsigned int LoadNoFallback:1;
1661+
unsigned int LoadNoRenderOnLayout:1;
16511662
int LastUsedFrame;
16521663
ImGuiID BakedId;
16531664
ImFont* ContainerFont;
@@ -2307,11 +2318,11 @@ typedef enum {
23072318
ImGuiInputEventType_COUNT
23082319
}ImGuiInputEventType;
23092320
typedef enum {
2310-
ImGuiInputSource_None = 0,
2311-
ImGuiInputSource_Mouse,
2312-
ImGuiInputSource_Keyboard,
2313-
ImGuiInputSource_Gamepad,
2314-
ImGuiInputSource_COUNT
2321+
ImGuiInputSource_None=0,
2322+
ImGuiInputSource_Mouse=1,
2323+
ImGuiInputSource_Keyboard=2,
2324+
ImGuiInputSource_Gamepad=3,
2325+
ImGuiInputSource_COUNT=4,
23152326
}ImGuiInputSource;
23162327
typedef struct ImGuiInputEventMousePos ImGuiInputEventMousePos;
23172328
struct ImGuiInputEventMousePos
@@ -3008,6 +3019,7 @@ struct ImGuiContext
30083019
bool ActiveIdHasBeenEditedBefore;
30093020
bool ActiveIdHasBeenEditedThisFrame;
30103021
bool ActiveIdFromShortcut;
3022+
ImGuiID ActiveIdDisabledId;
30113023
int ActiveIdMouseButton : 8;
30123024
ImVec2 ActiveIdClickOffset;
30133025
ImGuiWindow* ActiveIdWindow;
@@ -3461,6 +3473,7 @@ struct ImGuiTabBar
34613473
int CurrFrameVisible;
34623474
int PrevFrameVisible;
34633475
ImRect BarRect;
3476+
float BarRectPrevWidth;
34643477
float CurrTabsContentsHeight;
34653478
float PrevTabsContentsHeight;
34663479
float WidthAllTabs;
@@ -3479,6 +3492,7 @@ struct ImGuiTabBar
34793492
bool WantLayout;
34803493
bool VisibleTabWasSubmitted;
34813494
bool TabsAddedNew;
3495+
bool ScrollButtonEnabled;
34823496
ImS16 TabsActiveCount;
34833497
ImS16 LastTabItemIdx;
34843498
float ItemSpacingY;
@@ -4668,7 +4682,7 @@ CIMGUI_API const char* igImParseFormatTrimDecorations(const char* format,char* b
46684682
CIMGUI_API void igImParseFormatSanitizeForPrinting(const char* fmt_in,char* fmt_out,size_t fmt_out_size);
46694683
CIMGUI_API const char* igImParseFormatSanitizeForScanning(const char* fmt_in,char* fmt_out,size_t fmt_out_size);
46704684
CIMGUI_API int igImParseFormatPrecision(const char* format,int default_value);
4671-
CIMGUI_API const char* igImTextCharToUtf8(char out_buf[5],unsigned int c);
4685+
CIMGUI_API int igImTextCharToUtf8(char out_buf[5],unsigned int c);
46724686
CIMGUI_API int igImTextStrToUtf8(char* out_buf,int out_buf_size,const ImWchar* in_text,const ImWchar* in_text_end);
46734687
CIMGUI_API int igImTextCharFromUtf8(unsigned int* out_char,const char* in_text,const char* in_text_end);
46744688
CIMGUI_API int igImTextStrFromUtf8(ImWchar* out_buf,int out_buf_size,const char* in_text,const char* in_text_end,const char** in_remaining);
@@ -4989,6 +5003,7 @@ CIMGUI_API void igUpdateHoveredWindowAndCaptureFlags(const ImVec2 mouse_pos);
49895003
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);
49905004
CIMGUI_API void igStartMouseMovingWindow(ImGuiWindow* window);
49915005
CIMGUI_API void igStartMouseMovingWindowOrNode(ImGuiWindow* window,ImGuiDockNode* node,bool undock);
5006+
CIMGUI_API void igStopMouseMovingWindow(void);
49925007
CIMGUI_API void igUpdateMouseMovingWindowNewFrame(void);
49935008
CIMGUI_API void igUpdateMouseMovingWindowEndFrame(void);
49945009
CIMGUI_API ImGuiID igAddContextHook(ImGuiContext* context,const ImGuiContextHook* hook);
@@ -5045,7 +5060,7 @@ CIMGUI_API void igSetLastItemData(ImGuiID item_id,ImGuiItemFlags item_flags,ImGu
50455060
CIMGUI_API void igCalcItemSize(ImVec2 *pOut,ImVec2 size,float default_w,float default_h);
50465061
CIMGUI_API float igCalcWrapWidthForPos(const ImVec2 pos,float wrap_pos_x);
50475062
CIMGUI_API void igPushMultiItemsWidths(int components,float width_full);
5048-
CIMGUI_API void igShrinkWidths(ImGuiShrinkWidthItem* items,int count,float width_excess);
5063+
CIMGUI_API void igShrinkWidths(ImGuiShrinkWidthItem* items,int count,float width_excess,float width_min);
50495064
CIMGUI_API const ImGuiStyleVarInfo* igGetStyleVarInfo(ImGuiStyleVar idx);
50505065
CIMGUI_API void igBeginDisabledOverrideReenable(void);
50515066
CIMGUI_API void igEndDisabledOverrideReenable(void);

0 commit comments

Comments
 (0)