mirror of
https://github.com/cimgui/cimgui.git
synced 2025-08-14 13:38:31 +01:00
Compare commits
10 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
6b69c0e712 | ||
![]() |
ca33899307 | ||
![]() |
d10fc69e15 | ||
![]() |
f31a02aac6 | ||
![]() |
1ae5c3db87 | ||
![]() |
9853bb2678 | ||
![]() |
7205093eb4 | ||
![]() |
57d88c0b3d | ||
![]() |
0a7d938bc8 | ||
![]() |
830fdcc029 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -31,3 +31,5 @@ cimgui/cimgui.opensdf
|
||||
cimgui/cimgui.sdf
|
||||
cimgui/cimgui.v12.suo
|
||||
cimgui/Release/
|
||||
.idea
|
||||
CMakeLists.txt
|
||||
|
@@ -8,12 +8,12 @@ Most of the functions have wrapper counterparts now, missing stuff is added on a
|
||||
This library is intended as a intermediate layer to be able to use imgui from other languages that can interface with C (like D - see [D-binding](https://github.com/Extrawurst/DerelictImgui))
|
||||
|
||||
Notes:
|
||||
* currently this wrapper is based on version [1.40 of imgui](https://github.com/ocornut/imgui/releases/tag/v1.40)
|
||||
* currently this wrapper is based on version [1.41 of imgui](https://github.com/ocornut/imgui/releases/tag/v1.41)
|
||||
* does not compile with pure C compiler yet (for writing bindings in languages that are able to use C-ABI it is enough though, see D-bindings)
|
||||
|
||||
# usage
|
||||
|
||||
* clone
|
||||
* make using makefile on linux/osx (linux makefile not tested)
|
||||
* use whatever method is in ImGui c++ namespace in the original [imgui.h](https://github.com/ocornut/imgui/blob/master/imgui.h) by prepending `ig_` (most of the time)
|
||||
* use whatever method is in ImGui c++ namespace in the original [imgui.h](https://github.com/ocornut/imgui/blob/master/imgui.h) by prepending `ig_`
|
||||
* methods have the same parameter list and return values (where possible)
|
||||
|
@@ -139,6 +139,11 @@ CIMGUI_API void ig_SetNextWindowPos(CONST ImVec2 pos, ImGuiSetCond cond)
|
||||
ImGui::SetNextWindowPos(pos, cond);
|
||||
}
|
||||
|
||||
CIMGUI_API void ig_SetNextWindowPosCenter(ImGuiSetCond cond)
|
||||
{
|
||||
ImGui::SetNextWindowPosCenter(cond);
|
||||
}
|
||||
|
||||
CIMGUI_API void ig_SetNextWindowSize(CONST ImVec2 size, ImGuiSetCond cond)
|
||||
{
|
||||
ImGui::SetNextWindowSize(size, cond);
|
||||
@@ -194,9 +199,9 @@ CIMGUI_API void ig_SetWindowFocus2(CONST char* name)
|
||||
ImGui::SetWindowFocus(name);
|
||||
}
|
||||
|
||||
CIMGUI_API float ig_GetScrollPosY()
|
||||
CIMGUI_API float ig_GetScrollY()
|
||||
{
|
||||
return ImGui::GetScrollPosY();
|
||||
return ImGui::GetScrollY();
|
||||
}
|
||||
|
||||
CIMGUI_API float ig_GetScrollMaxY()
|
||||
@@ -204,9 +209,19 @@ CIMGUI_API float ig_GetScrollMaxY()
|
||||
return ImGui::GetScrollMaxY();
|
||||
}
|
||||
|
||||
CIMGUI_API void ig_SetScrollPosHere()
|
||||
CIMGUI_API void ig_SetScrollY(float scroll_y)
|
||||
{
|
||||
ImGui::SetScrollPosHere();
|
||||
return ImGui::SetScrollY(scroll_y);
|
||||
}
|
||||
|
||||
CIMGUI_API void ig_SetScrollHere(float center_y_ratio)
|
||||
{
|
||||
ImGui::SetScrollHere(center_y_ratio);
|
||||
}
|
||||
|
||||
CIMGUI_API void ig_SetScrollFromPosY(float pos_y, float center_y_ratio)
|
||||
{
|
||||
return ImGui::SetScrollFromPosY(pos_y,center_y_ratio);
|
||||
}
|
||||
|
||||
CIMGUI_API void ig_SetKeyboardFocusHere(int offset)
|
||||
@@ -341,6 +356,11 @@ CIMGUI_API bool ig_BeginPopup(const char* str_id)
|
||||
return ImGui::BeginPopup(str_id);
|
||||
}
|
||||
|
||||
CIMGUI_API bool ig_BeginPopupModal(CONST char* name, bool* p_opened, ImGuiWindowFlags extra_flags)
|
||||
{
|
||||
return ImGui::BeginPopupModal(name, p_opened, extra_flags);
|
||||
}
|
||||
|
||||
CIMGUI_API bool ig_BeginPopupContextItem(CONST char* str_id, int mouse_button)
|
||||
{
|
||||
return ImGui::BeginPopupContextItem(str_id, mouse_button);
|
||||
@@ -472,6 +492,11 @@ CIMGUI_API void ig_SetCursorPosY(float y)
|
||||
return ImGui::SetCursorPosY(y);
|
||||
}
|
||||
|
||||
CIMGUI_API void ig_GetCursorStartPos(ImVec2* pOut)
|
||||
{
|
||||
*pOut = ImGui::GetCursorStartPos();
|
||||
}
|
||||
|
||||
CIMGUI_API void ig_GetCursorScreenPos(ImVec2* pOut)
|
||||
{
|
||||
*pOut = ImGui::GetCursorScreenPos();
|
||||
@@ -720,7 +745,7 @@ CIMGUI_API void ig_ColorEditMode(ImGuiColorEditMode mode)
|
||||
return ImGui::ColorEditMode(mode);
|
||||
}
|
||||
|
||||
CIMGUI_API void ig_PlotLines(CONST char* label, CONST float* values, int values_count, int values_offset, CONST char* overlay_text, float scale_min, float scale_max, ImVec2 graph_size, size_t stride)
|
||||
CIMGUI_API void ig_PlotLines(CONST char* label, CONST float* values, int values_count, int values_offset, CONST char* overlay_text, float scale_min, float scale_max, ImVec2 graph_size, int stride)
|
||||
{
|
||||
return ImGui::PlotLines(label, values, values_count, values_offset, overlay_text, scale_min, scale_max, graph_size, stride);
|
||||
}
|
||||
@@ -730,7 +755,7 @@ CIMGUI_API void ig_PlotLines2(CONST char* label, float(*values_getter)(void*
|
||||
return ImGui::PlotLines(label, values_getter, data, values_count, values_offset, overlay_text, scale_min, scale_max, graph_size);
|
||||
}
|
||||
|
||||
CIMGUI_API void ig_PlotHistogram(CONST char* label, CONST float* values, int values_count, int values_offset, CONST char* overlay_text, float scale_min, float scale_max, ImVec2 graph_size, size_t stride)
|
||||
CIMGUI_API void ig_PlotHistogram(CONST char* label, CONST float* values, int values_count, int values_offset, CONST char* overlay_text, float scale_min, float scale_max, ImVec2 graph_size, int stride)
|
||||
{
|
||||
return ImGui::PlotHistogram(label,values, values_count, values_offset, overlay_text, scale_min, scale_max, graph_size, stride);
|
||||
}
|
||||
@@ -817,6 +842,11 @@ CIMGUI_API bool ig_DragFloat4(CONST char* label, float v[4], float v_s
|
||||
return ImGui::DragFloat4(label, v, v_speed, v_min, v_max, display_format, power);
|
||||
}
|
||||
|
||||
CIMGUI_API bool ig_DragFloatRange2(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)
|
||||
{
|
||||
return ImGui::DragFloatRange2(label,v_current_min,v_current_max,v_speed,v_min,v_max,display_format,display_format_max,power);
|
||||
}
|
||||
|
||||
CIMGUI_API bool ig_DragInt(CONST char* label, int* v, float v_speed, int v_min, int v_max, CONST char* display_format)
|
||||
{
|
||||
return ImGui::DragInt(label, v, v_speed, v_min, v_max, display_format);
|
||||
@@ -837,12 +867,22 @@ CIMGUI_API bool ig_DragInt4(CONST char* label, int v[4], float v_speed
|
||||
return ImGui::DragInt4(label, v, v_speed, v_min, v_max, display_format);
|
||||
}
|
||||
|
||||
CIMGUI_API bool ig_DragIntRange2(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)
|
||||
{
|
||||
return ImGui::DragIntRange2(label,v_current_min,v_current_max,v_speed,v_min,v_max,display_format,display_format_max);
|
||||
}
|
||||
|
||||
// Widgets: Input
|
||||
CIMGUI_API bool ig_InputText(CONST char* label, char* buf, size_t buf_size, ImGuiInputTextFlags flags, ImGuiTextEditCallback callback, void* user_data)
|
||||
{
|
||||
return ImGui::InputText(label, buf, buf_size, flags, callback, user_data);
|
||||
}
|
||||
|
||||
CIMGUI_API bool ig_InputTextMultiline(CONST char* label, char* buf, size_t buf_size, CONST ImVec2 size, ImGuiInputTextFlags flags, ImGuiTextEditCallback callback, void* user_data)
|
||||
{
|
||||
return ImGui::InputTextMultiline(label, buf, buf_size, size, flags, callback, user_data);
|
||||
}
|
||||
|
||||
CIMGUI_API bool ig_InputFloat(CONST char* label, float* v, float step, float step_fast, int decimal_precision, ImGuiInputTextFlags extra_flags)
|
||||
{
|
||||
return ImGui::InputFloat(label, v, step, step_fast, decimal_precision, extra_flags);
|
||||
@@ -941,14 +981,14 @@ CIMGUI_API void ig_SetNextTreeNodeOpened(bool opened, ImGuiSetCond cond)
|
||||
}
|
||||
|
||||
// Widgets: Selectable / Lists
|
||||
CIMGUI_API bool ig_Selectable(CONST char* label, bool selected, CONST ImVec2 size)
|
||||
CIMGUI_API bool ig_Selectable(CONST char* label, bool selected, ImGuiSelectableFlags flags, CONST ImVec2 size)
|
||||
{
|
||||
return ImGui::Selectable(label, selected, size);
|
||||
return ImGui::Selectable(label, selected, flags, size);
|
||||
}
|
||||
|
||||
CIMGUI_API bool ig_SelectableEx(CONST char* label, bool* p_selected, CONST ImVec2 size)
|
||||
CIMGUI_API bool ig_SelectableEx(CONST char* label, bool* p_selected, ImGuiSelectableFlags flags, CONST ImVec2 size)
|
||||
{
|
||||
return ImGui::Selectable(label,p_selected,size);
|
||||
return ImGui::Selectable(label, p_selected, flags, size);
|
||||
}
|
||||
|
||||
CIMGUI_API bool ig_ListBox(CONST char* label, int* current_item, CONST char** items, int items_count, int height_in_items)
|
||||
@@ -1130,6 +1170,11 @@ CIMGUI_API void ig_GetItemRectSize(ImVec2* pOut)
|
||||
*pOut = ImGui::GetItemRectSize();
|
||||
}
|
||||
|
||||
CIMGUI_API bool ig_IsWindowHovered()
|
||||
{
|
||||
return ImGui::IsWindowHovered();
|
||||
}
|
||||
|
||||
CIMGUI_API bool ig_IsWindowFocused()
|
||||
{
|
||||
return ImGui::IsWindowFocused();
|
||||
@@ -1160,6 +1205,11 @@ CIMGUI_API bool ig_IsKeyPressed(int key_index, bool repeat)
|
||||
return ImGui::IsKeyPressed(key_index,repeat);
|
||||
}
|
||||
|
||||
CIMGUI_API bool ig_IsKeyReleased(int key_index)
|
||||
{
|
||||
return ImGui::IsKeyReleased(key_index);
|
||||
}
|
||||
|
||||
CIMGUI_API bool ig_IsMouseDown(int button)
|
||||
{
|
||||
return ImGui::IsMouseDown(button);
|
||||
@@ -1175,6 +1225,11 @@ CIMGUI_API bool ig_IsMouseDoubleClicked(int button)
|
||||
return ImGui::IsMouseDoubleClicked(button);
|
||||
}
|
||||
|
||||
CIMGUI_API bool ig_IsMouseReleased(int button)
|
||||
{
|
||||
return ImGui::IsMouseReleased(button);
|
||||
}
|
||||
|
||||
CIMGUI_API bool ig_IsMouseHoveringWindow()
|
||||
{
|
||||
return ImGui::IsMouseHoveringWindow();
|
||||
@@ -1254,9 +1309,9 @@ CIMGUI_API void ig_CalcListClipping(int items_count, float items_height, int*
|
||||
ImGui::CalcListClipping(items_count,items_height,out_items_display_start,out_items_display_end);
|
||||
}
|
||||
|
||||
CIMGUI_API void ig_BeginChildFrame(ImGuiID id, CONST ImVec2 size)
|
||||
CIMGUI_API bool ig_BeginChildFrame(ImGuiID id, CONST ImVec2 size)
|
||||
{
|
||||
ImGui::BeginChildFrame(id, size);
|
||||
return ImGui::BeginChildFrame(id, size);
|
||||
}
|
||||
|
||||
CIMGUI_API void ig_EndChildFrame()
|
||||
|
100
cimgui/cimgui.h
100
cimgui/cimgui.h
@@ -53,6 +53,7 @@ CIMGUI_API float ig_GetWindowWidth();
|
||||
CIMGUI_API bool ig_IsWindowCollapsed();
|
||||
|
||||
CIMGUI_API void ig_SetNextWindowPos(CONST struct ImVec2 pos, ImGuiSetCond cond);
|
||||
CIMGUI_API void ig_SetNextWindowPosCenter(ImGuiSetCond cond);
|
||||
CIMGUI_API void ig_SetNextWindowSize(CONST struct ImVec2 size, ImGuiSetCond cond);
|
||||
CIMGUI_API void ig_SetNextWindowCollapsed(bool collapsed, ImGuiSetCond cond);
|
||||
CIMGUI_API void ig_SetNextWindowFocus();
|
||||
@@ -65,9 +66,11 @@ CIMGUI_API void ig_SetWindowSize2(CONST char* name, CONST struct ImV
|
||||
CIMGUI_API void ig_SetWindowCollapsed2(CONST char* name, bool collapsed, ImGuiSetCond cond);
|
||||
CIMGUI_API void ig_SetWindowFocus2(CONST char* name);
|
||||
|
||||
CIMGUI_API float ig_GetScrollPosY();
|
||||
CIMGUI_API float ig_GetScrollY();
|
||||
CIMGUI_API float ig_GetScrollMaxY();
|
||||
CIMGUI_API void ig_SetScrollPosHere();
|
||||
CIMGUI_API void ig_SetScrollY(float scroll_y);
|
||||
CIMGUI_API void ig_SetScrollHere(float center_y_ratio = 0.5f);
|
||||
CIMGUI_API void ig_SetScrollFromPosY(float pos_y, float center_y_ratio = 0.5f);
|
||||
CIMGUI_API void ig_SetKeyboardFocusHere(int offset);
|
||||
CIMGUI_API void ig_SetStateStorage(ImGuiStorage* tree);
|
||||
CIMGUI_API ImGuiStorage* ig_GetStateStorage();
|
||||
@@ -92,22 +95,6 @@ CIMGUI_API void ig_PopTextWrapPos();
|
||||
CIMGUI_API void ig_PushButtonRepeat(bool repeat);
|
||||
CIMGUI_API void ig_PopButtonRepeat();
|
||||
|
||||
|
||||
// Tooltip
|
||||
CIMGUI_API void ig_SetTooltip(CONST char* fmt, ...);
|
||||
CIMGUI_API void ig_SetTooltipV(CONST char* fmt, va_list args);
|
||||
CIMGUI_API void ig_BeginTooltip();
|
||||
CIMGUI_API void ig_EndTooltip();
|
||||
|
||||
// Popup
|
||||
CIMGUI_API void ig_OpenPopup(CONST char* str_id);
|
||||
CIMGUI_API bool ig_BeginPopup(CONST char* str_id);
|
||||
CIMGUI_API bool ig_BeginPopupContextItem(CONST char* str_id, int mouse_button = 1);
|
||||
CIMGUI_API bool ig_BeginPopupContextWindow(bool also_over_items = true, CONST char* str_id = NULL, int mouse_button = 1);
|
||||
CIMGUI_API bool ig_BeginPopupContextVoid(CONST char* str_id = NULL, int mouse_button = 1);
|
||||
CIMGUI_API void ig_EndPopup();
|
||||
CIMGUI_API void ig_CloseCurrentPopup();
|
||||
|
||||
// Layout
|
||||
CIMGUI_API void ig_BeginGroup();
|
||||
CIMGUI_API void ig_EndGroup();
|
||||
@@ -130,6 +117,7 @@ CIMGUI_API float ig_GetCursorPosY();
|
||||
CIMGUI_API void ig_SetCursorPos(CONST struct ImVec2 pos);
|
||||
CIMGUI_API void ig_SetCursorPosX(float x);
|
||||
CIMGUI_API void ig_SetCursorPosY(float y);
|
||||
CIMGUI_API void ig_GetCursorStartPos(struct ImVec2* pOut);
|
||||
CIMGUI_API void ig_GetCursorScreenPos(struct ImVec2* pOut);
|
||||
CIMGUI_API void ig_SetCursorScreenPos(CONST struct ImVec2 pos);
|
||||
CIMGUI_API void ig_AlignFirstTextHeightToWidgets();
|
||||
@@ -181,9 +169,9 @@ CIMGUI_API bool ig_ColorButton(CONST struct ImVec4 col, bool small_h
|
||||
CIMGUI_API bool ig_ColorEdit3(CONST char* label, float col[3]);
|
||||
CIMGUI_API bool ig_ColorEdit4(CONST char* label, float col[4], bool show_alpha);
|
||||
CIMGUI_API void ig_ColorEditMode(ImGuiColorEditMode mode);
|
||||
CIMGUI_API void ig_PlotLines(CONST char* label, CONST float* values, int values_count, int values_offset, CONST char* overlay_text, float scale_min, float scale_max, struct ImVec2 graph_size, size_t stride);
|
||||
CIMGUI_API void ig_PlotLines(CONST char* label, CONST float* values, int values_count, int values_offset, CONST char* overlay_text, float scale_min, float scale_max, struct ImVec2 graph_size, int stride);
|
||||
CIMGUI_API void ig_PlotLines2(CONST char* label, float(*values_getter)(void* data, int idx), void* data, int values_count, int values_offset, CONST char* overlay_text, float scale_min, float scale_max, struct ImVec2 graph_size);
|
||||
CIMGUI_API void ig_PlotHistogram(CONST char* label, CONST float* values, int values_count, int values_offset, CONST char* overlay_text, float scale_min, float scale_max, struct ImVec2 graph_size, size_t stride);
|
||||
CIMGUI_API void ig_PlotHistogram(CONST char* label, CONST float* values, int values_count, int values_offset, CONST char* overlay_text, float scale_min, float scale_max, struct ImVec2 graph_size, int stride);
|
||||
CIMGUI_API void ig_PlotHistogram2(CONST char* label, float(*values_getter)(void* data, int idx), void* data, int values_count, int values_offset, CONST char* overlay_text, float scale_min, float scale_max, struct ImVec2 graph_size);
|
||||
|
||||
// Widgets: Sliders (tip: ctrl+click on a slider to input text)
|
||||
@@ -204,14 +192,17 @@ CIMGUI_API bool ig_DragFloat(CONST char* label, float* v, float v_sp
|
||||
CIMGUI_API bool ig_DragFloat2(CONST char* label, float v[2], float v_speed, float v_min, float v_max, CONST char* display_format, float power);
|
||||
CIMGUI_API bool ig_DragFloat3(CONST char* label, float v[3], float v_speed, float v_min, float v_max, CONST char* display_format, float power);
|
||||
CIMGUI_API bool ig_DragFloat4(CONST char* label, float v[4], float v_speed, float v_min, float v_max, CONST char* display_format, float power);
|
||||
CIMGUI_API bool ig_DragFloatRange2(const char* label, float* v_current_min, float* v_current_max, float v_speed = 1.0f, float v_min = 0.0f, float v_max = 0.0f, const char* display_format = "%.3f", const char* display_format_max = NULL, float power = 1.0f);
|
||||
CIMGUI_API bool ig_DragInt(CONST char* label, int* v, float v_speed, int v_min, int v_max, CONST char* display_format); // If v_max >= v_max we have no bound
|
||||
CIMGUI_API bool ig_DragInt2(CONST char* label, int v[2], float v_speed, int v_min, int v_max, CONST char* display_format);
|
||||
CIMGUI_API bool ig_DragInt3(CONST char* label, int v[3], float v_speed, int v_min, int v_max, CONST char* display_format);
|
||||
CIMGUI_API bool ig_DragInt4(CONST char* label, int v[4], float v_speed, int v_min, int v_max, CONST char* display_format);
|
||||
CIMGUI_API bool ig_DragIntRange2(const char* label, int* v_current_min, int* v_current_max, float v_speed = 1.0f, int v_min = 0, int v_max = 0, const char* display_format = "%.0f", const char* display_format_max = NULL);
|
||||
|
||||
|
||||
// Widgets: Input
|
||||
CIMGUI_API bool ig_InputText(CONST char* label, char* buf, size_t buf_size, ImGuiInputTextFlags flags, ImGuiTextEditCallback callback, void* user_data);
|
||||
CIMGUI_API bool ig_InputTextMultiline(CONST char* label, char* buf, size_t buf_size, CONST ImVec2 size, ImGuiInputTextFlags flags, ImGuiTextEditCallback callback, void* user_data);
|
||||
CIMGUI_API bool ig_InputFloat(CONST char* label, float* v, float step, float step_fast, int decimal_precision, ImGuiInputTextFlags extra_flags);
|
||||
CIMGUI_API bool ig_InputFloat2(CONST char* label, float v[2], int decimal_precision, ImGuiInputTextFlags extra_flags);
|
||||
CIMGUI_API bool ig_InputFloat3(CONST char* label, float v[3], int decimal_precision, ImGuiInputTextFlags extra_flags);
|
||||
@@ -233,14 +224,28 @@ CIMGUI_API void ig_TreePop();
|
||||
CIMGUI_API void ig_SetNextTreeNodeOpened(bool opened, ImGuiSetCond cond);
|
||||
|
||||
// Widgets: Selectable / Lists
|
||||
CIMGUI_API bool ig_Selectable(CONST char* label, bool selected, CONST struct ImVec2 size);
|
||||
CIMGUI_API bool ig_SelectableEx(CONST char* label, bool* p_selected, CONST struct ImVec2 size);
|
||||
CIMGUI_API bool ig_Selectable(CONST char* label, bool selected, ImGuiSelectableFlags flags, CONST ImVec2 size);
|
||||
CIMGUI_API bool ig_SelectableEx(CONST char* label, bool* p_selected, ImGuiSelectableFlags flags, CONST ImVec2 size);
|
||||
CIMGUI_API bool ig_ListBox(CONST char* label, int* current_item, CONST char** items, int items_count, int height_in_items);
|
||||
CIMGUI_API bool ig_ListBox2(CONST char* label, int* current_item, bool(*items_getter)(void* data, int idx, CONST char** out_text), void* data, int items_count, int height_in_items);
|
||||
CIMGUI_API bool ig_ListBoxHeader(CONST char* label, CONST struct ImVec2 size);
|
||||
CIMGUI_API bool ig_ListBoxHeader2(CONST char* label, int items_count, int height_in_items);
|
||||
CIMGUI_API void ig_ListBoxFooter();
|
||||
|
||||
// Widgets: Value() Helpers. Output single value in "name: value" format (tip: freely declare your own within the ImGui namespace!)
|
||||
CIMGUI_API void ig_ValueBool(CONST char* prefix, bool b);
|
||||
CIMGUI_API void ig_ValueInt(CONST char* prefix, int v);
|
||||
CIMGUI_API void ig_ValueUInt(CONST char* prefix, unsigned int v);
|
||||
CIMGUI_API void ig_ValueFloat(CONST char* prefix, float v, CONST char* float_format);
|
||||
CIMGUI_API void ig_Color(CONST char* prefix, CONST struct ImVec4 v);
|
||||
CIMGUI_API void ig_Color2(CONST char* prefix, unsigned int v);
|
||||
|
||||
// Tooltip
|
||||
CIMGUI_API void ig_SetTooltip(CONST char* fmt, ...);
|
||||
CIMGUI_API void ig_SetTooltipV(CONST char* fmt, va_list args);
|
||||
CIMGUI_API void ig_BeginTooltip();
|
||||
CIMGUI_API void ig_EndTooltip();
|
||||
|
||||
// Widgets: Menus
|
||||
CIMGUI_API bool ig_BeginMainMenuBar();
|
||||
CIMGUI_API void ig_EndMainMenuBar();
|
||||
@@ -251,14 +256,15 @@ CIMGUI_API void ig_EndMenu();
|
||||
CIMGUI_API bool ig_MenuItem(CONST char* label, CONST char* shortcut, bool selected, bool enabled);
|
||||
CIMGUI_API bool ig_MenuItemPtr(CONST char* label, CONST char* shortcut, bool* p_selected, bool enabled);
|
||||
|
||||
|
||||
// Widgets: Value() Helpers. Output single value in "name: value" format (tip: freely declare your own within the ImGui namespace!)
|
||||
CIMGUI_API void ig_ValueBool(CONST char* prefix, bool b);
|
||||
CIMGUI_API void ig_ValueInt(CONST char* prefix, int v);
|
||||
CIMGUI_API void ig_ValueUInt(CONST char* prefix, unsigned int v);
|
||||
CIMGUI_API void ig_ValueFloat(CONST char* prefix, float v, CONST char* float_format);
|
||||
CIMGUI_API void ig_Color(CONST char* prefix, CONST struct ImVec4 v);
|
||||
CIMGUI_API void ig_Color2(CONST char* prefix, unsigned int v);
|
||||
// Popup
|
||||
CIMGUI_API void ig_OpenPopup(CONST char* str_id);
|
||||
CIMGUI_API bool ig_BeginPopup(CONST char* str_id);
|
||||
CIMGUI_API bool ig_BeginPopupModal(CONST char* name, bool* p_opened, ImGuiWindowFlags extra_flags);
|
||||
CIMGUI_API bool ig_BeginPopupContextItem(CONST char* str_id, int mouse_button);
|
||||
CIMGUI_API bool ig_BeginPopupContextWindow(bool also_over_items, CONST char* str_id, int mouse_button);
|
||||
CIMGUI_API bool ig_BeginPopupContextVoid(CONST char* str_id, int mouse_button);
|
||||
CIMGUI_API void ig_EndPopup();
|
||||
CIMGUI_API void ig_CloseCurrentPopup();
|
||||
|
||||
// Logging: all text output from interface is redirected to tty/file/clipboard. Tree nodes are automatically opened.
|
||||
CIMGUI_API void ig_LogToTTY(int max_depth);
|
||||
@@ -278,25 +284,12 @@ CIMGUI_API bool ig_IsAnyItemActive();
|
||||
CIMGUI_API void ig_GetItemRectMin(struct ImVec2* pOut);
|
||||
CIMGUI_API void ig_GetItemRectMax(struct ImVec2* pOut);
|
||||
CIMGUI_API void ig_GetItemRectSize(struct ImVec2* pOut);
|
||||
CIMGUI_API bool ig_IsWindowHovered();
|
||||
CIMGUI_API bool ig_IsWindowFocused();
|
||||
CIMGUI_API bool ig_IsRootWindowFocused();
|
||||
CIMGUI_API bool ig_IsRootWindowOrAnyChildFocused();
|
||||
CIMGUI_API bool ig_IsRectVisible(CONST struct ImVec2 item_size);
|
||||
CIMGUI_API bool ig_IsKeyDown(int key_index);
|
||||
CIMGUI_API bool ig_IsKeyPressed(int key_index, bool repeat);
|
||||
CIMGUI_API bool ig_IsMouseDown(int button);
|
||||
CIMGUI_API bool ig_IsMouseClicked(int button, bool repeat);
|
||||
CIMGUI_API bool ig_IsMouseDoubleClicked(int button);
|
||||
CIMGUI_API bool ig_IsMouseHoveringWindow();
|
||||
CIMGUI_API bool ig_IsMouseHoveringAnyWindow();
|
||||
CIMGUI_API bool ig_IsMouseHoveringRect(CONST struct ImVec2 rect_min, CONST struct ImVec2 rect_max);
|
||||
CIMGUI_API bool ig_IsMouseDragging(int button, float lock_threshold);
|
||||
CIMGUI_API bool ig_IsPosHoveringAnyWindow(CONST struct ImVec2 pos);
|
||||
CIMGUI_API void ig_GetMousePos(struct ImVec2* pOut);
|
||||
CIMGUI_API void ig_GetMouseDragDelta(struct ImVec2* pOut, int button, float lock_threshold);
|
||||
CIMGUI_API void ig_ResetMouseDragDelta(int button);
|
||||
CIMGUI_API ImGuiMouseCursor ig_GetMouseCursor();
|
||||
CIMGUI_API void ig_SetMouseCursor(ImGuiMouseCursor type);
|
||||
CIMGUI_API float ig_GetTime();
|
||||
CIMGUI_API int ig_GetFrameCount();
|
||||
CIMGUI_API CONST char* ig_GetStyleColName(ImGuiCol idx);
|
||||
@@ -304,13 +297,30 @@ CIMGUI_API void ig_CalcItemRectClosestPoint(struct ImVec2* pOut, CON
|
||||
CIMGUI_API void ig_CalcTextSize(struct ImVec2* pOut, CONST char* text, CONST char* text_end, bool hide_text_after_double_hash, float wrap_width);
|
||||
CIMGUI_API void ig_CalcListClipping(int items_count, float items_height, int* out_items_display_start, int* out_items_display_end);
|
||||
|
||||
CIMGUI_API void ig_BeginChildFrame(ImGuiID id, CONST struct ImVec2 size);
|
||||
CIMGUI_API bool ig_BeginChildFrame(ImGuiID id, CONST struct ImVec2 size);
|
||||
CIMGUI_API void ig_EndChildFrame();
|
||||
|
||||
CIMGUI_API ImU32 ig_ColorConvertFloat4ToU32(CONST struct ImVec4 in);
|
||||
CIMGUI_API void ig_ColorConvertRGBtoHSV(float r, float g, float b, float* out_h, float* out_s, float* out_v);
|
||||
CIMGUI_API void ig_ColorConvertHSVtoRGB(float h, float s, float v, float* out_r, float* out_g, float* out_b);
|
||||
|
||||
CIMGUI_API bool ig_IsKeyDown(int key_index);
|
||||
CIMGUI_API bool ig_IsKeyPressed(int key_index, bool repeat);
|
||||
CIMGUI_API bool ig_IsKeyReleased(int key_index);
|
||||
CIMGUI_API bool ig_IsMouseDown(int button);
|
||||
CIMGUI_API bool ig_IsMouseClicked(int button, bool repeat);
|
||||
CIMGUI_API bool ig_IsMouseDoubleClicked(int button);
|
||||
CIMGUI_API bool ig_IsMouseReleased(int button);
|
||||
CIMGUI_API bool ig_IsMouseHoveringWindow();
|
||||
CIMGUI_API bool ig_IsMouseHoveringAnyWindow();
|
||||
CIMGUI_API bool ig_IsMouseHoveringRect(CONST struct ImVec2 rect_min, CONST struct ImVec2 rect_max);
|
||||
CIMGUI_API bool ig_IsMouseDragging(int button, float lock_threshold);
|
||||
CIMGUI_API void ig_GetMousePos(struct ImVec2* pOut);
|
||||
CIMGUI_API void ig_GetMouseDragDelta(struct ImVec2* pOut, int button, float lock_threshold);
|
||||
CIMGUI_API void ig_ResetMouseDragDelta(int button);
|
||||
CIMGUI_API ImGuiMouseCursor ig_GetMouseCursor();
|
||||
CIMGUI_API void ig_SetMouseCursor(ImGuiMouseCursor type);
|
||||
|
||||
// Internal state access - if you want to share ImGui state between modules (e.g. DLL) or allocate it yourself
|
||||
CIMGUI_API CONST char* ig_GetVersion();
|
||||
CIMGUI_API void* ig_GetInternalState();
|
||||
|
2
imgui
2
imgui
Submodule imgui updated: 931b8dcdaf...e5bea65582
Reference in New Issue
Block a user