[
  {
    "path": "Makefile",
    "content": "all:\n\tg++ -c -I.. -I../imgui -I../lua/src imgui_lua_bindings.cpp -o imgui_lua_bindings.o\n"
  },
  {
    "path": "README.md",
    "content": "# These are imgui bindings for lua.\n\nImGui https://github.com/ocornut/imgui\n\nThese bindings support a lot of common imgui operations except for initializing imgui. \n\nThis repo only deals with binding ImGui with lua and doesn't deal with setting up the ImGui impl files required to run ImGui, check out the ImGui repo for help with that. \n\nFor LOVE bindings check out https://github.com/slages/love-imgui (uses these C++ bindings and does the rest of the work for you).\n\nFunction support for dear imgui 1.60:\n\n    Normal Imgui functions:   Supported: 204 Unsupported: 117\n    Imgui DrawList functions: Supported: 36 Unsupported: 12\n\n\n## How to call these imgui bindings from lua\n\nIt mostly is the same as calling from C++ except for dealing with pointers and ImVecs\n\nFunction definition in C++\n```c++\n    IMGUI_API bool          RadioButton(const char* label, bool active);\n```\nHow to call function in lua\n\n```lua\nret = imgui.RadioButton(\"String goes here\", isActive)\n```\n\n## Pointers:\n\nLua doesn't have pointers but it has multiple return values\nso instead of giving it a pointer, you give it a value and it will pass\nback the new value.\n\nFunction definition in C++\n```c++\n    IMGUI_API void          ShowTestWindow(bool* opened = NULL);\n```\nHow to call function in lua\n```lua\nopened = imgui.ShowTestWindow(opened)\n```\nThis can make some functions a bit weird. For example Begin.\n\nFunction definition in C++\n```c++\n    IMGUI_API bool          Begin(const char* name, bool* p_opened = NULL, ImGuiWindowFlags flags = 0);\n```\n\nHow to call function in lua (Note: optional arguments still work)\n```lua\nshoulddraw, p_opened = imgui.Begin(\"Name\", p_opened)\n```\n\n\nBegin normally returns whether it's desirable to draw or not as well as setting the value\nof p_opened to whether the window is open or not. Still use the first return value to decide to whether to call the ImGui functions for that window and imgui.End().\n\n\n## ImVecs:\n\nThose are arguments are expanded to separate variables instead of one object.\n\nFunction definition in C++\n```c+++\n    IMGUI_API void          SetNextWindowPos(const ImVec2& pos, ImGuiSetCond cond = 0);\n```\n\nHow to call function in lua\n```lua\nimgui.SetNextWindowPos(100, 50)\n```\n\n## DrawList functions:\n\nAll functions that operate on drawlists are called with the prefix DrawList\n\nFunction definition in C++\n```c++\n    IMGUI_API void  AddLine(const ImVec2& a, const ImVec2& b, ImU32 col, float thickness = 1.0f);\n```\n\nHow to call function in lua\n```lua\nimgui.DrawList_AddLine(\n  imgui.DrawList_AddLine(minX, minY, maxX, maxY, 0xFF0000FF, 2)\n```\nNote you must specifiy the color in hex for now\n0x(ALPHA)(BLUE)(GREEN)(RED)\n0xFF0000FF = full opacity red\n\n\n## Enums:\n\nEnums are exposed through a \"constant\" table. They're namespaced with \"ImGui\" stripped from the name.\n\n```c++\nImGui::SetNextWindowSize(ImVec2(550,680), ImGuiSetCond_FirstUseEver);\nImGui::Begin(\"Demo\", p_open, ImGuiWindowFlags_ShowBorders);\nImGui::End()\n```\n\n```lua\nimgui.SetNextWindowSize(550,680, imgui.constant.SetCond.FirstUseEver)\nimgui.Begin(\"Demo\", true, imgui.constant.WindowFlags.ShowBorders)\nimgui.End()\n```\n\n## How to build:\n\nGenerate iterator file (or use the one for 1.50 already in the repo)\n```\n./generate_imgui_bindings.pl <../imgui/imgui.h >imgui_iterator.inl\n```\n\nThis creates a file with info about imgui functions from the imgui.h file.\n\nThen copy the macro definitions in imgui_lua_bindings.cpp and include imgui_iterator.inl in that the cpp file. This will generate static int impl_FunctionName(lua_State*L) {} functions for each imgui function. Bind these to lua functions and you're good to go. (Check out imgui_lua_bindings.cpp for a full example)\n\nThe imgui_lua_bindings.cpp has two functions RunString and LoadImguiBindings\n\nTo use the functions there first assign the global lState to a valid lua_State, then call LoadImguiBindings then run as many strings as you want.\n\n## What is ENABLE_IM_LUA_END_STACK?\n\nI made something to keep track of the imgui begin stack so that I could continue using\nimGui functions if an error ocurred in the lua script. If you don't care about that\ndon't define ENABLE_IM_LUA_END_STACK. I'm using a std::deque of ints to store what the last\nbegin calls were and then if the script errors I unwrap them with ends so that imgui won't\ncomplain when I render.\n\n## License?\nI don't feel like writing a license so here's it in laymans terms...\n\nYou can use this code for whatever just don't redistribute the exact same source code and try to sell it, or claim that the source code was made by you.\nYou can compile this source code and sell it. You can change this source code and sell the modified version.\nYou can include this source code in whatever open source project (let me know please!). You can include it in whatever closed source project.\n\nJust be chill and if you make a billion dollars send me an email or something.\n\n## Contributing\nIf you have any improvements create a pull request! If you want a function supported or disagree with how the bindings work make an issue!\n"
  },
  {
    "path": "generate_imgui_bindings.pl",
    "content": "#!/usr/bin/perl\nuse strict;\nuse warnings;\nuse diagnostics;\n\n# This works for IMGUI 1.60 and does not get all functions\n#\n# to use ./generate_imgui_bindings.pl <../imgui/imgui.h >imgui_iterator.inl\n# and define macros properly as in example imgui_lua_bindings.cpp\n#\n# check imgui_iterator for explanations of why some functions are not supported yet\n\nrequire \"./parse_blocks.pl\";\n\nsub generateNamespaceImgui {\n  my ($imguiCodeBlock) = @_;\n\n  my $lineCaptureRegex = qr\" *(IMGUI_API) *((const char\\*)|([^ ]+)) *([^\\(]+)\\(([^\\;]*)\\);\";\n  my $doEndStackOptions = 1;\n  my $terminator = \"} \\/\\/ namespace ImGui\";\n  my $callPrefix = \"\";\n  my $functionSuffix = \"\";\n\n#define bannedNames with keys of functions to exclude them\n# EXAMPLE:\n  my %bannedNames = (\n    \"NewFrame\" => \"banned\",\n    \"Render\" => \"banned\",\n    \"Shutdown\" => \"banned\" );\n#\n# This is only useful for ENABLE_IM_LUA_END_STACK\n# We hold a list of differnet 'things' that can be pushed to the stack\n# i.e. Group for BeginGroup\n# It usually works like this BeginBlah EndBlah\n\n# We have to redefine stuff when it doesn't work so cleanly\n  my %beginN = (\n    \"TreeNode\" => \"Tree\",\n    \"TreePush\" => \"Tree\",\n    \"PushStyleVar\" => \"StyleVar\"\n    );\n  my %changeN = (\n    \"Tree\" => \"TreePop\",\n    \"StyleVar\"=> \"PopStyleVar\"\n    );\n  my %endN = (\n    \"TreePop\" => \"Tree\",\n    \"PopStyleVar\" => \"StyleVar\"\n    );\n  my %endOverride = (\n    \"PopupModal\" => \"Popup\",\n    \"PopupContextItem\" => \"Popup\",\n    \"PopupContextWindow\" => \"Popup\",\n    \"PopupContextVoid\" => \"Popup\" );\n\n  generateImguiGeneric(\n    $lineCaptureRegex,\n    $doEndStackOptions,\n    $terminator,\n    $callPrefix,\n    $functionSuffix,\n    \\%bannedNames,\n    \\%beginN,\n    \\%changeN,\n    \\%endN,\n    \\%endOverride,\n    $imguiCodeBlock)\n}\n\nsub generateDrawListFunctions {\n  my ($imguiCodeBlock) = @_;\n\n  my $lineCaptureRegex = qr\" *(IMGUI_API|inline) *((const char\\*)|([^ ]+)) *([^\\(]+)\\(([^\\;]*)\\);\";\n  my $doEndStackOptions = 0;\n  my $terminator = 0;\n  my $callPrefix = \"DRAW_LIST_\";\n  my $functionSuffix = \"_DRAW_LIST\";\n\n#define bannedNames with keys of functions to exclude them\n# EXAMPLE:\n  my %bannedNames = (\n   );\n#\n# This is only useful for ENABLE_IM_LUA_END_STACK\n# We hold a list of differnet 'things' that can be pushed to the stack\n# i.e. Group for BeginGroup\n# It usually works like this BeginBlah EndBlah\n\n# We have to redefine stuff when it doesn't work so cleanly\n  my %beginN = (\n    );\n  my %changeN = (\n    );\n  my %endN = (\n    );\n  my %endOverride = (\n     );\n\n\n  generateImguiGeneric(\n    $lineCaptureRegex,\n    $doEndStackOptions,\n    $terminator,\n    $callPrefix,\n    $functionSuffix,\n    \\%bannedNames,\n    \\%beginN,\n    \\%changeN,\n    \\%endN,\n    \\%endOverride,\n    $imguiCodeBlock)\n}\n\nsub generateImguiGeneric {\n  my $lineCaptureRegex = shift;\n  my $doEndStackOptions = shift;\n  my $terminator = shift;\n  my $callPrefix = shift;\n  my $functionSuffix = shift;\n\n#define bannedNames with keys of functions to exclude them\n# EXAMPLE:\n  my $bannedNamesRef = shift;\n  my %bannedNames = %{$bannedNamesRef};\n#\n# This is only useful for ENABLE_IM_LUA_END_STACK\n# We hold a list of differnet 'things' that can be pushed to the stack\n# i.e. Group for BeginGroup\n# It usually works like this BeginBlah EndBlah\n\n# We have to redefine stuff when it doesn't work so cleanly\n  my $beginNRef = shift;\n  my %beginN = %{$beginNRef};\n  my $changeNRef = shift;\n  my %changeN = %{$changeNRef};\n  my $endNRef = shift;\n  my %endN = %{$endNRef};\n  my $endOverrideRef = shift;\n  my %endOverride = %{$endOverrideRef};\n\n  my ($imguiCodeBlock) = @_;\n\n\n  my $numSupported = 0;\n  my $numUnsupported = 0;\n  my $line;\n  my %funcNames;\n  my %endTypeToInt;\n  my @endTypes;\n  my @functionsAlreadyAdded;\n  foreach $line (split /\\n/, $imguiCodeBlock) {\n    #replace ImVec2(x, y) with ImVec2 x, y so it's easier for regex (and ImVec4)\n    $line =~ s/ImVec2\\(([^,]*),([^\\)]*)\\)/ImVec2 $1 $2/g;\n    $line =~ s/ImVec4\\(([^,]*),([^\\)]*),([^\\)]*),([^\\)]*)\\)/ImVec4 $1 $2 $3 $4/g;\n\n    #delete this so it's eaiser for regexes\n    $line =~ s/ IM_PRINTFARGS\\(.\\);/;/g;\n    if ($line =~ m/$lineCaptureRegex/) {\n      print \"//\" . $line . \"\\n\";\n      # this will be set to 0 if something is not supported yet\n      my $shouldPrint = 1;\n      my @args = split(',', $6);\n      # things to do before calling real c++ function\n      my @before;\n      # arguments to real c++ function\n      my @funcArgs;\n      # things to do after callign real c++ function\n      my @after;\n      # real c++ function name\n      my $funcName = $5;\n\n\t  #say STDERR \"Parsing function: \" . $funcName;\n\t  if (grep(/^$funcName$/, @functionsAlreadyAdded)) {\n\t\t  #say STDERR $funcName;\n\t  }\n\t  push @functionsAlreadyAdded, $funcName;\n\t  \n      if (defined($bannedNames{$funcName})) {\n        print \"//Not allowed to use this function\\n\";\n        $shouldPrint = 0;\n      }\n      # c++ type of return value\n      my $retType = $2;\n      # macro used for calling function\n      my $callMacro;\n      # if it has a return value (yes I know this is not the cleanest code)\n      my $hasRet = 1;\n      if ($retType =~ /^void$/) {\n        $callMacro = \"${callPrefix}CALL_FUNCTION_NO_RET\";\n        $hasRet = 0;\n      } elsif ($retType =~ /^const char\\*$/) {\n        $callMacro = \"${callPrefix}CALL_FUNCTION\";\n        push(@funcArgs, \"const char*\");\n        push(@after, \"PUSH_STRING(ret)\");\n      } elsif ($retType =~ /^bool$/) {\n        $callMacro = \"${callPrefix}CALL_FUNCTION\";\n        push(@funcArgs, \"bool\");\n        push(@after, \"PUSH_BOOL(ret)\");\n      } elsif ($retType =~ /^float$/) {\n        $callMacro = \"${callPrefix}CALL_FUNCTION\";\n        push(@funcArgs, \"float\");\n        push(@after, \"PUSH_NUMBER(ret)\");\n      } elsif ($retType =~ /^ImVec2$/) {\n        $callMacro = \"${callPrefix}CALL_FUNCTION\";\n        push(@funcArgs, \"ImVec2\");\n        push(@after, \"PUSH_NUMBER(ret.x)\");\n        push(@after, \"PUSH_NUMBER(ret.y)\");\n      } elsif ($retType =~ /^(unsigned int|ImGuiID|ImU32)$/) {\n        $callMacro = \"${callPrefix}CALL_FUNCTION\";\n        push(@funcArgs, \"unsigned int\");\n        push(@after, \"PUSH_NUMBER(ret)\");\n      } else {\n        print \"// Unsupported return type $retType\\n\";\n        $shouldPrint = 0;\n      }\n      for (my $i = 0; $i < @args; $i++) {\n        # bool * x = NULL or bool * x\n        if ($args[$i] =~ m/^ *bool *\\* *([^ =\\[]*)( = NULL|) *$/) {\n          my $name = $1;\n          if ($2 =~ m/^ = NULL$/) {\n            push(@before, \"OPTIONAL_BOOL_POINTER_ARG($name)\");\n          } else {\n            push(@before, \"BOOL_POINTER_ARG($name)\");\n          }\n          push(@funcArgs, $name);\n          push(@after, \"END_BOOL_POINTER($name)\");\n        # float * x\n        } elsif ($args[$i] =~ m/^ *float *\\* *([^ =\\[]*)$/) {\n          my $name = $1;\n          push(@before, \"FLOAT_POINTER_ARG($name)\");\n          push(@funcArgs, $name);\n          push(@after, \"END_FLOAT_POINTER($name)\");\n          #float a or float a = number\n        } elsif ($args[$i] =~ m/^ *float *([^ =\\[]*)( *= *[^ ]*|)$/) {\n          my $name = $1;\n          if ($2 =~ m/^ *= *([^ ]*)$/) {\n            push(@before, \"OPTIONAL_NUMBER_ARG($name, $1)\");\n          } else {\n            push(@before, \"NUMBER_ARG($name)\");\n          }\n          push(@funcArgs, $name);\n          # const char* a or const char* a = NULL or \"blah\"\n        } elsif ($args[$i] =~ m/^ *const char\\* *([^ =\\[]*)( *= *(NULL|\".*\")|) *$/) {\n          my $name = $1;\n          if ($2 =~ m/^ *= *NULL$/) {\n            push(@before, \"OPTIONAL_LABEL_ARG($name)\");\n          } else {\n            push(@before, \"LABEL_ARG($name)\");\n          }\n          push(@funcArgs, $name);\n        #const ImVec2& with default or not\n        } elsif ($args[$i] =~ m/^ *const ImVec2& ([^ ]*) *(= * ImVec2 [^ ]* [^ ]*|) *$/) {\n          my $name = $1;\n          if ($2 =~ m/^= * ImVec2 ([^ ]*) ([^ ]*)$/) {\n            push(@before, \"OPTIONAL_IM_VEC_2_ARG($name, $1, $2)\");\n          } else {\n            push(@before, \"IM_VEC_2_ARG($name)\");\n          }\n          push(@funcArgs, $name);\n        # ImVec2 \n        } elsif ($args[$i] =~ m/^ *ImVec2 ([^ ]*) *$/) {\n          my $name = $1;\n          push(@before, \"IM_VEC_2_ARG($name)\");\n          push(@funcArgs, $name);\n        #const ImVec4& with default or not\n        } elsif ($args[$i] =~ m/^ *const ImVec4& ([^ ]*) *(= * ImVec4 [^ ]* [^ ]* [^ ]* [^ ]*|) *$/) {\n          my $name = $1;\n          if ($2 =~ m/^= * ImVec4 ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*)$/) {\n            push(@before, \"OPTIONAL_IM_VEC_4_ARG($name, $1, $2, $3, $4)\");\n          } else {\n            push(@before, \"IM_VEC_4_ARG($name)\");\n          }\n          push(@funcArgs, $name);\n          # one of the various enums\n          # we are handling these as ints\n        } elsif ($args[$i] =~ m/^ *(ImGuiWindowFlags|ImGuiCol|ImGuiStyleVar|ImGuiKey|ImGuiAlign|ImGuiColorEditMode|ImGuiMouseCursor|ImGuiSetCond|ImGuiInputTextFlags|ImGuiSelectableFlags) ([^ ]*)( = 0|) *$/) {\n         #These are ints\n         my $name = $2;\n          if ($3 =~ m/^ = 0$/) {\n            push(@before, \"OPTIONAL_INT_ARG($name, 0)\");\n          } else {\n            push(@before, \"INT_ARG($name)\");\n          }\n          push(@funcArgs, $name);\n          #int with default value or not\n        } elsif ($args[$i] =~ m/^ *int ([^ =\\[]*)( = [^ ]*|) *$/) {\n          my $name = $1;\n          if ($2 =~ m/^ = ([^ ]*)$/) {\n            push(@before, \"OPTIONAL_INT_ARG($name, $1)\");\n          } else {\n            push(@before, \"INT_ARG($name)\");\n          }\n          push(@funcArgs, $name);\n        #unsigned int with default value or not\n        } elsif ($args[$i] =~ m/^ *(unsigned +int|ImGuiID|ImU32) ([^ =\\[]*)( = [^ ]*|) *$/) {\n          my $name = $2;\n          if ($2 =~ m/^ = ([^ ]*)$/) {\n            push(@before, \"OPTIONAL_UINT_ARG($name, $1)\");\n          } else {\n            push(@before, \"UINT_ARG($name)\");\n          }\n          push(@funcArgs, $name);\n        #ImTextureID or const ImTextureID&\n        # const ImTextureID& is the same thing as var\n        # as lua is concerned\n        } elsif ($args[$i] =~ m/^ *(ImTextureID|const ImTextureID&) ([^ =\\[]*) *$/) {\n          my $name = $2;\n          push(@before, \"IM_TEXTURE_ID_ARG($name)\");\n          push(@funcArgs, $name);\n          # bool with default value or not\n        } elsif ($args[$i] =~ m/^ *bool ([^ =\\[]*)( *= *true| *= *false|) *$/) {\n          my $name = $1;\n          if ($2 =~ m/^ *= *([^ ]*)$/) {\n            push(@before, \"OPTIONAL_BOOL_ARG($name, $1)\");\n          } else {\n            push(@before, \"BOOL_ARG($name)\");\n          }\n          push(@funcArgs, $name);\n        # int * x\n        } elsif ($args[$i] =~ m/^ *int *\\* *([^ =\\[]*)$/) {\n          my $name = $1;\n          push(@before, \"INT_POINTER_ARG($name)\");\n          push(@funcArgs, $name);\n          push(@after, \"END_INT_POINTER($name)\");\n        # unsigned int * x\n        } elsif ($args[$i] =~ m/^ *unsigned +int *\\* *([^ =\\[]*)$/) {\n          my $name = $1;\n          push(@before, \"UINT_POINTER_ARG($name)\");\n          push(@funcArgs, $name);\n          push(@after, \"END_UINT_POINTER($name)\");\n          # we don't support variadic functions yet but we let you use it without extra variables\n        } elsif ($args[$i] =~ m/^ *\\.\\.\\. *$/) {\n          print \"// Variadic functions aren't suppported but here it is anyway\\n\";\n        } else {\n          print \"// Unsupported arg type \" . $args[$i] . \"\\n\";\n          $shouldPrint = 0;\n        }\n      }\n      if ($shouldPrint != 0) {\n        my $luaFunc = $funcName;\n        # Stupid way of implementing overriding\n        while($funcNames{$luaFunc}) {\n          $luaFunc .= \"_\" . scalar(@args);\n        }\n        $funcNames{$luaFunc} = 1;\n\n\t\t\n        print \"IMGUI_FUNCTION${functionSuffix}($luaFunc)\\n\";\n        for (my $i = 0; $i < @before; $i++) {\n          print $before[$i] . \"\\n\";\n        }\n\n        print $callMacro . \"($funcName\";\n        for (my $i = 0; $i < @funcArgs; $i++) {\n          print \", \" . $funcArgs[$i];\n        }\n        print \")\\n\";\n\n        #for begin and end stack stuff\n        if ($funcName =~ m/^Begin(.*)$/ || defined($beginN{$funcName})) {\n          my $curEndType;\n          if (defined($beginN{$funcName})) {\n            $curEndType = $beginN{$funcName};\n          } else {\n            $curEndType = $1;\n          }\n          if (defined($endOverride{$curEndType})) {\n            $curEndType = $endOverride{$curEndType};\n          }\n          if (!defined($endTypeToInt{$curEndType})) {\n            $endTypeToInt{$curEndType} = scalar(@endTypes);\n            push(@endTypes, $curEndType);\n          }\n          my $curEndTypeInt = $endTypeToInt{$curEndType};\n          if ($hasRet) {\n            print \"IF_RET_ADD_END_STACK($curEndTypeInt)\\n\";\n          } else {\n            print \"ADD_END_STACK($curEndTypeInt)\\n\";\n          }\n        } elsif ($funcName =~ m/^End(.*)$/ || defined($endN{$funcName})) {\n          my $curEndType;\n          if (defined($endN{$funcName})) {\n            $curEndType = $endN{$funcName};\n          } else {\n            $curEndType = $1;\n          }\n          if (defined($endOverride{$curEndType})) {\n            $curEndType = $endOverride{$curEndType};\n          }\n          if (!defined($endTypeToInt{$curEndType})) {\n            $endTypeToInt{$curEndType} = scalar(@endTypes);\n            push(@endTypes, $curEndType);\n          }\n          my $curEndTypeInt = $endTypeToInt{$curEndType};\n          print \"POP_END_STACK($curEndTypeInt)\\n\"\n        }\n\n        for (my $i = 0; $i < @after; $i++) {\n          print $after[$i] . \"\\n\";\n        }\n        print \"END_IMGUI_FUNC\\n\";\n        $numSupported += 1;\n      } else {\n        $numUnsupported += 1;\n      }\n    } elsif ($terminator) {\n        if ($line =~ m/^${terminator}$/) {\n            last;\n        }\n    }\n  }\n#for end stack stuff\n  if ($doEndStackOptions)\n  {\n      print \"END_STACK_START\\n\";\n      for (my $i = 0; $i < @endTypes; $i++) {\n          my $endFunc;\n          if (defined($changeN{$endTypes[$i]})) {\n              $endFunc = $changeN{$endTypes[$i]};\n          } else {\n              $endFunc = \"End\" . $endTypes[$i];\n          }\n          print \"END_STACK_OPTION($i, \" . $endFunc .\")\\n\";\n      }\n      print \"END_STACK_END\\n\";\n  }\n\n#debug info\n  print STDERR \"Supported: $numSupported Unsupported: $numUnsupported\\n\";\n\n}\n\nsub generateEnums {\n  my $enumName = shift;\n  my ($imguiCodeBlock) = @_;\n\n  my $lineCaptureRegex = qr\"^ *(ImGui)([^, _]+)_([a-zA-Z0-9]+)\\b\";\n\n  print \"START_ENUM($enumName)\\n\";\n  my $line;\n  foreach $line (split /\\n/, $imguiCodeBlock) {\n    if ($line =~ m/$lineCaptureRegex/) {\n      die \"Malformed enum at $enumName\" unless ($2 eq $enumName);\n\n      print \"//\" . $line . \"\\n\";\n      print \"MAKE_ENUM($1$2_$3,$3)\\n\";\n    }\n  }\n  print \"END_ENUM($enumName)\\n\";\n}\n\n\nmy ($blocksref, $blocknamesref) = parse_blocks();\n\nmy @blocks = @$blocksref;\nmy @blocknames = @$blocknamesref;\n\n# @spaderthomas 3/1/2020: ImGui also puts its deprecated functions in namespace ImGui,\n# so we'll end up parsing a couple functions twice and causing compiler errors.\n#\n# This flag just means that we've parsed the main one, so don't parse the next one. If ImGui\n# splits up its header to multiple instances of namespace ImGui, this would break.\nmy $alreadyParsedMainImguiNamespace = 0;\n\nfor (my $i=0; $i < scalar @blocks; $i++) {\n  print \"//\" . $blocknames[$i] . \"\\n\";\n  if (($blocknames[$i] eq \"namespace ImGui\\n\") and not $alreadyParsedMainImguiNamespace) {\n\t$alreadyParsedMainImguiNamespace = 1;\n    generateNamespaceImgui($blocks[$i]);\n  }\n  if ($blocknames[$i] =~ m/enum ImGui(.*)_\\n/) {\n    generateEnums($1, $blocks[$i]);\n  }\n  if ($blocknames[$i] eq \"struct ImDrawList\\n\") {\n    generateDrawListFunctions($blocks[$i]);\n  }\n}\n\n\n"
  },
  {
    "path": "imgui_iterator.inl",
    "content": "//struct ImVec2\n\n//struct ImVec4\n\n//namespace ImGui\n\n//    IMGUI_API ImGuiContext* CreateContext(ImFontAtlas* shared_font_atlas = NULL);\n// Unsupported return type ImGuiContext*\n// Unsupported arg type ImFontAtlas* shared_font_atlas = NULL\n//    IMGUI_API void          DestroyContext(ImGuiContext* ctx = NULL);   // NULL = destroy current context\n// Unsupported arg type ImGuiContext* ctx = NULL\n//    IMGUI_API ImGuiContext* GetCurrentContext();\n// Unsupported return type ImGuiContext*\n//    IMGUI_API void          SetCurrentContext(ImGuiContext* ctx);\n// Unsupported arg type ImGuiContext* ctx\n//    IMGUI_API ImGuiIO&      GetIO();\n// Unsupported return type ImGuiIO&\n//    IMGUI_API ImGuiStyle&   GetStyle();\n// Unsupported return type ImGuiStyle&\n//    IMGUI_API void          NewFrame();                                 // start a new ImGui frame, you can submit any command from this point until Render()/EndFrame().\n//Not allowed to use this function\n//    IMGUI_API void          Render();                                   // ends the ImGui frame, finalize the draw data. (Obsolete: optionally call io.RenderDrawListsFn if set. Nowadays, prefer calling your render function yourself.)\n//Not allowed to use this function\n//    IMGUI_API ImDrawData*   GetDrawData();                              // valid after Render() and until the next call to NewFrame(). this is what you have to render. (Obsolete: this used to be passed to your io.RenderDrawListsFn() function.)\n// Unsupported return type ImDrawData*\n//    IMGUI_API void          EndFrame();                                 // ends the ImGui frame. automatically called by Render(), so most likely don't need to ever call that yourself directly. If you don't need to render you may call EndFrame() but you'll have wasted CPU already. If you don't need to render, better to not create any imgui windows instead!\nIMGUI_FUNCTION(EndFrame)\nCALL_FUNCTION_NO_RET(EndFrame)\nPOP_END_STACK(0)\nEND_IMGUI_FUNC\n//    IMGUI_API void          ShowDemoWindow(bool* p_open = NULL);        // create demo/test window (previously called ShowTestWindow). demonstrate most ImGui features. call this to learn about the library! try to make it always available in your application!\nIMGUI_FUNCTION(ShowDemoWindow)\nOPTIONAL_BOOL_POINTER_ARG(p_open)\nCALL_FUNCTION_NO_RET(ShowDemoWindow, p_open)\nEND_BOOL_POINTER(p_open)\nEND_IMGUI_FUNC\n//    IMGUI_API void          ShowMetricsWindow(bool* p_open = NULL);     // create metrics window. display ImGui internals: draw commands (with individual draw calls and vertices), window list, basic internal state, etc.\nIMGUI_FUNCTION(ShowMetricsWindow)\nOPTIONAL_BOOL_POINTER_ARG(p_open)\nCALL_FUNCTION_NO_RET(ShowMetricsWindow, p_open)\nEND_BOOL_POINTER(p_open)\nEND_IMGUI_FUNC\n//    IMGUI_API void          ShowStyleEditor(ImGuiStyle* ref = NULL);    // add style editor block (not a window). you can pass in a reference ImGuiStyle structure to compare to, revert to and save to (else it uses the default style)\n// Unsupported arg type ImGuiStyle* ref = NULL\n//    IMGUI_API bool          ShowStyleSelector(const char* label);       // add style selector block (not a window), essentially a combo listing the default styles.\nIMGUI_FUNCTION(ShowStyleSelector)\nLABEL_ARG(label)\nCALL_FUNCTION(ShowStyleSelector, bool, label)\nPUSH_BOOL(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API void          ShowFontSelector(const char* label);        // add font selector block (not a window), essentially a combo listing the loaded fonts.\nIMGUI_FUNCTION(ShowFontSelector)\nLABEL_ARG(label)\nCALL_FUNCTION_NO_RET(ShowFontSelector, label)\nEND_IMGUI_FUNC\n//    IMGUI_API void          ShowUserGuide();                            // add basic help/info block (not a window): how to manipulate ImGui as a end-user (mouse/keyboard controls).\nIMGUI_FUNCTION(ShowUserGuide)\nCALL_FUNCTION_NO_RET(ShowUserGuide)\nEND_IMGUI_FUNC\n//    IMGUI_API const char*   GetVersion();                               // get a version string e.g. \"1.23\"\nIMGUI_FUNCTION(GetVersion)\nCALL_FUNCTION(GetVersion, const char*)\nPUSH_STRING(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API void          StyleColorsDark(ImGuiStyle* dst = NULL);    // new, recommended style (default)\n// Unsupported arg type ImGuiStyle* dst = NULL\n//    IMGUI_API void          StyleColorsClassic(ImGuiStyle* dst = NULL); // classic imgui style\n// Unsupported arg type ImGuiStyle* dst = NULL\n//    IMGUI_API void          StyleColorsLight(ImGuiStyle* dst = NULL);   // best used with borders and a custom, thicker font\n// Unsupported arg type ImGuiStyle* dst = NULL\n//    IMGUI_API bool          Begin(const char* name, bool* p_open = NULL, ImGuiWindowFlags flags = 0);\nIMGUI_FUNCTION(Begin)\nLABEL_ARG(name)\nOPTIONAL_BOOL_POINTER_ARG(p_open)\nOPTIONAL_INT_ARG(flags, 0)\nCALL_FUNCTION(Begin, bool, name, p_open, flags)\nIF_RET_ADD_END_STACK(1)\nPUSH_BOOL(ret)\nEND_BOOL_POINTER(p_open)\nEND_IMGUI_FUNC\n//    IMGUI_API void          End();\nIMGUI_FUNCTION(End)\nCALL_FUNCTION_NO_RET(End)\nPOP_END_STACK(1)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          BeginChild(const char* str_id, const ImVec2& size = ImVec2 0 0, bool border = false, ImGuiWindowFlags flags = 0); // Begin a scrolling region. size==0.0f: use remaining window size, size<0.0f: use remaining window size minus abs(size). size>0.0f: fixed size. each axis can use a different mode, e.g. ImVec2 0 400.\nIMGUI_FUNCTION(BeginChild)\nLABEL_ARG(str_id)\nOPTIONAL_IM_VEC_2_ARG(size, 0, 0)\nOPTIONAL_BOOL_ARG(border, false)\nOPTIONAL_INT_ARG(flags, 0)\nCALL_FUNCTION(BeginChild, bool, str_id, size, border, flags)\nIF_RET_ADD_END_STACK(2)\nPUSH_BOOL(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          BeginChild(ImGuiID id, const ImVec2& size = ImVec2 0 0, bool border = false, ImGuiWindowFlags flags = 0);\nIMGUI_FUNCTION(BeginChild_4)\nUINT_ARG(id)\nOPTIONAL_IM_VEC_2_ARG(size, 0, 0)\nOPTIONAL_BOOL_ARG(border, false)\nOPTIONAL_INT_ARG(flags, 0)\nCALL_FUNCTION(BeginChild, bool, id, size, border, flags)\nIF_RET_ADD_END_STACK(2)\nPUSH_BOOL(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API void          EndChild();\nIMGUI_FUNCTION(EndChild)\nCALL_FUNCTION_NO_RET(EndChild)\nPOP_END_STACK(2)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          IsWindowAppearing();\nIMGUI_FUNCTION(IsWindowAppearing)\nCALL_FUNCTION(IsWindowAppearing, bool)\nPUSH_BOOL(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          IsWindowCollapsed();\nIMGUI_FUNCTION(IsWindowCollapsed)\nCALL_FUNCTION(IsWindowCollapsed, bool)\nPUSH_BOOL(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          IsWindowFocused(ImGuiFocusedFlags flags=0); // is current window focused? or its root/child, depending on flags. see flags for options.\n// Unsupported arg type ImGuiFocusedFlags flags=0\n//    IMGUI_API bool          IsWindowHovered(ImGuiHoveredFlags flags=0); // is current window hovered (and typically: not blocked by a popup/modal)? see flags for options. NB: If you are trying to check whether your mouse should be dispatched to imgui or to your app, you should use the 'io.WantCaptureMouse' boolean for that! Please read the FAQ!\n// Unsupported arg type ImGuiHoveredFlags flags=0\n//    IMGUI_API ImDrawList*   GetWindowDrawList();                        // get draw list associated to the window, to append your own drawing primitives\n// Unsupported return type ImDrawList*\n//    IMGUI_API ImVec2        GetWindowPos();                             // get current window position in screen space (useful if you want to do your own drawing via the DrawList API)\nIMGUI_FUNCTION(GetWindowPos)\nCALL_FUNCTION(GetWindowPos, ImVec2)\nPUSH_NUMBER(ret.x)\nPUSH_NUMBER(ret.y)\nEND_IMGUI_FUNC\n//    IMGUI_API ImVec2        GetWindowSize();                            // get current window size\nIMGUI_FUNCTION(GetWindowSize)\nCALL_FUNCTION(GetWindowSize, ImVec2)\nPUSH_NUMBER(ret.x)\nPUSH_NUMBER(ret.y)\nEND_IMGUI_FUNC\n//    IMGUI_API float         GetWindowWidth();                           // get current window width (shortcut for GetWindowSize().x)\nIMGUI_FUNCTION(GetWindowWidth)\nCALL_FUNCTION(GetWindowWidth, float)\nPUSH_NUMBER(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API float         GetWindowHeight();                          // get current window height (shortcut for GetWindowSize().y)\nIMGUI_FUNCTION(GetWindowHeight)\nCALL_FUNCTION(GetWindowHeight, float)\nPUSH_NUMBER(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API ImVec2        GetContentRegionMax();                      // current content boundaries (typically window boundaries including scrolling, or current column boundaries), in windows coordinates\nIMGUI_FUNCTION(GetContentRegionMax)\nCALL_FUNCTION(GetContentRegionMax, ImVec2)\nPUSH_NUMBER(ret.x)\nPUSH_NUMBER(ret.y)\nEND_IMGUI_FUNC\n//    IMGUI_API ImVec2        GetContentRegionAvail();                    // == GetContentRegionMax() - GetCursorPos()\nIMGUI_FUNCTION(GetContentRegionAvail)\nCALL_FUNCTION(GetContentRegionAvail, ImVec2)\nPUSH_NUMBER(ret.x)\nPUSH_NUMBER(ret.y)\nEND_IMGUI_FUNC\n//    IMGUI_API float         GetContentRegionAvailWidth();               //\nIMGUI_FUNCTION(GetContentRegionAvailWidth)\nCALL_FUNCTION(GetContentRegionAvailWidth, float)\nPUSH_NUMBER(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API ImVec2        GetWindowContentRegionMin();                // content boundaries min (roughly (0,0)-Scroll), in window coordinates\nIMGUI_FUNCTION(GetWindowContentRegionMin)\nCALL_FUNCTION(GetWindowContentRegionMin, ImVec2)\nPUSH_NUMBER(ret.x)\nPUSH_NUMBER(ret.y)\nEND_IMGUI_FUNC\n//    IMGUI_API ImVec2        GetWindowContentRegionMax();                // content boundaries max (roughly (0,0)+Size-Scroll) where Size can be override with SetNextWindowContentSize(), in window coordinates\nIMGUI_FUNCTION(GetWindowContentRegionMax)\nCALL_FUNCTION(GetWindowContentRegionMax, ImVec2)\nPUSH_NUMBER(ret.x)\nPUSH_NUMBER(ret.y)\nEND_IMGUI_FUNC\n//    IMGUI_API float         GetWindowContentRegionWidth();              //\nIMGUI_FUNCTION(GetWindowContentRegionWidth)\nCALL_FUNCTION(GetWindowContentRegionWidth, float)\nPUSH_NUMBER(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API void          SetNextWindowPos(const ImVec2& pos, ImGuiCond cond = 0, const ImVec2& pivot = ImVec2 0 0); // set next window position. call before Begin(). use pivot=(0.5f,0.5f) to center on given point, etc.\n// Unsupported arg type  ImGuiCond cond = 0\n//    IMGUI_API void          SetNextWindowSize(const ImVec2& size, ImGuiCond cond = 0);                  // set next window size. set axis to 0.0f to force an auto-fit on this axis. call before Begin()\n// Unsupported arg type  ImGuiCond cond = 0\n//    IMGUI_API void          SetNextWindowSizeConstraints(const ImVec2& size_min, const ImVec2& size_max, ImGuiSizeCallback custom_callback = NULL, void* custom_callback_data = NULL); // set next window size limits. use -1,-1 on either X/Y axis to preserve the current size. Use callback to apply non-trivial programmatic constraints.\n// Unsupported arg type  ImGuiSizeCallback custom_callback = NULL\n// Unsupported arg type  void* custom_callback_data = NULL\n//    IMGUI_API void          SetNextWindowContentSize(const ImVec2& size);                               // set next window content size (~ enforce the range of scrollbars). not including window decorations (title bar, menu bar, etc.). set an axis to 0.0f to leave it automatic. call before Begin()\nIMGUI_FUNCTION(SetNextWindowContentSize)\nIM_VEC_2_ARG(size)\nCALL_FUNCTION_NO_RET(SetNextWindowContentSize, size)\nEND_IMGUI_FUNC\n//    IMGUI_API void          SetNextWindowCollapsed(bool collapsed, ImGuiCond cond = 0);                 // set next window collapsed state. call before Begin()\n// Unsupported arg type  ImGuiCond cond = 0\n//    IMGUI_API void          SetNextWindowFocus();                                                       // set next window to be focused / front-most. call before Begin()\nIMGUI_FUNCTION(SetNextWindowFocus)\nCALL_FUNCTION_NO_RET(SetNextWindowFocus)\nEND_IMGUI_FUNC\n//    IMGUI_API void          SetNextWindowBgAlpha(float alpha);                                          // set next window background color alpha. helper to easily modify ImGuiCol_WindowBg/ChildBg/PopupBg.\nIMGUI_FUNCTION(SetNextWindowBgAlpha)\nNUMBER_ARG(alpha)\nCALL_FUNCTION_NO_RET(SetNextWindowBgAlpha, alpha)\nEND_IMGUI_FUNC\n//    IMGUI_API void          SetWindowPos(const ImVec2& pos, ImGuiCond cond = 0);                        // (not recommended) set current window position - call within Begin()/End(). prefer using SetNextWindowPos(), as this may incur tearing and side-effects.\n// Unsupported arg type  ImGuiCond cond = 0\n//    IMGUI_API void          SetWindowSize(const ImVec2& size, ImGuiCond cond = 0);                      // (not recommended) set current window size - call within Begin()/End(). set to ImVec2 0 0 to force an auto-fit. prefer using SetNextWindowSize(), as this may incur tearing and minor side-effects.    \n// Unsupported arg type  ImGuiCond cond = 0\n//    IMGUI_API void          SetWindowCollapsed(bool collapsed, ImGuiCond cond = 0);                     // (not recommended) set current window collapsed state. prefer using SetNextWindowCollapsed().\n// Unsupported arg type  ImGuiCond cond = 0\n//    IMGUI_API void          SetWindowFocus();                                                           // (not recommended) set current window to be focused / front-most. prefer using SetNextWindowFocus().\nIMGUI_FUNCTION(SetWindowFocus)\nCALL_FUNCTION_NO_RET(SetWindowFocus)\nEND_IMGUI_FUNC\n//    IMGUI_API void          SetWindowFontScale(float scale);                                            // set font scale. Adjust IO.FontGlobalScale if you want to scale all windows\nIMGUI_FUNCTION(SetWindowFontScale)\nNUMBER_ARG(scale)\nCALL_FUNCTION_NO_RET(SetWindowFontScale, scale)\nEND_IMGUI_FUNC\n//    IMGUI_API void          SetWindowPos(const char* name, const ImVec2& pos, ImGuiCond cond = 0);      // set named window position.\n// Unsupported arg type  ImGuiCond cond = 0\n//    IMGUI_API void          SetWindowSize(const char* name, const ImVec2& size, ImGuiCond cond = 0);    // set named window size. set axis to 0.0f to force an auto-fit on this axis.\n// Unsupported arg type  ImGuiCond cond = 0\n//    IMGUI_API void          SetWindowCollapsed(const char* name, bool collapsed, ImGuiCond cond = 0);   // set named window collapsed state\n// Unsupported arg type  ImGuiCond cond = 0\n//    IMGUI_API void          SetWindowFocus(const char* name);                                           // set named window to be focused / front-most. use NULL to remove focus.\nIMGUI_FUNCTION(SetWindowFocus_1)\nLABEL_ARG(name)\nCALL_FUNCTION_NO_RET(SetWindowFocus, name)\nEND_IMGUI_FUNC\n//    IMGUI_API float         GetScrollX();                                                   // get scrolling amount [0..GetScrollMaxX()]\nIMGUI_FUNCTION(GetScrollX)\nCALL_FUNCTION(GetScrollX, float)\nPUSH_NUMBER(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API float         GetScrollY();                                                   // get scrolling amount [0..GetScrollMaxY()]\nIMGUI_FUNCTION(GetScrollY)\nCALL_FUNCTION(GetScrollY, float)\nPUSH_NUMBER(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API float         GetScrollMaxX();                                                // get maximum scrolling amount ~~ ContentSize.X - WindowSize.X\nIMGUI_FUNCTION(GetScrollMaxX)\nCALL_FUNCTION(GetScrollMaxX, float)\nPUSH_NUMBER(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API float         GetScrollMaxY();                                                // get maximum scrolling amount ~~ ContentSize.Y - WindowSize.Y\nIMGUI_FUNCTION(GetScrollMaxY)\nCALL_FUNCTION(GetScrollMaxY, float)\nPUSH_NUMBER(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API void          SetScrollX(float scroll_x);                                     // set scrolling amount [0..GetScrollMaxX()]\nIMGUI_FUNCTION(SetScrollX)\nNUMBER_ARG(scroll_x)\nCALL_FUNCTION_NO_RET(SetScrollX, scroll_x)\nEND_IMGUI_FUNC\n//    IMGUI_API void          SetScrollY(float scroll_y);                                     // set scrolling amount [0..GetScrollMaxY()]\nIMGUI_FUNCTION(SetScrollY)\nNUMBER_ARG(scroll_y)\nCALL_FUNCTION_NO_RET(SetScrollY, scroll_y)\nEND_IMGUI_FUNC\n//    IMGUI_API void          SetScrollHere(float center_y_ratio = 0.5f);                     // adjust scrolling amount to make current cursor position visible. center_y_ratio=0.0: top, 0.5: center, 1.0: bottom. When using to make a \"default/current item\" visible, consider using SetItemDefaultFocus() instead.\nIMGUI_FUNCTION(SetScrollHere)\nOPTIONAL_NUMBER_ARG(center_y_ratio, 0.5f)\nCALL_FUNCTION_NO_RET(SetScrollHere, center_y_ratio)\nEND_IMGUI_FUNC\n//    IMGUI_API void          SetScrollFromPosY(float pos_y, float center_y_ratio = 0.5f);    // adjust scrolling amount to make given position valid. use GetCursorPos() or GetCursorStartPos()+offset to get valid positions.\nIMGUI_FUNCTION(SetScrollFromPosY)\nNUMBER_ARG(pos_y)\nOPTIONAL_NUMBER_ARG(center_y_ratio, 0.5f)\nCALL_FUNCTION_NO_RET(SetScrollFromPosY, pos_y, center_y_ratio)\nEND_IMGUI_FUNC\n//    IMGUI_API void          PushFont(ImFont* font);                                         // use NULL as a shortcut to push default font\n// Unsupported arg type ImFont* font\n//    IMGUI_API void          PopFont();\nIMGUI_FUNCTION(PopFont)\nCALL_FUNCTION_NO_RET(PopFont)\nEND_IMGUI_FUNC\n//    IMGUI_API void          PushStyleColor(ImGuiCol idx, ImU32 col);\nIMGUI_FUNCTION(PushStyleColor)\nINT_ARG(idx)\nUINT_ARG(col)\nCALL_FUNCTION_NO_RET(PushStyleColor, idx, col)\nEND_IMGUI_FUNC\n//    IMGUI_API void          PushStyleColor(ImGuiCol idx, const ImVec4& col);\nIMGUI_FUNCTION(PushStyleColor_2)\nINT_ARG(idx)\nIM_VEC_4_ARG(col)\nCALL_FUNCTION_NO_RET(PushStyleColor, idx, col)\nEND_IMGUI_FUNC\n//    IMGUI_API void          PopStyleColor(int count = 1);\nIMGUI_FUNCTION(PopStyleColor)\nOPTIONAL_INT_ARG(count, 1)\nCALL_FUNCTION_NO_RET(PopStyleColor, count)\nEND_IMGUI_FUNC\n//    IMGUI_API void          PushStyleVar(ImGuiStyleVar idx, float val);\nIMGUI_FUNCTION(PushStyleVar)\nINT_ARG(idx)\nNUMBER_ARG(val)\nCALL_FUNCTION_NO_RET(PushStyleVar, idx, val)\nADD_END_STACK(3)\nEND_IMGUI_FUNC\n//    IMGUI_API void          PushStyleVar(ImGuiStyleVar idx, const ImVec2& val);\nIMGUI_FUNCTION(PushStyleVar_2)\nINT_ARG(idx)\nIM_VEC_2_ARG(val)\nCALL_FUNCTION_NO_RET(PushStyleVar, idx, val)\nADD_END_STACK(3)\nEND_IMGUI_FUNC\n//    IMGUI_API void          PopStyleVar(int count = 1);\nIMGUI_FUNCTION(PopStyleVar)\nOPTIONAL_INT_ARG(count, 1)\nCALL_FUNCTION_NO_RET(PopStyleVar, count)\nPOP_END_STACK(3)\nEND_IMGUI_FUNC\n//    IMGUI_API const ImVec4& GetStyleColorVec4(ImGuiCol idx);                                // retrieve style color as stored in ImGuiStyle structure. use to feed back into PushStyleColor(), otherwhise use GetColorU32() to get style color with style alpha baked in.\n// Unsupported return type const\n//    IMGUI_API ImFont*       GetFont();                                                      // get current font\n// Unsupported return type ImFont*\n//    IMGUI_API float         GetFontSize();                                                  // get current font size (= height in pixels) of current font with current scale applied\nIMGUI_FUNCTION(GetFontSize)\nCALL_FUNCTION(GetFontSize, float)\nPUSH_NUMBER(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API ImVec2        GetFontTexUvWhitePixel();                                       // get UV coordinate for a while pixel, useful to draw custom shapes via the ImDrawList API\nIMGUI_FUNCTION(GetFontTexUvWhitePixel)\nCALL_FUNCTION(GetFontTexUvWhitePixel, ImVec2)\nPUSH_NUMBER(ret.x)\nPUSH_NUMBER(ret.y)\nEND_IMGUI_FUNC\n//    IMGUI_API ImU32         GetColorU32(ImGuiCol idx, float alpha_mul = 1.0f);              // retrieve given style color with style alpha applied and optional extra alpha multiplier\nIMGUI_FUNCTION(GetColorU32)\nINT_ARG(idx)\nOPTIONAL_NUMBER_ARG(alpha_mul, 1.0f)\nCALL_FUNCTION(GetColorU32, unsigned int, idx, alpha_mul)\nPUSH_NUMBER(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API ImU32         GetColorU32(const ImVec4& col);                                 // retrieve given color with style alpha applied\nIMGUI_FUNCTION(GetColorU32_1)\nIM_VEC_4_ARG(col)\nCALL_FUNCTION(GetColorU32, unsigned int, col)\nPUSH_NUMBER(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API ImU32         GetColorU32(ImU32 col);                                         // retrieve given color with style alpha applied\nIMGUI_FUNCTION(GetColorU32_1_1)\nUINT_ARG(col)\nCALL_FUNCTION(GetColorU32, unsigned int, col)\nPUSH_NUMBER(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API void          PushItemWidth(float item_width);                                // width of items for the common item+label case, pixels. 0.0f = default to ~2/3 of windows width, >0.0f: width in pixels, <0.0f align xx pixels to the right of window (so -1.0f always align width to the right side)\nIMGUI_FUNCTION(PushItemWidth)\nNUMBER_ARG(item_width)\nCALL_FUNCTION_NO_RET(PushItemWidth, item_width)\nEND_IMGUI_FUNC\n//    IMGUI_API void          PopItemWidth();\nIMGUI_FUNCTION(PopItemWidth)\nCALL_FUNCTION_NO_RET(PopItemWidth)\nEND_IMGUI_FUNC\n//    IMGUI_API float         CalcItemWidth();                                                // width of item given pushed settings and current cursor position\nIMGUI_FUNCTION(CalcItemWidth)\nCALL_FUNCTION(CalcItemWidth, float)\nPUSH_NUMBER(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API void          PushTextWrapPos(float wrap_pos_x = 0.0f);                       // word-wrapping for Text*() commands. < 0.0f: no wrapping; 0.0f: wrap to end of window (or column); > 0.0f: wrap at 'wrap_pos_x' position in window local space\nIMGUI_FUNCTION(PushTextWrapPos)\nOPTIONAL_NUMBER_ARG(wrap_pos_x, 0.0f)\nCALL_FUNCTION_NO_RET(PushTextWrapPos, wrap_pos_x)\nEND_IMGUI_FUNC\n//    IMGUI_API void          PopTextWrapPos();\nIMGUI_FUNCTION(PopTextWrapPos)\nCALL_FUNCTION_NO_RET(PopTextWrapPos)\nEND_IMGUI_FUNC\n//    IMGUI_API void          PushAllowKeyboardFocus(bool allow_keyboard_focus);              // allow focusing using TAB/Shift-TAB, enabled by default but you can disable it for certain widgets\nIMGUI_FUNCTION(PushAllowKeyboardFocus)\nBOOL_ARG(allow_keyboard_focus)\nCALL_FUNCTION_NO_RET(PushAllowKeyboardFocus, allow_keyboard_focus)\nEND_IMGUI_FUNC\n//    IMGUI_API void          PopAllowKeyboardFocus();\nIMGUI_FUNCTION(PopAllowKeyboardFocus)\nCALL_FUNCTION_NO_RET(PopAllowKeyboardFocus)\nEND_IMGUI_FUNC\n//    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.\nIMGUI_FUNCTION(PushButtonRepeat)\nBOOL_ARG(repeat)\nCALL_FUNCTION_NO_RET(PushButtonRepeat, repeat)\nEND_IMGUI_FUNC\n//    IMGUI_API void          PopButtonRepeat();\nIMGUI_FUNCTION(PopButtonRepeat)\nCALL_FUNCTION_NO_RET(PopButtonRepeat)\nEND_IMGUI_FUNC\n//    IMGUI_API void          Separator();                                                    // separator, generally horizontal. inside a menu bar or in horizontal layout mode, this becomes a vertical separator.\nIMGUI_FUNCTION(Separator)\nCALL_FUNCTION_NO_RET(Separator)\nEND_IMGUI_FUNC\n//    IMGUI_API void          SameLine(float pos_x = 0.0f, float spacing_w = -1.0f);          // call between widgets or groups to layout them horizontally\nIMGUI_FUNCTION(SameLine)\nOPTIONAL_NUMBER_ARG(pos_x, 0.0f)\nOPTIONAL_NUMBER_ARG(spacing_w, -1.0f)\nCALL_FUNCTION_NO_RET(SameLine, pos_x, spacing_w)\nEND_IMGUI_FUNC\n//    IMGUI_API void          NewLine();                                                      // undo a SameLine()\nIMGUI_FUNCTION(NewLine)\nCALL_FUNCTION_NO_RET(NewLine)\nEND_IMGUI_FUNC\n//    IMGUI_API void          Spacing();                                                      // add vertical spacing\nIMGUI_FUNCTION(Spacing)\nCALL_FUNCTION_NO_RET(Spacing)\nEND_IMGUI_FUNC\n//    IMGUI_API void          Dummy(const ImVec2& size);                                      // add a dummy item of given size\nIMGUI_FUNCTION(Dummy)\nIM_VEC_2_ARG(size)\nCALL_FUNCTION_NO_RET(Dummy, size)\nEND_IMGUI_FUNC\n//    IMGUI_API void          Indent(float indent_w = 0.0f);                                  // move content position toward the right, by style.IndentSpacing or indent_w if != 0\nIMGUI_FUNCTION(Indent)\nOPTIONAL_NUMBER_ARG(indent_w, 0.0f)\nCALL_FUNCTION_NO_RET(Indent, indent_w)\nEND_IMGUI_FUNC\n//    IMGUI_API void          Unindent(float indent_w = 0.0f);                                // move content position back to the left, by style.IndentSpacing or indent_w if != 0\nIMGUI_FUNCTION(Unindent)\nOPTIONAL_NUMBER_ARG(indent_w, 0.0f)\nCALL_FUNCTION_NO_RET(Unindent, indent_w)\nEND_IMGUI_FUNC\n//    IMGUI_API void          BeginGroup();                                                   // 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.)\nIMGUI_FUNCTION(BeginGroup)\nCALL_FUNCTION_NO_RET(BeginGroup)\nADD_END_STACK(4)\nEND_IMGUI_FUNC\n//    IMGUI_API void          EndGroup();\nIMGUI_FUNCTION(EndGroup)\nCALL_FUNCTION_NO_RET(EndGroup)\nPOP_END_STACK(4)\nEND_IMGUI_FUNC\n//    IMGUI_API ImVec2        GetCursorPos();                                                 // cursor position is relative to window position\nIMGUI_FUNCTION(GetCursorPos)\nCALL_FUNCTION(GetCursorPos, ImVec2)\nPUSH_NUMBER(ret.x)\nPUSH_NUMBER(ret.y)\nEND_IMGUI_FUNC\n//    IMGUI_API float         GetCursorPosX();                                                // \"\nIMGUI_FUNCTION(GetCursorPosX)\nCALL_FUNCTION(GetCursorPosX, float)\nPUSH_NUMBER(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API float         GetCursorPosY();                                                // \"\nIMGUI_FUNCTION(GetCursorPosY)\nCALL_FUNCTION(GetCursorPosY, float)\nPUSH_NUMBER(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API void          SetCursorPos(const ImVec2& local_pos);                          // \"\nIMGUI_FUNCTION(SetCursorPos)\nIM_VEC_2_ARG(local_pos)\nCALL_FUNCTION_NO_RET(SetCursorPos, local_pos)\nEND_IMGUI_FUNC\n//    IMGUI_API void          SetCursorPosX(float x);                                         // \"\nIMGUI_FUNCTION(SetCursorPosX)\nNUMBER_ARG(x)\nCALL_FUNCTION_NO_RET(SetCursorPosX, x)\nEND_IMGUI_FUNC\n//    IMGUI_API void          SetCursorPosY(float y);                                         // \"\nIMGUI_FUNCTION(SetCursorPosY)\nNUMBER_ARG(y)\nCALL_FUNCTION_NO_RET(SetCursorPosY, y)\nEND_IMGUI_FUNC\n//    IMGUI_API ImVec2        GetCursorStartPos();                                            // initial cursor position\nIMGUI_FUNCTION(GetCursorStartPos)\nCALL_FUNCTION(GetCursorStartPos, ImVec2)\nPUSH_NUMBER(ret.x)\nPUSH_NUMBER(ret.y)\nEND_IMGUI_FUNC\n//    IMGUI_API ImVec2        GetCursorScreenPos();                                           // cursor position in absolute screen coordinates [0..io.DisplaySize] (useful to work with ImDrawList API)\nIMGUI_FUNCTION(GetCursorScreenPos)\nCALL_FUNCTION(GetCursorScreenPos, ImVec2)\nPUSH_NUMBER(ret.x)\nPUSH_NUMBER(ret.y)\nEND_IMGUI_FUNC\n//    IMGUI_API void          SetCursorScreenPos(const ImVec2& screen_pos);                   // cursor position in absolute screen coordinates [0..io.DisplaySize]\nIMGUI_FUNCTION(SetCursorScreenPos)\nIM_VEC_2_ARG(screen_pos)\nCALL_FUNCTION_NO_RET(SetCursorScreenPos, screen_pos)\nEND_IMGUI_FUNC\n//    IMGUI_API void          AlignTextToFramePadding();                                      // vertically align upcoming text baseline to FramePadding.y so that it will align properly to regularly framed items (call if you have text on a line before a framed item)\nIMGUI_FUNCTION(AlignTextToFramePadding)\nCALL_FUNCTION_NO_RET(AlignTextToFramePadding)\nEND_IMGUI_FUNC\n//    IMGUI_API float         GetTextLineHeight();                                            // ~ FontSize\nIMGUI_FUNCTION(GetTextLineHeight)\nCALL_FUNCTION(GetTextLineHeight, float)\nPUSH_NUMBER(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API float         GetTextLineHeightWithSpacing();                                 // ~ FontSize + style.ItemSpacing.y (distance in pixels between 2 consecutive lines of text)\nIMGUI_FUNCTION(GetTextLineHeightWithSpacing)\nCALL_FUNCTION(GetTextLineHeightWithSpacing, float)\nPUSH_NUMBER(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API float         GetFrameHeight();                                               // ~ FontSize + style.FramePadding.y * 2\nIMGUI_FUNCTION(GetFrameHeight)\nCALL_FUNCTION(GetFrameHeight, float)\nPUSH_NUMBER(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API float         GetFrameHeightWithSpacing();                                    // ~ FontSize + style.FramePadding.y * 2 + style.ItemSpacing.y (distance in pixels between 2 consecutive lines of framed widgets)\nIMGUI_FUNCTION(GetFrameHeightWithSpacing)\nCALL_FUNCTION(GetFrameHeightWithSpacing, float)\nPUSH_NUMBER(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API void          PushID(const char* str_id);                                     // push identifier into the ID stack. IDs are hash of the entire stack!\nIMGUI_FUNCTION(PushID)\nLABEL_ARG(str_id)\nCALL_FUNCTION_NO_RET(PushID, str_id)\nEND_IMGUI_FUNC\n//    IMGUI_API void          PushID(const char* str_id_begin, const char* str_id_end);\nIMGUI_FUNCTION(PushID_2)\nLABEL_ARG(str_id_begin)\nLABEL_ARG(str_id_end)\nCALL_FUNCTION_NO_RET(PushID, str_id_begin, str_id_end)\nEND_IMGUI_FUNC\n//    IMGUI_API void          PushID(const void* ptr_id);\n// Unsupported arg type const void* ptr_id\n//    IMGUI_API void          PushID(int int_id);\nIMGUI_FUNCTION(PushID_1)\nINT_ARG(int_id)\nCALL_FUNCTION_NO_RET(PushID, int_id)\nEND_IMGUI_FUNC\n//    IMGUI_API void          PopID();\nIMGUI_FUNCTION(PopID)\nCALL_FUNCTION_NO_RET(PopID)\nEND_IMGUI_FUNC\n//    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\nIMGUI_FUNCTION(GetID)\nLABEL_ARG(str_id)\nCALL_FUNCTION(GetID, unsigned int, str_id)\nPUSH_NUMBER(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API ImGuiID       GetID(const char* str_id_begin, const char* str_id_end);\nIMGUI_FUNCTION(GetID_2)\nLABEL_ARG(str_id_begin)\nLABEL_ARG(str_id_end)\nCALL_FUNCTION(GetID, unsigned int, str_id_begin, str_id_end)\nPUSH_NUMBER(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API ImGuiID       GetID(const void* ptr_id);\n// Unsupported arg type const void* ptr_id\n//    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.\nIMGUI_FUNCTION(TextUnformatted)\nLABEL_ARG(text)\nOPTIONAL_LABEL_ARG(text_end)\nCALL_FUNCTION_NO_RET(TextUnformatted, text, text_end)\nEND_IMGUI_FUNC\n//    IMGUI_API void          Text(const char* fmt, ...)                                      IM_FMTARGS(1); // simple formatted text\n// Unsupported arg type  ...)                                      IM_FMTARGS(1\n//    IMGUI_API void          TextV(const char* fmt, va_list args)                            IM_FMTLIST(1);\n// Unsupported arg type  va_list args)                            IM_FMTLIST(1\n//    IMGUI_API void          TextColored(const ImVec4& col, const char* fmt, ...)            IM_FMTARGS(2); // shortcut for PushStyleColor(ImGuiCol_Text, col); Text(fmt, ...); PopStyleColor();\n// Unsupported arg type  ...)            IM_FMTARGS(2\n//    IMGUI_API void          TextColoredV(const ImVec4& col, const char* fmt, va_list args)  IM_FMTLIST(2);\n// Unsupported arg type  va_list args)  IM_FMTLIST(2\n//    IMGUI_API void          TextDisabled(const char* fmt, ...)                              IM_FMTARGS(1); // shortcut for PushStyleColor(ImGuiCol_Text, style.Colors[ImGuiCol_TextDisabled]); Text(fmt, ...); PopStyleColor();\n// Unsupported arg type  ...)                              IM_FMTARGS(1\n//    IMGUI_API void          TextDisabledV(const char* fmt, va_list args)                    IM_FMTLIST(1);\n// Unsupported arg type  va_list args)                    IM_FMTLIST(1\n//    IMGUI_API void          TextWrapped(const char* fmt, ...)                               IM_FMTARGS(1); // shortcut for PushTextWrapPos(0.0f); Text(fmt, ...); PopTextWrapPos();. Note that this won't work on an auto-resizing window if there's no other widgets to extend the window width, yoy may need to set a size using SetNextWindowSize().\n// Unsupported arg type  ...)                               IM_FMTARGS(1\n//    IMGUI_API void          TextWrappedV(const char* fmt, va_list args)                     IM_FMTLIST(1);\n// Unsupported arg type  va_list args)                     IM_FMTLIST(1\n//    IMGUI_API void          LabelText(const char* label, const char* fmt, ...)              IM_FMTARGS(2); // display text+label aligned the same way as value+label widgets\n// Unsupported arg type  ...)              IM_FMTARGS(2\n//    IMGUI_API void          LabelTextV(const char* label, const char* fmt, va_list args)    IM_FMTLIST(2);\n// Unsupported arg type  va_list args)    IM_FMTLIST(2\n//    IMGUI_API void          BulletText(const char* fmt, ...)                                IM_FMTARGS(1); // shortcut for Bullet()+Text()\n// Unsupported arg type  ...)                                IM_FMTARGS(1\n//    IMGUI_API void          BulletTextV(const char* fmt, va_list args)                      IM_FMTLIST(1);\n// Unsupported arg type  va_list args)                      IM_FMTLIST(1\n//    IMGUI_API bool          Button(const char* label, const ImVec2& size = ImVec2 0 0);    // button\nIMGUI_FUNCTION(Button)\nLABEL_ARG(label)\nOPTIONAL_IM_VEC_2_ARG(size, 0, 0)\nCALL_FUNCTION(Button, bool, label, size)\nPUSH_BOOL(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          SmallButton(const char* label);                                 // button with FramePadding=(0,0) to easily embed within text\nIMGUI_FUNCTION(SmallButton)\nLABEL_ARG(label)\nCALL_FUNCTION(SmallButton, bool, label)\nPUSH_BOOL(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          ArrowButton(const char* str_id, ImGuiDir dir);\n// Unsupported arg type  ImGuiDir dir\n//    IMGUI_API bool          InvisibleButton(const char* str_id, const ImVec2& size);        // button behavior without the visuals, useful to build custom behaviors using the public api (along with IsItemActive, IsItemHovered, etc.)\nIMGUI_FUNCTION(InvisibleButton)\nLABEL_ARG(str_id)\nIM_VEC_2_ARG(size)\nCALL_FUNCTION(InvisibleButton, bool, str_id, size)\nPUSH_BOOL(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API void          Image(ImTextureID user_texture_id, const ImVec2& size, const ImVec2& uv0 = ImVec2 0 0, const ImVec2& uv1 = ImVec2 1 1, const ImVec4& tint_col = ImVec4 1 1 1 1, const ImVec4& border_col = ImVec4 0 0 0 0);\nIMGUI_FUNCTION(Image)\nIM_TEXTURE_ID_ARG(user_texture_id)\nIM_VEC_2_ARG(size)\nOPTIONAL_IM_VEC_2_ARG(uv0, 0, 0)\nOPTIONAL_IM_VEC_2_ARG(uv1, 1, 1)\nOPTIONAL_IM_VEC_4_ARG(tint_col, 1, 1, 1, 1)\nOPTIONAL_IM_VEC_4_ARG(border_col, 0, 0, 0, 0)\nCALL_FUNCTION_NO_RET(Image, user_texture_id, size, uv0, uv1, tint_col, border_col)\nEND_IMGUI_FUNC\n//    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);    // <0 frame_padding uses default frame padding settings. 0 for no padding\nIMGUI_FUNCTION(ImageButton)\nIM_TEXTURE_ID_ARG(user_texture_id)\nIM_VEC_2_ARG(size)\nOPTIONAL_IM_VEC_2_ARG(uv0, 0, 0)\nOPTIONAL_IM_VEC_2_ARG(uv1, 1, 1)\nOPTIONAL_INT_ARG(frame_padding, -1)\nOPTIONAL_IM_VEC_4_ARG(bg_col, 0, 0, 0, 0)\nOPTIONAL_IM_VEC_4_ARG(tint_col, 1, 1, 1, 1)\nCALL_FUNCTION(ImageButton, bool, user_texture_id, size, uv0, uv1, frame_padding, bg_col, tint_col)\nPUSH_BOOL(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          Checkbox(const char* label, bool* v);\nIMGUI_FUNCTION(Checkbox)\nLABEL_ARG(label)\nBOOL_POINTER_ARG(v)\nCALL_FUNCTION(Checkbox, bool, label, v)\nPUSH_BOOL(ret)\nEND_BOOL_POINTER(v)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          CheckboxFlags(const char* label, unsigned int* flags, unsigned int flags_value);\nIMGUI_FUNCTION(CheckboxFlags)\nLABEL_ARG(label)\nUINT_POINTER_ARG(flags)\nUINT_ARG(flags_value)\nCALL_FUNCTION(CheckboxFlags, bool, label, flags, flags_value)\nPUSH_BOOL(ret)\nEND_UINT_POINTER(flags)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          RadioButton(const char* label, bool active);\nIMGUI_FUNCTION(RadioButton)\nLABEL_ARG(label)\nBOOL_ARG(active)\nCALL_FUNCTION(RadioButton, bool, label, active)\nPUSH_BOOL(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          RadioButton(const char* label, int* v, int v_button);\nIMGUI_FUNCTION(RadioButton_3)\nLABEL_ARG(label)\nINT_POINTER_ARG(v)\nINT_ARG(v_button)\nCALL_FUNCTION(RadioButton, bool, label, v, v_button)\nPUSH_BOOL(ret)\nEND_INT_POINTER(v)\nEND_IMGUI_FUNC\n//    IMGUI_API void          PlotLines(const char* label, const float* values, int values_count, int values_offset = 0, const char* overlay_text = NULL, float scale_min = FLT_MAX, float scale_max = FLT_MAX, ImVec2 graph_size = ImVec2 0 0, int stride = sizeof(float));\n// Unsupported arg type  const float* values\n// Unsupported arg type  ImVec2 graph_size = ImVec2 0 0\n//    IMGUI_API void          PlotLines(const char* label, float (*values_getter)(void* data, int idx), void* data, int values_count, int values_offset = 0, const char* overlay_text = NULL, float scale_min = FLT_MAX, float scale_max = FLT_MAX, ImVec2 graph_size = ImVec2 0 0);\n// Unsupported arg type  float (*values_getter)(void* data\n// Unsupported arg type  void* data\n// Unsupported arg type  ImVec2 graph_size = ImVec2 0 0\n//    IMGUI_API void          PlotHistogram(const char* label, const float* values, int values_count, int values_offset = 0, const char* overlay_text = NULL, float scale_min = FLT_MAX, float scale_max = FLT_MAX, ImVec2 graph_size = ImVec2 0 0, int stride = sizeof(float));\n// Unsupported arg type  const float* values\n// Unsupported arg type  ImVec2 graph_size = ImVec2 0 0\n//    IMGUI_API void          PlotHistogram(const char* label, float (*values_getter)(void* data, int idx), void* data, int values_count, int values_offset = 0, const char* overlay_text = NULL, float scale_min = FLT_MAX, float scale_max = FLT_MAX, ImVec2 graph_size = ImVec2 0 0);\n// Unsupported arg type  float (*values_getter)(void* data\n// Unsupported arg type  void* data\n// Unsupported arg type  ImVec2 graph_size = ImVec2 0 0\n//    IMGUI_API void          ProgressBar(float fraction, const ImVec2& size_arg = ImVec2 -1 0, const char* overlay = NULL);\nIMGUI_FUNCTION(ProgressBar)\nNUMBER_ARG(fraction)\nOPTIONAL_IM_VEC_2_ARG(size_arg, -1, 0)\nOPTIONAL_LABEL_ARG(overlay)\nCALL_FUNCTION_NO_RET(ProgressBar, fraction, size_arg, overlay)\nEND_IMGUI_FUNC\n//    IMGUI_API void          Bullet();                                                       // draw a small circle and keep the cursor on the same line. advance cursor x position by GetTreeNodeToLabelSpacing(), same distance that TreeNode() uses\nIMGUI_FUNCTION(Bullet)\nCALL_FUNCTION_NO_RET(Bullet)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          BeginCombo(const char* label, const char* preview_value, ImGuiComboFlags flags = 0);\n// Unsupported arg type  ImGuiComboFlags flags = 0\n//    IMGUI_API void          EndCombo(); // only call EndCombo() if BeginCombo() returns true!\nIMGUI_FUNCTION(EndCombo)\nCALL_FUNCTION_NO_RET(EndCombo)\nPOP_END_STACK(5)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          Combo(const char* label, int* current_item, const char* const items[], int items_count, int popup_max_height_in_items = -1);\n// Unsupported arg type  const char* const items[]\n//    IMGUI_API bool          Combo(const char* label, int* current_item, const char* items_separated_by_zeros, int popup_max_height_in_items = -1);      // Separate items with \\0 within a string, end item-list with \\0\\0. e.g. \"One\\0Two\\0Three\\0\"\nIMGUI_FUNCTION(Combo)\nLABEL_ARG(label)\nINT_POINTER_ARG(current_item)\nLABEL_ARG(items_separated_by_zeros)\nOPTIONAL_INT_ARG(popup_max_height_in_items, -1)\nCALL_FUNCTION(Combo, bool, label, current_item, items_separated_by_zeros, popup_max_height_in_items)\nPUSH_BOOL(ret)\nEND_INT_POINTER(current_item)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          Combo(const char* label, int* current_item, bool(*items_getter)(void* data, int idx, const char** out_text), void* data, int items_count, int popup_max_height_in_items = -1);\n// Unsupported arg type  bool(*items_getter)(void* data\n// Unsupported arg type  const char** out_text)\n// Unsupported arg type  void* data\n//    IMGUI_API bool          DragFloat(const char* label, float* v, float v_speed = 1.0f, float v_min = 0.0f, float v_max = 0.0f, const char* display_format = \"%.3f\", float power = 1.0f);     // If v_min >= v_max we have no bound\nIMGUI_FUNCTION(DragFloat)\nLABEL_ARG(label)\nFLOAT_POINTER_ARG(v)\nOPTIONAL_NUMBER_ARG(v_speed, 1.0f)\nOPTIONAL_NUMBER_ARG(v_min, 0.0f)\nOPTIONAL_NUMBER_ARG(v_max, 0.0f)\nLABEL_ARG(display_format)\nOPTIONAL_NUMBER_ARG(power, 1.0f)\nCALL_FUNCTION(DragFloat, bool, label, v, v_speed, v_min, v_max, display_format, power)\nPUSH_BOOL(ret)\nEND_FLOAT_POINTER(v)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          DragFloat2(const char* label, float v[2], float v_speed = 1.0f, float v_min = 0.0f, float v_max = 0.0f, const char* display_format = \"%.3f\", float power = 1.0f);\n// Unsupported arg type  float v[2]\n//    IMGUI_API bool          DragFloat3(const char* label, float v[3], float v_speed = 1.0f, float v_min = 0.0f, float v_max = 0.0f, const char* display_format = \"%.3f\", float power = 1.0f);\n// Unsupported arg type  float v[3]\n//    IMGUI_API bool          DragFloat4(const char* label, float v[4], float v_speed = 1.0f, float v_min = 0.0f, float v_max = 0.0f, const char* display_format = \"%.3f\", float power = 1.0f);\n// Unsupported arg type  float v[4]\n//    IMGUI_API bool          DragFloatRange2(const char* label, float* v_current_min, float* v_current_max, float v_speed = 1.0f, float v_min = 0.0f, float v_max = 0.0f, const char* display_format = \"%.3f\", const char* display_format_max = NULL, float power = 1.0f);\nIMGUI_FUNCTION(DragFloatRange2)\nLABEL_ARG(label)\nFLOAT_POINTER_ARG(v_current_min)\nFLOAT_POINTER_ARG(v_current_max)\nOPTIONAL_NUMBER_ARG(v_speed, 1.0f)\nOPTIONAL_NUMBER_ARG(v_min, 0.0f)\nOPTIONAL_NUMBER_ARG(v_max, 0.0f)\nLABEL_ARG(display_format)\nOPTIONAL_LABEL_ARG(display_format_max)\nOPTIONAL_NUMBER_ARG(power, 1.0f)\nCALL_FUNCTION(DragFloatRange2, bool, label, v_current_min, v_current_max, v_speed, v_min, v_max, display_format, display_format_max, power)\nPUSH_BOOL(ret)\nEND_FLOAT_POINTER(v_current_min)\nEND_FLOAT_POINTER(v_current_max)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          DragInt(const char* label, int* v, float v_speed = 1.0f, int v_min = 0, int v_max = 0, const char* display_format = \"%.0f\");                                       // If v_min >= v_max we have no bound\nIMGUI_FUNCTION(DragInt)\nLABEL_ARG(label)\nINT_POINTER_ARG(v)\nOPTIONAL_NUMBER_ARG(v_speed, 1.0f)\nOPTIONAL_INT_ARG(v_min, 0)\nOPTIONAL_INT_ARG(v_max, 0)\nLABEL_ARG(display_format)\nCALL_FUNCTION(DragInt, bool, label, v, v_speed, v_min, v_max, display_format)\nPUSH_BOOL(ret)\nEND_INT_POINTER(v)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          DragInt2(const char* label, int v[2], float v_speed = 1.0f, int v_min = 0, int v_max = 0, const char* display_format = \"%.0f\");\n// Unsupported arg type  int v[2]\n//    IMGUI_API bool          DragInt3(const char* label, int v[3], float v_speed = 1.0f, int v_min = 0, int v_max = 0, const char* display_format = \"%.0f\");\n// Unsupported arg type  int v[3]\n//    IMGUI_API bool          DragInt4(const char* label, int v[4], float v_speed = 1.0f, int v_min = 0, int v_max = 0, const char* display_format = \"%.0f\");\n// Unsupported arg type  int v[4]\n//    IMGUI_API bool          DragIntRange2(const char* label, int* v_current_min, int* v_current_max, float v_speed = 1.0f, int v_min = 0, int v_max = 0, const char* display_format = \"%.0f\", const char* display_format_max = NULL);\nIMGUI_FUNCTION(DragIntRange2)\nLABEL_ARG(label)\nINT_POINTER_ARG(v_current_min)\nINT_POINTER_ARG(v_current_max)\nOPTIONAL_NUMBER_ARG(v_speed, 1.0f)\nOPTIONAL_INT_ARG(v_min, 0)\nOPTIONAL_INT_ARG(v_max, 0)\nLABEL_ARG(display_format)\nOPTIONAL_LABEL_ARG(display_format_max)\nCALL_FUNCTION(DragIntRange2, bool, label, v_current_min, v_current_max, v_speed, v_min, v_max, display_format, display_format_max)\nPUSH_BOOL(ret)\nEND_INT_POINTER(v_current_min)\nEND_INT_POINTER(v_current_max)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          InputText(const char* label, char* buf, size_t buf_size, ImGuiInputTextFlags flags = 0, ImGuiTextEditCallback callback = NULL, void* user_data = NULL);\n// Unsupported arg type  char* buf\n// Unsupported arg type  size_t buf_size\n// Unsupported arg type  ImGuiTextEditCallback callback = NULL\n// Unsupported arg type  void* user_data = NULL\n//    IMGUI_API bool          InputTextMultiline(const char* label, char* buf, size_t buf_size, const ImVec2& size = ImVec2 0 0, ImGuiInputTextFlags flags = 0, ImGuiTextEditCallback callback = NULL, void* user_data = NULL);\n// Unsupported arg type  char* buf\n// Unsupported arg type  size_t buf_size\n// Unsupported arg type  ImGuiTextEditCallback callback = NULL\n// Unsupported arg type  void* user_data = NULL\n//    IMGUI_API bool          InputFloat(const char* label, float* v, float step = 0.0f, float step_fast = 0.0f, int decimal_precision = -1, ImGuiInputTextFlags extra_flags = 0);\nIMGUI_FUNCTION(InputFloat)\nLABEL_ARG(label)\nFLOAT_POINTER_ARG(v)\nOPTIONAL_NUMBER_ARG(step, 0.0f)\nOPTIONAL_NUMBER_ARG(step_fast, 0.0f)\nOPTIONAL_INT_ARG(decimal_precision, -1)\nOPTIONAL_INT_ARG(extra_flags, 0)\nCALL_FUNCTION(InputFloat, bool, label, v, step, step_fast, decimal_precision, extra_flags)\nPUSH_BOOL(ret)\nEND_FLOAT_POINTER(v)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          InputFloat2(const char* label, float v[2], int decimal_precision = -1, ImGuiInputTextFlags extra_flags = 0);\n// Unsupported arg type  float v[2]\n//    IMGUI_API bool          InputFloat3(const char* label, float v[3], int decimal_precision = -1, ImGuiInputTextFlags extra_flags = 0);\n// Unsupported arg type  float v[3]\n//    IMGUI_API bool          InputFloat4(const char* label, float v[4], int decimal_precision = -1, ImGuiInputTextFlags extra_flags = 0);\n// Unsupported arg type  float v[4]\n//    IMGUI_API bool          InputInt(const char* label, int* v, int step = 1, int step_fast = 100, ImGuiInputTextFlags extra_flags = 0);\nIMGUI_FUNCTION(InputInt)\nLABEL_ARG(label)\nINT_POINTER_ARG(v)\nOPTIONAL_INT_ARG(step, 1)\nOPTIONAL_INT_ARG(step_fast, 100)\nOPTIONAL_INT_ARG(extra_flags, 0)\nCALL_FUNCTION(InputInt, bool, label, v, step, step_fast, extra_flags)\nPUSH_BOOL(ret)\nEND_INT_POINTER(v)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          InputInt2(const char* label, int v[2], ImGuiInputTextFlags extra_flags = 0);\n// Unsupported arg type  int v[2]\n//    IMGUI_API bool          InputInt3(const char* label, int v[3], ImGuiInputTextFlags extra_flags = 0);\n// Unsupported arg type  int v[3]\n//    IMGUI_API bool          InputInt4(const char* label, int v[4], ImGuiInputTextFlags extra_flags = 0);\n// Unsupported arg type  int v[4]\n//    IMGUI_API bool          InputDouble(const char* label, double* v, double step = 0.0f, double step_fast = 0.0f, const char* display_format = \"%.6f\", ImGuiInputTextFlags extra_flags = 0);\n// Unsupported arg type  double* v\n// Unsupported arg type  double step = 0.0f\n// Unsupported arg type  double step_fast = 0.0f\n//    IMGUI_API bool          SliderFloat(const char* label, float* v, float v_min, float v_max, const char* display_format = \"%.3f\", float power = 1.0f);     // adjust display_format to decorate the value with a prefix or a suffix for in-slider labels or unit display. Use power!=1.0 for logarithmic sliders\nIMGUI_FUNCTION(SliderFloat)\nLABEL_ARG(label)\nFLOAT_POINTER_ARG(v)\nNUMBER_ARG(v_min)\nNUMBER_ARG(v_max)\nLABEL_ARG(display_format)\nOPTIONAL_NUMBER_ARG(power, 1.0f)\nCALL_FUNCTION(SliderFloat, bool, label, v, v_min, v_max, display_format, power)\nPUSH_BOOL(ret)\nEND_FLOAT_POINTER(v)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          SliderFloat2(const char* label, float v[2], float v_min, float v_max, const char* display_format = \"%.3f\", float power = 1.0f);\n// Unsupported arg type  float v[2]\n//    IMGUI_API bool          SliderFloat3(const char* label, float v[3], float v_min, float v_max, const char* display_format = \"%.3f\", float power = 1.0f);\n// Unsupported arg type  float v[3]\n//    IMGUI_API bool          SliderFloat4(const char* label, float v[4], float v_min, float v_max, const char* display_format = \"%.3f\", float power = 1.0f);\n// Unsupported arg type  float v[4]\n//    IMGUI_API bool          SliderAngle(const char* label, float* v_rad, float v_degrees_min = -360.0f, float v_degrees_max = +360.0f);\nIMGUI_FUNCTION(SliderAngle)\nLABEL_ARG(label)\nFLOAT_POINTER_ARG(v_rad)\nOPTIONAL_NUMBER_ARG(v_degrees_min, -360.0f)\nOPTIONAL_NUMBER_ARG(v_degrees_max, +360.0f)\nCALL_FUNCTION(SliderAngle, bool, label, v_rad, v_degrees_min, v_degrees_max)\nPUSH_BOOL(ret)\nEND_FLOAT_POINTER(v_rad)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          SliderInt(const char* label, int* v, int v_min, int v_max, const char* display_format = \"%.0f\");\nIMGUI_FUNCTION(SliderInt)\nLABEL_ARG(label)\nINT_POINTER_ARG(v)\nINT_ARG(v_min)\nINT_ARG(v_max)\nLABEL_ARG(display_format)\nCALL_FUNCTION(SliderInt, bool, label, v, v_min, v_max, display_format)\nPUSH_BOOL(ret)\nEND_INT_POINTER(v)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          SliderInt2(const char* label, int v[2], int v_min, int v_max, const char* display_format = \"%.0f\");\n// Unsupported arg type  int v[2]\n//    IMGUI_API bool          SliderInt3(const char* label, int v[3], int v_min, int v_max, const char* display_format = \"%.0f\");\n// Unsupported arg type  int v[3]\n//    IMGUI_API bool          SliderInt4(const char* label, int v[4], int v_min, int v_max, const char* display_format = \"%.0f\");\n// Unsupported arg type  int v[4]\n//    IMGUI_API bool          VSliderFloat(const char* label, const ImVec2& size, float* v, float v_min, float v_max, const char* display_format = \"%.3f\", float power = 1.0f);\nIMGUI_FUNCTION(VSliderFloat)\nLABEL_ARG(label)\nIM_VEC_2_ARG(size)\nFLOAT_POINTER_ARG(v)\nNUMBER_ARG(v_min)\nNUMBER_ARG(v_max)\nLABEL_ARG(display_format)\nOPTIONAL_NUMBER_ARG(power, 1.0f)\nCALL_FUNCTION(VSliderFloat, bool, label, size, v, v_min, v_max, display_format, power)\nPUSH_BOOL(ret)\nEND_FLOAT_POINTER(v)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          VSliderInt(const char* label, const ImVec2& size, int* v, int v_min, int v_max, const char* display_format = \"%.0f\");\nIMGUI_FUNCTION(VSliderInt)\nLABEL_ARG(label)\nIM_VEC_2_ARG(size)\nINT_POINTER_ARG(v)\nINT_ARG(v_min)\nINT_ARG(v_max)\nLABEL_ARG(display_format)\nCALL_FUNCTION(VSliderInt, bool, label, size, v, v_min, v_max, display_format)\nPUSH_BOOL(ret)\nEND_INT_POINTER(v)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          ColorEdit3(const char* label, float col[3], ImGuiColorEditFlags flags = 0);\n// Unsupported arg type  float col[3]\n// Unsupported arg type  ImGuiColorEditFlags flags = 0\n//    IMGUI_API bool          ColorEdit4(const char* label, float col[4], ImGuiColorEditFlags flags = 0);\n// Unsupported arg type  float col[4]\n// Unsupported arg type  ImGuiColorEditFlags flags = 0\n//    IMGUI_API bool          ColorPicker3(const char* label, float col[3], ImGuiColorEditFlags flags = 0);\n// Unsupported arg type  float col[3]\n// Unsupported arg type  ImGuiColorEditFlags flags = 0\n//    IMGUI_API bool          ColorPicker4(const char* label, float col[4], ImGuiColorEditFlags flags = 0, const float* ref_col = NULL);\n// Unsupported arg type  float col[4]\n// Unsupported arg type  ImGuiColorEditFlags flags = 0\n// Unsupported arg type  const float* ref_col = NULL\n//    IMGUI_API bool          ColorButton(const char* desc_id, const ImVec4& col, ImGuiColorEditFlags flags = 0, ImVec2 size = ImVec2 0 0);  // display a colored square/button, hover for details, return true when pressed.\n// Unsupported arg type  ImGuiColorEditFlags flags = 0\n// Unsupported arg type  ImVec2 size = ImVec2 0 0\n//    IMGUI_API void          SetColorEditOptions(ImGuiColorEditFlags flags);                     // initialize current options (generally on application startup) if you want to select a default format, picker type, etc. User will be able to change many settings, unless you pass the _NoOptions flag to your calls.\n// Unsupported arg type ImGuiColorEditFlags flags\n//    IMGUI_API bool          TreeNode(const char* label);                                        // if returning 'true' the node is open and the tree id is pushed into the id stack. user is responsible for calling TreePop().\nIMGUI_FUNCTION(TreeNode)\nLABEL_ARG(label)\nCALL_FUNCTION(TreeNode, bool, label)\nIF_RET_ADD_END_STACK(6)\nPUSH_BOOL(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          TreeNode(const char* str_id, const char* fmt, ...) IM_FMTARGS(2);   // read the FAQ about why and how to use ID. to align arbitrary text at the same level as a TreeNode() you can use Bullet().\n// Unsupported arg type  ...) IM_FMTARGS(2\n//    IMGUI_API bool          TreeNode(const void* ptr_id, const char* fmt, ...) IM_FMTARGS(2);   // \"\n// Unsupported arg type const void* ptr_id\n// Unsupported arg type  ...) IM_FMTARGS(2\n//    IMGUI_API bool          TreeNodeV(const char* str_id, const char* fmt, va_list args) IM_FMTLIST(2);\n// Unsupported arg type  va_list args) IM_FMTLIST(2\n//    IMGUI_API bool          TreeNodeV(const void* ptr_id, const char* fmt, va_list args) IM_FMTLIST(2);\n// Unsupported arg type const void* ptr_id\n// Unsupported arg type  va_list args) IM_FMTLIST(2\n//    IMGUI_API bool          TreeNodeEx(const char* label, ImGuiTreeNodeFlags flags = 0);\n// Unsupported arg type  ImGuiTreeNodeFlags flags = 0\n//    IMGUI_API bool          TreeNodeEx(const char* str_id, ImGuiTreeNodeFlags flags, const char* fmt, ...) IM_FMTARGS(3);\n// Unsupported arg type  ImGuiTreeNodeFlags flags\n// Unsupported arg type  ...) IM_FMTARGS(3\n//    IMGUI_API bool          TreeNodeEx(const void* ptr_id, ImGuiTreeNodeFlags flags, const char* fmt, ...) IM_FMTARGS(3);\n// Unsupported arg type const void* ptr_id\n// Unsupported arg type  ImGuiTreeNodeFlags flags\n// Unsupported arg type  ...) IM_FMTARGS(3\n//    IMGUI_API bool          TreeNodeExV(const char* str_id, ImGuiTreeNodeFlags flags, const char* fmt, va_list args) IM_FMTLIST(3);\n// Unsupported arg type  ImGuiTreeNodeFlags flags\n// Unsupported arg type  va_list args) IM_FMTLIST(3\n//    IMGUI_API bool          TreeNodeExV(const void* ptr_id, ImGuiTreeNodeFlags flags, const char* fmt, va_list args) IM_FMTLIST(3);\n// Unsupported arg type const void* ptr_id\n// Unsupported arg type  ImGuiTreeNodeFlags flags\n// Unsupported arg type  va_list args) IM_FMTLIST(3\n//    IMGUI_API void          TreePush(const char* str_id);                                       // ~ Indent()+PushId(). Already called by TreeNode() when returning true, but you can call Push/Pop yourself for layout purpose\nIMGUI_FUNCTION(TreePush)\nLABEL_ARG(str_id)\nCALL_FUNCTION_NO_RET(TreePush, str_id)\nADD_END_STACK(6)\nEND_IMGUI_FUNC\n//    IMGUI_API void          TreePush(const void* ptr_id = NULL);                                // \"\n// Unsupported arg type const void* ptr_id = NULL\n//    IMGUI_API void          TreePop();                                                          // ~ Unindent()+PopId()\nIMGUI_FUNCTION(TreePop)\nCALL_FUNCTION_NO_RET(TreePop)\nPOP_END_STACK(6)\nEND_IMGUI_FUNC\n//    IMGUI_API void          TreeAdvanceToLabelPos();                                            // advance cursor x position by GetTreeNodeToLabelSpacing()\nIMGUI_FUNCTION(TreeAdvanceToLabelPos)\nCALL_FUNCTION_NO_RET(TreeAdvanceToLabelPos)\nEND_IMGUI_FUNC\n//    IMGUI_API float         GetTreeNodeToLabelSpacing();                                        // horizontal distance preceding label when using TreeNode*() or Bullet() == (g.FontSize + style.FramePadding.x*2) for a regular unframed TreeNode\nIMGUI_FUNCTION(GetTreeNodeToLabelSpacing)\nCALL_FUNCTION(GetTreeNodeToLabelSpacing, float)\nPUSH_NUMBER(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API void          SetNextTreeNodeOpen(bool is_open, ImGuiCond cond = 0);              // set next TreeNode/CollapsingHeader open state.\n// Unsupported arg type  ImGuiCond cond = 0\n//    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().\n// Unsupported arg type  ImGuiTreeNodeFlags flags = 0\n//    IMGUI_API bool          CollapsingHeader(const char* label, bool* p_open, ImGuiTreeNodeFlags flags = 0); // when 'p_open' isn't NULL, display an additional small close button on upper right of the header\n// Unsupported arg type  ImGuiTreeNodeFlags flags = 0\n//    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\nIMGUI_FUNCTION(Selectable)\nLABEL_ARG(label)\nOPTIONAL_BOOL_ARG(selected, false)\nOPTIONAL_INT_ARG(flags, 0)\nOPTIONAL_IM_VEC_2_ARG(size, 0, 0)\nCALL_FUNCTION(Selectable, bool, label, selected, flags, size)\nPUSH_BOOL(ret)\nEND_IMGUI_FUNC\n//    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.\nIMGUI_FUNCTION(Selectable_4)\nLABEL_ARG(label)\nBOOL_POINTER_ARG(p_selected)\nOPTIONAL_INT_ARG(flags, 0)\nOPTIONAL_IM_VEC_2_ARG(size, 0, 0)\nCALL_FUNCTION(Selectable, bool, label, p_selected, flags, size)\nPUSH_BOOL(ret)\nEND_BOOL_POINTER(p_selected)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          ListBox(const char* label, int* current_item, const char* const items[], int items_count, int height_in_items = -1);\n// Unsupported arg type  const char* const items[]\n//    IMGUI_API bool          ListBox(const char* label, int* current_item, bool (*items_getter)(void* data, int idx, const char** out_text), void* data, int items_count, int height_in_items = -1);\n// Unsupported arg type  bool (*items_getter)(void* data\n// Unsupported arg type  const char** out_text)\n// Unsupported arg type  void* data\n//    IMGUI_API bool          ListBoxHeader(const char* label, const ImVec2& size = ImVec2 0 0); // use if you want to reimplement ListBox() will custom data or interactions. make sure to call ListBoxFooter() afterwards.\nIMGUI_FUNCTION(ListBoxHeader)\nLABEL_ARG(label)\nOPTIONAL_IM_VEC_2_ARG(size, 0, 0)\nCALL_FUNCTION(ListBoxHeader, bool, label, size)\nPUSH_BOOL(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          ListBoxHeader(const char* label, int items_count, int height_in_items = -1); // \"\nIMGUI_FUNCTION(ListBoxHeader_3)\nLABEL_ARG(label)\nINT_ARG(items_count)\nOPTIONAL_INT_ARG(height_in_items, -1)\nCALL_FUNCTION(ListBoxHeader, bool, label, items_count, height_in_items)\nPUSH_BOOL(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API void          ListBoxFooter();                                                    // terminate the scrolling region\nIMGUI_FUNCTION(ListBoxFooter)\nCALL_FUNCTION_NO_RET(ListBoxFooter)\nEND_IMGUI_FUNC\n//    IMGUI_API void          Value(const char* prefix, bool b);\nIMGUI_FUNCTION(Value)\nLABEL_ARG(prefix)\nBOOL_ARG(b)\nCALL_FUNCTION_NO_RET(Value, prefix, b)\nEND_IMGUI_FUNC\n//    IMGUI_API void          Value(const char* prefix, int v);\nIMGUI_FUNCTION(Value_2)\nLABEL_ARG(prefix)\nINT_ARG(v)\nCALL_FUNCTION_NO_RET(Value, prefix, v)\nEND_IMGUI_FUNC\n//    IMGUI_API void          Value(const char* prefix, unsigned int v);\nIMGUI_FUNCTION(Value_2_2)\nLABEL_ARG(prefix)\nUINT_ARG(v)\nCALL_FUNCTION_NO_RET(Value, prefix, v)\nEND_IMGUI_FUNC\n//    IMGUI_API void          Value(const char* prefix, float v, const char* float_format = NULL);\nIMGUI_FUNCTION(Value_3)\nLABEL_ARG(prefix)\nNUMBER_ARG(v)\nOPTIONAL_LABEL_ARG(float_format)\nCALL_FUNCTION_NO_RET(Value, prefix, v, float_format)\nEND_IMGUI_FUNC\n//    IMGUI_API void          SetTooltip(const char* fmt, ...) IM_FMTARGS(1);                     // set text tooltip under mouse-cursor, typically use with ImGui::IsItemHovered(). overidde any previous call to SetTooltip().\n// Unsupported arg type  ...) IM_FMTARGS(1\n//    IMGUI_API void          SetTooltipV(const char* fmt, va_list args) IM_FMTLIST(1);\n// Unsupported arg type  va_list args) IM_FMTLIST(1\n//    IMGUI_API void          BeginTooltip();                                                     // begin/append a tooltip window. to create full-featured tooltip (with any kind of contents).\nIMGUI_FUNCTION(BeginTooltip)\nCALL_FUNCTION_NO_RET(BeginTooltip)\nADD_END_STACK(7)\nEND_IMGUI_FUNC\n//    IMGUI_API void          EndTooltip();\nIMGUI_FUNCTION(EndTooltip)\nCALL_FUNCTION_NO_RET(EndTooltip)\nPOP_END_STACK(7)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          BeginMainMenuBar();                                                 // create and append to a full screen menu-bar.\nIMGUI_FUNCTION(BeginMainMenuBar)\nCALL_FUNCTION(BeginMainMenuBar, bool)\nIF_RET_ADD_END_STACK(8)\nPUSH_BOOL(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API void          EndMainMenuBar();                                                   // only call EndMainMenuBar() if BeginMainMenuBar() returns true!\nIMGUI_FUNCTION(EndMainMenuBar)\nCALL_FUNCTION_NO_RET(EndMainMenuBar)\nPOP_END_STACK(8)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          BeginMenuBar();                                                     // append to menu-bar of current window (requires ImGuiWindowFlags_MenuBar flag set on parent window).\nIMGUI_FUNCTION(BeginMenuBar)\nCALL_FUNCTION(BeginMenuBar, bool)\nIF_RET_ADD_END_STACK(9)\nPUSH_BOOL(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API void          EndMenuBar();                                                       // only call EndMenuBar() if BeginMenuBar() returns true!\nIMGUI_FUNCTION(EndMenuBar)\nCALL_FUNCTION_NO_RET(EndMenuBar)\nPOP_END_STACK(9)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          BeginMenu(const char* label, bool enabled = true);                  // create a sub-menu entry. only call EndMenu() if this returns true!\nIMGUI_FUNCTION(BeginMenu)\nLABEL_ARG(label)\nOPTIONAL_BOOL_ARG(enabled, true)\nCALL_FUNCTION(BeginMenu, bool, label, enabled)\nIF_RET_ADD_END_STACK(10)\nPUSH_BOOL(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API void          EndMenu();                                                          // only call EndMenu() if BeginMenu() returns true!\nIMGUI_FUNCTION(EndMenu)\nCALL_FUNCTION_NO_RET(EndMenu)\nPOP_END_STACK(10)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          MenuItem(const char* label, const char* shortcut = NULL, bool selected = false, bool enabled = true);  // return true when activated. shortcuts are displayed for convenience but not processed by ImGui at the moment\nIMGUI_FUNCTION(MenuItem)\nLABEL_ARG(label)\nOPTIONAL_LABEL_ARG(shortcut)\nOPTIONAL_BOOL_ARG(selected, false)\nOPTIONAL_BOOL_ARG(enabled, true)\nCALL_FUNCTION(MenuItem, bool, label, shortcut, selected, enabled)\nPUSH_BOOL(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          MenuItem(const char* label, const char* shortcut, bool* p_selected, bool enabled = true);              // return true when activated + toggle (*p_selected) if p_selected != NULL\nIMGUI_FUNCTION(MenuItem_4)\nLABEL_ARG(label)\nLABEL_ARG(shortcut)\nBOOL_POINTER_ARG(p_selected)\nOPTIONAL_BOOL_ARG(enabled, true)\nCALL_FUNCTION(MenuItem, bool, label, shortcut, p_selected, enabled)\nPUSH_BOOL(ret)\nEND_BOOL_POINTER(p_selected)\nEND_IMGUI_FUNC\n//    IMGUI_API void          OpenPopup(const char* str_id);                                      // call to mark popup as open (don't call every frame!). popups are closed when user click outside, or if CloseCurrentPopup() is called within a BeginPopup()/EndPopup() block. By default, Selectable()/MenuItem() are calling CloseCurrentPopup(). Popup identifiers are relative to the current ID-stack (so OpenPopup and BeginPopup needs to be at the same level).\nIMGUI_FUNCTION(OpenPopup)\nLABEL_ARG(str_id)\nCALL_FUNCTION_NO_RET(OpenPopup, str_id)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          BeginPopup(const char* str_id, ImGuiWindowFlags flags = 0);                                             // return true if the popup is open, and you can start outputting to it. only call EndPopup() if BeginPopup() returns true!\nIMGUI_FUNCTION(BeginPopup)\nLABEL_ARG(str_id)\nOPTIONAL_INT_ARG(flags, 0)\nCALL_FUNCTION(BeginPopup, bool, str_id, flags)\nIF_RET_ADD_END_STACK(11)\nPUSH_BOOL(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          BeginPopupContextItem(const char* str_id = NULL, int mouse_button = 1);                                 // helper to open and begin popup when clicked on last item. if you can pass a NULL str_id only if the previous item had an id. If you want to use that on a non-interactive item such as Text() you need to pass in an explicit ID here. read comments in .cpp!\nIMGUI_FUNCTION(BeginPopupContextItem)\nOPTIONAL_LABEL_ARG(str_id)\nOPTIONAL_INT_ARG(mouse_button, 1)\nCALL_FUNCTION(BeginPopupContextItem, bool, str_id, mouse_button)\nIF_RET_ADD_END_STACK(11)\nPUSH_BOOL(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          BeginPopupContextWindow(const char* str_id = NULL, int mouse_button = 1, bool also_over_items = true);  // helper to open and begin popup when clicked on current window.\nIMGUI_FUNCTION(BeginPopupContextWindow)\nOPTIONAL_LABEL_ARG(str_id)\nOPTIONAL_INT_ARG(mouse_button, 1)\nOPTIONAL_BOOL_ARG(also_over_items, true)\nCALL_FUNCTION(BeginPopupContextWindow, bool, str_id, mouse_button, also_over_items)\nIF_RET_ADD_END_STACK(11)\nPUSH_BOOL(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          BeginPopupContextVoid(const char* str_id = NULL, int mouse_button = 1);                                 // helper to open and begin popup when clicked in void (where there are no imgui windows).\nIMGUI_FUNCTION(BeginPopupContextVoid)\nOPTIONAL_LABEL_ARG(str_id)\nOPTIONAL_INT_ARG(mouse_button, 1)\nCALL_FUNCTION(BeginPopupContextVoid, bool, str_id, mouse_button)\nIF_RET_ADD_END_STACK(11)\nPUSH_BOOL(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          BeginPopupModal(const char* name, bool* p_open = NULL, ImGuiWindowFlags flags = 0);                     // modal dialog (regular window with title bar, block interactions behind the modal window, can't close the modal window by clicking outside)\nIMGUI_FUNCTION(BeginPopupModal)\nLABEL_ARG(name)\nOPTIONAL_BOOL_POINTER_ARG(p_open)\nOPTIONAL_INT_ARG(flags, 0)\nCALL_FUNCTION(BeginPopupModal, bool, name, p_open, flags)\nIF_RET_ADD_END_STACK(11)\nPUSH_BOOL(ret)\nEND_BOOL_POINTER(p_open)\nEND_IMGUI_FUNC\n//    IMGUI_API void          EndPopup();                                                                                             // only call EndPopup() if BeginPopupXXX() returns true!\nIMGUI_FUNCTION(EndPopup)\nCALL_FUNCTION_NO_RET(EndPopup)\nPOP_END_STACK(11)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          OpenPopupOnItemClick(const char* str_id = NULL, int mouse_button = 1);                                  // helper to open popup when clicked on last item. return true when just opened.\nIMGUI_FUNCTION(OpenPopupOnItemClick)\nOPTIONAL_LABEL_ARG(str_id)\nOPTIONAL_INT_ARG(mouse_button, 1)\nCALL_FUNCTION(OpenPopupOnItemClick, bool, str_id, mouse_button)\nPUSH_BOOL(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          IsPopupOpen(const char* str_id);                                    // return true if the popup is open\nIMGUI_FUNCTION(IsPopupOpen)\nLABEL_ARG(str_id)\nCALL_FUNCTION(IsPopupOpen, bool, str_id)\nPUSH_BOOL(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API void          CloseCurrentPopup();                                                // close the popup we have begin-ed into. clicking on a MenuItem or Selectable automatically close the current popup.\nIMGUI_FUNCTION(CloseCurrentPopup)\nCALL_FUNCTION_NO_RET(CloseCurrentPopup)\nEND_IMGUI_FUNC\n//    IMGUI_API void          Columns(int count = 1, const char* id = NULL, bool border = true);\nIMGUI_FUNCTION(Columns)\nOPTIONAL_INT_ARG(count, 1)\nOPTIONAL_LABEL_ARG(id)\nOPTIONAL_BOOL_ARG(border, true)\nCALL_FUNCTION_NO_RET(Columns, count, id, border)\nEND_IMGUI_FUNC\n//    IMGUI_API void          NextColumn();                                                       // next column, defaults to current row or next row if the current row is finished\nIMGUI_FUNCTION(NextColumn)\nCALL_FUNCTION_NO_RET(NextColumn)\nEND_IMGUI_FUNC\n//    IMGUI_API int           GetColumnIndex();                                                   // get current column index\n// Unsupported return type int\n//    IMGUI_API float         GetColumnWidth(int column_index = -1);                              // get column width (in pixels). pass -1 to use current column\nIMGUI_FUNCTION(GetColumnWidth)\nOPTIONAL_INT_ARG(column_index, -1)\nCALL_FUNCTION(GetColumnWidth, float, column_index)\nPUSH_NUMBER(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API void          SetColumnWidth(int column_index, float width);                      // set column width (in pixels). pass -1 to use current column\nIMGUI_FUNCTION(SetColumnWidth)\nINT_ARG(column_index)\nNUMBER_ARG(width)\nCALL_FUNCTION_NO_RET(SetColumnWidth, column_index, width)\nEND_IMGUI_FUNC\n//    IMGUI_API float         GetColumnOffset(int column_index = -1);                             // get position of column line (in pixels, from the left side of the contents region). pass -1 to use current column, otherwise 0..GetColumnsCount() inclusive. column 0 is typically 0.0f\nIMGUI_FUNCTION(GetColumnOffset)\nOPTIONAL_INT_ARG(column_index, -1)\nCALL_FUNCTION(GetColumnOffset, float, column_index)\nPUSH_NUMBER(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API void          SetColumnOffset(int column_index, float offset_x);                  // set position of column line (in pixels, from the left side of the contents region). pass -1 to use current column\nIMGUI_FUNCTION(SetColumnOffset)\nINT_ARG(column_index)\nNUMBER_ARG(offset_x)\nCALL_FUNCTION_NO_RET(SetColumnOffset, column_index, offset_x)\nEND_IMGUI_FUNC\n//    IMGUI_API int           GetColumnsCount();\n// Unsupported return type int\n//    IMGUI_API void          LogToTTY(int max_depth = -1);                                       // start logging to tty\nIMGUI_FUNCTION(LogToTTY)\nOPTIONAL_INT_ARG(max_depth, -1)\nCALL_FUNCTION_NO_RET(LogToTTY, max_depth)\nEND_IMGUI_FUNC\n//    IMGUI_API void          LogToFile(int max_depth = -1, const char* filename = NULL);         // start logging to file\nIMGUI_FUNCTION(LogToFile)\nOPTIONAL_INT_ARG(max_depth, -1)\nOPTIONAL_LABEL_ARG(filename)\nCALL_FUNCTION_NO_RET(LogToFile, max_depth, filename)\nEND_IMGUI_FUNC\n//    IMGUI_API void          LogToClipboard(int max_depth = -1);                                 // start logging to OS clipboard\nIMGUI_FUNCTION(LogToClipboard)\nOPTIONAL_INT_ARG(max_depth, -1)\nCALL_FUNCTION_NO_RET(LogToClipboard, max_depth)\nEND_IMGUI_FUNC\n//    IMGUI_API void          LogFinish();                                                        // stop logging (close file, etc.)\nIMGUI_FUNCTION(LogFinish)\nCALL_FUNCTION_NO_RET(LogFinish)\nEND_IMGUI_FUNC\n//    IMGUI_API void          LogButtons();                                                       // helper to display buttons for logging to tty/file/clipboard\nIMGUI_FUNCTION(LogButtons)\nCALL_FUNCTION_NO_RET(LogButtons)\nEND_IMGUI_FUNC\n//    IMGUI_API void          LogText(const char* fmt, ...) IM_FMTARGS(1);                        // pass text data straight to log (without being displayed)\n// Unsupported arg type  ...) IM_FMTARGS(1\n//    IMGUI_API bool          BeginDragDropSource(ImGuiDragDropFlags flags = 0);                                      // call when the current item is active. If this return true, you can call SetDragDropPayload() + EndDragDropSource()\n// Unsupported arg type ImGuiDragDropFlags flags = 0\n//    IMGUI_API bool          SetDragDropPayload(const char* type, const void* data, size_t size, ImGuiCond cond = 0);// type is a user defined string of maximum 32 characters. Strings starting with '_' are reserved for dear imgui internal types. Data is copied and held by imgui.\n// Unsupported arg type  const void* data\n// Unsupported arg type  size_t size\n// Unsupported arg type  ImGuiCond cond = 0\n//    IMGUI_API void          EndDragDropSource();                                                                    // only call EndDragDropSource() if BeginDragDropSource() returns true!\nIMGUI_FUNCTION(EndDragDropSource)\nCALL_FUNCTION_NO_RET(EndDragDropSource)\nPOP_END_STACK(12)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          BeginDragDropTarget();                                                                  // call after submitting an item that may receive an item. If this returns true, you can call AcceptDragDropPayload() + EndDragDropTarget()\nIMGUI_FUNCTION(BeginDragDropTarget)\nCALL_FUNCTION(BeginDragDropTarget, bool)\nIF_RET_ADD_END_STACK(13)\nPUSH_BOOL(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API const ImGuiPayload* AcceptDragDropPayload(const char* type, ImGuiDragDropFlags flags = 0);            // accept contents of a given type. If ImGuiDragDropFlags_AcceptBeforeDelivery is set you can peek into the payload before the mouse button is released.\n// Unsupported return type const\n// Unsupported arg type  ImGuiDragDropFlags flags = 0\n//    IMGUI_API void          EndDragDropTarget();                                                                    // only call EndDragDropTarget() if BeginDragDropTarget() returns true!\nIMGUI_FUNCTION(EndDragDropTarget)\nCALL_FUNCTION_NO_RET(EndDragDropTarget)\nPOP_END_STACK(13)\nEND_IMGUI_FUNC\n//    IMGUI_API void          PushClipRect(const ImVec2& clip_rect_min, const ImVec2& clip_rect_max, bool intersect_with_current_clip_rect);\nIMGUI_FUNCTION(PushClipRect)\nIM_VEC_2_ARG(clip_rect_min)\nIM_VEC_2_ARG(clip_rect_max)\nBOOL_ARG(intersect_with_current_clip_rect)\nCALL_FUNCTION_NO_RET(PushClipRect, clip_rect_min, clip_rect_max, intersect_with_current_clip_rect)\nEND_IMGUI_FUNC\n//    IMGUI_API void          PopClipRect();\nIMGUI_FUNCTION(PopClipRect)\nCALL_FUNCTION_NO_RET(PopClipRect)\nEND_IMGUI_FUNC\n//    IMGUI_API void          SetItemDefaultFocus();                                              // make last item the default focused item of a window. Please use instead of \"if (IsWindowAppearing()) SetScrollHere()\" to signify \"default item\".\nIMGUI_FUNCTION(SetItemDefaultFocus)\nCALL_FUNCTION_NO_RET(SetItemDefaultFocus)\nEND_IMGUI_FUNC\n//    IMGUI_API void          SetKeyboardFocusHere(int offset = 0);                               // focus keyboard on the next widget. Use positive 'offset' to access sub components of a multiple component widget. Use -1 to access previous widget.\nIMGUI_FUNCTION(SetKeyboardFocusHere)\nOPTIONAL_INT_ARG(offset, 0)\nCALL_FUNCTION_NO_RET(SetKeyboardFocusHere, offset)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          IsItemHovered(ImGuiHoveredFlags flags = 0);                         // is the last item hovered? (and usable, aka not blocked by a popup, etc.). See ImGuiHoveredFlags for more options.\n// Unsupported arg type ImGuiHoveredFlags flags = 0\n//    IMGUI_API bool          IsItemActive();                                                     // is the last item active? (e.g. button being held, text field being edited- items that don't interact will always return false)\nIMGUI_FUNCTION(IsItemActive)\nCALL_FUNCTION(IsItemActive, bool)\nPUSH_BOOL(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          IsItemFocused();                                                    // is the last item focused for keyboard/gamepad navigation?\nIMGUI_FUNCTION(IsItemFocused)\nCALL_FUNCTION(IsItemFocused, bool)\nPUSH_BOOL(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          IsItemClicked(int mouse_button = 0);                                // is the last item clicked? (e.g. button/node just clicked on)\nIMGUI_FUNCTION(IsItemClicked)\nOPTIONAL_INT_ARG(mouse_button, 0)\nCALL_FUNCTION(IsItemClicked, bool, mouse_button)\nPUSH_BOOL(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          IsItemVisible();                                                    // is the last item visible? (aka not out of sight due to clipping/scrolling.)\nIMGUI_FUNCTION(IsItemVisible)\nCALL_FUNCTION(IsItemVisible, bool)\nPUSH_BOOL(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          IsAnyItemHovered();\nIMGUI_FUNCTION(IsAnyItemHovered)\nCALL_FUNCTION(IsAnyItemHovered, bool)\nPUSH_BOOL(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          IsAnyItemActive();\nIMGUI_FUNCTION(IsAnyItemActive)\nCALL_FUNCTION(IsAnyItemActive, bool)\nPUSH_BOOL(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          IsAnyItemFocused();\nIMGUI_FUNCTION(IsAnyItemFocused)\nCALL_FUNCTION(IsAnyItemFocused, bool)\nPUSH_BOOL(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API ImVec2        GetItemRectMin();                                                   // get bounding rectangle of last item, in screen space\nIMGUI_FUNCTION(GetItemRectMin)\nCALL_FUNCTION(GetItemRectMin, ImVec2)\nPUSH_NUMBER(ret.x)\nPUSH_NUMBER(ret.y)\nEND_IMGUI_FUNC\n//    IMGUI_API ImVec2        GetItemRectMax();                                                   // \"\nIMGUI_FUNCTION(GetItemRectMax)\nCALL_FUNCTION(GetItemRectMax, ImVec2)\nPUSH_NUMBER(ret.x)\nPUSH_NUMBER(ret.y)\nEND_IMGUI_FUNC\n//    IMGUI_API ImVec2        GetItemRectSize();                                                  // get size of last item, in screen space\nIMGUI_FUNCTION(GetItemRectSize)\nCALL_FUNCTION(GetItemRectSize, ImVec2)\nPUSH_NUMBER(ret.x)\nPUSH_NUMBER(ret.y)\nEND_IMGUI_FUNC\n//    IMGUI_API void          SetItemAllowOverlap();                                              // allow last item to be overlapped by a subsequent item. sometimes useful with invisible buttons, selectables, etc. to catch unused area.\nIMGUI_FUNCTION(SetItemAllowOverlap)\nCALL_FUNCTION_NO_RET(SetItemAllowOverlap)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          IsRectVisible(const ImVec2& size);                                  // test if rectangle (of given size, starting from cursor position) is visible / not clipped.\nIMGUI_FUNCTION(IsRectVisible)\nIM_VEC_2_ARG(size)\nCALL_FUNCTION(IsRectVisible, bool, size)\nPUSH_BOOL(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          IsRectVisible(const ImVec2& rect_min, const ImVec2& rect_max);      // test if rectangle (in screen space) is visible / not clipped. to perform coarse clipping on user's side.\nIMGUI_FUNCTION(IsRectVisible_2)\nIM_VEC_2_ARG(rect_min)\nIM_VEC_2_ARG(rect_max)\nCALL_FUNCTION(IsRectVisible, bool, rect_min, rect_max)\nPUSH_BOOL(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API float         GetTime();\nIMGUI_FUNCTION(GetTime)\nCALL_FUNCTION(GetTime, float)\nPUSH_NUMBER(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API int           GetFrameCount();\n// Unsupported return type int\n//    IMGUI_API ImDrawList*   GetOverlayDrawList();                                               // this draw list will be the last rendered one, useful to quickly draw overlays shapes/text\n// Unsupported return type ImDrawList*\n//    IMGUI_API ImDrawListSharedData* GetDrawListSharedData();                                    // you may use this when creating your own ImDrawList instances\n// Unsupported return type ImDrawListSharedData*\n//    IMGUI_API const char*   GetStyleColorName(ImGuiCol idx);\nIMGUI_FUNCTION(GetStyleColorName)\nINT_ARG(idx)\nCALL_FUNCTION(GetStyleColorName, const char*, idx)\nPUSH_STRING(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API void          SetStateStorage(ImGuiStorage* storage);                             // replace current window storage with our own (if you want to manipulate it yourself, typically clear subsection of it)\n// Unsupported arg type ImGuiStorage* storage\n//    IMGUI_API ImGuiStorage* GetStateStorage();\n// Unsupported return type ImGuiStorage*\n//    IMGUI_API ImVec2        CalcTextSize(const char* text, const char* text_end = NULL, bool hide_text_after_double_hash = false, float wrap_width = -1.0f);\nIMGUI_FUNCTION(CalcTextSize)\nLABEL_ARG(text)\nOPTIONAL_LABEL_ARG(text_end)\nOPTIONAL_BOOL_ARG(hide_text_after_double_hash, false)\nOPTIONAL_NUMBER_ARG(wrap_width, -1.0f)\nCALL_FUNCTION(CalcTextSize, ImVec2, text, text_end, hide_text_after_double_hash, wrap_width)\nPUSH_NUMBER(ret.x)\nPUSH_NUMBER(ret.y)\nEND_IMGUI_FUNC\n//    IMGUI_API void          CalcListClipping(int items_count, float items_height, int* out_items_display_start, int* out_items_display_end);    // calculate coarse clipping for large list of evenly sized items. Prefer using the ImGuiListClipper higher-level helper if you can.\nIMGUI_FUNCTION(CalcListClipping)\nINT_ARG(items_count)\nNUMBER_ARG(items_height)\nINT_POINTER_ARG(out_items_display_start)\nINT_POINTER_ARG(out_items_display_end)\nCALL_FUNCTION_NO_RET(CalcListClipping, items_count, items_height, out_items_display_start, out_items_display_end)\nEND_INT_POINTER(out_items_display_start)\nEND_INT_POINTER(out_items_display_end)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          BeginChildFrame(ImGuiID id, const ImVec2& size, ImGuiWindowFlags flags = 0); // helper to create a child window / scrolling region that looks like a normal widget frame\nIMGUI_FUNCTION(BeginChildFrame)\nUINT_ARG(id)\nIM_VEC_2_ARG(size)\nOPTIONAL_INT_ARG(flags, 0)\nCALL_FUNCTION(BeginChildFrame, bool, id, size, flags)\nIF_RET_ADD_END_STACK(14)\nPUSH_BOOL(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API void          EndChildFrame();                                                    // always call EndChildFrame() regardless of BeginChildFrame() return values (which indicates a collapsed/clipped window)\nIMGUI_FUNCTION(EndChildFrame)\nCALL_FUNCTION_NO_RET(EndChildFrame)\nPOP_END_STACK(14)\nEND_IMGUI_FUNC\n//    IMGUI_API ImVec4        ColorConvertU32ToFloat4(ImU32 in);\n// Unsupported return type ImVec4\n//    IMGUI_API ImU32         ColorConvertFloat4ToU32(const ImVec4& in);\nIMGUI_FUNCTION(ColorConvertFloat4ToU32)\nIM_VEC_4_ARG(in)\nCALL_FUNCTION(ColorConvertFloat4ToU32, unsigned int, in)\nPUSH_NUMBER(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API void          ColorConvertRGBtoHSV(float r, float g, float b, float& out_h, float& out_s, float& out_v);\n// Unsupported arg type  float& out_h\n// Unsupported arg type  float& out_s\n// Unsupported arg type  float& out_v\n//    IMGUI_API void          ColorConvertHSVtoRGB(float h, float s, float v, float& out_r, float& out_g, float& out_b);\n// Unsupported arg type  float& out_r\n// Unsupported arg type  float& out_g\n// Unsupported arg type  float& out_b\n//    IMGUI_API int           GetKeyIndex(ImGuiKey imgui_key);                                    // map ImGuiKey_* values into user's key index. == io.KeyMap[key]\n// Unsupported return type int\n//    IMGUI_API bool          IsKeyDown(int user_key_index);                                      // is key being held. == io.KeysDown[user_key_index]. note that imgui doesn't know the semantic of each entry of io.KeyDown[]. Use your own indices/enums according to how your backend/engine stored them into KeyDown[]!\nIMGUI_FUNCTION(IsKeyDown)\nINT_ARG(user_key_index)\nCALL_FUNCTION(IsKeyDown, bool, user_key_index)\nPUSH_BOOL(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          IsKeyPressed(int user_key_index, bool repeat = true);               // was key pressed (went from !Down to Down). if repeat=true, uses io.KeyRepeatDelay / KeyRepeatRate\nIMGUI_FUNCTION(IsKeyPressed)\nINT_ARG(user_key_index)\nOPTIONAL_BOOL_ARG(repeat, true)\nCALL_FUNCTION(IsKeyPressed, bool, user_key_index, repeat)\nPUSH_BOOL(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          IsKeyReleased(int user_key_index);                                  // was key released (went from Down to !Down)..\nIMGUI_FUNCTION(IsKeyReleased)\nINT_ARG(user_key_index)\nCALL_FUNCTION(IsKeyReleased, bool, user_key_index)\nPUSH_BOOL(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API int           GetKeyPressedAmount(int key_index, float repeat_delay, float rate); // uses provided repeat rate/delay. return a count, most often 0 or 1 but might be >1 if RepeatRate is small enough that DeltaTime > RepeatRate\n// Unsupported return type int\n//    IMGUI_API bool          IsMouseDown(int button);                                            // is mouse button held\nIMGUI_FUNCTION(IsMouseDown)\nINT_ARG(button)\nCALL_FUNCTION(IsMouseDown, bool, button)\nPUSH_BOOL(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          IsAnyMouseDown();                                                   // is any mouse button held\nIMGUI_FUNCTION(IsAnyMouseDown)\nCALL_FUNCTION(IsAnyMouseDown, bool)\nPUSH_BOOL(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          IsMouseClicked(int button, bool repeat = false);                    // did mouse button clicked (went from !Down to Down)\nIMGUI_FUNCTION(IsMouseClicked)\nINT_ARG(button)\nOPTIONAL_BOOL_ARG(repeat, false)\nCALL_FUNCTION(IsMouseClicked, bool, button, repeat)\nPUSH_BOOL(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          IsMouseDoubleClicked(int button);                                   // did mouse button double-clicked. a double-click returns false in IsMouseClicked(). uses io.MouseDoubleClickTime.\nIMGUI_FUNCTION(IsMouseDoubleClicked)\nINT_ARG(button)\nCALL_FUNCTION(IsMouseDoubleClicked, bool, button)\nPUSH_BOOL(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          IsMouseReleased(int button);                                        // did mouse button released (went from Down to !Down)\nIMGUI_FUNCTION(IsMouseReleased)\nINT_ARG(button)\nCALL_FUNCTION(IsMouseReleased, bool, button)\nPUSH_BOOL(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          IsMouseDragging(int button = 0, float lock_threshold = -1.0f);      // is mouse dragging. if lock_threshold < -1.0f uses io.MouseDraggingThreshold\nIMGUI_FUNCTION(IsMouseDragging)\nOPTIONAL_INT_ARG(button, 0)\nOPTIONAL_NUMBER_ARG(lock_threshold, -1.0f)\nCALL_FUNCTION(IsMouseDragging, bool, button, lock_threshold)\nPUSH_BOOL(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          IsMouseHoveringRect(const ImVec2& r_min, const ImVec2& r_max, bool clip = true);  // is mouse hovering given bounding rect (in screen space). clipped by current clipping settings. disregarding of consideration of focus/window ordering/blocked by a popup.\nIMGUI_FUNCTION(IsMouseHoveringRect)\nIM_VEC_2_ARG(r_min)\nIM_VEC_2_ARG(r_max)\nOPTIONAL_BOOL_ARG(clip, true)\nCALL_FUNCTION(IsMouseHoveringRect, bool, r_min, r_max, clip)\nPUSH_BOOL(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API bool          IsMousePosValid(const ImVec2* mouse_pos = NULL);                    //\n// Unsupported arg type const ImVec2* mouse_pos = NULL\n//    IMGUI_API ImVec2        GetMousePos();                                                      // shortcut to ImGui::GetIO().MousePos provided by user, to be consistent with other calls\nIMGUI_FUNCTION(GetMousePos)\nCALL_FUNCTION(GetMousePos, ImVec2)\nPUSH_NUMBER(ret.x)\nPUSH_NUMBER(ret.y)\nEND_IMGUI_FUNC\n//    IMGUI_API ImVec2        GetMousePosOnOpeningCurrentPopup();                                 // retrieve backup of mouse position at the time of opening popup we have BeginPopup() into\nIMGUI_FUNCTION(GetMousePosOnOpeningCurrentPopup)\nCALL_FUNCTION(GetMousePosOnOpeningCurrentPopup, ImVec2)\nPUSH_NUMBER(ret.x)\nPUSH_NUMBER(ret.y)\nEND_IMGUI_FUNC\n//    IMGUI_API ImVec2        GetMouseDragDelta(int button = 0, float lock_threshold = -1.0f);    // dragging amount since clicking. if lock_threshold < -1.0f uses io.MouseDraggingThreshold\nIMGUI_FUNCTION(GetMouseDragDelta)\nOPTIONAL_INT_ARG(button, 0)\nOPTIONAL_NUMBER_ARG(lock_threshold, -1.0f)\nCALL_FUNCTION(GetMouseDragDelta, ImVec2, button, lock_threshold)\nPUSH_NUMBER(ret.x)\nPUSH_NUMBER(ret.y)\nEND_IMGUI_FUNC\n//    IMGUI_API void          ResetMouseDragDelta(int button = 0);                                //\nIMGUI_FUNCTION(ResetMouseDragDelta)\nOPTIONAL_INT_ARG(button, 0)\nCALL_FUNCTION_NO_RET(ResetMouseDragDelta, button)\nEND_IMGUI_FUNC\n//    IMGUI_API ImGuiMouseCursor GetMouseCursor();                                                // get desired cursor type, reset in ImGui::NewFrame(), this is updated during the frame. valid before Render(). If you use software rendering by setting io.MouseDrawCursor ImGui will render those for you\n// Unsupported return type ImGuiMouseCursor\n//    IMGUI_API void          SetMouseCursor(ImGuiMouseCursor type);                              // set desired cursor type\nIMGUI_FUNCTION(SetMouseCursor)\nINT_ARG(type)\nCALL_FUNCTION_NO_RET(SetMouseCursor, type)\nEND_IMGUI_FUNC\n//    IMGUI_API void          CaptureKeyboardFromApp(bool capture = true);                        // manually override io.WantCaptureKeyboard flag next frame (said flag is entirely left for your application to handle). e.g. force capture keyboard when your widget is being hovered.\nIMGUI_FUNCTION(CaptureKeyboardFromApp)\nOPTIONAL_BOOL_ARG(capture, true)\nCALL_FUNCTION_NO_RET(CaptureKeyboardFromApp, capture)\nEND_IMGUI_FUNC\n//    IMGUI_API void          CaptureMouseFromApp(bool capture = true);                           // manually override io.WantCaptureMouse flag next frame (said flag is entirely left for your application to handle).\nIMGUI_FUNCTION(CaptureMouseFromApp)\nOPTIONAL_BOOL_ARG(capture, true)\nCALL_FUNCTION_NO_RET(CaptureMouseFromApp, capture)\nEND_IMGUI_FUNC\n//    IMGUI_API const char*   GetClipboardText();\nIMGUI_FUNCTION(GetClipboardText)\nCALL_FUNCTION(GetClipboardText, const char*)\nPUSH_STRING(ret)\nEND_IMGUI_FUNC\n//    IMGUI_API void          SetClipboardText(const char* text);\nIMGUI_FUNCTION(SetClipboardText)\nLABEL_ARG(text)\nCALL_FUNCTION_NO_RET(SetClipboardText, text)\nEND_IMGUI_FUNC\n//    IMGUI_API void          SetAllocatorFunctions(void* (*alloc_func)(size_t sz, void* user_data), void(*free_func)(void* ptr, void* user_data), void* user_data = NULL);\n// Unsupported arg type void* (*alloc_func)(size_t sz\n// Unsupported arg type  void* user_data)\n// Unsupported arg type  void(*free_func)(void* ptr\n// Unsupported arg type  void* user_data)\n// Unsupported arg type  void* user_data = NULL\n//    IMGUI_API void*         MemAlloc(size_t size);\n// Unsupported return type void*\n// Unsupported arg type size_t size\n//    IMGUI_API void          MemFree(void* ptr);\n// Unsupported arg type void* ptr\nEND_STACK_START\nEND_STACK_OPTION(0, EndFrame)\nEND_STACK_OPTION(1, End)\nEND_STACK_OPTION(2, EndChild)\nEND_STACK_OPTION(3, PopStyleVar)\nEND_STACK_OPTION(4, EndGroup)\nEND_STACK_OPTION(5, EndCombo)\nEND_STACK_OPTION(6, TreePop)\nEND_STACK_OPTION(7, EndTooltip)\nEND_STACK_OPTION(8, EndMainMenuBar)\nEND_STACK_OPTION(9, EndMenuBar)\nEND_STACK_OPTION(10, EndMenu)\nEND_STACK_OPTION(11, EndPopup)\nEND_STACK_OPTION(12, EndDragDropSource)\nEND_STACK_OPTION(13, EndDragDropTarget)\nEND_STACK_OPTION(14, EndChildFrame)\nEND_STACK_END\n//enum ImGuiWindowFlags_\n\nSTART_ENUM(WindowFlags)\n//    ImGuiWindowFlags_NoTitleBar             = 1 << 0,   // Disable title-bar\nMAKE_ENUM(ImGuiWindowFlags_NoTitleBar,NoTitleBar)\n//    ImGuiWindowFlags_NoResize               = 1 << 1,   // Disable user resizing with the lower-right grip\nMAKE_ENUM(ImGuiWindowFlags_NoResize,NoResize)\n//    ImGuiWindowFlags_NoMove                 = 1 << 2,   // Disable user moving the window\nMAKE_ENUM(ImGuiWindowFlags_NoMove,NoMove)\n//    ImGuiWindowFlags_NoScrollbar            = 1 << 3,   // Disable scrollbars (window can still scroll with mouse or programatically)\nMAKE_ENUM(ImGuiWindowFlags_NoScrollbar,NoScrollbar)\n//    ImGuiWindowFlags_NoScrollWithMouse      = 1 << 4,   // Disable user vertically scrolling with mouse wheel. On child window, mouse wheel will be forwarded to the parent unless NoScrollbar is also set.\nMAKE_ENUM(ImGuiWindowFlags_NoScrollWithMouse,NoScrollWithMouse)\n//    ImGuiWindowFlags_NoCollapse             = 1 << 5,   // Disable user collapsing window by double-clicking on it\nMAKE_ENUM(ImGuiWindowFlags_NoCollapse,NoCollapse)\n//    ImGuiWindowFlags_AlwaysAutoResize       = 1 << 6,   // Resize every window to its content every frame\nMAKE_ENUM(ImGuiWindowFlags_AlwaysAutoResize,AlwaysAutoResize)\n//    ImGuiWindowFlags_NoSavedSettings        = 1 << 8,   // Never load/save settings in .ini file\nMAKE_ENUM(ImGuiWindowFlags_NoSavedSettings,NoSavedSettings)\n//    ImGuiWindowFlags_NoInputs               = 1 << 9,   // Disable catching mouse or keyboard inputs, hovering test with pass through.\nMAKE_ENUM(ImGuiWindowFlags_NoInputs,NoInputs)\n//    ImGuiWindowFlags_MenuBar                = 1 << 10,  // Has a menu-bar\nMAKE_ENUM(ImGuiWindowFlags_MenuBar,MenuBar)\n//    ImGuiWindowFlags_HorizontalScrollbar    = 1 << 11,  // Allow horizontal scrollbar to appear (off by default). You may use SetNextWindowContentSize(ImVec2(width,0.0f)); prior to calling Begin() to specify width. Read code in imgui_demo in the \"Horizontal Scrolling\" section.\nMAKE_ENUM(ImGuiWindowFlags_HorizontalScrollbar,HorizontalScrollbar)\n//    ImGuiWindowFlags_NoFocusOnAppearing     = 1 << 12,  // Disable taking focus when transitioning from hidden to visible state\nMAKE_ENUM(ImGuiWindowFlags_NoFocusOnAppearing,NoFocusOnAppearing)\n//    ImGuiWindowFlags_NoBringToFrontOnFocus  = 1 << 13,  // Disable bringing window to front when taking focus (e.g. clicking on it or programatically giving it focus)\nMAKE_ENUM(ImGuiWindowFlags_NoBringToFrontOnFocus,NoBringToFrontOnFocus)\n//    ImGuiWindowFlags_AlwaysVerticalScrollbar= 1 << 14,  // Always show vertical scrollbar (even if ContentSize.y < Size.y)\nMAKE_ENUM(ImGuiWindowFlags_AlwaysVerticalScrollbar,AlwaysVerticalScrollbar)\n//    ImGuiWindowFlags_AlwaysHorizontalScrollbar=1<< 15,  // Always show horizontal scrollbar (even if ContentSize.x < Size.x)\nMAKE_ENUM(ImGuiWindowFlags_AlwaysHorizontalScrollbar,AlwaysHorizontalScrollbar)\n//    ImGuiWindowFlags_AlwaysUseWindowPadding = 1 << 16,  // Ensure child windows without border uses style.WindowPadding (ignored by default for non-bordered child windows, because more convenient)\nMAKE_ENUM(ImGuiWindowFlags_AlwaysUseWindowPadding,AlwaysUseWindowPadding)\n//    ImGuiWindowFlags_ResizeFromAnySide      = 1 << 17,  // [BETA] Enable resize from any corners and borders. Your back-end needs to honor the different values of io.MouseCursor set by imgui.\nMAKE_ENUM(ImGuiWindowFlags_ResizeFromAnySide,ResizeFromAnySide)\n//    ImGuiWindowFlags_NoNavInputs            = 1 << 18,  // No gamepad/keyboard navigation within the window\nMAKE_ENUM(ImGuiWindowFlags_NoNavInputs,NoNavInputs)\n//    ImGuiWindowFlags_NoNavFocus             = 1 << 19,  // No focusing toward this window with gamepad/keyboard navigation (e.g. skipped by CTRL+TAB)\nMAKE_ENUM(ImGuiWindowFlags_NoNavFocus,NoNavFocus)\n//    ImGuiWindowFlags_NoNav                  = ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus,\nMAKE_ENUM(ImGuiWindowFlags_NoNav,NoNav)\n//    ImGuiWindowFlags_NavFlattened           = 1 << 23,  // [BETA] Allow gamepad/keyboard navigation to cross over parent border to this child (only use on child that have no scrolling!)\nMAKE_ENUM(ImGuiWindowFlags_NavFlattened,NavFlattened)\n//    ImGuiWindowFlags_ChildWindow            = 1 << 24,  // Don't use! For internal use by BeginChild()\nMAKE_ENUM(ImGuiWindowFlags_ChildWindow,ChildWindow)\n//    ImGuiWindowFlags_Tooltip                = 1 << 25,  // Don't use! For internal use by BeginTooltip()\nMAKE_ENUM(ImGuiWindowFlags_Tooltip,Tooltip)\n//    ImGuiWindowFlags_Popup                  = 1 << 26,  // Don't use! For internal use by BeginPopup()\nMAKE_ENUM(ImGuiWindowFlags_Popup,Popup)\n//    ImGuiWindowFlags_Modal                  = 1 << 27,  // Don't use! For internal use by BeginPopupModal()\nMAKE_ENUM(ImGuiWindowFlags_Modal,Modal)\n//    ImGuiWindowFlags_ChildMenu              = 1 << 28   // Don't use! For internal use by BeginMenu()\nMAKE_ENUM(ImGuiWindowFlags_ChildMenu,ChildMenu)\nEND_ENUM(WindowFlags)\n//enum ImGuiInputTextFlags_\n\nSTART_ENUM(InputTextFlags)\n//    ImGuiInputTextFlags_CharsDecimal        = 1 << 0,   // Allow 0123456789.+-*/\nMAKE_ENUM(ImGuiInputTextFlags_CharsDecimal,CharsDecimal)\n//    ImGuiInputTextFlags_CharsHexadecimal    = 1 << 1,   // Allow 0123456789ABCDEFabcdef\nMAKE_ENUM(ImGuiInputTextFlags_CharsHexadecimal,CharsHexadecimal)\n//    ImGuiInputTextFlags_CharsUppercase      = 1 << 2,   // Turn a..z into A..Z\nMAKE_ENUM(ImGuiInputTextFlags_CharsUppercase,CharsUppercase)\n//    ImGuiInputTextFlags_CharsNoBlank        = 1 << 3,   // Filter out spaces, tabs\nMAKE_ENUM(ImGuiInputTextFlags_CharsNoBlank,CharsNoBlank)\n//    ImGuiInputTextFlags_AutoSelectAll       = 1 << 4,   // Select entire text when first taking mouse focus\nMAKE_ENUM(ImGuiInputTextFlags_AutoSelectAll,AutoSelectAll)\n//    ImGuiInputTextFlags_EnterReturnsTrue    = 1 << 5,   // Return 'true' when Enter is pressed (as opposed to when the value was modified)\nMAKE_ENUM(ImGuiInputTextFlags_EnterReturnsTrue,EnterReturnsTrue)\n//    ImGuiInputTextFlags_CallbackCompletion  = 1 << 6,   // Call user function on pressing TAB (for completion handling)\nMAKE_ENUM(ImGuiInputTextFlags_CallbackCompletion,CallbackCompletion)\n//    ImGuiInputTextFlags_CallbackHistory     = 1 << 7,   // Call user function on pressing Up/Down arrows (for history handling)\nMAKE_ENUM(ImGuiInputTextFlags_CallbackHistory,CallbackHistory)\n//    ImGuiInputTextFlags_CallbackAlways      = 1 << 8,   // Call user function every time. User code may query cursor position, modify text buffer.\nMAKE_ENUM(ImGuiInputTextFlags_CallbackAlways,CallbackAlways)\n//    ImGuiInputTextFlags_CallbackCharFilter  = 1 << 9,   // Call user function to filter character. Modify data->EventChar to replace/filter input, or return 1 to discard character.\nMAKE_ENUM(ImGuiInputTextFlags_CallbackCharFilter,CallbackCharFilter)\n//    ImGuiInputTextFlags_AllowTabInput       = 1 << 10,  // Pressing TAB input a '\\t' character into the text field\nMAKE_ENUM(ImGuiInputTextFlags_AllowTabInput,AllowTabInput)\n//    ImGuiInputTextFlags_CtrlEnterForNewLine = 1 << 11,  // In multi-line mode, unfocus with Enter, add new line with Ctrl+Enter (default is opposite: unfocus with Ctrl+Enter, add line with Enter).\nMAKE_ENUM(ImGuiInputTextFlags_CtrlEnterForNewLine,CtrlEnterForNewLine)\n//    ImGuiInputTextFlags_NoHorizontalScroll  = 1 << 12,  // Disable following the cursor horizontally\nMAKE_ENUM(ImGuiInputTextFlags_NoHorizontalScroll,NoHorizontalScroll)\n//    ImGuiInputTextFlags_AlwaysInsertMode    = 1 << 13,  // Insert mode\nMAKE_ENUM(ImGuiInputTextFlags_AlwaysInsertMode,AlwaysInsertMode)\n//    ImGuiInputTextFlags_ReadOnly            = 1 << 14,  // Read-only mode\nMAKE_ENUM(ImGuiInputTextFlags_ReadOnly,ReadOnly)\n//    ImGuiInputTextFlags_Password            = 1 << 15,  // Password mode, display all characters as '*'\nMAKE_ENUM(ImGuiInputTextFlags_Password,Password)\n//    ImGuiInputTextFlags_NoUndoRedo          = 1 << 16,  // Disable undo/redo. Note that input text owns the text data while active, if you want to provide your own undo/redo stack you need e.g. to call ClearActiveID().\nMAKE_ENUM(ImGuiInputTextFlags_NoUndoRedo,NoUndoRedo)\n//    ImGuiInputTextFlags_CharsScientific     = 1 << 17,  // Allow 0123456789.+-*/eE (Scientific notation input)\nMAKE_ENUM(ImGuiInputTextFlags_CharsScientific,CharsScientific)\n//    ImGuiInputTextFlags_Multiline           = 1 << 20   // For internal use by InputTextMultiline()\nMAKE_ENUM(ImGuiInputTextFlags_Multiline,Multiline)\nEND_ENUM(InputTextFlags)\n//enum ImGuiTreeNodeFlags_\n\nSTART_ENUM(TreeNodeFlags)\n//    ImGuiTreeNodeFlags_Selected             = 1 << 0,   // Draw as selected\nMAKE_ENUM(ImGuiTreeNodeFlags_Selected,Selected)\n//    ImGuiTreeNodeFlags_Framed               = 1 << 1,   // Full colored frame (e.g. for CollapsingHeader)\nMAKE_ENUM(ImGuiTreeNodeFlags_Framed,Framed)\n//    ImGuiTreeNodeFlags_AllowItemOverlap     = 1 << 2,   // Hit testing to allow subsequent widgets to overlap this one\nMAKE_ENUM(ImGuiTreeNodeFlags_AllowItemOverlap,AllowItemOverlap)\n//    ImGuiTreeNodeFlags_NoTreePushOnOpen     = 1 << 3,   // Don't do a TreePush() when open (e.g. for CollapsingHeader) = no extra indent nor pushing on ID stack\nMAKE_ENUM(ImGuiTreeNodeFlags_NoTreePushOnOpen,NoTreePushOnOpen)\n//    ImGuiTreeNodeFlags_NoAutoOpenOnLog      = 1 << 4,   // Don't automatically and temporarily open node when Logging is active (by default logging will automatically open tree nodes)\nMAKE_ENUM(ImGuiTreeNodeFlags_NoAutoOpenOnLog,NoAutoOpenOnLog)\n//    ImGuiTreeNodeFlags_DefaultOpen          = 1 << 5,   // Default node to be open\nMAKE_ENUM(ImGuiTreeNodeFlags_DefaultOpen,DefaultOpen)\n//    ImGuiTreeNodeFlags_OpenOnDoubleClick    = 1 << 6,   // Need double-click to open node\nMAKE_ENUM(ImGuiTreeNodeFlags_OpenOnDoubleClick,OpenOnDoubleClick)\n//    ImGuiTreeNodeFlags_OpenOnArrow          = 1 << 7,   // Only open when clicking on the arrow part. If ImGuiTreeNodeFlags_OpenOnDoubleClick is also set, single-click arrow or double-click all box to open.\nMAKE_ENUM(ImGuiTreeNodeFlags_OpenOnArrow,OpenOnArrow)\n//    ImGuiTreeNodeFlags_Leaf                 = 1 << 8,   // No collapsing, no arrow (use as a convenience for leaf nodes). \nMAKE_ENUM(ImGuiTreeNodeFlags_Leaf,Leaf)\n//    ImGuiTreeNodeFlags_Bullet               = 1 << 9,   // Display a bullet instead of arrow\nMAKE_ENUM(ImGuiTreeNodeFlags_Bullet,Bullet)\n//    ImGuiTreeNodeFlags_FramePadding         = 1 << 10,  // Use FramePadding (even for an unframed text node) to vertically align text baseline to regular widget height. Equivalent to calling AlignTextToFramePadding().\nMAKE_ENUM(ImGuiTreeNodeFlags_FramePadding,FramePadding)\n//    ImGuiTreeNodeFlags_NavLeftJumpsBackHere = 1 << 13,  // (WIP) Nav: left direction may move to this TreeNode() from any of its child (items submitted between TreeNode and TreePop)\nMAKE_ENUM(ImGuiTreeNodeFlags_NavLeftJumpsBackHere,NavLeftJumpsBackHere)\n//    ImGuiTreeNodeFlags_CollapsingHeader     = ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoAutoOpenOnLog\nMAKE_ENUM(ImGuiTreeNodeFlags_CollapsingHeader,CollapsingHeader)\nEND_ENUM(TreeNodeFlags)\n//enum ImGuiSelectableFlags_\n\nSTART_ENUM(SelectableFlags)\n//    ImGuiSelectableFlags_DontClosePopups    = 1 << 0,   // Clicking this don't close parent popup window\nMAKE_ENUM(ImGuiSelectableFlags_DontClosePopups,DontClosePopups)\n//    ImGuiSelectableFlags_SpanAllColumns     = 1 << 1,   // Selectable frame can span all columns (text will still fit in current column)\nMAKE_ENUM(ImGuiSelectableFlags_SpanAllColumns,SpanAllColumns)\n//    ImGuiSelectableFlags_AllowDoubleClick   = 1 << 2    // Generate press events on double clicks too\nMAKE_ENUM(ImGuiSelectableFlags_AllowDoubleClick,AllowDoubleClick)\nEND_ENUM(SelectableFlags)\n//enum ImGuiComboFlags_\n\nSTART_ENUM(ComboFlags)\n//    ImGuiComboFlags_PopupAlignLeft          = 1 << 0,   // Align the popup toward the left by default\nMAKE_ENUM(ImGuiComboFlags_PopupAlignLeft,PopupAlignLeft)\n//    ImGuiComboFlags_HeightSmall             = 1 << 1,   // Max ~4 items visible. Tip: If you want your combo popup to be a specific size you can use SetNextWindowSizeConstraints() prior to calling BeginCombo()\nMAKE_ENUM(ImGuiComboFlags_HeightSmall,HeightSmall)\n//    ImGuiComboFlags_HeightRegular           = 1 << 2,   // Max ~8 items visible (default)\nMAKE_ENUM(ImGuiComboFlags_HeightRegular,HeightRegular)\n//    ImGuiComboFlags_HeightLarge             = 1 << 3,   // Max ~20 items visible\nMAKE_ENUM(ImGuiComboFlags_HeightLarge,HeightLarge)\n//    ImGuiComboFlags_HeightLargest           = 1 << 4,   // As many fitting items as possible\nMAKE_ENUM(ImGuiComboFlags_HeightLargest,HeightLargest)\n//    ImGuiComboFlags_NoArrowButton           = 1 << 5,   // Display on the preview box without the square arrow button\nMAKE_ENUM(ImGuiComboFlags_NoArrowButton,NoArrowButton)\n//    ImGuiComboFlags_NoPreview               = 1 << 6,   // Display only a square arrow button\nMAKE_ENUM(ImGuiComboFlags_NoPreview,NoPreview)\nEND_ENUM(ComboFlags)\n//enum ImGuiFocusedFlags_\n\nSTART_ENUM(FocusedFlags)\n//    ImGuiFocusedFlags_ChildWindows                  = 1 << 0,   // IsWindowFocused(): Return true if any children of the window is focused\nMAKE_ENUM(ImGuiFocusedFlags_ChildWindows,ChildWindows)\n//    ImGuiFocusedFlags_RootWindow                    = 1 << 1,   // IsWindowFocused(): Test from root window (top most parent of the current hierarchy)\nMAKE_ENUM(ImGuiFocusedFlags_RootWindow,RootWindow)\n//    ImGuiFocusedFlags_AnyWindow                     = 1 << 2,   // IsWindowFocused(): Return true if any window is focused\nMAKE_ENUM(ImGuiFocusedFlags_AnyWindow,AnyWindow)\n//    ImGuiFocusedFlags_RootAndChildWindows           = ImGuiFocusedFlags_RootWindow | ImGuiFocusedFlags_ChildWindows\nMAKE_ENUM(ImGuiFocusedFlags_RootAndChildWindows,RootAndChildWindows)\nEND_ENUM(FocusedFlags)\n//enum ImGuiHoveredFlags_\n\nSTART_ENUM(HoveredFlags)\n//    ImGuiHoveredFlags_Default                       = 0,        // Return true if directly over the item/window, not obstructed by another window, not obstructed by an active popup or modal blocking inputs under them.\nMAKE_ENUM(ImGuiHoveredFlags_Default,Default)\n//    ImGuiHoveredFlags_ChildWindows                  = 1 << 0,   // IsWindowHovered() only: Return true if any children of the window is hovered\nMAKE_ENUM(ImGuiHoveredFlags_ChildWindows,ChildWindows)\n//    ImGuiHoveredFlags_RootWindow                    = 1 << 1,   // IsWindowHovered() only: Test from root window (top most parent of the current hierarchy)\nMAKE_ENUM(ImGuiHoveredFlags_RootWindow,RootWindow)\n//    ImGuiHoveredFlags_AnyWindow                     = 1 << 2,   // IsWindowHovered() only: Return true if any window is hovered\nMAKE_ENUM(ImGuiHoveredFlags_AnyWindow,AnyWindow)\n//    ImGuiHoveredFlags_AllowWhenBlockedByPopup       = 1 << 3,   // Return true even if a popup window is normally blocking access to this item/window\nMAKE_ENUM(ImGuiHoveredFlags_AllowWhenBlockedByPopup,AllowWhenBlockedByPopup)\n//    ImGuiHoveredFlags_AllowWhenBlockedByActiveItem  = 1 << 5,   // Return true even if an active item is blocking access to this item/window. Useful for Drag and Drop patterns.\nMAKE_ENUM(ImGuiHoveredFlags_AllowWhenBlockedByActiveItem,AllowWhenBlockedByActiveItem)\n//    ImGuiHoveredFlags_AllowWhenOverlapped           = 1 << 6,   // Return true even if the position is overlapped by another window\nMAKE_ENUM(ImGuiHoveredFlags_AllowWhenOverlapped,AllowWhenOverlapped)\n//    ImGuiHoveredFlags_RectOnly                      = ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_AllowWhenOverlapped,\nMAKE_ENUM(ImGuiHoveredFlags_RectOnly,RectOnly)\n//    ImGuiHoveredFlags_RootAndChildWindows           = ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_ChildWindows\nMAKE_ENUM(ImGuiHoveredFlags_RootAndChildWindows,RootAndChildWindows)\nEND_ENUM(HoveredFlags)\n//enum ImGuiDragDropFlags_\n\nSTART_ENUM(DragDropFlags)\n//    ImGuiDragDropFlags_SourceNoPreviewTooltip       = 1 << 0,   // By default, a successful call to BeginDragDropSource opens a tooltip so you can display a preview or description of the source contents. This flag disable this behavior.\nMAKE_ENUM(ImGuiDragDropFlags_SourceNoPreviewTooltip,SourceNoPreviewTooltip)\n//    ImGuiDragDropFlags_SourceNoDisableHover         = 1 << 1,   // By default, when dragging we clear data so that IsItemHovered() will return true, to avoid subsequent user code submitting tooltips. This flag disable this behavior so you can still call IsItemHovered() on the source item.\nMAKE_ENUM(ImGuiDragDropFlags_SourceNoDisableHover,SourceNoDisableHover)\n//    ImGuiDragDropFlags_SourceNoHoldToOpenOthers     = 1 << 2,   // Disable the behavior that allows to open tree nodes and collapsing header by holding over them while dragging a source item.\nMAKE_ENUM(ImGuiDragDropFlags_SourceNoHoldToOpenOthers,SourceNoHoldToOpenOthers)\n//    ImGuiDragDropFlags_SourceAllowNullID            = 1 << 3,   // Allow items such as Text(), Image() that have no unique identifier to be used as drag source, by manufacturing a temporary identifier based on their window-relative position. This is extremely unusual within the dear imgui ecosystem and so we made it explicit.\nMAKE_ENUM(ImGuiDragDropFlags_SourceAllowNullID,SourceAllowNullID)\n//    ImGuiDragDropFlags_SourceExtern                 = 1 << 4,   // External source (from outside of imgui), won't attempt to read current item/window info. Will always return true. Only one Extern source can be active simultaneously.\nMAKE_ENUM(ImGuiDragDropFlags_SourceExtern,SourceExtern)\n//    ImGuiDragDropFlags_AcceptBeforeDelivery         = 1 << 10,  // AcceptDragDropPayload() will returns true even before the mouse button is released. You can then call IsDelivery() to test if the payload needs to be delivered.\nMAKE_ENUM(ImGuiDragDropFlags_AcceptBeforeDelivery,AcceptBeforeDelivery)\n//    ImGuiDragDropFlags_AcceptNoDrawDefaultRect      = 1 << 11,  // Do not draw the default highlight rectangle when hovering over target.\nMAKE_ENUM(ImGuiDragDropFlags_AcceptNoDrawDefaultRect,AcceptNoDrawDefaultRect)\n//    ImGuiDragDropFlags_AcceptPeekOnly               = ImGuiDragDropFlags_AcceptBeforeDelivery | ImGuiDragDropFlags_AcceptNoDrawDefaultRect  // For peeking ahead and inspecting the payload before delivery.\nMAKE_ENUM(ImGuiDragDropFlags_AcceptPeekOnly,AcceptPeekOnly)\nEND_ENUM(DragDropFlags)\n//enum ImGuiDir_\n\nSTART_ENUM(Dir)\n//    ImGuiDir_None    = -1,\nMAKE_ENUM(ImGuiDir_None,None)\n//    ImGuiDir_Left    = 0,\nMAKE_ENUM(ImGuiDir_Left,Left)\n//    ImGuiDir_Right   = 1,\nMAKE_ENUM(ImGuiDir_Right,Right)\n//    ImGuiDir_Up      = 2,\nMAKE_ENUM(ImGuiDir_Up,Up)\n//    ImGuiDir_Down    = 3,\nMAKE_ENUM(ImGuiDir_Down,Down)\n//    ImGuiDir_COUNT\nMAKE_ENUM(ImGuiDir_COUNT,COUNT)\nEND_ENUM(Dir)\n//enum ImGuiKey_\n\nSTART_ENUM(Key)\n//    ImGuiKey_Tab,\nMAKE_ENUM(ImGuiKey_Tab,Tab)\n//    ImGuiKey_LeftArrow,\nMAKE_ENUM(ImGuiKey_LeftArrow,LeftArrow)\n//    ImGuiKey_RightArrow,\nMAKE_ENUM(ImGuiKey_RightArrow,RightArrow)\n//    ImGuiKey_UpArrow,\nMAKE_ENUM(ImGuiKey_UpArrow,UpArrow)\n//    ImGuiKey_DownArrow,\nMAKE_ENUM(ImGuiKey_DownArrow,DownArrow)\n//    ImGuiKey_PageUp,\nMAKE_ENUM(ImGuiKey_PageUp,PageUp)\n//    ImGuiKey_PageDown,\nMAKE_ENUM(ImGuiKey_PageDown,PageDown)\n//    ImGuiKey_Home,\nMAKE_ENUM(ImGuiKey_Home,Home)\n//    ImGuiKey_End,\nMAKE_ENUM(ImGuiKey_End,End)\n//    ImGuiKey_Insert,\nMAKE_ENUM(ImGuiKey_Insert,Insert)\n//    ImGuiKey_Delete,\nMAKE_ENUM(ImGuiKey_Delete,Delete)\n//    ImGuiKey_Backspace,\nMAKE_ENUM(ImGuiKey_Backspace,Backspace)\n//    ImGuiKey_Space,\nMAKE_ENUM(ImGuiKey_Space,Space)\n//    ImGuiKey_Enter,\nMAKE_ENUM(ImGuiKey_Enter,Enter)\n//    ImGuiKey_Escape,\nMAKE_ENUM(ImGuiKey_Escape,Escape)\n//    ImGuiKey_A,         // for text edit CTRL+A: select all\nMAKE_ENUM(ImGuiKey_A,A)\n//    ImGuiKey_C,         // for text edit CTRL+C: copy\nMAKE_ENUM(ImGuiKey_C,C)\n//    ImGuiKey_V,         // for text edit CTRL+V: paste\nMAKE_ENUM(ImGuiKey_V,V)\n//    ImGuiKey_X,         // for text edit CTRL+X: cut\nMAKE_ENUM(ImGuiKey_X,X)\n//    ImGuiKey_Y,         // for text edit CTRL+Y: redo\nMAKE_ENUM(ImGuiKey_Y,Y)\n//    ImGuiKey_Z,         // for text edit CTRL+Z: undo\nMAKE_ENUM(ImGuiKey_Z,Z)\n//    ImGuiKey_COUNT\nMAKE_ENUM(ImGuiKey_COUNT,COUNT)\nEND_ENUM(Key)\n//enum ImGuiNavInput_\n\nSTART_ENUM(NavInput)\n//    ImGuiNavInput_Activate,      // activate / open / toggle / tweak value       // e.g. Cross  (PS4), A (Xbox), A (Switch), Space (Keyboard)\nMAKE_ENUM(ImGuiNavInput_Activate,Activate)\n//    ImGuiNavInput_Cancel,        // cancel / close / exit                        // e.g. Circle (PS4), B (Xbox), B (Switch), Escape (Keyboard)\nMAKE_ENUM(ImGuiNavInput_Cancel,Cancel)\n//    ImGuiNavInput_Input,         // text input / on-screen keyboard              // e.g. Triang.(PS4), Y (Xbox), X (Switch), Return (Keyboard)\nMAKE_ENUM(ImGuiNavInput_Input,Input)\n//    ImGuiNavInput_Menu,          // tap: toggle menu / hold: focus, move, resize // e.g. Square (PS4), X (Xbox), Y (Switch), Alt (Keyboard)\nMAKE_ENUM(ImGuiNavInput_Menu,Menu)\n//    ImGuiNavInput_DpadLeft,      // move / tweak / resize window (w/ PadMenu)    // e.g. D-pad Left/Right/Up/Down (Gamepads), Arrow keys (Keyboard)\nMAKE_ENUM(ImGuiNavInput_DpadLeft,DpadLeft)\n//    ImGuiNavInput_DpadRight,     // \nMAKE_ENUM(ImGuiNavInput_DpadRight,DpadRight)\n//    ImGuiNavInput_DpadUp,        // \nMAKE_ENUM(ImGuiNavInput_DpadUp,DpadUp)\n//    ImGuiNavInput_DpadDown,      // \nMAKE_ENUM(ImGuiNavInput_DpadDown,DpadDown)\n//    ImGuiNavInput_LStickLeft,    // scroll / move window (w/ PadMenu)            // e.g. Left Analog Stick Left/Right/Up/Down\nMAKE_ENUM(ImGuiNavInput_LStickLeft,LStickLeft)\n//    ImGuiNavInput_LStickRight,   // \nMAKE_ENUM(ImGuiNavInput_LStickRight,LStickRight)\n//    ImGuiNavInput_LStickUp,      // \nMAKE_ENUM(ImGuiNavInput_LStickUp,LStickUp)\n//    ImGuiNavInput_LStickDown,    // \nMAKE_ENUM(ImGuiNavInput_LStickDown,LStickDown)\n//    ImGuiNavInput_FocusPrev,     // next window (w/ PadMenu)                     // e.g. L1 or L2 (PS4), LB or LT (Xbox), L or ZL (Switch)\nMAKE_ENUM(ImGuiNavInput_FocusPrev,FocusPrev)\n//    ImGuiNavInput_FocusNext,     // prev window (w/ PadMenu)                     // e.g. R1 or R2 (PS4), RB or RT (Xbox), R or ZL (Switch) \nMAKE_ENUM(ImGuiNavInput_FocusNext,FocusNext)\n//    ImGuiNavInput_TweakSlow,     // slower tweaks                                // e.g. L1 or L2 (PS4), LB or LT (Xbox), L or ZL (Switch)\nMAKE_ENUM(ImGuiNavInput_TweakSlow,TweakSlow)\n//    ImGuiNavInput_TweakFast,     // faster tweaks                                // e.g. R1 or R2 (PS4), RB or RT (Xbox), R or ZL (Switch)\nMAKE_ENUM(ImGuiNavInput_TweakFast,TweakFast)\n//    ImGuiNavInput_COUNT,\nMAKE_ENUM(ImGuiNavInput_COUNT,COUNT)\nEND_ENUM(NavInput)\n//enum ImGuiConfigFlags_\n\nSTART_ENUM(ConfigFlags)\n//    ImGuiConfigFlags_NavEnableKeyboard      = 1 << 0,   // Master keyboard navigation enable flag. NewFrame() will automatically fill io.NavInputs[] based on io.KeyDown[].\nMAKE_ENUM(ImGuiConfigFlags_NavEnableKeyboard,NavEnableKeyboard)\n//    ImGuiConfigFlags_NavEnableGamepad       = 1 << 1,   // Master gamepad navigation enable flag. This is mostly to instruct your imgui back-end to fill io.NavInputs[]. Back-end also needs to set ImGuiBackendFlags_HasGamepad.\nMAKE_ENUM(ImGuiConfigFlags_NavEnableGamepad,NavEnableGamepad)\n//    ImGuiConfigFlags_NavEnableSetMousePos   = 1 << 2,   // Instruct navigation to move the mouse cursor. May be useful on TV/console systems where moving a virtual mouse is awkward. Will update io.MousePos and set io.WantSetMousePos=true. If enabled you MUST honor io.WantSetMousePos requests in your binding, otherwise ImGui will react as if the mouse is jumping around back and forth.\nMAKE_ENUM(ImGuiConfigFlags_NavEnableSetMousePos,NavEnableSetMousePos)\n//    ImGuiConfigFlags_NavNoCaptureKeyboard   = 1 << 3,   // Instruct navigation to not set the io.WantCaptureKeyboard flag with io.NavActive is set. \nMAKE_ENUM(ImGuiConfigFlags_NavNoCaptureKeyboard,NavNoCaptureKeyboard)\n//    ImGuiConfigFlags_NoMouse                = 1 << 4,   // Instruct imgui to clear mouse position/buttons in NewFrame(). This allows ignoring the mouse information back-end\nMAKE_ENUM(ImGuiConfigFlags_NoMouse,NoMouse)\n//    ImGuiConfigFlags_NoMouseCursorChange    = 1 << 5,   // Instruct back-end to not alter mouse cursor shape and visibility.\nMAKE_ENUM(ImGuiConfigFlags_NoMouseCursorChange,NoMouseCursorChange)\n//    ImGuiConfigFlags_IsSRGB                 = 1 << 20,  // Application is SRGB-aware.\nMAKE_ENUM(ImGuiConfigFlags_IsSRGB,IsSRGB)\n//    ImGuiConfigFlags_IsTouchScreen          = 1 << 21   // Application is using a touch screen instead of a mouse.\nMAKE_ENUM(ImGuiConfigFlags_IsTouchScreen,IsTouchScreen)\nEND_ENUM(ConfigFlags)\n//enum ImGuiBackendFlags_\n\nSTART_ENUM(BackendFlags)\n//    ImGuiBackendFlags_HasGamepad            = 1 << 0,   // Back-end has a connected gamepad.\nMAKE_ENUM(ImGuiBackendFlags_HasGamepad,HasGamepad)\n//    ImGuiBackendFlags_HasMouseCursors       = 1 << 1,   // Back-end can honor GetMouseCursor() values and change the OS cursor shape.\nMAKE_ENUM(ImGuiBackendFlags_HasMouseCursors,HasMouseCursors)\n//    ImGuiBackendFlags_HasSetMousePos        = 1 << 2    // Back-end can honor io.WantSetMousePos and reposition the mouse (only used if ImGuiConfigFlags_NavEnableSetMousePos is set).\nMAKE_ENUM(ImGuiBackendFlags_HasSetMousePos,HasSetMousePos)\nEND_ENUM(BackendFlags)\n//enum ImGuiCol_\n\nSTART_ENUM(Col)\n//    ImGuiCol_Text,\nMAKE_ENUM(ImGuiCol_Text,Text)\n//    ImGuiCol_TextDisabled,\nMAKE_ENUM(ImGuiCol_TextDisabled,TextDisabled)\n//    ImGuiCol_WindowBg,              // Background of normal windows\nMAKE_ENUM(ImGuiCol_WindowBg,WindowBg)\n//    ImGuiCol_ChildBg,               // Background of child windows\nMAKE_ENUM(ImGuiCol_ChildBg,ChildBg)\n//    ImGuiCol_PopupBg,               // Background of popups, menus, tooltips windows\nMAKE_ENUM(ImGuiCol_PopupBg,PopupBg)\n//    ImGuiCol_Border,\nMAKE_ENUM(ImGuiCol_Border,Border)\n//    ImGuiCol_BorderShadow,\nMAKE_ENUM(ImGuiCol_BorderShadow,BorderShadow)\n//    ImGuiCol_FrameBg,               // Background of checkbox, radio button, plot, slider, text input\nMAKE_ENUM(ImGuiCol_FrameBg,FrameBg)\n//    ImGuiCol_FrameBgHovered,\nMAKE_ENUM(ImGuiCol_FrameBgHovered,FrameBgHovered)\n//    ImGuiCol_FrameBgActive,\nMAKE_ENUM(ImGuiCol_FrameBgActive,FrameBgActive)\n//    ImGuiCol_TitleBg,\nMAKE_ENUM(ImGuiCol_TitleBg,TitleBg)\n//    ImGuiCol_TitleBgActive,\nMAKE_ENUM(ImGuiCol_TitleBgActive,TitleBgActive)\n//    ImGuiCol_TitleBgCollapsed,\nMAKE_ENUM(ImGuiCol_TitleBgCollapsed,TitleBgCollapsed)\n//    ImGuiCol_MenuBarBg,\nMAKE_ENUM(ImGuiCol_MenuBarBg,MenuBarBg)\n//    ImGuiCol_ScrollbarBg,\nMAKE_ENUM(ImGuiCol_ScrollbarBg,ScrollbarBg)\n//    ImGuiCol_ScrollbarGrab,\nMAKE_ENUM(ImGuiCol_ScrollbarGrab,ScrollbarGrab)\n//    ImGuiCol_ScrollbarGrabHovered,\nMAKE_ENUM(ImGuiCol_ScrollbarGrabHovered,ScrollbarGrabHovered)\n//    ImGuiCol_ScrollbarGrabActive,\nMAKE_ENUM(ImGuiCol_ScrollbarGrabActive,ScrollbarGrabActive)\n//    ImGuiCol_CheckMark,\nMAKE_ENUM(ImGuiCol_CheckMark,CheckMark)\n//    ImGuiCol_SliderGrab,\nMAKE_ENUM(ImGuiCol_SliderGrab,SliderGrab)\n//    ImGuiCol_SliderGrabActive,\nMAKE_ENUM(ImGuiCol_SliderGrabActive,SliderGrabActive)\n//    ImGuiCol_Button,\nMAKE_ENUM(ImGuiCol_Button,Button)\n//    ImGuiCol_ButtonHovered,\nMAKE_ENUM(ImGuiCol_ButtonHovered,ButtonHovered)\n//    ImGuiCol_ButtonActive,\nMAKE_ENUM(ImGuiCol_ButtonActive,ButtonActive)\n//    ImGuiCol_Header,\nMAKE_ENUM(ImGuiCol_Header,Header)\n//    ImGuiCol_HeaderHovered,\nMAKE_ENUM(ImGuiCol_HeaderHovered,HeaderHovered)\n//    ImGuiCol_HeaderActive,\nMAKE_ENUM(ImGuiCol_HeaderActive,HeaderActive)\n//    ImGuiCol_Separator,\nMAKE_ENUM(ImGuiCol_Separator,Separator)\n//    ImGuiCol_SeparatorHovered,\nMAKE_ENUM(ImGuiCol_SeparatorHovered,SeparatorHovered)\n//    ImGuiCol_SeparatorActive,\nMAKE_ENUM(ImGuiCol_SeparatorActive,SeparatorActive)\n//    ImGuiCol_ResizeGrip,\nMAKE_ENUM(ImGuiCol_ResizeGrip,ResizeGrip)\n//    ImGuiCol_ResizeGripHovered,\nMAKE_ENUM(ImGuiCol_ResizeGripHovered,ResizeGripHovered)\n//    ImGuiCol_ResizeGripActive,\nMAKE_ENUM(ImGuiCol_ResizeGripActive,ResizeGripActive)\n//    ImGuiCol_PlotLines,\nMAKE_ENUM(ImGuiCol_PlotLines,PlotLines)\n//    ImGuiCol_PlotLinesHovered,\nMAKE_ENUM(ImGuiCol_PlotLinesHovered,PlotLinesHovered)\n//    ImGuiCol_PlotHistogram,\nMAKE_ENUM(ImGuiCol_PlotHistogram,PlotHistogram)\n//    ImGuiCol_PlotHistogramHovered,\nMAKE_ENUM(ImGuiCol_PlotHistogramHovered,PlotHistogramHovered)\n//    ImGuiCol_TextSelectedBg,\nMAKE_ENUM(ImGuiCol_TextSelectedBg,TextSelectedBg)\n//    ImGuiCol_ModalWindowDarkening,  // darken/colorize entire screen behind a modal window, when one is active\nMAKE_ENUM(ImGuiCol_ModalWindowDarkening,ModalWindowDarkening)\n//    ImGuiCol_DragDropTarget,\nMAKE_ENUM(ImGuiCol_DragDropTarget,DragDropTarget)\n//    ImGuiCol_NavHighlight,          // gamepad/keyboard: current highlighted item \nMAKE_ENUM(ImGuiCol_NavHighlight,NavHighlight)\n//    ImGuiCol_NavWindowingHighlight, // gamepad/keyboard: when holding NavMenu to focus/move/resize windows\nMAKE_ENUM(ImGuiCol_NavWindowingHighlight,NavWindowingHighlight)\n//    ImGuiCol_COUNT\nMAKE_ENUM(ImGuiCol_COUNT,COUNT)\nEND_ENUM(Col)\n//enum ImGuiStyleVar_\n\nSTART_ENUM(StyleVar)\n//    ImGuiStyleVar_Alpha,               // float     Alpha\nMAKE_ENUM(ImGuiStyleVar_Alpha,Alpha)\n//    ImGuiStyleVar_WindowPadding,       // ImVec2    WindowPadding\nMAKE_ENUM(ImGuiStyleVar_WindowPadding,WindowPadding)\n//    ImGuiStyleVar_WindowRounding,      // float     WindowRounding\nMAKE_ENUM(ImGuiStyleVar_WindowRounding,WindowRounding)\n//    ImGuiStyleVar_WindowBorderSize,    // float     WindowBorderSize\nMAKE_ENUM(ImGuiStyleVar_WindowBorderSize,WindowBorderSize)\n//    ImGuiStyleVar_WindowMinSize,       // ImVec2    WindowMinSize\nMAKE_ENUM(ImGuiStyleVar_WindowMinSize,WindowMinSize)\n//    ImGuiStyleVar_WindowTitleAlign,    // ImVec2    WindowTitleAlign\nMAKE_ENUM(ImGuiStyleVar_WindowTitleAlign,WindowTitleAlign)\n//    ImGuiStyleVar_ChildRounding,       // float     ChildRounding\nMAKE_ENUM(ImGuiStyleVar_ChildRounding,ChildRounding)\n//    ImGuiStyleVar_ChildBorderSize,     // float     ChildBorderSize\nMAKE_ENUM(ImGuiStyleVar_ChildBorderSize,ChildBorderSize)\n//    ImGuiStyleVar_PopupRounding,       // float     PopupRounding\nMAKE_ENUM(ImGuiStyleVar_PopupRounding,PopupRounding)\n//    ImGuiStyleVar_PopupBorderSize,     // float     PopupBorderSize\nMAKE_ENUM(ImGuiStyleVar_PopupBorderSize,PopupBorderSize)\n//    ImGuiStyleVar_FramePadding,        // ImVec2    FramePadding\nMAKE_ENUM(ImGuiStyleVar_FramePadding,FramePadding)\n//    ImGuiStyleVar_FrameRounding,       // float     FrameRounding\nMAKE_ENUM(ImGuiStyleVar_FrameRounding,FrameRounding)\n//    ImGuiStyleVar_FrameBorderSize,     // float     FrameBorderSize\nMAKE_ENUM(ImGuiStyleVar_FrameBorderSize,FrameBorderSize)\n//    ImGuiStyleVar_ItemSpacing,         // ImVec2    ItemSpacing\nMAKE_ENUM(ImGuiStyleVar_ItemSpacing,ItemSpacing)\n//    ImGuiStyleVar_ItemInnerSpacing,    // ImVec2    ItemInnerSpacing\nMAKE_ENUM(ImGuiStyleVar_ItemInnerSpacing,ItemInnerSpacing)\n//    ImGuiStyleVar_IndentSpacing,       // float     IndentSpacing\nMAKE_ENUM(ImGuiStyleVar_IndentSpacing,IndentSpacing)\n//    ImGuiStyleVar_ScrollbarSize,       // float     ScrollbarSize\nMAKE_ENUM(ImGuiStyleVar_ScrollbarSize,ScrollbarSize)\n//    ImGuiStyleVar_ScrollbarRounding,   // float     ScrollbarRounding\nMAKE_ENUM(ImGuiStyleVar_ScrollbarRounding,ScrollbarRounding)\n//    ImGuiStyleVar_GrabMinSize,         // float     GrabMinSize\nMAKE_ENUM(ImGuiStyleVar_GrabMinSize,GrabMinSize)\n//    ImGuiStyleVar_GrabRounding,        // float     GrabRounding\nMAKE_ENUM(ImGuiStyleVar_GrabRounding,GrabRounding)\n//    ImGuiStyleVar_ButtonTextAlign,     // ImVec2    ButtonTextAlign\nMAKE_ENUM(ImGuiStyleVar_ButtonTextAlign,ButtonTextAlign)\n//    ImGuiStyleVar_COUNT\nMAKE_ENUM(ImGuiStyleVar_COUNT,COUNT)\nEND_ENUM(StyleVar)\n//enum ImGuiColorEditFlags_\n\nSTART_ENUM(ColorEditFlags)\n//    ImGuiColorEditFlags_NoAlpha         = 1 << 1,   //              // ColorEdit, ColorPicker, ColorButton: ignore Alpha component (read 3 components from the input pointer).\nMAKE_ENUM(ImGuiColorEditFlags_NoAlpha,NoAlpha)\n//    ImGuiColorEditFlags_NoPicker        = 1 << 2,   //              // ColorEdit: disable picker when clicking on colored square.\nMAKE_ENUM(ImGuiColorEditFlags_NoPicker,NoPicker)\n//    ImGuiColorEditFlags_NoOptions       = 1 << 3,   //              // ColorEdit: disable toggling options menu when right-clicking on inputs/small preview.\nMAKE_ENUM(ImGuiColorEditFlags_NoOptions,NoOptions)\n//    ImGuiColorEditFlags_NoSmallPreview  = 1 << 4,   //              // ColorEdit, ColorPicker: disable colored square preview next to the inputs. (e.g. to show only the inputs)\nMAKE_ENUM(ImGuiColorEditFlags_NoSmallPreview,NoSmallPreview)\n//    ImGuiColorEditFlags_NoInputs        = 1 << 5,   //              // ColorEdit, ColorPicker: disable inputs sliders/text widgets (e.g. to show only the small preview colored square).\nMAKE_ENUM(ImGuiColorEditFlags_NoInputs,NoInputs)\n//    ImGuiColorEditFlags_NoTooltip       = 1 << 6,   //              // ColorEdit, ColorPicker, ColorButton: disable tooltip when hovering the preview.\nMAKE_ENUM(ImGuiColorEditFlags_NoTooltip,NoTooltip)\n//    ImGuiColorEditFlags_NoLabel         = 1 << 7,   //              // ColorEdit, ColorPicker: disable display of inline text label (the label is still forwarded to the tooltip and picker).\nMAKE_ENUM(ImGuiColorEditFlags_NoLabel,NoLabel)\n//    ImGuiColorEditFlags_NoSidePreview   = 1 << 8,   //              // ColorPicker: disable bigger color preview on right side of the picker, use small colored square preview instead.\nMAKE_ENUM(ImGuiColorEditFlags_NoSidePreview,NoSidePreview)\n//    ImGuiColorEditFlags_AlphaBar        = 1 << 9,   //              // ColorEdit, ColorPicker: show vertical alpha bar/gradient in picker.\nMAKE_ENUM(ImGuiColorEditFlags_AlphaBar,AlphaBar)\n//    ImGuiColorEditFlags_AlphaPreview    = 1 << 10,  //              // ColorEdit, ColorPicker, ColorButton: display preview as a transparent color over a checkerboard, instead of opaque.\nMAKE_ENUM(ImGuiColorEditFlags_AlphaPreview,AlphaPreview)\n//    ImGuiColorEditFlags_AlphaPreviewHalf= 1 << 11,  //              // ColorEdit, ColorPicker, ColorButton: display half opaque / half checkerboard, instead of opaque.\nMAKE_ENUM(ImGuiColorEditFlags_AlphaPreviewHalf,AlphaPreviewHalf)\n//    ImGuiColorEditFlags_HDR             = 1 << 12,  //              // (WIP) ColorEdit: Currently only disable 0.0f..1.0f limits in RGBA edition (note: you probably want to use ImGuiColorEditFlags_Float flag as well).\nMAKE_ENUM(ImGuiColorEditFlags_HDR,HDR)\n//    ImGuiColorEditFlags_RGB             = 1 << 13,  // [Inputs]     // ColorEdit: choose one among RGB/HSV/HEX. ColorPicker: choose any combination using RGB/HSV/HEX.\nMAKE_ENUM(ImGuiColorEditFlags_RGB,RGB)\n//    ImGuiColorEditFlags_HSV             = 1 << 14,  // [Inputs]     // \"\nMAKE_ENUM(ImGuiColorEditFlags_HSV,HSV)\n//    ImGuiColorEditFlags_HEX             = 1 << 15,  // [Inputs]     // \"\nMAKE_ENUM(ImGuiColorEditFlags_HEX,HEX)\n//    ImGuiColorEditFlags_Uint8           = 1 << 16,  // [DataType]   // ColorEdit, ColorPicker, ColorButton: _display_ values formatted as 0..255. \nMAKE_ENUM(ImGuiColorEditFlags_Uint8,Uint8)\n//    ImGuiColorEditFlags_Float           = 1 << 17,  // [DataType]   // ColorEdit, ColorPicker, ColorButton: _display_ values formatted as 0.0f..1.0f floats instead of 0..255 integers. No round-trip of value via integers.\nMAKE_ENUM(ImGuiColorEditFlags_Float,Float)\n//    ImGuiColorEditFlags_PickerHueBar    = 1 << 18,  // [PickerMode] // ColorPicker: bar for Hue, rectangle for Sat/Value.\nMAKE_ENUM(ImGuiColorEditFlags_PickerHueBar,PickerHueBar)\n//    ImGuiColorEditFlags_PickerHueWheel  = 1 << 19,  // [PickerMode] // ColorPicker: wheel for Hue, triangle for Sat/Value.\nMAKE_ENUM(ImGuiColorEditFlags_PickerHueWheel,PickerHueWheel)\nEND_ENUM(ColorEditFlags)\n//enum ImGuiMouseCursor_\n\nSTART_ENUM(MouseCursor)\n//    ImGuiMouseCursor_None = -1,\nMAKE_ENUM(ImGuiMouseCursor_None,None)\n//    ImGuiMouseCursor_Arrow = 0,\nMAKE_ENUM(ImGuiMouseCursor_Arrow,Arrow)\n//    ImGuiMouseCursor_TextInput,         // When hovering over InputText, etc.\nMAKE_ENUM(ImGuiMouseCursor_TextInput,TextInput)\n//    ImGuiMouseCursor_ResizeAll,         // Unused by imgui functions\nMAKE_ENUM(ImGuiMouseCursor_ResizeAll,ResizeAll)\n//    ImGuiMouseCursor_ResizeNS,          // When hovering over an horizontal border\nMAKE_ENUM(ImGuiMouseCursor_ResizeNS,ResizeNS)\n//    ImGuiMouseCursor_ResizeEW,          // When hovering over a vertical border or a column\nMAKE_ENUM(ImGuiMouseCursor_ResizeEW,ResizeEW)\n//    ImGuiMouseCursor_ResizeNESW,        // When hovering over the bottom-left corner of a window\nMAKE_ENUM(ImGuiMouseCursor_ResizeNESW,ResizeNESW)\n//    ImGuiMouseCursor_ResizeNWSE,        // When hovering over the bottom-right corner of a window\nMAKE_ENUM(ImGuiMouseCursor_ResizeNWSE,ResizeNWSE)\n//    ImGuiMouseCursor_COUNT\nMAKE_ENUM(ImGuiMouseCursor_COUNT,COUNT)\nEND_ENUM(MouseCursor)\n//enum ImGuiCond_\n\nSTART_ENUM(Cond)\n//    ImGuiCond_Always        = 1 << 0,   // Set the variable\nMAKE_ENUM(ImGuiCond_Always,Always)\n//    ImGuiCond_Once          = 1 << 1,   // Set the variable once per runtime session (only the first call with succeed)\nMAKE_ENUM(ImGuiCond_Once,Once)\n//    ImGuiCond_FirstUseEver  = 1 << 2,   // Set the variable if the object/window has no persistently saved data (no entry in .ini file)\nMAKE_ENUM(ImGuiCond_FirstUseEver,FirstUseEver)\n//    ImGuiCond_Appearing     = 1 << 3    // Set the variable if the object/window is appearing after being hidden/inactive (or the first time)\nMAKE_ENUM(ImGuiCond_Appearing,Appearing)\nEND_ENUM(Cond)\n//struct ImGuiStyle\n\n//struct ImGuiIO\n\n//namespace ImGui\n\nEND_STACK_START\nEND_STACK_END\n//class ImVector\n\n//struct ImGuiOnceUponAFrame\n\n//struct ImGuiTextFilter\n\n//struct ImGuiTextBuffer\n\n//struct ImGuiStorage\n\n//struct ImGuiTextEditCallbackData\n\n//struct ImGuiSizeCallbackData\n\n//struct ImGuiPayload\n\n//struct ImColor\n\n//struct ImGuiListClipper\n\n//struct ImDrawCmd\n\n//struct ImDrawVert\n\n//struct ImDrawChannel\n\n//enum ImDrawCornerFlags_\n\n//enum ImDrawListFlags_\n\n//struct ImDrawList\n\n//    IMGUI_API void  PushClipRect(ImVec2 clip_rect_min, ImVec2 clip_rect_max, bool intersect_with_current_clip_rect = false);  // Render-level scissoring. This is passed down to your render function but not used for CPU-side coarse clipping. Prefer using higher-level ImGui::PushClipRect() to affect logic (hit-testing and widget culling)\nIMGUI_FUNCTION_DRAW_LIST(PushClipRect)\nIM_VEC_2_ARG(clip_rect_min)\nIM_VEC_2_ARG(clip_rect_max)\nOPTIONAL_BOOL_ARG(intersect_with_current_clip_rect, false)\nDRAW_LIST_CALL_FUNCTION_NO_RET(PushClipRect, clip_rect_min, clip_rect_max, intersect_with_current_clip_rect)\nEND_IMGUI_FUNC\n//    IMGUI_API void  PushClipRectFullScreen();\nIMGUI_FUNCTION_DRAW_LIST(PushClipRectFullScreen)\nDRAW_LIST_CALL_FUNCTION_NO_RET(PushClipRectFullScreen)\nEND_IMGUI_FUNC\n//    IMGUI_API void  PopClipRect();\nIMGUI_FUNCTION_DRAW_LIST(PopClipRect)\nDRAW_LIST_CALL_FUNCTION_NO_RET(PopClipRect)\nEND_IMGUI_FUNC\n//    IMGUI_API void  PushTextureID(ImTextureID texture_id);\nIMGUI_FUNCTION_DRAW_LIST(PushTextureID)\nIM_TEXTURE_ID_ARG(texture_id)\nDRAW_LIST_CALL_FUNCTION_NO_RET(PushTextureID, texture_id)\nEND_IMGUI_FUNC\n//    IMGUI_API void  PopTextureID();\nIMGUI_FUNCTION_DRAW_LIST(PopTextureID)\nDRAW_LIST_CALL_FUNCTION_NO_RET(PopTextureID)\nEND_IMGUI_FUNC\n//    inline ImVec2   GetClipRectMin() const { const ImVec4& cr = _ClipRectStack.back(); return ImVec2 cr.x  cr.y; }\n// Unsupported arg type ) const { const ImVec4& cr = _ClipRectStack.back(\n//    inline ImVec2   GetClipRectMax() const { const ImVec4& cr = _ClipRectStack.back(); return ImVec2 cr.z  cr.w; }\n// Unsupported arg type ) const { const ImVec4& cr = _ClipRectStack.back(\n//    IMGUI_API void  AddLine(const ImVec2& a, const ImVec2& b, ImU32 col, float thickness = 1.0f);\nIMGUI_FUNCTION_DRAW_LIST(AddLine)\nIM_VEC_2_ARG(a)\nIM_VEC_2_ARG(b)\nUINT_ARG(col)\nOPTIONAL_NUMBER_ARG(thickness, 1.0f)\nDRAW_LIST_CALL_FUNCTION_NO_RET(AddLine, a, b, col, thickness)\nEND_IMGUI_FUNC\n//    IMGUI_API void  AddRect(const ImVec2& a, const ImVec2& b, ImU32 col, float rounding = 0.0f, int rounding_corners_flags = ImDrawCornerFlags_All, float thickness = 1.0f);   // a: upper-left, b: lower-right, rounding_corners_flags: 4-bits corresponding to which corner to round\nIMGUI_FUNCTION_DRAW_LIST(AddRect)\nIM_VEC_2_ARG(a)\nIM_VEC_2_ARG(b)\nUINT_ARG(col)\nOPTIONAL_NUMBER_ARG(rounding, 0.0f)\nOPTIONAL_INT_ARG(rounding_corners_flags, ImDrawCornerFlags_All)\nOPTIONAL_NUMBER_ARG(thickness, 1.0f)\nDRAW_LIST_CALL_FUNCTION_NO_RET(AddRect, a, b, col, rounding, rounding_corners_flags, thickness)\nEND_IMGUI_FUNC\n//    IMGUI_API void  AddRectFilled(const ImVec2& a, const ImVec2& b, ImU32 col, float rounding = 0.0f, int rounding_corners_flags = ImDrawCornerFlags_All);                     // a: upper-left, b: lower-right\nIMGUI_FUNCTION_DRAW_LIST(AddRectFilled)\nIM_VEC_2_ARG(a)\nIM_VEC_2_ARG(b)\nUINT_ARG(col)\nOPTIONAL_NUMBER_ARG(rounding, 0.0f)\nOPTIONAL_INT_ARG(rounding_corners_flags, ImDrawCornerFlags_All)\nDRAW_LIST_CALL_FUNCTION_NO_RET(AddRectFilled, a, b, col, rounding, rounding_corners_flags)\nEND_IMGUI_FUNC\n//    IMGUI_API void  AddRectFilledMultiColor(const ImVec2& a, const ImVec2& b, ImU32 col_upr_left, ImU32 col_upr_right, ImU32 col_bot_right, ImU32 col_bot_left);\nIMGUI_FUNCTION_DRAW_LIST(AddRectFilledMultiColor)\nIM_VEC_2_ARG(a)\nIM_VEC_2_ARG(b)\nUINT_ARG(col_upr_left)\nUINT_ARG(col_upr_right)\nUINT_ARG(col_bot_right)\nUINT_ARG(col_bot_left)\nDRAW_LIST_CALL_FUNCTION_NO_RET(AddRectFilledMultiColor, a, b, col_upr_left, col_upr_right, col_bot_right, col_bot_left)\nEND_IMGUI_FUNC\n//    IMGUI_API void  AddQuad(const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& d, ImU32 col, float thickness = 1.0f);\nIMGUI_FUNCTION_DRAW_LIST(AddQuad)\nIM_VEC_2_ARG(a)\nIM_VEC_2_ARG(b)\nIM_VEC_2_ARG(c)\nIM_VEC_2_ARG(d)\nUINT_ARG(col)\nOPTIONAL_NUMBER_ARG(thickness, 1.0f)\nDRAW_LIST_CALL_FUNCTION_NO_RET(AddQuad, a, b, c, d, col, thickness)\nEND_IMGUI_FUNC\n//    IMGUI_API void  AddQuadFilled(const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& d, ImU32 col);\nIMGUI_FUNCTION_DRAW_LIST(AddQuadFilled)\nIM_VEC_2_ARG(a)\nIM_VEC_2_ARG(b)\nIM_VEC_2_ARG(c)\nIM_VEC_2_ARG(d)\nUINT_ARG(col)\nDRAW_LIST_CALL_FUNCTION_NO_RET(AddQuadFilled, a, b, c, d, col)\nEND_IMGUI_FUNC\n//    IMGUI_API void  AddTriangle(const ImVec2& a, const ImVec2& b, const ImVec2& c, ImU32 col, float thickness = 1.0f);\nIMGUI_FUNCTION_DRAW_LIST(AddTriangle)\nIM_VEC_2_ARG(a)\nIM_VEC_2_ARG(b)\nIM_VEC_2_ARG(c)\nUINT_ARG(col)\nOPTIONAL_NUMBER_ARG(thickness, 1.0f)\nDRAW_LIST_CALL_FUNCTION_NO_RET(AddTriangle, a, b, c, col, thickness)\nEND_IMGUI_FUNC\n//    IMGUI_API void  AddTriangleFilled(const ImVec2& a, const ImVec2& b, const ImVec2& c, ImU32 col);\nIMGUI_FUNCTION_DRAW_LIST(AddTriangleFilled)\nIM_VEC_2_ARG(a)\nIM_VEC_2_ARG(b)\nIM_VEC_2_ARG(c)\nUINT_ARG(col)\nDRAW_LIST_CALL_FUNCTION_NO_RET(AddTriangleFilled, a, b, c, col)\nEND_IMGUI_FUNC\n//    IMGUI_API void  AddCircle(const ImVec2& centre, float radius, ImU32 col, int num_segments = 12, float thickness = 1.0f);\nIMGUI_FUNCTION_DRAW_LIST(AddCircle)\nIM_VEC_2_ARG(centre)\nNUMBER_ARG(radius)\nUINT_ARG(col)\nOPTIONAL_INT_ARG(num_segments, 12)\nOPTIONAL_NUMBER_ARG(thickness, 1.0f)\nDRAW_LIST_CALL_FUNCTION_NO_RET(AddCircle, centre, radius, col, num_segments, thickness)\nEND_IMGUI_FUNC\n//    IMGUI_API void  AddCircleFilled(const ImVec2& centre, float radius, ImU32 col, int num_segments = 12);\nIMGUI_FUNCTION_DRAW_LIST(AddCircleFilled)\nIM_VEC_2_ARG(centre)\nNUMBER_ARG(radius)\nUINT_ARG(col)\nOPTIONAL_INT_ARG(num_segments, 12)\nDRAW_LIST_CALL_FUNCTION_NO_RET(AddCircleFilled, centre, radius, col, num_segments)\nEND_IMGUI_FUNC\n//    IMGUI_API void  AddText(const ImVec2& pos, ImU32 col, const char* text_begin, const char* text_end = NULL);\nIMGUI_FUNCTION_DRAW_LIST(AddText)\nIM_VEC_2_ARG(pos)\nUINT_ARG(col)\nLABEL_ARG(text_begin)\nOPTIONAL_LABEL_ARG(text_end)\nDRAW_LIST_CALL_FUNCTION_NO_RET(AddText, pos, col, text_begin, text_end)\nEND_IMGUI_FUNC\n//    IMGUI_API void  AddText(const ImFont* font, float font_size, const ImVec2& pos, ImU32 col, const char* text_begin, const char* text_end = NULL, float wrap_width = 0.0f, const ImVec4* cpu_fine_clip_rect = NULL);\n// Unsupported arg type const ImFont* font\n// Unsupported arg type  const ImVec4* cpu_fine_clip_rect = NULL\n//    IMGUI_API void  AddImage(ImTextureID user_texture_id, const ImVec2& a, const ImVec2& b, const ImVec2& uv_a = ImVec2 0 0, const ImVec2& uv_b = ImVec2 1 1, ImU32 col = 0xFFFFFFFF);\nIMGUI_FUNCTION_DRAW_LIST(AddImage)\nIM_TEXTURE_ID_ARG(user_texture_id)\nIM_VEC_2_ARG(a)\nIM_VEC_2_ARG(b)\nOPTIONAL_IM_VEC_2_ARG(uv_a, 0, 0)\nOPTIONAL_IM_VEC_2_ARG(uv_b, 1, 1)\nUINT_ARG(col)\nDRAW_LIST_CALL_FUNCTION_NO_RET(AddImage, user_texture_id, a, b, uv_a, uv_b, col)\nEND_IMGUI_FUNC\n//    IMGUI_API void  AddImageQuad(ImTextureID user_texture_id, const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& d, const ImVec2& uv_a = ImVec2 0 0, const ImVec2& uv_b = ImVec2 1 0, const ImVec2& uv_c = ImVec2 1 1, const ImVec2& uv_d = ImVec2 0 1, ImU32 col = 0xFFFFFFFF);\nIMGUI_FUNCTION_DRAW_LIST(AddImageQuad)\nIM_TEXTURE_ID_ARG(user_texture_id)\nIM_VEC_2_ARG(a)\nIM_VEC_2_ARG(b)\nIM_VEC_2_ARG(c)\nIM_VEC_2_ARG(d)\nOPTIONAL_IM_VEC_2_ARG(uv_a, 0, 0)\nOPTIONAL_IM_VEC_2_ARG(uv_b, 1, 0)\nOPTIONAL_IM_VEC_2_ARG(uv_c, 1, 1)\nOPTIONAL_IM_VEC_2_ARG(uv_d, 0, 1)\nUINT_ARG(col)\nDRAW_LIST_CALL_FUNCTION_NO_RET(AddImageQuad, user_texture_id, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col)\nEND_IMGUI_FUNC\n//    IMGUI_API void  AddImageRounded(ImTextureID user_texture_id, const ImVec2& a, const ImVec2& b, const ImVec2& uv_a, const ImVec2& uv_b, ImU32 col, float rounding, int rounding_corners = ImDrawCornerFlags_All);\nIMGUI_FUNCTION_DRAW_LIST(AddImageRounded)\nIM_TEXTURE_ID_ARG(user_texture_id)\nIM_VEC_2_ARG(a)\nIM_VEC_2_ARG(b)\nIM_VEC_2_ARG(uv_a)\nIM_VEC_2_ARG(uv_b)\nUINT_ARG(col)\nNUMBER_ARG(rounding)\nOPTIONAL_INT_ARG(rounding_corners, ImDrawCornerFlags_All)\nDRAW_LIST_CALL_FUNCTION_NO_RET(AddImageRounded, user_texture_id, a, b, uv_a, uv_b, col, rounding, rounding_corners)\nEND_IMGUI_FUNC\n//    IMGUI_API void  AddPolyline(const ImVec2* points, const int num_points, ImU32 col, bool closed, float thickness);\n// Unsupported arg type const ImVec2* points\n// Unsupported arg type  const int num_points\n//    IMGUI_API void  AddConvexPolyFilled(const ImVec2* points, const int num_points, ImU32 col);\n// Unsupported arg type const ImVec2* points\n// Unsupported arg type  const int num_points\n//    IMGUI_API void  AddBezierCurve(const ImVec2& pos0, const ImVec2& cp0, const ImVec2& cp1, const ImVec2& pos1, ImU32 col, float thickness, int num_segments = 0);\nIMGUI_FUNCTION_DRAW_LIST(AddBezierCurve)\nIM_VEC_2_ARG(pos0)\nIM_VEC_2_ARG(cp0)\nIM_VEC_2_ARG(cp1)\nIM_VEC_2_ARG(pos1)\nUINT_ARG(col)\nNUMBER_ARG(thickness)\nOPTIONAL_INT_ARG(num_segments, 0)\nDRAW_LIST_CALL_FUNCTION_NO_RET(AddBezierCurve, pos0, cp0, cp1, pos1, col, thickness, num_segments)\nEND_IMGUI_FUNC\n//    inline    void  PathClear()                                                 { _Path.resize(0); }\n// Unsupported arg type )                                                 { _Path.resize(0\n//    inline    void  PathLineTo(const ImVec2& pos)                               { _Path.push_back(pos); }\n// Unsupported arg type const ImVec2& pos)                               { _Path.push_back(pos\n//    inline    void  PathLineToMergeDuplicate(const ImVec2& pos)                 { if (_Path.Size == 0 || memcmp(&_Path[_Path.Size-1], &pos, 8) != 0) _Path.push_back(pos); }\n// Unsupported arg type const ImVec2& pos)                 { if (_Path.Size == 0 || memcmp(&_Path[_Path.Size-1]\n// Unsupported arg type  &pos\n// Unsupported arg type  8) != 0) _Path.push_back(pos\n//    inline    void  PathFillConvex(ImU32 col)                                   { AddConvexPolyFilled(_Path.Data, _Path.Size, col); PathClear(); }\n// Unsupported arg type ImU32 col)                                   { AddConvexPolyFilled(_Path.Data\n// Unsupported arg type  _Path.Size\n// Unsupported arg type  col\n//    inline    void  PathStroke(ImU32 col, bool closed, float thickness = 1.0f)  { AddPolyline(_Path.Data, _Path.Size, col, closed, thickness); PathClear(); }\n// Unsupported arg type  float thickness = 1.0f)  { AddPolyline(_Path.Data\n// Unsupported arg type  _Path.Size\n// Unsupported arg type  col\n// Unsupported arg type  closed\n// Unsupported arg type  thickness\n//    IMGUI_API void  PathArcTo(const ImVec2& centre, float radius, float a_min, float a_max, int num_segments = 10);\nIMGUI_FUNCTION_DRAW_LIST(PathArcTo)\nIM_VEC_2_ARG(centre)\nNUMBER_ARG(radius)\nNUMBER_ARG(a_min)\nNUMBER_ARG(a_max)\nOPTIONAL_INT_ARG(num_segments, 10)\nDRAW_LIST_CALL_FUNCTION_NO_RET(PathArcTo, centre, radius, a_min, a_max, num_segments)\nEND_IMGUI_FUNC\n//    IMGUI_API void  PathArcToFast(const ImVec2& centre, float radius, int a_min_of_12, int a_max_of_12);                                // Use precomputed angles for a 12 steps circle\nIMGUI_FUNCTION_DRAW_LIST(PathArcToFast)\nIM_VEC_2_ARG(centre)\nNUMBER_ARG(radius)\nINT_ARG(a_min_of_12)\nINT_ARG(a_max_of_12)\nDRAW_LIST_CALL_FUNCTION_NO_RET(PathArcToFast, centre, radius, a_min_of_12, a_max_of_12)\nEND_IMGUI_FUNC\n//    IMGUI_API void  PathBezierCurveTo(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, int num_segments = 0);\nIMGUI_FUNCTION_DRAW_LIST(PathBezierCurveTo)\nIM_VEC_2_ARG(p1)\nIM_VEC_2_ARG(p2)\nIM_VEC_2_ARG(p3)\nOPTIONAL_INT_ARG(num_segments, 0)\nDRAW_LIST_CALL_FUNCTION_NO_RET(PathBezierCurveTo, p1, p2, p3, num_segments)\nEND_IMGUI_FUNC\n//    IMGUI_API void  PathRect(const ImVec2& rect_min, const ImVec2& rect_max, float rounding = 0.0f, int rounding_corners_flags = ImDrawCornerFlags_All);\nIMGUI_FUNCTION_DRAW_LIST(PathRect)\nIM_VEC_2_ARG(rect_min)\nIM_VEC_2_ARG(rect_max)\nOPTIONAL_NUMBER_ARG(rounding, 0.0f)\nOPTIONAL_INT_ARG(rounding_corners_flags, ImDrawCornerFlags_All)\nDRAW_LIST_CALL_FUNCTION_NO_RET(PathRect, rect_min, rect_max, rounding, rounding_corners_flags)\nEND_IMGUI_FUNC\n//    IMGUI_API void  ChannelsSplit(int channels_count);\nIMGUI_FUNCTION_DRAW_LIST(ChannelsSplit)\nINT_ARG(channels_count)\nDRAW_LIST_CALL_FUNCTION_NO_RET(ChannelsSplit, channels_count)\nEND_IMGUI_FUNC\n//    IMGUI_API void  ChannelsMerge();\nIMGUI_FUNCTION_DRAW_LIST(ChannelsMerge)\nDRAW_LIST_CALL_FUNCTION_NO_RET(ChannelsMerge)\nEND_IMGUI_FUNC\n//    IMGUI_API void  ChannelsSetCurrent(int channel_index);\nIMGUI_FUNCTION_DRAW_LIST(ChannelsSetCurrent)\nINT_ARG(channel_index)\nDRAW_LIST_CALL_FUNCTION_NO_RET(ChannelsSetCurrent, channel_index)\nEND_IMGUI_FUNC\n//    IMGUI_API void  AddCallback(ImDrawCallback callback, void* callback_data);  // Your rendering function must check for 'UserCallback' in ImDrawCmd and call the function instead of rendering triangles.\n// Unsupported arg type ImDrawCallback callback\n// Unsupported arg type  void* callback_data\n//    IMGUI_API void  AddDrawCmd();                                               // This is useful if you need to forcefully create a new draw call (to allow for dependent rendering / blending). Otherwise primitives are merged into the same draw-call as much as possible\nIMGUI_FUNCTION_DRAW_LIST(AddDrawCmd)\nDRAW_LIST_CALL_FUNCTION_NO_RET(AddDrawCmd)\nEND_IMGUI_FUNC\n//    IMGUI_API void  Clear();\nIMGUI_FUNCTION_DRAW_LIST(Clear)\nDRAW_LIST_CALL_FUNCTION_NO_RET(Clear)\nEND_IMGUI_FUNC\n//    IMGUI_API void  ClearFreeMemory();\nIMGUI_FUNCTION_DRAW_LIST(ClearFreeMemory)\nDRAW_LIST_CALL_FUNCTION_NO_RET(ClearFreeMemory)\nEND_IMGUI_FUNC\n//    IMGUI_API void  PrimReserve(int idx_count, int vtx_count);\nIMGUI_FUNCTION_DRAW_LIST(PrimReserve)\nINT_ARG(idx_count)\nINT_ARG(vtx_count)\nDRAW_LIST_CALL_FUNCTION_NO_RET(PrimReserve, idx_count, vtx_count)\nEND_IMGUI_FUNC\n//    IMGUI_API void  PrimRect(const ImVec2& a, const ImVec2& b, ImU32 col);      // Axis aligned rectangle (composed of two triangles)\nIMGUI_FUNCTION_DRAW_LIST(PrimRect)\nIM_VEC_2_ARG(a)\nIM_VEC_2_ARG(b)\nUINT_ARG(col)\nDRAW_LIST_CALL_FUNCTION_NO_RET(PrimRect, a, b, col)\nEND_IMGUI_FUNC\n//    IMGUI_API void  PrimRectUV(const ImVec2& a, const ImVec2& b, const ImVec2& uv_a, const ImVec2& uv_b, ImU32 col);\nIMGUI_FUNCTION_DRAW_LIST(PrimRectUV)\nIM_VEC_2_ARG(a)\nIM_VEC_2_ARG(b)\nIM_VEC_2_ARG(uv_a)\nIM_VEC_2_ARG(uv_b)\nUINT_ARG(col)\nDRAW_LIST_CALL_FUNCTION_NO_RET(PrimRectUV, a, b, uv_a, uv_b, col)\nEND_IMGUI_FUNC\n//    IMGUI_API void  PrimQuadUV(const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& d, const ImVec2& uv_a, const ImVec2& uv_b, const ImVec2& uv_c, const ImVec2& uv_d, ImU32 col);\nIMGUI_FUNCTION_DRAW_LIST(PrimQuadUV)\nIM_VEC_2_ARG(a)\nIM_VEC_2_ARG(b)\nIM_VEC_2_ARG(c)\nIM_VEC_2_ARG(d)\nIM_VEC_2_ARG(uv_a)\nIM_VEC_2_ARG(uv_b)\nIM_VEC_2_ARG(uv_c)\nIM_VEC_2_ARG(uv_d)\nUINT_ARG(col)\nDRAW_LIST_CALL_FUNCTION_NO_RET(PrimQuadUV, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col)\nEND_IMGUI_FUNC\n//    inline    void  PrimVtx(const ImVec2& pos, const ImVec2& uv, ImU32 col)     { PrimWriteIdx((ImDrawIdx)_VtxCurrentIdx); PrimWriteVtx(pos, uv, col); }\n// Unsupported arg type  ImU32 col)     { PrimWriteIdx((ImDrawIdx)_VtxCurrentIdx\n//    IMGUI_API void  UpdateClipRect();\nIMGUI_FUNCTION_DRAW_LIST(UpdateClipRect)\nDRAW_LIST_CALL_FUNCTION_NO_RET(UpdateClipRect)\nEND_IMGUI_FUNC\n//    IMGUI_API void  UpdateTextureID();\nIMGUI_FUNCTION_DRAW_LIST(UpdateTextureID)\nDRAW_LIST_CALL_FUNCTION_NO_RET(UpdateTextureID)\nEND_IMGUI_FUNC\n//struct ImDrawData\n\n//struct ImFontConfig\n\n//struct ImFontGlyph\n\n//enum ImFontAtlasFlags_\n\n//struct ImFontAtlas\n\n//struct ImFont\n\n"
  },
  {
    "path": "imgui_lua_bindings.cpp",
    "content": "#include <stdio.h>\n#include <imgui.h>\n#include <deque>\n\nextern \"C\" {\n  #include \"lua.h\"\n  #include \"lualib.h\"\n  #include \"lauxlib.h\"\n}\n\n\n// THIS IS FOR LUA 5.3 although you can make a few changes for other versions\n\n\n\n// define ENABLE_IM_LUA_END_STACK\n// to keep track of end and begins and clean up the imgui stack\n// if lua errors\n\n\n// define this global before you call RunString or LoadImGuiBindings\nlua_State* lState;\n\n#ifdef ENABLE_IM_LUA_END_STACK\n// Stack for imgui begin and end\nstd::deque<int> endStack;\nstatic void AddToStack(int type) {\n  endStack.push_back(type);\n}\n\nstatic void PopEndStack(int type) {\n  if (!endStack.empty()) {\n    endStack.pop_back(); // hopefully the type matches\n  }\n}\n\nstatic void ImEndStack(int type);\n\n#endif\n\n// Example lua run string function\n// returns NULL on success and error string on error\nconst char * RunString(const char* szLua) {\n  if (!lState) {\n    fprintf(stderr, \"You didn't assign the global lState, either assign that or refactor LoadImguiBindings and RunString\\n\");\n  }\n\n  int iStatus = luaL_loadstring(lState, szLua);\n  if(iStatus) {\n    return lua_tostring(lState, -1);\n    //fprintf(stderr, \"Lua syntax error: %s\\n\", lua_tostring(lState, -1));\n    //return;\n  }\n#ifdef ENABLE_IM_LUA_END_STACK\n  endStack.clear();\n#endif\n  iStatus = lua_pcall( lState, 0, 0, 0 );\n\n#ifdef ENABLE_IM_LUA_END_STACK\n  bool wasEmpty = endStack.empty();\n  while(!endStack.empty()) {\n    ImEndStack(endStack.back());\n    endStack.pop_back();\n  }\n\n#endif\n  if( iStatus )\n  {\n      return lua_tostring(lState, -1);\n      //fprintf(stderr, \"Error: %s\\n\", lua_tostring( lState, -1 ));\n      //return;\n  }\n#ifdef ENABLE_IM_LUA_END_STACK\n  else if (!wasEmpty) {\n    return \"Script didn't clean up imgui stack properly\";\n  }\n#endif\n  return NULL;\n}\n\n\n#define IMGUI_FUNCTION_DRAW_LIST(name) \\\nstatic int impl_draw_list_##name(lua_State *L) { \\\n  int max_args = lua_gettop(L); \\\n  int arg = 1; \\\n  int stackval = 0;\n\n#define IMGUI_FUNCTION(name) \\\nstatic int impl_##name(lua_State *L) { \\\n  int max_args = lua_gettop(L); \\\n  int arg = 1; \\\n  int stackval = 0;\n\n// I use OpenGL so this is a GLuint\n// Using unsigned int cause im lazy don't copy me\n#define IM_TEXTURE_ID_ARG(name) \\\n  const ImTextureID name = (ImTextureID)luaL_checkinteger(L, arg++);\n\n#define OPTIONAL_LABEL_ARG(name) \\\n  const char* name; \\\n  if (arg <= max_args) { \\\n    name = lua_tostring(L, arg++); \\\n  } else { \\\n    name = NULL; \\\n  }\n\n#define LABEL_ARG(name) \\\n  size_t i_##name##_size; \\\n  const char * name = luaL_checklstring(L, arg++, &(i_##name##_size));\n\n#define IM_VEC_2_ARG(name)\\\n  const lua_Number i_##name##_x = luaL_checknumber(L, arg++); \\\n  const lua_Number i_##name##_y = luaL_checknumber(L, arg++); \\\n  const ImVec2 name((double)i_##name##_x, (double)i_##name##_y);\n\n#define OPTIONAL_IM_VEC_2_ARG(name, x, y) \\\n  lua_Number i_##name##_x = x; \\\n  lua_Number i_##name##_y = y; \\\n  if (arg <= max_args - 1) { \\\n    i_##name##_x = luaL_checknumber(L, arg++); \\\n    i_##name##_y = luaL_checknumber(L, arg++); \\\n  } \\\n  const ImVec2 name((double)i_##name##_x, (double)i_##name##_y);\n\n#define IM_VEC_4_ARG(name) \\\n  const lua_Number i_##name##_x = luaL_checknumber(L, arg++); \\\n  const lua_Number i_##name##_y = luaL_checknumber(L, arg++); \\\n  const lua_Number i_##name##_z = luaL_checknumber(L, arg++); \\\n  const lua_Number i_##name##_w = luaL_checknumber(L, arg++); \\\n  const ImVec4 name((double)i_##name##_x, (double)i_##name##_y, (double)i_##name##_z, (double)i_##name##_w);\n\n#define OPTIONAL_IM_VEC_4_ARG(name, x, y, z, w) \\\n  lua_Number i_##name##_x = x; \\\n  lua_Number i_##name##_y = y; \\\n  lua_Number i_##name##_z = z; \\\n  lua_Number i_##name##_w = w; \\\n  if (arg <= max_args - 1) { \\\n    i_##name##_x = luaL_checknumber(L, arg++); \\\n    i_##name##_y = luaL_checknumber(L, arg++); \\\n    i_##name##_z = luaL_checknumber(L, arg++); \\\n    i_##name##_w = luaL_checknumber(L, arg++); \\\n  } \\\n  const ImVec4 name((double)i_##name##_x, (double)i_##name##_y, (double)i_##name##_z, (double)i_##name##_w);\n\n#define NUMBER_ARG(name)\\\n  lua_Number name = luaL_checknumber(L, arg++);\n\n#define OPTIONAL_NUMBER_ARG(name, otherwise)\\\n  lua_Number name = otherwise; \\\n  if (arg <= max_args) { \\\n    name = lua_tonumber(L, arg++); \\\n  }\n\n#define FLOAT_POINTER_ARG(name) \\\n  float i_##name##_value = luaL_checknumber(L, arg++); \\\n  float* name = &(i_##name##_value);\n\n#define END_FLOAT_POINTER(name) \\\n  if (name != NULL) { \\\n    lua_pushnumber(L, i_##name##_value); \\\n    stackval++; \\\n  }\n\n#define OPTIONAL_INT_ARG(name, otherwise)\\\n  int name = otherwise; \\\n  if (arg <= max_args) { \\\n    name = (int)lua_tonumber(L, arg++); \\\n  }\n\n#define INT_ARG(name) \\\n  const int name = (int)luaL_checknumber(L, arg++);\n\n#define OPTIONAL_UINT_ARG(name, otherwise)\\\n  unsigned int name = otherwise; \\\n  if (arg <= max_args) { \\\n    name = (unsigned int)lua_tounsigned(L, arg++); \\\n  }\n\n#define UINT_ARG(name) \\\n  const unsigned int name = (unsigned int)luaL_checkinteger(L, arg++);\n\n#define INT_POINTER_ARG(name) \\\n  int i_##name##_value = (int)luaL_checkinteger(L, arg++); \\\n  int* name = &(i_##name##_value);\n\n#define END_INT_POINTER(name) \\\n  if (name != NULL) { \\\n    lua_pushnumber(L, i_##name##_value); \\\n    stackval++; \\\n  }\n\n#define UINT_POINTER_ARG(name) \\\n  unsigned int i_##name##_value = (unsigned int)luaL_checkinteger(L, arg++); \\\n  unsigned int* name = &(i_##name##_value);\n\n#define END_UINT_POINTER(name) \\\n  if (name != NULL) { \\\n    lua_pushnumber(L, i_##name##_value); \\\n    stackval++; \\\n  }\n\n#define BOOL_POINTER_ARG(name) \\\n  bool i_##name##_value = lua_toboolean(L, arg++); \\\n  bool* name = &(i_##name##_value);\n\n#define OPTIONAL_BOOL_POINTER_ARG(name) \\\n  bool i_##name##_value; \\\n  bool* name = NULL; \\\n  if (arg <= max_args) { \\\n    i_##name##_value = lua_toboolean(L, arg++); \\\n    name = &(i_##name##_value); \\\n  }\n\n#define OPTIONAL_BOOL_ARG(name, otherwise) \\\n  bool name = otherwise; \\\n  if (arg <= max_args) { \\\n    name = lua_toboolean(L, arg++); \\\n  }\n\n#define BOOL_ARG(name) \\\n  bool name = lua_toboolean(L, arg++);\n\n#define CALL_FUNCTION(name, retType,...) \\\n  retType ret = ImGui::name(__VA_ARGS__);\n\n#define DRAW_LIST_CALL_FUNCTION(name, retType,...) \\\n  retType ret = ImGui::GetWindowDrawList()->name(__VA_ARGS__);\n\n#define CALL_FUNCTION_NO_RET(name, ...) \\\n  ImGui::name(__VA_ARGS__);\n\n#define DRAW_LIST_CALL_FUNCTION_NO_RET(name, ...) \\\n  ImGui::GetWindowDrawList()->name(__VA_ARGS__);\n\n#define PUSH_STRING(name) \\\n  lua_pushstring(L, name); \\\n  stackval++;\n\n#define PUSH_NUMBER(name) \\\n  lua_pushnumber(L, name); \\\n  stackval++;\n\n#define PUSH_BOOL(name) \\\n  lua_pushboolean(L, (int) name); \\\n  stackval++;\n\n#define END_BOOL_POINTER(name) \\\n  if (name != NULL) { \\\n    lua_pushboolean(L, (int)i_##name##_value); \\\n    stackval++; \\\n  }\n\n#define END_IMGUI_FUNC \\\n  return stackval; \\\n}\n\n#ifdef ENABLE_IM_LUA_END_STACK\n#define IF_RET_ADD_END_STACK(type) \\\n  if (ret) { \\\n    AddToStack(type); \\\n  }\n\n#define ADD_END_STACK(type) \\\n  AddToStack(type);\n\n#define POP_END_STACK(type) \\\n  PopEndStack(type);\n\n#define END_STACK_START \\\nstatic void ImEndStack(int type) { \\\n  switch(type) {\n\n#define END_STACK_OPTION(type, function) \\\n    case type: \\\n      ImGui::function(); \\\n      break;\n\n#define END_STACK_END \\\n  } \\\n}\n#else\n#define END_STACK_START\n#define END_STACK_OPTION(type, function)\n#define END_STACK_END\n#define IF_RET_ADD_END_STACK(type)\n#define ADD_END_STACK(type)\n#define POP_END_STACK(type)\n#endif\n\n#define START_ENUM(name)\n#define MAKE_ENUM(c_name,lua_name)\n#define END_ENUM(name)\n\n#include \"imgui_iterator.inl\"\n\n\nstatic const struct luaL_Reg imguilib [] = {\n#undef IMGUI_FUNCTION\n#define IMGUI_FUNCTION(name) {#name, impl_##name},\n#undef IMGUI_FUNCTION_DRAW_LIST\n#define IMGUI_FUNCTION_DRAW_LIST(name) {\"DrawList_\" #name, impl_draw_list_##name},\n// These defines are just redefining everything to nothing so\n// we can get the function names\n#undef IM_TEXTURE_ID_ARG\n#define IM_TEXTURE_ID_ARG(name)\n#undef OPTIONAL_LABEL_ARG\n#define OPTIONAL_LABEL_ARG(name)\n#undef LABEL_ARG\n#define LABEL_ARG(name)\n#undef IM_VEC_2_ARG\n#define IM_VEC_2_ARG(name)\n#undef OPTIONAL_IM_VEC_2_ARG\n#define OPTIONAL_IM_VEC_2_ARG(name, x, y)\n#undef IM_VEC_4_ARG\n#define IM_VEC_4_ARG(name)\n#undef OPTIONAL_IM_VEC_4_ARG\n#define OPTIONAL_IM_VEC_4_ARG(name, x, y, z, w)\n#undef NUMBER_ARG\n#define NUMBER_ARG(name)\n#undef OPTIONAL_NUMBER_ARG\n#define OPTIONAL_NUMBER_ARG(name, otherwise)\n#undef FLOAT_POINTER_ARG\n#define FLOAT_POINTER_ARG(name)\n#undef END_FLOAT_POINTER\n#define END_FLOAT_POINTER(name)\n#undef OPTIONAL_INT_ARG\n#define OPTIONAL_INT_ARG(name, otherwise)\n#undef INT_ARG\n#define INT_ARG(name)\n#undef OPTIONAL_UINT_ARG\n#define OPTIONAL_UINT_ARG(name, otherwise)\n#undef UINT_ARG\n#define UINT_ARG(name)\n#undef INT_POINTER_ARG\n#define INT_POINTER_ARG(name)\n#undef END_INT_POINTER\n#define END_INT_POINTER(name)\n#undef UINT_POINTER_ARG\n#define UINT_POINTER_ARG(name)\n#undef END_UINT_POINTER\n#define END_UINT_POINTER(name)\n#undef BOOL_POINTER_ARG\n#define BOOL_POINTER_ARG(name)\n#undef OPTIONAL_BOOL_POINTER_ARG\n#define OPTIONAL_BOOL_POINTER_ARG(name)\n#undef OPTIONAL_BOOL_ARG\n#define OPTIONAL_BOOL_ARG(name, otherwise)\n#undef BOOL_ARG\n#define BOOL_ARG(name)\n#undef CALL_FUNCTION\n#define CALL_FUNCTION(name, retType, ...)\n#undef DRAW_LIST_CALL_FUNCTION\n#define DRAW_LIST_CALL_FUNCTION(name, retType, ...)\n#undef CALL_FUNCTION_NO_RET\n#define CALL_FUNCTION_NO_RET(name, ...)\n#undef DRAW_LIST_CALL_FUNCTION_NO_RET\n#define DRAW_LIST_CALL_FUNCTION_NO_RET(name, ...)\n#undef PUSH_STRING\n#define PUSH_STRING(name)\n#undef PUSH_NUMBER\n#define PUSH_NUMBER(name)\n#undef PUSH_BOOL\n#define PUSH_BOOL(name)\n#undef END_BOOL_POINTER\n#define END_BOOL_POINTER(name)\n#undef END_IMGUI_FUNC\n#define END_IMGUI_FUNC\n#undef END_STACK_START\n#define END_STACK_START\n#undef END_STACK_OPTION\n#define END_STACK_OPTION(type, function)\n#undef END_STACK_END\n#define END_STACK_END\n#undef IF_RET_ADD_END_STACK\n#define IF_RET_ADD_END_STACK(type)\n#undef ADD_END_STACK\n#define ADD_END_STACK(type)\n#undef POP_END_STACK\n#define POP_END_STACK(type)\n#undef START_ENUM\n#define START_ENUM(name)\n#undef MAKE_ENUM\n#define MAKE_ENUM(c_name,lua_name)\n#undef END_ENUM\n#define END_ENUM(name)\n\n#include \"imgui_iterator.inl\"\n  {\"Button\", impl_Button},\n  {NULL, NULL}\n};\n\nstatic void PushImguiEnums(lua_State* lState, const char* tableName) {\n  lua_pushstring(lState, tableName);\n  lua_newtable(lState);\n\n#undef START_ENUM\n#undef MAKE_ENUM\n#undef END_ENUM\n#define START_ENUM(name) \\\n  lua_pushstring(lState, #name); \\\n  lua_newtable(lState); \\\n  { \\\n    int i = 1;\n#define MAKE_ENUM(c_name,lua_name) \\\n  lua_pushstring(lState, #lua_name); \\\n  lua_pushnumber(lState, c_name); \\\n  lua_rawset(lState, -3);\n#define END_ENUM(name) \\\n  } \\\n  lua_rawset(lState, -3);\n// These defines are just redefining everything to nothing so\n// we get only the enums.\n#undef IMGUI_FUNCTION\n#define IMGUI_FUNCTION(name)\n#undef IMGUI_FUNCTION_DRAW_LIST\n#define IMGUI_FUNCTION_DRAW_LIST(name)\n#undef IM_TEXTURE_ID_ARG\n#define IM_TEXTURE_ID_ARG(name)\n#undef OPTIONAL_LABEL_ARG\n#define OPTIONAL_LABEL_ARG(name)\n#undef LABEL_ARG\n#define LABEL_ARG(name)\n#undef IM_VEC_2_ARG\n#define IM_VEC_2_ARG(name)\n#undef OPTIONAL_IM_VEC_2_ARG\n#define OPTIONAL_IM_VEC_2_ARG(name, x, y)\n#undef IM_VEC_4_ARG\n#define IM_VEC_4_ARG(name)\n#undef OPTIONAL_IM_VEC_4_ARG\n#define OPTIONAL_IM_VEC_4_ARG(name, x, y, z, w)\n#undef NUMBER_ARG\n#define NUMBER_ARG(name)\n#undef OPTIONAL_NUMBER_ARG\n#define OPTIONAL_NUMBER_ARG(name, otherwise)\n#undef FLOAT_POINTER_ARG\n#define FLOAT_POINTER_ARG(name)\n#undef END_FLOAT_POINTER\n#define END_FLOAT_POINTER(name)\n#undef OPTIONAL_INT_ARG\n#define OPTIONAL_INT_ARG(name, otherwise)\n#undef INT_ARG\n#define INT_ARG(name)\n#undef OPTIONAL_UINT_ARG\n#define OPTIONAL_UINT_ARG(name, otherwise)\n#undef UINT_ARG\n#define UINT_ARG(name)\n#undef INT_POINTER_ARG\n#define INT_POINTER_ARG(name)\n#undef END_INT_POINTER\n#define END_INT_POINTER(name)\n#undef UINT_POINTER_ARG\n#define UINT_POINTER_ARG(name)\n#undef END_UINT_POINTER\n#define END_UINT_POINTER(name)\n#undef BOOL_POINTER_ARG\n#define BOOL_POINTER_ARG(name)\n#undef OPTIONAL_BOOL_POINTER_ARG\n#define OPTIONAL_BOOL_POINTER_ARG(name)\n#undef OPTIONAL_BOOL_ARG\n#define OPTIONAL_BOOL_ARG(name, otherwise)\n#undef BOOL_ARG\n#define BOOL_ARG(name)\n#undef CALL_FUNCTION\n#define CALL_FUNCTION(name, retType, ...)\n#undef DRAW_LIST_CALL_FUNCTION\n#define DRAW_LIST_CALL_FUNCTION(name, retType, ...)\n#undef CALL_FUNCTION_NO_RET\n#define CALL_FUNCTION_NO_RET(name, ...)\n#undef DRAW_LIST_CALL_FUNCTION_NO_RET\n#define DRAW_LIST_CALL_FUNCTION_NO_RET(name, ...)\n#undef PUSH_STRING\n#define PUSH_STRING(name)\n#undef PUSH_NUMBER\n#define PUSH_NUMBER(name)\n#undef PUSH_BOOL\n#define PUSH_BOOL(name)\n#undef END_BOOL_POINTER\n#define END_BOOL_POINTER(name)\n#undef END_IMGUI_FUNC\n#define END_IMGUI_FUNC\n#undef END_STACK_START\n#define END_STACK_START\n#undef END_STACK_OPTION\n#define END_STACK_OPTION(type, function)\n#undef END_STACK_END\n#define END_STACK_END\n#undef IF_RET_ADD_END_STACK\n#define IF_RET_ADD_END_STACK(type)\n#undef ADD_END_STACK\n#define ADD_END_STACK(type)\n#undef POP_END_STACK\n#define POP_END_STACK(type)\n\n#include \"imgui_iterator.inl\"\n\n  lua_rawset(lState, -3);\n};\n\n\nvoid LoadImguiBindings() {\n  if (!lState) {\n    fprintf(stderr, \"You didn't assign the global lState, either assign that or refactor LoadImguiBindings and RunString\\n\");\n  }\n  lua_newtable(lState);\n  luaL_setfuncs(lState, imguilib, 0);\n  PushImguiEnums(lState, \"constant\");\n  lua_setglobal(lState, \"imgui\");\n}\n"
  },
  {
    "path": "parse_blocks.pl",
    "content": "##!/usr/bin/perl\n#use strict;\n#use warnings;\n#use diagnostics;\n#\n#my ($blocksref, $blocknamesref) = parse_blocks();\n#\n#my @blocks = @$blocksref;\n#my @blocknames = @$blocknamesref;\n#\n#my $name;\n#my $block;\n#foreach $name (@blocknames) {\n#  print \"BLOCKNAME\" . $name;\n#}\n#\n#foreach $block (@blocks) {\n#  print \"---------------BLOCK START-----------\\n\";\n#  print $block;\n#  print \"---------------BLOCK END -------------\\n\"\n#}\n\n\n\n# WARNING THIS FUNCTION WILL MESS UP ALL OF PARSING IF IT SEES\n# A DIFFERENT NUMBER OF BLOCKNAMES AS BLOCKS...\n# TODO FIX THIS ^\n\n#returns list of string blocks from stdin\n\n\nsub does_line_match_end_block {\n  my $line = shift;\n\n  # Make sure you take into account random whitespace that could happen by using [ ]*[\\t]*\n  my $match = 0;\n  $match |= $line =~ m/^};[ ]*[\\t]*\\/\\//;  # Semicolon,    comment\n  $match |= $line =~ m/^};[ ]*[\\t]*$/;     # Semicolon,    no comment\n  $match |= $line =~ m/^}[ ]*[\\t]*\\/\\//;   # No semicolon, comment\n  $match |= $line =~ m/^}[ ]*[\\t]*$/;      # No semicolon, no comment\n  return $match;\n}\n\nsub does_line_match_begin_block {\n  my $line = shift;\n\n  my $match = 0;\n  $match |= $line =~ m/^{[ ]*[\\t]*$/;\n  return $match\n}\n\nsub parse_blocks {\n  my @blocks;\n  my @blocknames;\n  my $lastline;\n  my $curBlock;\n  while (my $line = <STDIN>) {\n\tif (does_line_match_begin_block($line)) {\n\t\tpush @blocknames, $lastline;\n\t\t$curBlock = \"\";\n\t\tnext;\n\t}\n\t  \n\tif (does_line_match_end_block($line)) {\n\t  push @blocks, $curBlock;\n\n\t  # Enforce the invariant that we should have the same number of elements in blocks / block names\n\t  if (scalar @blocks != scalar @blocknames) {\n\t  \tprint STDERR \"The parser did a bad and has mismatched block open / close.\";\n\t  \tprint STDERR \"This is probably a problem with the regular expression that matches block open and close.\";\n\t  \tdie\n\t  }\n\t    \n\t  $curBlock = \"\";\n\t    \n\t  next;\n\t}\n\t\n\t$curBlock .= $line . \"\\n\";\n\t$lastline = $line;\n  }\n  return (\\@blocks, \\@blocknames);\n}\n\n1;\n"
  }
]