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