imguiWrapper.cpp 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453
  1. #include "imguiWrapper.h"
  2. #include "WrapperConverter.h"
  3. #include "imguiWrappedHeader.h"
  4. IggContext iggCreateContext(IggFontAtlas sharedFontAtlas) {
  5. ImGuiContext *context = ImGui::CreateContext(reinterpret_cast<ImFontAtlas *>(sharedFontAtlas));
  6. return reinterpret_cast<IggContext>(context);
  7. }
  8. void iggDestroyContext(IggContext context) { ImGui::DestroyContext(reinterpret_cast<ImGuiContext *>(context)); }
  9. IggContext iggGetCurrentContext() { return reinterpret_cast<IggContext>(ImGui::GetCurrentContext()); }
  10. void iggSetCurrentContext(IggContext context) { ImGui::SetCurrentContext(reinterpret_cast<ImGuiContext *>(context)); }
  11. void iggSetMaxWaitBeforeNextFrame(double time) { ImGui::SetMaxWaitBeforeNextFrame(time); }
  12. IggIO iggGetCurrentIO() { return reinterpret_cast<IggIO>(&ImGui::GetIO()); }
  13. IggGuiStyle iggGetCurrentStyle() { return reinterpret_cast<IggGuiStyle>(&ImGui::GetStyle()); }
  14. void iggNewFrame() { ImGui::NewFrame(); }
  15. void iggRender() { ImGui::Render(); }
  16. IggDrawData iggGetDrawData() { return reinterpret_cast<IggDrawData>(ImGui::GetDrawData()); }
  17. void iggEndFrame() { ImGui::EndFrame(); }
  18. double iggGetEventWaitingTime() { return ImGui::GetEventWaitingTime(); }
  19. char const *iggGetVersion() { return ImGui::GetVersion(); }
  20. void iggShowDemoWindow(IggBool *open) {
  21. BoolWrapper openArg(open);
  22. ImGui::ShowDemoWindow(openArg);
  23. }
  24. void iggShowUserGuide(void) { ImGui::ShowUserGuide(); }
  25. IggBool iggBegin(char const *id, IggBool *open, int flags) {
  26. BoolWrapper openArg(open);
  27. return ImGui::Begin(id, openArg, flags) ? 1 : 0;
  28. }
  29. void iggEnd(void) { ImGui::End(); }
  30. IggBool iggBeginChild(char const *id, IggVec2 const *size, IggBool border, int flags) {
  31. Vec2Wrapper sizeArg(size);
  32. return ImGui::BeginChild(id, *sizeArg, border, flags) ? 1 : 0;
  33. }
  34. void iggEndChild(void) { ImGui::EndChild(); }
  35. void iggWindowPos(IggVec2 *pos) { exportValue(*pos, ImGui::GetWindowPos()); }
  36. void iggWindowSize(IggVec2 *size) { exportValue(*size, ImGui::GetWindowSize()); }
  37. float iggWindowWidth(void) { return ImGui::GetWindowWidth(); }
  38. float iggWindowHeight(void) { return ImGui::GetWindowHeight(); }
  39. void iggContentRegionAvail(IggVec2 *size) { exportValue(*size, ImGui::GetContentRegionAvail()); }
  40. IggBool iggIsWindowAppearing() { return ImGui::IsWindowAppearing() ? 1 : 0; }
  41. IggBool iggIsWindowCollapsed() { return ImGui::IsWindowCollapsed() ? 1 : 0; }
  42. IggBool iggIsWindowFocused(int flags) { return ImGui::IsWindowFocused(flags) ? 1 : 0; }
  43. IggBool iggIsWindowHovered(int flags) { return ImGui::IsWindowHovered(flags) ? 1 : 0; }
  44. void iggSetNextWindowPos(IggVec2 const *pos, int cond, IggVec2 const *pivot) {
  45. Vec2Wrapper posArg(pos);
  46. Vec2Wrapper pivotArg(pivot);
  47. ImGui::SetNextWindowPos(*posArg, cond, *pivotArg);
  48. }
  49. void iggSetNextWindowSize(IggVec2 const *size, int cond) {
  50. Vec2Wrapper sizeArg(size);
  51. ImGui::SetNextWindowSize(*sizeArg, cond);
  52. }
  53. void iggSetNextWindowContentSize(IggVec2 const *size) {
  54. Vec2Wrapper sizeArg(size);
  55. ImGui::SetNextWindowContentSize(*sizeArg);
  56. }
  57. void iggSetNextWindowFocus(void) { ImGui::SetNextWindowFocus(); }
  58. void iggSetNextWindowBgAlpha(float value) { ImGui::SetNextWindowBgAlpha(value); }
  59. void iggPushFont(IggFont handle) {
  60. ImFont *font = reinterpret_cast<ImFont *>(handle);
  61. ImGui::PushFont(font);
  62. }
  63. void iggPopFont(void) { ImGui::PopFont(); }
  64. void iggPushStyleColor(int index, IggVec4 const *col) {
  65. Vec4Wrapper colArg(col);
  66. ImGui::PushStyleColor(index, *colArg);
  67. }
  68. void iggPopStyleColor(int count) { ImGui::PopStyleColor(count); }
  69. void iggPushStyleVarFloat(int index, float value) { ImGui::PushStyleVar(index, value); }
  70. void iggPushStyleVarVec2(int index, IggVec2 const *value) {
  71. Vec2Wrapper valueArg(value);
  72. ImGui::PushStyleVar(index, *valueArg);
  73. }
  74. void iggPopStyleVar(int count) { ImGui::PopStyleVar(count); }
  75. float iggGetFontSize() { return ImGui::GetFontSize(); }
  76. void iggCalcTextSize(const char *text, int length, IggBool hide_text_after_double_hash, float wrap_width, IggVec2 *value) { exportValue(*value, ImGui::CalcTextSize(text, text + length, hide_text_after_double_hash, wrap_width)); }
  77. unsigned int iggGetColorU32(const IggVec4 col) {
  78. Vec4Wrapper colArg(&col);
  79. return ImGui::GetColorU32(*colArg);
  80. }
  81. void iggBeginDisabled(IggBool disabled) { ImGui::BeginDisabled(disabled); }
  82. void iggEndDisabled() { ImGui::EndDisabled(); }
  83. void iggStyleColorsDark() { ImGui::StyleColorsDark(); }
  84. void iggStyleColorsClassic() { ImGui::StyleColorsClassic(); }
  85. void iggStyleColorsLight() { ImGui::StyleColorsLight(); }
  86. void iggPushItemWidth(float width) { ImGui::PushItemWidth(width); }
  87. void iggPopItemWidth(void) { ImGui::PopItemWidth(); }
  88. float iggCalcItemWidth(void) { return ImGui::CalcItemWidth(); }
  89. void iggPushTextWrapPos(float wrapPosX) { ImGui::PushTextWrapPos(wrapPosX); }
  90. void iggPopTextWrapPos(void) { ImGui::PopTextWrapPos(); }
  91. void iggPushAllowKeyboardFocus(IggBool allow_keyboard_focus) { ImGui::PushAllowKeyboardFocus(allow_keyboard_focus); }
  92. void iggPopAllowKeyboardFocus(void) { ImGui::PopAllowKeyboardFocus(); }
  93. void iggPushID(char const *id) { ImGui::PushID(id); }
  94. void iggPopID(void) { ImGui::PopID(); }
  95. void iggTextUnformatted(char const *text) { ImGui::TextUnformatted(text); }
  96. void iggLabelText(char const *label, char const *text) { ImGui::LabelText(label, "%s", text); }
  97. IggBool iggButton(char const *label, IggVec2 const *size) {
  98. Vec2Wrapper sizeArg(size);
  99. return ImGui::Button(label, *sizeArg) ? 1 : 0;
  100. }
  101. IggBool iggSmallButton(char const *label) { return ImGui::SmallButton(label) ? 1 : 0; }
  102. IggBool iggArrowButton(const char *id, unsigned char dir) { return ImGui::ArrowButton(id, dir) ? 1 : 0; }
  103. IggBool iggInvisibleButton(char const *label, IggVec2 const *size) {
  104. Vec2Wrapper sizeArg(size);
  105. return ImGui::InvisibleButton(label, *sizeArg) ? 1 : 0;
  106. }
  107. void iggImage(IggTextureID textureID, IggVec2 const *size, IggVec2 const *uv0, IggVec2 const *uv1, IggVec4 const *tintCol, IggVec4 const *borderCol) {
  108. Vec2Wrapper sizeArg(size);
  109. Vec2Wrapper uv0Arg(uv0);
  110. Vec2Wrapper uv1Arg(uv1);
  111. Vec4Wrapper tintColArg(tintCol);
  112. Vec4Wrapper borderColArg(borderCol);
  113. ImGui::Image(reinterpret_cast<ImTextureID>(textureID), *sizeArg, *uv0Arg, *uv1Arg, *tintColArg, *borderColArg);
  114. }
  115. IggBool iggImageButton(IggTextureID textureID, IggVec2 const *size, IggVec2 const *uv0, IggVec2 const *uv1, int framePadding, IggVec4 const *bgCol, IggVec4 const *tintCol) {
  116. Vec2Wrapper sizeArg(size);
  117. Vec2Wrapper uv0Arg(uv0);
  118. Vec2Wrapper uv1Arg(uv1);
  119. Vec4Wrapper bgColArg(bgCol);
  120. Vec4Wrapper tintColArg(tintCol);
  121. return ImGui::ImageButton(reinterpret_cast<ImTextureID>(textureID), *sizeArg, *uv0Arg, *uv1Arg, framePadding, *bgColArg, *tintColArg) ? 1 : 0;
  122. }
  123. IggBool iggCheckbox(char const *label, IggBool *selected) {
  124. BoolWrapper selectedArg(selected);
  125. return ImGui::Checkbox(label, selectedArg) ? 1 : 0;
  126. }
  127. IggBool iggRadioButton(char const *label, IggBool active) { return ImGui::RadioButton(label, active != 0) ? 1 : 0; }
  128. void iggProgressBar(float fraction, IggVec2 const *size, char const *overlay) {
  129. Vec2Wrapper sizeArg(size);
  130. ImGui::ProgressBar(fraction, *sizeArg, overlay);
  131. }
  132. void iggBullet(void) { ImGui::Bullet(); }
  133. void iggBulletText(const char *text) { ImGui::BulletText("%s", text); }
  134. IggBool iggBeginCombo(char const *label, char const *previewValue, int flags) { return ImGui::BeginCombo(label, previewValue, flags) ? 1 : 0; }
  135. void iggEndCombo(void) { ImGui::EndCombo(); }
  136. IggBool iggDragFloat(char const *label, float *value, float speed, float min, float max, char const *format, float power) { return ImGui::DragFloat(label, value, speed, min, max, format, power) ? 1 : 0; }
  137. IggBool iggDragInt(char const *label, int *value, float speed, int min, int max, char const *format) { return ImGui::DragInt(label, value, speed, min, max, format) ? 1 : 0; }
  138. IggBool iggSliderFloat(char const *label, float *value, float minValue, float maxValue, char const *format, float power) { return ImGui::SliderFloat(label, value, minValue, maxValue, format, power) ? 1 : 0; }
  139. IggBool iggSliderFloatN(char const *label, float *value, int n, float minValue, float maxValue, char const *format, float power) { return ImGui::SliderScalarN(label, ImGuiDataType_Float, (void *)value, n, &minValue, &maxValue, format, power) ? 1 : 0; }
  140. IggBool iggSliderInt(char const *label, int *value, int minValue, int maxValue, char const *format) { return ImGui::SliderInt(label, value, minValue, maxValue, format) ? 1 : 0; }
  141. IggBool iggVSliderInt(const char *label, const IggVec2 *size, int *v, int v_min, int v_max, const char *format, int flags) {
  142. Vec2Wrapper sizeArg(size);
  143. return ImGui::VSliderInt(label, *sizeArg, v, v_min, v_max, format, flags) ? 1 : 0;
  144. }
  145. extern "C" int iggInputTextCallback(IggInputTextCallbackData data, int key);
  146. static int iggInputTextCallbackWrapper(ImGuiInputTextCallbackData *data) { return iggInputTextCallback(reinterpret_cast<IggInputTextCallbackData>(data), static_cast<int>(reinterpret_cast<size_t>(data->UserData))); }
  147. IggBool iggInputText(char const *label, char *buf, unsigned int bufSize, int flags, int callbackKey) { return ImGui::InputText(label, buf, static_cast<size_t>(bufSize), flags, iggInputTextCallbackWrapper, reinterpret_cast<void *>(callbackKey)) ? 1 : 0; }
  148. IggBool iggInputTextWithHint(char const *label, char const *hint, char *buf, unsigned int bufSize, int flags, int callbackKey) { return ImGui::InputTextWithHint(label, hint, buf, static_cast<size_t>(bufSize), flags, iggInputTextCallbackWrapper, reinterpret_cast<void *>(callbackKey)) ? 1 : 0; }
  149. IggBool iggInputTextMultiline(char const *label, char *buf, unsigned int bufSize, IggVec2 const *size, int flags, int callbackKey) {
  150. Vec2Wrapper sizeArg(size);
  151. return ImGui::InputTextMultiline(label, buf, static_cast<size_t>(bufSize), *sizeArg, flags, iggInputTextCallbackWrapper, reinterpret_cast<void *>(callbackKey)) ? 1 : 0;
  152. }
  153. IggBool iggInputInt(char const *label, int *v, int step, int step_fast, int flags) { return ImGui::InputInt(label, v, step, step_fast, flags) ? 1 : 0; }
  154. IggBool iggInputFloat(char const *label, float *v, float step, float step_fast, const char *format, int flags) { return ImGui::InputFloat(label, v, step, step_fast, format, flags) ? 1 : 0; }
  155. IggBool iggColorEdit3(char const *label, float *col, int flags) { return ImGui::ColorEdit3(label, col, flags) ? 1 : 0; }
  156. IggBool iggColorEdit4(char const *label, float *col, int flags) { return ImGui::ColorEdit4(label, col, flags) ? 1 : 0; }
  157. IggBool iggColorPicker3(char const *label, float *col, int flags) { return ImGui::ColorPicker3(label, col, flags) ? 1 : 0; }
  158. IggBool iggColorPicker4(char const *label, float *col, int flags) { return ImGui::ColorPicker4(label, col, flags) ? 1 : 0; }
  159. void iggSeparator(void) { ImGui::Separator(); }
  160. void iggSameLine(float posX, float spacingW) { ImGui::SameLine(posX, spacingW); }
  161. void iggSpacing(void) { ImGui::Spacing(); }
  162. void iggDummy(IggVec2 const *size) {
  163. Vec2Wrapper sizeArg(size);
  164. ImGui::Dummy(*sizeArg);
  165. }
  166. void iggBeginGroup(void) { ImGui::BeginGroup(); }
  167. void iggEndGroup(void) { ImGui::EndGroup(); }
  168. void iggCursorPos(IggVec2 *pos) { exportValue(*pos, ImGui::GetCursorPos()); }
  169. float iggCursorPosX(void) { return ImGui::GetCursorPosX(); }
  170. float iggCursorPosY(void) { return ImGui::GetCursorPosY(); }
  171. void iggCursorStartPos(IggVec2 *pos) { exportValue(*pos, ImGui::GetCursorStartPos()); }
  172. void iggCursorScreenPos(IggVec2 *pos) { exportValue(*pos, ImGui::GetCursorScreenPos()); }
  173. void iggSetCursorPos(IggVec2 const *localPos) {
  174. Vec2Wrapper localPosArg(localPos);
  175. ImGui::SetCursorPos(*localPosArg);
  176. }
  177. void iggSetCursorScreenPos(IggVec2 const *absPos) {
  178. Vec2Wrapper absPosArg(absPos);
  179. ImGui::SetCursorScreenPos(*absPosArg);
  180. }
  181. void iggMousePos(IggVec2 *pos) { exportValue(*pos, ImGui::GetMousePos()); }
  182. void iggAlignTextToFramePadding() { ImGui::AlignTextToFramePadding(); }
  183. float iggGetTextLineHeight(void) { return ImGui::GetTextLineHeight(); }
  184. float iggGetTextLineHeightWithSpacing(void) { return ImGui::GetTextLineHeightWithSpacing(); }
  185. float iggFrameHeightWithSpacing(void) { return ImGui::GetFrameHeightWithSpacing(); }
  186. IggBool iggTreeNode(char const *label, int flags) { return ImGui::TreeNodeEx(label, flags) ? 1 : 0; }
  187. void iggTreePop(void) { ImGui::TreePop(); }
  188. void iggSetNextItemOpen(IggBool open, int cond) { ImGui::SetNextItemOpen(open != 0, cond); }
  189. float iggGetTreeNodeToLabelSpacing(void) { return ImGui::GetTreeNodeToLabelSpacing(); }
  190. IggBool iggSelectable(char const *label, IggBool selected, int flags, IggVec2 const *size) {
  191. Vec2Wrapper sizeArg(size);
  192. return ImGui::Selectable(label, selected != 0, flags, *sizeArg) ? 1 : 0;
  193. }
  194. IggBool iggListBoxV(char const *label, int *currentItem, char const *const items[], int itemsCount, int heightItems) { return ImGui::ListBox(label, currentItem, items, itemsCount, heightItems) ? 1 : 0; }
  195. void iggPlotLines(char const *label, float const *values, int valuesCount, int valuesOffset, char const *overlayText, float scaleMin, float scaleMax, IggVec2 const *graphSize) {
  196. Vec2Wrapper graphSizeArg(graphSize);
  197. ImGui::PlotLines(label, values, valuesCount, valuesOffset, overlayText, scaleMin, scaleMax, *graphSizeArg);
  198. }
  199. void iggPlotHistogram(char const *label, float const *values, int valuesCount, int valuesOffset, char const *overlayText, float scaleMin, float scaleMax, IggVec2 const *graphSize) {
  200. Vec2Wrapper graphSizeArg(graphSize);
  201. ImGui::PlotHistogram(label, values, valuesCount, valuesOffset, overlayText, scaleMin, scaleMax, *graphSizeArg);
  202. }
  203. void iggSetTooltip(char const *text) { ImGui::SetTooltip("%s", text); }
  204. void iggBeginTooltip(void) { ImGui::BeginTooltip(); }
  205. void iggEndTooltip(void) { ImGui::EndTooltip(); }
  206. IggBool iggBeginMainMenuBar(void) { return ImGui::BeginMainMenuBar() ? 1 : 0; }
  207. void iggEndMainMenuBar(void) { ImGui::EndMainMenuBar(); }
  208. IggBool iggBeginMenuBar(void) { return ImGui::BeginMenuBar() ? 1 : 0; }
  209. void iggEndMenuBar(void) { ImGui::EndMenuBar(); }
  210. IggBool iggBeginMenu(char const *label, IggBool enabled) { return ImGui::BeginMenu(label, enabled != 0) ? 1 : 0; }
  211. void iggEndMenu(void) { ImGui::EndMenu(); }
  212. IggBool iggMenuItem(char const *label, char const *shortcut, IggBool selected, IggBool enabled) { return ImGui::MenuItem(label, shortcut, selected != 0, enabled != 0) ? 1 : 0; }
  213. void iggOpenPopup(char const *id) { ImGui::OpenPopup(id); }
  214. IggBool iggBeginPopup(char const *name, int flags) { return ImGui::BeginPopup(name, flags) ? 1 : 0; }
  215. IggBool iggBeginPopupModal(char const *name, IggBool *open, int flags) {
  216. BoolWrapper openArg(open);
  217. return ImGui::BeginPopupModal(name, openArg, flags) ? 1 : 0;
  218. }
  219. IggBool iggBeginPopupContextItem(char const *label, int mouseButton) { return ImGui::BeginPopupContextItem(label, mouseButton) ? 1 : 0; }
  220. void iggEndPopup(void) { ImGui::EndPopup(); }
  221. void iggCloseCurrentPopup(void) { ImGui::CloseCurrentPopup(); }
  222. IggBool iggIsItemHovered(int flags) { return ImGui::IsItemHovered(flags) ? 1 : 0; }
  223. IggBool iggIsItemClicked(int mouseButton) { return ImGui::IsItemClicked(mouseButton) ? 1 : 0; }
  224. IggBool iggIsItemActive() { return ImGui::IsItemActive() ? 1 : 0; }
  225. IggBool iggIsAnyItemActive() { return ImGui::IsAnyItemActive() ? 1 : 0; }
  226. IggBool iggIsKeyDown(int key) { return ImGui::IsKeyDown(key); }
  227. IggBool iggIsKeyPressed(int key, IggBool repeat) { return ImGui::IsKeyPressed(key, repeat); }
  228. IggBool iggIsKeyReleased(int key) { return ImGui::IsKeyReleased(key); }
  229. IggBool iggIsMouseDown(int button) { return ImGui::IsMouseDown(button); }
  230. IggBool iggIsAnyMouseDown() { return ImGui::IsAnyMouseDown(); }
  231. IggBool iggIsMouseClicked(int button, IggBool repeat) { return ImGui::IsMouseClicked(button, repeat); }
  232. IggBool iggIsMouseReleased(int button) { return ImGui::IsMouseReleased(button); }
  233. IggBool iggIsMouseDoubleClicked(int button) { return ImGui::IsMouseDoubleClicked(button); }
  234. void iggColumns(int count, char const *label, IggBool border) { ImGui::Columns(count, label, border); }
  235. void iggNextColumn() { ImGui::NextColumn(); }
  236. int iggGetColumnIndex() { return ImGui::GetColumnIndex(); }
  237. int iggGetColumnWidth(int index) { return ImGui::GetColumnWidth(index); }
  238. void iggSetColumnWidth(int index, float width) { ImGui::SetColumnWidth(index, width); }
  239. float iggGetColumnOffset(int index) { return ImGui::GetColumnOffset(index); }
  240. void iggSetColumnOffset(int index, float offsetX) { ImGui::SetColumnOffset(index, offsetX); }
  241. int iggGetColumnsCount() { return ImGui::GetColumnsCount(); }
  242. float iggGetScrollX() { return ImGui::GetScrollX(); }
  243. float iggGetScrollY() { return ImGui::GetScrollY(); }
  244. float iggGetScrollMaxX() { return ImGui::GetScrollMaxX(); }
  245. float iggGetScrollMaxY() { return ImGui::GetScrollMaxY(); }
  246. void iggSetScrollHereX(float centerXRatio) { ImGui::SetScrollHereX(centerXRatio); }
  247. void iggSetScrollHereY(float centerYRatio) { ImGui::SetScrollHereY(centerYRatio); }
  248. void iggSetScrollX(float scrollX) { ImGui::SetScrollX(scrollX); }
  249. void iggSetScrollY(float scrollY) { ImGui::SetScrollY(scrollY); }
  250. void iggSetItemDefaultFocus() { ImGui::SetItemDefaultFocus(); }
  251. IggBool iggIsItemFocused() { return ImGui::IsItemFocused(); }
  252. IggBool iggIsAnyItemFocused() { return ImGui::IsAnyItemFocused(); }
  253. int iggGetMouseCursor() { return ImGui::GetMouseCursor(); }
  254. void iggSetMouseCursor(int cursor) { ImGui::SetMouseCursor(cursor); }
  255. void iggSetKeyboardFocusHere(int offset) { ImGui::SetKeyboardFocusHere(offset); }
  256. IggBool iggBeginTabBar(char const *str_id, int flags) { return ImGui::BeginTabBar(str_id, flags) ? 1 : 0; }
  257. void iggEndTabBar() { ImGui::EndTabBar(); }
  258. IggBool iggBeginTabItem(char const *label, IggBool *p_open, int flags) {
  259. BoolWrapper openArg(p_open);
  260. return ImGui::BeginTabItem(label, openArg, flags) ? 1 : 0;
  261. }
  262. void iggEndTabItem() { ImGui::EndTabItem(); }
  263. void iggSetTabItemClosed(char const *tab_or_docked_window_label) { ImGui::SetTabItemClosed(tab_or_docked_window_label); }
  264. IggDrawList iggGetWindowDrawList() {
  265. ImDrawList *drawlist = ImGui::GetWindowDrawList();
  266. return static_cast<IggDrawList>(drawlist);
  267. }
  268. void iggGetItemRectMin(IggVec2 *size) { exportValue(*size, ImGui::GetItemRectMin()); }
  269. void iggGetItemRectMax(IggVec2 *size) { exportValue(*size, ImGui::GetItemRectMax()); }
  270. void iggGetItemRectSize(IggVec2 *size) { exportValue(*size, ImGui::GetItemRectSize()); }
  271. void iggPushClipRect(const IggVec2 *clip_rect_min, const IggVec2 *clip_rect_max, IggBool intersect_with_clip_rect) {
  272. Vec2Wrapper clipMin(clip_rect_min);
  273. Vec2Wrapper clipMax(clip_rect_max);
  274. ImGui::PushClipRect(*clipMin, *clipMax, intersect_with_clip_rect);
  275. }
  276. void iggPopClipRect() { ImGui::PopClipRect(); }