Compare commits

...

4 Commits
v1.50 ... v1.51

Author SHA1 Message Date
Armored Dragon
1df319b232 Update to imgui 1.51 (#34)
* Updated imgui submodule to v1.51 tag

* Updated API to imgui 1.51

* Fix all compiler and linker errors
2017-08-31 17:08:29 +02:00
Unknown
516547dcd9 Introduce CIMGUI_NO_EXPORT to stop exporting symbols
Useful when static linking in a library to avoid collisions
2017-08-06 22:18:50 +02:00
Merwan Achibet
dbbac62a84 Add ImGuilistClipper struct under CIMGUI_DEFINE_ENUMS_AND_STRUCTS 2017-06-08 19:45:16 +02:00
Merwan Achibet
389c1f1ad1 Add another batch of missing struct keywords, Add definition for ImDrawVert (#28)
* Add missing struct keywords for ImVec2 and ImGuiListClipper arguments
* Add another batch of missing struct keywords
* Add missing definition for ImDrawVert under CIMGUI_DEFINE_ENUMS_AND_STRUCTS
2017-06-06 15:40:29 +02:00
5 changed files with 223 additions and 144 deletions

View File

@@ -149,17 +149,17 @@ CIMGUI_API void igSetWindowFontScale(float scale)
ImGui::SetWindowFontScale(scale); ImGui::SetWindowFontScale(scale);
} }
CIMGUI_API void igSetNextWindowPos(CONST ImVec2 pos, ImGuiSetCond cond) CIMGUI_API void igSetNextWindowPos(CONST ImVec2 pos, ImGuiCond cond)
{ {
ImGui::SetNextWindowPos(pos, cond); ImGui::SetNextWindowPos(pos, cond);
} }
CIMGUI_API void igSetNextWindowPosCenter(ImGuiSetCond cond) CIMGUI_API void igSetNextWindowPosCenter(ImGuiCond cond)
{ {
ImGui::SetNextWindowPosCenter(cond); ImGui::SetNextWindowPosCenter(cond);
} }
CIMGUI_API void igSetNextWindowSize(CONST ImVec2 size, ImGuiSetCond cond) CIMGUI_API void igSetNextWindowSize(CONST ImVec2 size, ImGuiCond cond)
{ {
ImGui::SetNextWindowSize(size, cond); ImGui::SetNextWindowSize(size, cond);
} }
@@ -179,7 +179,7 @@ CIMGUI_API void igSetNextWindowContentWidth(float width)
ImGui::SetNextWindowContentWidth(width); ImGui::SetNextWindowContentWidth(width);
} }
CIMGUI_API void igSetNextWindowCollapsed(bool collapsed, ImGuiSetCond cond) CIMGUI_API void igSetNextWindowCollapsed(bool collapsed, ImGuiCond cond)
{ {
ImGui::SetNextWindowCollapsed(collapsed,cond); ImGui::SetNextWindowCollapsed(collapsed,cond);
} }
@@ -189,17 +189,17 @@ CIMGUI_API void igSetNextWindowFocus()
ImGui::SetNextWindowFocus(); ImGui::SetNextWindowFocus();
} }
CIMGUI_API void igSetWindowPos(CONST ImVec2 pos, ImGuiSetCond cond) CIMGUI_API void igSetWindowPos(CONST ImVec2 pos, ImGuiCond cond)
{ {
ImGui::SetWindowPos(pos,cond); ImGui::SetWindowPos(pos,cond);
} }
CIMGUI_API void igSetWindowSize(CONST ImVec2 size, ImGuiSetCond cond) CIMGUI_API void igSetWindowSize(CONST ImVec2 size, ImGuiCond cond)
{ {
ImGui::SetWindowSize(size, cond); ImGui::SetWindowSize(size, cond);
} }
CIMGUI_API void igSetWindowCollapsed(bool collapsed, ImGuiSetCond cond) CIMGUI_API void igSetWindowCollapsed(bool collapsed, ImGuiCond cond)
{ {
ImGui::SetWindowCollapsed(collapsed,cond); ImGui::SetWindowCollapsed(collapsed,cond);
} }
@@ -209,17 +209,17 @@ CIMGUI_API void igSetWindowFocus()
ImGui::SetWindowFocus(); ImGui::SetWindowFocus();
} }
CIMGUI_API void igSetWindowPosByName(CONST char* name, CONST ImVec2 pos, ImGuiSetCond cond) CIMGUI_API void igSetWindowPosByName(CONST char* name, CONST ImVec2 pos, ImGuiCond cond)
{ {
ImGui::SetWindowPos(name,pos,cond); ImGui::SetWindowPos(name,pos,cond);
} }
CIMGUI_API void igSetWindowSize2(CONST char* name, CONST ImVec2 size, ImGuiSetCond cond) CIMGUI_API void igSetWindowSize2(CONST char* name, CONST ImVec2 size, ImGuiCond cond)
{ {
ImGui::SetWindowSize(name, size, cond); ImGui::SetWindowSize(name, size, cond);
} }
CIMGUI_API void igSetWindowCollapsed2(CONST char* name, bool collapsed, ImGuiSetCond cond) CIMGUI_API void igSetWindowCollapsed2(CONST char* name, bool collapsed, ImGuiCond cond)
{ {
ImGui::SetWindowCollapsed(name, collapsed, cond); ImGui::SetWindowCollapsed(name, collapsed, cond);
} }
@@ -295,6 +295,11 @@ CIMGUI_API void igPopFont()
return ImGui::PopFont(); return ImGui::PopFont();
} }
CIMGUI_API void igPushStyleColorU32(ImGuiCol idx, ImU32 col)
{
return ImGui::PushStyleColor(idx, col);
}
CIMGUI_API void igPushStyleColor(ImGuiCol idx, CONST ImVec4 col) CIMGUI_API void igPushStyleColor(ImGuiCol idx, CONST ImVec4 col)
{ {
return ImGui::PushStyleColor(idx, col); return ImGui::PushStyleColor(idx, col);
@@ -320,6 +325,11 @@ CIMGUI_API void igPopStyleVar(int count)
return ImGui::PopStyleVar(count); return ImGui::PopStyleVar(count);
} }
CIMGUI_API void igGetStyleColorVec4(ImVec4* pOut, ImGuiCol idx)
{
*pOut = ImGui::GetStyleColorVec4(idx);
}
CIMGUI_API ImFont* igGetFont() CIMGUI_API ImFont* igGetFont()
{ {
return ImGui::GetFont(); return ImGui::GetFont();
@@ -345,6 +355,11 @@ CIMGUI_API ImU32 igGetColorU32Vec(CONST ImVec4* col)
return ImGui::GetColorU32(*col); return ImGui::GetColorU32(*col);
} }
CIMGUI_API ImU32 igGetColorU32U32(ImU32 col)
{
return ImGui::GetColorU32(col);
}
// Parameters stacks (current window) // Parameters stacks (current window)
CIMGUI_API void igPushItemWidth(float item_width) CIMGUI_API void igPushItemWidth(float item_width)
{ {
@@ -436,9 +451,9 @@ CIMGUI_API bool igBeginPopupContextItem(CONST char* str_id, int mouse_button)
return ImGui::BeginPopupContextItem(str_id, mouse_button); return ImGui::BeginPopupContextItem(str_id, mouse_button);
} }
CIMGUI_API bool igBeginPopupContextWindow(bool also_over_items, CONST char* str_id, int mouse_button) CIMGUI_API bool igBeginPopupContextWindow(CONST char* str_id, int mouse_button, bool also_over_items)
{ {
return ImGui::BeginPopupContextWindow(also_over_items, str_id, mouse_button); return ImGui::BeginPopupContextWindow(str_id, mouse_button, also_over_items);
} }
CIMGUI_API bool igBeginPopupContextVoid(CONST char* str_id, int mouse_button) CIMGUI_API bool igBeginPopupContextVoid(CONST char* str_id, int mouse_button)
@@ -451,6 +466,11 @@ CIMGUI_API void igEndPopup()
return ImGui::EndPopup(); return ImGui::EndPopup();
} }
CIMGUI_API bool igIsPopupOpen(CONST char* str_id)
{
return ImGui::IsPopupOpen(str_id);
}
CIMGUI_API void igCloseCurrentPopup() CIMGUI_API void igCloseCurrentPopup()
{ {
return ImGui::CloseCurrentPopup(); return ImGui::CloseCurrentPopup();
@@ -585,6 +605,16 @@ CIMGUI_API int igGetColumnIndex()
return ImGui::GetColumnIndex(); return ImGui::GetColumnIndex();
} }
CIMGUI_API float igGetColumnWidth(int column_index)
{
return ImGui::GetColumnWidth(column_index);
}
CIMGUI_API void igSetColumnWidth(int column_index, float width)
{
return ImGui::SetColumnWidth(column_index, width);
}
CIMGUI_API float igGetColumnOffset(int column_index) CIMGUI_API float igGetColumnOffset(int column_index)
{ {
return ImGui::GetColumnOffset(column_index); return ImGui::GetColumnOffset(column_index);
@@ -595,11 +625,6 @@ CIMGUI_API void igSetColumnOffset(int column_index, float offset_x)
return ImGui::SetColumnOffset(column_index, 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() CIMGUI_API int igGetColumnsCount()
{ {
return ImGui::GetColumnsCount(); return ImGui::GetColumnsCount();
@@ -798,26 +823,6 @@ CIMGUI_API bool igCombo3(CONST char* label, int* current_item, bool(*items_gette
return ImGui::Combo(label, current_item, items_getter, data, items_count, height_in_items); return ImGui::Combo(label, current_item, items_getter, data, items_count, height_in_items);
} }
CIMGUI_API bool igColorButton(CONST ImVec4 col, bool small_height, bool outline_border)
{
return ImGui::ColorButton(col, small_height, outline_border);
}
CIMGUI_API bool igColorEdit3(CONST char* label, float col[3])
{
return ImGui::ColorEdit3(label, col);
}
CIMGUI_API bool igColorEdit4(CONST char* label, float col[4], bool show_alpha)
{
return ImGui::ColorEdit4(label, col, show_alpha);
}
CIMGUI_API void igColorEditMode(ImGuiColorEditMode mode)
{
return ImGui::ColorEditMode(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, ImVec2 graph_size, int stride) 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, ImVec2 graph_size, int stride)
{ {
return ImGui::PlotLines(label, values, values_count, values_offset, overlay_text, scale_min, scale_max, graph_size, stride); return ImGui::PlotLines(label, values, values_count, values_offset, overlay_text, scale_min, scale_max, graph_size, stride);
@@ -899,6 +904,37 @@ CIMGUI_API bool igVSliderInt(CONST char* label, CONST ImVec2 size, int* v, int v
return ImGui::VSliderInt(label, size, v, v_min, v_max, display_format); return ImGui::VSliderInt(label, size, v, v_min, v_max, display_format);
} }
// Widgets: Color Editor/Picker (tip: the ColorEdit* functions have a little colored preview square that can be left-clicked to open a picker, and right-clicked to open an option menu.)
CIMGUI_API bool igColorEdit3(CONST char* label, float col[3], ImGuiColorEditFlags flags)
{
return ImGui::ColorEdit3(label, col, flags);
}
CIMGUI_API bool igColorEdit4(CONST char* label, float col[4], ImGuiColorEditFlags flags)
{
return ImGui::ColorEdit4(label, col, flags);
}
CIMGUI_API bool igColorPicker3(CONST char* label, float col[3], ImGuiColorEditFlags flags)
{
return ImGui::ColorPicker3(label, col, flags);
}
CIMGUI_API bool igColorPicker4(CONST char* label, float col[4], ImGuiColorEditFlags flags, CONST float* ref_col)
{
return ImGui::ColorPicker4(label, col, flags);
}
CIMGUI_API bool igColorButton(CONST char* desc_id, CONST ImVec4 col, ImGuiColorEditFlags flags, CONST ImVec2 size)
{
return ImGui::ColorButton(desc_id, col, flags, size);
}
CIMGUI_API void igSetColorEditOptions(ImGuiColorEditFlags flags)
{
return ImGui::SetColorEditOptions(flags);
}
// Widgets: Drags (tip: ctrl+click on a drag box to input text) // Widgets: Drags (tip: ctrl+click on a drag box to input text)
CIMGUI_API bool igDragFloat(CONST char* label, float* v, float v_speed, float v_min, float v_max, CONST char* display_format, float power) CIMGUI_API bool igDragFloat(CONST char* label, float* v, float v_speed, float v_min, float v_max, CONST char* display_format, float power)
{ {
@@ -1098,7 +1134,7 @@ CIMGUI_API float igGetTreeNodeToLabelSpacing()
return ImGui::GetTreeNodeToLabelSpacing(); return ImGui::GetTreeNodeToLabelSpacing();
} }
CIMGUI_API void igSetNextTreeNodeOpen(bool opened, ImGuiSetCond cond) CIMGUI_API void igSetNextTreeNodeOpen(bool opened, ImGuiCond cond)
{ {
return ImGui::SetNextTreeNodeOpen(opened, cond); return ImGui::SetNextTreeNodeOpen(opened, cond);
} }
@@ -1210,16 +1246,6 @@ CIMGUI_API void igValueFloat(CONST char* prefix, float v, CONST char* float_form
ImGui::Value(prefix,v,float_format); ImGui::Value(prefix,v,float_format);
} }
CIMGUI_API void igValueColor(CONST char* prefix, CONST ImVec4 v)
{
ImGui::ValueColor(prefix,v);
}
CIMGUI_API void igValueColor2(CONST char* prefix, ImU32 v)
{
ImGui::ValueColor(prefix,v);
}
// Logging: all text output from interface is redirected to tty/file/clipboard. Tree nodes are automatically opened. // Logging: all text output from interface is redirected to tty/file/clipboard. Tree nodes are automatically opened.
CIMGUI_API void igLogToTTY(int max_depth) CIMGUI_API void igLogToTTY(int max_depth)
{ {
@@ -1273,9 +1299,9 @@ CIMGUI_API bool igIsItemHovered()
return ImGui::IsItemHovered(); return ImGui::IsItemHovered();
} }
CIMGUI_API bool igIsItemHoveredRect() CIMGUI_API bool igIsItemRectHovered()
{ {
return ImGui::IsItemHoveredRect(); return ImGui::IsItemRectHovered();
} }
CIMGUI_API bool igIsItemActive() CIMGUI_API bool igIsItemActive()
@@ -1323,14 +1349,19 @@ CIMGUI_API void igSetItemAllowOverlap()
ImGui::SetItemAllowOverlap(); ImGui::SetItemAllowOverlap();
} }
CIMGUI_API bool igIsWindowFocused()
{
return ImGui::IsWindowFocused();
}
CIMGUI_API bool igIsWindowHovered() CIMGUI_API bool igIsWindowHovered()
{ {
return ImGui::IsWindowHovered(); return ImGui::IsWindowHovered();
} }
CIMGUI_API bool igIsWindowFocused() CIMGUI_API bool igIsWindowRectHovered()
{ {
return ImGui::IsWindowFocused(); return ImGui::IsWindowRectHovered();
} }
CIMGUI_API bool igIsRootWindowFocused() CIMGUI_API bool igIsRootWindowFocused()
@@ -1348,6 +1379,11 @@ CIMGUI_API bool igIsRootWindowOrAnyChildHovered()
return ImGui::IsRootWindowOrAnyChildHovered(); return ImGui::IsRootWindowOrAnyChildHovered();
} }
CIMGUI_API bool igIsAnyWindowHovered()
{
return ImGui::IsAnyWindowHovered();
}
CIMGUI_API bool igIsRectVisible(CONST ImVec2 item_size) CIMGUI_API bool igIsRectVisible(CONST ImVec2 item_size)
{ {
return ImGui::IsRectVisible(item_size); return ImGui::IsRectVisible(item_size);
@@ -1398,14 +1434,9 @@ CIMGUI_API bool igIsMouseReleased(int button)
return ImGui::IsMouseReleased(button); return ImGui::IsMouseReleased(button);
} }
CIMGUI_API bool igIsMouseHoveringWindow() CIMGUI_API bool igIsMouseDragging(int button, float lock_threshold)
{ {
return ImGui::IsMouseHoveringWindow(); return ImGui::IsMouseDragging(button,lock_threshold);
}
CIMGUI_API bool igIsMouseHoveringAnyWindow()
{
return ImGui::IsMouseHoveringAnyWindow();
} }
CIMGUI_API bool igIsMouseHoveringRect(CONST ImVec2 r_min, CONST ImVec2 r_max, bool clip) CIMGUI_API bool igIsMouseHoveringRect(CONST ImVec2 r_min, CONST ImVec2 r_max, bool clip)
@@ -1413,15 +1444,6 @@ CIMGUI_API bool igIsMouseHoveringRect(CONST ImVec2 r_min, CONST ImVec2 r_max, bo
return ImGui::IsMouseHoveringRect(r_min,r_max,clip); return ImGui::IsMouseHoveringRect(r_min,r_max,clip);
} }
CIMGUI_API bool igIsMouseDragging(int button, float lock_threshold)
{
return ImGui::IsMouseDragging(button,lock_threshold);
}
CIMGUI_API bool igIsPosHoveringAnyWindow(CONST ImVec2 pos)
{
return ImGui::IsPosHoveringAnyWindow(pos);
}
CIMGUI_API void igGetMousePos(ImVec2* pOut) CIMGUI_API void igGetMousePos(ImVec2* pOut)
{ {
*pOut = ImGui::GetMousePos(); *pOut = ImGui::GetMousePos();
@@ -1492,9 +1514,9 @@ CIMGUI_API int igGetFrameCount()
return ImGui::GetFrameCount(); return ImGui::GetFrameCount();
} }
CIMGUI_API CONST char* igGetStyleColName(ImGuiCol idx) CIMGUI_API CONST char* igGetStyleColorName(ImGuiCol idx)
{ {
return ImGui::GetStyleColName(idx); return ImGui::GetStyleColorName(idx);
} }
CIMGUI_API void igCalcItemRectClosestPoint(ImVec2* pOut, CONST ImVec2 pos, bool on_edge, float outward) CIMGUI_API void igCalcItemRectClosestPoint(ImVec2* pOut, CONST ImVec2 pos, bool on_edge, float outward)

View File

@@ -2,8 +2,12 @@
#include <stdio.h> #include <stdio.h>
#if defined _WIN32 || defined __CYGWIN__ #if defined _WIN32 || defined __CYGWIN__
#ifdef CIMGUI_NO_EXPORT
#define API
#else
#define API __declspec(dllexport) #define API __declspec(dllexport)
#ifndef __GNUC__ #endif
#ifdef __GNUC__
#define snprintf sprintf_s #define snprintf sprintf_s
#endif #endif
#else #else
@@ -45,16 +49,22 @@ typedef ImU32 ImGuiID;
typedef int ImGuiCol; typedef int ImGuiCol;
typedef int ImGuiStyleVar; typedef int ImGuiStyleVar;
typedef int ImGuiKey; typedef int ImGuiKey;
typedef int ImGuiColorEditMode; typedef int ImGuiColorEditFlags;
typedef int ImGuiMouseCursor; typedef int ImGuiMouseCursor;
typedef int ImGuiWindowFlags; typedef int ImGuiWindowFlags;
typedef int ImGuiSetCond; typedef int ImGuiCond;
typedef int ImGuiColumnsFlags;
typedef int ImGuiInputTextFlags; typedef int ImGuiInputTextFlags;
typedef int ImGuiSelectableFlags; typedef int ImGuiSelectableFlags;
typedef int ImGuiTreeNodeFlags; typedef int ImGuiTreeNodeFlags;
typedef int (*ImGuiTextEditCallback)(struct ImGuiTextEditCallbackData *data); typedef int (*ImGuiTextEditCallback)(struct ImGuiTextEditCallbackData *data);
typedef void (*ImGuiSizeConstraintCallback)(struct ImGuiSizeConstraintCallbackData* data); typedef void (*ImGuiSizeConstraintCallback)(struct ImGuiSizeConstraintCallbackData* data);
typedef void (*ImDrawCallback)(CONST struct ImDrawList* parent_list, CONST struct ImDrawCmd* cmd); typedef void (*ImDrawCallback)(CONST struct ImDrawList* parent_list, CONST struct ImDrawCmd* cmd);
#ifdef _MSC_VER
typedef unsigned __int64 ImU64;
#else
typedef unsigned long long ImU64;
#endif
#ifdef CIMGUI_DEFINE_ENUMS_AND_STRUCTS #ifdef CIMGUI_DEFINE_ENUMS_AND_STRUCTS
struct ImVec2 { struct ImVec2 {
@@ -176,9 +186,9 @@ enum {
ImGuiCol_Header, ImGuiCol_Header,
ImGuiCol_HeaderHovered, ImGuiCol_HeaderHovered,
ImGuiCol_HeaderActive, ImGuiCol_HeaderActive,
ImGuiCol_Column, ImGuiCol_Separator,
ImGuiCol_ColumnHovered, ImGuiCol_SeparatorHovered,
ImGuiCol_ColumnActive, ImGuiCol_SeparatorActive,
ImGuiCol_ResizeGrip, ImGuiCol_ResizeGrip,
ImGuiCol_ResizeGripHovered, ImGuiCol_ResizeGripHovered,
ImGuiCol_ResizeGripActive, ImGuiCol_ResizeGripActive,
@@ -211,11 +221,25 @@ enum {
}; };
enum { enum {
ImGuiColorEditMode_UserSelect = -2, ImGuiColorEditFlags_NoAlpha = 1 << 1,
ImGuiColorEditMode_UserSelectShowButton = -1, ImGuiColorEditFlags_NoPicker = 1 << 2,
ImGuiColorEditMode_RGB = 0, ImGuiColorEditFlags_NoOptions = 1 << 3,
ImGuiColorEditMode_HSV = 1, ImGuiColorEditFlags_NoSmallPreview = 1 << 4,
ImGuiColorEditMode_HEX = 2 ImGuiColorEditFlags_NoInputs = 1 << 5,
ImGuiColorEditFlags_NoTooltip = 1 << 6,
ImGuiColorEditFlags_NoLabel = 1 << 7,
ImGuiColorEditFlags_NoSidePreview = 1 << 8,
ImGuiColorEditFlags_AlphaBar = 1 << 9,
ImGuiColorEditFlags_AlphaPreview = 1 << 10,
ImGuiColorEditFlags_AlphaPreviewHalf= 1 << 11,
ImGuiColorEditFlags_HDR = 1 << 12,
ImGuiColorEditFlags_RGB = 1 << 13,
ImGuiColorEditFlags_HSV = 1 << 14,
ImGuiColorEditFlags_HEX = 1 << 15,
ImGuiColorEditFlags_Uint8 = 1 << 16,
ImGuiColorEditFlags_Float = 1 << 17,
ImGuiColorEditFlags_PickerHueBar = 1 << 18,
ImGuiColorEditFlags_PickerHueWheel = 1 << 19
}; };
enum { enum {
@@ -231,10 +255,10 @@ enum {
}; };
enum { enum {
ImGuiSetCond_Always = 1 << 0, ImGuiCond_Always = 1 << 0,
ImGuiSetCond_Once = 1 << 1, ImGuiCond_Once = 1 << 1,
ImGuiSetCond_FirstUseEver = 1 << 2, ImGuiCond_FirstUseEver = 1 << 2,
ImGuiSetCond_Appearing = 1 << 3 ImGuiCond_Appearing = 1 << 3
}; };
struct ImGuiStyle { struct ImGuiStyle {
@@ -242,7 +266,7 @@ struct ImGuiStyle {
struct ImVec2 WindowPadding; struct ImVec2 WindowPadding;
struct ImVec2 WindowMinSize; struct ImVec2 WindowMinSize;
float WindowRounding; float WindowRounding;
ImVec2 WindowTitleAlign; struct ImVec2 WindowTitleAlign;
float ChildWindowRounding; float ChildWindowRounding;
struct ImVec2 FramePadding; struct ImVec2 FramePadding;
float FrameRounding; float FrameRounding;
@@ -255,7 +279,7 @@ struct ImGuiStyle {
float ScrollbarRounding; float ScrollbarRounding;
float GrabMinSize; float GrabMinSize;
float GrabRounding; float GrabRounding;
ImVec2 ButtonTextAlign; struct ImVec2 ButtonTextAlign;
struct ImVec2 DisplayWindowPadding; struct ImVec2 DisplayWindowPadding;
struct ImVec2 DisplaySafeAreaPadding; struct ImVec2 DisplaySafeAreaPadding;
bool AntiAliasedLines; bool AntiAliasedLines;
@@ -280,7 +304,7 @@ struct ImGuiIO {
struct ImFontAtlas* Fonts; struct ImFontAtlas* Fonts;
float FontGlobalScale; float FontGlobalScale;
bool FontAllowUserScaling; bool FontAllowUserScaling;
ImFont* FontDefault; struct ImFont* FontDefault;
struct ImVec2 DisplayFramebufferScale; struct ImVec2 DisplayFramebufferScale;
struct ImVec2 DisplayVisibleMin; struct ImVec2 DisplayVisibleMin;
struct ImVec2 DisplayVisibleMax; struct ImVec2 DisplayVisibleMax;
@@ -311,7 +335,7 @@ struct ImGuiIO {
int MetricsRenderVertices; int MetricsRenderVertices;
int MetricsRenderIndices; int MetricsRenderIndices;
int MetricsActiveWindows; int MetricsActiveWindows;
ImVec2 MouseDelta; struct ImVec2 MouseDelta;
struct ImVec2 MousePosPrev; struct ImVec2 MousePosPrev;
bool MouseClicked[5]; bool MouseClicked[5];
struct ImVec2 MouseClickedPos[5]; struct ImVec2 MouseClickedPos[5];
@@ -365,6 +389,13 @@ struct ImDrawData {
int TotalIdxCount; int TotalIdxCount;
}; };
struct ImDrawVert
{
struct ImVec2 pos;
struct ImVec2 uv;
ImU32 col;
};
struct ImFontConfig { struct ImFontConfig {
void* FontData; void* FontData;
int FontDataSize; int FontDataSize;
@@ -374,12 +405,19 @@ struct ImFontConfig {
int OversampleH, OversampleV; int OversampleH, OversampleV;
bool PixelSnapH; bool PixelSnapH;
struct ImVec2 GlyphExtraSpacing; struct ImVec2 GlyphExtraSpacing;
ImVec2 GlyphOffset; struct ImVec2 GlyphOffset;
const ImWchar* GlyphRanges; const ImWchar* GlyphRanges;
bool MergeMode; bool MergeMode;
char Name[32]; char Name[32];
struct ImFont* DstFont; struct ImFont* DstFont;
}; };
struct ImGuiListClipper
{
float StartPosY;
float ItemsHeight;
int ItemsCount, StepNo, DisplayStart, DisplayEnd;
};
#endif // CIMGUI_DEFINE_ENUMS_AND_STRUCTS #endif // CIMGUI_DEFINE_ENUMS_AND_STRUCTS
CIMGUI_API struct ImGuiIO* igGetIO(); CIMGUI_API struct ImGuiIO* igGetIO();
@@ -414,21 +452,21 @@ CIMGUI_API float igGetWindowHeight();
CIMGUI_API bool igIsWindowCollapsed(); CIMGUI_API bool igIsWindowCollapsed();
CIMGUI_API void igSetWindowFontScale(float scale); CIMGUI_API void igSetWindowFontScale(float scale);
CIMGUI_API void igSetNextWindowPos(CONST struct ImVec2 pos, ImGuiSetCond cond); CIMGUI_API void igSetNextWindowPos(CONST struct ImVec2 pos, ImGuiCond cond);
CIMGUI_API void igSetNextWindowPosCenter(ImGuiSetCond cond); CIMGUI_API void igSetNextWindowPosCenter(ImGuiCond cond);
CIMGUI_API void igSetNextWindowSize(CONST struct ImVec2 size, ImGuiSetCond cond); CIMGUI_API void igSetNextWindowSize(CONST struct ImVec2 size, ImGuiCond cond);
CIMGUI_API void igSetNextWindowSizeConstraints(CONST struct ImVec2 size_min, CONST struct ImVec2 size_max, ImGuiSizeConstraintCallback custom_callback, void* custom_callback_data); 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 igSetNextWindowContentSize(CONST struct ImVec2 size);
CIMGUI_API void igSetNextWindowContentWidth(float width); CIMGUI_API void igSetNextWindowContentWidth(float width);
CIMGUI_API void igSetNextWindowCollapsed(bool collapsed, ImGuiSetCond cond); CIMGUI_API void igSetNextWindowCollapsed(bool collapsed, ImGuiCond cond);
CIMGUI_API void igSetNextWindowFocus(); CIMGUI_API void igSetNextWindowFocus();
CIMGUI_API void igSetWindowPos(CONST struct ImVec2 pos, ImGuiSetCond cond); CIMGUI_API void igSetWindowPos(CONST struct ImVec2 pos, ImGuiCond cond);
CIMGUI_API void igSetWindowSize(CONST struct ImVec2 size, ImGuiSetCond cond); CIMGUI_API void igSetWindowSize(CONST struct ImVec2 size, ImGuiCond cond);
CIMGUI_API void igSetWindowCollapsed(bool collapsed, ImGuiSetCond cond); CIMGUI_API void igSetWindowCollapsed(bool collapsed, ImGuiCond cond);
CIMGUI_API void igSetWindowFocus(); CIMGUI_API void igSetWindowFocus();
CIMGUI_API void igSetWindowPosByName(CONST char* name, CONST struct ImVec2 pos, ImGuiSetCond cond); CIMGUI_API void igSetWindowPosByName(CONST char* name, CONST struct ImVec2 pos, ImGuiCond cond);
CIMGUI_API void igSetWindowSize2(CONST char* name, CONST struct ImVec2 size, ImGuiSetCond cond); CIMGUI_API void igSetWindowSize2(CONST char* name, CONST struct ImVec2 size, ImGuiCond cond);
CIMGUI_API void igSetWindowCollapsed2(CONST char* name, bool collapsed, ImGuiSetCond cond); CIMGUI_API void igSetWindowCollapsed2(CONST char* name, bool collapsed, ImGuiCond cond);
CIMGUI_API void igSetWindowFocus2(CONST char* name); CIMGUI_API void igSetWindowFocus2(CONST char* name);
CIMGUI_API float igGetScrollX(); CIMGUI_API float igGetScrollX();
@@ -446,16 +484,19 @@ CIMGUI_API struct ImGuiStorage* igGetStateStorage();
// Parameters stacks (shared) // Parameters stacks (shared)
CIMGUI_API void igPushFont(struct ImFont* font); CIMGUI_API void igPushFont(struct ImFont* font);
CIMGUI_API void igPopFont(); CIMGUI_API void igPopFont();
CIMGUI_API void igPushStyleColorU32(ImGuiCol idx, ImU32 col);
CIMGUI_API void igPushStyleColor(ImGuiCol idx, CONST struct ImVec4 col); CIMGUI_API void igPushStyleColor(ImGuiCol idx, CONST struct ImVec4 col);
CIMGUI_API void igPopStyleColor(int count); CIMGUI_API void igPopStyleColor(int count);
CIMGUI_API void igPushStyleVar(ImGuiStyleVar idx, float val); CIMGUI_API void igPushStyleVar(ImGuiStyleVar idx, float val);
CIMGUI_API void igPushStyleVarVec(ImGuiStyleVar idx, CONST struct ImVec2 val); CIMGUI_API void igPushStyleVarVec(ImGuiStyleVar idx, CONST struct ImVec2 val);
CIMGUI_API void igPopStyleVar(int count); CIMGUI_API void igPopStyleVar(int count);
CIMGUI_API struct ImFont* igGetFont(); CIMGUI_API void igGetStyleColorVec4(struct ImVec4 *pOut, ImGuiCol idx);
CIMGUI_API struct ImFont* igGetFont();
CIMGUI_API float igGetFontSize(); CIMGUI_API float igGetFontSize();
CIMGUI_API void igGetFontTexUvWhitePixel(struct ImVec2* pOut); CIMGUI_API void igGetFontTexUvWhitePixel(struct ImVec2* pOut);
CIMGUI_API ImU32 igGetColorU32(ImGuiCol idx, float alpha_mul); CIMGUI_API ImU32 igGetColorU32(ImGuiCol idx, float alpha_mul);
CIMGUI_API ImU32 igGetColorU32Vec(CONST struct ImVec4* col); CIMGUI_API ImU32 igGetColorU32Vec(CONST struct ImVec4* col);
CIMGUI_API ImU32 igGetColorU32U32(ImU32 col);
// Parameters stacks (current window) // Parameters stacks (current window)
@@ -497,9 +538,10 @@ CIMGUI_API float igGetItemsLineHeightWithSpacing();
CIMGUI_API void igColumns(int count, CONST char* id, bool border); CIMGUI_API void igColumns(int count, CONST char* id, bool border);
CIMGUI_API void igNextColumn(); CIMGUI_API void igNextColumn();
CIMGUI_API int igGetColumnIndex(); CIMGUI_API int igGetColumnIndex();
CIMGUI_API float igGetColumnWidth(int column_index); // get column width (in pixels). pass -1 to use current column
CIMGUI_API void igSetColumnWidth(int column_index, float width);
CIMGUI_API float igGetColumnOffset(int column_index); CIMGUI_API float igGetColumnOffset(int column_index);
CIMGUI_API void igSetColumnOffset(int column_index, float offset_x); CIMGUI_API void igSetColumnOffset(int column_index, float offset_x);
CIMGUI_API float igGetColumnWidth(int column_index);
CIMGUI_API int igGetColumnsCount(); CIMGUI_API int igGetColumnsCount();
// ID scopes // ID scopes
@@ -541,10 +583,6 @@ CIMGUI_API bool igRadioButton(CONST char* label, int* v, int v_butto
CIMGUI_API bool igCombo(CONST char* label, int* current_item, CONST char* CONST* items, int items_count, int height_in_items); CIMGUI_API bool igCombo(CONST char* label, int* current_item, CONST char* CONST* 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 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 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 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 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 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);
@@ -565,6 +603,15 @@ CIMGUI_API bool igSliderInt4(CONST char* label, int v[4], int v_min,
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 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); CIMGUI_API bool igVSliderInt(CONST char* label, CONST struct ImVec2 size, int* v, int v_min, int v_max, CONST char* display_format);
// Widgets: Color Editor/Picker (tip: the ColorEdit* functions have a little colored preview square that can be left-clicked to open a picker, and right-clicked to open an option menu.)
CIMGUI_API bool igColorEdit3(CONST char* label, float col[3], ImGuiColorEditFlags flags);
CIMGUI_API bool igColorEdit4(CONST char* label, float col[4], ImGuiColorEditFlags flags);
CIMGUI_API bool igColorPicker3(CONST char* label, float col[3], ImGuiColorEditFlags flags);
CIMGUI_API bool igColorPicker4(CONST char* label, float col[4], ImGuiColorEditFlags flags, CONST float* ref_col);
CIMGUI_API bool igColorButton(CONST char* desc_id, CONST struct ImVec4 col, ImGuiColorEditFlags flags, CONST struct ImVec2 size);
CIMGUI_API void igSetColorEditOptions(ImGuiColorEditFlags flags);
// Widgets: Drags (tip: ctrl+click on a drag box to input text) // Widgets: Drags (tip: ctrl+click on a drag box to input text)
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 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 igDragFloat2(CONST char* label, float v[2], float v_speed, float v_min, float v_max, CONST char* display_format, float power);
@@ -606,7 +653,7 @@ CIMGUI_API void igTreePushPtr(CONST void* ptr_id);
CIMGUI_API void igTreePop(); CIMGUI_API void igTreePop();
CIMGUI_API void igTreeAdvanceToLabelPos(); CIMGUI_API void igTreeAdvanceToLabelPos();
CIMGUI_API float igGetTreeNodeToLabelSpacing(); CIMGUI_API float igGetTreeNodeToLabelSpacing();
CIMGUI_API void igSetNextTreeNodeOpen(bool opened, ImGuiSetCond cond); CIMGUI_API void igSetNextTreeNodeOpen(bool opened, ImGuiCond cond);
CIMGUI_API bool igCollapsingHeader(CONST char* label, ImGuiTreeNodeFlags flags); CIMGUI_API bool igCollapsingHeader(CONST char* label, ImGuiTreeNodeFlags flags);
CIMGUI_API bool igCollapsingHeaderEx(CONST char* label, bool* p_open, ImGuiTreeNodeFlags flags); CIMGUI_API bool igCollapsingHeaderEx(CONST char* label, bool* p_open, ImGuiTreeNodeFlags flags);
@@ -624,8 +671,6 @@ CIMGUI_API void igValueBool(CONST char* prefix, bool b);
CIMGUI_API void igValueInt(CONST char* prefix, int v); CIMGUI_API void igValueInt(CONST char* prefix, int v);
CIMGUI_API void igValueUInt(CONST char* prefix, unsigned 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 igValueFloat(CONST char* prefix, float v, CONST char* float_format);
CIMGUI_API void igValueColor(CONST char* prefix, CONST struct ImVec4 v);
CIMGUI_API void igValueColor2(CONST char* prefix, ImU32 v);
// Tooltip // Tooltip
CIMGUI_API void igSetTooltip(CONST char* fmt, ...); CIMGUI_API void igSetTooltip(CONST char* fmt, ...);
@@ -648,9 +693,10 @@ CIMGUI_API void igOpenPopup(CONST char* str_id);
CIMGUI_API bool igBeginPopup(CONST char* str_id); CIMGUI_API bool igBeginPopup(CONST char* str_id);
CIMGUI_API bool igBeginPopupModal(CONST char* name, bool* p_open, 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 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 igBeginPopupContextWindow(CONST char* str_id, int mouse_button, bool also_over_items);
CIMGUI_API bool igBeginPopupContextVoid(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 igEndPopup();
CIMGUI_API bool igIsPopupOpen(CONST char* str_id);
CIMGUI_API void igCloseCurrentPopup(); CIMGUI_API void igCloseCurrentPopup();
// Logging: all text output from interface is redirected to tty/file/clipboard. Tree nodes are automatically opened. // Logging: all text output from interface is redirected to tty/file/clipboard. Tree nodes are automatically opened.
@@ -667,7 +713,7 @@ CIMGUI_API void igPopClipRect();
// Utilities // Utilities
CIMGUI_API bool igIsItemHovered(); CIMGUI_API bool igIsItemHovered();
CIMGUI_API bool igIsItemHoveredRect(); CIMGUI_API bool igIsItemRectHovered();
CIMGUI_API bool igIsItemActive(); CIMGUI_API bool igIsItemActive();
CIMGUI_API bool igIsItemClicked(int mouse_button); CIMGUI_API bool igIsItemClicked(int mouse_button);
CIMGUI_API bool igIsItemVisible(); CIMGUI_API bool igIsItemVisible();
@@ -677,17 +723,18 @@ CIMGUI_API void igGetItemRectMin(struct ImVec2* pOut);
CIMGUI_API void igGetItemRectMax(struct ImVec2* pOut); CIMGUI_API void igGetItemRectMax(struct ImVec2* pOut);
CIMGUI_API void igGetItemRectSize(struct ImVec2* pOut); CIMGUI_API void igGetItemRectSize(struct ImVec2* pOut);
CIMGUI_API void igSetItemAllowOverlap(); CIMGUI_API void igSetItemAllowOverlap();
CIMGUI_API bool igIsWindowHovered();
CIMGUI_API bool igIsWindowFocused(); CIMGUI_API bool igIsWindowFocused();
CIMGUI_API bool igIsWindowHovered();
CIMGUI_API bool igIsWindowRectHovered();
CIMGUI_API bool igIsRootWindowFocused(); CIMGUI_API bool igIsRootWindowFocused();
CIMGUI_API bool igIsRootWindowOrAnyChildFocused(); CIMGUI_API bool igIsRootWindowOrAnyChildFocused();
CIMGUI_API bool igIsRootWindowOrAnyChildHovered(); CIMGUI_API bool igIsRootWindowOrAnyChildHovered();
CIMGUI_API bool igIsAnyWindowHovered();
CIMGUI_API bool igIsRectVisible(CONST struct ImVec2 item_size); CIMGUI_API bool igIsRectVisible(CONST struct ImVec2 item_size);
CIMGUI_API bool igIsRectVisible2(CONST struct ImVec2* rect_min, CONST struct ImVec2* rect_max); CIMGUI_API bool igIsRectVisible2(CONST struct ImVec2* rect_min, CONST struct ImVec2* rect_max);
CIMGUI_API bool igIsPosHoveringAnyWindow(CONST struct ImVec2 pos);
CIMGUI_API float igGetTime(); CIMGUI_API float igGetTime();
CIMGUI_API int igGetFrameCount(); CIMGUI_API int igGetFrameCount();
CIMGUI_API CONST char* igGetStyleColName(ImGuiCol idx); CIMGUI_API CONST char* igGetStyleColorName(ImGuiCol idx);
CIMGUI_API void igCalcItemRectClosestPoint(struct ImVec2* pOut, CONST struct ImVec2 pos, bool on_edge, float outward); 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 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 void igCalcListClipping(int items_count, float items_height, int* out_items_display_start, int* out_items_display_end);
@@ -708,10 +755,8 @@ CIMGUI_API bool igIsMouseDown(int button);
CIMGUI_API bool igIsMouseClicked(int button, bool repeat); CIMGUI_API bool igIsMouseClicked(int button, bool repeat);
CIMGUI_API bool igIsMouseDoubleClicked(int button); CIMGUI_API bool igIsMouseDoubleClicked(int button);
CIMGUI_API bool igIsMouseReleased(int button); CIMGUI_API bool igIsMouseReleased(int button);
CIMGUI_API bool igIsMouseHoveringWindow();
CIMGUI_API bool igIsMouseHoveringAnyWindow();
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 bool igIsMouseDragging(int button, float lock_threshold);
CIMGUI_API bool igIsMouseHoveringRect(CONST struct ImVec2 r_min, CONST struct ImVec2 r_max, bool clip);
CIMGUI_API void igGetMousePos(struct ImVec2* pOut); CIMGUI_API void igGetMousePos(struct ImVec2* pOut);
CIMGUI_API void igGetMousePosOnOpeningCurrentPopup(struct ImVec2* pOut); CIMGUI_API void igGetMousePosOnOpeningCurrentPopup(struct ImVec2* pOut);
CIMGUI_API void igGetMouseDragDelta(struct ImVec2* pOut, int button, float lock_threshold); CIMGUI_API void igGetMouseDragDelta(struct ImVec2* pOut, int button, float lock_threshold);
@@ -742,9 +787,9 @@ CIMGUI_API void ImFontAtlas_SetTexID(struct ImFontAtlas* atlas, ImTe
CIMGUI_API struct ImFont* ImFontAtlas_AddFont(struct ImFontAtlas* atlas, CONST struct ImFontConfig* font_cfg); 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_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_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_AddFontFromMemoryTTF(struct ImFontAtlas* atlas, void* font_data, int font_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_AddFontFromMemoryCompressedTTF(struct ImFontAtlas* atlas, CONST void* compressed_font_data, int compressed_font_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 struct ImFont* ImFontAtlas_AddFontFromMemoryCompressedBase85TTF(struct ImFontAtlas* atlas, CONST char* compressed_font_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_ClearTexData(struct ImFontAtlas* atlas);
CIMGUI_API void ImFontAtlas_Clear(struct ImFontAtlas* atlas); CIMGUI_API void ImFontAtlas_Clear(struct ImFontAtlas* atlas);
CIMGUI_API CONST ImWchar* ImFontAtlas_GetGlyphRangesDefault(struct ImFontAtlas* atlas); CIMGUI_API CONST ImWchar* ImFontAtlas_GetGlyphRangesDefault(struct ImFontAtlas* atlas);
@@ -777,6 +822,8 @@ CIMGUI_API void ImDrawList_PushClipRectFullScreen(struct ImDrawList*
CIMGUI_API void ImDrawList_PopClipRect(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_PushTextureID(struct ImDrawList* list, CONST ImTextureID texture_id);
CIMGUI_API void ImDrawList_PopTextureID(struct ImDrawList* list); CIMGUI_API void ImDrawList_PopTextureID(struct ImDrawList* list);
CIMGUI_API void ImDrawList_GetClipRectMin(struct ImVec2 *pOut, struct ImDrawList* list);
CIMGUI_API void ImDrawList_GetClipRectMax(struct ImVec2 *pOut, struct ImDrawList* list);
// Primitives // Primitives
CIMGUI_API void ImDrawList_AddLine(struct ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, ImU32 col, float thickness); CIMGUI_API void ImDrawList_AddLine(struct ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, ImU32 col, float thickness);

View File

@@ -77,6 +77,16 @@ CIMGUI_API void ImDrawList_PopTextureID(ImDrawList* list)
return list->PopTextureID(); return list->PopTextureID();
} }
CIMGUI_API void ImDrawList_GetClipRectMin(ImVec2* pOut, ImDrawList* list)
{
*pOut = list->GetClipRectMin();
}
CIMGUI_API void ImDrawList_GetClipRectMax(ImVec2* pOut, ImDrawList* list)
{
*pOut = list->GetClipRectMax();
}
CIMGUI_API void ImDrawList_AddLine(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, ImU32 col, float thickness) CIMGUI_API void ImDrawList_AddLine(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, ImU32 col, float thickness)
{ {
return list->AddLine(a, b, col, thickness); return list->AddLine(a, b, col, thickness);

View File

@@ -37,19 +37,19 @@ CIMGUI_API ImFont* ImFontAtlas_AddFontFromFileTTF(ImFontAtlas* atlas,CONST char*
return atlas->AddFontFromFileTTF(filename, size_pixels, font_cfg, glyph_ranges); return atlas->AddFontFromFileTTF(filename, size_pixels, font_cfg, 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_AddFontFromMemoryTTF(ImFontAtlas* atlas, void* font_data, int font_size, float size_pixels, CONST ImFontConfig* font_cfg, CONST ImWchar* glyph_ranges)
{ {
return atlas->AddFontFromMemoryTTF(ttf_data, ttf_size, size_pixels, font_cfg, glyph_ranges); return atlas->AddFontFromMemoryTTF(font_data, font_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) CIMGUI_API ImFont* ImFontAtlas_AddFontFromMemoryCompressedTTF(ImFontAtlas* atlas, CONST void* compressed_font_data, int compressed_font_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); return atlas->AddFontFromMemoryCompressedTTF(compressed_font_data, compressed_font_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) CIMGUI_API ImFont* ImFontAtlas_AddFontFromMemoryCompressedBase85TTF(ImFontAtlas* atlas, CONST char* compressed_font_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); return atlas->AddFontFromMemoryCompressedBase85TTF(compressed_font_data_base85, size_pixels, font_cfg, glyph_ranges);
} }
CIMGUI_API void ImFontAtlas_ClearTexData(ImFontAtlas* atlas) CIMGUI_API void ImFontAtlas_ClearTexData(ImFontAtlas* atlas)

2
imgui

Submodule imgui updated: 5e1caaaef3...55a6209931