mirror of
https://github.com/cimgui/cimgui.git
synced 2025-08-10 20:08:31 +01:00
Compare commits
15 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
fa1b93bea9 | ||
![]() |
511218914b | ||
![]() |
f60eb9a510 | ||
![]() |
9e52e73e9b | ||
![]() |
6a31578c1e | ||
![]() |
50bce34b67 | ||
![]() |
14b2c5cc58 | ||
![]() |
f12e74c20f | ||
![]() |
01578cb1bd | ||
![]() |
33679d6957 | ||
![]() |
b9cd7f2d83 | ||
![]() |
1df319b232 | ||
![]() |
516547dcd9 | ||
![]() |
dbbac62a84 | ||
![]() |
389c1f1ad1 |
@@ -7,5 +7,6 @@ compiler:
|
||||
- gcc
|
||||
- clang
|
||||
|
||||
script:
|
||||
script:
|
||||
- make -C cimgui
|
||||
- $CC cimgui/cimgui.h # Make sure we can include in a plain C compiler
|
||||
|
@@ -7,7 +7,7 @@ Most of the functions have wrapper counterparts now, missing stuff is added on a
|
||||
This library is intended as a intermediate layer to be able to use imgui from other languages that can interface with C (like D - see [D-binding](https://github.com/Extrawurst/DerelictImgui))
|
||||
|
||||
Notes:
|
||||
* currently this wrapper is based on version [1.50 of imgui](https://github.com/ocornut/imgui/releases/tag/v1.50)
|
||||
* currently this wrapper is based on version [1.52 of imgui](https://github.com/ocornut/imgui/releases/tag/v1.52)
|
||||
* 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
|
||||
@@ -22,4 +22,5 @@ Notes:
|
||||
* [DerelictImgui](https://github.com/Extrawurst/DerelictImgui)
|
||||
* [ImGui.NET](https://github.com/mellinoe/ImGui.NET)
|
||||
* [imgui-rs](https://github.com/Gekkio/imgui-rs)
|
||||
* [imgui-pas](https://github.com/dpethes/imgui-pas)
|
||||
* [imgui-pas](https://github.com/dpethes/imgui-pas)
|
||||
* [odin-dear_imgui](https://github.com/ThisDrunkDane/odin-dear_imgui)
|
||||
|
@@ -2,6 +2,10 @@
|
||||
#include "../imgui/imgui.h"
|
||||
#include "cimgui.h"
|
||||
|
||||
// to use placement new
|
||||
#define IMGUI_DEFINE_PLACEMENT_NEW
|
||||
#include "../imgui/imgui_internal.h"
|
||||
|
||||
CIMGUI_API ImGuiIO* igGetIO()
|
||||
{
|
||||
return &ImGui::GetIO();
|
||||
@@ -144,29 +148,29 @@ CIMGUI_API bool igIsWindowCollapsed()
|
||||
return ImGui::IsWindowCollapsed();
|
||||
}
|
||||
|
||||
CIMGUI_API bool igIsWindowAppearing()
|
||||
{
|
||||
return ImGui::IsWindowAppearing();
|
||||
}
|
||||
|
||||
CIMGUI_API void igSetWindowFontScale(float scale)
|
||||
{
|
||||
ImGui::SetWindowFontScale(scale);
|
||||
}
|
||||
|
||||
CIMGUI_API void igSetNextWindowPos(CONST ImVec2 pos, ImGuiSetCond cond)
|
||||
CIMGUI_API void igSetNextWindowPos(CONST struct ImVec2 pos, ImGuiCond cond, CONST struct ImVec2 pivot)
|
||||
{
|
||||
ImGui::SetNextWindowPos(pos, cond);
|
||||
ImGui::SetNextWindowPos(pos, cond, pivot);
|
||||
}
|
||||
|
||||
CIMGUI_API void igSetNextWindowPosCenter(ImGuiSetCond 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);
|
||||
}
|
||||
|
||||
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);
|
||||
ImGui::SetNextWindowSizeConstraints(size_min, size_max, custom_callback, custom_callback_data);
|
||||
}
|
||||
|
||||
CIMGUI_API void igSetNextWindowContentSize(CONST ImVec2 size)
|
||||
@@ -179,7 +183,7 @@ CIMGUI_API void igSetNextWindowContentWidth(float width)
|
||||
ImGui::SetNextWindowContentWidth(width);
|
||||
}
|
||||
|
||||
CIMGUI_API void igSetNextWindowCollapsed(bool collapsed, ImGuiSetCond cond)
|
||||
CIMGUI_API void igSetNextWindowCollapsed(bool collapsed, ImGuiCond cond)
|
||||
{
|
||||
ImGui::SetNextWindowCollapsed(collapsed,cond);
|
||||
}
|
||||
@@ -189,17 +193,17 @@ CIMGUI_API void igSetNextWindowFocus()
|
||||
ImGui::SetNextWindowFocus();
|
||||
}
|
||||
|
||||
CIMGUI_API void igSetWindowPos(CONST ImVec2 pos, ImGuiSetCond cond)
|
||||
CIMGUI_API void igSetWindowPos(CONST ImVec2 pos, ImGuiCond 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);
|
||||
}
|
||||
|
||||
CIMGUI_API void igSetWindowCollapsed(bool collapsed, ImGuiSetCond cond)
|
||||
CIMGUI_API void igSetWindowCollapsed(bool collapsed, ImGuiCond cond)
|
||||
{
|
||||
ImGui::SetWindowCollapsed(collapsed,cond);
|
||||
}
|
||||
@@ -209,17 +213,17 @@ CIMGUI_API void igSetWindowFocus()
|
||||
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);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
@@ -295,6 +299,11 @@ CIMGUI_API void igPopFont()
|
||||
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)
|
||||
{
|
||||
return ImGui::PushStyleColor(idx, col);
|
||||
@@ -320,6 +329,11 @@ CIMGUI_API void igPopStyleVar(int count)
|
||||
return ImGui::PopStyleVar(count);
|
||||
}
|
||||
|
||||
CIMGUI_API void igGetStyleColorVec4(ImVec4* pOut, ImGuiCol idx)
|
||||
{
|
||||
*pOut = ImGui::GetStyleColorVec4(idx);
|
||||
}
|
||||
|
||||
CIMGUI_API ImFont* igGetFont()
|
||||
{
|
||||
return ImGui::GetFont();
|
||||
@@ -345,6 +359,11 @@ CIMGUI_API ImU32 igGetColorU32Vec(CONST ImVec4* col)
|
||||
return ImGui::GetColorU32(*col);
|
||||
}
|
||||
|
||||
CIMGUI_API ImU32 igGetColorU32U32(ImU32 col)
|
||||
{
|
||||
return ImGui::GetColorU32(col);
|
||||
}
|
||||
|
||||
// Parameters stacks (current window)
|
||||
CIMGUI_API void igPushItemWidth(float item_width)
|
||||
{
|
||||
@@ -421,6 +440,11 @@ CIMGUI_API void igOpenPopup(CONST char* str_id)
|
||||
return ImGui::OpenPopup(str_id);
|
||||
}
|
||||
|
||||
CIMGUI_API bool igOpenPopupOnItemClick(const char * str_id, int mouse_button)
|
||||
{
|
||||
return ImGui::OpenPopupOnItemClick(str_id, mouse_button);
|
||||
}
|
||||
|
||||
CIMGUI_API bool igBeginPopup(CONST char* str_id)
|
||||
{
|
||||
return ImGui::BeginPopup(str_id);
|
||||
@@ -436,9 +460,9 @@ CIMGUI_API bool igBeginPopupContextItem(CONST char* str_id, int 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)
|
||||
@@ -451,6 +475,11 @@ CIMGUI_API void igEndPopup()
|
||||
return ImGui::EndPopup();
|
||||
}
|
||||
|
||||
CIMGUI_API bool igIsPopupOpen(CONST char* str_id)
|
||||
{
|
||||
return ImGui::IsPopupOpen(str_id);
|
||||
}
|
||||
|
||||
CIMGUI_API void igCloseCurrentPopup()
|
||||
{
|
||||
return ImGui::CloseCurrentPopup();
|
||||
@@ -548,9 +577,9 @@ CIMGUI_API void igSetCursorScreenPos(CONST ImVec2 pos)
|
||||
return ImGui::SetCursorScreenPos(pos);
|
||||
}
|
||||
|
||||
CIMGUI_API void igAlignFirstTextHeightToWidgets()
|
||||
CIMGUI_API void igAlignTextToFramePadding()
|
||||
{
|
||||
return ImGui::AlignFirstTextHeightToWidgets();
|
||||
return ImGui::AlignTextToFramePadding();
|
||||
}
|
||||
|
||||
CIMGUI_API float igGetTextLineHeight()
|
||||
@@ -585,6 +614,16 @@ CIMGUI_API int igGetColumnIndex()
|
||||
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)
|
||||
{
|
||||
return ImGui::GetColumnOffset(column_index);
|
||||
@@ -595,11 +634,6 @@ 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();
|
||||
@@ -608,43 +642,43 @@ 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')
|
||||
CIMGUI_API void igPushIdStr(CONST char* str_id)
|
||||
CIMGUI_API void igPushIDStr(CONST char* str_id)
|
||||
{
|
||||
return ImGui::PushID(str_id);
|
||||
}
|
||||
|
||||
CIMGUI_API void igPushIdStrRange(CONST char* str_begin, CONST char* str_end)
|
||||
CIMGUI_API void igPushIDStrRange(CONST char* str_begin, CONST char* str_end)
|
||||
{
|
||||
return ImGui::PushID(str_begin, str_end);
|
||||
}
|
||||
|
||||
|
||||
CIMGUI_API void igPushIdPtr(CONST void* ptr_id)
|
||||
CIMGUI_API void igPushIDPtr(CONST void* ptr_id)
|
||||
{
|
||||
return ImGui::PushID(ptr_id);
|
||||
}
|
||||
|
||||
CIMGUI_API void igPushIdInt(int int_id)
|
||||
CIMGUI_API void igPushIDInt(int int_id)
|
||||
{
|
||||
return ImGui::PushID(int_id);
|
||||
}
|
||||
|
||||
CIMGUI_API void igPopId()
|
||||
CIMGUI_API void igPopID()
|
||||
{
|
||||
return ImGui::PopID();
|
||||
}
|
||||
|
||||
CIMGUI_API ImGuiID igGetIdStr(CONST char* str_id)
|
||||
CIMGUI_API ImGuiID igGetIDStr(CONST char* str_id)
|
||||
{
|
||||
return ImGui::GetID(str_id);
|
||||
}
|
||||
|
||||
CIMGUI_API ImGuiID igGetIdStrRange(CONST char* str_begin, CONST char* str_end)
|
||||
CIMGUI_API ImGuiID igGetIDStrRange(CONST char* str_begin, CONST char* str_end)
|
||||
{
|
||||
return ImGui::GetID(str_begin, str_end);
|
||||
}
|
||||
|
||||
CIMGUI_API ImGuiID igGetIdPtr(CONST void* ptr_id)
|
||||
CIMGUI_API ImGuiID igGetIDPtr(CONST void* ptr_id)
|
||||
{
|
||||
return ImGui::GetID(ptr_id);
|
||||
}
|
||||
@@ -798,26 +832,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);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
return ImGui::PlotLines(label, values, values_count, values_offset, overlay_text, scale_min, scale_max, graph_size, stride);
|
||||
@@ -838,7 +852,7 @@ CIMGUI_API void igPlotHistogram2(CONST char* label, float(*values_getter)(void*
|
||||
return ImGui::PlotHistogram(label, values_getter, data, values_count, values_offset, overlay_text, scale_min, scale_max, graph_size);
|
||||
}
|
||||
|
||||
CIMGUI_API void igProgressBar(float fraction, CONST ImVec2* size_arg, const char* overlay)
|
||||
CIMGUI_API void igProgressBar(float fraction, CONST ImVec2* size_arg, CONST char* overlay)
|
||||
{
|
||||
return ImGui::ProgressBar(fraction,*size_arg,overlay);
|
||||
}
|
||||
@@ -899,6 +913,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);
|
||||
}
|
||||
|
||||
// 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, ref_col);
|
||||
}
|
||||
|
||||
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)
|
||||
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 +1143,7 @@ CIMGUI_API float igGetTreeNodeToLabelSpacing()
|
||||
return ImGui::GetTreeNodeToLabelSpacing();
|
||||
}
|
||||
|
||||
CIMGUI_API void igSetNextTreeNodeOpen(bool opened, ImGuiSetCond cond)
|
||||
CIMGUI_API void igSetNextTreeNodeOpen(bool opened, ImGuiCond cond)
|
||||
{
|
||||
return ImGui::SetNextTreeNodeOpen(opened, cond);
|
||||
}
|
||||
@@ -1210,16 +1255,6 @@ CIMGUI_API void igValueFloat(CONST char* prefix, float v, CONST char* float_form
|
||||
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.
|
||||
CIMGUI_API void igLogToTTY(int max_depth)
|
||||
{
|
||||
@@ -1251,7 +1286,7 @@ CIMGUI_API void igLogText(CONST char* fmt, ...)
|
||||
char buffer[256];
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
snprintf(buffer, 256, fmt, args);
|
||||
vsnprintf(buffer, 256, fmt, args);
|
||||
va_end(args);
|
||||
|
||||
ImGui::LogText("%s",buffer);
|
||||
@@ -1267,15 +1302,15 @@ CIMGUI_API void igPopClipRect()
|
||||
return ImGui::PopClipRect();
|
||||
}
|
||||
|
||||
// Utilities
|
||||
CIMGUI_API bool igIsItemHovered()
|
||||
CIMGUI_API void igStyleColorsClassic(struct ImGuiStyle * dst)
|
||||
{
|
||||
return ImGui::IsItemHovered();
|
||||
ImGui::StyleColorsClassic(dst);
|
||||
}
|
||||
|
||||
CIMGUI_API bool igIsItemHoveredRect()
|
||||
// Utilities
|
||||
CIMGUI_API bool igIsItemHovered(ImGuiHoveredFlags flags)
|
||||
{
|
||||
return ImGui::IsItemHoveredRect();
|
||||
return ImGui::IsItemHovered(flags);
|
||||
}
|
||||
|
||||
CIMGUI_API bool igIsItemActive()
|
||||
@@ -1323,16 +1358,16 @@ CIMGUI_API void igSetItemAllowOverlap()
|
||||
ImGui::SetItemAllowOverlap();
|
||||
}
|
||||
|
||||
CIMGUI_API bool igIsWindowHovered()
|
||||
{
|
||||
return ImGui::IsWindowHovered();
|
||||
}
|
||||
|
||||
CIMGUI_API bool igIsWindowFocused()
|
||||
{
|
||||
return ImGui::IsWindowFocused();
|
||||
}
|
||||
|
||||
CIMGUI_API bool igIsWindowHovered(ImGuiHoveredFlags)
|
||||
{
|
||||
return ImGui::IsWindowHovered();
|
||||
}
|
||||
|
||||
CIMGUI_API bool igIsRootWindowFocused()
|
||||
{
|
||||
return ImGui::IsRootWindowFocused();
|
||||
@@ -1343,9 +1378,14 @@ CIMGUI_API bool igIsRootWindowOrAnyChildFocused()
|
||||
return ImGui::IsRootWindowOrAnyChildFocused();
|
||||
}
|
||||
|
||||
CIMGUI_API bool igIsRootWindowOrAnyChildHovered()
|
||||
CIMGUI_API bool igIsRootWindowOrAnyChildHovered(ImGuiHoveredFlags flags)
|
||||
{
|
||||
return ImGui::IsRootWindowOrAnyChildHovered();
|
||||
return ImGui::IsRootWindowOrAnyChildHovered(flags);
|
||||
}
|
||||
|
||||
CIMGUI_API bool igIsAnyWindowHovered()
|
||||
{
|
||||
return ImGui::IsAnyWindowHovered();
|
||||
}
|
||||
|
||||
CIMGUI_API bool igIsRectVisible(CONST ImVec2 item_size)
|
||||
@@ -1378,6 +1418,11 @@ CIMGUI_API bool igIsKeyReleased(int user_key_index)
|
||||
return ImGui::IsKeyReleased(user_key_index);
|
||||
}
|
||||
|
||||
CIMGUI_API int igGetKeyPressedAmount(int key_index, float repeat_delay, float rate)
|
||||
{
|
||||
return ImGui::GetKeyPressedAmount(key_index, repeat_delay, rate);
|
||||
}
|
||||
|
||||
CIMGUI_API bool igIsMouseDown(int button)
|
||||
{
|
||||
return ImGui::IsMouseDown(button);
|
||||
@@ -1398,14 +1443,9 @@ CIMGUI_API bool igIsMouseReleased(int button)
|
||||
return ImGui::IsMouseReleased(button);
|
||||
}
|
||||
|
||||
CIMGUI_API bool igIsMouseHoveringWindow()
|
||||
CIMGUI_API bool igIsMouseDragging(int button, float lock_threshold)
|
||||
{
|
||||
return ImGui::IsMouseHoveringWindow();
|
||||
}
|
||||
|
||||
CIMGUI_API bool igIsMouseHoveringAnyWindow()
|
||||
{
|
||||
return ImGui::IsMouseHoveringAnyWindow();
|
||||
return ImGui::IsMouseDragging(button,lock_threshold);
|
||||
}
|
||||
|
||||
CIMGUI_API bool igIsMouseHoveringRect(CONST ImVec2 r_min, CONST ImVec2 r_max, bool clip)
|
||||
@@ -1413,13 +1453,9 @@ CIMGUI_API bool igIsMouseHoveringRect(CONST ImVec2 r_min, CONST ImVec2 r_max, bo
|
||||
return ImGui::IsMouseHoveringRect(r_min,r_max,clip);
|
||||
}
|
||||
|
||||
CIMGUI_API bool igIsMouseDragging(int button, float lock_threshold)
|
||||
CIMGUI_API bool igIsMousePosValid(CONST struct ImVec2 * mouse_pos)
|
||||
{
|
||||
return ImGui::IsMouseDragging(button,lock_threshold);
|
||||
}
|
||||
CIMGUI_API bool igIsPosHoveringAnyWindow(CONST ImVec2 pos)
|
||||
{
|
||||
return ImGui::IsPosHoveringAnyWindow(pos);
|
||||
return ImGui::IsMousePosValid(mouse_pos);
|
||||
}
|
||||
|
||||
CIMGUI_API void igGetMousePos(ImVec2* pOut)
|
||||
@@ -1492,9 +1528,9 @@ CIMGUI_API int igGetFrameCount()
|
||||
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)
|
||||
@@ -1582,121 +1618,202 @@ CIMGUI_API void ImGuiIO_ClearInputCharacters()
|
||||
return ImGui::GetIO().ClearInputCharacters();
|
||||
}
|
||||
|
||||
CIMGUI_API void ImGuiTextFilter_Init(struct ImGuiTextFilter* filter, const char* default_filter)
|
||||
CIMGUI_API struct ImGuiTextFilter* ImGuiTextFilter_Create(const char* default_filter)
|
||||
{
|
||||
*filter = ImGuiTextFilter(default_filter);
|
||||
ImGuiTextFilter* filter = (ImGuiTextFilter*)ImGui::MemAlloc(sizeof(ImGuiTextFilter));
|
||||
IM_PLACEMENT_NEW(filter) ImGuiTextFilter(default_filter);
|
||||
return filter;
|
||||
}
|
||||
|
||||
CIMGUI_API void ImGuiTextFilter_Clear(struct ImGuiTextFilter* filter)
|
||||
CIMGUI_API void ImGuiTextFilter_Destroy(struct ImGuiTextFilter* filter)
|
||||
{
|
||||
filter->Clear();
|
||||
filter->~ImGuiTextFilter();
|
||||
ImGui::MemFree(filter);
|
||||
}
|
||||
|
||||
CIMGUI_API bool ImGuiTextFilter_Draw(struct ImGuiTextFilter* filter, const char* label, float width)
|
||||
CIMGUI_API void ImGuiTextFilter_Clear(struct ImGuiTextFilter* filter)
|
||||
{
|
||||
return filter->Draw(label, width);
|
||||
filter->Clear();
|
||||
}
|
||||
|
||||
CIMGUI_API bool ImGuiTextFilter_PassFilter(struct ImGuiTextFilter* filter, const char* text, const char* text_end)
|
||||
CIMGUI_API bool ImGuiTextFilter_Draw(struct ImGuiTextFilter* filter, const char* label, float width)
|
||||
{
|
||||
return filter->PassFilter(text, text_end);
|
||||
return filter->Draw(label, width);
|
||||
}
|
||||
|
||||
CIMGUI_API bool ImGuiTextFilter_IsActive(struct ImGuiTextFilter* filter)
|
||||
CIMGUI_API bool ImGuiTextFilter_PassFilter(const struct ImGuiTextFilter* filter, const char* text, const char* text_end)
|
||||
{
|
||||
return filter->IsActive();
|
||||
}
|
||||
CIMGUI_API void ImGuiTextFilter_Build(struct ImGuiTextFilter* filter)
|
||||
{
|
||||
filter->Build();
|
||||
return filter->PassFilter(text, text_end);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImGuiTextEditCallbackData_DeleteChars(struct ImGuiTextEditCallbackData* data, int pos, int bytes_count)
|
||||
CIMGUI_API bool ImGuiTextFilter_IsActive(const struct ImGuiTextFilter* filter)
|
||||
{
|
||||
data->DeleteChars(pos, bytes_count);
|
||||
return filter->IsActive();
|
||||
}
|
||||
|
||||
CIMGUI_API void ImGuiTextEditCallbackData_InsertChars(struct ImGuiTextEditCallbackData* data, int pos, const char* text, const char* text_end)
|
||||
CIMGUI_API void ImGuiTextFilter_Build(struct ImGuiTextFilter* filter)
|
||||
{
|
||||
data->InsertChars(pos, text, text_end);
|
||||
filter->Build();
|
||||
}
|
||||
|
||||
CIMGUI_API bool ImGuiTextEditCallbackData_HasSelection(struct ImGuiTextEditCallbackData* data)
|
||||
CIMGUI_API const char* ImGuiTextFilter_GetInputBuf(struct ImGuiTextFilter* filter)
|
||||
{
|
||||
return data->HasSelection();
|
||||
return filter->InputBuf;
|
||||
}
|
||||
|
||||
CIMGUI_API void ImGuiStorage_Init(struct ImGuiStorage* storage)
|
||||
CIMGUI_API struct ImGuiTextBuffer* ImGuiTextBuffer_Create()
|
||||
{
|
||||
*storage = ImGuiStorage();
|
||||
ImGuiTextBuffer* buffer = (ImGuiTextBuffer*)ImGui::MemAlloc(sizeof(ImGuiTextBuffer));
|
||||
IM_PLACEMENT_NEW(buffer) ImGuiTextBuffer();
|
||||
return buffer;
|
||||
}
|
||||
|
||||
CIMGUI_API void ImGuiTextBuffer_Destroy(struct ImGuiTextBuffer* buffer)
|
||||
{
|
||||
buffer->~ImGuiTextBuffer();
|
||||
ImGui::MemFree(buffer);
|
||||
}
|
||||
|
||||
CIMGUI_API char ImGuiTextBuffer_index(struct ImGuiTextBuffer* buffer, int i)
|
||||
{
|
||||
return (*buffer)[i];
|
||||
}
|
||||
|
||||
CIMGUI_API const char* ImGuiTextBuffer_begin(const struct ImGuiTextBuffer* buffer)
|
||||
{
|
||||
return buffer->begin();
|
||||
}
|
||||
|
||||
CIMGUI_API const char* ImGuiTextBuffer_end(const struct ImGuiTextBuffer* buffer)
|
||||
{
|
||||
return buffer->end();
|
||||
}
|
||||
|
||||
CIMGUI_API int ImGuiTextBuffer_size(const struct ImGuiTextBuffer* buffer)
|
||||
{
|
||||
return buffer->size();
|
||||
}
|
||||
|
||||
CIMGUI_API bool ImGuiTextBuffer_empty(struct ImGuiTextBuffer* buffer)
|
||||
{
|
||||
return buffer->empty();
|
||||
}
|
||||
|
||||
CIMGUI_API void ImGuiTextBuffer_clear(struct ImGuiTextBuffer* buffer)
|
||||
{
|
||||
buffer->clear();
|
||||
}
|
||||
|
||||
CIMGUI_API const char* ImGuiTextBuffer_c_str(const struct ImGuiTextBuffer* buffer)
|
||||
{
|
||||
return buffer->c_str();
|
||||
}
|
||||
|
||||
CIMGUI_API void ImGuiTextBuffer_append(struct ImGuiTextBuffer* buffer, const char* fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
buffer->appendv(fmt, args);
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImGuiTextBuffer_appendv(struct ImGuiTextBuffer* buffer, const char* fmt, va_list args)
|
||||
{
|
||||
buffer->appendv(fmt, args);
|
||||
}
|
||||
|
||||
CIMGUI_API struct ImGuiStorage* ImGuiStorage_Create() {
|
||||
ImGuiStorage* storage = (ImGuiStorage*)ImGui::MemAlloc(sizeof(ImGuiStorage));
|
||||
IM_PLACEMENT_NEW(storage) ImGuiStorage();
|
||||
return storage;
|
||||
}
|
||||
|
||||
CIMGUI_API void ImGuiStorage_Destroy(struct ImGuiStorage* storage) {
|
||||
storage->~ImGuiStorage();
|
||||
ImGui::MemFree(storage);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImGuiStorage_Clear(struct ImGuiStorage* storage)
|
||||
{
|
||||
storage->Clear();
|
||||
storage->Clear();
|
||||
}
|
||||
|
||||
CIMGUI_API int ImGuiStorage_GetInt(struct ImGuiStorage* storage, ImGuiID key, int default_val)
|
||||
{
|
||||
return storage->GetInt(key, default_val);
|
||||
return storage->GetInt(key, default_val);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImGuiStorage_SetInt(struct ImGuiStorage* storage, ImGuiID key, int val)
|
||||
{
|
||||
storage->SetInt(key, val);
|
||||
storage->SetInt(key, val);
|
||||
}
|
||||
|
||||
CIMGUI_API bool ImGuiStorage_GetBool(struct ImGuiStorage* storage, ImGuiID key, bool default_val)
|
||||
{
|
||||
return storage->GetBool(key, default_val);
|
||||
return storage->GetBool(key, default_val);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImGuiStorage_SetBool(struct ImGuiStorage* storage, ImGuiID key, bool val)
|
||||
{
|
||||
storage->SetBool(key, val);
|
||||
storage->SetBool(key, val);
|
||||
}
|
||||
|
||||
CIMGUI_API float ImGuiStorage_GetFloat(struct ImGuiStorage* storage, ImGuiID key, float default_val)
|
||||
CIMGUI_API float ImGuiStorage_GetFloat(struct ImGuiStorage* storage, ImGuiID key, float default_val)
|
||||
{
|
||||
return storage->GetFloat(key, default_val);
|
||||
return storage->GetFloat(key, default_val);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImGuiStorage_SetFloat(struct ImGuiStorage* storage, ImGuiID key, float val)
|
||||
{
|
||||
storage->SetFloat(key, val);
|
||||
storage->SetFloat(key, val);
|
||||
}
|
||||
|
||||
CIMGUI_API void* ImGuiStorage_GetVoidPtr(struct ImGuiStorage* storage, ImGuiID key)
|
||||
CIMGUI_API void* ImGuiStorage_GetVoidPtr(struct ImGuiStorage* storage, ImGuiID key)
|
||||
{
|
||||
return storage->GetVoidPtr(key);
|
||||
return storage->GetVoidPtr(key);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImGuiStorage_SetVoidPtr(struct ImGuiStorage* storage, ImGuiID key, void* val)
|
||||
{
|
||||
storage->SetVoidPtr(key, val);
|
||||
storage->SetVoidPtr(key, val);
|
||||
}
|
||||
|
||||
CIMGUI_API int* ImGuiStorage_GetIntRef(struct ImGuiStorage* storage, ImGuiID key, int default_val)
|
||||
{
|
||||
return storage->GetIntRef(key, default_val);
|
||||
return storage->GetIntRef(key, default_val);
|
||||
}
|
||||
|
||||
CIMGUI_API bool* ImGuiStorage_GetBoolRef(struct ImGuiStorage* storage, ImGuiID key, bool default_val)
|
||||
CIMGUI_API bool* ImGuiStorage_GetBoolRef(struct ImGuiStorage* storage, ImGuiID key, bool default_val)
|
||||
{
|
||||
return storage->GetBoolRef(key, default_val);
|
||||
return storage->GetBoolRef(key, default_val);
|
||||
}
|
||||
|
||||
CIMGUI_API float* ImGuiStorage_GetFloatRef(struct ImGuiStorage* storage, ImGuiID key, float default_val)
|
||||
{
|
||||
return storage->GetFloatRef(key, default_val);
|
||||
return storage->GetFloatRef(key, default_val);
|
||||
}
|
||||
|
||||
CIMGUI_API void** ImGuiStorage_GetVoidPtrRef(struct ImGuiStorage* storage, ImGuiID key, void* default_val)
|
||||
{
|
||||
return storage->GetVoidPtrRef(key, default_val);
|
||||
return storage->GetVoidPtrRef(key, default_val);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImGuiStorage_SetAllInt(struct ImGuiStorage* storage, int val)
|
||||
{
|
||||
storage->SetAllInt(val);
|
||||
}
|
||||
storage->SetAllInt(val);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImGuiTextEditCallbackData_DeleteChars(struct ImGuiTextEditCallbackData* data, int pos, int bytes_count)
|
||||
{
|
||||
data->DeleteChars(pos, bytes_count);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImGuiTextEditCallbackData_InsertChars(struct ImGuiTextEditCallbackData* data, int pos, const char* text, const char* text_end)
|
||||
{
|
||||
data->InsertChars(pos, text, text_end);
|
||||
}
|
||||
|
||||
CIMGUI_API bool ImGuiTextEditCallbackData_HasSelection(struct ImGuiTextEditCallbackData* data)
|
||||
{
|
||||
return data->HasSelection();
|
||||
}
|
||||
|
483
cimgui/cimgui.h
483
cimgui/cimgui.h
@@ -2,7 +2,11 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#if defined _WIN32 || defined __CYGWIN__
|
||||
#ifdef CIMGUI_NO_EXPORT
|
||||
#define API
|
||||
#else
|
||||
#define API __declspec(dllexport)
|
||||
#endif
|
||||
#ifndef __GNUC__
|
||||
#define snprintf sprintf_s
|
||||
#endif
|
||||
@@ -37,24 +41,38 @@ struct ImDrawCmd;
|
||||
struct ImGuiListClipper;
|
||||
struct ImGuiTextFilter;
|
||||
|
||||
#if defined __cplusplus
|
||||
#define IMFONTGLYPH ImFontGlyph
|
||||
#else
|
||||
struct Glyph;
|
||||
#define IMFONTGLYPH Glyph
|
||||
#endif
|
||||
|
||||
typedef unsigned short ImDrawIdx;
|
||||
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 ImGuiColorEditMode;
|
||||
typedef int ImGuiMouseCursor;
|
||||
typedef int ImGuiWindowFlags;
|
||||
typedef int ImGuiSetCond;
|
||||
typedef int ImGuiInputTextFlags;
|
||||
typedef int ImGuiSelectableFlags;
|
||||
typedef int ImGuiTreeNodeFlags;
|
||||
typedef unsigned short ImWchar;
|
||||
typedef void* ImTextureID;
|
||||
typedef ImU32 ImGuiID;
|
||||
typedef int ImGuiCol;
|
||||
typedef int ImGuiStyleVar;
|
||||
typedef int ImGuiKey;
|
||||
typedef int ImGuiColorEditFlags;
|
||||
typedef int ImGuiMouseCursor;
|
||||
typedef int ImGuiWindowFlags;
|
||||
typedef int ImGuiCond;
|
||||
typedef int ImGuiColumnsFlags;
|
||||
typedef int ImGuiInputTextFlags;
|
||||
typedef int ImGuiSelectableFlags;
|
||||
typedef int ImGuiTreeNodeFlags;
|
||||
typedef int ImGuiHoveredFlags;
|
||||
typedef int (*ImGuiTextEditCallback)(struct ImGuiTextEditCallbackData *data);
|
||||
typedef void (*ImGuiSizeConstraintCallback)(struct ImGuiSizeConstraintCallbackData* data);
|
||||
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
|
||||
struct ImVec2 {
|
||||
@@ -115,6 +133,7 @@ enum {
|
||||
ImGuiTreeNodeFlags_OpenOnArrow = 1 << 7,
|
||||
ImGuiTreeNodeFlags_Leaf = 1 << 8,
|
||||
ImGuiTreeNodeFlags_Bullet = 1 << 9,
|
||||
ImGuiTreeNodeFlags_FramePadding = 1 << 10,
|
||||
ImGuiTreeNodeFlags_CollapsingHeader = ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoAutoOpenOnLog
|
||||
};
|
||||
|
||||
@@ -124,6 +143,15 @@ enum {
|
||||
ImGuiSelectableFlags_AllowDoubleClick = 1 << 2
|
||||
};
|
||||
|
||||
enum ImGuiHoveredFlags_
|
||||
{
|
||||
ImGuiHoveredFlags_Default = 0,
|
||||
ImGuiHoveredFlags_AllowWhenBlockedByPopup = 1 << 0,
|
||||
ImGuiHoveredFlags_AllowWhenBlockedByActiveItem = 1 << 2,
|
||||
ImGuiHoveredFlags_AllowWhenOverlapped = 1 << 3,
|
||||
ImGuiHoveredFlags_RectOnly = ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_AllowWhenOverlapped
|
||||
};
|
||||
|
||||
enum {
|
||||
ImGuiKey_Tab,
|
||||
ImGuiKey_LeftArrow,
|
||||
@@ -159,8 +187,8 @@ enum {
|
||||
ImGuiCol_FrameBgHovered,
|
||||
ImGuiCol_FrameBgActive,
|
||||
ImGuiCol_TitleBg,
|
||||
ImGuiCol_TitleBgCollapsed,
|
||||
ImGuiCol_TitleBgActive,
|
||||
ImGuiCol_TitleBgCollapsed,
|
||||
ImGuiCol_MenuBarBg,
|
||||
ImGuiCol_ScrollbarBg,
|
||||
ImGuiCol_ScrollbarGrab,
|
||||
@@ -176,9 +204,9 @@ enum {
|
||||
ImGuiCol_Header,
|
||||
ImGuiCol_HeaderHovered,
|
||||
ImGuiCol_HeaderActive,
|
||||
ImGuiCol_Column,
|
||||
ImGuiCol_ColumnHovered,
|
||||
ImGuiCol_ColumnActive,
|
||||
ImGuiCol_Separator,
|
||||
ImGuiCol_SeparatorHovered,
|
||||
ImGuiCol_SeparatorActive,
|
||||
ImGuiCol_ResizeGrip,
|
||||
ImGuiCol_ResizeGripHovered,
|
||||
ImGuiCol_ResizeGripActive,
|
||||
@@ -211,11 +239,25 @@ enum {
|
||||
};
|
||||
|
||||
enum {
|
||||
ImGuiColorEditMode_UserSelect = -2,
|
||||
ImGuiColorEditMode_UserSelectShowButton = -1,
|
||||
ImGuiColorEditMode_RGB = 0,
|
||||
ImGuiColorEditMode_HSV = 1,
|
||||
ImGuiColorEditMode_HEX = 2
|
||||
ImGuiColorEditFlags_NoAlpha = 1 << 1,
|
||||
ImGuiColorEditFlags_NoPicker = 1 << 2,
|
||||
ImGuiColorEditFlags_NoOptions = 1 << 3,
|
||||
ImGuiColorEditFlags_NoSmallPreview = 1 << 4,
|
||||
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 {
|
||||
@@ -231,10 +273,10 @@ enum {
|
||||
};
|
||||
|
||||
enum {
|
||||
ImGuiSetCond_Always = 1 << 0,
|
||||
ImGuiSetCond_Once = 1 << 1,
|
||||
ImGuiSetCond_FirstUseEver = 1 << 2,
|
||||
ImGuiSetCond_Appearing = 1 << 3
|
||||
ImGuiCond_Always = 1 << 0,
|
||||
ImGuiCond_Once = 1 << 1,
|
||||
ImGuiCond_FirstUseEver = 1 << 2,
|
||||
ImGuiCond_Appearing = 1 << 3
|
||||
};
|
||||
|
||||
struct ImGuiStyle {
|
||||
@@ -242,7 +284,7 @@ struct ImGuiStyle {
|
||||
struct ImVec2 WindowPadding;
|
||||
struct ImVec2 WindowMinSize;
|
||||
float WindowRounding;
|
||||
ImVec2 WindowTitleAlign;
|
||||
struct ImVec2 WindowTitleAlign;
|
||||
float ChildWindowRounding;
|
||||
struct ImVec2 FramePadding;
|
||||
float FrameRounding;
|
||||
@@ -255,7 +297,7 @@ struct ImGuiStyle {
|
||||
float ScrollbarRounding;
|
||||
float GrabMinSize;
|
||||
float GrabRounding;
|
||||
ImVec2 ButtonTextAlign;
|
||||
struct ImVec2 ButtonTextAlign;
|
||||
struct ImVec2 DisplayWindowPadding;
|
||||
struct ImVec2 DisplaySafeAreaPadding;
|
||||
bool AntiAliasedLines;
|
||||
@@ -280,7 +322,7 @@ struct ImGuiIO {
|
||||
struct ImFontAtlas* Fonts;
|
||||
float FontGlobalScale;
|
||||
bool FontAllowUserScaling;
|
||||
ImFont* FontDefault;
|
||||
struct ImFont* FontDefault;
|
||||
struct ImVec2 DisplayFramebufferScale;
|
||||
struct ImVec2 DisplayVisibleMin;
|
||||
struct ImVec2 DisplayVisibleMax;
|
||||
@@ -311,7 +353,7 @@ struct ImGuiIO {
|
||||
int MetricsRenderVertices;
|
||||
int MetricsRenderIndices;
|
||||
int MetricsActiveWindows;
|
||||
ImVec2 MouseDelta;
|
||||
struct ImVec2 MouseDelta;
|
||||
struct ImVec2 MousePosPrev;
|
||||
bool MouseClicked[5];
|
||||
struct ImVec2 MouseClickedPos[5];
|
||||
@@ -365,6 +407,13 @@ struct ImDrawData {
|
||||
int TotalIdxCount;
|
||||
};
|
||||
|
||||
struct ImDrawVert
|
||||
{
|
||||
struct ImVec2 pos;
|
||||
struct ImVec2 uv;
|
||||
ImU32 col;
|
||||
};
|
||||
|
||||
struct ImFontConfig {
|
||||
void* FontData;
|
||||
int FontDataSize;
|
||||
@@ -374,28 +423,39 @@ struct ImFontConfig {
|
||||
int OversampleH, OversampleV;
|
||||
bool PixelSnapH;
|
||||
struct ImVec2 GlyphExtraSpacing;
|
||||
ImVec2 GlyphOffset;
|
||||
struct ImVec2 GlyphOffset;
|
||||
const ImWchar* GlyphRanges;
|
||||
bool MergeMode;
|
||||
char Name[32];
|
||||
struct ImFont* DstFont;
|
||||
};
|
||||
|
||||
struct ImGuiListClipper
|
||||
{
|
||||
float StartPosY;
|
||||
float ItemsHeight;
|
||||
int ItemsCount, StepNo, DisplayStart, DisplayEnd;
|
||||
};
|
||||
#endif // CIMGUI_DEFINE_ENUMS_AND_STRUCTS
|
||||
|
||||
// Main
|
||||
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);
|
||||
|
||||
// Demo/Debug/Info
|
||||
CIMGUI_API void igShowTestWindow(bool* opened);
|
||||
CIMGUI_API void igShowMetricsWindow(bool* opened);
|
||||
CIMGUI_API void igShowStyleEditor(struct ImGuiStyle* ref);
|
||||
CIMGUI_API void igShowUserGuide();
|
||||
|
||||
// Window
|
||||
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);
|
||||
//Is going to be obsolete,
|
||||
//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);
|
||||
@@ -412,23 +472,23 @@ CIMGUI_API void igGetWindowSize(struct ImVec2* out);
|
||||
CIMGUI_API float igGetWindowWidth();
|
||||
CIMGUI_API float igGetWindowHeight();
|
||||
CIMGUI_API bool igIsWindowCollapsed();
|
||||
CIMGUI_API bool igIsWindowAppearing();
|
||||
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 igSetNextWindowPos(CONST struct ImVec2 pos, ImGuiCond cond, CONST struct ImVec2 pivot);
|
||||
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 igSetNextWindowContentSize(CONST struct ImVec2 size);
|
||||
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 igSetWindowPos(CONST struct ImVec2 pos, ImGuiSetCond cond);
|
||||
CIMGUI_API void igSetWindowSize(CONST struct ImVec2 size, ImGuiSetCond cond);
|
||||
CIMGUI_API void igSetWindowCollapsed(bool collapsed, ImGuiSetCond cond);
|
||||
CIMGUI_API void igSetWindowPos(CONST struct ImVec2 pos, ImGuiCond cond);
|
||||
CIMGUI_API void igSetWindowSize(CONST struct ImVec2 size, ImGuiCond cond);
|
||||
CIMGUI_API void igSetWindowCollapsed(bool collapsed, ImGuiCond cond);
|
||||
CIMGUI_API void igSetWindowFocus();
|
||||
CIMGUI_API void igSetWindowPosByName(CONST char* name, CONST struct ImVec2 pos, ImGuiSetCond cond);
|
||||
CIMGUI_API void igSetWindowSize2(CONST char* name, CONST struct ImVec2 size, ImGuiSetCond cond);
|
||||
CIMGUI_API void igSetWindowCollapsed2(CONST char* name, bool collapsed, ImGuiSetCond cond);
|
||||
CIMGUI_API void igSetWindowPosByName(CONST char* name, CONST struct ImVec2 pos, ImGuiCond cond);
|
||||
CIMGUI_API void igSetWindowSize2(CONST char* name, CONST struct ImVec2 size, ImGuiCond cond);
|
||||
CIMGUI_API void igSetWindowCollapsed2(CONST char* name, bool collapsed, ImGuiCond cond);
|
||||
CIMGUI_API void igSetWindowFocus2(CONST char* name);
|
||||
|
||||
CIMGUI_API float igGetScrollX();
|
||||
@@ -446,16 +506,19 @@ CIMGUI_API struct ImGuiStorage* igGetStateStorage();
|
||||
// Parameters stacks (shared)
|
||||
CIMGUI_API void igPushFont(struct ImFont* font);
|
||||
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 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 void igGetStyleColorVec4(struct ImVec4 *pOut, ImGuiCol idx);
|
||||
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 struct ImVec4* col);
|
||||
CIMGUI_API ImU32 igGetColorU32U32(ImU32 col);
|
||||
|
||||
|
||||
// Parameters stacks (current window)
|
||||
@@ -469,7 +532,7 @@ CIMGUI_API void igPopAllowKeyboardFocus();
|
||||
CIMGUI_API void igPushButtonRepeat(bool repeat);
|
||||
CIMGUI_API void igPopButtonRepeat();
|
||||
|
||||
// Layout
|
||||
// Cursor / Layout
|
||||
CIMGUI_API void igSeparator();
|
||||
CIMGUI_API void igSameLine(float pos_x, float spacing_w);
|
||||
CIMGUI_API void igNewLine();
|
||||
@@ -488,7 +551,7 @@ CIMGUI_API void igSetCursorPosY(float y);
|
||||
CIMGUI_API void igGetCursorStartPos(struct ImVec2* pOut);
|
||||
CIMGUI_API void igGetCursorScreenPos(struct ImVec2* pOut);
|
||||
CIMGUI_API void igSetCursorScreenPos(CONST struct ImVec2 pos);
|
||||
CIMGUI_API void igAlignFirstTextHeightToWidgets();
|
||||
CIMGUI_API void igAlignTextToFramePadding();
|
||||
CIMGUI_API float igGetTextLineHeight();
|
||||
CIMGUI_API float igGetTextLineHeightWithSpacing();
|
||||
CIMGUI_API float igGetItemsLineHeightWithSpacing();
|
||||
@@ -497,24 +560,26 @@ CIMGUI_API float igGetItemsLineHeightWithSpacing();
|
||||
CIMGUI_API void igColumns(int count, CONST char* id, bool border);
|
||||
CIMGUI_API void igNextColumn();
|
||||
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 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')
|
||||
CIMGUI_API void igPushIdStr(CONST char* str_id);
|
||||
CIMGUI_API void igPushIdStrRange(CONST char* str_begin, CONST char* str_end);
|
||||
CIMGUI_API void igPushIdPtr(CONST void* ptr_id);
|
||||
CIMGUI_API void igPushIdInt(int int_id);
|
||||
CIMGUI_API void igPopId();
|
||||
CIMGUI_API ImGuiID igGetIdStr(CONST char* str_id);
|
||||
CIMGUI_API ImGuiID igGetIdStrRange(CONST char* str_begin,CONST char* str_end);
|
||||
CIMGUI_API ImGuiID igGetIdPtr(CONST void* ptr_id);
|
||||
CIMGUI_API void igPushIDStr(CONST char* str_id);
|
||||
CIMGUI_API void igPushIDStrRange(CONST char* str_begin, CONST char* str_end);
|
||||
CIMGUI_API void igPushIDPtr(CONST void* ptr_id);
|
||||
CIMGUI_API void igPushIDInt(int int_id);
|
||||
CIMGUI_API void igPopID();
|
||||
CIMGUI_API ImGuiID igGetIDStr(CONST char* str_id);
|
||||
CIMGUI_API ImGuiID igGetIDStrRange(CONST char* str_begin,CONST char* str_end);
|
||||
CIMGUI_API ImGuiID igGetIDPtr(CONST void* ptr_id);
|
||||
|
||||
// Widgets
|
||||
// Widgets: Text
|
||||
CIMGUI_API void igTextUnformatted(CONST char* text, CONST char* text_end);
|
||||
CIMGUI_API void igText(CONST char* fmt, ...);
|
||||
CIMGUI_API void igTextV(CONST char* fmt, va_list args);
|
||||
CIMGUI_API void igTextColored(CONST struct ImVec4 col, CONST char* fmt, ...);
|
||||
@@ -523,12 +588,13 @@ CIMGUI_API void igTextDisabled(CONST char* fmt, ...);
|
||||
CIMGUI_API void igTextDisabledV(CONST char* fmt, va_list args);
|
||||
CIMGUI_API void igTextWrapped(CONST char* fmt, ...);
|
||||
CIMGUI_API void igTextWrappedV(CONST char* fmt, va_list args);
|
||||
CIMGUI_API void igTextUnformatted(CONST char* text, CONST char* text_end);
|
||||
CIMGUI_API void igLabelText(CONST char* label, CONST char* fmt, ...);
|
||||
CIMGUI_API void igLabelTextV(CONST char* label, CONST char* fmt, va_list args);
|
||||
CIMGUI_API void igBullet();
|
||||
CIMGUI_API void igBulletText(CONST char* fmt, ...);
|
||||
CIMGUI_API void igBulletTextV(CONST char* fmt, va_list args);
|
||||
CIMGUI_API void igBullet();
|
||||
|
||||
// Widgets: Main
|
||||
CIMGUI_API bool igButton(CONST char* label, CONST struct ImVec2 size);
|
||||
CIMGUI_API bool igSmallButton(CONST char* label);
|
||||
CIMGUI_API bool igInvisibleButton(CONST char* str_id, CONST struct ImVec2 size);
|
||||
@@ -541,18 +607,38 @@ 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 igCombo2(CONST char* label, int* current_item, CONST char* items_separated_by_zeros, int height_in_items);
|
||||
CIMGUI_API bool igCombo3(CONST char* label, int* current_item, bool(*items_getter)(void* data, int idx, CONST char** out_text), void* data, int items_count, int height_in_items);
|
||||
CIMGUI_API bool igColorButton(CONST struct ImVec4 col, bool small_height, bool outline_border);
|
||||
CIMGUI_API bool igColorEdit3(CONST char* label, float col[3]);
|
||||
CIMGUI_API bool igColorEdit4(CONST char* label, float col[4], bool show_alpha);
|
||||
CIMGUI_API void igColorEditMode(ImGuiColorEditMode mode);
|
||||
CIMGUI_API void igPlotLines(CONST char* label, CONST float* values, int values_count, int values_offset, CONST char* overlay_text, float scale_min, float scale_max, struct ImVec2 graph_size, int stride);
|
||||
CIMGUI_API void igPlotLines2(CONST char* label, float(*values_getter)(void* data, int idx), void* data, int values_count, int values_offset, CONST char* overlay_text, float scale_min, float scale_max, struct ImVec2 graph_size);
|
||||
CIMGUI_API void igPlotHistogram(CONST char* label, CONST float* values, int values_count, int values_offset, CONST char* overlay_text, float scale_min, float scale_max, struct ImVec2 graph_size, int stride);
|
||||
CIMGUI_API void igPlotHistogram2(CONST char* label, float(*values_getter)(void* data, int idx), void* data, int values_count, int values_offset, CONST char* overlay_text, float scale_min, float scale_max, struct ImVec2 graph_size);
|
||||
CIMGUI_API void igProgressBar(float fraction, CONST struct ImVec2* size_arg, CONST char* overlay);
|
||||
|
||||
// Widgets: Drags (tip: ctrl+click on a drag box to input with keyboard. manually input values aren't clamped, can go off-bounds)
|
||||
// For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every functions, note that a 'float v[X]' function argument is the same as 'float* v', the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &myvector.x
|
||||
CIMGUI_API bool igDragFloat(CONST char* label, float* v, float v_speed, float v_min, float v_max, CONST char* display_format, float power); // If v_max >= v_max we have no bound
|
||||
CIMGUI_API bool igDragFloat2(CONST char* label, float v[2], float v_speed, float v_min, float v_max, CONST char* display_format, float power);
|
||||
CIMGUI_API bool igDragFloat3(CONST char* label, float v[3], float v_speed, float v_min, float v_max, CONST char* display_format, float power);
|
||||
CIMGUI_API bool igDragFloat4(CONST char* label, float v[4], float v_speed, float v_min, float v_max, CONST char* display_format, float power);
|
||||
CIMGUI_API bool igDragFloatRange2(CONST char* label, float* v_current_min, float* v_current_max, float v_speed, 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, int v_min, int v_max, CONST char* display_format, CONST char* display_format_max);
|
||||
|
||||
// Widgets: Sliders (tip: ctrl+click on a slider to input text)
|
||||
// Widgets: Input with Keyboard
|
||||
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 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);
|
||||
CIMGUI_API bool igInputFloat4(CONST char* label, float v[4], int decimal_precision, ImGuiInputTextFlags extra_flags);
|
||||
CIMGUI_API bool igInputInt(CONST char* label, int* v, int step, int step_fast, ImGuiInputTextFlags extra_flags);
|
||||
CIMGUI_API bool igInputInt2(CONST char* label, int v[2], ImGuiInputTextFlags extra_flags);
|
||||
CIMGUI_API bool igInputInt3(CONST char* label, int v[3], ImGuiInputTextFlags extra_flags);
|
||||
CIMGUI_API bool igInputInt4(CONST char* label, int v[4], ImGuiInputTextFlags extra_flags);
|
||||
|
||||
// Widgets: Sliders (tip: ctrl+click on a slider to input with keyboard. manually input values aren't clamped, can go off-bounds)
|
||||
CIMGUI_API bool igSliderFloat(CONST char* label, float* v, float v_min, float v_max, CONST char* display_format, float power);
|
||||
CIMGUI_API bool igSliderFloat2(CONST char* label, float v[2], float v_min, float v_max, CONST char* display_format, float power);
|
||||
CIMGUI_API bool igSliderFloat3(CONST char* label, float v[3], float v_min, float v_max, CONST char* display_format, float power);
|
||||
@@ -565,30 +651,14 @@ 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 igVSliderInt(CONST char* label, CONST struct ImVec2 size, int* v, int v_min, int v_max, CONST char* display_format);
|
||||
|
||||
// Widgets: Drags (tip: ctrl+click on a drag box to input text)
|
||||
CIMGUI_API bool igDragFloat(CONST char* label, float* v, float v_speed, float v_min, float v_max, CONST char* display_format, float power); // If v_max >= v_max we have no bound
|
||||
CIMGUI_API bool igDragFloat2(CONST char* label, float v[2], float v_speed, float v_min, float v_max, CONST char* display_format, float power);
|
||||
CIMGUI_API bool igDragFloat3(CONST char* label, float v[3], float v_speed, float v_min, float v_max, CONST char* display_format, float power);
|
||||
CIMGUI_API bool igDragFloat4(CONST char* label, float v[4], float v_speed, float v_min, float v_max, CONST char* display_format, float power);
|
||||
CIMGUI_API bool igDragFloatRange2(CONST char* label, float* v_current_min, float* v_current_max, float v_speed, 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, 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 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);
|
||||
CIMGUI_API bool igInputFloat4(CONST char* label, float v[4], int decimal_precision, ImGuiInputTextFlags extra_flags);
|
||||
CIMGUI_API bool igInputInt(CONST char* label, int* v, int step, int step_fast, ImGuiInputTextFlags extra_flags);
|
||||
CIMGUI_API bool igInputInt2(CONST char* label, int v[2], ImGuiInputTextFlags extra_flags);
|
||||
CIMGUI_API bool igInputInt3(CONST char* label, int v[3], ImGuiInputTextFlags extra_flags);
|
||||
CIMGUI_API bool igInputInt4(CONST char* label, int v[4], ImGuiInputTextFlags extra_flags);
|
||||
// Widgets: 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.)
|
||||
// Note that a 'float v[X]' function argument is the same as 'float* v', the array syntax is just a way to document the number of elements that are expected to be accessible. You can the pass the address of a first float element out of a contiguous structure, e.g. &myvector.x
|
||||
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: Trees
|
||||
CIMGUI_API bool igTreeNode(CONST char* label);
|
||||
@@ -606,7 +676,7 @@ CIMGUI_API void igTreePushPtr(CONST void* ptr_id);
|
||||
CIMGUI_API void igTreePop();
|
||||
CIMGUI_API void igTreeAdvanceToLabelPos();
|
||||
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 igCollapsingHeaderEx(CONST char* label, bool* p_open, ImGuiTreeNodeFlags flags);
|
||||
|
||||
@@ -624,8 +694,6 @@ CIMGUI_API void igValueBool(CONST char* prefix, bool b);
|
||||
CIMGUI_API void igValueInt(CONST char* prefix, int v);
|
||||
CIMGUI_API void igValueUInt(CONST char* prefix, unsigned int v);
|
||||
CIMGUI_API void igValueFloat(CONST char* prefix, float v, CONST char* float_format);
|
||||
CIMGUI_API void igValueColor(CONST char* prefix, CONST struct ImVec4 v);
|
||||
CIMGUI_API void igValueColor2(CONST char* prefix, ImU32 v);
|
||||
|
||||
// Tooltip
|
||||
CIMGUI_API void igSetTooltip(CONST char* fmt, ...);
|
||||
@@ -645,12 +713,14 @@ CIMGUI_API bool igMenuItemPtr(CONST char* label, CONST char* shortcu
|
||||
|
||||
// Popup
|
||||
CIMGUI_API void igOpenPopup(CONST char* str_id);
|
||||
CIMGUI_API bool igOpenPopupOnItemClick(const char* str_id, int mouse_button);
|
||||
CIMGUI_API bool igBeginPopup(CONST char* str_id);
|
||||
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 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 void igEndPopup();
|
||||
CIMGUI_API bool igIsPopupOpen(CONST char* str_id);
|
||||
CIMGUI_API void igCloseCurrentPopup();
|
||||
|
||||
// Logging: all text output from interface is redirected to tty/file/clipboard. Tree nodes are automatically opened.
|
||||
@@ -665,9 +735,11 @@ CIMGUI_API void igLogText(CONST char* fmt, ...);
|
||||
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();
|
||||
|
||||
// Styles
|
||||
CIMGUI_API void igStyleColorsClassic(struct ImGuiStyle* dst);
|
||||
|
||||
// Utilities
|
||||
CIMGUI_API bool igIsItemHovered();
|
||||
CIMGUI_API bool igIsItemHoveredRect();
|
||||
CIMGUI_API bool igIsItemHovered(ImGuiHoveredFlags flags);
|
||||
CIMGUI_API bool igIsItemActive();
|
||||
CIMGUI_API bool igIsItemClicked(int mouse_button);
|
||||
CIMGUI_API bool igIsItemVisible();
|
||||
@@ -677,17 +749,17 @@ 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 igIsWindowHovered(ImGuiHoveredFlags falgs);
|
||||
CIMGUI_API bool igIsRootWindowFocused();
|
||||
CIMGUI_API bool igIsRootWindowOrAnyChildFocused();
|
||||
CIMGUI_API bool igIsRootWindowOrAnyChildHovered();
|
||||
CIMGUI_API bool igIsRootWindowOrAnyChildHovered(ImGuiHoveredFlags flags);
|
||||
CIMGUI_API bool igIsAnyWindowHovered();
|
||||
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 igIsPosHoveringAnyWindow(CONST struct ImVec2 pos);
|
||||
CIMGUI_API float igGetTime();
|
||||
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 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);
|
||||
@@ -700,18 +772,19 @@ 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);
|
||||
|
||||
// Inputs
|
||||
CIMGUI_API int igGetKeyIndex(ImGuiKey imgui_key);
|
||||
CIMGUI_API bool igIsKeyDown(int user_key_index);
|
||||
CIMGUI_API bool igIsKeyPressed(int user_key_index, bool repeat);
|
||||
CIMGUI_API bool igIsKeyReleased(int user_key_index);
|
||||
CIMGUI_API int igGetKeyPressedAmount(int key_index, float repeat_delay, float rate);
|
||||
CIMGUI_API bool igIsMouseDown(int button);
|
||||
CIMGUI_API bool igIsMouseClicked(int button, bool repeat);
|
||||
CIMGUI_API bool igIsMouseDoubleClicked(int button);
|
||||
CIMGUI_API bool igIsMouseReleased(int button);
|
||||
CIMGUI_API bool igIsMouseHoveringWindow();
|
||||
CIMGUI_API bool igIsMouseHoveringAnyWindow();
|
||||
CIMGUI_API bool igIsMouseHoveringRect(CONST struct ImVec2 r_min, CONST struct ImVec2 r_max, bool clip);
|
||||
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 bool igIsMousePosValid(CONST struct ImVec2* mouse_pos);;
|
||||
CIMGUI_API void igGetMousePos(struct ImVec2* pOut);
|
||||
CIMGUI_API void igGetMousePosOnOpeningCurrentPopup(struct ImVec2* pOut);
|
||||
CIMGUI_API void igGetMouseDragDelta(struct ImVec2* pOut, int button, float lock_threshold);
|
||||
@@ -728,47 +801,78 @@ 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 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 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 ImFontConfig_DefaultConstructor(struct ImFontConfig* config);
|
||||
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, ImTextureID id);
|
||||
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 CONST ImWchar* ImFontAtlas_GetGlyphRangesDefault(struct ImFontAtlas* atlas);
|
||||
CIMGUI_API CONST ImWchar* ImFontAtlas_GetGlyphRangesKorean(struct ImFontAtlas* atlas);
|
||||
CIMGUI_API CONST ImWchar* ImFontAtlas_GetGlyphRangesJapanese(struct ImFontAtlas* atlas);
|
||||
CIMGUI_API CONST ImWchar* ImFontAtlas_GetGlyphRangesChinese(struct ImFontAtlas* atlas);
|
||||
CIMGUI_API CONST ImWchar* ImFontAtlas_GetGlyphRangesCyrillic(struct ImFontAtlas* atlas);
|
||||
CIMGUI_API CONST ImWchar* ImFontAtlas_GetGlyphRangesThai(struct ImFontAtlas* atlas);
|
||||
// ImGuiIO
|
||||
CIMGUI_API void ImGuiIO_AddInputCharacter(unsigned short c);
|
||||
CIMGUI_API void ImGuiIO_AddInputCharactersUTF8(CONST char* utf8_chars);
|
||||
CIMGUI_API void ImGuiIO_ClearInputCharacters();
|
||||
|
||||
CIMGUI_API void ImGuiIO_AddInputCharacter(unsigned short c);
|
||||
CIMGUI_API void ImGuiIO_AddInputCharactersUTF8(CONST char* utf8_chars);
|
||||
CIMGUI_API void ImGuiIO_ClearInputCharacters();
|
||||
// ImGuiTextFilter
|
||||
CIMGUI_API struct ImGuiTextFilter* ImGuiTextFilter_Create(const char* default_filter);
|
||||
CIMGUI_API void ImGuiTextFilter_Destroy(struct ImGuiTextFilter* filter);
|
||||
CIMGUI_API void ImGuiTextFilter_Clear(struct ImGuiTextFilter* filter);
|
||||
CIMGUI_API bool ImGuiTextFilter_Draw(struct ImGuiTextFilter* filter, const char* label, float width);
|
||||
CIMGUI_API bool ImGuiTextFilter_PassFilter(const struct ImGuiTextFilter* filter, const char* text, const char* text_end);
|
||||
CIMGUI_API bool ImGuiTextFilter_IsActive(const struct ImGuiTextFilter* filter);
|
||||
CIMGUI_API void ImGuiTextFilter_Build(struct ImGuiTextFilter* filter);
|
||||
CIMGUI_API const char* ImGuiTextFilter_GetInputBuf(struct ImGuiTextFilter* filter);
|
||||
|
||||
//ImDrawData
|
||||
CIMGUI_API void ImDrawData_DeIndexAllBuffers(struct ImDrawData* drawData);
|
||||
CIMGUI_API void ImDrawData_ScaleClipRects(struct ImDrawData* drawData, struct ImVec2 sc);
|
||||
// ImGuiTextBuffer
|
||||
CIMGUI_API struct ImGuiTextBuffer* ImGuiTextBuffer_Create();
|
||||
CIMGUI_API void ImGuiTextBuffer_Destroy(struct ImGuiTextBuffer* buffer);
|
||||
CIMGUI_API char ImGuiTextBuffer_index(struct ImGuiTextBuffer* buffer, int i);
|
||||
CIMGUI_API const char* ImGuiTextBuffer_begin(const struct ImGuiTextBuffer* buffer);
|
||||
CIMGUI_API const char* ImGuiTextBuffer_end(const struct ImGuiTextBuffer* buffer);
|
||||
CIMGUI_API int ImGuiTextBuffer_size(const struct ImGuiTextBuffer* buffer);
|
||||
CIMGUI_API bool ImGuiTextBuffer_empty(struct ImGuiTextBuffer* buffer);
|
||||
CIMGUI_API void ImGuiTextBuffer_clear(struct ImGuiTextBuffer* buffer);
|
||||
CIMGUI_API const char* ImGuiTextBuffer_c_str(const struct ImGuiTextBuffer* buffer);
|
||||
CIMGUI_API void ImGuiTextBuffer_append(struct ImGuiTextBuffer* buffer, const char* fmt, ...);
|
||||
CIMGUI_API void ImGuiTextBuffer_appendv(struct ImGuiTextBuffer* buffer, const char* fmt, va_list args);
|
||||
|
||||
// ImGuiStorage
|
||||
CIMGUI_API struct ImGuiStorage* ImGuiStorage_Create();
|
||||
CIMGUI_API void ImGuiStorage_Destroy(struct ImGuiStorage* storage);
|
||||
CIMGUI_API int ImGuiStorage_GetInt(struct ImGuiStorage* storage, ImGuiID key, int default_val);
|
||||
CIMGUI_API void ImGuiStorage_SetInt(struct ImGuiStorage* storage, ImGuiID key, int val);
|
||||
CIMGUI_API bool ImGuiStorage_GetBool(struct ImGuiStorage* storage, ImGuiID key, bool default_val);
|
||||
CIMGUI_API void ImGuiStorage_SetBool(struct ImGuiStorage* storage, ImGuiID key, bool val);
|
||||
CIMGUI_API float ImGuiStorage_GetFloat(struct ImGuiStorage* storage, ImGuiID key, float default_val);
|
||||
CIMGUI_API void ImGuiStorage_SetFloat(struct ImGuiStorage* storage, ImGuiID key, float val);
|
||||
CIMGUI_API void* ImGuiStorage_GetVoidPtr(struct ImGuiStorage* storage, ImGuiID key);
|
||||
CIMGUI_API void ImGuiStorage_SetVoidPtr(struct ImGuiStorage* storage, ImGuiID key, void* val);
|
||||
CIMGUI_API int* ImGuiStorage_GetIntRef(struct ImGuiStorage* storage, ImGuiID key, int default_val);
|
||||
CIMGUI_API bool* ImGuiStorage_GetBoolRef(struct ImGuiStorage* storage, ImGuiID key, bool default_val);
|
||||
CIMGUI_API float* ImGuiStorage_GetFloatRef(struct ImGuiStorage* storage, ImGuiID key, float default_val);
|
||||
CIMGUI_API void** ImGuiStorage_GetVoidPtrRef(struct ImGuiStorage* storage, ImGuiID key, void* default_val);
|
||||
CIMGUI_API void ImGuiStorage_SetAllInt(struct ImGuiStorage* storage, int val);
|
||||
|
||||
// ImGuiTextEditCallbackData
|
||||
CIMGUI_API void ImGuiTextEditCallbackData_DeleteChars(struct ImGuiTextEditCallbackData* data, int pos, int bytes_count);
|
||||
CIMGUI_API void ImGuiTextEditCallbackData_InsertChars(struct ImGuiTextEditCallbackData* data, int pos, const char* text, const char* text_end);
|
||||
CIMGUI_API bool ImGuiTextEditCallbackData_HasSelection(struct ImGuiTextEditCallbackData* data);
|
||||
|
||||
// ImGuiListClipper
|
||||
CIMGUI_API bool ImGuiListClipper_Step(struct ImGuiListClipper* clipper);
|
||||
CIMGUI_API void ImGuiListClipper_Begin(struct ImGuiListClipper* clipper, int count, float items_height);
|
||||
CIMGUI_API void ImGuiListClipper_End(struct ImGuiListClipper* clipper);
|
||||
CIMGUI_API int ImGuiListClipper_GetDisplayStart(struct ImGuiListClipper* clipper);
|
||||
CIMGUI_API int ImGuiListClipper_GetDisplayEnd(struct ImGuiListClipper* clipper);
|
||||
|
||||
//ImDrawList
|
||||
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 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 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 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(struct ImDrawList* list);
|
||||
CIMGUI_API void ImDrawList_ClearFreeMemory(struct ImDrawList* list);
|
||||
@@ -777,6 +881,8 @@ CIMGUI_API void ImDrawList_PushClipRectFullScreen(struct ImDrawList*
|
||||
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);
|
||||
CIMGUI_API void ImDrawList_GetClipRectMin(struct ImVec2 *pOut, struct ImDrawList* list);
|
||||
CIMGUI_API void ImDrawList_GetClipRectMax(struct ImVec2 *pOut, struct ImDrawList* list);
|
||||
|
||||
// Primitives
|
||||
CIMGUI_API void ImDrawList_AddLine(struct ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, ImU32 col, float thickness);
|
||||
@@ -821,46 +927,83 @@ CIMGUI_API void ImDrawList_AddDrawCmd(struct ImDrawList* list); // T
|
||||
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_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, 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);
|
||||
|
||||
// ImGuiListClipper
|
||||
CIMGUI_API void ImGuiListClipper_Begin(struct ImGuiListClipper* clipper, int count, float items_height);
|
||||
CIMGUI_API void ImGuiListClipper_End(struct ImGuiListClipper* clipper);
|
||||
CIMGUI_API bool ImGuiListClipper_Step(struct ImGuiListClipper* clipper);
|
||||
CIMGUI_API int ImGuiListClipper_GetDisplayStart(struct ImGuiListClipper* clipper);
|
||||
CIMGUI_API int ImGuiListClipper_GetDisplayEnd(struct ImGuiListClipper* clipper);
|
||||
// ImDrawData
|
||||
CIMGUI_API void ImDrawData_DeIndexAllBuffers(struct ImDrawData* drawData);
|
||||
CIMGUI_API void ImDrawData_ScaleClipRects(struct ImDrawData* drawData, const struct ImVec2 sc);
|
||||
|
||||
// ImGuiTextFilter
|
||||
CIMGUI_API void ImGuiTextFilter_Init(struct ImGuiTextFilter* filter, const char* default_filter);
|
||||
CIMGUI_API void ImGuiTextFilter_Clear(struct ImGuiTextFilter* filter);
|
||||
CIMGUI_API bool ImGuiTextFilter_Draw(struct ImGuiTextFilter* filter, const char* label, float width);
|
||||
CIMGUI_API bool ImGuiTextFilter_PassFilter(struct ImGuiTextFilter* filter, const char* text, const char* text_end);
|
||||
CIMGUI_API bool ImGuiTextFilter_IsActive(struct ImGuiTextFilter* filter);
|
||||
CIMGUI_API void ImGuiTextFilter_Build(struct ImGuiTextFilter* filter);
|
||||
// ImFontAtlas
|
||||
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, ImTextureID id);
|
||||
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* 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_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_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_Clear(struct ImFontAtlas* atlas);
|
||||
CIMGUI_API CONST ImWchar* ImFontAtlas_GetGlyphRangesDefault(struct ImFontAtlas* atlas);
|
||||
CIMGUI_API CONST ImWchar* ImFontAtlas_GetGlyphRangesKorean(struct ImFontAtlas* atlas);
|
||||
CIMGUI_API CONST ImWchar* ImFontAtlas_GetGlyphRangesJapanese(struct ImFontAtlas* atlas);
|
||||
CIMGUI_API CONST ImWchar* ImFontAtlas_GetGlyphRangesChinese(struct ImFontAtlas* atlas);
|
||||
CIMGUI_API CONST ImWchar* ImFontAtlas_GetGlyphRangesCyrillic(struct ImFontAtlas* atlas);
|
||||
CIMGUI_API CONST ImWchar* ImFontAtlas_GetGlyphRangesThai(struct ImFontAtlas* atlas);
|
||||
|
||||
// ImGuiTextEditCallbackData
|
||||
CIMGUI_API void ImGuiTextEditCallbackData_DeleteChars(struct ImGuiTextEditCallbackData* data, int pos, int bytes_count);
|
||||
CIMGUI_API void ImGuiTextEditCallbackData_InsertChars(struct ImGuiTextEditCallbackData* data, int pos, const char* text, const char* text_end);
|
||||
CIMGUI_API bool ImGuiTextEditCallbackData_HasSelection(struct ImGuiTextEditCallbackData* data);
|
||||
CIMGUI_API ImTextureID ImFontAtlas_GetTexID(struct ImFontAtlas* atlas);
|
||||
CIMGUI_API unsigned char* ImFontAtlas_GetTexPixelsAlpha8(struct ImFontAtlas* atlas);
|
||||
CIMGUI_API unsigned int* ImFontAtlas_GetTexPixelsRGBA32(struct ImFontAtlas* atlas);
|
||||
CIMGUI_API int ImFontAtlas_GetTexWidth(struct ImFontAtlas* atlas);
|
||||
CIMGUI_API int ImFontAtlas_GetTexHeight(struct ImFontAtlas* atlas);
|
||||
CIMGUI_API int ImFontAtlas_GetTexDesiredWidth(struct ImFontAtlas* atlas);
|
||||
CIMGUI_API void ImFontAtlas_SetTexDesiredWidth(struct ImFontAtlas* atlas, int TexDesiredWidth_);
|
||||
CIMGUI_API int ImFontAtlas_GetTexGlyphPadding(struct ImFontAtlas* atlas);
|
||||
CIMGUI_API void ImFontAtlas_SetTexGlyphPadding(struct ImFontAtlas* atlas, int TexGlyphPadding_);
|
||||
CIMGUI_API void ImFontAtlas_GetTexUvWhitePixel(struct ImFontAtlas* atlas, struct ImVec2* pOut);
|
||||
|
||||
// ImGuiStorage
|
||||
CIMGUI_API void ImGuiStorage_Init(struct ImGuiStorage* storage);
|
||||
CIMGUI_API void ImGuiStorage_Clear(struct ImGuiStorage* storage);
|
||||
CIMGUI_API int ImGuiStorage_GetInt(struct ImGuiStorage* storage, ImGuiID key, int default_val);
|
||||
CIMGUI_API void ImGuiStorage_SetInt(struct ImGuiStorage* storage, ImGuiID key, int val);
|
||||
CIMGUI_API bool ImGuiStorage_GetBool(struct ImGuiStorage* storage, ImGuiID key, bool default_val);
|
||||
CIMGUI_API void ImGuiStorage_SetBool(struct ImGuiStorage* storage, ImGuiID key, bool val);
|
||||
CIMGUI_API float ImGuiStorage_GetFloat(struct ImGuiStorage* storage, ImGuiID key, float default_val);
|
||||
CIMGUI_API void ImGuiStorage_SetFloat(struct ImGuiStorage* storage, ImGuiID key, float val);
|
||||
CIMGUI_API void* ImGuiStorage_GetVoidPtr(struct ImGuiStorage* storage, ImGuiID key);
|
||||
CIMGUI_API void ImGuiStorage_SetVoidPtr(struct ImGuiStorage* storage, ImGuiID key, void* val);
|
||||
CIMGUI_API int* ImGuiStorage_GetIntRef(struct ImGuiStorage* storage, ImGuiID key, int default_val);
|
||||
CIMGUI_API bool* ImGuiStorage_GetBoolRef(struct ImGuiStorage* storage, ImGuiID key, bool default_val);
|
||||
CIMGUI_API float* ImGuiStorage_GetFloatRef(struct ImGuiStorage* storage, ImGuiID key, float default_val);
|
||||
CIMGUI_API void** ImGuiStorage_GetVoidPtrRef(struct ImGuiStorage* storage, ImGuiID key, void* default_val);
|
||||
CIMGUI_API void ImGuiStorage_SetAllInt(struct ImGuiStorage* storage, int val);
|
||||
// ImFontAtlas::Fonts;
|
||||
CIMGUI_API int ImFontAtlas_Fonts_size(struct ImFontAtlas* atlas);
|
||||
CIMGUI_API struct ImFont* ImFontAtlas_Fonts_index(struct ImFontAtlas* atlas, int index);
|
||||
|
||||
// ImFont
|
||||
CIMGUI_API float ImFont_GetFontSize(const struct ImFont* font);
|
||||
CIMGUI_API void ImFont_SetFontSize(struct ImFont* font, float FontSize_);
|
||||
CIMGUI_API float ImFont_GetScale(const struct ImFont* font);
|
||||
CIMGUI_API void ImFont_SetScale(struct ImFont* font, float Scale_);
|
||||
CIMGUI_API void ImFont_GetDisplayOffset(const struct ImFont* font, struct ImVec2* pOut);
|
||||
CIMGUI_API const struct IMFONTGLYPH* ImFont_GetFallbackGlyph(const struct ImFont* font);
|
||||
CIMGUI_API void ImFont_SetFallbackGlyph(struct ImFont* font, const struct IMFONTGLYPH* FallbackGlyph_);
|
||||
CIMGUI_API float ImFont_GetFallbackAdvanceX(const struct ImFont* font);
|
||||
CIMGUI_API ImWchar ImFont_GetFallbackChar(const struct ImFont* font);
|
||||
CIMGUI_API short ImFont_GetConfigDataCount(const struct ImFont* font);
|
||||
CIMGUI_API struct ImFontConfig* ImFont_GetConfigData(struct ImFont* font);
|
||||
CIMGUI_API struct ImFontAtlas* ImFont_GetContainerAtlas(struct ImFont* font);
|
||||
CIMGUI_API float ImFont_GetAscent(const struct ImFont* font);
|
||||
CIMGUI_API float ImFont_GetDescent(const struct ImFont* font);
|
||||
CIMGUI_API int ImFont_GetMetricsTotalSurface(const struct ImFont* font);
|
||||
CIMGUI_API void ImFont_ClearOutputData(struct ImFont* font);
|
||||
CIMGUI_API void ImFont_BuildLookupTable(struct ImFont* font);
|
||||
CIMGUI_API const struct IMFONTGLYPH* ImFont_FindGlyph(const struct ImFont* font, ImWchar c);
|
||||
CIMGUI_API void ImFont_SetFallbackChar(struct ImFont* font, ImWchar c);
|
||||
CIMGUI_API float ImFont_GetCharAdvance(const struct ImFont* font, ImWchar c);
|
||||
CIMGUI_API bool ImFont_IsLoaded(const struct ImFont* font);
|
||||
CIMGUI_API void ImFont_CalcTextSizeA(const struct ImFont* font, struct ImVec2* pOut, float size, float max_width, float wrap_width, const char* text_begin, const char* text_end, const char** remaining); // utf8
|
||||
CIMGUI_API const char* ImFont_CalcWordWrapPositionA(const struct ImFont* font, float scale, const char* text, const char* text_end, float wrap_width);
|
||||
CIMGUI_API void ImFont_RenderChar(const struct ImFont* font, struct ImDrawList* draw_list, float size, struct ImVec2 pos, ImU32 col, unsigned short c);
|
||||
CIMGUI_API void ImFont_RenderText(const struct ImFont* font, struct ImDrawList* draw_list, float size, struct ImVec2 pos, ImU32 col, const struct ImVec4* clip_rect, const char* text_begin, const char* text_end, float wrap_width, bool cpu_fine_clip);
|
||||
// ImFont::Glyph
|
||||
CIMGUI_API int ImFont_Glyphs_size(const struct ImFont* font);
|
||||
CIMGUI_API struct IMFONTGLYPH* ImFont_Glyphs_index(struct ImFont* font, int index);
|
||||
// ImFont::IndexXAdvance
|
||||
CIMGUI_API int ImFont_IndexXAdvance_size(const struct ImFont* font);
|
||||
CIMGUI_API float ImFont_IndexXAdvance_index(const struct ImFont* font, int index);
|
||||
// ImFont::IndexLookup
|
||||
CIMGUI_API int ImFont_IndexLookup_size(const struct ImFont* font);
|
||||
CIMGUI_API unsigned short ImFont_IndexLookup_index(const struct ImFont* font, int index);
|
||||
|
@@ -2,277 +2,287 @@
|
||||
#include "../imgui/imgui.h"
|
||||
#include "cimgui.h"
|
||||
|
||||
CIMGUI_API void ImDrawData_DeIndexAllBuffers(ImDrawData* drawData)
|
||||
{
|
||||
return drawData->DeIndexAllBuffers();
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawData_ScaleClipRects(ImDrawData* drawData, const struct ImVec2 sc)
|
||||
{
|
||||
return drawData->ScaleClipRects(sc);
|
||||
}
|
||||
|
||||
CIMGUI_API int ImDrawList_GetVertexBufferSize(ImDrawList* list)
|
||||
{
|
||||
return list->VtxBuffer.size();
|
||||
return list->VtxBuffer.size();
|
||||
}
|
||||
|
||||
CIMGUI_API ImDrawVert* ImDrawList_GetVertexPtr(ImDrawList* list, int n)
|
||||
{
|
||||
return &list->VtxBuffer[n];
|
||||
return &list->VtxBuffer[n];
|
||||
}
|
||||
|
||||
CIMGUI_API int ImDrawList_GetIndexBufferSize(ImDrawList* list)
|
||||
{
|
||||
return list->IdxBuffer.size();
|
||||
return list->IdxBuffer.size();
|
||||
}
|
||||
|
||||
CIMGUI_API ImDrawIdx* ImDrawList_GetIndexPtr(ImDrawList* list, int n)
|
||||
{
|
||||
return &list->IdxBuffer[n];
|
||||
return &list->IdxBuffer[n];
|
||||
}
|
||||
|
||||
CIMGUI_API int ImDrawList_GetCmdSize(ImDrawList* list)
|
||||
{
|
||||
return list->CmdBuffer.size();
|
||||
return list->CmdBuffer.size();
|
||||
}
|
||||
|
||||
CIMGUI_API ImDrawCmd* ImDrawList_GetCmdPtr(ImDrawList* list, int n)
|
||||
{
|
||||
return &list->CmdBuffer[n];
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawData_DeIndexAllBuffers(ImDrawData* drawData)
|
||||
{
|
||||
return drawData->DeIndexAllBuffers();
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawData_ScaleClipRects(ImDrawData* drawData, struct ImVec2 sc)
|
||||
{
|
||||
return drawData->ScaleClipRects(sc);
|
||||
return &list->CmdBuffer[n];
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_Clear(ImDrawList* list)
|
||||
{
|
||||
return list->Clear();
|
||||
return list->Clear();
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_ClearFreeMemory(ImDrawList* list)
|
||||
{
|
||||
return list->ClearFreeMemory();
|
||||
return list->ClearFreeMemory();
|
||||
}
|
||||
|
||||
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_min,clip_rect_max,intersect_with_current_clip_rect);
|
||||
return list->PushClipRect(clip_rect_min,clip_rect_max,intersect_with_current_clip_rect);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_PushClipRectFullScreen(ImDrawList* list)
|
||||
{
|
||||
return list->PushClipRectFullScreen();
|
||||
return list->PushClipRectFullScreen();
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_PopClipRect(ImDrawList* list)
|
||||
{
|
||||
return list->PopClipRect();
|
||||
return list->PopClipRect();
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_PushTextureID(ImDrawList* list, CONST ImTextureID texture_id)
|
||||
{
|
||||
return list->PushTextureID(texture_id);
|
||||
return list->PushTextureID(texture_id);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
return list->AddLine(a, b, col, thickness);
|
||||
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_flags, float thickness)
|
||||
{
|
||||
return list->AddRect(a, b, col, rounding, rounding_corners_flags, thickness);
|
||||
return list->AddRect(a, b, col, rounding, rounding_corners_flags, thickness);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_AddRectFilled(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, ImU32 col, float rounding, int rounding_corners_flags)
|
||||
{
|
||||
return list->AddRectFilled(a, b, col, rounding, rounding_corners_flags);
|
||||
return list->AddRectFilled(a, b, col, rounding, rounding_corners_flags);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
return list->AddRectFilledMultiColor(a, b, col_upr_left, col_upr_right, col_bot_right, col_bot_left);
|
||||
return list->AddRectFilledMultiColor(a, b, col_upr_left, col_upr_right, col_bot_right, col_bot_left);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_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);
|
||||
return list->AddQuad(a, b, c, d, col, thickness);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_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);
|
||||
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);
|
||||
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);
|
||||
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, float thickness)
|
||||
{
|
||||
return list->AddCircle(centre, radius, col, num_segments, thickness);
|
||||
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)
|
||||
{
|
||||
return list->AddCircleFilled(centre, radius, col, num_segments);
|
||||
return list->AddCircleFilled(centre, radius, col, num_segments);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_AddText(ImDrawList* list, CONST struct ImVec2 pos, ImU32 col, CONST char* text_begin, CONST char* text_end)
|
||||
{
|
||||
return list->AddText(pos, col, text_begin, text_end);
|
||||
return list->AddText(pos, col, text_begin, 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)
|
||||
{
|
||||
return list->AddText(font, font_size, pos, col, text_begin, text_end, wrap_width, cpu_fine_clip_rect);
|
||||
return list->AddText(font, font_size, pos, col, text_begin, text_end, wrap_width, 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 uv_a, CONST struct ImVec2 uv_b, ImU32 col)
|
||||
{
|
||||
return list->AddImage(user_texture_id, a, b, uv_a, uv_b, col);
|
||||
return list->AddImage(user_texture_id, a, b, uv_a, uv_b, col);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_AddImageQuad(struct ImDrawList* list, ImTextureID user_texture_id, CONST struct ImVec2 a, CONST ImVec2 b, CONST ImVec2 c, CONST ImVec2 d, CONST ImVec2 uv_a, CONST ImVec2 uv_b, CONST ImVec2 uv_c, CONST ImVec2 uv_d, ImU32 col)
|
||||
{
|
||||
return list->AddImageQuad(user_texture_id, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col);
|
||||
return list->AddImageQuad(user_texture_id, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_AddPolyline(ImDrawList* list, CONST ImVec2* points, CONST int num_points, ImU32 col, bool closed, float thickness, bool anti_aliased)
|
||||
{
|
||||
return list->AddPolyline(points, num_points, col, closed, thickness, anti_aliased);
|
||||
return list->AddPolyline(points, num_points, col, closed, thickness, anti_aliased);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_AddConvexPolyFilled(ImDrawList* list, CONST ImVec2* points, CONST int num_points, ImU32 col, bool anti_aliased)
|
||||
{
|
||||
return list->AddConvexPolyFilled(points, num_points, col, anti_aliased);
|
||||
return list->AddConvexPolyFilled(points, num_points, col, 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)
|
||||
{
|
||||
return list->AddBezierCurve(pos0, cp0, cp1, pos1, col, thickness, num_segments);
|
||||
return list->AddBezierCurve(pos0, cp0, cp1, pos1, col, thickness, num_segments);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_PathClear(ImDrawList* list)
|
||||
{
|
||||
return list->PathClear();
|
||||
return list->PathClear();
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_PathLineTo(ImDrawList* list, CONST struct ImVec2 pos)
|
||||
{
|
||||
return list->PathLineTo(pos);
|
||||
return list->PathLineTo(pos);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_PathLineToMergeDuplicate(ImDrawList* list, CONST struct ImVec2 pos)
|
||||
{
|
||||
return list->PathLineToMergeDuplicate(pos);
|
||||
return list->PathLineToMergeDuplicate(pos);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_PathFillConvex(ImDrawList* list, ImU32 col)
|
||||
{
|
||||
return list->PathFillConvex(col);
|
||||
return list->PathFillConvex(col);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_PathStroke(ImDrawList* list, ImU32 col, bool closed, float thickness)
|
||||
{
|
||||
return list->PathStroke(col, closed, thickness);
|
||||
return list->PathStroke(col, closed, thickness);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_PathArcTo(ImDrawList* list, CONST struct ImVec2 centre, float radius, float a_min, float a_max, int num_segments)
|
||||
{
|
||||
return list->PathArcTo(centre, radius, a_min, a_max, num_segments);
|
||||
return list->PathArcTo(centre, radius, a_min, a_max, 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)
|
||||
{
|
||||
return list->PathArcToFast(centre, radius, a_min_of_12, a_max_of_12);
|
||||
return list->PathArcToFast(centre, radius, a_min_of_12, a_max_of_12);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_PathBezierCurveTo(ImDrawList* list, CONST struct ImVec2 p1, CONST struct ImVec2 p2, CONST struct ImVec2 p3, int num_segments)
|
||||
{
|
||||
return list->PathBezierCurveTo(p1, p2, p3, num_segments);
|
||||
return list->PathBezierCurveTo(p1, p2, p3, num_segments);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_PathRect(ImDrawList* list, CONST struct ImVec2 rect_min, CONST struct ImVec2 rect_max, float rounding, int rounding_corners_flags)
|
||||
{
|
||||
return list->PathRect(rect_min, rect_max, rounding, rounding_corners_flags);
|
||||
return list->PathRect(rect_min, rect_max, rounding, rounding_corners_flags);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_ChannelsSplit(ImDrawList* list, int channels_count)
|
||||
{
|
||||
return list->ChannelsSplit(channels_count);
|
||||
return list->ChannelsSplit(channels_count);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_ChannelsMerge(ImDrawList* list)
|
||||
{
|
||||
return list->ChannelsMerge();
|
||||
return list->ChannelsMerge();
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_ChannelsSetCurrent(ImDrawList* list, int channel_index)
|
||||
{
|
||||
return list->ChannelsSetCurrent(channel_index);
|
||||
return list->ChannelsSetCurrent(channel_index);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_AddCallback(ImDrawList* list, ImDrawCallback callback, void* callback_data)
|
||||
{
|
||||
return list->AddCallback(callback, callback_data);
|
||||
return list->AddCallback(callback, callback_data);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_AddDrawCmd(ImDrawList* list)
|
||||
{
|
||||
return list->AddDrawCmd();
|
||||
return list->AddDrawCmd();
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_PrimReserve(ImDrawList* list, int idx_count, int vtx_count)
|
||||
{
|
||||
return list->PrimReserve(idx_count, vtx_count);
|
||||
return list->PrimReserve(idx_count, vtx_count);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_PrimRect(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, ImU32 col)
|
||||
{
|
||||
return list->PrimRect(a, b, col);
|
||||
return list->PrimRect(a, b, 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)
|
||||
{
|
||||
return list->PrimRectUV(a, b, uv_a, uv_b, col);
|
||||
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);
|
||||
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);
|
||||
return list->PrimVtx(pos, uv, col);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_PrimWriteVtx(ImDrawList* list, CONST struct ImVec2 pos, CONST struct ImVec2 uv, ImU32 col)
|
||||
{
|
||||
return list->PrimWriteVtx(pos, uv, col);
|
||||
return list->PrimWriteVtx(pos, uv, col);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_PrimWriteIdx(ImDrawList* list, ImDrawIdx idx)
|
||||
{
|
||||
return list->PrimWriteIdx(idx);
|
||||
return list->PrimWriteIdx(idx);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_UpdateClipRect(ImDrawList* list)
|
||||
{
|
||||
return list->UpdateClipRect();
|
||||
return list->UpdateClipRect();
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_UpdateTextureID(ImDrawList* list)
|
||||
{
|
||||
return list->UpdateTextureID();
|
||||
return list->UpdateTextureID();
|
||||
}
|
||||
|
@@ -9,85 +9,315 @@ CIMGUI_API void ImFontConfig_DefaultConstructor(ImFontConfig* config)
|
||||
|
||||
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);
|
||||
atlas->GetTexDataAsRGBA32(out_pixels, out_width, out_height, 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)
|
||||
{
|
||||
atlas->GetTexDataAsAlpha8(out_pixels, out_width, out_height, out_bytes_per_pixel);
|
||||
atlas->GetTexDataAsAlpha8(out_pixels, out_width, out_height, out_bytes_per_pixel);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImFontAtlas_SetTexID(ImFontAtlas* atlas, ImTextureID id)
|
||||
{
|
||||
atlas->TexID = id;
|
||||
atlas->TexID = id;
|
||||
}
|
||||
|
||||
CIMGUI_API ImFont* ImFontAtlas_AddFont(ImFontAtlas* atlas, CONST ImFontConfig* font_cfg)
|
||||
{
|
||||
return atlas->AddFont(font_cfg);
|
||||
return atlas->AddFont(font_cfg);
|
||||
}
|
||||
|
||||
CIMGUI_API ImFont* ImFontAtlas_AddFontDefault(ImFontAtlas* atlas, CONST ImFontConfig* font_cfg)
|
||||
{
|
||||
return atlas->AddFontDefault(font_cfg);
|
||||
return atlas->AddFontDefault(font_cfg);
|
||||
}
|
||||
|
||||
CIMGUI_API ImFont* ImFontAtlas_AddFontFromFileTTF(ImFontAtlas* atlas,CONST char* filename, float size_pixels, CONST ImFontConfig* font_cfg, CONST ImWchar* glyph_ranges)
|
||||
{
|
||||
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)
|
||||
{
|
||||
return atlas->ClearTexData();
|
||||
return atlas->ClearTexData();
|
||||
}
|
||||
|
||||
CIMGUI_API void ImFontAtlas_ClearInputData(ImFontAtlas* atlas)
|
||||
{
|
||||
return atlas->ClearInputData();
|
||||
}
|
||||
|
||||
CIMGUI_API void ImFontAtlas_ClearFonts(ImFontAtlas* atlas)
|
||||
{
|
||||
return atlas->ClearFonts();
|
||||
}
|
||||
|
||||
CIMGUI_API void ImFontAtlas_Clear(ImFontAtlas* atlas)
|
||||
{
|
||||
return atlas->Clear();
|
||||
return atlas->Clear();
|
||||
}
|
||||
|
||||
CIMGUI_API CONST ImWchar* ImFontAtlas_GetGlyphRangesDefault(struct ImFontAtlas* atlas)
|
||||
{
|
||||
return atlas->GetGlyphRangesDefault();
|
||||
return atlas->GetGlyphRangesDefault();
|
||||
}
|
||||
|
||||
CIMGUI_API CONST ImWchar* ImFontAtlas_GetGlyphRangesKorean(struct ImFontAtlas* atlas)
|
||||
{
|
||||
return atlas->GetGlyphRangesKorean();
|
||||
return atlas->GetGlyphRangesKorean();
|
||||
}
|
||||
|
||||
CIMGUI_API CONST ImWchar* ImFontAtlas_GetGlyphRangesJapanese(struct ImFontAtlas* atlas)
|
||||
{
|
||||
return atlas->GetGlyphRangesJapanese();
|
||||
return atlas->GetGlyphRangesJapanese();
|
||||
}
|
||||
|
||||
CIMGUI_API CONST ImWchar* ImFontAtlas_GetGlyphRangesChinese(struct ImFontAtlas* atlas)
|
||||
{
|
||||
return atlas->GetGlyphRangesChinese();
|
||||
return atlas->GetGlyphRangesChinese();
|
||||
}
|
||||
|
||||
CIMGUI_API CONST ImWchar* ImFontAtlas_GetGlyphRangesCyrillic(struct ImFontAtlas* atlas)
|
||||
{
|
||||
return atlas->GetGlyphRangesCyrillic();
|
||||
return atlas->GetGlyphRangesCyrillic();
|
||||
}
|
||||
|
||||
CIMGUI_API CONST ImWchar* ImFontAtlas_GetGlyphRangesThai(struct ImFontAtlas* atlas)
|
||||
{
|
||||
return atlas->GetGlyphRangesThai();
|
||||
}
|
||||
return atlas->GetGlyphRangesThai();
|
||||
}
|
||||
|
||||
CIMGUI_API ImTextureID ImFontAtlas_GetTexID(struct ImFontAtlas* atlas)
|
||||
{
|
||||
return atlas->TexID;
|
||||
}
|
||||
|
||||
CIMGUI_API unsigned char* ImFontAtlas_GetTexPixelsAlpha8(struct ImFontAtlas* atlas)
|
||||
{
|
||||
return atlas->TexPixelsAlpha8;
|
||||
}
|
||||
|
||||
CIMGUI_API unsigned int* ImFontAtlas_GetTexPixelsRGBA32(struct ImFontAtlas* atlas)
|
||||
{
|
||||
return atlas->TexPixelsRGBA32;
|
||||
}
|
||||
|
||||
CIMGUI_API int ImFontAtlas_GetTexWidth(struct ImFontAtlas* atlas)
|
||||
{
|
||||
return atlas->TexWidth;
|
||||
}
|
||||
|
||||
CIMGUI_API int ImFontAtlas_GetTexHeight(struct ImFontAtlas* atlas)
|
||||
{
|
||||
return atlas->TexHeight;
|
||||
}
|
||||
|
||||
CIMGUI_API int ImFontAtlas_GetTexDesiredWidth(struct ImFontAtlas* atlas)
|
||||
{
|
||||
return atlas->TexDesiredWidth;
|
||||
}
|
||||
|
||||
CIMGUI_API void ImFontAtlas_SetTexDesiredWidth(struct ImFontAtlas* atlas, int TexDesiredWidth_)
|
||||
{
|
||||
atlas->TexDesiredWidth = TexDesiredWidth_;
|
||||
}
|
||||
|
||||
CIMGUI_API int ImFontAtlas_GetTexGlyphPadding(struct ImFontAtlas* atlas)
|
||||
{
|
||||
return atlas->TexGlyphPadding;
|
||||
}
|
||||
|
||||
CIMGUI_API void ImFontAtlas_SetTexGlyphPadding(struct ImFontAtlas* atlas, int TexGlyphPadding_)
|
||||
{
|
||||
atlas->TexGlyphPadding = TexGlyphPadding_;
|
||||
}
|
||||
|
||||
CIMGUI_API void ImFontAtlas_GetTexUvWhitePixel(struct ImFontAtlas* atlas, ImVec2* pOut)
|
||||
{
|
||||
*pOut = atlas->TexUvWhitePixel;
|
||||
}
|
||||
|
||||
// ImFontAtlas::Fonts;
|
||||
CIMGUI_API int ImFontAtlas_Fonts_size(struct ImFontAtlas* atlas)
|
||||
{
|
||||
return atlas->Fonts.size();
|
||||
}
|
||||
|
||||
CIMGUI_API ImFont* ImFontAtlas_Fonts_index(struct ImFontAtlas* atlas, int index)
|
||||
{
|
||||
return atlas->Fonts[index];
|
||||
}
|
||||
|
||||
// ImFont
|
||||
CIMGUI_API float ImFont_GetFontSize(const struct ImFont* font)
|
||||
{
|
||||
return font->FontSize;
|
||||
}
|
||||
|
||||
CIMGUI_API void ImFont_SetFontSize(struct ImFont* font, float FontSize_)
|
||||
{
|
||||
font->FontSize = FontSize_;
|
||||
}
|
||||
|
||||
CIMGUI_API float ImFont_GetScale(const struct ImFont* font)
|
||||
{
|
||||
return font->Scale;
|
||||
}
|
||||
|
||||
CIMGUI_API void ImFont_SetScale(struct ImFont* font, float Scale_)
|
||||
{
|
||||
font->Scale = Scale_;
|
||||
}
|
||||
|
||||
CIMGUI_API void ImFont_GetDisplayOffset(const struct ImFont* font, ImVec2* pOut)
|
||||
{
|
||||
*pOut = font->DisplayOffset;
|
||||
}
|
||||
|
||||
CIMGUI_API const struct IMFONTGLYPH* ImFont_GetFallbackGlyph(const struct ImFont* font)
|
||||
{
|
||||
return font->FallbackGlyph;
|
||||
}
|
||||
|
||||
CIMGUI_API void ImFont_SetFallbackGlyph(struct ImFont* font, const struct IMFONTGLYPH* FallbackGlyph_)
|
||||
{
|
||||
font->FallbackGlyph = FallbackGlyph_;
|
||||
}
|
||||
|
||||
CIMGUI_API float ImFont_GetFallbackAdvanceX(const struct ImFont* font)
|
||||
{
|
||||
return font->FallbackAdvanceX;
|
||||
}
|
||||
|
||||
CIMGUI_API ImWchar ImFont_GetFallbackChar(const struct ImFont* font)
|
||||
{
|
||||
return font->FallbackChar;
|
||||
}
|
||||
|
||||
CIMGUI_API short ImFont_GetConfigDataCount(const struct ImFont* font)
|
||||
{
|
||||
return font->ConfigDataCount;
|
||||
}
|
||||
|
||||
CIMGUI_API struct ImFontConfig* ImFont_GetConfigData(struct ImFont* font)
|
||||
{
|
||||
return font->ConfigData;
|
||||
}
|
||||
|
||||
CIMGUI_API struct ImFontAtlas* ImFont_GetContainerAtlas(struct ImFont* font)
|
||||
{
|
||||
return font->ContainerAtlas;
|
||||
}
|
||||
|
||||
CIMGUI_API float ImFont_GetAscent(const struct ImFont* font)
|
||||
{
|
||||
return font->Ascent;
|
||||
}
|
||||
|
||||
CIMGUI_API float ImFont_GetDescent(const struct ImFont* font)
|
||||
{
|
||||
return font->Descent;
|
||||
}
|
||||
|
||||
CIMGUI_API int ImFont_GetMetricsTotalSurface(const struct ImFont* font)
|
||||
{
|
||||
return font->MetricsTotalSurface;
|
||||
}
|
||||
|
||||
CIMGUI_API void ImFont_ClearOutputData(struct ImFont* font)
|
||||
{
|
||||
font->ClearOutputData();
|
||||
}
|
||||
|
||||
CIMGUI_API void ImFont_BuildLookupTable(struct ImFont* font)
|
||||
{
|
||||
font->BuildLookupTable();
|
||||
}
|
||||
|
||||
CIMGUI_API const struct IMFONTGLYPH* ImFont_FindGlyph(const struct ImFont* font, ImWchar c)
|
||||
{
|
||||
return font->FindGlyph(c);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImFont_SetFallbackChar(struct ImFont* font, ImWchar c)
|
||||
{
|
||||
font->SetFallbackChar(c);
|
||||
}
|
||||
|
||||
CIMGUI_API float ImFont_GetCharAdvance(const struct ImFont* font, ImWchar c)
|
||||
{
|
||||
return font->GetCharAdvance(c);
|
||||
}
|
||||
|
||||
CIMGUI_API bool ImFont_IsLoaded(const struct ImFont* font)
|
||||
{
|
||||
return font->IsLoaded();
|
||||
}
|
||||
|
||||
CIMGUI_API void ImFont_CalcTextSizeA(const struct ImFont* font, ImVec2* pOut, float size, float max_width, float wrap_width, const char* text_begin, const char* text_end, const char** remaining)
|
||||
{
|
||||
*pOut = font->CalcTextSizeA(size, max_width, wrap_width, text_begin, text_end, remaining);
|
||||
}
|
||||
|
||||
CIMGUI_API const char* ImFont_CalcWordWrapPositionA(const struct ImFont* font, float scale, const char* text, const char* text_end, float wrap_width)
|
||||
{
|
||||
return font->CalcWordWrapPositionA(scale, text, text_end, wrap_width);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImFont_RenderChar(const struct ImFont* font, ImDrawList* draw_list, float size, ImVec2 pos, ImU32 col, unsigned short c)
|
||||
{
|
||||
return font->RenderChar(draw_list, size, pos, col, c);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImFont_RenderText(const struct ImFont* font, ImDrawList* draw_list, float size, ImVec2 pos, ImU32 col, const ImVec4* clip_rect, const char* text_begin, const char* text_end, float wrap_width, bool cpu_fine_clip)
|
||||
{
|
||||
return font->RenderText(draw_list, size, pos, col, *clip_rect, text_begin, text_end, wrap_width, cpu_fine_clip);
|
||||
}
|
||||
|
||||
// ImFont::Glyph
|
||||
CIMGUI_API int ImFont_Glyphs_size(const struct ImFont* font)
|
||||
{
|
||||
return font->Glyphs.size();
|
||||
}
|
||||
|
||||
CIMGUI_API struct IMFONTGLYPH* ImFont_Glyphs_index(struct ImFont* font, int index)
|
||||
{
|
||||
return &font->Glyphs[index];
|
||||
}
|
||||
|
||||
// ImFont::IndexXAdvance
|
||||
CIMGUI_API int ImFont_IndexXAdvance_size(const struct ImFont* font)
|
||||
{
|
||||
return font->IndexAdvanceX.size();
|
||||
}
|
||||
|
||||
CIMGUI_API float ImFont_IndexXAdvance_index(const struct ImFont* font, int index)
|
||||
{
|
||||
return font->IndexAdvanceX[index];
|
||||
}
|
||||
|
||||
// ImFont::IndexLookup
|
||||
CIMGUI_API int ImFont_IndexLookup_size(const struct ImFont* font)
|
||||
{
|
||||
return font->IndexLookup.size();
|
||||
}
|
||||
|
||||
CIMGUI_API unsigned short ImFont_IndexLookup_index(const struct ImFont* font, int index)
|
||||
{
|
||||
return font->IndexLookup[index];
|
||||
}
|
||||
|
2
imgui
2
imgui
Submodule imgui updated: 5e1caaaef3...9f200d10d5
Reference in New Issue
Block a user