imguiWrapper.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. #pragma once
  2. #include "imguiWrapperTypes.h"
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. extern IggContext iggCreateContext(IggFontAtlas sharedFontAtlas);
  7. extern void iggDestroyContext(IggContext context);
  8. extern IggContext iggGetCurrentContext();
  9. extern void iggSetCurrentContext(IggContext context);
  10. extern void iggSetMaxWaitBeforeNextFrame(double time);
  11. extern IggIO iggGetCurrentIO(void);
  12. extern IggGuiStyle iggGetCurrentStyle(void);
  13. extern void iggNewFrame(void);
  14. extern void iggRender(void);
  15. extern IggDrawData iggGetDrawData(void);
  16. extern void iggEndFrame(void);
  17. extern double iggGetEventWaitingTime(void);
  18. extern char const *iggGetVersion(void);
  19. extern void iggShowDemoWindow(IggBool *open);
  20. extern void iggShowUserGuide(void);
  21. extern IggBool iggBegin(char const *id, IggBool *open, int flags);
  22. extern void iggEnd(void);
  23. extern IggBool iggBeginChild(char const *id, IggVec2 const *size,
  24. IggBool border, int flags);
  25. extern void iggEndChild(void);
  26. extern void iggWindowPos(IggVec2 *pos);
  27. extern void iggWindowSize(IggVec2 *size);
  28. extern float iggWindowWidth(void);
  29. extern float iggWindowHeight(void);
  30. extern void iggContentRegionAvail(IggVec2 *size);
  31. extern IggBool iggIsWindowAppearing();
  32. extern IggBool iggIsWindowCollapsed();
  33. extern IggBool iggIsWindowFocused(int flags);
  34. extern IggBool iggIsWindowHovered(int flags);
  35. extern void iggSetNextWindowPos(IggVec2 const *pos, int cond,
  36. IggVec2 const *pivot);
  37. extern void iggSetNextWindowSize(IggVec2 const *size, int cond);
  38. extern void iggSetNextWindowContentSize(IggVec2 const *size);
  39. extern void iggSetNextWindowFocus(void);
  40. extern void iggSetNextWindowBgAlpha(float value);
  41. extern void iggPushFont(IggFont handle);
  42. extern void iggPopFont(void);
  43. extern void iggPushStyleColor(int index, IggVec4 const *col);
  44. extern void iggPopStyleColor(int count);
  45. extern void iggPushStyleVarFloat(int index, float value);
  46. extern void iggPushStyleVarVec2(int index, IggVec2 const *value);
  47. extern void iggPopStyleVar(int count);
  48. extern void iggCalcTextSize(const char *text, int length,
  49. IggBool hide_text_after_double_hash,
  50. float wrap_width, IggVec2 *value);
  51. extern unsigned int iggGetColorU32(const IggVec4 col);
  52. extern void iggBeginDisabled(IggBool disabled);
  53. extern void iggEndDisabled();
  54. extern void iggStyleColorsDark();
  55. extern void iggStyleColorsClassic();
  56. extern void iggStyleColorsLight();
  57. extern float iggGetFontSize();
  58. extern void iggPushItemWidth(float width);
  59. extern void iggPopItemWidth(void);
  60. extern float iggCalcItemWidth(void);
  61. extern void iggPushTextWrapPos(float wrapPosX);
  62. extern void iggPopTextWrapPos(void);
  63. extern void iggPushAllowKeyboardFocus(IggBool allow_keyboard_focus);
  64. extern void iggPopAllowKeyboardFocus(void);
  65. extern void iggPushID(char const *id);
  66. extern void iggPopID(void);
  67. extern void iggTextUnformatted(char const *text);
  68. extern void iggLabelText(char const *label, char const *text);
  69. extern IggBool iggButton(char const *label, IggVec2 const *size);
  70. extern IggBool iggSmallButton(char const *label);
  71. extern IggBool iggArrowButton(const char* id, unsigned char dir);
  72. extern IggBool iggInvisibleButton(char const *label, IggVec2 const *size);
  73. extern void iggImage(IggTextureID textureID, IggVec2 const *size,
  74. IggVec2 const *uv0, IggVec2 const *uv1,
  75. IggVec4 const *tintCol, IggVec4 const *borderCol);
  76. extern IggBool iggImageButton(IggTextureID textureID, IggVec2 const *size,
  77. IggVec2 const *uv0, IggVec2 const *uv1,
  78. int framePadding, IggVec4 const *bgCol,
  79. IggVec4 const *tintCol);
  80. extern IggBool iggCheckbox(char const *label, IggBool *selected);
  81. extern IggBool iggRadioButton(char const *label, IggBool active);
  82. extern void iggProgressBar(float fraction, IggVec2 const *size,
  83. char const *overlay);
  84. extern void iggBullet(void);
  85. extern void iggBulletText(const char* text);
  86. extern IggBool iggBeginCombo(char const *label, char const *previewValue,
  87. int flags);
  88. extern void iggEndCombo(void);
  89. extern IggBool iggDragFloat(char const *label, float *value, float speed,
  90. float min, float max, char const *format,
  91. float power);
  92. extern IggBool iggDragInt(char const *label, int *value, float speed, int min,
  93. int max, char const *format);
  94. extern IggBool iggSliderFloat(char const *label, float *value, float minValue,
  95. float maxValue, char const *format, float power);
  96. extern IggBool iggSliderFloatN(char const *label, float *value, int n,
  97. float minValue, float maxValue,
  98. char const *format, float power);
  99. extern IggBool iggSliderInt(char const *label, int *value, int minValue,
  100. int maxValue, char const *format);
  101. extern IggBool iggVSliderInt(const char* label, const IggVec2 *size, int* v, int v_min, int v_max, const char* format, int flags);
  102. extern IggBool iggInputText(char const *label, char *buf, unsigned int bufSize,
  103. int flags, int callbackKey);
  104. extern IggBool iggInputTextWithHint(char const *label, char const *hint, char *buf, unsigned int bufSize,
  105. int flags, int callbackKey);
  106. extern IggBool iggInputTextMultiline(char const *label, char *buf,
  107. unsigned int bufSize, IggVec2 const *size,
  108. int flags, int callbackKey);
  109. extern IggBool iggInputInt(char const *label, int *v, int step, int step_fast,
  110. int flags);
  111. extern IggBool iggInputFloat(char const *label, float *v, float step,
  112. float step_fast, const char *format, int flats);
  113. extern IggBool iggColorEdit3(char const *label, float *col, int flags);
  114. extern IggBool iggColorEdit4(char const *label, float *col, int flags);
  115. extern IggBool iggColorPicker3(char const *label, float *col, int flags);
  116. extern IggBool iggColorPicker4(char const *label, float *col, int flags);
  117. extern void iggSeparator(void);
  118. extern void iggSameLine(float posX, float spacingW);
  119. extern void iggSpacing(void);
  120. extern void iggDummy(IggVec2 const *size);
  121. extern void iggBeginGroup(void);
  122. extern void iggEndGroup(void);
  123. extern void iggCursorPos(IggVec2 *pos);
  124. extern float iggCursorPosX(void);
  125. extern float iggCursorPosY(void);
  126. extern void iggCursorStartPos(IggVec2 *pos);
  127. extern void iggCursorScreenPos(IggVec2 *pos);
  128. extern void iggSetCursorPos(IggVec2 const *localPos);
  129. extern void iggSetCursorScreenPos(IggVec2 const *absPos);
  130. extern void iggMousePos(IggVec2 *pos);
  131. extern void iggAlignTextToFramePadding();
  132. extern float iggGetTextLineHeight(void);
  133. extern float iggGetTextLineHeightWithSpacing(void);
  134. extern float iggFrameHeightWithSpacing(void);
  135. extern IggBool iggTreeNode(char const *label, int flags);
  136. extern void iggTreePop(void);
  137. extern void iggSetNextItemOpen(IggBool open, int cond);
  138. extern float iggGetTreeNodeToLabelSpacing(void);
  139. extern IggBool iggSelectable(char const *label, IggBool selected, int flags,
  140. IggVec2 const *size);
  141. extern IggBool iggListBoxV(char const *label, int *currentItem,
  142. char const *const items[], int itemCount,
  143. int heightItems);
  144. extern void iggPlotLines(const char *label, const float *values,
  145. int valuesCount, int valuesOffset,
  146. const char *overlayText, float scaleMin,
  147. float scaleMax, IggVec2 const *graphSize);
  148. extern void iggPlotHistogram(const char *label, const float *values,
  149. int valuesCount, int valuesOffset,
  150. const char *overlayText, float scaleMin,
  151. float scaleMax, IggVec2 const *graphSize);
  152. extern void iggSetTooltip(char const *text);
  153. extern void iggBeginTooltip(void);
  154. extern void iggEndTooltip(void);
  155. extern IggBool iggBeginMainMenuBar(void);
  156. extern void iggEndMainMenuBar(void);
  157. extern IggBool iggBeginMenuBar(void);
  158. extern void iggEndMenuBar(void);
  159. extern IggBool iggBeginMenu(char const *label, IggBool enabled);
  160. extern void iggEndMenu(void);
  161. extern IggBool iggMenuItem(char const *label, char const *shortcut,
  162. IggBool selected, IggBool enabled);
  163. extern void iggOpenPopup(char const *id);
  164. extern IggBool iggBeginPopup(char const *name, int flags);
  165. extern IggBool iggBeginPopupModal(char const *name, IggBool *open, int flags);
  166. extern IggBool iggBeginPopupContextItem(char const *label, int mouseButton);
  167. extern void iggEndPopup(void);
  168. extern void iggCloseCurrentPopup(void);
  169. extern IggBool iggIsItemHovered(int flags);
  170. extern IggBool iggIsItemActive();
  171. extern IggBool iggIsItemClicked(int mouseButton);
  172. extern IggBool iggIsAnyItemActive();
  173. extern IggBool iggIsKeyDown(int key);
  174. extern IggBool iggIsKeyPressed(int key, IggBool repeat);
  175. extern IggBool iggIsKeyReleased(int key);
  176. extern IggBool iggIsMouseDown(int button);
  177. extern IggBool iggIsAnyMouseDown();
  178. extern IggBool iggIsMouseClicked(int button, IggBool repeat);
  179. extern IggBool iggIsMouseReleased(int button);
  180. extern IggBool iggIsMouseDoubleClicked(int button);
  181. extern void iggColumns(int count, char const *label, IggBool border);
  182. extern void iggNextColumn();
  183. extern int iggGetColumnIndex();
  184. extern int iggGetColumnWidth(int index);
  185. extern void iggSetColumnWidth(int index, float width);
  186. extern float iggGetColumnOffset(int index);
  187. extern void iggSetColumnOffset(int index, float offsetX);
  188. extern int iggGetColumnsCount();
  189. extern float iggGetScrollX();
  190. extern float iggGetScrollY();
  191. extern float iggGetScrollMaxX();
  192. extern float iggGetScrollMaxY();
  193. extern void iggSetScrollHereX(float centerXRatio);
  194. extern void iggSetScrollHereY(float centerYRatio);
  195. extern void iggSetScrollX(float scrollX);
  196. extern void iggSetScrollY(float scrollY);
  197. extern void iggSetItemDefaultFocus();
  198. extern IggBool iggIsItemFocused();
  199. extern IggBool iggIsAnyItemFocused();
  200. extern int iggGetMouseCursor();
  201. extern void iggSetMouseCursor(int cursor);
  202. extern void iggSetKeyboardFocusHere(int offset);
  203. extern IggBool iggBeginTabBar(char const *str_id, int flags);
  204. extern void iggEndTabBar();
  205. extern IggBool iggBeginTabItem(char const *label, IggBool *p_open, int flags);
  206. extern void iggEndTabItem();
  207. extern void iggSetTabItemClosed(char const *tab_or_docked_window_label);
  208. extern IggDrawList iggGetWindowDrawList();
  209. extern void iggGetItemRectMin(IggVec2 *size);
  210. extern void iggGetItemRectMax(IggVec2 *size);
  211. extern void iggGetItemRectSize(IggVec2 *size);
  212. extern void iggPushClipRect(const IggVec2 *clip_rect_min, const IggVec2 *clip_rect_max, IggBool intersect_with_clip_rect);
  213. extern void iggPopClipRect();
  214. #ifdef __cplusplus
  215. }
  216. #endif