From 851df218da9a001dadba9a0c2fbfc5ded439f8f8 Mon Sep 17 00:00:00 2001 From: sonoro1234 Date: Fri, 27 Apr 2018 17:50:27 +0200 Subject: [PATCH] generator using tabs in structs --- cimgui/gen_imgui_structs.lua | 250 +++++++++---------- cimgui/imgui_structs.h | 448 +++++++++++++++++------------------ 2 files changed, 349 insertions(+), 349 deletions(-) diff --git a/cimgui/gen_imgui_structs.lua b/cimgui/gen_imgui_structs.lua index 3a9c044..03c4463 100644 --- a/cimgui/gen_imgui_structs.lua +++ b/cimgui/gen_imgui_structs.lua @@ -1,7 +1,7 @@ --script for imgui_structs.h generation function strip(cad) - return cad:gsub("^%s*(.-)%s*$","%1") + return cad:gsub("^%s*(.-)%s*$","%1") end @@ -22,63 +22,49 @@ local in_function = false for line in io.lines() do repeat -- simulate continue with break - --print(line) - line = strip(line) - if #line == 0 then break end - -- Is this a preprocessor statement? - if line:sub(1,1) == "#" then - -- Is this a location pragma? - local location_match = line:match(location_re) - if location_match then - --print("location_match",line) - -- If we are transitioning to a header we need to parse, set the flag - local cimpath_match,aaa = location_match:match(cimpath_re) - in_imgui = (cimpath_match ~= nil) - --if in_gl then print(aaa) end - break - end - - - elseif in_imgui then - --[[ - -- Windows likes to add __stdcall__ to everything, but it isn't needed and is actually harmful when using under linux. - -- However, it is needed for callbacks in windows. - --if line:find("typedef") >= 0 and line.find(" PFNGL") < 0: - if line:find("typedef") and not line:find(" PFNGL") then - --line = line:gsub("__attribute__%(%(__stdcall__%)%) ", 'WINDOWS_STDCALL ') - line = line:gsub('GL_APIENTRY ' , 'WINDOWS_STDCALL ') - else - --line = line:gsub("__attribute__%(%(__stdcall__%)%) ", '') - line = line:gsub('GL_APIENTRY ', '') - end - -- While linux likes to add __attribute__((visibility("default"))) - line = line:gsub('__attribute__%(%(visibility%("default"%)%)%) ', '') - line = line:gsub("__attribute__%(%(__stdcall__%)%) ", '') - --]] - if in_function then - if line:match(function_closing_re) then - in_function = false - end - break - end - if line:match(function_re) and not line:match("typedef.*%b().*%b().*") then - --if not line:match("typedef.*%b().*%b().*") then --functypedef - if not line:match(function_closed_re) then - in_function = true - end - --end - elseif line:match("template") then - --nothing - elseif line:match("public") then - --nothing - else - --line = line:gsub("class","struct") - --line = line:gsub("mutable","") - line = line:gsub("%S+",{class="struct",mutable=""}) - line = line:gsub("(%b<>)","/%*%1%*/") --comment template parameters - table.insert(cdefs,line) - end - end + --print(line) + line = strip(line) + if #line == 0 then break end + -- Is this a preprocessor statement? + if line:sub(1,1) == "#" then + -- Is this a location pragma? + local location_match = line:match(location_re) + if location_match then + --print("location_match",line) + -- If we are transitioning to a header we need to parse, set the flag + local cimpath_match,aaa = location_match:match(cimpath_re) + in_imgui = (cimpath_match ~= nil) + --if in_gl then print(aaa) end + break + end + + + elseif in_imgui then + --if in_function discard + if in_function then + if line:match(function_closing_re) then + in_function = false + end + break + end + + if line:match(function_re) and not line:match("typedef.*%b().*%b().*") then + -- function and functypedef + if not line:match(function_closed_re) then + in_function = true + end + elseif line:match("template") then + --nothing + elseif line:match("public") then + --nothing + else + --line = line:gsub("class","struct") + --line = line:gsub("mutable","") + line = line:gsub("%S+",{class="struct",mutable=""}) + line = line:gsub("(%b<>)","/%*%1%*/") --comment template parameters + table.insert(cdefs,line) + end + end until true end @@ -92,76 +78,90 @@ local struct_op_close_re = "%b{}" local structnames = {} local innerstructs = {} -- Output the file - print("#ifndef IMGUI_STRUCTS_INCLUDED") - print("#define IMGUI_STRUCTS_INCLUDED") - print("/////////////// BEGIN AUTOGENERATED SEGMENT") - for i,line in ipairs(cdefs) do - repeat -- simulating continue with break - - if line:match(namespace_re) then - in_namespace = true - end - structnames[#structnames + 1] = line:match(struct_re) - - if in_namespace then - if line:match(function_closing_re) then - --io.write( line,"\n") - in_namespace = false - end - break -- dont write anything inside - end - - if structnames[#structnames] == "ImVector" then - if line:match(struct_closing_re) then - io.write[[struct ImVector + print("/////////////// BEGIN AUTOGENERATED SEGMENT") + print("#ifndef IMGUI_STRUCTS_INCLUDED") + print("#define IMGUI_STRUCTS_INCLUDED") + + for i,line in ipairs(cdefs) do + repeat -- simulating continue with break + + if line:match(namespace_re) then + in_namespace = true + end + local structbegin = line:match(struct_re) + if structbegin then + structnames[#structnames + 1] = structbegin + if #structnames < 2 and structbegin~= "ImVector" then --not inner and not ImVector + io.write(line,"\n") + break + end + end + + if structnames[#structnames] == "ImVector" then + if line:match(struct_closing_re) then + io.write[[struct ImVector { -int Size; -int Capacity; -void* Data; + int Size; + int Capacity; + void* Data; }; typedef struct ImVector ImVector;]] - structnames[#structnames] = nil - end - break -- dont write - end - - if #structnames < 2 then -- not inner - if (#structnames > 0) and line:match("typedef") then --dont allow inner typedefs - break - end - io.write( line,"\n") - local struct_closed_name = line:match(struct_closed_re) - if struct_closed_name then - io.write("typedef struct ",struct_closed_name," ",struct_closed_name,";\n") - end - end + structnames[#structnames] = nil + end + break -- dont write + end + + if in_namespace then + if line:match(function_closing_re) then + --io.write( line,"\n") + in_namespace = false + end + break -- dont write anything inside + end + + if #structnames < 2 then -- not inner + if (#structnames > 0) then + if line:match("typedef") then --dont allow inner typedefs + break + elseif not line:match("^{$") and not line:match(struct_closing_re) then --avoid tab { and }; + line = " "..line + end + end + io.write( line,"\n") + local struct_closed_name = line:match(struct_closed_re) + if struct_closed_name then + io.write("typedef struct ",struct_closed_name," ",struct_closed_name,";\n") + end + end - --if structnames[#structnames] then - if #structnames > 0 then - if #structnames > 1 then --inner - innerstructs[structnames[#structnames]] = innerstructs[structnames[#structnames]] or {} - local st = innerstructs[structnames[#structnames]] - st[#st + 1] = line - if line:match(struct_closing_re) and not line:match(struct_op_close_re) then - local structname = structnames[#structnames] - st[#st + 1] = string.format("typedef struct %s %s;\n",structname,structname) - structnames[#structnames] = nil - end - elseif line:match(struct_closing_re) and not line:match(struct_op_close_re) then - local structname = structnames[#structnames] - io.write("typedef struct ",structname," ",structname,";\n") - structnames[#structnames] = nil - end - end - + if #structnames > 0 then + if #structnames > 1 then --inner structs + innerstructs[structnames[#structnames]] = innerstructs[structnames[#structnames]] or {} + local st = innerstructs[structnames[#structnames]] + if not line:match("struct") and not line:match("^{$") and not line:match(struct_closing_re) then --avoid tab in struct { and }; + line = " "..line + end + st[#st + 1] = line + if line:match(struct_closing_re) and not line:match(struct_op_close_re) then + local structname = structnames[#structnames] + st[#st + 1] = string.format("typedef struct %s %s;\n",structname,structname) + structnames[#structnames] = nil + end + elseif line:match(struct_closing_re) and not line:match(struct_op_close_re) then + local structname = structnames[#structnames] + io.write("typedef struct ",structname," ",structname,";\n") + structnames[#structnames] = nil + end + end + - until true - end - for k,v in pairs(innerstructs) do - for i,line in ipairs(v) do - print(line) - end - end + until true + end + for k,v in pairs(innerstructs) do + for i,line in ipairs(v) do + print(line) + end + end + print("#endif //IMGUI_STRUCTS_INCLUDED") + print("//////////////// END AUTOGENERATED SEGMENT ") - print("//////////////// END AUTOGENERATED SEGMENT ") - print("#endif //IMGUI_STRUCTS_INCLUDED") diff --git a/cimgui/imgui_structs.h b/cimgui/imgui_structs.h index 0191209..566c138 100644 --- a/cimgui/imgui_structs.h +++ b/cimgui/imgui_structs.h @@ -1,6 +1,6 @@ +/////////////// BEGIN AUTOGENERATED SEGMENT #ifndef IMGUI_STRUCTS_INCLUDED #define IMGUI_STRUCTS_INCLUDED -/////////////// BEGIN AUTOGENERATED SEGMENT struct ImDrawChannel; typedef struct ImDrawChannel ImDrawChannel; struct ImDrawCmd; @@ -74,12 +74,12 @@ typedef void (*ImGuiSizeCallback)(ImGuiSizeCallbackData* data); typedef unsigned long long ImU64; struct ImVec2 { -float x, y; + float x, y; }; typedef struct ImVec2 ImVec2; struct ImVec4 { -float x, y, z, w; + float x, y, z, w; }; typedef struct ImVec4 ImVec4; enum ImGuiWindowFlags_ @@ -396,205 +396,205 @@ ImGuiCond_Appearing = 1 << 3 }; struct ImGuiStyle { -float Alpha; -ImVec2 WindowPadding; -float WindowRounding; -float WindowBorderSize; -ImVec2 WindowMinSize; -ImVec2 WindowTitleAlign; -float ChildRounding; -float ChildBorderSize; -float PopupRounding; -float PopupBorderSize; -ImVec2 FramePadding; -float FrameRounding; -float FrameBorderSize; -ImVec2 ItemSpacing; -ImVec2 ItemInnerSpacing; -ImVec2 TouchExtraPadding; -float IndentSpacing; -float ColumnsMinSpacing; -float ScrollbarSize; -float ScrollbarRounding; -float GrabMinSize; -float GrabRounding; -ImVec2 ButtonTextAlign; -ImVec2 DisplayWindowPadding; -ImVec2 DisplaySafeAreaPadding; -float MouseCursorScale; -bool AntiAliasedLines; -bool AntiAliasedFill; -float CurveTessellationTol; -ImVec4 Colors[ImGuiCol_COUNT]; + float Alpha; + ImVec2 WindowPadding; + float WindowRounding; + float WindowBorderSize; + ImVec2 WindowMinSize; + ImVec2 WindowTitleAlign; + float ChildRounding; + float ChildBorderSize; + float PopupRounding; + float PopupBorderSize; + ImVec2 FramePadding; + float FrameRounding; + float FrameBorderSize; + ImVec2 ItemSpacing; + ImVec2 ItemInnerSpacing; + ImVec2 TouchExtraPadding; + float IndentSpacing; + float ColumnsMinSpacing; + float ScrollbarSize; + float ScrollbarRounding; + float GrabMinSize; + float GrabRounding; + ImVec2 ButtonTextAlign; + ImVec2 DisplayWindowPadding; + ImVec2 DisplaySafeAreaPadding; + float MouseCursorScale; + bool AntiAliasedLines; + bool AntiAliasedFill; + float CurveTessellationTol; + ImVec4 Colors[ImGuiCol_COUNT]; }; typedef struct ImGuiStyle ImGuiStyle; struct ImGuiIO { -ImGuiConfigFlags ConfigFlags; -ImGuiBackendFlags BackendFlags; -ImVec2 DisplaySize; -float DeltaTime; -float IniSavingRate; -const char* IniFilename; -const char* LogFilename; -float MouseDoubleClickTime; -float MouseDoubleClickMaxDist; -float MouseDragThreshold; -int KeyMap[ImGuiKey_COUNT]; -float KeyRepeatDelay; -float KeyRepeatRate; -void* UserData; -ImFontAtlas* Fonts; -float FontGlobalScale; -bool FontAllowUserScaling; -ImFont* FontDefault; -ImVec2 DisplayFramebufferScale; -ImVec2 DisplayVisibleMin; -ImVec2 DisplayVisibleMax; -bool OptMacOSXBehaviors; -bool OptCursorBlink; -void* ClipboardUserData; -void* ImeWindowHandle; -ImVec2 MousePos; -bool MouseDown[5]; -float MouseWheel; -float MouseWheelH; -bool MouseDrawCursor; -bool KeyCtrl; -bool KeyShift; -bool KeyAlt; -bool KeySuper; -bool KeysDown[512]; -ImWchar InputCharacters[16+1]; -float NavInputs[ImGuiNavInput_COUNT]; -bool WantCaptureMouse; -bool WantCaptureKeyboard; -bool WantTextInput; -bool WantSetMousePos; -bool NavActive; -bool NavVisible; -float Framerate; -int MetricsRenderVertices; -int MetricsRenderIndices; -int MetricsActiveWindows; -ImVec2 MouseDelta; -ImVec2 MousePosPrev; -ImVec2 MouseClickedPos[5]; -float MouseClickedTime[5]; -bool MouseClicked[5]; -bool MouseDoubleClicked[5]; -bool MouseReleased[5]; -bool MouseDownOwned[5]; -float MouseDownDuration[5]; -float MouseDownDurationPrev[5]; -ImVec2 MouseDragMaxDistanceAbs[5]; -float MouseDragMaxDistanceSqr[5]; -float KeysDownDuration[512]; -float KeysDownDurationPrev[512]; -float NavInputsDownDuration[ImGuiNavInput_COUNT]; -float NavInputsDownDurationPrev[ImGuiNavInput_COUNT]; + ImGuiConfigFlags ConfigFlags; + ImGuiBackendFlags BackendFlags; + ImVec2 DisplaySize; + float DeltaTime; + float IniSavingRate; + const char* IniFilename; + const char* LogFilename; + float MouseDoubleClickTime; + float MouseDoubleClickMaxDist; + float MouseDragThreshold; + int KeyMap[ImGuiKey_COUNT]; + float KeyRepeatDelay; + float KeyRepeatRate; + void* UserData; + ImFontAtlas* Fonts; + float FontGlobalScale; + bool FontAllowUserScaling; + ImFont* FontDefault; + ImVec2 DisplayFramebufferScale; + ImVec2 DisplayVisibleMin; + ImVec2 DisplayVisibleMax; + bool OptMacOSXBehaviors; + bool OptCursorBlink; + void* ClipboardUserData; + void* ImeWindowHandle; + ImVec2 MousePos; + bool MouseDown[5]; + float MouseWheel; + float MouseWheelH; + bool MouseDrawCursor; + bool KeyCtrl; + bool KeyShift; + bool KeyAlt; + bool KeySuper; + bool KeysDown[512]; + ImWchar InputCharacters[16+1]; + float NavInputs[ImGuiNavInput_COUNT]; + bool WantCaptureMouse; + bool WantCaptureKeyboard; + bool WantTextInput; + bool WantSetMousePos; + bool NavActive; + bool NavVisible; + float Framerate; + int MetricsRenderVertices; + int MetricsRenderIndices; + int MetricsActiveWindows; + ImVec2 MouseDelta; + ImVec2 MousePosPrev; + ImVec2 MouseClickedPos[5]; + float MouseClickedTime[5]; + bool MouseClicked[5]; + bool MouseDoubleClicked[5]; + bool MouseReleased[5]; + bool MouseDownOwned[5]; + float MouseDownDuration[5]; + float MouseDownDurationPrev[5]; + ImVec2 MouseDragMaxDistanceAbs[5]; + float MouseDragMaxDistanceSqr[5]; + float KeysDownDuration[512]; + float KeysDownDurationPrev[512]; + float NavInputsDownDuration[ImGuiNavInput_COUNT]; + float NavInputsDownDurationPrev[ImGuiNavInput_COUNT]; }; typedef struct ImGuiIO ImGuiIO; struct ImVector { -int Size; -int Capacity; -void* Data; + int Size; + int Capacity; + void* Data; }; typedef struct ImVector ImVector;struct ImNewDummy {}; struct ImGuiOnceUponAFrame { - int RefFrame; + int RefFrame; }; typedef struct ImGuiOnceUponAFrame ImGuiOnceUponAFrame; struct ImGuiTextFilter { -char InputBuf[256]; -ImVector/**/ Filters; -int CountGrep; + char InputBuf[256]; + ImVector/**/ Filters; + int CountGrep; }; typedef struct ImGuiTextFilter ImGuiTextFilter; struct ImGuiTextBuffer { -ImVector/**/ Buf; + ImVector/**/ Buf; }; typedef struct ImGuiTextBuffer ImGuiTextBuffer; struct ImGuiStorage { -ImVector/**/ Data; + ImVector/**/ Data; }; typedef struct ImGuiStorage ImGuiStorage; struct ImGuiTextEditCallbackData { -ImGuiInputTextFlags EventFlag; -ImGuiInputTextFlags Flags; -void* UserData; -bool ReadOnly; -ImWchar EventChar; -ImGuiKey EventKey; -char* Buf; -int BufTextLen; -int BufSize; -bool BufDirty; -int CursorPos; -int SelectionStart; -int SelectionEnd; + ImGuiInputTextFlags EventFlag; + ImGuiInputTextFlags Flags; + void* UserData; + bool ReadOnly; + ImWchar EventChar; + ImGuiKey EventKey; + char* Buf; + int BufTextLen; + int BufSize; + bool BufDirty; + int CursorPos; + int SelectionStart; + int SelectionEnd; }; typedef struct ImGuiTextEditCallbackData ImGuiTextEditCallbackData; struct ImGuiSizeCallbackData { -void* UserData; -ImVec2 Pos; -ImVec2 CurrentSize; -ImVec2 DesiredSize; + void* UserData; + ImVec2 Pos; + ImVec2 CurrentSize; + ImVec2 DesiredSize; }; typedef struct ImGuiSizeCallbackData ImGuiSizeCallbackData; struct ImGuiPayload { -const void* Data; -int DataSize; -ImGuiID SourceId; -ImGuiID SourceParentId; -int DataFrameCount; -char DataType[32+1]; -bool Preview; -bool Delivery; + const void* Data; + int DataSize; + ImGuiID SourceId; + ImGuiID SourceParentId; + int DataFrameCount; + char DataType[32+1]; + bool Preview; + bool Delivery; }; typedef struct ImGuiPayload ImGuiPayload; struct ImColor { -ImVec4 Value; + ImVec4 Value; }; typedef struct ImColor ImColor; struct ImGuiListClipper { -float StartPosY; -float ItemsHeight; -int ItemsCount, StepNo, DisplayStart, DisplayEnd; + float StartPosY; + float ItemsHeight; + int ItemsCount, StepNo, DisplayStart, DisplayEnd; }; typedef struct ImGuiListClipper ImGuiListClipper; typedef void (*ImDrawCallback)(const ImDrawList* parent_list, const ImDrawCmd* cmd); struct ImDrawCmd { -unsigned int ElemCount; -ImVec4 ClipRect; -ImTextureID TextureId; -ImDrawCallback UserCallback; -void* UserCallbackData; + unsigned int ElemCount; + ImVec4 ClipRect; + ImTextureID TextureId; + ImDrawCallback UserCallback; + void* UserCallbackData; }; typedef struct ImDrawCmd ImDrawCmd; typedef unsigned short ImDrawIdx; struct ImDrawVert { -ImVec2 pos; -ImVec2 uv; -ImU32 col; + ImVec2 pos; + ImVec2 uv; + ImU32 col; }; typedef struct ImDrawVert ImDrawVert; struct ImDrawChannel { -ImVector/**/ CmdBuffer; -ImVector/**/ IdxBuffer; + ImVector/**/ CmdBuffer; + ImVector/**/ IdxBuffer; }; typedef struct ImDrawChannel ImDrawChannel; enum ImDrawCornerFlags_ @@ -616,58 +616,58 @@ ImDrawListFlags_AntiAliasedFill = 1 << 1 }; struct ImDrawList { -ImVector/**/ CmdBuffer; -ImVector/**/ IdxBuffer; -ImVector/**/ VtxBuffer; -ImDrawListFlags Flags; -const ImDrawListSharedData* _Data; -const char* _OwnerName; -unsigned int _VtxCurrentIdx; -ImDrawVert* _VtxWritePtr; -ImDrawIdx* _IdxWritePtr; -ImVector/**/ _ClipRectStack; -ImVector/**/ _TextureIdStack; -ImVector/**/ _Path; -int _ChannelsCurrent; -int _ChannelsCount; -ImVector/**/ _Channels; + ImVector/**/ CmdBuffer; + ImVector/**/ IdxBuffer; + ImVector/**/ VtxBuffer; + ImDrawListFlags Flags; + const ImDrawListSharedData* _Data; + const char* _OwnerName; + unsigned int _VtxCurrentIdx; + ImDrawVert* _VtxWritePtr; + ImDrawIdx* _IdxWritePtr; + ImVector/**/ _ClipRectStack; + ImVector/**/ _TextureIdStack; + ImVector/**/ _Path; + int _ChannelsCurrent; + int _ChannelsCount; + ImVector/**/ _Channels; }; typedef struct ImDrawList ImDrawList; struct ImDrawData { -bool Valid; -ImDrawList** CmdLists; -int CmdListsCount; -int TotalIdxCount; -int TotalVtxCount; + bool Valid; + ImDrawList** CmdLists; + int CmdListsCount; + int TotalIdxCount; + int TotalVtxCount; }; typedef struct ImDrawData ImDrawData; struct ImFontConfig { -void* FontData; -int FontDataSize; -bool FontDataOwnedByAtlas; -int FontNo; -float SizePixels; -int OversampleH; -int OversampleV; -bool PixelSnapH; -ImVec2 GlyphExtraSpacing; -ImVec2 GlyphOffset; -const ImWchar* GlyphRanges; -bool MergeMode; -unsigned int RasterizerFlags; -float RasterizerMultiply; -char Name[40]; -ImFont* DstFont; + void* FontData; + int FontDataSize; + bool FontDataOwnedByAtlas; + int FontNo; + float SizePixels; + int OversampleH; + int OversampleV; + bool PixelSnapH; + ImVec2 GlyphExtraSpacing; + ImVec2 GlyphOffset; + const ImWchar* GlyphRanges; + bool MergeMode; + unsigned int RasterizerFlags; + float RasterizerMultiply; + char Name[40]; + ImFont* DstFont; }; typedef struct ImFontConfig ImFontConfig; struct ImFontGlyph { -ImWchar Codepoint; -float AdvanceX; -float X0, Y0, X1, Y1; -float U0, V0, U1, V1; + ImWchar Codepoint; + float AdvanceX; + float X0, Y0, X1, Y1; + float U0, V0, U1, V1; }; typedef struct ImFontGlyph ImFontGlyph; enum ImFontAtlasFlags_ @@ -677,71 +677,71 @@ ImFontAtlasFlags_NoMouseCursors = 1 << 1 }; struct ImFontAtlas { -ImFontAtlasFlags Flags; -ImTextureID TexID; -int TexDesiredWidth; -int TexGlyphPadding; -unsigned char* TexPixelsAlpha8; -unsigned int* TexPixelsRGBA32; -int TexWidth; -int TexHeight; -ImVec2 TexUvScale; -ImVec2 TexUvWhitePixel; -ImVector/**/ Fonts; -ImVector/**/ CustomRects; -ImVector/**/ ConfigData; -int CustomRectIds[1]; + ImFontAtlasFlags Flags; + ImTextureID TexID; + int TexDesiredWidth; + int TexGlyphPadding; + unsigned char* TexPixelsAlpha8; + unsigned int* TexPixelsRGBA32; + int TexWidth; + int TexHeight; + ImVec2 TexUvScale; + ImVec2 TexUvWhitePixel; + ImVector/**/ Fonts; + ImVector/**/ CustomRects; + ImVector/**/ ConfigData; + int CustomRectIds[1]; }; typedef struct ImFontAtlas ImFontAtlas; struct ImFont { -float FontSize; -float Scale; -ImVec2 DisplayOffset; -ImVector/**/ Glyphs; -ImVector/**/ IndexAdvanceX; -ImVector/**/ IndexLookup; -const ImFontGlyph* FallbackGlyph; -float FallbackAdvanceX; -ImWchar FallbackChar; -short ConfigDataCount; -ImFontConfig* ConfigData; -ImFontAtlas* ContainerAtlas; -float Ascent, Descent; -bool DirtyLookupTables; -int MetricsTotalSurface; + float FontSize; + float Scale; + ImVec2 DisplayOffset; + ImVector/**/ Glyphs; + ImVector/**/ IndexAdvanceX; + ImVector/**/ IndexLookup; + const ImFontGlyph* FallbackGlyph; + float FallbackAdvanceX; + ImWchar FallbackChar; + short ConfigDataCount; + ImFontConfig* ConfigData; + ImFontAtlas* ContainerAtlas; + float Ascent, Descent; + bool DirtyLookupTables; + int MetricsTotalSurface; }; typedef struct ImFont ImFont; struct GlyphRangesBuilder { -ImVector/**/ UsedChars; + ImVector/**/ UsedChars; }; typedef struct GlyphRangesBuilder GlyphRangesBuilder; struct CustomRect { -unsigned int ID; -unsigned short Width, Height; -unsigned short X, Y; -float GlyphAdvanceX; -ImVec2 GlyphOffset; -ImFont* Font; + unsigned int ID; + unsigned short Width, Height; + unsigned short X, Y; + float GlyphAdvanceX; + ImVec2 GlyphOffset; + ImFont* Font; }; typedef struct CustomRect CustomRect; struct TextRange { -const char* b; -const char* e; + const char* b; + const char* e; }; typedef struct TextRange TextRange; struct Pair { -ImGuiID key; + ImGuiID key; union { int val_i; float val_f; void* val_p; }; }; typedef struct Pair Pair; -//////////////// END AUTOGENERATED SEGMENT #endif //IMGUI_STRUCTS_INCLUDED +//////////////// END AUTOGENERATED SEGMENT