mirror of
https://github.com/cimgui/cimgui.git
synced 2025-08-15 14:08:30 +01:00
Compare commits
15 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
3f0014b569 | ||
![]() |
49d62d30cf | ||
![]() |
2ea2b91ee1 | ||
![]() |
e75eaa7239 | ||
![]() |
fa1b93bea9 | ||
![]() |
511218914b | ||
![]() |
f60eb9a510 | ||
![]() |
9e52e73e9b | ||
![]() |
6a31578c1e | ||
![]() |
50bce34b67 | ||
![]() |
14b2c5cc58 | ||
![]() |
f12e74c20f | ||
![]() |
01578cb1bd | ||
![]() |
33679d6957 | ||
![]() |
b9cd7f2d83 |
@@ -9,3 +9,4 @@ compiler:
|
|||||||
|
|
||||||
script:
|
script:
|
||||||
- make -C cimgui
|
- 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))
|
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:
|
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.53 of imgui](https://github.com/ocornut/imgui/releases/tag/v1.53)
|
||||||
* 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)
|
* 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
|
# usage
|
||||||
@@ -23,3 +23,4 @@ Notes:
|
|||||||
* [ImGui.NET](https://github.com/mellinoe/ImGui.NET)
|
* [ImGui.NET](https://github.com/mellinoe/ImGui.NET)
|
||||||
* [imgui-rs](https://github.com/Gekkio/imgui-rs)
|
* [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 "../imgui/imgui.h"
|
||||||
#include "cimgui.h"
|
#include "cimgui.h"
|
||||||
|
|
||||||
|
// to use placement new
|
||||||
|
#define IMGUI_DEFINE_PLACEMENT_NEW
|
||||||
|
#include "../imgui/imgui_internal.h"
|
||||||
|
|
||||||
CIMGUI_API ImGuiIO *igGetIO()
|
CIMGUI_API ImGuiIO *igGetIO()
|
||||||
{
|
{
|
||||||
return &ImGui::GetIO();
|
return &ImGui::GetIO();
|
||||||
@@ -27,6 +31,11 @@ CIMGUI_API void igRender()
|
|||||||
ImGui::Render();
|
ImGui::Render();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CIMGUI_API void igEndFrame()
|
||||||
|
{
|
||||||
|
ImGui::EndFrame();
|
||||||
|
}
|
||||||
|
|
||||||
CIMGUI_API void igShutdown()
|
CIMGUI_API void igShutdown()
|
||||||
{
|
{
|
||||||
ImGui::Shutdown();
|
ImGui::Shutdown();
|
||||||
@@ -42,9 +51,9 @@ CIMGUI_API void igShowStyleEditor(ImGuiStyle* ref)
|
|||||||
ImGui::ShowStyleEditor(ref);
|
ImGui::ShowStyleEditor(ref);
|
||||||
}
|
}
|
||||||
|
|
||||||
CIMGUI_API void igShowTestWindow(bool* opened)
|
CIMGUI_API void igShowDemoWindow(bool *opened)
|
||||||
{
|
{
|
||||||
ImGui::ShowTestWindow(opened);
|
ImGui::ShowDemoWindow(opened);
|
||||||
}
|
}
|
||||||
|
|
||||||
IMGUI_API void igShowMetricsWindow(bool *opened)
|
IMGUI_API void igShowMetricsWindow(bool *opened)
|
||||||
@@ -52,6 +61,16 @@ IMGUI_API void igShowMetricsWindow(bool* opened)
|
|||||||
ImGui::ShowMetricsWindow(opened);
|
ImGui::ShowMetricsWindow(opened);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CIMGUI_API void igShowStyleSelector(CONST char *label)
|
||||||
|
{
|
||||||
|
ImGui::ShowStyleSelector(label);
|
||||||
|
}
|
||||||
|
|
||||||
|
CIMGUI_API void igShowFontSelector(CONST char *label)
|
||||||
|
{
|
||||||
|
ImGui::ShowFontSelector(label);
|
||||||
|
}
|
||||||
|
|
||||||
// Window
|
// Window
|
||||||
|
|
||||||
CIMGUI_API bool igBegin(CONST char *name, bool *p_opened, ImGuiWindowFlags flags)
|
CIMGUI_API bool igBegin(CONST char *name, bool *p_opened, ImGuiWindowFlags flags)
|
||||||
@@ -144,19 +163,19 @@ CIMGUI_API bool igIsWindowCollapsed()
|
|||||||
return ImGui::IsWindowCollapsed();
|
return ImGui::IsWindowCollapsed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CIMGUI_API bool igIsWindowAppearing()
|
||||||
|
{
|
||||||
|
return ImGui::IsWindowAppearing();
|
||||||
|
}
|
||||||
|
|
||||||
CIMGUI_API void igSetWindowFontScale(float scale)
|
CIMGUI_API void igSetWindowFontScale(float scale)
|
||||||
{
|
{
|
||||||
ImGui::SetWindowFontScale(scale);
|
ImGui::SetWindowFontScale(scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
CIMGUI_API void igSetNextWindowPos(CONST ImVec2 pos, ImGuiCond 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(ImGuiCond cond)
|
|
||||||
{
|
|
||||||
ImGui::SetNextWindowPosCenter(cond);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CIMGUI_API void igSetNextWindowSize(CONST ImVec2 size, ImGuiCond cond)
|
CIMGUI_API void igSetNextWindowSize(CONST ImVec2 size, ImGuiCond cond)
|
||||||
@@ -174,11 +193,6 @@ CIMGUI_API void igSetNextWindowContentSize(CONST ImVec2 size)
|
|||||||
ImGui::SetNextWindowContentSize(size);
|
ImGui::SetNextWindowContentSize(size);
|
||||||
}
|
}
|
||||||
|
|
||||||
CIMGUI_API void igSetNextWindowContentWidth(float width)
|
|
||||||
{
|
|
||||||
ImGui::SetNextWindowContentWidth(width);
|
|
||||||
}
|
|
||||||
|
|
||||||
CIMGUI_API void igSetNextWindowCollapsed(bool collapsed, ImGuiCond cond)
|
CIMGUI_API void igSetNextWindowCollapsed(bool collapsed, ImGuiCond cond)
|
||||||
{
|
{
|
||||||
ImGui::SetNextWindowCollapsed(collapsed, cond);
|
ImGui::SetNextWindowCollapsed(collapsed, cond);
|
||||||
@@ -269,11 +283,6 @@ CIMGUI_API void igSetScrollFromPosY(float pos_y, float center_y_ratio)
|
|||||||
return ImGui::SetScrollFromPosY(pos_y, center_y_ratio);
|
return ImGui::SetScrollFromPosY(pos_y, center_y_ratio);
|
||||||
}
|
}
|
||||||
|
|
||||||
CIMGUI_API void igSetKeyboardFocusHere(int offset)
|
|
||||||
{
|
|
||||||
ImGui::SetKeyboardFocusHere(offset);
|
|
||||||
}
|
|
||||||
|
|
||||||
CIMGUI_API void igSetStateStorage(ImGuiStorage *tree)
|
CIMGUI_API void igSetStateStorage(ImGuiStorage *tree)
|
||||||
{
|
{
|
||||||
ImGui::SetStateStorage(tree);
|
ImGui::SetStateStorage(tree);
|
||||||
@@ -436,6 +445,11 @@ CIMGUI_API void igOpenPopup(CONST char* str_id)
|
|||||||
return ImGui::OpenPopup(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)
|
CIMGUI_API bool igBeginPopup(CONST char *str_id)
|
||||||
{
|
{
|
||||||
return ImGui::BeginPopup(str_id);
|
return ImGui::BeginPopup(str_id);
|
||||||
@@ -568,9 +582,9 @@ CIMGUI_API void igSetCursorScreenPos(CONST ImVec2 pos)
|
|||||||
return ImGui::SetCursorScreenPos(pos);
|
return ImGui::SetCursorScreenPos(pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
CIMGUI_API void igAlignFirstTextHeightToWidgets()
|
CIMGUI_API void igAlignTextToFramePadding()
|
||||||
{
|
{
|
||||||
return ImGui::AlignFirstTextHeightToWidgets();
|
return ImGui::AlignTextToFramePadding();
|
||||||
}
|
}
|
||||||
|
|
||||||
CIMGUI_API float igGetTextLineHeight()
|
CIMGUI_API float igGetTextLineHeight()
|
||||||
@@ -583,9 +597,14 @@ CIMGUI_API float igGetTextLineHeightWithSpacing()
|
|||||||
return ImGui::GetTextLineHeightWithSpacing();
|
return ImGui::GetTextLineHeightWithSpacing();
|
||||||
}
|
}
|
||||||
|
|
||||||
CIMGUI_API float igGetItemsLineHeightWithSpacing()
|
CIMGUI_API float igGetFrameHeight()
|
||||||
{
|
{
|
||||||
return ImGui::GetItemsLineHeightWithSpacing();
|
return ImGui::GetFrameHeight();
|
||||||
|
}
|
||||||
|
|
||||||
|
CIMGUI_API float igGetFrameHeightWithSpacing()
|
||||||
|
{
|
||||||
|
return ImGui::GetFrameHeightWithSpacing();
|
||||||
}
|
}
|
||||||
|
|
||||||
//Columns
|
//Columns
|
||||||
@@ -633,43 +652,42 @@ CIMGUI_API int igGetColumnsCount()
|
|||||||
// ID scopes
|
// ID scopes
|
||||||
// If you are creating widgets in a loop you most likely want to push a unique identifier so ImGui can differentiate them
|
// 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')
|
// 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);
|
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);
|
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);
|
return ImGui::PushID(ptr_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
CIMGUI_API void igPushIdInt(int int_id)
|
CIMGUI_API void igPushIDInt(int int_id)
|
||||||
{
|
{
|
||||||
return ImGui::PushID(int_id);
|
return ImGui::PushID(int_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
CIMGUI_API void igPopId()
|
CIMGUI_API void igPopID()
|
||||||
{
|
{
|
||||||
return ImGui::PopID();
|
return ImGui::PopID();
|
||||||
}
|
}
|
||||||
|
|
||||||
CIMGUI_API ImGuiID igGetIdStr(CONST char* str_id)
|
CIMGUI_API ImGuiID igGetIDStr(CONST char *str_id)
|
||||||
{
|
{
|
||||||
return ImGui::GetID(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);
|
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);
|
return ImGui::GetID(ptr_id);
|
||||||
}
|
}
|
||||||
@@ -808,21 +826,6 @@ CIMGUI_API bool igRadioButton(CONST char* label, int* v, int v_button)
|
|||||||
return ImGui::RadioButton(label, v, v_button);
|
return ImGui::RadioButton(label, v, v_button);
|
||||||
}
|
}
|
||||||
|
|
||||||
CIMGUI_API bool igCombo(CONST char* label, int* current_item, CONST char* CONST* items, int items_count, int height_in_items)
|
|
||||||
{
|
|
||||||
return ImGui::Combo(label, current_item, items, items_count, height_in_items);
|
|
||||||
}
|
|
||||||
|
|
||||||
CIMGUI_API bool igCombo2(CONST char* label, int* current_item, CONST char* items_separated_by_zeros, int height_in_items)
|
|
||||||
{
|
|
||||||
return ImGui::Combo(label, current_item, items_separated_by_zeros, 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)
|
|
||||||
{
|
|
||||||
return ImGui::Combo(label, current_item, items_getter, data, items_count, height_in_items);
|
|
||||||
}
|
|
||||||
|
|
||||||
CIMGUI_API void igPlotLines(CONST char *label, CONST float *values, int values_count, int values_offset, CONST char *overlay_text, float scale_min, float scale_max, ImVec2 graph_size, int stride)
|
CIMGUI_API void igPlotLines(CONST char *label, CONST float *values, int values_count, int values_offset, CONST char *overlay_text, float scale_min, float scale_max, ImVec2 graph_size, int stride)
|
||||||
{
|
{
|
||||||
return ImGui::PlotLines(label, values, values_count, values_offset, overlay_text, scale_min, scale_max, graph_size, stride);
|
return ImGui::PlotLines(label, values, values_count, values_offset, overlay_text, scale_min, scale_max, graph_size, stride);
|
||||||
@@ -843,7 +846,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);
|
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);
|
return ImGui::ProgressBar(fraction, *size_arg, overlay);
|
||||||
}
|
}
|
||||||
@@ -904,6 +907,31 @@ CIMGUI_API bool igVSliderInt(CONST char* label, CONST ImVec2 size, int* v, int v
|
|||||||
return ImGui::VSliderInt(label, size, v, v_min, v_max, display_format);
|
return ImGui::VSliderInt(label, size, v, v_min, v_max, display_format);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CIMGUI_API bool igBeginCombo(CONST char *label, CONST char *preview_value, ImGuiComboFlags flags)
|
||||||
|
{
|
||||||
|
return ImGui::BeginCombo(label, preview_value, flags);
|
||||||
|
}
|
||||||
|
|
||||||
|
CIMGUI_API void igEndCombo()
|
||||||
|
{
|
||||||
|
return ImGui::EndCombo();
|
||||||
|
}
|
||||||
|
|
||||||
|
CIMGUI_API bool igCombo(CONST char *label, int *current_item, CONST char *CONST *items, int items_count, int popup_max_height_in_items)
|
||||||
|
{
|
||||||
|
return ImGui::Combo(label, current_item, items, items_count, popup_max_height_in_items);
|
||||||
|
}
|
||||||
|
|
||||||
|
CIMGUI_API bool igCombo2(CONST char *label, int *current_item, CONST char *items_separated_by_zeros, int popup_max_height_in_items)
|
||||||
|
{
|
||||||
|
return ImGui::Combo(label, current_item, items_separated_by_zeros, popup_max_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 popup_max_height_in_items)
|
||||||
|
{
|
||||||
|
return ImGui::Combo(label, current_item, items_getter, data, items_count, popup_max_height_in_items);
|
||||||
|
}
|
||||||
|
|
||||||
// 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.)
|
// Widgets: Color Editor/Picker (tip: the ColorEdit* functions have a little colored preview square that can be left-clicked to open a picker, and right-clicked to open an option menu.)
|
||||||
CIMGUI_API bool igColorEdit3(CONST char *label, float col[3], ImGuiColorEditFlags flags)
|
CIMGUI_API bool igColorEdit3(CONST char *label, float col[3], ImGuiColorEditFlags flags)
|
||||||
{
|
{
|
||||||
@@ -922,7 +950,7 @@ CIMGUI_API bool igColorPicker3(CONST char* label, float col[3], ImGuiColorEditFl
|
|||||||
|
|
||||||
CIMGUI_API bool igColorPicker4(CONST char *label, float col[4], ImGuiColorEditFlags flags, CONST float *ref_col)
|
CIMGUI_API bool igColorPicker4(CONST char *label, float col[4], ImGuiColorEditFlags flags, CONST float *ref_col)
|
||||||
{
|
{
|
||||||
return ImGui::ColorPicker4(label, col, flags);
|
return ImGui::ColorPicker4(label, col, flags, ref_col);
|
||||||
}
|
}
|
||||||
|
|
||||||
CIMGUI_API bool igColorButton(CONST char *desc_id, CONST ImVec4 col, ImGuiColorEditFlags flags, CONST ImVec2 size)
|
CIMGUI_API bool igColorButton(CONST char *desc_id, CONST ImVec4 col, ImGuiColorEditFlags flags, CONST ImVec2 size)
|
||||||
@@ -1037,7 +1065,6 @@ CIMGUI_API bool igInputInt4(CONST char* label, int v[4], ImGuiInputTextFlags ext
|
|||||||
return ImGui::InputInt4(label, v, extra_flags);
|
return ImGui::InputInt4(label, v, extra_flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Widgets: Trees
|
// Widgets: Trees
|
||||||
CIMGUI_API bool igTreeNode(CONST char *label)
|
CIMGUI_API bool igTreeNode(CONST char *label)
|
||||||
{
|
{
|
||||||
@@ -1277,12 +1304,42 @@ CIMGUI_API void igLogText(CONST char* fmt, ...)
|
|||||||
char buffer[256];
|
char buffer[256];
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
snprintf(buffer, 256, fmt, args);
|
vsnprintf(buffer, 256, fmt, args);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
|
||||||
ImGui::LogText("%s", buffer);
|
ImGui::LogText("%s", buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CIMGUI_API bool igBeginDragDropSource(ImGuiDragDropFlags flags, int mouse_button)
|
||||||
|
{
|
||||||
|
return ImGui::BeginDragDropSource(flags, mouse_button);
|
||||||
|
}
|
||||||
|
|
||||||
|
CIMGUI_API bool igSetDragDropPayload(CONST char *type, CONST void *data, size_t size, ImGuiCond cond)
|
||||||
|
{
|
||||||
|
return ImGui::SetDragDropPayload(type, data, size, cond);
|
||||||
|
}
|
||||||
|
|
||||||
|
CIMGUI_API void igEndDragDropSource()
|
||||||
|
{
|
||||||
|
ImGui::EndDragDropSource();
|
||||||
|
}
|
||||||
|
|
||||||
|
CIMGUI_API bool igBeginDragDropTarget()
|
||||||
|
{
|
||||||
|
return ImGui::BeginDragDropTarget();
|
||||||
|
}
|
||||||
|
|
||||||
|
CIMGUI_API CONST struct ImGuiPayload *igAcceptDragDropPayload(CONST char *type, ImGuiDragDropFlags flags)
|
||||||
|
{
|
||||||
|
return ImGui::AcceptDragDropPayload(type, flags);
|
||||||
|
}
|
||||||
|
|
||||||
|
CIMGUI_API void igEndDragDropTarget()
|
||||||
|
{
|
||||||
|
ImGui::EndDragDropTarget();
|
||||||
|
}
|
||||||
|
|
||||||
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 igPushClipRect(CONST struct ImVec2 clip_rect_min, CONST struct ImVec2 clip_rect_max, bool intersect_with_current_clip_rect)
|
||||||
{
|
{
|
||||||
return ImGui::PushClipRect(clip_rect_min, clip_rect_max, intersect_with_current_clip_rect);
|
return ImGui::PushClipRect(clip_rect_min, clip_rect_max, intersect_with_current_clip_rect);
|
||||||
@@ -1293,15 +1350,35 @@ CIMGUI_API void igPopClipRect()
|
|||||||
return ImGui::PopClipRect();
|
return ImGui::PopClipRect();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Utilities
|
CIMGUI_API void igStyleColorsClassic(struct ImGuiStyle *dst)
|
||||||
CIMGUI_API bool igIsItemHovered()
|
|
||||||
{
|
{
|
||||||
return ImGui::IsItemHovered();
|
ImGui::StyleColorsClassic(dst);
|
||||||
}
|
}
|
||||||
|
|
||||||
CIMGUI_API bool igIsItemRectHovered()
|
CIMGUI_API void igStyleColorsDark(struct ImGuiStyle *dst)
|
||||||
{
|
{
|
||||||
return ImGui::IsItemRectHovered();
|
ImGui::StyleColorsDark(dst);
|
||||||
|
}
|
||||||
|
|
||||||
|
CIMGUI_API void igStyleColorsLight(struct ImGuiStyle *dst)
|
||||||
|
{
|
||||||
|
ImGui::StyleColorsLight(dst);
|
||||||
|
}
|
||||||
|
|
||||||
|
CIMGUI_API void igSetItemDefaultFocus()
|
||||||
|
{
|
||||||
|
ImGui::SetItemDefaultFocus();
|
||||||
|
}
|
||||||
|
|
||||||
|
CIMGUI_API void igSetKeyboardFocusHere(int offset)
|
||||||
|
{
|
||||||
|
ImGui::SetKeyboardFocusHere(offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Utilities
|
||||||
|
CIMGUI_API bool igIsItemHovered(ImGuiHoveredFlags flags)
|
||||||
|
{
|
||||||
|
return ImGui::IsItemHovered(flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
CIMGUI_API bool igIsItemActive()
|
CIMGUI_API bool igIsItemActive()
|
||||||
@@ -1349,34 +1426,19 @@ CIMGUI_API void igSetItemAllowOverlap()
|
|||||||
ImGui::SetItemAllowOverlap();
|
ImGui::SetItemAllowOverlap();
|
||||||
}
|
}
|
||||||
|
|
||||||
CIMGUI_API bool igIsWindowFocused()
|
CIMGUI_API bool igIsWindowFocused(ImGuiFocusedFlags flags)
|
||||||
{
|
{
|
||||||
return ImGui::IsWindowFocused();
|
return ImGui::IsWindowFocused(flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
CIMGUI_API bool igIsWindowHovered()
|
CIMGUI_API bool igIsWindowHovered(ImGuiHoveredFlags)
|
||||||
{
|
{
|
||||||
return ImGui::IsWindowHovered();
|
return ImGui::IsWindowHovered();
|
||||||
}
|
}
|
||||||
|
|
||||||
CIMGUI_API bool igIsWindowRectHovered()
|
CIMGUI_API bool igIsAnyWindowFocused()
|
||||||
{
|
{
|
||||||
return ImGui::IsWindowRectHovered();
|
return ImGui::IsAnyWindowFocused();
|
||||||
}
|
|
||||||
|
|
||||||
CIMGUI_API bool igIsRootWindowFocused()
|
|
||||||
{
|
|
||||||
return ImGui::IsRootWindowFocused();
|
|
||||||
}
|
|
||||||
|
|
||||||
CIMGUI_API bool igIsRootWindowOrAnyChildFocused()
|
|
||||||
{
|
|
||||||
return ImGui::IsRootWindowOrAnyChildFocused();
|
|
||||||
}
|
|
||||||
|
|
||||||
CIMGUI_API bool igIsRootWindowOrAnyChildHovered()
|
|
||||||
{
|
|
||||||
return ImGui::IsRootWindowOrAnyChildHovered();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CIMGUI_API bool igIsAnyWindowHovered()
|
CIMGUI_API bool igIsAnyWindowHovered()
|
||||||
@@ -1414,6 +1476,11 @@ CIMGUI_API bool igIsKeyReleased(int user_key_index)
|
|||||||
return ImGui::IsKeyReleased(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)
|
CIMGUI_API bool igIsMouseDown(int button)
|
||||||
{
|
{
|
||||||
return ImGui::IsMouseDown(button);
|
return ImGui::IsMouseDown(button);
|
||||||
@@ -1444,6 +1511,11 @@ CIMGUI_API bool igIsMouseHoveringRect(CONST ImVec2 r_min, CONST ImVec2 r_max, bo
|
|||||||
return ImGui::IsMouseHoveringRect(r_min, r_max, clip);
|
return ImGui::IsMouseHoveringRect(r_min, r_max, clip);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CIMGUI_API bool igIsMousePosValid(CONST struct ImVec2 *mouse_pos)
|
||||||
|
{
|
||||||
|
return ImGui::IsMousePosValid(mouse_pos);
|
||||||
|
}
|
||||||
|
|
||||||
CIMGUI_API void igGetMousePos(ImVec2 *pOut)
|
CIMGUI_API void igGetMousePos(ImVec2 *pOut)
|
||||||
{
|
{
|
||||||
*pOut = ImGui::GetMousePos();
|
*pOut = ImGui::GetMousePos();
|
||||||
@@ -1514,6 +1586,16 @@ CIMGUI_API int igGetFrameCount()
|
|||||||
return ImGui::GetFrameCount();
|
return ImGui::GetFrameCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CIMGUI_API struct ImDrawList *igGetOverlayDrawList()
|
||||||
|
{
|
||||||
|
return ImGui::GetOverlayDrawList();
|
||||||
|
}
|
||||||
|
|
||||||
|
CIMGUI_API struct ImDrawListSharedData *igGetDrawListSharedData()
|
||||||
|
{
|
||||||
|
return ImGui::GetDrawListSharedData();
|
||||||
|
}
|
||||||
|
|
||||||
CIMGUI_API CONST char *igGetStyleColorName(ImGuiCol idx)
|
CIMGUI_API CONST char *igGetStyleColorName(ImGuiCol idx)
|
||||||
{
|
{
|
||||||
return ImGui::GetStyleColorName(idx);
|
return ImGui::GetStyleColorName(idx);
|
||||||
@@ -1604,9 +1686,18 @@ CIMGUI_API void ImGuiIO_ClearInputCharacters()
|
|||||||
return ImGui::GetIO().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_Destroy(struct ImGuiTextFilter *filter)
|
||||||
|
{
|
||||||
|
filter->~ImGuiTextFilter();
|
||||||
|
ImGui::MemFree(filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
CIMGUI_API void ImGuiTextFilter_Clear(struct ImGuiTextFilter *filter)
|
CIMGUI_API void ImGuiTextFilter_Clear(struct ImGuiTextFilter *filter)
|
||||||
@@ -1619,38 +1710,100 @@ CIMGUI_API bool ImGuiTextFilter_Draw(struct ImGuiTextFilter* filter, const char*
|
|||||||
return filter->Draw(label, width);
|
return filter->Draw(label, width);
|
||||||
}
|
}
|
||||||
|
|
||||||
CIMGUI_API bool ImGuiTextFilter_PassFilter(struct ImGuiTextFilter* filter, const char* text, const char* text_end)
|
CIMGUI_API bool ImGuiTextFilter_PassFilter(const struct ImGuiTextFilter *filter, const char *text, const char *text_end)
|
||||||
{
|
{
|
||||||
return filter->PassFilter(text, text_end);
|
return filter->PassFilter(text, text_end);
|
||||||
}
|
}
|
||||||
|
|
||||||
CIMGUI_API bool ImGuiTextFilter_IsActive(struct ImGuiTextFilter* filter)
|
CIMGUI_API bool ImGuiTextFilter_IsActive(const struct ImGuiTextFilter *filter)
|
||||||
{
|
{
|
||||||
return filter->IsActive();
|
return filter->IsActive();
|
||||||
}
|
}
|
||||||
|
|
||||||
CIMGUI_API void ImGuiTextFilter_Build(struct ImGuiTextFilter *filter)
|
CIMGUI_API void ImGuiTextFilter_Build(struct ImGuiTextFilter *filter)
|
||||||
{
|
{
|
||||||
filter->Build();
|
filter->Build();
|
||||||
}
|
}
|
||||||
|
|
||||||
CIMGUI_API void ImGuiTextEditCallbackData_DeleteChars(struct ImGuiTextEditCallbackData* data, int pos, int bytes_count)
|
CIMGUI_API const char *ImGuiTextFilter_GetInputBuf(struct ImGuiTextFilter *filter)
|
||||||
{
|
{
|
||||||
data->DeleteChars(pos, bytes_count);
|
return filter->InputBuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
CIMGUI_API void ImGuiTextEditCallbackData_InsertChars(struct ImGuiTextEditCallbackData* data, int pos, const char* text, const char* text_end)
|
CIMGUI_API struct ImGuiTextBuffer *ImGuiTextBuffer_Create()
|
||||||
{
|
{
|
||||||
data->InsertChars(pos, text, text_end);
|
ImGuiTextBuffer *buffer = (ImGuiTextBuffer *)ImGui::MemAlloc(sizeof(ImGuiTextBuffer));
|
||||||
|
IM_PLACEMENT_NEW(buffer)
|
||||||
|
ImGuiTextBuffer();
|
||||||
|
return buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
CIMGUI_API bool ImGuiTextEditCallbackData_HasSelection(struct ImGuiTextEditCallbackData* data)
|
CIMGUI_API void ImGuiTextBuffer_Destroy(struct ImGuiTextBuffer *buffer)
|
||||||
{
|
{
|
||||||
return data->HasSelection();
|
buffer->~ImGuiTextBuffer();
|
||||||
|
ImGui::MemFree(buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
CIMGUI_API void ImGuiStorage_Init(struct ImGuiStorage* storage)
|
CIMGUI_API char ImGuiTextBuffer_index(struct ImGuiTextBuffer *buffer, int i)
|
||||||
{
|
{
|
||||||
*storage = ImGuiStorage();
|
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_appendf(struct ImGuiTextBuffer *buffer, const char *fmt, ...)
|
||||||
|
{
|
||||||
|
va_list args;
|
||||||
|
va_start(args, fmt);
|
||||||
|
buffer->appendfv(fmt, args);
|
||||||
|
va_end(args);
|
||||||
|
}
|
||||||
|
|
||||||
|
CIMGUI_API void ImGuiTextBuffer_appendfv(struct ImGuiTextBuffer *buffer, const char *fmt, va_list args)
|
||||||
|
{
|
||||||
|
buffer->appendfv(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)
|
CIMGUI_API void ImGuiStorage_Clear(struct ImGuiStorage *storage)
|
||||||
@@ -1722,3 +1875,18 @@ 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();
|
||||||
|
}
|
||||||
|
528
cimgui/cimgui.h
528
cimgui/cimgui.h
@@ -7,7 +7,7 @@
|
|||||||
#else
|
#else
|
||||||
#define API __declspec(dllexport)
|
#define API __declspec(dllexport)
|
||||||
#endif
|
#endif
|
||||||
#ifdef __GNUC__
|
#ifndef __GNUC__
|
||||||
#define snprintf sprintf_s
|
#define snprintf sprintf_s
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
@@ -40,6 +40,14 @@ struct ImFontAtlas;
|
|||||||
struct ImDrawCmd;
|
struct ImDrawCmd;
|
||||||
struct ImGuiListClipper;
|
struct ImGuiListClipper;
|
||||||
struct ImGuiTextFilter;
|
struct ImGuiTextFilter;
|
||||||
|
struct ImGuiPayload;
|
||||||
|
|
||||||
|
#if defined __cplusplus
|
||||||
|
#define IMFONTGLYPH ImFontGlyph
|
||||||
|
#else
|
||||||
|
struct Glyph;
|
||||||
|
#define IMFONTGLYPH Glyph
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef unsigned short ImDrawIdx;
|
typedef unsigned short ImDrawIdx;
|
||||||
typedef unsigned int ImU32;
|
typedef unsigned int ImU32;
|
||||||
@@ -57,6 +65,12 @@ typedef int ImGuiColumnsFlags;
|
|||||||
typedef int ImGuiInputTextFlags;
|
typedef int ImGuiInputTextFlags;
|
||||||
typedef int ImGuiSelectableFlags;
|
typedef int ImGuiSelectableFlags;
|
||||||
typedef int ImGuiTreeNodeFlags;
|
typedef int ImGuiTreeNodeFlags;
|
||||||
|
typedef int ImGuiHoveredFlags;
|
||||||
|
typedef int ImGuiComboFlags;
|
||||||
|
typedef int ImGuiDragDropFlags;
|
||||||
|
typedef int ImGuiFocusedFlags;
|
||||||
|
typedef int ImDrawCornerFlags;
|
||||||
|
typedef int ImDrawListFlags;
|
||||||
typedef int (*ImGuiTextEditCallback)(struct ImGuiTextEditCallbackData *data);
|
typedef int (*ImGuiTextEditCallback)(struct ImGuiTextEditCallbackData *data);
|
||||||
typedef void (*ImGuiSizeConstraintCallback)(struct ImGuiSizeConstraintCallbackData *data);
|
typedef void (*ImGuiSizeConstraintCallback)(struct ImGuiSizeConstraintCallbackData *data);
|
||||||
typedef void (*ImDrawCallback)(CONST struct ImDrawList *parent_list, CONST struct ImDrawCmd *cmd);
|
typedef void (*ImDrawCallback)(CONST struct ImDrawList *parent_list, CONST struct ImDrawCmd *cmd);
|
||||||
@@ -67,15 +81,18 @@ typedef unsigned long long ImU64;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CIMGUI_DEFINE_ENUMS_AND_STRUCTS
|
#ifdef CIMGUI_DEFINE_ENUMS_AND_STRUCTS
|
||||||
struct ImVec2 {
|
struct ImVec2
|
||||||
|
{
|
||||||
float x, y;
|
float x, y;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ImVec4 {
|
struct ImVec4
|
||||||
|
{
|
||||||
float x, y, z, w;
|
float x, y, z, w;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum
|
||||||
|
{
|
||||||
ImGuiWindowFlags_NoTitleBar = 1 << 0,
|
ImGuiWindowFlags_NoTitleBar = 1 << 0,
|
||||||
ImGuiWindowFlags_NoResize = 1 << 1,
|
ImGuiWindowFlags_NoResize = 1 << 1,
|
||||||
ImGuiWindowFlags_NoMove = 1 << 2,
|
ImGuiWindowFlags_NoMove = 1 << 2,
|
||||||
@@ -83,7 +100,7 @@ enum {
|
|||||||
ImGuiWindowFlags_NoScrollWithMouse = 1 << 4,
|
ImGuiWindowFlags_NoScrollWithMouse = 1 << 4,
|
||||||
ImGuiWindowFlags_NoCollapse = 1 << 5,
|
ImGuiWindowFlags_NoCollapse = 1 << 5,
|
||||||
ImGuiWindowFlags_AlwaysAutoResize = 1 << 6,
|
ImGuiWindowFlags_AlwaysAutoResize = 1 << 6,
|
||||||
ImGuiWindowFlags_ShowBorders = 1 << 7,
|
//ImGuiWindowFlags_ShowBorders = 1 << 7,
|
||||||
ImGuiWindowFlags_NoSavedSettings = 1 << 8,
|
ImGuiWindowFlags_NoSavedSettings = 1 << 8,
|
||||||
ImGuiWindowFlags_NoInputs = 1 << 9,
|
ImGuiWindowFlags_NoInputs = 1 << 9,
|
||||||
ImGuiWindowFlags_MenuBar = 1 << 10,
|
ImGuiWindowFlags_MenuBar = 1 << 10,
|
||||||
@@ -92,10 +109,12 @@ enum {
|
|||||||
ImGuiWindowFlags_NoBringToFrontOnFocus = 1 << 13,
|
ImGuiWindowFlags_NoBringToFrontOnFocus = 1 << 13,
|
||||||
ImGuiWindowFlags_AlwaysVerticalScrollbar = 1 << 14,
|
ImGuiWindowFlags_AlwaysVerticalScrollbar = 1 << 14,
|
||||||
ImGuiWindowFlags_AlwaysHorizontalScrollbar = 1 << 15,
|
ImGuiWindowFlags_AlwaysHorizontalScrollbar = 1 << 15,
|
||||||
ImGuiWindowFlags_AlwaysUseWindowPadding = 1 << 16
|
ImGuiWindowFlags_AlwaysUseWindowPadding = 1 << 16,
|
||||||
|
ImGuiWindowFlags_ResizeFromAnySide = 1 << 17,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum
|
||||||
|
{
|
||||||
ImGuiInputTextFlags_CharsDecimal = 1 << 0,
|
ImGuiInputTextFlags_CharsDecimal = 1 << 0,
|
||||||
ImGuiInputTextFlags_CharsHexadecimal = 1 << 1,
|
ImGuiInputTextFlags_CharsHexadecimal = 1 << 1,
|
||||||
ImGuiInputTextFlags_CharsUppercase = 1 << 2,
|
ImGuiInputTextFlags_CharsUppercase = 1 << 2,
|
||||||
@@ -111,13 +130,15 @@ enum {
|
|||||||
ImGuiInputTextFlags_NoHorizontalScroll = 1 << 12,
|
ImGuiInputTextFlags_NoHorizontalScroll = 1 << 12,
|
||||||
ImGuiInputTextFlags_AlwaysInsertMode = 1 << 13,
|
ImGuiInputTextFlags_AlwaysInsertMode = 1 << 13,
|
||||||
ImGuiInputTextFlags_ReadOnly = 1 << 14,
|
ImGuiInputTextFlags_ReadOnly = 1 << 14,
|
||||||
ImGuiInputTextFlags_Password = 1 << 15
|
ImGuiInputTextFlags_Password = 1 << 15,
|
||||||
|
ImGuiInputTextFlags_NoUndoRedo = 1 << 16,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum
|
||||||
|
{
|
||||||
ImGuiTreeNodeFlags_Selected = 1 << 0,
|
ImGuiTreeNodeFlags_Selected = 1 << 0,
|
||||||
ImGuiTreeNodeFlags_Framed = 1 << 1,
|
ImGuiTreeNodeFlags_Framed = 1 << 1,
|
||||||
ImGuiTreeNodeFlags_AllowOverlapMode = 1 << 2,
|
ImGuiTreeNodeFlags_AllowItemOverlap = 1 << 2,
|
||||||
ImGuiTreeNodeFlags_NoTreePushOnOpen = 1 << 3,
|
ImGuiTreeNodeFlags_NoTreePushOnOpen = 1 << 3,
|
||||||
ImGuiTreeNodeFlags_NoAutoOpenOnLog = 1 << 4,
|
ImGuiTreeNodeFlags_NoAutoOpenOnLog = 1 << 4,
|
||||||
ImGuiTreeNodeFlags_DefaultOpen = 1 << 5,
|
ImGuiTreeNodeFlags_DefaultOpen = 1 << 5,
|
||||||
@@ -125,16 +146,60 @@ enum {
|
|||||||
ImGuiTreeNodeFlags_OpenOnArrow = 1 << 7,
|
ImGuiTreeNodeFlags_OpenOnArrow = 1 << 7,
|
||||||
ImGuiTreeNodeFlags_Leaf = 1 << 8,
|
ImGuiTreeNodeFlags_Leaf = 1 << 8,
|
||||||
ImGuiTreeNodeFlags_Bullet = 1 << 9,
|
ImGuiTreeNodeFlags_Bullet = 1 << 9,
|
||||||
|
ImGuiTreeNodeFlags_FramePadding = 1 << 10,
|
||||||
ImGuiTreeNodeFlags_CollapsingHeader = ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoAutoOpenOnLog
|
ImGuiTreeNodeFlags_CollapsingHeader = ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoAutoOpenOnLog
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum
|
||||||
|
{
|
||||||
ImGuiSelectableFlags_DontClosePopups = 1 << 0,
|
ImGuiSelectableFlags_DontClosePopups = 1 << 0,
|
||||||
ImGuiSelectableFlags_SpanAllColumns = 1 << 1,
|
ImGuiSelectableFlags_SpanAllColumns = 1 << 1,
|
||||||
ImGuiSelectableFlags_AllowDoubleClick = 1 << 2
|
ImGuiSelectableFlags_AllowDoubleClick = 1 << 2
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum ImGuiComboFlags_
|
||||||
|
{
|
||||||
|
ImGuiComboFlags_PopupAlignLeft = 1 << 0,
|
||||||
|
ImGuiComboFlags_HeightSmall = 1 << 1,
|
||||||
|
ImGuiComboFlags_HeightRegular = 1 << 2,
|
||||||
|
ImGuiComboFlags_HeightLarge = 1 << 3,
|
||||||
|
ImGuiComboFlags_HeightLargest = 1 << 4,
|
||||||
|
ImGuiComboFlags_HeightMask_ = ImGuiComboFlags_HeightSmall | ImGuiComboFlags_HeightRegular | ImGuiComboFlags_HeightLarge | ImGuiComboFlags_HeightLargest
|
||||||
|
};
|
||||||
|
|
||||||
|
enum ImGuiFocusedFlags_
|
||||||
|
{
|
||||||
|
ImGuiFocusedFlags_ChildWindows = 1 << 0,
|
||||||
|
ImGuiFocusedFlags_RootWindow = 1 << 1,
|
||||||
|
ImGuiFocusedFlags_RootAndChildWindows = ImGuiFocusedFlags_RootWindow | ImGuiFocusedFlags_ChildWindows
|
||||||
|
};
|
||||||
|
|
||||||
|
enum ImGuiHoveredFlags_
|
||||||
|
{
|
||||||
|
ImGuiHoveredFlags_ChildWindows = 1 << 0,
|
||||||
|
ImGuiHoveredFlags_RootWindow = 1 << 1,
|
||||||
|
ImGuiHoveredFlags_AllowWhenBlockedByPopup = 1 << 2,
|
||||||
|
//ImGuiHoveredFlags_AllowWhenBlockedByModal = 1 << 3,
|
||||||
|
ImGuiHoveredFlags_AllowWhenBlockedByActiveItem = 1 << 4,
|
||||||
|
ImGuiHoveredFlags_AllowWhenOverlapped = 1 << 5,
|
||||||
|
ImGuiHoveredFlags_RectOnly = ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_AllowWhenOverlapped,
|
||||||
|
ImGuiHoveredFlags_RootAndChildWindows = ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_ChildWindows
|
||||||
|
};
|
||||||
|
|
||||||
|
enum ImGuiDragDropFlags_
|
||||||
|
{
|
||||||
|
ImGuiDragDropFlags_SourceNoPreviewTooltip = 1 << 0,
|
||||||
|
ImGuiDragDropFlags_SourceNoDisableHover = 1 << 1,
|
||||||
|
ImGuiDragDropFlags_SourceNoHoldToOpenOthers = 1 << 2,
|
||||||
|
ImGuiDragDropFlags_SourceAllowNullID = 1 << 3,
|
||||||
|
ImGuiDragDropFlags_SourceExtern = 1 << 4,
|
||||||
|
ImGuiDragDropFlags_AcceptBeforeDelivery = 1 << 10,
|
||||||
|
ImGuiDragDropFlags_AcceptNoDrawDefaultRect = 1 << 11,
|
||||||
|
ImGuiDragDropFlags_AcceptPeekOnly = ImGuiDragDropFlags_AcceptBeforeDelivery | ImGuiDragDropFlags_AcceptNoDrawDefaultRect
|
||||||
|
};
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
ImGuiKey_Tab,
|
ImGuiKey_Tab,
|
||||||
ImGuiKey_LeftArrow,
|
ImGuiKey_LeftArrow,
|
||||||
ImGuiKey_RightArrow,
|
ImGuiKey_RightArrow,
|
||||||
@@ -157,11 +222,12 @@ enum {
|
|||||||
ImGuiKey_COUNT
|
ImGuiKey_COUNT
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum
|
||||||
|
{
|
||||||
ImGuiCol_Text,
|
ImGuiCol_Text,
|
||||||
ImGuiCol_TextDisabled,
|
ImGuiCol_TextDisabled,
|
||||||
ImGuiCol_WindowBg,
|
ImGuiCol_WindowBg,
|
||||||
ImGuiCol_ChildWindowBg,
|
ImGuiCol_ChildBg,
|
||||||
ImGuiCol_PopupBg,
|
ImGuiCol_PopupBg,
|
||||||
ImGuiCol_Border,
|
ImGuiCol_Border,
|
||||||
ImGuiCol_BorderShadow,
|
ImGuiCol_BorderShadow,
|
||||||
@@ -169,14 +235,13 @@ enum {
|
|||||||
ImGuiCol_FrameBgHovered,
|
ImGuiCol_FrameBgHovered,
|
||||||
ImGuiCol_FrameBgActive,
|
ImGuiCol_FrameBgActive,
|
||||||
ImGuiCol_TitleBg,
|
ImGuiCol_TitleBg,
|
||||||
ImGuiCol_TitleBgCollapsed,
|
|
||||||
ImGuiCol_TitleBgActive,
|
ImGuiCol_TitleBgActive,
|
||||||
|
ImGuiCol_TitleBgCollapsed,
|
||||||
ImGuiCol_MenuBarBg,
|
ImGuiCol_MenuBarBg,
|
||||||
ImGuiCol_ScrollbarBg,
|
ImGuiCol_ScrollbarBg,
|
||||||
ImGuiCol_ScrollbarGrab,
|
ImGuiCol_ScrollbarGrab,
|
||||||
ImGuiCol_ScrollbarGrabHovered,
|
ImGuiCol_ScrollbarGrabHovered,
|
||||||
ImGuiCol_ScrollbarGrabActive,
|
ImGuiCol_ScrollbarGrabActive,
|
||||||
ImGuiCol_ComboBg,
|
|
||||||
ImGuiCol_CheckMark,
|
ImGuiCol_CheckMark,
|
||||||
ImGuiCol_SliderGrab,
|
ImGuiCol_SliderGrab,
|
||||||
ImGuiCol_SliderGrabActive,
|
ImGuiCol_SliderGrabActive,
|
||||||
@@ -201,17 +266,24 @@ enum {
|
|||||||
ImGuiCol_PlotHistogramHovered,
|
ImGuiCol_PlotHistogramHovered,
|
||||||
ImGuiCol_TextSelectedBg,
|
ImGuiCol_TextSelectedBg,
|
||||||
ImGuiCol_ModalWindowDarkening,
|
ImGuiCol_ModalWindowDarkening,
|
||||||
|
ImGuiCol_DragDropTarget,
|
||||||
ImGuiCol_COUNT
|
ImGuiCol_COUNT
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum
|
||||||
|
{
|
||||||
ImGuiStyleVar_Alpha,
|
ImGuiStyleVar_Alpha,
|
||||||
ImGuiStyleVar_WindowPadding,
|
ImGuiStyleVar_WindowPadding,
|
||||||
ImGuiStyleVar_WindowRounding,
|
ImGuiStyleVar_WindowRounding,
|
||||||
|
ImGuiStyleVar_WindowBorderSize,
|
||||||
ImGuiStyleVar_WindowMinSize,
|
ImGuiStyleVar_WindowMinSize,
|
||||||
ImGuiStyleVar_ChildWindowRounding,
|
ImGuiStyleVar_ChildRounding,
|
||||||
|
ImGuiStyleVar_ChildBorderSize,
|
||||||
|
ImGuiStyleVar_PopupRounding,
|
||||||
|
ImGuiStyleVar_PopupBorderSize,
|
||||||
ImGuiStyleVar_FramePadding,
|
ImGuiStyleVar_FramePadding,
|
||||||
ImGuiStyleVar_FrameRounding,
|
ImGuiStyleVar_FrameRounding,
|
||||||
|
ImGuiStyleVar_FrameBorderSize,
|
||||||
ImGuiStyleVar_ItemSpacing,
|
ImGuiStyleVar_ItemSpacing,
|
||||||
ImGuiStyleVar_ItemInnerSpacing,
|
ImGuiStyleVar_ItemInnerSpacing,
|
||||||
ImGuiStyleVar_IndentSpacing,
|
ImGuiStyleVar_IndentSpacing,
|
||||||
@@ -220,7 +292,8 @@ enum {
|
|||||||
ImGuiStyleVar_Count_
|
ImGuiStyleVar_Count_
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum
|
||||||
|
{
|
||||||
ImGuiColorEditFlags_NoAlpha = 1 << 1,
|
ImGuiColorEditFlags_NoAlpha = 1 << 1,
|
||||||
ImGuiColorEditFlags_NoPicker = 1 << 2,
|
ImGuiColorEditFlags_NoPicker = 1 << 2,
|
||||||
ImGuiColorEditFlags_NoOptions = 1 << 3,
|
ImGuiColorEditFlags_NoOptions = 1 << 3,
|
||||||
@@ -242,7 +315,8 @@ enum {
|
|||||||
ImGuiColorEditFlags_PickerHueWheel = 1 << 19
|
ImGuiColorEditFlags_PickerHueWheel = 1 << 19
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum
|
||||||
|
{
|
||||||
ImGuiMouseCursor_None = -1,
|
ImGuiMouseCursor_None = -1,
|
||||||
ImGuiMouseCursor_Arrow = 0,
|
ImGuiMouseCursor_Arrow = 0,
|
||||||
ImGuiMouseCursor_TextInput,
|
ImGuiMouseCursor_TextInput,
|
||||||
@@ -254,22 +328,48 @@ enum {
|
|||||||
ImGuiMouseCursor_Count_
|
ImGuiMouseCursor_Count_
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum
|
||||||
|
{
|
||||||
ImGuiCond_Always = 1 << 0,
|
ImGuiCond_Always = 1 << 0,
|
||||||
ImGuiCond_Once = 1 << 1,
|
ImGuiCond_Once = 1 << 1,
|
||||||
ImGuiCond_FirstUseEver = 1 << 2,
|
ImGuiCond_FirstUseEver = 1 << 2,
|
||||||
ImGuiCond_Appearing = 1 << 3
|
ImGuiCond_Appearing = 1 << 3
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ImGuiStyle {
|
enum ImDrawCornerFlags_
|
||||||
|
{
|
||||||
|
ImDrawCornerFlags_TopLeft = 1 << 0,
|
||||||
|
ImDrawCornerFlags_TopRight = 1 << 1,
|
||||||
|
ImDrawCornerFlags_BotLeft = 1 << 2,
|
||||||
|
ImDrawCornerFlags_BotRight = 1 << 3,
|
||||||
|
ImDrawCornerFlags_Top = ImDrawCornerFlags_TopLeft | ImDrawCornerFlags_TopRight,
|
||||||
|
ImDrawCornerFlags_Bot = ImDrawCornerFlags_BotLeft | ImDrawCornerFlags_BotRight,
|
||||||
|
ImDrawCornerFlags_Left = ImDrawCornerFlags_TopLeft | ImDrawCornerFlags_BotLeft,
|
||||||
|
ImDrawCornerFlags_Right = ImDrawCornerFlags_TopRight | ImDrawCornerFlags_BotRight,
|
||||||
|
ImDrawCornerFlags_All = 0xF
|
||||||
|
};
|
||||||
|
|
||||||
|
enum ImDrawListFlags_
|
||||||
|
{
|
||||||
|
ImDrawListFlags_AntiAliasedLines = 1 << 0,
|
||||||
|
ImDrawListFlags_AntiAliasedFill = 1 << 1
|
||||||
|
};
|
||||||
|
|
||||||
|
struct ImGuiStyle
|
||||||
|
{
|
||||||
float Alpha;
|
float Alpha;
|
||||||
struct ImVec2 WindowPadding;
|
struct ImVec2 WindowPadding;
|
||||||
struct ImVec2 WindowMinSize;
|
|
||||||
float WindowRounding;
|
float WindowRounding;
|
||||||
|
float WindowBorderSize;
|
||||||
|
ImVec2 WindowMinSize;
|
||||||
struct ImVec2 WindowTitleAlign;
|
struct ImVec2 WindowTitleAlign;
|
||||||
float ChildWindowRounding;
|
float ChildRounding;
|
||||||
|
float ChildBorderSize;
|
||||||
|
float PopupRounding;
|
||||||
|
float PopupBorderSize;
|
||||||
struct ImVec2 FramePadding;
|
struct ImVec2 FramePadding;
|
||||||
float FrameRounding;
|
float FrameRounding;
|
||||||
|
float FrameBorderSize;
|
||||||
struct ImVec2 ItemSpacing;
|
struct ImVec2 ItemSpacing;
|
||||||
struct ImVec2 ItemInnerSpacing;
|
struct ImVec2 ItemInnerSpacing;
|
||||||
struct ImVec2 TouchExtraPadding;
|
struct ImVec2 TouchExtraPadding;
|
||||||
@@ -283,17 +383,18 @@ struct ImGuiStyle {
|
|||||||
struct ImVec2 DisplayWindowPadding;
|
struct ImVec2 DisplayWindowPadding;
|
||||||
struct ImVec2 DisplaySafeAreaPadding;
|
struct ImVec2 DisplaySafeAreaPadding;
|
||||||
bool AntiAliasedLines;
|
bool AntiAliasedLines;
|
||||||
bool AntiAliasedShapes;
|
bool AntiAliasedFill;
|
||||||
float CurveTessellationTol;
|
float CurveTessellationTol;
|
||||||
struct ImVec4 Colors[ImGuiCol_COUNT];
|
struct ImVec4 Colors[ImGuiCol_COUNT];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ImGuiIO {
|
struct ImGuiIO
|
||||||
|
{
|
||||||
struct ImVec2 DisplaySize;
|
struct ImVec2 DisplaySize;
|
||||||
float DeltaTime;
|
float DeltaTime;
|
||||||
float IniSavingRate;
|
float IniSavingRate;
|
||||||
const char* IniFilename;
|
CONST char *IniFilename;
|
||||||
const char* LogFilename;
|
CONST char *LogFilename;
|
||||||
float MouseDoubleClickTime;
|
float MouseDoubleClickTime;
|
||||||
float MouseDoubleClickMaxDist;
|
float MouseDoubleClickMaxDist;
|
||||||
float MouseDragThreshold;
|
float MouseDragThreshold;
|
||||||
@@ -308,10 +409,11 @@ struct ImGuiIO {
|
|||||||
struct ImVec2 DisplayFramebufferScale;
|
struct ImVec2 DisplayFramebufferScale;
|
||||||
struct ImVec2 DisplayVisibleMin;
|
struct ImVec2 DisplayVisibleMin;
|
||||||
struct ImVec2 DisplayVisibleMax;
|
struct ImVec2 DisplayVisibleMax;
|
||||||
bool OSXBehaviors;
|
bool OptMacOSXBehaviors;
|
||||||
|
bool OptCursorBlink;
|
||||||
void (*RenderDrawListsFn)(struct ImDrawData *data);
|
void (*RenderDrawListsFn)(struct ImDrawData *data);
|
||||||
const char* (*GetClipboardTextFn)(void* user_data);
|
CONST char *(*GetClipboardTextFn)(void *user_data);
|
||||||
void (*SetClipboardTextFn)(void* user_data, const char* text);
|
void (*SetClipboardTextFn)(void *user_data, CONST char *text);
|
||||||
void *ClipboardUserData;
|
void *ClipboardUserData;
|
||||||
void *(*MemAllocFn)(size_t sz);
|
void *(*MemAllocFn)(size_t sz);
|
||||||
void (*MemFreeFn)(void *ptr);
|
void (*MemFreeFn)(void *ptr);
|
||||||
@@ -345,12 +447,14 @@ struct ImGuiIO {
|
|||||||
bool MouseDownOwned[5];
|
bool MouseDownOwned[5];
|
||||||
float MouseDownDuration[5];
|
float MouseDownDuration[5];
|
||||||
float MouseDownDurationPrev[5];
|
float MouseDownDurationPrev[5];
|
||||||
|
ImVec2 MouseDragMaxDistanceAbs[5];
|
||||||
float MouseDragMaxDistanceSqr[5];
|
float MouseDragMaxDistanceSqr[5];
|
||||||
float KeysDownDuration[512];
|
float KeysDownDuration[512];
|
||||||
float KeysDownDurationPrev[512];
|
float KeysDownDurationPrev[512];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ImGuiTextEditCallbackData {
|
struct ImGuiTextEditCallbackData
|
||||||
|
{
|
||||||
ImGuiInputTextFlags EventFlag;
|
ImGuiInputTextFlags EventFlag;
|
||||||
ImGuiInputTextFlags Flags;
|
ImGuiInputTextFlags Flags;
|
||||||
void *UserData;
|
void *UserData;
|
||||||
@@ -366,14 +470,16 @@ struct ImGuiTextEditCallbackData {
|
|||||||
int SelectionEnd;
|
int SelectionEnd;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ImGuiSizeConstraintCallbackData {
|
struct ImGuiSizeConstraintCallbackData
|
||||||
|
{
|
||||||
void *UserData;
|
void *UserData;
|
||||||
struct ImVec2 Pos;
|
struct ImVec2 Pos;
|
||||||
struct ImVec2 CurrentSize;
|
struct ImVec2 CurrentSize;
|
||||||
struct ImVec2 DesiredSize;
|
struct ImVec2 DesiredSize;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ImDrawCmd {
|
struct ImDrawCmd
|
||||||
|
{
|
||||||
unsigned int ElemCount;
|
unsigned int ElemCount;
|
||||||
struct ImVec4 ClipRect;
|
struct ImVec4 ClipRect;
|
||||||
ImTextureID TextureId;
|
ImTextureID TextureId;
|
||||||
@@ -381,7 +487,8 @@ struct ImDrawCmd {
|
|||||||
void *UserCallbackData;
|
void *UserCallbackData;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ImDrawData {
|
struct ImDrawData
|
||||||
|
{
|
||||||
bool Valid;
|
bool Valid;
|
||||||
struct ImDrawList **CmdLists;
|
struct ImDrawList **CmdLists;
|
||||||
int CmdListsCount;
|
int CmdListsCount;
|
||||||
@@ -396,7 +503,8 @@ struct ImDrawVert
|
|||||||
ImU32 col;
|
ImU32 col;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ImFontConfig {
|
struct ImFontConfig
|
||||||
|
{
|
||||||
void *FontData;
|
void *FontData;
|
||||||
int FontDataSize;
|
int FontDataSize;
|
||||||
bool FontDataOwnedByAtlas;
|
bool FontDataOwnedByAtlas;
|
||||||
@@ -406,7 +514,7 @@ struct ImFontConfig {
|
|||||||
bool PixelSnapH;
|
bool PixelSnapH;
|
||||||
struct ImVec2 GlyphExtraSpacing;
|
struct ImVec2 GlyphExtraSpacing;
|
||||||
struct ImVec2 GlyphOffset;
|
struct ImVec2 GlyphOffset;
|
||||||
const ImWchar* GlyphRanges;
|
CONST ImWchar *GlyphRanges;
|
||||||
bool MergeMode;
|
bool MergeMode;
|
||||||
char Name[32];
|
char Name[32];
|
||||||
struct ImFont *DstFont;
|
struct ImFont *DstFont;
|
||||||
@@ -418,22 +526,42 @@ struct ImGuiListClipper
|
|||||||
float ItemsHeight;
|
float ItemsHeight;
|
||||||
int ItemsCount, StepNo, DisplayStart, DisplayEnd;
|
int ItemsCount, StepNo, DisplayStart, DisplayEnd;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct ImGuiPayload
|
||||||
|
{
|
||||||
|
CONST void *Data;
|
||||||
|
int DataSize;
|
||||||
|
|
||||||
|
ImGuiID SourceId;
|
||||||
|
ImGuiID SourceParentId;
|
||||||
|
int DataFrameCount;
|
||||||
|
char DataType[8 + 1];
|
||||||
|
bool Preview;
|
||||||
|
bool Delivery;
|
||||||
|
};
|
||||||
#endif // CIMGUI_DEFINE_ENUMS_AND_STRUCTS
|
#endif // CIMGUI_DEFINE_ENUMS_AND_STRUCTS
|
||||||
|
|
||||||
|
// Main
|
||||||
CIMGUI_API struct ImGuiIO *igGetIO();
|
CIMGUI_API struct ImGuiIO *igGetIO();
|
||||||
CIMGUI_API struct ImGuiStyle *igGetStyle();
|
CIMGUI_API struct ImGuiStyle *igGetStyle();
|
||||||
CIMGUI_API struct ImDrawData *igGetDrawData();
|
CIMGUI_API struct ImDrawData *igGetDrawData();
|
||||||
CIMGUI_API void igNewFrame();
|
CIMGUI_API void igNewFrame();
|
||||||
CIMGUI_API void igRender();
|
CIMGUI_API void igRender();
|
||||||
|
CIMGUI_API void igEndFrame();
|
||||||
CIMGUI_API void igShutdown();
|
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 igShowDemoWindow(bool *opened);
|
||||||
CIMGUI_API void igShowMetricsWindow(bool *opened);
|
CIMGUI_API void igShowMetricsWindow(bool *opened);
|
||||||
|
CIMGUI_API void igShowStyleEditor(struct ImGuiStyle *ref);
|
||||||
|
CIMGUI_API void igShowStyleSelector(CONST char *label);
|
||||||
|
CIMGUI_API void igShowFontSelector(CONST char *label);
|
||||||
|
CIMGUI_API void igShowUserGuide();
|
||||||
|
|
||||||
// Window
|
// Window
|
||||||
CIMGUI_API bool igBegin(CONST char *name, bool *p_open, ImGuiWindowFlags flags);
|
CIMGUI_API bool igBegin(CONST char *name, bool *p_open, ImGuiWindowFlags flags);
|
||||||
CIMGUI_API bool igBegin2(CONST char* name, bool* p_open, CONST struct ImVec2 size_on_first_use, float bg_alpha, ImGuiWindowFlags flags);
|
//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 void igEnd();
|
||||||
CIMGUI_API bool igBeginChild(CONST char *str_id, CONST struct ImVec2 size, bool border, ImGuiWindowFlags extra_flags);
|
CIMGUI_API bool igBeginChild(CONST char *str_id, CONST struct ImVec2 size, bool border, ImGuiWindowFlags extra_flags);
|
||||||
CIMGUI_API bool igBeginChildEx(ImGuiID id, CONST struct ImVec2 size, bool border, ImGuiWindowFlags extra_flags);
|
CIMGUI_API bool igBeginChildEx(ImGuiID id, CONST struct ImVec2 size, bool border, ImGuiWindowFlags extra_flags);
|
||||||
@@ -450,14 +578,13 @@ CIMGUI_API void igGetWindowSize(struct ImVec2* out);
|
|||||||
CIMGUI_API float igGetWindowWidth();
|
CIMGUI_API float igGetWindowWidth();
|
||||||
CIMGUI_API float igGetWindowHeight();
|
CIMGUI_API float igGetWindowHeight();
|
||||||
CIMGUI_API bool igIsWindowCollapsed();
|
CIMGUI_API bool igIsWindowCollapsed();
|
||||||
|
CIMGUI_API bool igIsWindowAppearing();
|
||||||
CIMGUI_API void igSetWindowFontScale(float scale);
|
CIMGUI_API void igSetWindowFontScale(float scale);
|
||||||
|
|
||||||
CIMGUI_API void igSetNextWindowPos(CONST struct ImVec2 pos, ImGuiCond cond);
|
CIMGUI_API void igSetNextWindowPos(CONST struct ImVec2 pos, ImGuiCond cond, CONST struct ImVec2 pivot);
|
||||||
CIMGUI_API void igSetNextWindowPosCenter(ImGuiCond cond);
|
|
||||||
CIMGUI_API void igSetNextWindowSize(CONST struct ImVec2 size, ImGuiCond cond);
|
CIMGUI_API void igSetNextWindowSize(CONST struct ImVec2 size, ImGuiCond cond);
|
||||||
CIMGUI_API void igSetNextWindowSizeConstraints(CONST struct ImVec2 size_min, CONST struct ImVec2 size_max, ImGuiSizeConstraintCallback custom_callback, void *custom_callback_data);
|
CIMGUI_API void igSetNextWindowSizeConstraints(CONST struct ImVec2 size_min, CONST struct ImVec2 size_max, ImGuiSizeConstraintCallback custom_callback, void *custom_callback_data);
|
||||||
CIMGUI_API void igSetNextWindowContentSize(CONST struct ImVec2 size);
|
CIMGUI_API void igSetNextWindowContentSize(CONST struct ImVec2 size);
|
||||||
CIMGUI_API void igSetNextWindowContentWidth(float width);
|
|
||||||
CIMGUI_API void igSetNextWindowCollapsed(bool collapsed, ImGuiCond cond);
|
CIMGUI_API void igSetNextWindowCollapsed(bool collapsed, ImGuiCond cond);
|
||||||
CIMGUI_API void igSetNextWindowFocus();
|
CIMGUI_API void igSetNextWindowFocus();
|
||||||
CIMGUI_API void igSetWindowPos(CONST struct ImVec2 pos, ImGuiCond cond);
|
CIMGUI_API void igSetWindowPos(CONST struct ImVec2 pos, ImGuiCond cond);
|
||||||
@@ -477,7 +604,6 @@ CIMGUI_API void igSetScrollX(float scroll_x);
|
|||||||
CIMGUI_API void igSetScrollY(float scroll_y);
|
CIMGUI_API void igSetScrollY(float scroll_y);
|
||||||
CIMGUI_API void igSetScrollHere(float center_y_ratio);
|
CIMGUI_API void igSetScrollHere(float center_y_ratio);
|
||||||
CIMGUI_API void igSetScrollFromPosY(float pos_y, float center_y_ratio);
|
CIMGUI_API void igSetScrollFromPosY(float pos_y, float center_y_ratio);
|
||||||
CIMGUI_API void igSetKeyboardFocusHere(int offset);
|
|
||||||
CIMGUI_API void igSetStateStorage(struct ImGuiStorage *tree);
|
CIMGUI_API void igSetStateStorage(struct ImGuiStorage *tree);
|
||||||
CIMGUI_API struct ImGuiStorage *igGetStateStorage();
|
CIMGUI_API struct ImGuiStorage *igGetStateStorage();
|
||||||
|
|
||||||
@@ -498,7 +624,6 @@ CIMGUI_API ImU32 igGetColorU32(ImGuiCol idx, float alpha_mul);
|
|||||||
CIMGUI_API ImU32 igGetColorU32Vec(CONST struct ImVec4 *col);
|
CIMGUI_API ImU32 igGetColorU32Vec(CONST struct ImVec4 *col);
|
||||||
CIMGUI_API ImU32 igGetColorU32U32(ImU32 col);
|
CIMGUI_API ImU32 igGetColorU32U32(ImU32 col);
|
||||||
|
|
||||||
|
|
||||||
// Parameters stacks (current window)
|
// Parameters stacks (current window)
|
||||||
CIMGUI_API void igPushItemWidth(float item_width);
|
CIMGUI_API void igPushItemWidth(float item_width);
|
||||||
CIMGUI_API void igPopItemWidth();
|
CIMGUI_API void igPopItemWidth();
|
||||||
@@ -510,7 +635,7 @@ CIMGUI_API void igPopAllowKeyboardFocus();
|
|||||||
CIMGUI_API void igPushButtonRepeat(bool repeat);
|
CIMGUI_API void igPushButtonRepeat(bool repeat);
|
||||||
CIMGUI_API void igPopButtonRepeat();
|
CIMGUI_API void igPopButtonRepeat();
|
||||||
|
|
||||||
// Layout
|
// Cursor / Layout
|
||||||
CIMGUI_API void igSeparator();
|
CIMGUI_API void igSeparator();
|
||||||
CIMGUI_API void igSameLine(float pos_x, float spacing_w);
|
CIMGUI_API void igSameLine(float pos_x, float spacing_w);
|
||||||
CIMGUI_API void igNewLine();
|
CIMGUI_API void igNewLine();
|
||||||
@@ -529,10 +654,11 @@ CIMGUI_API void igSetCursorPosY(float y);
|
|||||||
CIMGUI_API void igGetCursorStartPos(struct ImVec2 *pOut);
|
CIMGUI_API void igGetCursorStartPos(struct ImVec2 *pOut);
|
||||||
CIMGUI_API void igGetCursorScreenPos(struct ImVec2 *pOut);
|
CIMGUI_API void igGetCursorScreenPos(struct ImVec2 *pOut);
|
||||||
CIMGUI_API void igSetCursorScreenPos(CONST struct ImVec2 pos);
|
CIMGUI_API void igSetCursorScreenPos(CONST struct ImVec2 pos);
|
||||||
CIMGUI_API void igAlignFirstTextHeightToWidgets();
|
CIMGUI_API void igAlignTextToFramePadding();
|
||||||
CIMGUI_API float igGetTextLineHeight();
|
CIMGUI_API float igGetTextLineHeight();
|
||||||
CIMGUI_API float igGetTextLineHeightWithSpacing();
|
CIMGUI_API float igGetTextLineHeightWithSpacing();
|
||||||
CIMGUI_API float igGetItemsLineHeightWithSpacing();
|
CIMGUI_API float igGetFrameHeight();
|
||||||
|
CIMGUI_API float igGetFrameHeightWithSpacing();
|
||||||
|
|
||||||
//Columns
|
//Columns
|
||||||
CIMGUI_API void igColumns(int count, CONST char *id, bool border);
|
CIMGUI_API void igColumns(int count, CONST char *id, bool border);
|
||||||
@@ -547,16 +673,17 @@ CIMGUI_API int igGetColumnsCount();
|
|||||||
// ID scopes
|
// ID scopes
|
||||||
// If you are creating widgets in a loop you most likely want to push a unique identifier so ImGui can differentiate them
|
// 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')
|
// 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);
|
||||||
CIMGUI_API void igPushIdStrRange(CONST char* str_begin, CONST char* str_end);
|
CIMGUI_API void igPushIDStrRange(CONST char *str_begin, CONST char *str_end);
|
||||||
CIMGUI_API void igPushIdPtr(CONST void* ptr_id);
|
CIMGUI_API void igPushIDPtr(CONST void *ptr_id);
|
||||||
CIMGUI_API void igPushIdInt(int int_id);
|
CIMGUI_API void igPushIDInt(int int_id);
|
||||||
CIMGUI_API void igPopId();
|
CIMGUI_API void igPopID();
|
||||||
CIMGUI_API ImGuiID igGetIdStr(CONST char* str_id);
|
CIMGUI_API ImGuiID igGetIDStr(CONST char *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);
|
||||||
CIMGUI_API ImGuiID igGetIdPtr(CONST void* ptr_id);
|
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 igText(CONST char *fmt, ...);
|
||||||
CIMGUI_API void igTextV(CONST char *fmt, va_list args);
|
CIMGUI_API void igTextV(CONST char *fmt, va_list args);
|
||||||
CIMGUI_API void igTextColored(CONST struct ImVec4 col, CONST char *fmt, ...);
|
CIMGUI_API void igTextColored(CONST struct ImVec4 col, CONST char *fmt, ...);
|
||||||
@@ -565,12 +692,13 @@ CIMGUI_API void igTextDisabled(CONST char* fmt, ...);
|
|||||||
CIMGUI_API void igTextDisabledV(CONST char *fmt, va_list args);
|
CIMGUI_API void igTextDisabledV(CONST char *fmt, va_list args);
|
||||||
CIMGUI_API void igTextWrapped(CONST char *fmt, ...);
|
CIMGUI_API void igTextWrapped(CONST char *fmt, ...);
|
||||||
CIMGUI_API void igTextWrappedV(CONST char *fmt, va_list args);
|
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 igLabelText(CONST char *label, CONST char *fmt, ...);
|
||||||
CIMGUI_API void igLabelTextV(CONST char *label, CONST char *fmt, va_list args);
|
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 igBulletText(CONST char *fmt, ...);
|
||||||
CIMGUI_API void igBulletTextV(CONST char *fmt, va_list args);
|
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 igButton(CONST char *label, CONST struct ImVec2 size);
|
||||||
CIMGUI_API bool igSmallButton(CONST char *label);
|
CIMGUI_API bool igSmallButton(CONST char *label);
|
||||||
CIMGUI_API bool igInvisibleButton(CONST char *str_id, CONST struct ImVec2 size);
|
CIMGUI_API bool igInvisibleButton(CONST char *str_id, CONST struct ImVec2 size);
|
||||||
@@ -580,17 +708,44 @@ CIMGUI_API bool igCheckbox(CONST char* label, bool* v);
|
|||||||
CIMGUI_API bool igCheckboxFlags(CONST char *label, unsigned int *flags, unsigned int flags_value);
|
CIMGUI_API bool igCheckboxFlags(CONST char *label, unsigned int *flags, unsigned int flags_value);
|
||||||
CIMGUI_API bool igRadioButtonBool(CONST char *label, bool active);
|
CIMGUI_API bool igRadioButtonBool(CONST char *label, bool active);
|
||||||
CIMGUI_API bool igRadioButton(CONST char *label, int *v, int v_button);
|
CIMGUI_API bool igRadioButton(CONST char *label, int *v, int v_button);
|
||||||
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 void igPlotLines(CONST char *label, CONST float *values, int values_count, int values_offset, CONST char *overlay_text, float scale_min, float scale_max, struct ImVec2 graph_size, int stride);
|
CIMGUI_API void igPlotLines(CONST char *label, CONST float *values, int values_count, int values_offset, CONST char *overlay_text, float scale_min, float scale_max, struct ImVec2 graph_size, int stride);
|
||||||
CIMGUI_API void igPlotLines2(CONST char *label, float (*values_getter)(void *data, int idx), void *data, int values_count, int values_offset, CONST char *overlay_text, float scale_min, float scale_max, struct ImVec2 graph_size);
|
CIMGUI_API void igPlotLines2(CONST char *label, float (*values_getter)(void *data, int idx), void *data, int values_count, int values_offset, CONST char *overlay_text, float scale_min, float scale_max, struct ImVec2 graph_size);
|
||||||
CIMGUI_API void igPlotHistogram(CONST char *label, CONST float *values, int values_count, int values_offset, CONST char *overlay_text, float scale_min, float scale_max, struct ImVec2 graph_size, int stride);
|
CIMGUI_API void igPlotHistogram(CONST char *label, CONST float *values, int values_count, int values_offset, CONST char *overlay_text, float scale_min, float scale_max, struct ImVec2 graph_size, int stride);
|
||||||
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 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);
|
CIMGUI_API void igProgressBar(float fraction, CONST struct ImVec2 *size_arg, CONST char *overlay);
|
||||||
|
|
||||||
|
CIMGUI_API bool igBeginCombo(CONST char *label, CONST char *preview_value, ImGuiComboFlags flags);
|
||||||
|
CIMGUI_API void igEndCombo();
|
||||||
|
CIMGUI_API bool igCombo(CONST char *label, int *current_item, CONST char *CONST *items, int items_count, int popup_max_height_in_items);
|
||||||
|
CIMGUI_API bool igCombo2(CONST char *label, int *current_item, CONST char *items_separated_by_zeros, int popup_max_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 popup_max_height_in_items);
|
||||||
|
|
||||||
// Widgets: Sliders (tip: ctrl+click on a slider to input text)
|
// 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: 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 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 igSliderFloat2(CONST char *label, float v[2], float v_min, float v_max, CONST char *display_format, float power);
|
||||||
CIMGUI_API bool igSliderFloat3(CONST char *label, float v[3], float v_min, float v_max, CONST char *display_format, float power);
|
CIMGUI_API bool igSliderFloat3(CONST char *label, float v[3], float v_min, float v_max, CONST char *display_format, float power);
|
||||||
@@ -604,6 +759,7 @@ CIMGUI_API bool igVSliderFloat(CONST char* label, CONST struct ImVec
|
|||||||
CIMGUI_API bool igVSliderInt(CONST char *label, CONST struct ImVec2 size, int *v, int v_min, int v_max, CONST char *display_format);
|
CIMGUI_API bool igVSliderInt(CONST char *label, CONST struct ImVec2 size, int *v, int v_min, int v_max, CONST char *display_format);
|
||||||
|
|
||||||
// Widgets: Color Editor/Picker (tip: the ColorEdit* functions have a little colored preview square that can be left-clicked to open a picker, and right-clicked to open an option menu.)
|
// 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 igColorEdit3(CONST char *label, float col[3], ImGuiColorEditFlags flags);
|
||||||
CIMGUI_API bool igColorEdit4(CONST char *label, float col[4], 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 igColorPicker3(CONST char *label, float col[3], ImGuiColorEditFlags flags);
|
||||||
@@ -611,32 +767,6 @@ CIMGUI_API bool igColorPicker4(CONST char* label, float col[4], ImGu
|
|||||||
CIMGUI_API bool igColorButton(CONST char *desc_id, CONST struct ImVec4 col, ImGuiColorEditFlags flags, CONST struct ImVec2 size);
|
CIMGUI_API bool igColorButton(CONST char *desc_id, CONST struct ImVec4 col, ImGuiColorEditFlags flags, CONST struct ImVec2 size);
|
||||||
CIMGUI_API void igSetColorEditOptions(ImGuiColorEditFlags flags);
|
CIMGUI_API void igSetColorEditOptions(ImGuiColorEditFlags 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); // 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: Trees
|
// Widgets: Trees
|
||||||
CIMGUI_API bool igTreeNode(CONST char *label);
|
CIMGUI_API bool igTreeNode(CONST char *label);
|
||||||
CIMGUI_API bool igTreeNodeStr(CONST char *str_id, CONST char *fmt, ...);
|
CIMGUI_API bool igTreeNodeStr(CONST char *str_id, CONST char *fmt, ...);
|
||||||
@@ -690,6 +820,7 @@ CIMGUI_API bool igMenuItemPtr(CONST char* label, CONST char* shortcu
|
|||||||
|
|
||||||
// Popup
|
// Popup
|
||||||
CIMGUI_API void igOpenPopup(CONST char *str_id);
|
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 igBeginPopup(CONST char *str_id);
|
||||||
CIMGUI_API bool igBeginPopupModal(CONST char *name, bool *p_open, ImGuiWindowFlags extra_flags);
|
CIMGUI_API bool igBeginPopupModal(CONST char *name, bool *p_open, ImGuiWindowFlags extra_flags);
|
||||||
CIMGUI_API bool igBeginPopupContextItem(CONST char *str_id, int mouse_button);
|
CIMGUI_API bool igBeginPopupContextItem(CONST char *str_id, int mouse_button);
|
||||||
@@ -707,13 +838,27 @@ CIMGUI_API void igLogFinish();
|
|||||||
CIMGUI_API void igLogButtons();
|
CIMGUI_API void igLogButtons();
|
||||||
CIMGUI_API void igLogText(CONST char *fmt, ...);
|
CIMGUI_API void igLogText(CONST char *fmt, ...);
|
||||||
|
|
||||||
|
CIMGUI_API bool igBeginDragDropSource(ImGuiDragDropFlags flags, int mouse_button);
|
||||||
|
CIMGUI_API bool igSetDragDropPayload(CONST char *type, CONST void *data, size_t size, ImGuiCond cond);
|
||||||
|
CIMGUI_API void igEndDragDropSource();
|
||||||
|
CIMGUI_API bool igBeginDragDropTarget();
|
||||||
|
CIMGUI_API CONST struct ImGuiPayload *igAcceptDragDropPayload(CONST char *type, ImGuiDragDropFlags flags);
|
||||||
|
CIMGUI_API void igEndDragDropTarget();
|
||||||
|
|
||||||
// Clipping
|
// Clipping
|
||||||
CIMGUI_API void igPushClipRect(CONST struct ImVec2 clip_rect_min, CONST struct ImVec2 clip_rect_max, bool intersect_with_current_clip_rect);
|
CIMGUI_API void igPushClipRect(CONST struct ImVec2 clip_rect_min, CONST struct ImVec2 clip_rect_max, bool intersect_with_current_clip_rect);
|
||||||
CIMGUI_API void igPopClipRect();
|
CIMGUI_API void igPopClipRect();
|
||||||
|
|
||||||
|
// Styles
|
||||||
|
CIMGUI_API void igStyleColorsClassic(struct ImGuiStyle *dst);
|
||||||
|
CIMGUI_API void igStyleColorsDark(struct ImGuiStyle *dst);
|
||||||
|
CIMGUI_API void igStyleColorsLight(struct ImGuiStyle *dst);
|
||||||
|
|
||||||
|
CIMGUI_API void igSetItemDefaultFocus();
|
||||||
|
CIMGUI_API void igSetKeyboardFocusHere(int offset);
|
||||||
|
|
||||||
// Utilities
|
// Utilities
|
||||||
CIMGUI_API bool igIsItemHovered();
|
CIMGUI_API bool igIsItemHovered(ImGuiHoveredFlags flags);
|
||||||
CIMGUI_API bool igIsItemRectHovered();
|
|
||||||
CIMGUI_API bool igIsItemActive();
|
CIMGUI_API bool igIsItemActive();
|
||||||
CIMGUI_API bool igIsItemClicked(int mouse_button);
|
CIMGUI_API bool igIsItemClicked(int mouse_button);
|
||||||
CIMGUI_API bool igIsItemVisible();
|
CIMGUI_API bool igIsItemVisible();
|
||||||
@@ -723,17 +868,18 @@ CIMGUI_API void igGetItemRectMin(struct ImVec2* pOut);
|
|||||||
CIMGUI_API void igGetItemRectMax(struct ImVec2 *pOut);
|
CIMGUI_API void igGetItemRectMax(struct ImVec2 *pOut);
|
||||||
CIMGUI_API void igGetItemRectSize(struct ImVec2 *pOut);
|
CIMGUI_API void igGetItemRectSize(struct ImVec2 *pOut);
|
||||||
CIMGUI_API void igSetItemAllowOverlap();
|
CIMGUI_API void igSetItemAllowOverlap();
|
||||||
CIMGUI_API bool igIsWindowFocused();
|
CIMGUI_API bool igIsWindowFocused(ImGuiFocusedFlags flags);
|
||||||
CIMGUI_API bool igIsWindowHovered();
|
CIMGUI_API bool igIsWindowHovered(ImGuiHoveredFlags falgs);
|
||||||
CIMGUI_API bool igIsWindowRectHovered();
|
CIMGUI_API bool igIsAnyWindowFocused();
|
||||||
CIMGUI_API bool igIsRootWindowFocused();
|
|
||||||
CIMGUI_API bool igIsRootWindowOrAnyChildFocused();
|
|
||||||
CIMGUI_API bool igIsRootWindowOrAnyChildHovered();
|
|
||||||
CIMGUI_API bool igIsAnyWindowHovered();
|
CIMGUI_API bool igIsAnyWindowHovered();
|
||||||
CIMGUI_API bool igIsRectVisible(CONST struct ImVec2 item_size);
|
CIMGUI_API bool igIsRectVisible(CONST struct ImVec2 item_size);
|
||||||
CIMGUI_API bool igIsRectVisible2(CONST struct ImVec2 *rect_min, CONST struct ImVec2 *rect_max);
|
CIMGUI_API bool igIsRectVisible2(CONST struct ImVec2 *rect_min, CONST struct ImVec2 *rect_max);
|
||||||
CIMGUI_API float igGetTime();
|
CIMGUI_API float igGetTime();
|
||||||
CIMGUI_API int igGetFrameCount();
|
CIMGUI_API int igGetFrameCount();
|
||||||
|
|
||||||
|
CIMGUI_API struct ImDrawList *igGetOverlayDrawList();
|
||||||
|
CIMGUI_API struct ImDrawListSharedData *igGetDrawListSharedData();
|
||||||
|
|
||||||
CIMGUI_API CONST char *igGetStyleColorName(ImGuiCol idx);
|
CIMGUI_API CONST char *igGetStyleColorName(ImGuiCol idx);
|
||||||
CIMGUI_API void igCalcItemRectClosestPoint(struct ImVec2 *pOut, CONST struct ImVec2 pos, bool on_edge, float outward);
|
CIMGUI_API void igCalcItemRectClosestPoint(struct ImVec2 *pOut, CONST struct ImVec2 pos, bool on_edge, float outward);
|
||||||
CIMGUI_API void igCalcTextSize(struct ImVec2 *pOut, CONST char *text, CONST char *text_end, bool hide_text_after_double_hash, float wrap_width);
|
CIMGUI_API void igCalcTextSize(struct ImVec2 *pOut, CONST char *text, CONST char *text_end, bool hide_text_after_double_hash, float wrap_width);
|
||||||
@@ -747,16 +893,20 @@ 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 igColorConvertRGBtoHSV(float r, float g, float b, float *out_h, float *out_s, float *out_v);
|
||||||
CIMGUI_API void igColorConvertHSVtoRGB(float h, float s, float v, float *out_r, float *out_g, float *out_b);
|
CIMGUI_API 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 int igGetKeyIndex(ImGuiKey imgui_key);
|
||||||
CIMGUI_API bool igIsKeyDown(int user_key_index);
|
CIMGUI_API bool igIsKeyDown(int user_key_index);
|
||||||
CIMGUI_API bool igIsKeyPressed(int user_key_index, bool repeat);
|
CIMGUI_API bool igIsKeyPressed(int user_key_index, bool repeat);
|
||||||
CIMGUI_API bool igIsKeyReleased(int user_key_index);
|
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 igIsMouseDown(int button);
|
||||||
CIMGUI_API bool igIsMouseClicked(int button, bool repeat);
|
CIMGUI_API bool igIsMouseClicked(int button, bool repeat);
|
||||||
CIMGUI_API bool igIsMouseDoubleClicked(int button);
|
CIMGUI_API bool igIsMouseDoubleClicked(int button);
|
||||||
CIMGUI_API bool igIsMouseReleased(int button);
|
CIMGUI_API bool igIsMouseReleased(int button);
|
||||||
CIMGUI_API bool igIsMouseDragging(int button, float lock_threshold);
|
CIMGUI_API bool igIsMouseDragging(int button, float lock_threshold);
|
||||||
CIMGUI_API bool igIsMouseHoveringRect(CONST struct ImVec2 r_min, CONST struct ImVec2 r_max, bool clip);
|
CIMGUI_API 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 igGetMousePos(struct ImVec2 *pOut);
|
||||||
CIMGUI_API void igGetMousePosOnOpeningCurrentPopup(struct ImVec2 *pOut);
|
CIMGUI_API void igGetMousePosOnOpeningCurrentPopup(struct ImVec2 *pOut);
|
||||||
CIMGUI_API void igGetMouseDragDelta(struct ImVec2 *pOut, int button, float lock_threshold);
|
CIMGUI_API void igGetMouseDragDelta(struct ImVec2 *pOut, int button, float lock_threshold);
|
||||||
@@ -781,31 +931,62 @@ 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);
|
// ImGuiIO
|
||||||
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);
|
|
||||||
|
|
||||||
CIMGUI_API void ImGuiIO_AddInputCharacter(unsigned short c);
|
CIMGUI_API void ImGuiIO_AddInputCharacter(unsigned short c);
|
||||||
CIMGUI_API void ImGuiIO_AddInputCharactersUTF8(CONST char *utf8_chars);
|
CIMGUI_API void ImGuiIO_AddInputCharactersUTF8(CONST char *utf8_chars);
|
||||||
CIMGUI_API void ImGuiIO_ClearInputCharacters();
|
CIMGUI_API void ImGuiIO_ClearInputCharacters();
|
||||||
|
|
||||||
//ImDrawData
|
// ImGuiTextFilter
|
||||||
CIMGUI_API void ImDrawData_DeIndexAllBuffers(struct ImDrawData* drawData);
|
CIMGUI_API struct ImGuiTextFilter *ImGuiTextFilter_Create(CONST char *default_filter);
|
||||||
CIMGUI_API void ImDrawData_ScaleClipRects(struct ImDrawData* drawData, struct ImVec2 sc);
|
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);
|
||||||
|
|
||||||
|
// 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_appendf(struct ImGuiTextBuffer *buffer, CONST char *fmt, ...);
|
||||||
|
CIMGUI_API void ImGuiTextBuffer_appendfv(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
|
//ImDrawList
|
||||||
CIMGUI_API int ImDrawList_GetVertexBufferSize(struct ImDrawList *list);
|
CIMGUI_API int ImDrawList_GetVertexBufferSize(struct ImDrawList *list);
|
||||||
@@ -840,8 +1021,9 @@ CIMGUI_API void ImDrawList_AddText(struct ImDrawList* list, CONST st
|
|||||||
CIMGUI_API void ImDrawList_AddTextExt(struct ImDrawList *list, CONST struct ImFont *font, float font_size, CONST struct ImVec2 pos, ImU32 col, CONST char *text_begin, CONST char *text_end, float wrap_width, CONST struct ImVec4 *cpu_fine_clip_rect);
|
CIMGUI_API void ImDrawList_AddTextExt(struct ImDrawList *list, CONST struct ImFont *font, float font_size, CONST struct ImVec2 pos, ImU32 col, CONST char *text_begin, CONST char *text_end, float wrap_width, CONST struct ImVec4 *cpu_fine_clip_rect);
|
||||||
CIMGUI_API void ImDrawList_AddImage(struct ImDrawList *list, ImTextureID user_texture_id, CONST struct ImVec2 a, CONST struct ImVec2 b, CONST struct ImVec2 uv_a, CONST struct ImVec2 uv_b, ImU32 col);
|
CIMGUI_API void ImDrawList_AddImage(struct 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);
|
||||||
CIMGUI_API void ImDrawList_AddImageQuad(struct ImDrawList *list, ImTextureID user_texture_id, 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_AddImageQuad(struct ImDrawList *list, ImTextureID user_texture_id, 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_AddPolyline(struct ImDrawList* list, CONST struct ImVec2* points, CONST int num_points, ImU32 col, bool closed, float thickness, bool anti_aliased);
|
CIMGUI_API void ImDrawList_AddImageRounded(struct 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, float rounding, int rounding_corners);
|
||||||
CIMGUI_API void ImDrawList_AddConvexPolyFilled(struct ImDrawList* list, CONST struct ImVec2* points, CONST int num_points, ImU32 col, bool anti_aliased);
|
CIMGUI_API void ImDrawList_AddPolyline(struct ImDrawList *list, CONST struct ImVec2 *points, CONST int num_points, ImU32 col, bool closed, float thickness);
|
||||||
|
CIMGUI_API void ImDrawList_AddConvexPolyFilled(struct ImDrawList *list, CONST struct ImVec2 *points, CONST int num_points, ImU32 col);
|
||||||
CIMGUI_API void ImDrawList_AddBezierCurve(struct ImDrawList *list, CONST struct ImVec2 pos0, CONST struct ImVec2 cp0, CONST struct ImVec2 cp1, CONST struct ImVec2 pos1, ImU32 col, float thickness, int num_segments);
|
CIMGUI_API void ImDrawList_AddBezierCurve(struct ImDrawList *list, CONST struct ImVec2 pos0, CONST struct ImVec2 cp0, CONST struct ImVec2 cp1, CONST struct ImVec2 pos1, ImU32 col, float thickness, int num_segments);
|
||||||
|
|
||||||
// Stateful path API, add points then finish with PathFill() or PathStroke()
|
// Stateful path API, add points then finish with PathFill() or PathStroke()
|
||||||
@@ -875,39 +1057,77 @@ CIMGUI_API void ImDrawList_PrimVtx(struct ImDrawList* list, CONST st
|
|||||||
CIMGUI_API void ImDrawList_UpdateClipRect(struct ImDrawList *list);
|
CIMGUI_API void ImDrawList_UpdateClipRect(struct ImDrawList *list);
|
||||||
CIMGUI_API void ImDrawList_UpdateTextureID(struct ImDrawList *list);
|
CIMGUI_API void ImDrawList_UpdateTextureID(struct ImDrawList *list);
|
||||||
|
|
||||||
// ImGuiListClipper
|
// ImDrawData
|
||||||
CIMGUI_API void ImGuiListClipper_Begin(struct ImGuiListClipper* clipper, int count, float items_height);
|
CIMGUI_API void ImDrawData_DeIndexAllBuffers(struct ImDrawData *drawData);
|
||||||
CIMGUI_API void ImGuiListClipper_End(struct ImGuiListClipper* clipper);
|
CIMGUI_API void ImDrawData_ScaleClipRects(struct ImDrawData *drawData, CONST struct ImVec2 sc);
|
||||||
CIMGUI_API bool ImGuiListClipper_Step(struct ImGuiListClipper* clipper);
|
|
||||||
CIMGUI_API int ImGuiListClipper_GetDisplayStart(struct ImGuiListClipper* clipper);
|
|
||||||
CIMGUI_API int ImGuiListClipper_GetDisplayEnd(struct ImGuiListClipper* clipper);
|
|
||||||
|
|
||||||
// ImGuiTextFilter
|
// ImFontAtlas
|
||||||
CIMGUI_API void ImGuiTextFilter_Init(struct ImGuiTextFilter* filter, const char* default_filter);
|
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 ImGuiTextFilter_Clear(struct ImGuiTextFilter* filter);
|
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 bool ImGuiTextFilter_Draw(struct ImGuiTextFilter* filter, const char* label, float width);
|
CIMGUI_API void ImFontAtlas_SetTexID(struct ImFontAtlas *atlas, ImTextureID id);
|
||||||
CIMGUI_API bool ImGuiTextFilter_PassFilter(struct ImGuiTextFilter* filter, const char* text, const char* text_end);
|
CIMGUI_API struct ImFont *ImFontAtlas_AddFont(struct ImFontAtlas *atlas, CONST struct ImFontConfig *font_cfg);
|
||||||
CIMGUI_API bool ImGuiTextFilter_IsActive(struct ImGuiTextFilter* filter);
|
CIMGUI_API struct ImFont *ImFontAtlas_AddFontDefault(struct ImFontAtlas *atlas, CONST struct ImFontConfig *font_cfg);
|
||||||
CIMGUI_API void ImGuiTextFilter_Build(struct ImGuiTextFilter* filter);
|
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 ImTextureID ImFontAtlas_GetTexID(struct ImFontAtlas *atlas);
|
||||||
CIMGUI_API void ImGuiTextEditCallbackData_DeleteChars(struct ImGuiTextEditCallbackData* data, int pos, int bytes_count);
|
CIMGUI_API unsigned char *ImFontAtlas_GetTexPixelsAlpha8(struct ImFontAtlas *atlas);
|
||||||
CIMGUI_API void ImGuiTextEditCallbackData_InsertChars(struct ImGuiTextEditCallbackData* data, int pos, const char* text, const char* text_end);
|
CIMGUI_API unsigned int *ImFontAtlas_GetTexPixelsRGBA32(struct ImFontAtlas *atlas);
|
||||||
CIMGUI_API bool ImGuiTextEditCallbackData_HasSelection(struct ImGuiTextEditCallbackData* data);
|
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
|
// ImFontAtlas::Fonts;
|
||||||
CIMGUI_API void ImGuiStorage_Init(struct ImGuiStorage* storage);
|
CIMGUI_API int ImFontAtlas_Fonts_size(struct ImFontAtlas *atlas);
|
||||||
CIMGUI_API void ImGuiStorage_Clear(struct ImGuiStorage* storage);
|
CIMGUI_API struct ImFont *ImFontAtlas_Fonts_index(struct ImFontAtlas *atlas, int index);
|
||||||
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);
|
// ImFont
|
||||||
CIMGUI_API bool ImGuiStorage_GetBool(struct ImGuiStorage* storage, ImGuiID key, bool default_val);
|
CIMGUI_API float ImFont_GetFontSize(CONST struct ImFont *font);
|
||||||
CIMGUI_API void ImGuiStorage_SetBool(struct ImGuiStorage* storage, ImGuiID key, bool val);
|
CIMGUI_API void ImFont_SetFontSize(struct ImFont *font, float FontSize_);
|
||||||
CIMGUI_API float ImGuiStorage_GetFloat(struct ImGuiStorage* storage, ImGuiID key, float default_val);
|
CIMGUI_API float ImFont_GetScale(CONST struct ImFont *font);
|
||||||
CIMGUI_API void ImGuiStorage_SetFloat(struct ImGuiStorage* storage, ImGuiID key, float val);
|
CIMGUI_API void ImFont_SetScale(struct ImFont *font, float Scale_);
|
||||||
CIMGUI_API void* ImGuiStorage_GetVoidPtr(struct ImGuiStorage* storage, ImGuiID key);
|
CIMGUI_API void ImFont_GetDisplayOffset(CONST struct ImFont *font, struct ImVec2 *pOut);
|
||||||
CIMGUI_API void ImGuiStorage_SetVoidPtr(struct ImGuiStorage* storage, ImGuiID key, void* val);
|
CIMGUI_API CONST struct IMFONTGLYPH *ImFont_GetFallbackGlyph(CONST struct ImFont *font);
|
||||||
CIMGUI_API int* ImGuiStorage_GetIntRef(struct ImGuiStorage* storage, ImGuiID key, int default_val);
|
CIMGUI_API void ImFont_SetFallbackGlyph(struct ImFont *font, CONST struct IMFONTGLYPH *FallbackGlyph_);
|
||||||
CIMGUI_API bool* ImGuiStorage_GetBoolRef(struct ImGuiStorage* storage, ImGuiID key, bool default_val);
|
CIMGUI_API float ImFont_GetFallbackAdvanceX(CONST struct ImFont *font);
|
||||||
CIMGUI_API float* ImGuiStorage_GetFloatRef(struct ImGuiStorage* storage, ImGuiID key, float default_val);
|
CIMGUI_API ImWchar ImFont_GetFallbackChar(CONST struct ImFont *font);
|
||||||
CIMGUI_API void** ImGuiStorage_GetVoidPtrRef(struct ImGuiStorage* storage, ImGuiID key, void* default_val);
|
CIMGUI_API short ImFont_GetConfigDataCount(CONST struct ImFont *font);
|
||||||
CIMGUI_API void ImGuiStorage_SetAllInt(struct ImGuiStorage* storage, int val);
|
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 CONST char *ImFont_GetDebugName(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,6 +2,16 @@
|
|||||||
#include "../imgui/imgui.h"
|
#include "../imgui/imgui.h"
|
||||||
#include "cimgui.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)
|
CIMGUI_API int ImDrawList_GetVertexBufferSize(ImDrawList *list)
|
||||||
{
|
{
|
||||||
return list->VtxBuffer.size();
|
return list->VtxBuffer.size();
|
||||||
@@ -32,16 +42,6 @@ CIMGUI_API ImDrawCmd* ImDrawList_GetCmdPtr(ImDrawList* list, int n)
|
|||||||
return &list->CmdBuffer[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);
|
|
||||||
}
|
|
||||||
|
|
||||||
CIMGUI_API void ImDrawList_Clear(ImDrawList *list)
|
CIMGUI_API void ImDrawList_Clear(ImDrawList *list)
|
||||||
{
|
{
|
||||||
return list->Clear();
|
return list->Clear();
|
||||||
@@ -157,14 +157,19 @@ CIMGUI_API void ImDrawList_AddImageQuad(struct ImDrawList* list, ImTextureID use
|
|||||||
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)
|
CIMGUI_API void ImDrawList_AddImageRounded(struct 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, float rounding, int rounding_corners)
|
||||||
{
|
{
|
||||||
return list->AddPolyline(points, num_points, col, closed, thickness, anti_aliased);
|
list->AddImageRounded(user_texture_id, a, b, uv_a, uv_b, col, rounding, rounding_corners);
|
||||||
}
|
}
|
||||||
|
|
||||||
CIMGUI_API void ImDrawList_AddConvexPolyFilled(ImDrawList* list, CONST ImVec2* points, CONST int num_points, ImU32 col, bool anti_aliased)
|
CIMGUI_API void ImDrawList_AddPolyline(ImDrawList *list, CONST ImVec2 *points, CONST int num_points, ImU32 col, bool closed, float thickness)
|
||||||
{
|
{
|
||||||
return list->AddConvexPolyFilled(points, num_points, col, anti_aliased);
|
return list->AddPolyline(points, num_points, col, closed, thickness);
|
||||||
|
}
|
||||||
|
|
||||||
|
CIMGUI_API void ImDrawList_AddConvexPolyFilled(ImDrawList *list, CONST ImVec2 *points, CONST int num_points, ImU32 col)
|
||||||
|
{
|
||||||
|
return list->AddConvexPolyFilled(points, num_points, col);
|
||||||
}
|
}
|
||||||
|
|
||||||
CIMGUI_API void ImDrawList_AddBezierCurve(ImDrawList *list, CONST struct ImVec2 pos0, CONST struct ImVec2 cp0, CONST struct ImVec2 cp1, CONST struct ImVec2 pos1, ImU32 col, float thickness, int num_segments)
|
CIMGUI_API void ImDrawList_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)
|
||||||
|
@@ -57,6 +57,16 @@ 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)
|
CIMGUI_API void ImFontAtlas_Clear(ImFontAtlas *atlas)
|
||||||
{
|
{
|
||||||
return atlas->Clear();
|
return atlas->Clear();
|
||||||
@@ -91,3 +101,228 @@ CIMGUI_API CONST ImWchar* ImFontAtlas_GetGlyphRangesThai(struct ImFontAtlas* a
|
|||||||
{
|
{
|
||||||
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 CONST char *ImFont_GetDebugName(CONST struct ImFont *font)
|
||||||
|
{
|
||||||
|
return font->GetDebugName();
|
||||||
|
}
|
||||||
|
|
||||||
|
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: 55a6209931...e916310b2e
Reference in New Issue
Block a user