mirror of
https://github.com/cimgui/cimgui.git
synced 2025-08-10 20:08:31 +01:00
Compare commits
21 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
b936bb3369 | ||
![]() |
713d9f587c | ||
![]() |
59218e28d0 | ||
![]() |
32b310e31f | ||
![]() |
5fe328beae | ||
![]() |
5d061e7db7 | ||
![]() |
d02ce16125 | ||
![]() |
7d8b0cbf36 | ||
![]() |
fb80cc0cfe | ||
![]() |
4db3562350 | ||
![]() |
56b5017b50 | ||
![]() |
1cc171ce4c | ||
![]() |
92ef16ff00 | ||
![]() |
f61292e533 | ||
![]() |
d548e489cd | ||
![]() |
6b69c0e712 | ||
![]() |
ca33899307 | ||
![]() |
d10fc69e15 | ||
![]() |
f31a02aac6 | ||
![]() |
1ae5c3db87 | ||
![]() |
9853bb2678 |
4
.gitignore
vendored
4
.gitignore
vendored
@@ -31,3 +31,7 @@ cimgui/cimgui.opensdf
|
||||
cimgui/cimgui.sdf
|
||||
cimgui/cimgui.v12.suo
|
||||
cimgui/Release/
|
||||
.idea
|
||||
CMakeLists.txt
|
||||
cimgui/.vs/
|
||||
cimgui/cimgui.vcxproj.user
|
||||
|
@@ -8,12 +8,12 @@ Most of the functions have wrapper counterparts now, missing stuff is added on a
|
||||
This library is intended as a intermediate layer to be able to use imgui from other languages that can interface with C (like D - see [D-binding](https://github.com/Extrawurst/DerelictImgui))
|
||||
|
||||
Notes:
|
||||
* currently this wrapper is based on version [1.40 of imgui](https://github.com/ocornut/imgui/releases/tag/v1.40)
|
||||
* currently this wrapper is based on version [1.45 of imgui](https://github.com/ocornut/imgui/releases/tag/v1.45)
|
||||
* does not compile with pure C compiler yet (for writing bindings in languages that are able to use C-ABI it is enough though, see D-bindings)
|
||||
|
||||
# usage
|
||||
|
||||
* clone
|
||||
* make using makefile on linux/osx (linux makefile not tested)
|
||||
* use whatever method is in ImGui c++ namespace in the original [imgui.h](https://github.com/ocornut/imgui/blob/master/imgui.h) by prepending `ig_` (most of the time)
|
||||
* make using makefile on linux/osx
|
||||
* use whatever method is in ImGui c++ namespace in the original [imgui.h](https://github.com/ocornut/imgui/blob/master/imgui.h) by prepending `ig`
|
||||
* methods have the same parameter list and return values (where possible)
|
||||
|
@@ -7,6 +7,8 @@ OBJS += fontAtlas.o
|
||||
OBJS += drawList.o
|
||||
#OBJS += test.o
|
||||
OBJS += ../imgui/imgui.o
|
||||
OBJS += ../imgui/imgui_draw.o
|
||||
OBJS += ../imgui/imgui_demo.o
|
||||
|
||||
UNAME_S := $(shell uname -s)
|
||||
|
||||
@@ -40,4 +42,4 @@ imgui_example:$(OBJS)
|
||||
$(CXX) -o $(OUTPUTNAME) $(OBJS) $(CXXFLAGS) $(LINKFLAGS)
|
||||
|
||||
clean:
|
||||
rm $(OBJS)
|
||||
rm $(OBJS)
|
||||
|
1206
cimgui/cimgui.cpp
1206
cimgui/cimgui.cpp
File diff suppressed because it is too large
Load Diff
571
cimgui/cimgui.h
571
cimgui/cimgui.h
@@ -23,312 +23,349 @@ typedef int ImGuiWindowFlags;
|
||||
typedef int ImGuiSetCond;
|
||||
typedef int ImGuiColorEditMode;
|
||||
|
||||
CIMGUI_API ImGuiIO* ig_GetIO();
|
||||
CIMGUI_API ImGuiStyle* ig_GetStyle();
|
||||
CIMGUI_API void ig_NewFrame();
|
||||
CIMGUI_API void ig_Render();
|
||||
CIMGUI_API void ig_Shutdown();
|
||||
CIMGUI_API void ig_ShowUserGuide();
|
||||
CIMGUI_API void ig_ShowStyleEditor(ImGuiStyle* ref);
|
||||
CIMGUI_API void ig_ShowTestWindow(bool* opened);
|
||||
CIMGUI_API void ig_ShowMetricsWindow(bool* opened);
|
||||
CIMGUI_API ImGuiIO* igGetIO();
|
||||
CIMGUI_API ImGuiStyle* igGetStyle();
|
||||
CIMGUI_API ImDrawData* igGetDrawData();
|
||||
CIMGUI_API void igNewFrame();
|
||||
CIMGUI_API void igRender();
|
||||
CIMGUI_API void igShutdown();
|
||||
CIMGUI_API void igShowUserGuide();
|
||||
CIMGUI_API void igShowStyleEditor(ImGuiStyle* ref);
|
||||
CIMGUI_API void igShowTestWindow(bool* opened);
|
||||
CIMGUI_API void igShowMetricsWindow(bool* opened);
|
||||
|
||||
// Window
|
||||
CIMGUI_API bool ig_Begin(CONST char* name, bool* p_opened, ImGuiWindowFlags flags);
|
||||
CIMGUI_API bool ig_Begin2(CONST char* name, bool* p_opened, CONST struct ImVec2 size_on_first_use, float bg_alpha, ImGuiWindowFlags flags);
|
||||
CIMGUI_API void ig_End();
|
||||
CIMGUI_API bool ig_BeginChild(CONST char* str_id, CONST struct ImVec2 size, bool border, ImGuiWindowFlags extra_flags);
|
||||
CIMGUI_API bool ig_BeginChildEx(ImGuiID id, CONST struct ImVec2 size, bool border, ImGuiWindowFlags extra_flags);
|
||||
CIMGUI_API void ig_EndChild();
|
||||
CIMGUI_API void ig_GetContentRegionMax(struct ImVec2* out);
|
||||
CIMGUI_API void ig_GetWindowContentRegionMin(struct ImVec2* out);
|
||||
CIMGUI_API void ig_GetWindowContentRegionMax(struct ImVec2* out);
|
||||
CIMGUI_API ImDrawList* ig_GetWindowDrawList();
|
||||
CIMGUI_API ImFont* ig_GetWindowFont();
|
||||
CIMGUI_API float ig_GetWindowFontSize();
|
||||
CIMGUI_API void ig_SetWindowFontScale(float scale);
|
||||
CIMGUI_API void ig_GetWindowPos(struct ImVec2* out);
|
||||
CIMGUI_API void ig_GetWindowSize(struct ImVec2* out);
|
||||
CIMGUI_API float ig_GetWindowWidth();
|
||||
CIMGUI_API bool ig_IsWindowCollapsed();
|
||||
CIMGUI_API bool igBegin(CONST char* name, bool* p_opened, ImGuiWindowFlags flags);
|
||||
CIMGUI_API bool igBegin2(CONST char* name, bool* p_opened, CONST struct ImVec2 size_on_first_use, float bg_alpha, ImGuiWindowFlags flags);
|
||||
CIMGUI_API void igEnd();
|
||||
CIMGUI_API bool igBeginChild(CONST char* str_id, CONST struct ImVec2 size, bool border, ImGuiWindowFlags extra_flags);
|
||||
CIMGUI_API bool igBeginChildEx(ImGuiID id, CONST struct ImVec2 size, bool border, ImGuiWindowFlags extra_flags);
|
||||
CIMGUI_API void igEndChild();
|
||||
CIMGUI_API void igGetContentRegionMax(struct ImVec2* out);
|
||||
CIMGUI_API void igGetContentRegionAvail(struct ImVec2* out);
|
||||
CIMGUI_API float igGetContentRegionAvailWidth(); //
|
||||
CIMGUI_API void igGetWindowContentRegionMin(struct ImVec2* out);
|
||||
CIMGUI_API void igGetWindowContentRegionMax(struct ImVec2* out);
|
||||
CIMGUI_API float igGetWindowContentRegionWidth(); //
|
||||
CIMGUI_API ImDrawList* igGetWindowDrawList();
|
||||
CIMGUI_API ImFont* igGetWindowFont();
|
||||
CIMGUI_API float igGetWindowFontSize();
|
||||
CIMGUI_API void igSetWindowFontScale(float scale);
|
||||
CIMGUI_API void igGetWindowPos(struct ImVec2* out);
|
||||
CIMGUI_API void igGetWindowSize(struct ImVec2* out);
|
||||
CIMGUI_API float igGetWindowWidth();
|
||||
CIMGUI_API float igGetWindowHeight();
|
||||
CIMGUI_API bool igIsWindowCollapsed();
|
||||
|
||||
CIMGUI_API void ig_SetNextWindowPos(CONST struct ImVec2 pos, ImGuiSetCond cond);
|
||||
CIMGUI_API void ig_SetNextWindowPosCenter(ImGuiSetCond cond);
|
||||
CIMGUI_API void ig_SetNextWindowSize(CONST struct ImVec2 size, ImGuiSetCond cond);
|
||||
CIMGUI_API void ig_SetNextWindowCollapsed(bool collapsed, ImGuiSetCond cond);
|
||||
CIMGUI_API void ig_SetNextWindowFocus();
|
||||
CIMGUI_API void ig_SetWindowPos(CONST struct ImVec2 pos, ImGuiSetCond cond);
|
||||
CIMGUI_API void ig_SetWindowSize(CONST struct ImVec2 size, ImGuiSetCond cond);
|
||||
CIMGUI_API void ig_SetWindowCollapsed(bool collapsed, ImGuiSetCond cond);
|
||||
CIMGUI_API void ig_SetWindowFocus();
|
||||
CIMGUI_API void ig_SetWindowPosByName(CONST char* name, CONST struct ImVec2 pos, ImGuiSetCond cond);
|
||||
CIMGUI_API void ig_SetWindowSize2(CONST char* name, CONST struct ImVec2 size, ImGuiSetCond cond);
|
||||
CIMGUI_API void ig_SetWindowCollapsed2(CONST char* name, bool collapsed, ImGuiSetCond cond);
|
||||
CIMGUI_API void ig_SetWindowFocus2(CONST char* name);
|
||||
CIMGUI_API void igSetNextWindowPos(CONST struct ImVec2 pos, ImGuiSetCond cond);
|
||||
CIMGUI_API void igSetNextWindowPosCenter(ImGuiSetCond cond);
|
||||
CIMGUI_API void igSetNextWindowSize(CONST struct ImVec2 size, ImGuiSetCond cond);
|
||||
CIMGUI_API void igSetNextWindowContentSize(CONST ImVec2 size);
|
||||
CIMGUI_API void igSetNextWindowContentWidth(float width);
|
||||
CIMGUI_API void igSetNextWindowCollapsed(bool collapsed, ImGuiSetCond cond);
|
||||
CIMGUI_API void igSetNextWindowFocus();
|
||||
CIMGUI_API void igSetWindowPos(CONST struct ImVec2 pos, ImGuiSetCond cond);
|
||||
CIMGUI_API void igSetWindowSize(CONST struct ImVec2 size, ImGuiSetCond cond);
|
||||
CIMGUI_API void igSetWindowCollapsed(bool collapsed, ImGuiSetCond cond);
|
||||
CIMGUI_API void igSetWindowFocus();
|
||||
CIMGUI_API void igSetWindowPosByName(CONST char* name, CONST struct ImVec2 pos, ImGuiSetCond cond);
|
||||
CIMGUI_API void igSetWindowSize2(CONST char* name, CONST struct ImVec2 size, ImGuiSetCond cond);
|
||||
CIMGUI_API void igSetWindowCollapsed2(CONST char* name, bool collapsed, ImGuiSetCond cond);
|
||||
CIMGUI_API void igSetWindowFocus2(CONST char* name);
|
||||
|
||||
CIMGUI_API float ig_GetScrollPosY();
|
||||
CIMGUI_API float ig_GetScrollMaxY();
|
||||
CIMGUI_API void ig_SetScrollPosHere();
|
||||
CIMGUI_API void ig_SetKeyboardFocusHere(int offset);
|
||||
CIMGUI_API void ig_SetStateStorage(ImGuiStorage* tree);
|
||||
CIMGUI_API ImGuiStorage* ig_GetStateStorage();
|
||||
CIMGUI_API float igGetScrollX();
|
||||
CIMGUI_API float igGetScrollY();
|
||||
CIMGUI_API float igGetScrollMaxX();
|
||||
CIMGUI_API float igGetScrollMaxY();
|
||||
CIMGUI_API void igSetScrollX(float scroll_x);
|
||||
CIMGUI_API void igSetScrollY(float scroll_y);
|
||||
CIMGUI_API void igSetScrollHere(float center_y_ratio = 0.5f);
|
||||
CIMGUI_API void igSetScrollFromPosY(float pos_y, float center_y_ratio = 0.5f);
|
||||
CIMGUI_API void igSetKeyboardFocusHere(int offset);
|
||||
CIMGUI_API void igSetStateStorage(ImGuiStorage* tree);
|
||||
CIMGUI_API ImGuiStorage* igGetStateStorage();
|
||||
|
||||
// Parameters stacks (shared)
|
||||
CIMGUI_API void ig_PushFont(ImFont* font);
|
||||
CIMGUI_API void ig_PopFont();
|
||||
CIMGUI_API void ig_PushStyleColor(ImGuiCol idx, CONST struct ImVec4 col);
|
||||
CIMGUI_API void ig_PopStyleColor(int count);
|
||||
CIMGUI_API void ig_PushStyleVar(ImGuiStyleVar idx, float val);
|
||||
CIMGUI_API void ig_PushStyleVarVec(ImGuiStyleVar idx, CONST struct ImVec2 val);
|
||||
CIMGUI_API void ig_PopStyleVar(int count);
|
||||
CIMGUI_API void igPushFont(ImFont* font);
|
||||
CIMGUI_API void igPopFont();
|
||||
CIMGUI_API void igPushStyleColor(ImGuiCol idx, CONST struct ImVec4 col);
|
||||
CIMGUI_API void igPopStyleColor(int count);
|
||||
CIMGUI_API void igPushStyleVar(ImGuiStyleVar idx, float val);
|
||||
CIMGUI_API void igPushStyleVarVec(ImGuiStyleVar idx, CONST struct ImVec2 val);
|
||||
CIMGUI_API void igPopStyleVar(int count);
|
||||
|
||||
// Parameters stacks (current window)
|
||||
CIMGUI_API void ig_PushItemWidth(float item_width);
|
||||
CIMGUI_API void ig_PopItemWidth();
|
||||
CIMGUI_API float ig_CalcItemWidth();
|
||||
CIMGUI_API void ig_PushAllowKeyboardFocus(bool v);
|
||||
CIMGUI_API void ig_PopAllowKeyboardFocus();
|
||||
CIMGUI_API void ig_PushTextWrapPos(float wrap_pos_x);
|
||||
CIMGUI_API void ig_PopTextWrapPos();
|
||||
CIMGUI_API void ig_PushButtonRepeat(bool repeat);
|
||||
CIMGUI_API void ig_PopButtonRepeat();
|
||||
|
||||
|
||||
// Tooltip
|
||||
CIMGUI_API void ig_SetTooltip(CONST char* fmt, ...);
|
||||
CIMGUI_API void ig_SetTooltipV(CONST char* fmt, va_list args);
|
||||
CIMGUI_API void ig_BeginTooltip();
|
||||
CIMGUI_API void ig_EndTooltip();
|
||||
|
||||
// Popup
|
||||
CIMGUI_API void ig_OpenPopup(CONST char* str_id);
|
||||
CIMGUI_API bool ig_BeginPopup(CONST char* str_id);
|
||||
CIMGUI_API bool ig_BeginPopupModal(CONST char* name, bool* p_opened, ImGuiWindowFlags extra_flags);
|
||||
CIMGUI_API bool ig_BeginPopupContextItem(CONST char* str_id, int mouse_button);
|
||||
CIMGUI_API bool ig_BeginPopupContextWindow(bool also_over_items, CONST char* str_id, int mouse_button);
|
||||
CIMGUI_API bool ig_BeginPopupContextVoid(CONST char* str_id, int mouse_button);
|
||||
CIMGUI_API void ig_EndPopup();
|
||||
CIMGUI_API void ig_CloseCurrentPopup();
|
||||
CIMGUI_API void igPushItemWidth(float item_width);
|
||||
CIMGUI_API void igPopItemWidth();
|
||||
CIMGUI_API float igCalcItemWidth();
|
||||
CIMGUI_API void igPushTextWrapPos(float wrap_pos_x);
|
||||
CIMGUI_API void igPopTextWrapPos();
|
||||
CIMGUI_API void igPushAllowKeyboardFocus(bool v);
|
||||
CIMGUI_API void igPopAllowKeyboardFocus();
|
||||
CIMGUI_API void igPushButtonRepeat(bool repeat);
|
||||
CIMGUI_API void igPopButtonRepeat();
|
||||
|
||||
// Layout
|
||||
CIMGUI_API void ig_BeginGroup();
|
||||
CIMGUI_API void ig_EndGroup();
|
||||
CIMGUI_API void ig_Separator();
|
||||
CIMGUI_API void ig_SameLine(int column_x, int spacing_w);
|
||||
CIMGUI_API void ig_Spacing();
|
||||
CIMGUI_API void ig_Dummy(CONST ImVec2* size);
|
||||
CIMGUI_API void ig_Indent();
|
||||
CIMGUI_API void ig_Unindent();
|
||||
CIMGUI_API void ig_Columns(int count, CONST char* id, bool border);
|
||||
CIMGUI_API void ig_NextColumn();
|
||||
CIMGUI_API int ig_GetColumnIndex();
|
||||
CIMGUI_API float ig_GetColumnOffset(int column_index);
|
||||
CIMGUI_API void ig_SetColumnOffset(int column_index, float offset_x);
|
||||
CIMGUI_API float ig_GetColumnWidth(int column_index);
|
||||
CIMGUI_API int ig_GetColumnsCount();
|
||||
CIMGUI_API void ig_GetCursorPos(struct ImVec2* pOut);
|
||||
CIMGUI_API float ig_GetCursorPosX();
|
||||
CIMGUI_API float ig_GetCursorPosY();
|
||||
CIMGUI_API void ig_SetCursorPos(CONST struct ImVec2 pos);
|
||||
CIMGUI_API void ig_SetCursorPosX(float x);
|
||||
CIMGUI_API void ig_SetCursorPosY(float y);
|
||||
CIMGUI_API void ig_GetCursorScreenPos(struct ImVec2* pOut);
|
||||
CIMGUI_API void ig_SetCursorScreenPos(CONST struct ImVec2 pos);
|
||||
CIMGUI_API void ig_AlignFirstTextHeightToWidgets();
|
||||
CIMGUI_API float ig_GetTextLineHeight();
|
||||
CIMGUI_API float ig_GetTextLineHeightWithSpacing();
|
||||
CIMGUI_API float ig_GetItemsLineHeightWithSpacing();
|
||||
CIMGUI_API void igBeginGroup();
|
||||
CIMGUI_API void igEndGroup();
|
||||
CIMGUI_API void igSeparator();
|
||||
CIMGUI_API void igSameLine(float local_pos_x, float spacing_w);
|
||||
CIMGUI_API void igSpacing();
|
||||
CIMGUI_API void igDummy(CONST ImVec2* size);
|
||||
CIMGUI_API void igIndent();
|
||||
CIMGUI_API void igUnindent();
|
||||
CIMGUI_API void igColumns(int count, CONST char* id, bool border);
|
||||
CIMGUI_API void igNextColumn();
|
||||
CIMGUI_API int igGetColumnIndex();
|
||||
CIMGUI_API float igGetColumnOffset(int column_index);
|
||||
CIMGUI_API void igSetColumnOffset(int column_index, float offset_x);
|
||||
CIMGUI_API float igGetColumnWidth(int column_index);
|
||||
CIMGUI_API int igGetColumnsCount();
|
||||
CIMGUI_API void igGetCursorPos(struct ImVec2* pOut);
|
||||
CIMGUI_API float igGetCursorPosX();
|
||||
CIMGUI_API float igGetCursorPosY();
|
||||
CIMGUI_API void igSetCursorPos(CONST struct ImVec2 local_pos);
|
||||
CIMGUI_API void igSetCursorPosX(float x);
|
||||
CIMGUI_API void igSetCursorPosY(float y);
|
||||
CIMGUI_API void igGetCursorStartPos(struct ImVec2* pOut);
|
||||
CIMGUI_API void igGetCursorScreenPos(struct ImVec2* pOut);
|
||||
CIMGUI_API void igSetCursorScreenPos(CONST struct ImVec2 pos);
|
||||
CIMGUI_API void igAlignFirstTextHeightToWidgets();
|
||||
CIMGUI_API float igGetTextLineHeight();
|
||||
CIMGUI_API float igGetTextLineHeightWithSpacing();
|
||||
CIMGUI_API float igGetItemsLineHeightWithSpacing();
|
||||
|
||||
// ID scopes
|
||||
// If you are creating widgets in a loop you most likely want to push a unique identifier so ImGui can differentiate them
|
||||
// You can also use "##extra" within your widget name to distinguish them from each others (see 'Programmer Guide')
|
||||
CIMGUI_API void ig_PushIdStr(CONST char* str_id);
|
||||
CIMGUI_API void ig_PushIdStrRange(CONST char* str_begin, CONST char* str_end);
|
||||
CIMGUI_API void ig_PushIdPtr(CONST void* ptr_id);
|
||||
CIMGUI_API void ig_PushIdInt(CONST int int_id);
|
||||
CIMGUI_API void ig_PopId();
|
||||
CIMGUI_API ImGuiID ig_GetIdStr(CONST char* str_id);
|
||||
CIMGUI_API ImGuiID ig_GetIdStrRange(CONST char* str_begin,CONST char* str_end);
|
||||
CIMGUI_API ImGuiID ig_GetIdPtr(CONST void* ptr_id);
|
||||
CIMGUI_API void igPushIdStr(CONST char* str_id);
|
||||
CIMGUI_API void igPushIdStrRange(CONST char* str_begin, CONST char* str_end);
|
||||
CIMGUI_API void igPushIdPtr(CONST void* ptr_id);
|
||||
CIMGUI_API void igPushIdInt(int int_id);
|
||||
CIMGUI_API void igPopId();
|
||||
CIMGUI_API ImGuiID igGetIdStr(CONST char* str_id);
|
||||
CIMGUI_API ImGuiID igGetIdStrRange(CONST char* str_begin,CONST char* str_end);
|
||||
CIMGUI_API ImGuiID igGetIdPtr(CONST void* ptr_id);
|
||||
|
||||
// Widgets
|
||||
CIMGUI_API void ig_Text(CONST char* fmt, ...);
|
||||
CIMGUI_API void ig_TextV(CONST char* fmt, va_list args);
|
||||
CIMGUI_API void ig_TextColored(CONST struct ImVec4 col, CONST char* fmt, ...);
|
||||
CIMGUI_API void ig_TextColoredV(CONST struct ImVec4 col, CONST char* fmt, va_list args);
|
||||
CIMGUI_API void ig_TextDisabled(CONST char* fmt, ...);
|
||||
CIMGUI_API void ig_TextDisabledV(CONST char* fmt, va_list args);
|
||||
CIMGUI_API void ig_TextWrapped(CONST char* fmt, ...);
|
||||
CIMGUI_API void ig_TextWrappedV(CONST char* fmt, va_list args);
|
||||
CIMGUI_API void ig_TextUnformatted(CONST char* text, CONST char* text_end);
|
||||
CIMGUI_API void ig_LabelText(CONST char* label, CONST char* fmt, ...);
|
||||
CIMGUI_API void ig_LabelTextV(CONST char* label, CONST char* fmt, va_list args);
|
||||
CIMGUI_API void ig_Bullet();
|
||||
CIMGUI_API void ig_BulletText(CONST char* fmt, ...);
|
||||
CIMGUI_API void ig_BulletTextV(CONST char* fmt, va_list args);
|
||||
CIMGUI_API bool ig_Button(CONST char* label, CONST struct ImVec2 size);
|
||||
CIMGUI_API bool ig_SmallButton(CONST char* label);
|
||||
CIMGUI_API bool ig_InvisibleButton(CONST char* str_id, CONST struct ImVec2 size);
|
||||
CIMGUI_API void ig_Image(ImTextureID user_texture_id, CONST struct ImVec2 size, CONST struct ImVec2 uv0, CONST struct ImVec2 uv1, CONST struct ImVec4 tint_col, CONST struct ImVec4 border_col);
|
||||
CIMGUI_API bool ig_ImageButton(ImTextureID user_texture_id, CONST struct ImVec2 size, CONST struct ImVec2 uv0, CONST struct ImVec2 uv1, int frame_padding, CONST struct ImVec4 bg_col, CONST struct ImVec4 tint_col);
|
||||
CIMGUI_API bool ig_CollapsingHeader(CONST char* label, CONST char* str_id, bool display_frame, bool default_open);
|
||||
CIMGUI_API bool ig_Checkbox(CONST char* label, bool* v);
|
||||
CIMGUI_API bool ig_CheckboxFlags(CONST char* label, unsigned int* flags, unsigned int flags_value);
|
||||
CIMGUI_API bool ig_RadioButtonBool(CONST char* label, bool active);
|
||||
CIMGUI_API bool ig_RadioButton(CONST char* label, int* v, int v_button);
|
||||
CIMGUI_API bool ig_Combo(CONST char* label, int* current_item, CONST char** items, int items_count, int height_in_items);
|
||||
CIMGUI_API bool ig_Combo2(CONST char* label, int* current_item, CONST char* items_separated_by_zeros, int height_in_items);
|
||||
CIMGUI_API bool ig_Combo3(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);
|
||||
CIMGUI_API bool ig_ColorButton(CONST struct ImVec4 col, bool small_height, bool outline_border);
|
||||
CIMGUI_API bool ig_ColorEdit3(CONST char* label, float col[3]);
|
||||
CIMGUI_API bool ig_ColorEdit4(CONST char* label, float col[4], bool show_alpha);
|
||||
CIMGUI_API void ig_ColorEditMode(ImGuiColorEditMode mode);
|
||||
CIMGUI_API void ig_PlotLines(CONST char* label, CONST float* values, int values_count, int values_offset, CONST char* overlay_text, float scale_min, float scale_max, struct ImVec2 graph_size, size_t stride);
|
||||
CIMGUI_API void ig_PlotLines2(CONST char* label, float(*values_getter)(void* data, int idx), void* data, int values_count, int values_offset, CONST char* overlay_text, float scale_min, float scale_max, struct ImVec2 graph_size);
|
||||
CIMGUI_API void ig_PlotHistogram(CONST char* label, CONST float* values, int values_count, int values_offset, CONST char* overlay_text, float scale_min, float scale_max, struct ImVec2 graph_size, size_t stride);
|
||||
CIMGUI_API void ig_PlotHistogram2(CONST char* label, float(*values_getter)(void* data, int idx), void* data, int values_count, int values_offset, CONST char* overlay_text, float scale_min, float scale_max, struct ImVec2 graph_size);
|
||||
CIMGUI_API void igText(CONST char* fmt, ...);
|
||||
CIMGUI_API void igTextV(CONST char* fmt, va_list args);
|
||||
CIMGUI_API void igTextColored(CONST struct ImVec4 col, CONST char* fmt, ...);
|
||||
CIMGUI_API void igTextColoredV(CONST struct ImVec4 col, CONST char* fmt, va_list args);
|
||||
CIMGUI_API void igTextDisabled(CONST char* fmt, ...);
|
||||
CIMGUI_API void igTextDisabledV(CONST char* fmt, va_list args);
|
||||
CIMGUI_API void igTextWrapped(CONST char* fmt, ...);
|
||||
CIMGUI_API void igTextWrappedV(CONST char* fmt, va_list args);
|
||||
CIMGUI_API void igTextUnformatted(CONST char* text, CONST char* text_end);
|
||||
CIMGUI_API void igLabelText(CONST char* label, CONST char* fmt, ...);
|
||||
CIMGUI_API void igLabelTextV(CONST char* label, CONST char* fmt, va_list args);
|
||||
CIMGUI_API void igBullet();
|
||||
CIMGUI_API void igBulletText(CONST char* fmt, ...);
|
||||
CIMGUI_API void igBulletTextV(CONST char* fmt, va_list args);
|
||||
CIMGUI_API bool igButton(CONST char* label, CONST struct ImVec2 size);
|
||||
CIMGUI_API bool igSmallButton(CONST char* label);
|
||||
CIMGUI_API bool igInvisibleButton(CONST char* str_id, CONST struct ImVec2 size);
|
||||
CIMGUI_API void igImage(ImTextureID user_texture_id, CONST struct ImVec2 size, CONST struct ImVec2 uv0, CONST struct ImVec2 uv1, CONST struct ImVec4 tint_col, CONST struct ImVec4 border_col);
|
||||
CIMGUI_API bool igImageButton(ImTextureID user_texture_id, CONST struct ImVec2 size, CONST struct ImVec2 uv0, CONST struct ImVec2 uv1, int frame_padding, CONST struct ImVec4 bg_col, CONST struct ImVec4 tint_col);
|
||||
CIMGUI_API bool igCollapsingHeader(CONST char* label, CONST char* str_id, bool display_frame, bool default_open);
|
||||
CIMGUI_API bool igCheckbox(CONST char* label, bool* v);
|
||||
CIMGUI_API bool igCheckboxFlags(CONST char* label, unsigned int* flags, unsigned int flags_value);
|
||||
CIMGUI_API bool igRadioButtonBool(CONST char* label, bool active);
|
||||
CIMGUI_API bool igRadioButton(CONST char* label, int* v, int v_button);
|
||||
CIMGUI_API bool igCombo(CONST char* label, int* current_item, CONST char** items, int items_count, int height_in_items);
|
||||
CIMGUI_API bool igCombo2(CONST char* label, int* current_item, CONST char* items_separated_by_zeros, int height_in_items);
|
||||
CIMGUI_API bool igCombo3(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);
|
||||
CIMGUI_API bool igColorButton(CONST struct ImVec4 col, bool small_height, bool outline_border);
|
||||
CIMGUI_API bool igColorEdit3(CONST char* label, float col[3]);
|
||||
CIMGUI_API bool igColorEdit4(CONST char* label, float col[4], bool show_alpha);
|
||||
CIMGUI_API void igColorEditMode(ImGuiColorEditMode mode);
|
||||
CIMGUI_API void igPlotLines(CONST char* label, CONST float* values, int values_count, int values_offset, CONST char* overlay_text, float scale_min, float scale_max, struct ImVec2 graph_size, int stride);
|
||||
CIMGUI_API void igPlotLines2(CONST char* label, float(*values_getter)(void* data, int idx), void* data, int values_count, int values_offset, CONST char* overlay_text, float scale_min, float scale_max, struct ImVec2 graph_size);
|
||||
CIMGUI_API void igPlotHistogram(CONST char* label, CONST float* values, int values_count, int values_offset, CONST char* overlay_text, float scale_min, float scale_max, struct ImVec2 graph_size, int stride);
|
||||
CIMGUI_API void igPlotHistogram2(CONST char* label, float(*values_getter)(void* data, int idx), void* data, int values_count, int values_offset, CONST char* overlay_text, float scale_min, float scale_max, struct ImVec2 graph_size);
|
||||
|
||||
// Widgets: Sliders (tip: ctrl+click on a slider to input text)
|
||||
CIMGUI_API bool ig_SliderFloat(CONST char* label, float* v, float v_min, float v_max, CONST char* display_format, float power);
|
||||
CIMGUI_API bool ig_SliderFloat2(CONST char* label, float v[2], float v_min, float v_max, CONST char* display_format, float power);
|
||||
CIMGUI_API bool ig_SliderFloat3(CONST char* label, float v[3], float v_min, float v_max, CONST char* display_format, float power);
|
||||
CIMGUI_API bool ig_SliderFloat4(CONST char* label, float v[4], float v_min, float v_max, CONST char* display_format, float power);
|
||||
CIMGUI_API bool ig_SliderAngle(CONST char* label, float* v_rad, float v_degrees_min, float v_degrees_max);
|
||||
CIMGUI_API bool ig_SliderInt(CONST char* label, int* v, int v_min, int v_max, CONST char* display_format);
|
||||
CIMGUI_API bool ig_SliderInt2(CONST char* label, int v[2], int v_min, int v_max, CONST char* display_format);
|
||||
CIMGUI_API bool ig_SliderInt3(CONST char* label, int v[3], int v_min, int v_max, CONST char* display_format);
|
||||
CIMGUI_API bool ig_SliderInt4(CONST char* label, int v[4], int v_min, int v_max, CONST char* display_format);
|
||||
CIMGUI_API bool ig_VSliderFloat(CONST char* label, CONST struct ImVec2 size, float* v, float v_min, float v_max, CONST char* display_format, float power);
|
||||
CIMGUI_API bool ig_VSliderInt(CONST char* label, CONST struct ImVec2 size, int* v, int v_min, int v_max, CONST char* display_format);
|
||||
CIMGUI_API bool igSliderFloat(CONST char* label, float* v, float v_min, float v_max, CONST char* display_format, float power);
|
||||
CIMGUI_API bool igSliderFloat2(CONST char* label, float v[2], float v_min, float v_max, CONST char* display_format, float power);
|
||||
CIMGUI_API bool igSliderFloat3(CONST char* label, float v[3], float v_min, float v_max, CONST char* display_format, float power);
|
||||
CIMGUI_API bool igSliderFloat4(CONST char* label, float v[4], float v_min, float v_max, CONST char* display_format, float power);
|
||||
CIMGUI_API bool igSliderAngle(CONST char* label, float* v_rad, float v_degrees_min, float v_degrees_max);
|
||||
CIMGUI_API bool igSliderInt(CONST char* label, int* v, int v_min, int v_max, CONST char* display_format);
|
||||
CIMGUI_API bool igSliderInt2(CONST char* label, int v[2], int v_min, int v_max, CONST char* display_format);
|
||||
CIMGUI_API bool igSliderInt3(CONST char* label, int v[3], int v_min, int v_max, CONST char* display_format);
|
||||
CIMGUI_API bool igSliderInt4(CONST char* label, int v[4], int v_min, int v_max, CONST char* display_format);
|
||||
CIMGUI_API bool igVSliderFloat(CONST char* label, CONST struct ImVec2 size, float* v, float v_min, float v_max, CONST char* display_format, float power);
|
||||
CIMGUI_API bool igVSliderInt(CONST char* label, CONST struct ImVec2 size, int* v, int v_min, int v_max, CONST char* display_format);
|
||||
|
||||
// Widgets: Drags (tip: ctrl+click on a drag box to input text)
|
||||
CIMGUI_API bool ig_DragFloat(CONST char* label, float* v, float v_speed, float v_min, float v_max, CONST char* display_format, float power); // If v_max >= v_max we have no bound
|
||||
CIMGUI_API bool ig_DragFloat2(CONST char* label, float v[2], float v_speed, float v_min, float v_max, CONST char* display_format, float power);
|
||||
CIMGUI_API bool ig_DragFloat3(CONST char* label, float v[3], float v_speed, float v_min, float v_max, CONST char* display_format, float power);
|
||||
CIMGUI_API bool ig_DragFloat4(CONST char* label, float v[4], float v_speed, float v_min, float v_max, CONST char* display_format, float power);
|
||||
CIMGUI_API bool ig_DragInt(CONST char* label, int* v, float v_speed, int v_min, int v_max, CONST char* display_format); // If v_max >= v_max we have no bound
|
||||
CIMGUI_API bool ig_DragInt2(CONST char* label, int v[2], float v_speed, int v_min, int v_max, CONST char* display_format);
|
||||
CIMGUI_API bool ig_DragInt3(CONST char* label, int v[3], float v_speed, int v_min, int v_max, CONST char* display_format);
|
||||
CIMGUI_API bool ig_DragInt4(CONST char* label, int v[4], float v_speed, int v_min, int v_max, CONST char* display_format);
|
||||
CIMGUI_API bool igDragFloat(CONST char* label, float* v, float v_speed, float v_min, float v_max, CONST char* display_format, float power); // If v_max >= v_max we have no bound
|
||||
CIMGUI_API bool igDragFloat2(CONST char* label, float v[2], float v_speed, float v_min, float v_max, CONST char* display_format, float power);
|
||||
CIMGUI_API bool igDragFloat3(CONST char* label, float v[3], float v_speed, float v_min, float v_max, CONST char* display_format, float power);
|
||||
CIMGUI_API bool igDragFloat4(CONST char* label, float v[4], float v_speed, float v_min, float v_max, CONST char* display_format, float power);
|
||||
CIMGUI_API bool igDragFloatRange2(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);
|
||||
CIMGUI_API bool igDragInt(CONST char* label, int* v, float v_speed, int v_min, int v_max, CONST char* display_format); // If v_max >= v_max we have no bound
|
||||
CIMGUI_API bool igDragInt2(CONST char* label, int v[2], float v_speed, int v_min, int v_max, CONST char* display_format);
|
||||
CIMGUI_API bool igDragInt3(CONST char* label, int v[3], float v_speed, int v_min, int v_max, CONST char* display_format);
|
||||
CIMGUI_API bool igDragInt4(CONST char* label, int v[4], float v_speed, int v_min, int v_max, CONST char* display_format);
|
||||
CIMGUI_API bool igDragIntRange2(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);
|
||||
|
||||
|
||||
// Widgets: Input
|
||||
CIMGUI_API bool ig_InputText(CONST char* label, char* buf, size_t buf_size, ImGuiInputTextFlags flags, ImGuiTextEditCallback callback, void* user_data);
|
||||
CIMGUI_API bool ig_InputTextMultiline(CONST char* label, char* buf, size_t buf_size, CONST ImVec2 size, ImGuiInputTextFlags flags, ImGuiTextEditCallback callback, void* user_data);
|
||||
CIMGUI_API bool ig_InputFloat(CONST char* label, float* v, float step, float step_fast, int decimal_precision, ImGuiInputTextFlags extra_flags);
|
||||
CIMGUI_API bool ig_InputFloat2(CONST char* label, float v[2], int decimal_precision, ImGuiInputTextFlags extra_flags);
|
||||
CIMGUI_API bool ig_InputFloat3(CONST char* label, float v[3], int decimal_precision, ImGuiInputTextFlags extra_flags);
|
||||
CIMGUI_API bool ig_InputFloat4(CONST char* label, float v[4], int decimal_precision, ImGuiInputTextFlags extra_flags);
|
||||
CIMGUI_API bool ig_InputInt(CONST char* label, int* v, int step, int step_fast, ImGuiInputTextFlags extra_flags);
|
||||
CIMGUI_API bool ig_InputInt2(CONST char* label, int v[2], ImGuiInputTextFlags extra_flags);
|
||||
CIMGUI_API bool ig_InputInt3(CONST char* label, int v[3], ImGuiInputTextFlags extra_flags);
|
||||
CIMGUI_API bool ig_InputInt4(CONST char* label, int v[4], ImGuiInputTextFlags extra_flags);
|
||||
CIMGUI_API bool igInputText(CONST char* label, char* buf, size_t buf_size, ImGuiInputTextFlags flags, ImGuiTextEditCallback callback, void* user_data);
|
||||
CIMGUI_API bool igInputTextMultiline(CONST char* label, char* buf, size_t buf_size, CONST ImVec2 size, ImGuiInputTextFlags flags, ImGuiTextEditCallback callback, void* user_data);
|
||||
CIMGUI_API bool igInputFloat(CONST char* label, float* v, float step, float step_fast, int decimal_precision, ImGuiInputTextFlags extra_flags);
|
||||
CIMGUI_API bool igInputFloat2(CONST char* label, float v[2], int decimal_precision, ImGuiInputTextFlags extra_flags);
|
||||
CIMGUI_API bool igInputFloat3(CONST char* label, float v[3], int decimal_precision, ImGuiInputTextFlags extra_flags);
|
||||
CIMGUI_API bool igInputFloat4(CONST char* label, float v[4], int decimal_precision, ImGuiInputTextFlags extra_flags);
|
||||
CIMGUI_API bool igInputInt(CONST char* label, int* v, int step, int step_fast, ImGuiInputTextFlags extra_flags);
|
||||
CIMGUI_API bool igInputInt2(CONST char* label, int v[2], ImGuiInputTextFlags extra_flags);
|
||||
CIMGUI_API bool igInputInt3(CONST char* label, int v[3], ImGuiInputTextFlags extra_flags);
|
||||
CIMGUI_API bool igInputInt4(CONST char* label, int v[4], ImGuiInputTextFlags extra_flags);
|
||||
|
||||
// Widgets: Trees
|
||||
CIMGUI_API bool ig_TreeNode(CONST char* str_label_id);
|
||||
CIMGUI_API bool ig_TreeNodeStr(CONST char* str_id, CONST char* fmt, ...);
|
||||
CIMGUI_API bool ig_TreeNodePtr(CONST void* ptr_id, CONST char* fmt, ...);
|
||||
CIMGUI_API bool ig_TreeNodeStrV(CONST char* str_id, CONST char* fmt, va_list args);
|
||||
CIMGUI_API bool ig_TreeNodePtrV(CONST void* ptr_id, CONST char* fmt, va_list args);
|
||||
CIMGUI_API void ig_TreePushStr(CONST char* str_id);
|
||||
CIMGUI_API void ig_TreePushPtr(CONST void* ptr_id);
|
||||
CIMGUI_API void ig_TreePop();
|
||||
CIMGUI_API void ig_SetNextTreeNodeOpened(bool opened, ImGuiSetCond cond);
|
||||
CIMGUI_API bool igTreeNode(CONST char* str_label_id);
|
||||
CIMGUI_API bool igTreeNodeStr(CONST char* str_id, CONST char* fmt, ...);
|
||||
CIMGUI_API bool igTreeNodePtr(CONST void* ptr_id, CONST char* fmt, ...);
|
||||
CIMGUI_API bool igTreeNodeStrV(CONST char* str_id, CONST char* fmt, va_list args);
|
||||
CIMGUI_API bool igTreeNodePtrV(CONST void* ptr_id, CONST char* fmt, va_list args);
|
||||
CIMGUI_API void igTreePushStr(CONST char* str_id);
|
||||
CIMGUI_API void igTreePushPtr(CONST void* ptr_id);
|
||||
CIMGUI_API void igTreePop();
|
||||
CIMGUI_API void igSetNextTreeNodeOpened(bool opened, ImGuiSetCond cond);
|
||||
|
||||
// Widgets: Selectable / Lists
|
||||
CIMGUI_API bool ig_Selectable(CONST char* label, bool selected, ImGuiSelectableFlags flags, CONST ImVec2 size);
|
||||
CIMGUI_API bool ig_SelectableEx(CONST char* label, bool* p_selected, ImGuiSelectableFlags flags, CONST ImVec2 size);
|
||||
CIMGUI_API bool ig_ListBox(CONST char* label, int* current_item, CONST char** items, int items_count, int height_in_items);
|
||||
CIMGUI_API bool ig_ListBox2(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);
|
||||
CIMGUI_API bool ig_ListBoxHeader(CONST char* label, CONST struct ImVec2 size);
|
||||
CIMGUI_API bool ig_ListBoxHeader2(CONST char* label, int items_count, int height_in_items);
|
||||
CIMGUI_API void ig_ListBoxFooter();
|
||||
|
||||
// Widgets: Menus
|
||||
CIMGUI_API bool ig_BeginMainMenuBar();
|
||||
CIMGUI_API void ig_EndMainMenuBar();
|
||||
CIMGUI_API bool ig_BeginMenuBar();
|
||||
CIMGUI_API void ig_EndMenuBar();
|
||||
CIMGUI_API bool ig_BeginMenu(CONST char* label, bool enabled);
|
||||
CIMGUI_API void ig_EndMenu();
|
||||
CIMGUI_API bool ig_MenuItem(CONST char* label, CONST char* shortcut, bool selected, bool enabled);
|
||||
CIMGUI_API bool ig_MenuItemPtr(CONST char* label, CONST char* shortcut, bool* p_selected, bool enabled);
|
||||
|
||||
CIMGUI_API bool igSelectable(CONST char* label, bool selected, ImGuiSelectableFlags flags, CONST ImVec2 size);
|
||||
CIMGUI_API bool igSelectableEx(CONST char* label, bool* p_selected, ImGuiSelectableFlags flags, CONST ImVec2 size);
|
||||
CIMGUI_API bool igListBox(CONST char* label, int* current_item, CONST char** items, int items_count, int height_in_items);
|
||||
CIMGUI_API bool igListBox2(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);
|
||||
CIMGUI_API bool igListBoxHeader(CONST char* label, CONST struct ImVec2 size);
|
||||
CIMGUI_API bool igListBoxHeader2(CONST char* label, int items_count, int height_in_items);
|
||||
CIMGUI_API void igListBoxFooter();
|
||||
|
||||
// Widgets: Value() Helpers. Output single value in "name: value" format (tip: freely declare your own within the ImGui namespace!)
|
||||
CIMGUI_API void ig_ValueBool(CONST char* prefix, bool b);
|
||||
CIMGUI_API void ig_ValueInt(CONST char* prefix, int v);
|
||||
CIMGUI_API void ig_ValueUInt(CONST char* prefix, unsigned int v);
|
||||
CIMGUI_API void ig_ValueFloat(CONST char* prefix, float v, CONST char* float_format);
|
||||
CIMGUI_API void ig_Color(CONST char* prefix, CONST struct ImVec4 v);
|
||||
CIMGUI_API void ig_Color2(CONST char* prefix, unsigned int v);
|
||||
CIMGUI_API void igValueBool(CONST char* prefix, bool b);
|
||||
CIMGUI_API void igValueInt(CONST char* prefix, int v);
|
||||
CIMGUI_API void igValueUInt(CONST char* prefix, unsigned int v);
|
||||
CIMGUI_API void igValueFloat(CONST char* prefix, float v, CONST char* float_format);
|
||||
CIMGUI_API void igColor(CONST char* prefix, CONST struct ImVec4 v);
|
||||
CIMGUI_API void igColor2(CONST char* prefix, unsigned int v);
|
||||
|
||||
// Tooltip
|
||||
CIMGUI_API void igSetTooltip(CONST char* fmt, ...);
|
||||
CIMGUI_API void igSetTooltipV(CONST char* fmt, va_list args);
|
||||
CIMGUI_API void igBeginTooltip();
|
||||
CIMGUI_API void igEndTooltip();
|
||||
|
||||
// Widgets: Menus
|
||||
CIMGUI_API bool igBeginMainMenuBar();
|
||||
CIMGUI_API void igEndMainMenuBar();
|
||||
CIMGUI_API bool igBeginMenuBar();
|
||||
CIMGUI_API void igEndMenuBar();
|
||||
CIMGUI_API bool igBeginMenu(CONST char* label, bool enabled);
|
||||
CIMGUI_API void igEndMenu();
|
||||
CIMGUI_API bool igMenuItem(CONST char* label, CONST char* shortcut, bool selected, bool enabled);
|
||||
CIMGUI_API bool igMenuItemPtr(CONST char* label, CONST char* shortcut, bool* p_selected, bool enabled);
|
||||
|
||||
// Popup
|
||||
CIMGUI_API void igOpenPopup(CONST char* str_id);
|
||||
CIMGUI_API bool igBeginPopup(CONST char* str_id);
|
||||
CIMGUI_API bool igBeginPopupModal(CONST char* name, bool* p_opened, ImGuiWindowFlags extra_flags);
|
||||
CIMGUI_API bool igBeginPopupContextItem(CONST char* str_id, int mouse_button);
|
||||
CIMGUI_API bool igBeginPopupContextWindow(bool also_over_items, CONST char* str_id, int mouse_button);
|
||||
CIMGUI_API bool igBeginPopupContextVoid(CONST char* str_id, int mouse_button);
|
||||
CIMGUI_API void igEndPopup();
|
||||
CIMGUI_API void igCloseCurrentPopup();
|
||||
|
||||
// Logging: all text output from interface is redirected to tty/file/clipboard. Tree nodes are automatically opened.
|
||||
CIMGUI_API void ig_LogToTTY(int max_depth);
|
||||
CIMGUI_API void ig_LogToFile(int max_depth, CONST char* filename);
|
||||
CIMGUI_API void ig_LogToClipboard(int max_depth);
|
||||
CIMGUI_API void ig_LogFinish();
|
||||
CIMGUI_API void ig_LogButtons();
|
||||
CIMGUI_API void ig_LogText(CONST char* fmt, ...);
|
||||
CIMGUI_API void igLogToTTY(int max_depth);
|
||||
CIMGUI_API void igLogToFile(int max_depth, CONST char* filename);
|
||||
CIMGUI_API void igLogToClipboard(int max_depth);
|
||||
CIMGUI_API void igLogFinish();
|
||||
CIMGUI_API void igLogButtons();
|
||||
CIMGUI_API void igLogText(CONST char* fmt, ...);
|
||||
|
||||
// Utilities
|
||||
CIMGUI_API bool ig_IsItemHovered();
|
||||
CIMGUI_API bool ig_IsItemHoveredRect();
|
||||
CIMGUI_API bool ig_IsItemActive();
|
||||
CIMGUI_API bool ig_IsItemVisible();
|
||||
CIMGUI_API bool ig_IsAnyItemHovered();
|
||||
CIMGUI_API bool ig_IsAnyItemActive();
|
||||
CIMGUI_API void ig_GetItemRectMin(struct ImVec2* pOut);
|
||||
CIMGUI_API void ig_GetItemRectMax(struct ImVec2* pOut);
|
||||
CIMGUI_API void ig_GetItemRectSize(struct ImVec2* pOut);
|
||||
CIMGUI_API bool ig_IsWindowHovered();
|
||||
CIMGUI_API bool ig_IsWindowFocused();
|
||||
CIMGUI_API bool ig_IsRootWindowFocused();
|
||||
CIMGUI_API bool ig_IsRootWindowOrAnyChildFocused();
|
||||
CIMGUI_API bool ig_IsRectVisible(CONST struct ImVec2 item_size);
|
||||
CIMGUI_API bool ig_IsKeyDown(int key_index);
|
||||
CIMGUI_API bool ig_IsKeyPressed(int key_index, bool repeat);
|
||||
CIMGUI_API bool ig_IsKeyReleased(int key_index);
|
||||
CIMGUI_API bool ig_IsMouseDown(int button);
|
||||
CIMGUI_API bool ig_IsMouseClicked(int button, bool repeat);
|
||||
CIMGUI_API bool ig_IsMouseDoubleClicked(int button);
|
||||
CIMGUI_API bool ig_IsMouseReleased(int button);
|
||||
CIMGUI_API bool ig_IsMouseHoveringWindow();
|
||||
CIMGUI_API bool ig_IsMouseHoveringAnyWindow();
|
||||
CIMGUI_API bool ig_IsMouseHoveringRect(CONST struct ImVec2 rect_min, CONST struct ImVec2 rect_max);
|
||||
CIMGUI_API bool ig_IsMouseDragging(int button, float lock_threshold);
|
||||
CIMGUI_API bool ig_IsPosHoveringAnyWindow(CONST struct ImVec2 pos);
|
||||
CIMGUI_API void ig_GetMousePos(struct ImVec2* pOut);
|
||||
CIMGUI_API void ig_GetMouseDragDelta(struct ImVec2* pOut, int button, float lock_threshold);
|
||||
CIMGUI_API void ig_ResetMouseDragDelta(int button);
|
||||
CIMGUI_API ImGuiMouseCursor ig_GetMouseCursor();
|
||||
CIMGUI_API void ig_SetMouseCursor(ImGuiMouseCursor type);
|
||||
CIMGUI_API float ig_GetTime();
|
||||
CIMGUI_API int ig_GetFrameCount();
|
||||
CIMGUI_API CONST char* ig_GetStyleColName(ImGuiCol idx);
|
||||
CIMGUI_API void ig_CalcItemRectClosestPoint(struct ImVec2* pOut, CONST struct ImVec2 pos, bool on_edge, float outward);
|
||||
CIMGUI_API void ig_CalcTextSize(struct ImVec2* pOut, CONST char* text, CONST char* text_end, bool hide_text_after_double_hash, float wrap_width);
|
||||
CIMGUI_API void ig_CalcListClipping(int items_count, float items_height, int* out_items_display_start, int* out_items_display_end);
|
||||
CIMGUI_API bool igIsItemHovered();
|
||||
CIMGUI_API bool igIsItemHoveredRect();
|
||||
CIMGUI_API bool igIsItemActive();
|
||||
CIMGUI_API bool igIsItemVisible();
|
||||
CIMGUI_API bool igIsAnyItemHovered();
|
||||
CIMGUI_API bool igIsAnyItemActive();
|
||||
CIMGUI_API void igGetItemRectMin(struct ImVec2* pOut);
|
||||
CIMGUI_API void igGetItemRectMax(struct ImVec2* pOut);
|
||||
CIMGUI_API void igGetItemRectSize(struct ImVec2* pOut);
|
||||
CIMGUI_API bool igIsWindowHovered();
|
||||
CIMGUI_API bool igIsWindowFocused();
|
||||
CIMGUI_API bool igIsRootWindowFocused();
|
||||
CIMGUI_API bool igIsRootWindowOrAnyChildFocused();
|
||||
CIMGUI_API bool igIsRectVisible(CONST struct ImVec2 item_size);
|
||||
CIMGUI_API bool igIsPosHoveringAnyWindow(CONST struct ImVec2 pos);
|
||||
CIMGUI_API float igGetTime();
|
||||
CIMGUI_API int igGetFrameCount();
|
||||
CIMGUI_API CONST char* igGetStyleColName(ImGuiCol idx);
|
||||
CIMGUI_API void igCalcItemRectClosestPoint(struct ImVec2* pOut, CONST struct ImVec2 pos, bool on_edge, float outward);
|
||||
CIMGUI_API void igCalcTextSize(struct ImVec2* pOut, CONST char* text, CONST char* text_end, bool hide_text_after_double_hash, float wrap_width);
|
||||
CIMGUI_API void igCalcListClipping(int items_count, float items_height, int* out_items_display_start, int* out_items_display_end);
|
||||
|
||||
CIMGUI_API bool ig_BeginChildFrame(ImGuiID id, CONST struct ImVec2 size);
|
||||
CIMGUI_API void ig_EndChildFrame();
|
||||
CIMGUI_API bool igBeginChildFrame(ImGuiID id, CONST struct ImVec2 size, ImGuiWindowFlags extra_flags);
|
||||
CIMGUI_API void igEndChildFrame();
|
||||
|
||||
CIMGUI_API ImU32 ig_ColorConvertFloat4ToU32(CONST struct ImVec4 in);
|
||||
CIMGUI_API void ig_ColorConvertRGBtoHSV(float r, float g, float b, float* out_h, float* out_s, float* out_v);
|
||||
CIMGUI_API void ig_ColorConvertHSVtoRGB(float h, float s, float v, float* out_r, float* out_g, float* out_b);
|
||||
CIMGUI_API void igColorConvertU32ToFloat4(ImVec4* pOut, ImU32 in);
|
||||
CIMGUI_API ImU32 igColorConvertFloat4ToU32(CONST struct ImVec4 in);
|
||||
CIMGUI_API void igColorConvertRGBtoHSV(float r, float g, float b, float* out_h, float* out_s, float* out_v);
|
||||
CIMGUI_API void igColorConvertHSVtoRGB(float h, float s, float v, float* out_r, float* out_g, float* out_b);
|
||||
|
||||
CIMGUI_API bool igIsKeyDown(int key_index);
|
||||
CIMGUI_API bool igIsKeyPressed(int key_index, bool repeat);
|
||||
CIMGUI_API bool igIsKeyReleased(int key_index);
|
||||
CIMGUI_API bool igIsMouseDown(int button);
|
||||
CIMGUI_API bool igIsMouseClicked(int button, bool repeat);
|
||||
CIMGUI_API bool igIsMouseDoubleClicked(int button);
|
||||
CIMGUI_API bool igIsMouseReleased(int button);
|
||||
CIMGUI_API bool igIsMouseHoveringWindow();
|
||||
CIMGUI_API bool igIsMouseHoveringAnyWindow();
|
||||
CIMGUI_API bool igIsMouseHoveringRect(CONST struct ImVec2 pos_min, CONST struct ImVec2 pos_max, bool clip);
|
||||
CIMGUI_API bool igIsMouseDragging(int button, float lock_threshold);
|
||||
CIMGUI_API void igGetMousePos(struct ImVec2* pOut);
|
||||
CIMGUI_API void igGetMousePosOnOpeningCurrentPopup(ImVec2* pOut);
|
||||
CIMGUI_API void igGetMouseDragDelta(struct ImVec2* pOut, int button, float lock_threshold);
|
||||
CIMGUI_API void igResetMouseDragDelta(int button);
|
||||
CIMGUI_API ImGuiMouseCursor igGetMouseCursor();
|
||||
CIMGUI_API void igSetMouseCursor(ImGuiMouseCursor type);
|
||||
CIMGUI_API void igCaptureKeyboardFromApp();
|
||||
CIMGUI_API void igCaptureMouseFromApp();
|
||||
|
||||
// Helpers functions to access functions pointers in ImGui::GetIO()
|
||||
CIMGUI_API void* igMemAlloc(size_t sz);
|
||||
CIMGUI_API void igMemFree(void* ptr);
|
||||
CIMGUI_API const char* igGetClipboardText();
|
||||
CIMGUI_API void igSetClipboardText(const char* text);
|
||||
|
||||
// Internal state access - if you want to share ImGui state between modules (e.g. DLL) or allocate it yourself
|
||||
CIMGUI_API CONST char* ig_GetVersion();
|
||||
CIMGUI_API void* ig_GetInternalState();
|
||||
CIMGUI_API size_t ig_GetInternalStateSize();
|
||||
CIMGUI_API void ig_SetInternalState(void* state, bool construct);
|
||||
CIMGUI_API CONST char* igGetVersion();
|
||||
CIMGUI_API void* igGetInternalState();
|
||||
CIMGUI_API size_t igGetInternalStateSize();
|
||||
CIMGUI_API void igSetInternalState(void* state, bool construct);
|
||||
|
||||
CIMGUI_API void ImFontAtlas_GetTexDataAsRGBA32(ImFontAtlas* atlas, unsigned char** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel);
|
||||
CIMGUI_API void ImFontAtlas_GetTexDataAsAlpha8(ImFontAtlas* atlas, unsigned char** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel);
|
||||
CIMGUI_API void ImFontAtlas_SetTexID(ImFontAtlas* atlas, void* tex);
|
||||
CIMGUI_API ImFont* ImFontAtlas_AddFontDefault(ImFontAtlas* atlas);
|
||||
CIMGUI_API ImFont* ImFontAtlas_AddFontFromFileTTF(ImFontAtlas* atlas, CONST char* filename, float size_pixels, CONST ImWchar* glyph_ranges, int font_no);
|
||||
CIMGUI_API ImFont* ImFontAtlas_AddFontFromMemoryTTF(ImFontAtlas* atlas, void* ttf_data, int ttf_size, float size_pixels, CONST ImWchar* glyph_ranges, int font_no);
|
||||
CIMGUI_API ImFont* ImFontAtlas_AddFontFromMemoryCompressedTTF(ImFontAtlas* atlas, CONST void* compressed_ttf_data, int compressed_ttf_size, float size_pixels, CONST ImWchar* glyph_ranges, int font_no);
|
||||
CIMGUI_API ImFont* ImFontAtlas_AddFont(ImFontAtlas* atlas, CONST ImFontConfig* font_cfg);
|
||||
CIMGUI_API ImFont* ImFontAtlas_AddFontDefault(ImFontAtlas* atlas, CONST ImFontConfig* font_cfg);
|
||||
CIMGUI_API ImFont* ImFontAtlas_AddFontFromFileTTF(ImFontAtlas* atlas, CONST char* filename, float size_pixels, CONST ImFontConfig* font_cfg, CONST ImWchar* glyph_ranges);
|
||||
CIMGUI_API ImFont* ImFontAtlas_AddFontFromMemoryTTF(ImFontAtlas* atlas, void* ttf_data, int ttf_size, float size_pixels, CONST ImFontConfig* font_cfg, CONST ImWchar* glyph_ranges);
|
||||
CIMGUI_API ImFont* ImFontAtlas_AddFontFromMemoryCompressedTTF(ImFontAtlas* atlas, CONST void* compressed_ttf_data, int compressed_ttf_size, float size_pixels, CONST ImFontConfig* font_cfg, CONST ImWchar* glyph_ranges);
|
||||
CIMGUI_API ImFont* ImFontAtlas_AddFontFromMemoryCompressedBase85TTF(ImFontAtlas* atlas, CONST char* compressed_ttf_data_base85, float size_pixels, CONST ImFontConfig* font_cfg, CONST ImWchar* glyph_ranges);
|
||||
CIMGUI_API void ImFontAtlas_ClearTexData(ImFontAtlas* atlas);
|
||||
CIMGUI_API void ImFontAtlas_Clear(ImFontAtlas* atlas);
|
||||
CIMGUI_API void ImFontAtlas_Clear(ImFontAtlas* atlas);
|
||||
|
||||
CIMGUI_API void ImGuiIO_AddInputCharacter(unsigned short c);
|
||||
CIMGUI_API void ImGuiIO_AddInputCharactersUTF8(CONST char* utf8_chars);
|
||||
|
||||
CIMGUI_API int ImDrawList_GetVertexBufferSize(ImDrawList* list);
|
||||
CIMGUI_API ImDrawVert* ImDrawList_GetVertexPtr(ImDrawList* list, int n);
|
||||
CIMGUI_API int ImDrawList_GetIndexBufferSize(ImDrawList* list);
|
||||
CIMGUI_API ImDrawIdx* ImDrawList_GetIndexPtr(ImDrawList* list, int n);
|
||||
CIMGUI_API int ImDrawList_GetCmdSize(ImDrawList* list);
|
||||
CIMGUI_API ImDrawCmd* ImDrawList_GetCmdPtr(ImDrawList* list, int n);
|
||||
CIMGUI_API void ImDrawData_DeIndexAllBuffers(ImDrawData* drawData);
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
@@ -19,13 +19,13 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
@@ -77,11 +77,14 @@
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\imgui\imgui.cpp" />
|
||||
<ClCompile Include="..\imgui\imgui_demo.cpp" />
|
||||
<ClCompile Include="..\imgui\imgui_draw.cpp" />
|
||||
<ClCompile Include="cimgui.cpp" />
|
||||
<ClCompile Include="drawList.cpp" />
|
||||
<ClCompile Include="fontAtlas.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\imgui\imgui_internal.h" />
|
||||
<ClInclude Include="cimgui.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
|
@@ -27,10 +27,19 @@
|
||||
<ClCompile Include="drawList.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\imgui\imgui_draw.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\imgui\imgui_demo.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="cimgui.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\imgui\imgui_internal.h">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
@@ -2,22 +2,37 @@
|
||||
#include "../imgui/imgui.h"
|
||||
#include "cimgui.h"
|
||||
|
||||
EXTERN API int ImDrawList_GetVertexBufferSize(ImDrawList* list)
|
||||
CIMGUI_API int ImDrawList_GetVertexBufferSize(ImDrawList* list)
|
||||
{
|
||||
return list->vtx_buffer.size();
|
||||
return list->VtxBuffer.size();
|
||||
}
|
||||
|
||||
EXTERN API ImDrawVert* ImDrawList_GetVertexPtr(ImDrawList* list, int n)
|
||||
CIMGUI_API ImDrawVert* ImDrawList_GetVertexPtr(ImDrawList* list, int n)
|
||||
{
|
||||
return &list->vtx_buffer[n];
|
||||
return &list->VtxBuffer[n];
|
||||
}
|
||||
|
||||
EXTERN API int ImDrawList_GetCmdSize(ImDrawList* list)
|
||||
CIMGUI_API int ImDrawList_GetIndexBufferSize(ImDrawList* list)
|
||||
{
|
||||
return list->commands.size();
|
||||
return list->IdxBuffer.size();
|
||||
}
|
||||
|
||||
EXTERN API ImDrawCmd* ImDrawList_GetCmdPtr(ImDrawList* list, int n)
|
||||
CIMGUI_API ImDrawIdx* ImDrawList_GetIndexPtr(ImDrawList* list, int n)
|
||||
{
|
||||
return &list->commands[n];
|
||||
return &list->IdxBuffer[n];
|
||||
}
|
||||
|
||||
CIMGUI_API int ImDrawList_GetCmdSize(ImDrawList* list)
|
||||
{
|
||||
return list->CmdBuffer.size();
|
||||
}
|
||||
|
||||
CIMGUI_API ImDrawCmd* ImDrawList_GetCmdPtr(ImDrawList* list, int n)
|
||||
{
|
||||
return &list->CmdBuffer[n];
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawData_DeIndexAllBuffers(ImDrawData* drawData)
|
||||
{
|
||||
return drawData->DeIndexAllBuffers();
|
||||
}
|
@@ -17,24 +17,34 @@ CIMGUI_API void ImFontAtlas_SetTexID(ImFontAtlas* atlas, void* tex)
|
||||
atlas->TexID = tex;
|
||||
}
|
||||
|
||||
CIMGUI_API ImFont* ImFontAtlas_AddFontDefault(ImFontAtlas* atlas)
|
||||
CIMGUI_API ImFont* ImFontAtlas_AddFont(ImFontAtlas* atlas, CONST ImFontConfig* font_cfg)
|
||||
{
|
||||
return atlas->AddFontDefault();
|
||||
return atlas->AddFont(font_cfg);
|
||||
}
|
||||
|
||||
CIMGUI_API ImFont* ImFontAtlas_AddFontFromFileTTF(ImFontAtlas* atlas,CONST char* filename, float size_pixels, CONST ImWchar* glyph_ranges, int font_no)
|
||||
CIMGUI_API ImFont* ImFontAtlas_AddFontDefault(ImFontAtlas* atlas, CONST ImFontConfig* font_cfg)
|
||||
{
|
||||
return atlas->AddFontFromFileTTF(filename, size_pixels, glyph_ranges, font_no);
|
||||
return atlas->AddFontDefault(font_cfg);
|
||||
}
|
||||
|
||||
CIMGUI_API ImFont* ImFontAtlas_AddFontFromMemoryTTF(ImFontAtlas* atlas, void* ttf_data, int ttf_size, float size_pixels, CONST ImWchar* glyph_ranges, int font_no)
|
||||
CIMGUI_API ImFont* ImFontAtlas_AddFontFromFileTTF(ImFontAtlas* atlas,CONST char* filename, float size_pixels, CONST ImFontConfig* font_cfg, CONST ImWchar* glyph_ranges)
|
||||
{
|
||||
return atlas->AddFontFromMemoryTTF(ttf_data, ttf_size, size_pixels, glyph_ranges, font_no);
|
||||
return atlas->AddFontFromFileTTF(filename, size_pixels, font_cfg, glyph_ranges);
|
||||
}
|
||||
|
||||
CIMGUI_API ImFont* ImFontAtlas_AddFontFromMemoryCompressedTTF(ImFontAtlas* atlas, CONST void* compressed_ttf_data, int compressed_ttf_size, float size_pixels, CONST ImWchar* glyph_ranges, int font_no)
|
||||
CIMGUI_API ImFont* ImFontAtlas_AddFontFromMemoryTTF(ImFontAtlas* atlas, void* ttf_data, int ttf_size, float size_pixels, CONST ImFontConfig* font_cfg, CONST ImWchar* glyph_ranges)
|
||||
{
|
||||
return atlas->AddFontFromMemoryCompressedTTF(compressed_ttf_data, compressed_ttf_size, size_pixels, glyph_ranges, font_no);
|
||||
return atlas->AddFontFromMemoryTTF(ttf_data, ttf_size, size_pixels, font_cfg, glyph_ranges);
|
||||
}
|
||||
|
||||
CIMGUI_API ImFont* ImFontAtlas_AddFontFromMemoryCompressedTTF(ImFontAtlas* atlas, CONST void* compressed_ttf_data, int compressed_ttf_size, float size_pixels, CONST ImFontConfig* font_cfg, CONST ImWchar* glyph_ranges)
|
||||
{
|
||||
return atlas->AddFontFromMemoryCompressedTTF(compressed_ttf_data, compressed_ttf_size, size_pixels, font_cfg, glyph_ranges);
|
||||
}
|
||||
|
||||
CIMGUI_API ImFont* ImFontAtlas_AddFontFromMemoryCompressedBase85TTF(ImFontAtlas* atlas, CONST char* compressed_ttf_data_base85, float size_pixels, CONST ImFontConfig* font_cfg, CONST ImWchar* glyph_ranges)
|
||||
{
|
||||
return atlas->AddFontFromMemoryCompressedBase85TTF(compressed_ttf_data_base85, size_pixels, font_cfg, glyph_ranges);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImFontAtlas_ClearTexData(ImFontAtlas* atlas)
|
||||
|
2
imgui
2
imgui
Submodule imgui updated: f66be0e7b2...72dde4d323
Reference in New Issue
Block a user