Compare commits

..

9 Commits
v1.47 ... v1.49

Author SHA1 Message Date
Stephan Dilly
b99ed85fb9 fix all left over problems to build as pure C header 2016-06-06 00:41:14 +02:00
Stephan Dilly
b647142cf5 update to imgui 1.49 2016-06-05 13:19:34 +02:00
Stephan Dilly
00a9d14f34 Merge branch 'master' of https://github.com/Extrawurst/cimgui 2016-05-19 13:10:44 -07:00
Stephan Dilly
f4c0403f12 add default constructor wrapper for ImFontConfig (closes #14) 2016-05-19 13:10:37 -07:00
Stephan Dilly
1a57048f62 Update README.md 2016-05-09 19:22:15 +02:00
Stephan Dilly
9a7e7a2d28 removed some default parameters
as was pointed out to me in the most delightful way, this is not c compatible :D
2016-05-09 19:20:06 +02:00
Stephan Dilly
106686a212 update to imgui v1.48 2016-04-10 11:53:30 +02:00
Stephan Dilly
4d7868529d Update README.md 2016-02-09 09:02:25 +01:00
Stephan Dilly
d358ce52f2 Update README.md 2015-12-26 15:32:24 +01:00
6 changed files with 387 additions and 209 deletions

View File

@@ -1,14 +1,13 @@
# cimgui [![Build Status](https://travis-ci.org/Extrawurst/cimgui.svg)](https://travis-ci.org/Extrawurst/cimgui)
![sample](https://raw.github.com/extrawurst/cimgui/master/Screen Shot 2015-04-09.png)
![new menus api](https://raw.github.com/extrawurst/cimgui/master/menus-api.gif)
This is a thin c-api wrapper for the excellent C++ intermediate gui [imgui](https://github.com/ocornut/imgui).
Most of the functions have wrapper counterparts now, missing stuff is added on a as-needed basis (PR welcome).
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.46 of imgui](https://github.com/ocornut/imgui/releases/tag/v1.46)
* currently this wrapper is based on version [1.49 of imgui](https://github.com/ocornut/imgui/releases/tag/v1.49)
* 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

View File

@@ -119,21 +119,6 @@ CIMGUI_API ImDrawList* igGetWindowDrawList()
return ImGui::GetWindowDrawList();
}
CIMGUI_API ImFont* igGetWindowFont()
{
return ImGui::GetWindowFont();
}
CIMGUI_API float igGetWindowFontSize()
{
return ImGui::GetWindowFontSize();
}
CIMGUI_API void igSetWindowFontScale(float scale)
{
ImGui::SetWindowFontScale(scale);
}
CIMGUI_API void igGetWindowPos(ImVec2* out)
{
*out = ImGui::GetWindowPos();
@@ -159,6 +144,11 @@ CIMGUI_API bool igIsWindowCollapsed()
return ImGui::IsWindowCollapsed();
}
CIMGUI_API void igSetWindowFontScale(float scale)
{
ImGui::SetWindowFontScale(scale);
}
CIMGUI_API void igSetNextWindowPos(CONST ImVec2 pos, ImGuiSetCond cond)
{
ImGui::SetNextWindowPos(pos, cond);
@@ -174,6 +164,11 @@ CIMGUI_API void igSetNextWindowSize(CONST ImVec2 size, ImGuiSetCond cond)
ImGui::SetNextWindowSize(size, cond);
}
CIMGUI_API void igSetNextWindowSizeConstraints(CONST struct ImVec2 size_min, CONST struct ImVec2 size_max, ImGuiSizeConstraintCallback custom_callback, void* custom_callback_data)
{
ImGui::SetNextWindowSizeConstraints(size_min, size_max, custom_callback, custom_callback_data);
}
CIMGUI_API void igSetNextWindowContentSize(CONST ImVec2 size)
{
ImGui::SetNextWindowContentSize(size);
@@ -325,6 +320,21 @@ CIMGUI_API void igPopStyleVar(int count)
return ImGui::PopStyleVar(count);
}
CIMGUI_API ImFont* igGetFont()
{
return ImGui::GetFont();
}
CIMGUI_API float igGetFontSize()
{
return ImGui::GetFontSize();
}
CIMGUI_API void igGetFontTexUvWhitePixel(ImVec2* pOut)
{
*pOut = ImGui::GetFontTexUvWhitePixel();
}
CIMGUI_API ImU32 igGetColorU32(ImGuiCol idx, float alpha_mul)
{
return ImGui::GetColorU32(idx,alpha_mul);
@@ -416,9 +426,9 @@ CIMGUI_API bool igBeginPopup(CONST char* str_id)
return ImGui::BeginPopup(str_id);
}
CIMGUI_API bool igBeginPopupModal(CONST char* name, bool* p_opened, ImGuiWindowFlags extra_flags)
CIMGUI_API bool igBeginPopupModal(CONST char* name, bool* p_open, ImGuiWindowFlags extra_flags)
{
return ImGui::BeginPopupModal(name, p_opened, extra_flags);
return ImGui::BeginPopupModal(name, p_open, extra_flags);
}
CIMGUI_API bool igBeginPopupContextItem(CONST char* str_id, int mouse_button)
@@ -447,24 +457,20 @@ CIMGUI_API void igCloseCurrentPopup()
}
// Layout
CIMGUI_API void igBeginGroup()
{
return ImGui::BeginGroup();
}
CIMGUI_API void igEndGroup()
{
return ImGui::EndGroup();
}
CIMGUI_API void igSeparator()
{
return ImGui::Separator();
}
CIMGUI_API void igSameLine(float local_pos_x, float spacing_w)
CIMGUI_API void igSameLine(float pos_x, float spacing_w)
{
return ImGui::SameLine(local_pos_x, spacing_w);
return ImGui::SameLine(pos_x, spacing_w);
}
CIMGUI_API void igNewLine()
{
return ImGui::NewLine();
}
CIMGUI_API void igSpacing()
@@ -477,49 +483,24 @@ CIMGUI_API void igDummy(CONST ImVec2* size)
return ImGui::Dummy(*size);
}
CIMGUI_API void igIndent()
CIMGUI_API void igIndent(float indent_w)
{
return ImGui::Indent();
return ImGui::Indent(indent_w);
}
CIMGUI_API void igUnindent()
CIMGUI_API void igUnindent(float indent_w)
{
return ImGui::Unindent();
return ImGui::Unindent(indent_w);
}
CIMGUI_API void igColumns(int count, CONST char* id, bool border)
CIMGUI_API void igBeginGroup()
{
return ImGui::Columns(count, id, border);
return ImGui::BeginGroup();
}
CIMGUI_API void igNextColumn()
CIMGUI_API void igEndGroup()
{
return ImGui::NextColumn();
}
CIMGUI_API int igGetColumnIndex()
{
return ImGui::GetColumnIndex();
}
CIMGUI_API float igGetColumnOffset(int column_index)
{
return ImGui::GetColumnOffset(column_index);
}
CIMGUI_API void igSetColumnOffset(int column_index, float offset_x)
{
return ImGui::SetColumnOffset(column_index, offset_x);
}
CIMGUI_API float igGetColumnWidth(int column_index)
{
return ImGui::GetColumnWidth(column_index);
}
CIMGUI_API int igGetColumnsCount()
{
return ImGui::GetColumnsCount();
return ImGui::EndGroup();
}
CIMGUI_API void igGetCursorPos(ImVec2* pOut)
@@ -587,6 +568,43 @@ CIMGUI_API float igGetItemsLineHeightWithSpacing()
return ImGui::GetItemsLineHeightWithSpacing();
}
//Columns
CIMGUI_API void igColumns(int count, CONST char* id, bool border)
{
return ImGui::Columns(count, id, border);
}
CIMGUI_API void igNextColumn()
{
return ImGui::NextColumn();
}
CIMGUI_API int igGetColumnIndex()
{
return ImGui::GetColumnIndex();
}
CIMGUI_API float igGetColumnOffset(int column_index)
{
return ImGui::GetColumnOffset(column_index);
}
CIMGUI_API void igSetColumnOffset(int column_index, float offset_x)
{
return ImGui::SetColumnOffset(column_index, offset_x);
}
CIMGUI_API float igGetColumnWidth(int column_index)
{
return ImGui::GetColumnWidth(column_index);
}
CIMGUI_API int igGetColumnsCount()
{
return ImGui::GetColumnsCount();
}
// 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')
@@ -745,11 +763,6 @@ CIMGUI_API bool igImageButton(ImTextureID user_texture_id, CONST ImVec2 size, CO
return ImGui::ImageButton(user_texture_id, size, uv0, uv1, frame_padding, bg_col, tint_col);
}
CIMGUI_API bool igCollapsingHeader(CONST char* label, CONST char* str_id, bool display_frame, bool default_open)
{
return ImGui::CollapsingHeader(label, str_id, display_frame, default_open);
}
CIMGUI_API bool igCheckbox(CONST char* label, bool* v)
{
return ImGui::Checkbox(label, v);
@@ -990,9 +1003,9 @@ CIMGUI_API bool igInputInt4(CONST char* label, int v[4], ImGuiInputTextFlags ext
// Widgets: Trees
CIMGUI_API bool igTreeNode(CONST char* str_label_id)
CIMGUI_API bool igTreeNode(CONST char* label)
{
return ImGui::TreeNode(str_label_id);
return ImGui::TreeNode(label);
}
CIMGUI_API bool igTreeNodeStr(CONST char* str_id, CONST char* fmt, ...)
@@ -1025,6 +1038,41 @@ CIMGUI_API bool igTreeNodePtrV(CONST void* ptr_id, CONST char* fmt, va_list args
return ImGui::TreeNodeV(ptr_id, fmt, args);
}
CIMGUI_API bool igTreeNodeEx(CONST char* label, ImGuiTreeNodeFlags flags)
{
return ImGui::TreeNodeEx(label, flags);
}
CIMGUI_API bool igTreeNodeExStr(CONST char* str_id, ImGuiTreeNodeFlags flags, CONST char* fmt, ...)
{
va_list args;
va_start(args, fmt);
bool res = ImGui::TreeNodeExV(str_id, flags, fmt, args);
va_end(args);
return res;
}
CIMGUI_API bool igTreeNodeExPtr(CONST void* ptr_id, ImGuiTreeNodeFlags flags, CONST char* fmt, ...)
{
va_list args;
va_start(args, fmt);
bool res = ImGui::TreeNodeExV(ptr_id, flags, fmt, args);
va_end(args);
return res;
}
CIMGUI_API bool igTreeNodeExV(CONST char* str_id, ImGuiTreeNodeFlags flags, CONST char* fmt, va_list args)
{
return ImGui::TreeNodeExV(str_id,flags,fmt,args);
}
CIMGUI_API bool igTreeNodeExVPtr(CONST void* ptr_id, ImGuiTreeNodeFlags flags, CONST char* fmt, va_list args)
{
return ImGui::TreeNodeExV(ptr_id,flags,fmt,args);
}
CIMGUI_API void igTreePushStr(CONST char* str_id)
{
return ImGui::TreePush(str_id);
@@ -1040,9 +1088,29 @@ CIMGUI_API void igTreePop()
return ImGui::TreePop();
}
CIMGUI_API void igSetNextTreeNodeOpened(bool opened, ImGuiSetCond cond)
CIMGUI_API void igTreeAdvanceToLabelPos()
{
return ImGui::SetNextTreeNodeOpened(opened, cond);
return ImGui::TreeAdvanceToLabelPos();
}
CIMGUI_API float igGetTreeNodeToLabelSpacing()
{
return ImGui::GetTreeNodeToLabelSpacing();
}
CIMGUI_API void igSetNextTreeNodeOpen(bool opened, ImGuiSetCond cond)
{
return ImGui::SetNextTreeNodeOpen(opened, cond);
}
CIMGUI_API bool igCollapsingHeader(CONST char* label, ImGuiTreeNodeFlags flags)
{
return ImGui::CollapsingHeader(label, flags);
}
CIMGUI_API bool igCollapsingHeaderEx(CONST char* label, bool* p_open, ImGuiTreeNodeFlags flags)
{
return ImGui::CollapsingHeader(label,p_open,flags);
}
// Widgets: Selectable / Lists
@@ -1189,6 +1257,16 @@ CIMGUI_API void igLogText(CONST char* fmt, ...)
ImGui::LogText("%s",buffer);
}
CIMGUI_API void igPushClipRect(CONST struct ImVec2 clip_rect_min, CONST struct ImVec2 clip_rect_max, bool intersect_with_current_clip_rect)
{
return ImGui::PushClipRect(clip_rect_min, clip_rect_max, intersect_with_current_clip_rect);
}
CIMGUI_API void igPopClipRect()
{
return ImGui::PopClipRect();
}
// Utilities
CIMGUI_API bool igIsItemHovered()
{
@@ -1205,6 +1283,11 @@ CIMGUI_API bool igIsItemActive()
return ImGui::IsItemActive();
}
CIMGUI_API bool igIsItemClicked(int mouse_button)
{
return ImGui::IsItemClicked(mouse_button);
}
CIMGUI_API bool igIsItemVisible()
{
return ImGui::IsItemVisible();
@@ -1235,6 +1318,11 @@ CIMGUI_API void igGetItemRectSize(ImVec2* pOut)
*pOut = ImGui::GetItemRectSize();
}
CIMGUI_API void igSetItemAllowOverlap()
{
ImGui::SetItemAllowOverlap();
}
CIMGUI_API bool igIsWindowHovered()
{
return ImGui::IsWindowHovered();
@@ -1255,6 +1343,11 @@ CIMGUI_API bool igIsRootWindowOrAnyChildFocused()
return ImGui::IsRootWindowOrAnyChildFocused();
}
CIMGUI_API bool igIsRootWindowOrAnyChildHovered()
{
return ImGui::IsRootWindowOrAnyChildHovered();
}
CIMGUI_API bool igIsRectVisible(CONST ImVec2 item_size)
{
return ImGui::IsRectVisible(item_size);
@@ -1310,9 +1403,9 @@ CIMGUI_API bool igIsMouseHoveringAnyWindow()
return ImGui::IsMouseHoveringAnyWindow();
}
CIMGUI_API bool igIsMouseHoveringRect(CONST ImVec2 pos_min, CONST ImVec2 pos_max, bool clip)
CIMGUI_API bool igIsMouseHoveringRect(CONST ImVec2 r_min, CONST ImVec2 r_max, bool clip)
{
return ImGui::IsMouseHoveringRect(pos_min,pos_max,clip);
return ImGui::IsMouseHoveringRect(r_min,r_max,clip);
}
CIMGUI_API bool igIsMouseDragging(int button, float lock_threshold)
@@ -1354,14 +1447,14 @@ CIMGUI_API void igSetMouseCursor(ImGuiMouseCursor type)
ImGui::SetMouseCursor(type);
}
CIMGUI_API void igCaptureKeyboardFromApp()
CIMGUI_API void igCaptureKeyboardFromApp(bool capture)
{
return ImGui::CaptureKeyboardFromApp();
return ImGui::CaptureKeyboardFromApp(capture);
}
CIMGUI_API void igCaptureMouseFromApp()
CIMGUI_API void igCaptureMouseFromApp(bool capture)
{
return ImGui::CaptureMouseFromApp();
return ImGui::CaptureMouseFromApp(capture);
}
CIMGUI_API void* igMemAlloc(size_t sz)
@@ -1449,19 +1542,24 @@ CIMGUI_API CONST char* igGetVersion()
return ImGui::GetVersion();
}
CIMGUI_API void* igGetInternalState()
CIMGUI_API ImGuiContext* igCreateContext(void* (*malloc_fn)(size_t), void (*free_fn)(void*))
{
return ImGui::GetInternalState();
return ImGui::CreateContext(malloc_fn,free_fn);
}
CIMGUI_API size_t igGetInternalStateSize()
CIMGUI_API void igDestroyContext(ImGuiContext* ctx)
{
return ImGui::GetInternalStateSize();
return ImGui::DestroyContext(ctx);
}
CIMGUI_API void igSetInternalState(void* state, bool construct)
CIMGUI_API ImGuiContext* igGetCurrentContext()
{
ImGui::SetInternalState(state, construct);
return ImGui::GetCurrentContext();
}
CIMGUI_API void igSetCurrentContext(ImGuiContext* ctx)
{
return ImGui::SetCurrentContext(ctx);
}
CIMGUI_API void ImGuiIO_AddInputCharacter(unsigned short c)

View File

@@ -19,24 +19,53 @@
#define CIMGUI_API EXTERN API
#define CONST const
typedef int ImGuiWindowFlags;
typedef int ImGuiSetCond;
typedef int ImGuiColorEditMode;
struct ImGuiIO;
struct ImGuiStyle;
struct ImDrawData;
struct ImVec2;
struct ImVec4;
struct ImGuiTextEditCallbackData;
struct ImGuiSizeConstraintCallbackData;
struct ImDrawList;
struct ImGuiStorage;
struct ImFont;
struct ImFontConfig;
struct ImFontAtlas;
struct ImDrawCmd;
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);
typedef unsigned int ImU32;
typedef unsigned short ImWchar;
typedef void* ImTextureID;
typedef ImU32 ImGuiID;
typedef int ImGuiCol;
typedef int ImGuiStyleVar;
typedef int ImGuiKey;
typedef int ImGuiAlign;
typedef int ImGuiColorEditMode;
typedef int ImGuiMouseCursor;
typedef int ImGuiWindowFlags;
typedef int ImGuiSetCond;
typedef int ImGuiInputTextFlags;
typedef int ImGuiSelectableFlags;
typedef int ImGuiTreeNodeFlags;
typedef int (*ImGuiTextEditCallback)(struct ImGuiTextEditCallbackData *data);
typedef void (*ImGuiSizeConstraintCallback)(struct ImGuiSizeConstraintCallbackData* data);
typedef void (*ImDrawCallback)(CONST struct ImDrawList* parent_list, CONST struct ImDrawCmd* cmd);
CIMGUI_API struct ImGuiIO* igGetIO();
CIMGUI_API struct ImGuiStyle* igGetStyle();
CIMGUI_API struct ImDrawData* igGetDrawData();
CIMGUI_API void igNewFrame();
CIMGUI_API void igRender();
CIMGUI_API void igShutdown();
CIMGUI_API void igShowUserGuide();
CIMGUI_API void igShowStyleEditor(struct ImGuiStyle* ref);
CIMGUI_API void igShowTestWindow(bool* opened);
CIMGUI_API void igShowMetricsWindow(bool* opened);
// Window
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 bool igBegin(CONST char* name, bool* p_open, ImGuiWindowFlags flags);
CIMGUI_API bool igBegin2(CONST char* name, bool* p_open, 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);
@@ -47,20 +76,19 @@ 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 struct ImDrawList* igGetWindowDrawList();
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 igSetWindowFontScale(float scale);
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 igSetNextWindowSizeConstraints(CONST struct ImVec2 size_min, CONST struct ImVec2 size_max, ImGuiSizeConstraintCallback custom_callback, void* custom_callback_data);
CIMGUI_API void igSetNextWindowContentSize(CONST struct ImVec2 size);
CIMGUI_API void igSetNextWindowContentWidth(float width);
CIMGUI_API void igSetNextWindowCollapsed(bool collapsed, ImGuiSetCond cond);
CIMGUI_API void igSetNextWindowFocus();
@@ -79,22 +107,25 @@ 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 igSetScrollHere(float center_y_ratio);
CIMGUI_API void igSetScrollFromPosY(float pos_y, float center_y_ratio);
CIMGUI_API void igSetKeyboardFocusHere(int offset);
CIMGUI_API void igSetStateStorage(ImGuiStorage* tree);
CIMGUI_API ImGuiStorage* igGetStateStorage();
CIMGUI_API void igSetStateStorage(struct ImGuiStorage* tree);
CIMGUI_API struct ImGuiStorage* igGetStateStorage();
// Parameters stacks (shared)
CIMGUI_API void igPushFont(ImFont* font);
CIMGUI_API void igPushFont(struct 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);
CIMGUI_API struct ImFont* igGetFont();
CIMGUI_API float igGetFontSize();
CIMGUI_API void igGetFontTexUvWhitePixel(struct ImVec2* pOut);
CIMGUI_API ImU32 igGetColorU32(ImGuiCol idx, float alpha_mul);
CIMGUI_API ImU32 igGetColorU32Vec(CONST ImVec4* col);
CIMGUI_API ImU32 igGetColorU32Vec(CONST struct ImVec4* col);
// Parameters stacks (current window)
@@ -109,21 +140,15 @@ CIMGUI_API void igPushButtonRepeat(bool repeat);
CIMGUI_API void igPopButtonRepeat();
// Layout
CIMGUI_API void igSeparator();
CIMGUI_API void igSameLine(float pos_x, float spacing_w);
CIMGUI_API void igNewLine();
CIMGUI_API void igSpacing();
CIMGUI_API void igDummy(CONST struct ImVec2* size);
CIMGUI_API void igIndent(float indent_w);
CIMGUI_API void igUnindent(float indent_w);
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();
@@ -138,6 +163,15 @@ CIMGUI_API float igGetTextLineHeight();
CIMGUI_API float igGetTextLineHeightWithSpacing();
CIMGUI_API float igGetItemsLineHeightWithSpacing();
//Columns
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();
// 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')
@@ -170,7 +204,6 @@ 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);
@@ -186,7 +219,7 @@ CIMGUI_API void igPlotLines(CONST char* label, CONST float* values,
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);
CIMGUI_API void igProgressBar(float fraction, CONST ImVec2* size_arg, const char* overlay);
CIMGUI_API void igProgressBar(float fraction, CONST struct ImVec2* size_arg, CONST char* overlay);
// Widgets: Sliders (tip: ctrl+click on a slider to input text)
@@ -207,17 +240,17 @@ CIMGUI_API bool igDragFloat(CONST char* label, float* v, float v_spe
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 igDragFloatRange2(CONST char* label, float* v_current_min, float* v_current_max, float v_speed, float v_min, float v_max, CONST char* display_format, CONST char* display_format_max, float power);
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);
CIMGUI_API bool igDragIntRange2(CONST char* label, int* v_current_min, int* v_current_max, float v_speed, int v_min, int v_max, CONST char* display_format, CONST char* display_format_max);
// Widgets: Input
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 igInputTextMultiline(CONST char* label, char* buf, size_t buf_size, CONST struct 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);
@@ -228,19 +261,28 @@ CIMGUI_API bool igInputInt3(CONST char* label, int v[3], ImGuiInputT
CIMGUI_API bool igInputInt4(CONST char* label, int v[4], ImGuiInputTextFlags extra_flags);
// Widgets: Trees
CIMGUI_API bool igTreeNode(CONST char* str_label_id);
CIMGUI_API bool igTreeNode(CONST char* label);
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 bool igTreeNodeEx(CONST char* label, ImGuiTreeNodeFlags flags);
CIMGUI_API bool igTreeNodeExStr(CONST char* str_id, ImGuiTreeNodeFlags flags, CONST char* fmt, ...);
CIMGUI_API bool igTreeNodeExPtr(CONST void* ptr_id, ImGuiTreeNodeFlags flags, CONST char* fmt, ...);
CIMGUI_API bool igTreeNodeExV(CONST char* str_id, ImGuiTreeNodeFlags flags, CONST char* fmt, va_list args);
CIMGUI_API bool igTreeNodeExVPtr(CONST void* ptr_id, ImGuiTreeNodeFlags flags, 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);
CIMGUI_API void igTreeAdvanceToLabelPos();
CIMGUI_API float igGetTreeNodeToLabelSpacing();
CIMGUI_API void igSetNextTreeNodeOpen(bool opened, ImGuiSetCond cond);
CIMGUI_API bool igCollapsingHeader(CONST char* label, ImGuiTreeNodeFlags flags);
CIMGUI_API bool igCollapsingHeaderEx(CONST char* label, bool* p_open, ImGuiTreeNodeFlags flags);
// Widgets: Selectable / Lists
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 igSelectable(CONST char* label, bool selected, ImGuiSelectableFlags flags, CONST struct ImVec2 size);
CIMGUI_API bool igSelectableEx(CONST char* label, bool* p_selected, ImGuiSelectableFlags flags, CONST struct 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);
@@ -274,7 +316,7 @@ CIMGUI_API bool igMenuItemPtr(CONST char* label, CONST char* shortcu
// 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 igBeginPopupModal(CONST char* name, bool* p_open, 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);
@@ -289,20 +331,27 @@ CIMGUI_API void igLogFinish();
CIMGUI_API void igLogButtons();
CIMGUI_API void igLogText(CONST char* fmt, ...);
// Clipping
CIMGUI_API void igPushClipRect(CONST struct ImVec2 clip_rect_min, CONST struct ImVec2 clip_rect_max, bool intersect_with_current_clip_rect);
CIMGUI_API void igPopClipRect();
// Utilities
CIMGUI_API bool igIsItemHovered();
CIMGUI_API bool igIsItemHoveredRect();
CIMGUI_API bool igIsItemActive();
CIMGUI_API bool igIsItemClicked(int mouse_button);
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 void igSetItemAllowOverlap();
CIMGUI_API bool igIsWindowHovered();
CIMGUI_API bool igIsWindowFocused();
CIMGUI_API bool igIsRootWindowFocused();
CIMGUI_API bool igIsRootWindowOrAnyChildFocused();
CIMGUI_API bool igIsRootWindowOrAnyChildHovered();
CIMGUI_API bool igIsRectVisible(CONST struct ImVec2 item_size);
CIMGUI_API bool igIsPosHoveringAnyWindow(CONST struct ImVec2 pos);
CIMGUI_API float igGetTime();
@@ -315,7 +364,7 @@ CIMGUI_API void igCalcListClipping(int items_count, float items_heig
CIMGUI_API bool igBeginChildFrame(ImGuiID id, CONST struct ImVec2 size, ImGuiWindowFlags extra_flags);
CIMGUI_API void igEndChildFrame();
CIMGUI_API void igColorConvertU32ToFloat4(ImVec4* pOut, ImU32 in);
CIMGUI_API void igColorConvertU32ToFloat4(struct 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);
@@ -330,16 +379,16 @@ 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 igIsMouseHoveringRect(CONST struct ImVec2 r_min, CONST struct ImVec2 r_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 igGetMousePosOnOpeningCurrentPopup(struct 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();
CIMGUI_API void igCaptureKeyboardFromApp(bool capture);
CIMGUI_API void igCaptureMouseFromApp(bool capture);
// Helpers functions to access functions pointers in ImGui::GetIO()
CIMGUI_API void* igMemAlloc(size_t sz);
@@ -348,87 +397,94 @@ 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* igGetVersion();
CIMGUI_API void* igGetInternalState();
CIMGUI_API size_t igGetInternalStateSize();
CIMGUI_API void igSetInternalState(void* state, bool construct);
CIMGUI_API CONST char* igGetVersion();
CIMGUI_API struct ImGuiContext* igCreateContext(void* (*malloc_fn)(size_t), void (*free_fn)(void*));
CIMGUI_API void igDestroyContext(struct ImGuiContext* ctx);
CIMGUI_API struct ImGuiContext* igGetCurrentContext();
CIMGUI_API void igSetCurrentContext(struct ImGuiContext* ctx);
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_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 ImFontConfig_DefaultConstructor(struct ImFontConfig* config);
CIMGUI_API void ImFontAtlas_GetTexDataAsRGBA32(struct ImFontAtlas* atlas, unsigned char** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel);
CIMGUI_API void ImFontAtlas_GetTexDataAsAlpha8(struct ImFontAtlas* atlas, unsigned char** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel);
CIMGUI_API void ImFontAtlas_SetTexID(struct ImFontAtlas* atlas, void* tex);
CIMGUI_API struct ImFont* ImFontAtlas_AddFont(struct ImFontAtlas* atlas, CONST struct ImFontConfig* font_cfg);
CIMGUI_API struct ImFont* ImFontAtlas_AddFontDefault(struct ImFontAtlas* atlas, CONST struct ImFontConfig* font_cfg);
CIMGUI_API struct ImFont* ImFontAtlas_AddFontFromFileTTF(struct ImFontAtlas* atlas, CONST char* filename, float size_pixels, CONST struct ImFontConfig* font_cfg, CONST ImWchar* glyph_ranges);
CIMGUI_API struct ImFont* ImFontAtlas_AddFontFromMemoryTTF(struct ImFontAtlas* atlas, void* ttf_data, int ttf_size, float size_pixels, CONST struct ImFontConfig* font_cfg, CONST ImWchar* glyph_ranges);
CIMGUI_API struct ImFont* ImFontAtlas_AddFontFromMemoryCompressedTTF(struct ImFontAtlas* atlas, CONST void* compressed_ttf_data, int compressed_ttf_size, float size_pixels, CONST struct ImFontConfig* font_cfg, CONST ImWchar* glyph_ranges);
CIMGUI_API struct ImFont* ImFontAtlas_AddFontFromMemoryCompressedBase85TTF(struct ImFontAtlas* atlas, CONST char* compressed_ttf_data_base85, float size_pixels, CONST struct ImFontConfig* font_cfg, CONST ImWchar* glyph_ranges);
CIMGUI_API void ImFontAtlas_ClearTexData(struct ImFontAtlas* atlas);
CIMGUI_API void ImFontAtlas_Clear(struct ImFontAtlas* atlas);
CIMGUI_API void ImGuiIO_AddInputCharacter(unsigned short c);
CIMGUI_API void ImGuiIO_AddInputCharactersUTF8(CONST char* utf8_chars);
CIMGUI_API void ImGuiIO_ClearInputCharacters();
//ImDrawData
CIMGUI_API void ImDrawData_DeIndexAllBuffers(ImDrawData* drawData);
CIMGUI_API void ImDrawData_DeIndexAllBuffers(struct ImDrawData* drawData);
//ImDrawList
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 int ImDrawList_GetVertexBufferSize(struct ImDrawList* list);
CIMGUI_API struct ImDrawVert* ImDrawList_GetVertexPtr(struct ImDrawList* list, int n);
CIMGUI_API int ImDrawList_GetIndexBufferSize(struct ImDrawList* list);
CIMGUI_API struct ImDrawIdx* ImDrawList_GetIndexPtr(struct ImDrawList* list, int n);
CIMGUI_API int ImDrawList_GetCmdSize(struct ImDrawList* list);
CIMGUI_API struct ImDrawCmd* ImDrawList_GetCmdPtr(struct ImDrawList* list, int n);
CIMGUI_API void ImDrawList_Clear(ImDrawList* list);
CIMGUI_API void ImDrawList_ClearFreeMemory(ImDrawList* list);
CIMGUI_API void ImDrawList_PushClipRect(ImDrawList* list, CONST struct ImVec4 clip_rect); // Scissoring. The values are x1, y1, x2, y2.
CIMGUI_API void ImDrawList_PushClipRectFullScreen(ImDrawList* list);
CIMGUI_API void ImDrawList_PopClipRect(ImDrawList* list);
CIMGUI_API void ImDrawList_PushTextureID(ImDrawList* list, CONST ImTextureID texture_id);
CIMGUI_API void ImDrawList_PopTextureID(ImDrawList* list);
CIMGUI_API void ImDrawList_Clear(struct ImDrawList* list);
CIMGUI_API void ImDrawList_ClearFreeMemory(struct ImDrawList* list);
CIMGUI_API void ImDrawList_PushClipRect(struct ImDrawList* list, struct ImVec2 clip_rect_min, struct ImVec2 clip_rect_max, bool intersect_with_current_clip_rect);
CIMGUI_API void ImDrawList_PushClipRectFullScreen(struct ImDrawList* list);
CIMGUI_API void ImDrawList_PopClipRect(struct ImDrawList* list);
CIMGUI_API void ImDrawList_PushTextureID(struct ImDrawList* list, CONST ImTextureID texture_id);
CIMGUI_API void ImDrawList_PopTextureID(struct ImDrawList* list);
// Primitives
CIMGUI_API void ImDrawList_AddLine(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, ImU32 col, float thickness);
CIMGUI_API void ImDrawList_AddRect(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, ImU32 col, float rounding, int rounding_corners);
CIMGUI_API void ImDrawList_AddRectFilled(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, ImU32 col, float rounding, int rounding_corners);
CIMGUI_API void ImDrawList_AddRectFilledMultiColor(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, ImU32 col_upr_left, ImU32 col_upr_right, ImU32 col_bot_right, ImU32 col_bot_left);
CIMGUI_API void ImDrawList_AddTriangleFilled(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, CONST struct ImVec2 c, ImU32 col);
CIMGUI_API void ImDrawList_AddCircle(ImDrawList* list, CONST struct ImVec2 centre, float radius, ImU32 col, int num_segments);
CIMGUI_API void ImDrawList_AddCircleFilled(ImDrawList* list, CONST struct ImVec2 centre, float radius, ImU32 col, int num_segments);
CIMGUI_API void ImDrawList_AddText(ImDrawList* list, CONST struct ImVec2 pos, ImU32 col, CONST char* text_begin, CONST char* text_end);
CIMGUI_API void ImDrawList_AddTextExt(ImDrawList* list, CONST ImFont* font, float font_size, CONST struct ImVec2 pos, ImU32 col, CONST char* text_begin, CONST char* text_end, float wrap_width, CONST ImVec4* cpu_fine_clip_rect);
CIMGUI_API void ImDrawList_AddImage(ImDrawList* list, ImTextureID user_texture_id, CONST struct ImVec2 a, CONST struct ImVec2 b, CONST struct ImVec2 uv0, CONST struct ImVec2 uv1, ImU32 col);
CIMGUI_API void ImDrawList_AddPolyline(ImDrawList* list, CONST ImVec2* points, CONST int num_points, ImU32 col, bool closed, float thickness, bool anti_aliased);
CIMGUI_API void ImDrawList_AddConvexPolyFilled(ImDrawList* list, CONST ImVec2* points, CONST int num_points, ImU32 col, bool anti_aliased);
CIMGUI_API void ImDrawList_AddBezierCurve(ImDrawList* list, CONST struct ImVec2 pos0, CONST struct ImVec2 cp0, CONST struct ImVec2 cp1, CONST struct ImVec2 pos1, ImU32 col, float thickness, int num_segments);
CIMGUI_API void ImDrawList_AddLine(struct ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, ImU32 col, float thickness);
CIMGUI_API void ImDrawList_AddRect(struct ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, ImU32 col, float rounding, int rounding_corners, float thickness);
CIMGUI_API void ImDrawList_AddRectFilled(struct ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, ImU32 col, float rounding, int rounding_corners);
CIMGUI_API void ImDrawList_AddRectFilledMultiColor(struct ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, ImU32 col_upr_left, ImU32 col_upr_right, ImU32 col_bot_right, ImU32 col_bot_left);
CIMGUI_API void ImDrawLust_AddQuad(struct ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, CONST struct ImVec2 c, CONST struct ImVec2 d, ImU32 col, float thickness);
CIMGUI_API void ImDrawLust_AddQuadFilled(struct ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, CONST struct ImVec2 c, CONST struct ImVec2 d, ImU32 col);
CIMGUI_API void ImDrawList_AddTriangle(struct ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, CONST struct ImVec2 c, ImU32 col, float thickness);
CIMGUI_API void ImDrawList_AddTriangleFilled(struct ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, CONST struct ImVec2 c, ImU32 col);
CIMGUI_API void ImDrawList_AddCircle(struct ImDrawList* list, CONST struct ImVec2 centre, float radius, ImU32 col, int num_segments, float thickness);
CIMGUI_API void ImDrawList_AddCircleFilled(struct ImDrawList* list, CONST struct ImVec2 centre, float radius, ImU32 col, int num_segments);
CIMGUI_API void ImDrawList_AddText(struct ImDrawList* list, CONST struct ImVec2 pos, ImU32 col, CONST char* text_begin, CONST char* text_end);
CIMGUI_API void ImDrawList_AddTextExt(struct ImDrawList* list, CONST struct ImFont* font, float font_size, CONST struct ImVec2 pos, ImU32 col, CONST char* text_begin, CONST char* text_end, float wrap_width, CONST struct ImVec4* cpu_fine_clip_rect);
CIMGUI_API void ImDrawList_AddImage(struct ImDrawList* list, ImTextureID user_texture_id, CONST struct ImVec2 a, CONST struct ImVec2 b, CONST struct ImVec2 uv0, CONST struct ImVec2 uv1, ImU32 col);
CIMGUI_API void ImDrawList_AddPolyline(struct ImDrawList* list, CONST struct ImVec2* points, CONST int num_points, ImU32 col, bool closed, float thickness, bool anti_aliased);
CIMGUI_API void ImDrawList_AddConvexPolyFilled(struct ImDrawList* list, CONST struct ImVec2* points, CONST int num_points, ImU32 col, bool anti_aliased);
CIMGUI_API void ImDrawList_AddBezierCurve(struct ImDrawList* list, CONST struct ImVec2 pos0, CONST struct ImVec2 cp0, CONST struct ImVec2 cp1, CONST struct ImVec2 pos1, ImU32 col, float thickness, int num_segments);
// Stateful path API, add points then finish with PathFill() or PathStroke()
CIMGUI_API void ImDrawList_PathClear(ImDrawList* list);
CIMGUI_API void ImDrawList_PathLineTo(ImDrawList* list, CONST struct ImVec2 pos);
CIMGUI_API void ImDrawList_PathLineToMergeDuplicate(ImDrawList* list, CONST struct ImVec2 pos);
CIMGUI_API void ImDrawList_PathFill(ImDrawList* list, ImU32 col);
CIMGUI_API void ImDrawList_PathStroke(ImDrawList* list, ImU32 col, bool closed, float thickness);
CIMGUI_API void ImDrawList_PathArcTo(ImDrawList* list, CONST struct ImVec2 centre, float radius, float a_min, float a_max, int num_segments);
CIMGUI_API void ImDrawList_PathArcToFast(ImDrawList* list, CONST struct ImVec2 centre, float radius, int a_min_of_12, int a_max_of_12); // Use precomputed angles for a 12 steps circle
CIMGUI_API void ImDrawList_PathBezierCurveTo(ImDrawList* list, CONST struct ImVec2 p1, CONST struct ImVec2 p2, CONST struct ImVec2 p3, int num_segments);
CIMGUI_API void ImDrawList_PathRect(ImDrawList* list, CONST struct ImVec2 rect_min, CONST struct ImVec2 rect_max, float rounding, int rounding_corners);
CIMGUI_API void ImDrawList_PathClear(struct ImDrawList* list);
CIMGUI_API void ImDrawList_PathLineTo(struct ImDrawList* list, CONST struct ImVec2 pos);
CIMGUI_API void ImDrawList_PathLineToMergeDuplicate(struct ImDrawList* list, CONST struct ImVec2 pos);
CIMGUI_API void ImDrawList_PathFill(struct ImDrawList* list, ImU32 col);
CIMGUI_API void ImDrawList_PathStroke(struct ImDrawList* list, ImU32 col, bool closed, float thickness);
CIMGUI_API void ImDrawList_PathArcTo(struct ImDrawList* list, CONST struct ImVec2 centre, float radius, float a_min, float a_max, int num_segments);
CIMGUI_API void ImDrawList_PathArcToFast(struct ImDrawList* list, CONST struct ImVec2 centre, float radius, int a_min_of_12, int a_max_of_12); // Use precomputed angles for a 12 steps circle
CIMGUI_API void ImDrawList_PathBezierCurveTo(struct ImDrawList* list, CONST struct ImVec2 p1, CONST struct ImVec2 p2, CONST struct ImVec2 p3, int num_segments);
CIMGUI_API void ImDrawList_PathRect(struct ImDrawList* list, CONST struct ImVec2 rect_min, CONST struct ImVec2 rect_max, float rounding, int rounding_corners);
// Channels
CIMGUI_API void ImDrawList_ChannelsSplit(ImDrawList* list, int channels_count);
CIMGUI_API void ImDrawList_ChannelsMerge(ImDrawList* list);
CIMGUI_API void ImDrawList_ChannelsSetCurrent(ImDrawList* list, int channel_index);
CIMGUI_API void ImDrawList_ChannelsSplit(struct ImDrawList* list, int channels_count);
CIMGUI_API void ImDrawList_ChannelsMerge(struct ImDrawList* list);
CIMGUI_API void ImDrawList_ChannelsSetCurrent(struct ImDrawList* list, int channel_index);
// Advanced
CIMGUI_API void ImDrawList_AddCallback(ImDrawList* list, ImDrawCallback callback, void* callback_data); // Your rendering function must check for 'UserCallback' in ImDrawCmd and call the function instead of rendering triangles.
CIMGUI_API void ImDrawList_AddDrawCmd(ImDrawList* list); // This is useful if you need to forcefully create a new draw call (to allow for dependent rendering / blending). Otherwise primitives are merged into the same draw-call as much as possible
CIMGUI_API void ImDrawList_AddCallback(struct ImDrawList* list, ImDrawCallback callback, void* callback_data); // Your rendering function must check for 'UserCallback' in ImDrawCmd and call the function instead of rendering triangles.
CIMGUI_API void ImDrawList_AddDrawCmd(struct ImDrawList* list); // This is useful if you need to forcefully create a new draw call (to allow for dependent rendering / blending). Otherwise primitives are merged into the same draw-call as much as possible
// Internal helpers
CIMGUI_API void ImDrawList_PrimReserve(ImDrawList* list, int idx_count, int vtx_count);
CIMGUI_API void ImDrawList_PrimRect(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, ImU32 col);
CIMGUI_API void ImDrawList_PrimRectUV(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, CONST struct ImVec2 uv_a, CONST struct ImVec2 uv_b, ImU32 col);
CIMGUI_API void ImDrawList_PrimVtx(ImDrawList* list, CONST struct ImVec2 pos, CONST struct ImVec2 uv, ImU32 col);
CIMGUI_API void ImDrawList_PrimWriteVtx(ImDrawList* list, CONST struct ImVec2 pos, CONST struct ImVec2 uv, ImU32 col);
CIMGUI_API void ImDrawList_PrimWriteIdx(ImDrawList* list, ImDrawIdx idx);
CIMGUI_API void ImDrawList_UpdateClipRect(ImDrawList* list);
CIMGUI_API void ImDrawList_UpdateTextureID(ImDrawList* list);
CIMGUI_API void ImDrawList_PrimReserve(struct ImDrawList* list, int idx_count, int vtx_count);
CIMGUI_API void ImDrawList_PrimRect(struct ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, ImU32 col);
CIMGUI_API void ImDrawList_PrimRectUV(struct ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, CONST struct ImVec2 uv_a, CONST struct ImVec2 uv_b, ImU32 col);
CIMGUI_API void ImDrawList_PrimQuadUV(struct ImDrawList* list,CONST struct ImVec2 a, CONST struct ImVec2 b, CONST struct ImVec2 c, CONST struct ImVec2 d, CONST struct ImVec2 uv_a, CONST struct ImVec2 uv_b, CONST struct ImVec2 uv_c, CONST struct ImVec2 uv_d, ImU32 col);
CIMGUI_API void ImDrawList_PrimWriteVtx(struct ImDrawList* list, CONST struct ImVec2 pos, CONST struct ImVec2 uv, ImU32 col);
CIMGUI_API void ImDrawList_PrimWriteIdx(struct ImDrawList* list, struct ImDrawIdx idx);
CIMGUI_API void ImDrawList_PrimVtx(struct ImDrawList* list, CONST struct ImVec2 pos, CONST struct ImVec2 uv, ImU32 col);
CIMGUI_API void ImDrawList_UpdateClipRect(struct ImDrawList* list);
CIMGUI_API void ImDrawList_UpdateTextureID(struct ImDrawList* list);

View File

@@ -47,9 +47,9 @@ CIMGUI_API void ImDrawList_ClearFreeMemory(ImDrawList* list)
return list->ClearFreeMemory();
}
CIMGUI_API void ImDrawList_PushClipRect(ImDrawList* list, CONST struct ImVec4 clip_rect)
CIMGUI_API void ImDrawList_PushClipRect(ImDrawList* list, struct ImVec2 clip_rect_min, struct ImVec2 clip_rect_max, bool intersect_with_current_clip_rect)
{
return list->PushClipRect(clip_rect);
return list->PushClipRect(clip_rect_min,clip_rect_max,intersect_with_current_clip_rect);
}
CIMGUI_API void ImDrawList_PushClipRectFullScreen(ImDrawList* list)
@@ -77,9 +77,9 @@ CIMGUI_API void ImDrawList_AddLine(ImDrawList* list, CONST struct ImVec2 a, CONS
return list->AddLine(a, b, col, thickness);
}
CIMGUI_API void ImDrawList_AddRect(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, ImU32 col, float rounding, int rounding_corners)
CIMGUI_API void ImDrawList_AddRect(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, ImU32 col, float rounding, int rounding_corners, float thickness)
{
return list->AddRect(a, b, col, rounding, rounding_corners);
return list->AddRect(a, b, col, rounding, rounding_corners, thickness);
}
CIMGUI_API void ImDrawList_AddRectFilled(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, ImU32 col, float rounding, int rounding_corners)
@@ -92,14 +92,29 @@ CIMGUI_API void ImDrawList_AddRectFilledMultiColor(ImDrawList* list, CONST struc
return list->AddRectFilledMultiColor(a, b, col_upr_left, col_upr_right, col_bot_right, col_bot_left);
}
CIMGUI_API void ImDrawLust_AddQuad(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, CONST struct ImVec2 c, CONST struct ImVec2 d, ImU32 col, float thickness)
{
return list->AddQuad(a, b, c, d, col, thickness);
}
CIMGUI_API void ImDrawLust_AddQuadFilled(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, CONST struct ImVec2 c, CONST struct ImVec2 d, ImU32 col)
{
return list->AddQuadFilled(a, b, c, d, col);
}
CIMGUI_API void ImDrawList_AddTriangle(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, CONST struct ImVec2 c, ImU32 col, float thickness)
{
return list->AddTriangle(a,b,c,col,thickness);
}
CIMGUI_API void ImDrawList_AddTriangleFilled(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, CONST struct ImVec2 c, ImU32 col)
{
return list->AddTriangleFilled(a, b, c, col);
}
CIMGUI_API void ImDrawList_AddCircle(ImDrawList* list, CONST struct ImVec2 centre, float radius, ImU32 col, int num_segments)
CIMGUI_API void ImDrawList_AddCircle(ImDrawList* list, CONST struct ImVec2 centre, float radius, ImU32 col, int num_segments, float thickness)
{
return list->AddCircle(centre, radius, col, num_segments);
return list->AddCircle(centre, radius, col, num_segments, thickness);
}
CIMGUI_API void ImDrawList_AddCircleFilled(ImDrawList* list, CONST struct ImVec2 centre, float radius, ImU32 col, int num_segments)
@@ -222,6 +237,11 @@ CIMGUI_API void ImDrawList_PrimRectUV(ImDrawList* list, CONST struct ImVec2 a, C
return list->PrimRectUV(a, b, uv_a, uv_b, col);
}
CIMGUI_API void ImDrawList_PrimQuadUV(ImDrawList* list,CONST struct ImVec2 a, CONST struct ImVec2 b, CONST struct ImVec2 c, CONST struct ImVec2 d, CONST struct ImVec2 uv_a, CONST struct ImVec2 uv_b, CONST struct ImVec2 uv_c, CONST struct ImVec2 uv_d, ImU32 col)
{
return list->PrimQuadUV(a,b,c,d,uv_a,uv_b,uv_c,uv_d,col);
}
CIMGUI_API void ImDrawList_PrimVtx(ImDrawList* list, CONST struct ImVec2 pos, CONST struct ImVec2 uv, ImU32 col)
{
return list->PrimVtx(pos, uv, col);

View File

@@ -2,6 +2,11 @@
#include "../imgui/imgui.h"
#include "cimgui.h"
CIMGUI_API void ImFontConfig_DefaultConstructor(ImFontConfig* config)
{
*config = ImFontConfig();
}
CIMGUI_API void ImFontAtlas_GetTexDataAsRGBA32(ImFontAtlas* atlas, unsigned char** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel)
{
atlas->GetTexDataAsRGBA32(out_pixels, out_width, out_height, out_bytes_per_pixel);

2
imgui

Submodule imgui updated: 24d186753e...adb85d800d