use CONST define for simple switch to pure C later

This commit is contained in:
Stephan Dilly
2015-04-21 23:39:04 +02:00
parent 9399d2d8a6
commit ea7b698694
2 changed files with 235 additions and 233 deletions

View File

@@ -49,12 +49,12 @@ IMGUI_API void ig_ShowMetricsWindow(bool* opened)
// Window // Window
CIMGUI_API bool ig_Begin(const char* name, bool* p_opened, ImGuiWindowFlags flags) CIMGUI_API bool ig_Begin(CONST char* name, bool* p_opened, ImGuiWindowFlags flags)
{ {
return ImGui::Begin(name, p_opened, flags); return ImGui::Begin(name, p_opened, flags);
} }
CIMGUI_API bool ig_Begin2(const char* name, bool* p_opened, const ImVec2 size_on_first_use, float bg_alpha, ImGuiWindowFlags flags) CIMGUI_API bool ig_Begin2(CONST char* name, bool* p_opened, CONST ImVec2 size_on_first_use, float bg_alpha, ImGuiWindowFlags flags)
{ {
return ImGui::Begin(name, p_opened, size_on_first_use, bg_alpha, flags); return ImGui::Begin(name, p_opened, size_on_first_use, bg_alpha, flags);
} }
@@ -64,12 +64,12 @@ CIMGUI_API void ig_End()
ImGui::End(); ImGui::End();
} }
CIMGUI_API bool ig_BeginChild(const char* str_id, const ImVec2 size, bool border, ImGuiWindowFlags extra_flags) CIMGUI_API bool ig_BeginChild(CONST char* str_id, CONST ImVec2 size, bool border, ImGuiWindowFlags extra_flags)
{ {
return ImGui::BeginChild(str_id, size, border, extra_flags); return ImGui::BeginChild(str_id, size, border, extra_flags);
} }
CIMGUI_API bool ig_BeginChildEx(ImGuiID id, const ImVec2 size, bool border, ImGuiWindowFlags extra_flags) CIMGUI_API bool ig_BeginChildEx(ImGuiID id, CONST ImVec2 size, bool border, ImGuiWindowFlags extra_flags)
{ {
return ImGui::BeginChild(id, size, border, extra_flags); return ImGui::BeginChild(id, size, border, extra_flags);
} }
@@ -134,12 +134,12 @@ CIMGUI_API bool ig_GetWindowCollapsed()
return ImGui::GetWindowCollapsed(); return ImGui::GetWindowCollapsed();
} }
CIMGUI_API void ig_SetNextWindowPos(const ImVec2 pos, ImGuiSetCond cond) CIMGUI_API void ig_SetNextWindowPos(CONST ImVec2 pos, ImGuiSetCond cond)
{ {
ImGui::SetNextWindowPos(pos, cond); ImGui::SetNextWindowPos(pos, cond);
} }
CIMGUI_API void ig_SetNextWindowSize(const ImVec2 size, ImGuiSetCond cond) CIMGUI_API void ig_SetNextWindowSize(CONST ImVec2 size, ImGuiSetCond cond)
{ {
ImGui::SetNextWindowSize(size, cond); ImGui::SetNextWindowSize(size, cond);
} }
@@ -154,12 +154,12 @@ CIMGUI_API void ig_SetNextWindowFocus()
ImGui::SetNextWindowFocus(); ImGui::SetNextWindowFocus();
} }
CIMGUI_API void ig_SetWindowPos(const ImVec2 pos, ImGuiSetCond cond) CIMGUI_API void ig_SetWindowPos(CONST ImVec2 pos, ImGuiSetCond cond)
{ {
ImGui::SetWindowPos(pos,cond); ImGui::SetWindowPos(pos,cond);
} }
CIMGUI_API void ig_SetWindowSize(const ImVec2 size, ImGuiSetCond cond) CIMGUI_API void ig_SetWindowSize(CONST ImVec2 size, ImGuiSetCond cond)
{ {
ImGui::SetWindowSize(size, cond); ImGui::SetWindowSize(size, cond);
} }
@@ -174,22 +174,22 @@ CIMGUI_API void ig_SetWindowFocus()
ImGui::SetWindowFocus(); ImGui::SetWindowFocus();
} }
CIMGUI_API void ig_SetWindowPosByName(const char* name, const ImVec2 pos, ImGuiSetCond cond) CIMGUI_API void ig_SetWindowPosByName(CONST char* name, CONST ImVec2 pos, ImGuiSetCond cond)
{ {
ImGui::SetWindowPos(name,pos,cond); ImGui::SetWindowPos(name,pos,cond);
} }
CIMGUI_API void ig_SetWindowSize2(const char* name, const ImVec2 size, ImGuiSetCond cond) CIMGUI_API void ig_SetWindowSize2(CONST char* name, CONST ImVec2 size, ImGuiSetCond cond)
{ {
ImGui::SetWindowSize(name, size, cond); ImGui::SetWindowSize(name, size, cond);
} }
CIMGUI_API void ig_SetWindowCollapsed2(const char* name, bool collapsed, ImGuiSetCond cond) CIMGUI_API void ig_SetWindowCollapsed2(CONST char* name, bool collapsed, ImGuiSetCond cond)
{ {
ImGui::SetWindowCollapsed(name, collapsed, cond); ImGui::SetWindowCollapsed(name, collapsed, cond);
} }
CIMGUI_API void ig_SetWindowFocus2(const char* name) CIMGUI_API void ig_SetWindowFocus2(CONST char* name)
{ {
ImGui::SetWindowFocus(name); ImGui::SetWindowFocus(name);
} }
@@ -235,7 +235,7 @@ CIMGUI_API void ig_PopFont()
return ImGui::PopFont(); return ImGui::PopFont();
} }
CIMGUI_API void ig_PushStyleColor(ImGuiCol idx, const ImVec4 col) CIMGUI_API void ig_PushStyleColor(ImGuiCol idx, CONST ImVec4 col)
{ {
return ImGui::PushStyleColor(idx, col); return ImGui::PushStyleColor(idx, col);
} }
@@ -250,7 +250,7 @@ CIMGUI_API void ig_PushStyleVar(ImGuiStyleVar idx, float val)
return ImGui::PushStyleVar(idx, val); return ImGui::PushStyleVar(idx, val);
} }
CIMGUI_API void ig_PushStyleVarVec(ImGuiStyleVar idx, const ImVec2 val) CIMGUI_API void ig_PushStyleVarVec(ImGuiStyleVar idx, CONST ImVec2 val)
{ {
return ImGui::PushStyleVar(idx, val); return ImGui::PushStyleVar(idx, val);
} }
@@ -297,7 +297,7 @@ CIMGUI_API void ig_PopTextWrapPos()
} }
// Tooltip // Tooltip
CIMGUI_API void ig_SetTooltip(const char* fmt, ...) CIMGUI_API void ig_SetTooltip(CONST char* fmt, ...)
{ {
va_list args; va_list args;
va_start(args, fmt); va_start(args, fmt);
@@ -305,7 +305,7 @@ CIMGUI_API void ig_SetTooltip(const char* fmt, ...)
va_end(args); va_end(args);
} }
CIMGUI_API void ig_SetTooltipV(const char* fmt, va_list args) CIMGUI_API void ig_SetTooltipV(CONST char* fmt, va_list args)
{ {
ImGui::SetTooltipV(fmt, args); ImGui::SetTooltipV(fmt, args);
} }
@@ -367,7 +367,7 @@ CIMGUI_API void ig_Unindent()
return ImGui::Unindent(); return ImGui::Unindent();
} }
CIMGUI_API void ig_Columns(int count, const char* id, bool border) CIMGUI_API void ig_Columns(int count, CONST char* id, bool border)
{ {
return ImGui::Columns(count, id, border); return ImGui::Columns(count, id, border);
} }
@@ -417,7 +417,7 @@ CIMGUI_API float ig_GetCursorPosY()
return ImGui::GetCursorPosY(); return ImGui::GetCursorPosY();
} }
CIMGUI_API void ig_SetCursorPos(const ImVec2 pos) CIMGUI_API void ig_SetCursorPos(CONST ImVec2 pos)
{ {
return ImGui::SetCursorPos(pos); return ImGui::SetCursorPos(pos);
} }
@@ -437,7 +437,7 @@ CIMGUI_API void ig_GetCursorScreenPos(ImVec2* pOut)
*pOut = ImGui::GetCursorScreenPos(); *pOut = ImGui::GetCursorScreenPos();
} }
CIMGUI_API void ig_SetCursorScreenPos(const ImVec2 pos) CIMGUI_API void ig_SetCursorScreenPos(CONST ImVec2 pos)
{ {
return ImGui::SetCursorScreenPos(pos); return ImGui::SetCursorScreenPos(pos);
} }
@@ -460,23 +460,23 @@ CIMGUI_API float ig_GetTextLineHeightWithSpacing()
// 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 ig_PushIdStr(const char* str_id) CIMGUI_API void ig_PushIdStr(CONST char* str_id)
{ {
return ImGui::PushID(str_id); return ImGui::PushID(str_id);
} }
CIMGUI_API void ig_PushIdStrRange(const char* str_begin, const char* str_end) CIMGUI_API void ig_PushIdStrRange(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 ig_PushIdPtr(const void* ptr_id) CIMGUI_API void ig_PushIdPtr(CONST void* ptr_id)
{ {
return ImGui::PushID(ptr_id); return ImGui::PushID(ptr_id);
} }
CIMGUI_API void ig_PushIdInt(const int int_id) CIMGUI_API void ig_PushIdInt(CONST int int_id)
{ {
return ImGui::PushID(int_id); return ImGui::PushID(int_id);
} }
@@ -486,23 +486,23 @@ CIMGUI_API void ig_PopId()
return ImGui::PopID(); return ImGui::PopID();
} }
CIMGUI_API ImGuiID ig_GetIdStr(const char* str_id) CIMGUI_API ImGuiID ig_GetIdStr(CONST char* str_id)
{ {
return ImGui::GetID(str_id); return ImGui::GetID(str_id);
} }
CIMGUI_API ImGuiID ig_GetIdStrRange(const char* str_begin, const char* str_end) CIMGUI_API ImGuiID ig_GetIdStrRange(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 ig_GetIdPtr(const void* ptr_id) CIMGUI_API ImGuiID ig_GetIdPtr(CONST void* ptr_id)
{ {
return ImGui::GetID(ptr_id); return ImGui::GetID(ptr_id);
} }
// Widgets // Widgets
CIMGUI_API void ig_Text(const char* fmt, ...) CIMGUI_API void ig_Text(CONST char* fmt, ...)
{ {
va_list args; va_list args;
va_start(args, fmt); va_start(args, fmt);
@@ -510,12 +510,12 @@ CIMGUI_API void ig_Text(const char* fmt, ...)
va_end(args); va_end(args);
} }
CIMGUI_API void ig_TextV(const char* fmt, va_list args) CIMGUI_API void ig_TextV(CONST char* fmt, va_list args)
{ {
ImGui::TextV(fmt, args); ImGui::TextV(fmt, args);
} }
CIMGUI_API void ig_TextColored(const ImVec4 col, const char* fmt, ...) CIMGUI_API void ig_TextColored(CONST ImVec4 col, CONST char* fmt, ...)
{ {
va_list args; va_list args;
va_start(args, fmt); va_start(args, fmt);
@@ -523,12 +523,12 @@ CIMGUI_API void ig_TextColored(const ImVec4 col, const char* fmt, ...)
va_end(args); va_end(args);
} }
CIMGUI_API void ig_TextColoredV(const ImVec4 col, const char* fmt, va_list args) CIMGUI_API void ig_TextColoredV(CONST ImVec4 col, CONST char* fmt, va_list args)
{ {
ImGui::TextColoredV(col,fmt,args); ImGui::TextColoredV(col,fmt,args);
} }
CIMGUI_API void ig_TextWrapped(const char* fmt, ...) CIMGUI_API void ig_TextWrapped(CONST char* fmt, ...)
{ {
va_list args; va_list args;
va_start(args, fmt); va_start(args, fmt);
@@ -536,17 +536,17 @@ CIMGUI_API void ig_TextWrapped(const char* fmt, ...)
va_end(args); va_end(args);
} }
CIMGUI_API void ig_TextWrappedV(const char* fmt, va_list args) CIMGUI_API void ig_TextWrappedV(CONST char* fmt, va_list args)
{ {
ImGui::TextWrappedV(fmt, args); ImGui::TextWrappedV(fmt, args);
} }
CIMGUI_API void ig_TextUnformatted(const char* text, const char* text_end) CIMGUI_API void ig_TextUnformatted(CONST char* text, CONST char* text_end)
{ {
return ImGui::TextUnformatted(text, text_end); return ImGui::TextUnformatted(text, text_end);
} }
CIMGUI_API void ig_LabelText(const char* label, const char* fmt, ...) CIMGUI_API void ig_LabelText(CONST char* label, CONST char* fmt, ...)
{ {
va_list args; va_list args;
va_start(args, fmt); va_start(args, fmt);
@@ -554,7 +554,7 @@ CIMGUI_API void ig_LabelText(const char* label, const char* fmt, ...)
va_end(args); va_end(args);
} }
CIMGUI_API void ig_LabelTextV(const char* label, const char* fmt, va_list args) CIMGUI_API void ig_LabelTextV(CONST char* label, CONST char* fmt, va_list args)
{ {
ImGui::LabelTextV(label, fmt, args); ImGui::LabelTextV(label, fmt, args);
} }
@@ -564,7 +564,7 @@ CIMGUI_API void ig_Bullet()
return ImGui::Bullet(); return ImGui::Bullet();
} }
CIMGUI_API void ig_BulletText(const char* fmt, ...) CIMGUI_API void ig_BulletText(CONST char* fmt, ...)
{ {
va_list args; va_list args;
va_start(args, fmt); va_start(args, fmt);
@@ -572,87 +572,87 @@ CIMGUI_API void ig_BulletText(const char* fmt, ...)
va_end(args); va_end(args);
} }
CIMGUI_API void ig_BulletTextV(const char* fmt, va_list args) CIMGUI_API void ig_BulletTextV(CONST char* fmt, va_list args)
{ {
ImGui::BulletTextV(fmt, args); ImGui::BulletTextV(fmt, args);
} }
CIMGUI_API bool ig_Button(const char* label, const ImVec2 size, bool repeat_when_held) CIMGUI_API bool ig_Button(CONST char* label, CONST ImVec2 size, bool repeat_when_held)
{ {
return ImGui::Button(label, size, repeat_when_held); return ImGui::Button(label, size, repeat_when_held);
} }
CIMGUI_API bool ig_SmallButton(const char* label) CIMGUI_API bool ig_SmallButton(CONST char* label)
{ {
return ImGui::SmallButton(label); return ImGui::SmallButton(label);
} }
CIMGUI_API bool ig_InvisibleButton(const char* str_id, const ImVec2 size) CIMGUI_API bool ig_InvisibleButton(CONST char* str_id, CONST ImVec2 size)
{ {
return ImGui::InvisibleButton(str_id, size); return ImGui::InvisibleButton(str_id, size);
} }
CIMGUI_API void ig_Image(ImTextureID user_texture_id, const ImVec2 size, const ImVec2 uv0, const ImVec2 uv1, const ImVec4 tint_col, const ImVec4 border_col) CIMGUI_API void ig_Image(ImTextureID user_texture_id, CONST ImVec2 size, CONST ImVec2 uv0, CONST ImVec2 uv1, CONST ImVec4 tint_col, CONST ImVec4 border_col)
{ {
return ImGui::Image(user_texture_id, size, uv0, uv1, tint_col, border_col); return ImGui::Image(user_texture_id, size, uv0, uv1, tint_col, border_col);
} }
CIMGUI_API bool ig_ImageButton(ImTextureID user_texture_id, const ImVec2 size, const ImVec2 uv0, const ImVec2 uv1, int frame_padding, const ImVec4 bg_col, const ImVec4 tint_col) CIMGUI_API bool ig_ImageButton(ImTextureID user_texture_id, CONST ImVec2 size, CONST ImVec2 uv0, CONST ImVec2 uv1, int frame_padding, CONST ImVec4 bg_col, CONST ImVec4 tint_col)
{ {
return ImGui::ImageButton(user_texture_id, size, uv0, uv1, frame_padding, bg_col, tint_col); return ImGui::ImageButton(user_texture_id, size, uv0, uv1, frame_padding, bg_col, tint_col);
} }
CIMGUI_API bool ig_CollapsingHeader(const char* label, const char* str_id, bool display_frame, bool default_open) CIMGUI_API bool ig_CollapsingHeader(CONST char* label, CONST char* str_id, bool display_frame, bool default_open)
{ {
return ImGui::CollapsingHeader(label, str_id, display_frame, default_open); return ImGui::CollapsingHeader(label, str_id, display_frame, default_open);
} }
CIMGUI_API bool ig_Checkbox(const char* label, bool* v) CIMGUI_API bool ig_Checkbox(CONST char* label, bool* v)
{ {
return ImGui::Checkbox(label, v); return ImGui::Checkbox(label, v);
} }
CIMGUI_API bool ig_CheckboxFlags(const char* label, unsigned int* flags, unsigned int flags_value) CIMGUI_API bool ig_CheckboxFlags(CONST char* label, unsigned int* flags, unsigned int flags_value)
{ {
return ImGui::CheckboxFlags(label, flags, flags_value); return ImGui::CheckboxFlags(label, flags, flags_value);
} }
CIMGUI_API bool ig_RadioButtonBool(const char* label, bool active) CIMGUI_API bool ig_RadioButtonBool(CONST char* label, bool active)
{ {
return ImGui::RadioButton(label, active); return ImGui::RadioButton(label, active);
} }
CIMGUI_API bool ig_RadioButton(const char* label, int* v, int v_button) CIMGUI_API bool ig_RadioButton(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 ig_Combo(const char* label, int* current_item, const char** items, int items_count, int height_in_items) CIMGUI_API bool ig_Combo(CONST char* label, int* current_item, CONST char** items, int items_count, int height_in_items)
{ {
return ImGui::Combo(label, current_item, items, items_count, height_in_items); return ImGui::Combo(label, current_item, items, items_count, height_in_items);
} }
CIMGUI_API bool ig_Combo2(const char* label, int* current_item, const char* items_separated_by_zeros, int height_in_items) CIMGUI_API bool ig_Combo2(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); return ImGui::Combo(label, current_item, items_separated_by_zeros, height_in_items);
} }
CIMGUI_API bool ig_Combo3(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_Combo3(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); return ImGui::Combo(label, current_item, items_getter, data, items_count, height_in_items);
} }
CIMGUI_API bool ig_ColorButton(const ImVec4 col, bool small_height, bool outline_border) CIMGUI_API bool ig_ColorButton(CONST ImVec4 col, bool small_height, bool outline_border)
{ {
return ImGui::ColorButton(col, small_height, outline_border); return ImGui::ColorButton(col, small_height, outline_border);
} }
CIMGUI_API bool ig_ColorEdit3(const char* label, float col[3]) CIMGUI_API bool ig_ColorEdit3(CONST char* label, float col[3])
{ {
return ImGui::ColorEdit3(label, col); return ImGui::ColorEdit3(label, col);
} }
CIMGUI_API bool ig_ColorEdit4(const char* label, float col[4], bool show_alpha) CIMGUI_API bool ig_ColorEdit4(CONST char* label, float col[4], bool show_alpha)
{ {
return ImGui::ColorEdit4(label, col, show_alpha); return ImGui::ColorEdit4(label, col, show_alpha);
} }
@@ -662,177 +662,177 @@ CIMGUI_API void ig_ColorEditMode(ImGuiColorEditMode mode)
return ImGui::ColorEditMode(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, size_t 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);
} }
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, ImVec2 graph_size) 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, ImVec2 graph_size)
{ {
return ImGui::PlotLines(label, values_getter, data, values_count, values_offset, overlay_text, scale_min, scale_max, graph_size); 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, size_t stride)
{ {
return ImGui::PlotHistogram(label,values, values_count, values_offset, overlay_text, scale_min, scale_max, graph_size, stride); return ImGui::PlotHistogram(label,values, values_count, values_offset, overlay_text, scale_min, scale_max, graph_size, 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, ImVec2 graph_size) 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, ImVec2 graph_size)
{ {
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);
} }
// Widgets: Sliders (tip: ctrl+click on a slider to input text) // Widgets: Sliders (tip: ctrl+click on a slider to input text)
CIMGUI_API bool ig_SliderFloat(const char* label, float* v, float v_min, float v_max, const char* display_format, float power) CIMGUI_API bool ig_SliderFloat(CONST char* label, float* v, float v_min, float v_max, CONST char* display_format, float power)
{ {
return ImGui::SliderFloat(label, v, v_min, v_max, display_format, power); return ImGui::SliderFloat(label, v, v_min, v_max, display_format, power);
} }
CIMGUI_API bool ig_SliderFloat2(const char* label, float v[2], float v_min, float v_max, const char* display_format, float power) CIMGUI_API bool ig_SliderFloat2(CONST char* label, float v[2], float v_min, float v_max, CONST char* display_format, float power)
{ {
return ImGui::SliderFloat(label, v, v_min, v_max, display_format, power); return ImGui::SliderFloat(label, v, v_min, v_max, display_format, power);
} }
CIMGUI_API bool ig_SliderFloat3(const char* label, float v[3], float v_min, float v_max, const char* display_format, float power) CIMGUI_API bool ig_SliderFloat3(CONST char* label, float v[3], float v_min, float v_max, CONST char* display_format, float power)
{ {
return ImGui::SliderFloat3(label, v, v_min, v_max, display_format, power); return ImGui::SliderFloat3(label, v, v_min, v_max, display_format, power);
} }
CIMGUI_API bool ig_SliderFloat4(const char* label, float v[4], float v_min, float v_max, const char* display_format, float power) CIMGUI_API bool ig_SliderFloat4(CONST char* label, float v[4], float v_min, float v_max, CONST char* display_format, float power)
{ {
return ImGui::SliderFloat4(label, v, v_min, v_max, display_format, power); return ImGui::SliderFloat4(label, v, v_min, v_max, display_format, power);
} }
CIMGUI_API bool ig_SliderAngle(const char* label, float* v_rad, float v_degrees_min, float v_degrees_max) CIMGUI_API bool ig_SliderAngle(CONST char* label, float* v_rad, float v_degrees_min, float v_degrees_max)
{ {
return ImGui::SliderAngle(label, v_rad, v_degrees_min, v_degrees_max); return ImGui::SliderAngle(label, v_rad, v_degrees_min, v_degrees_max);
} }
CIMGUI_API bool ig_SliderInt(const char* label, int* v, int v_min, int v_max, const char* display_format) CIMGUI_API bool ig_SliderInt(CONST char* label, int* v, int v_min, int v_max, CONST char* display_format)
{ {
return ImGui::SliderInt(label, v, v_min, v_max, display_format); return ImGui::SliderInt(label, v, v_min, v_max, display_format);
} }
CIMGUI_API bool ig_SliderInt2(const char* label, int v[2], int v_min, int v_max, const char* display_format) CIMGUI_API bool ig_SliderInt2(CONST char* label, int v[2], int v_min, int v_max, CONST char* display_format)
{ {
return ImGui::SliderInt2(label, v, v_min, v_max, display_format); return ImGui::SliderInt2(label, v, v_min, v_max, display_format);
} }
CIMGUI_API bool ig_SliderInt3(const char* label, int v[3], int v_min, int v_max, const char* display_format) CIMGUI_API bool ig_SliderInt3(CONST char* label, int v[3], int v_min, int v_max, CONST char* display_format)
{ {
return ImGui::SliderInt3(label, v, v_min, v_max, display_format); return ImGui::SliderInt3(label, v, v_min, v_max, display_format);
} }
CIMGUI_API bool ig_SliderInt4(const char* label, int v[4], int v_min, int v_max, const char* display_format) CIMGUI_API bool ig_SliderInt4(CONST char* label, int v[4], int v_min, int v_max, CONST char* display_format)
{ {
return ImGui::SliderInt4(label, v, v_min, v_max, display_format); return ImGui::SliderInt4(label, v, v_min, v_max, display_format);
} }
CIMGUI_API bool ig_VSliderFloat(const char* label, const ImVec2 size, float* v, float v_min, float v_max, const char* display_format, float power) CIMGUI_API bool ig_VSliderFloat(CONST char* label, CONST ImVec2 size, float* v, float v_min, float v_max, CONST char* display_format, float power)
{ {
return ImGui::VSliderFloat(label, size, v, v_min, v_max, display_format, power); return ImGui::VSliderFloat(label, size, v, v_min, v_max, display_format, power);
} }
CIMGUI_API bool ig_VSliderInt(const char* label, const ImVec2 size, int* v, int v_min, int v_max, const char* display_format) CIMGUI_API bool ig_VSliderInt(CONST char* label, CONST ImVec2 size, int* v, int v_min, int v_max, CONST char* display_format)
{ {
return ImGui::VSliderInt(label, size, v, v_min, v_max, display_format); return ImGui::VSliderInt(label, size, v, v_min, v_max, display_format);
} }
// Widgets: Drags (tip: ctrl+click on a drag box to input text) // Widgets: Drags (tip: ctrl+click on a drag box to input text)
CIMGUI_API bool ig_DragFloat(const char* label, float* v, float v_speed, float v_min, float v_max, const char* display_format, float power) CIMGUI_API bool ig_DragFloat(CONST char* label, float* v, float v_speed, float v_min, float v_max, CONST char* display_format, float power)
{ {
return ImGui::DragFloat(label, v, v_speed, v_min, v_max, display_format, power); return ImGui::DragFloat(label, v, v_speed, v_min, v_max, display_format, power);
} }
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_DragFloat2(CONST char* label, float v[2], float v_speed, float v_min, float v_max, CONST char* display_format, float power)
{ {
return ImGui::DragFloat2(label, v, v_speed, v_min, v_max, display_format, power); return ImGui::DragFloat2(label, v, v_speed, v_min, v_max, display_format, 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_DragFloat3(CONST char* label, float v[3], float v_speed, float v_min, float v_max, CONST char* display_format, float power)
{ {
return ImGui::DragFloat3(label, v, v_speed, v_min, v_max, display_format, power); return ImGui::DragFloat3(label, v, v_speed, v_min, v_max, display_format, 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_DragFloat4(CONST char* label, float v[4], float v_speed, float v_min, float v_max, CONST char* display_format, float power)
{ {
return ImGui::DragFloat4(label, v, v_speed, v_min, v_max, display_format, power); return ImGui::DragFloat4(label, v, v_speed, v_min, v_max, display_format, power);
} }
CIMGUI_API bool ig_DragInt(const char* label, int* v, float v_speed, int v_min, int v_max, const char* display_format) 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); return ImGui::DragInt(label, v, v_speed, v_min, v_max, display_format);
} }
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_DragInt2(CONST char* label, int v[2], float v_speed, int v_min, int v_max, CONST char* display_format)
{ {
return ImGui::DragInt2(label, v, v_speed, v_min, v_max, display_format); return ImGui::DragInt2(label, v, v_speed, v_min, v_max, 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_DragInt3(CONST char* label, int v[3], float v_speed, int v_min, int v_max, CONST char* display_format)
{ {
return ImGui::DragInt3(label, v, v_speed, v_min, v_max, display_format); return ImGui::DragInt3(label, v, v_speed, v_min, v_max, 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_DragInt4(CONST char* label, int v[4], float v_speed, int v_min, int v_max, CONST char* display_format)
{ {
return ImGui::DragInt4(label, v, v_speed, v_min, v_max, display_format); return ImGui::DragInt4(label, v, v_speed, v_min, v_max, display_format);
} }
// Widgets: Input // 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_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); return ImGui::InputText(label, buf, buf_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) 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); return ImGui::InputFloat(label, v, step, step_fast, decimal_precision, extra_flags);
} }
CIMGUI_API bool ig_InputFloat2(const char* label, float v[2], int decimal_precision) CIMGUI_API bool ig_InputFloat2(CONST char* label, float v[2], int decimal_precision)
{ {
return ImGui::InputFloat2(label, v, decimal_precision); return ImGui::InputFloat2(label, v, decimal_precision);
} }
CIMGUI_API bool ig_InputFloat3(const char* label, float v[3], int decimal_precision) CIMGUI_API bool ig_InputFloat3(CONST char* label, float v[3], int decimal_precision)
{ {
return ImGui::InputFloat3(label, v, decimal_precision); return ImGui::InputFloat3(label, v, decimal_precision);
} }
CIMGUI_API bool ig_InputFloat4(const char* label, float v[4], int decimal_precision) CIMGUI_API bool ig_InputFloat4(CONST char* label, float v[4], int decimal_precision)
{ {
return ImGui::InputFloat4(label, v, decimal_precision); return ImGui::InputFloat4(label, v, decimal_precision);
} }
CIMGUI_API bool ig_InputInt(const char* label, int* v, int step, int step_fast, ImGuiInputTextFlags extra_flags) CIMGUI_API bool ig_InputInt(CONST char* label, int* v, int step, int step_fast, ImGuiInputTextFlags extra_flags)
{ {
return ImGui::InputInt(label, v, step, step_fast, extra_flags); return ImGui::InputInt(label, v, step, step_fast, extra_flags);
} }
CIMGUI_API bool ig_InputInt2(const char* label, int v[2]) CIMGUI_API bool ig_InputInt2(CONST char* label, int v[2])
{ {
return ImGui::InputInt2(label, v); return ImGui::InputInt2(label, v);
} }
CIMGUI_API bool ig_InputInt3(const char* label, int v[3]) CIMGUI_API bool ig_InputInt3(CONST char* label, int v[3])
{ {
return ImGui::InputInt3(label, v); return ImGui::InputInt3(label, v);
} }
CIMGUI_API bool ig_InputInt4(const char* label, int v[4]) CIMGUI_API bool ig_InputInt4(CONST char* label, int v[4])
{ {
return ImGui::InputInt4(label, v); return ImGui::InputInt4(label, v);
} }
// Widgets: Trees // Widgets: Trees
CIMGUI_API bool ig_TreeNode(const char* str_label_id) CIMGUI_API bool ig_TreeNode(CONST char* str_label_id)
{ {
return ImGui::TreeNode(str_label_id); return ImGui::TreeNode(str_label_id);
} }
CIMGUI_API bool ig_TreeNodeStr(const char* str_id, const char* fmt, ...) CIMGUI_API bool ig_TreeNodeStr(CONST char* str_id, CONST char* fmt, ...)
{ {
va_list args; va_list args;
va_start(args, fmt); va_start(args, fmt);
@@ -842,7 +842,7 @@ CIMGUI_API bool ig_TreeNodeStr(const char* str_id, const char* fmt, ...)
return res; return res;
} }
CIMGUI_API bool ig_TreeNodePtr(const void* ptr_id, const char* fmt, ...) CIMGUI_API bool ig_TreeNodePtr(CONST void* ptr_id, CONST char* fmt, ...)
{ {
va_list args; va_list args;
va_start(args, fmt); va_start(args, fmt);
@@ -852,22 +852,22 @@ CIMGUI_API bool ig_TreeNodePtr(const void* ptr_id, const char* fmt, ...)
return res; return res;
} }
CIMGUI_API bool ig_TreeNodeStrV(const char* str_id, const char* fmt, va_list args) CIMGUI_API bool ig_TreeNodeStrV(CONST char* str_id, CONST char* fmt, va_list args)
{ {
return ImGui::TreeNodeV(str_id,fmt,args); return ImGui::TreeNodeV(str_id,fmt,args);
} }
CIMGUI_API bool ig_TreeNodePtrV(const void* ptr_id, const char* fmt, va_list args) CIMGUI_API bool ig_TreeNodePtrV(CONST void* ptr_id, CONST char* fmt, va_list args)
{ {
return ImGui::TreeNodeV(ptr_id, fmt, args); return ImGui::TreeNodeV(ptr_id, fmt, args);
} }
CIMGUI_API void ig_TreePushStr(const char* str_id) CIMGUI_API void ig_TreePushStr(CONST char* str_id)
{ {
return ImGui::TreePush(str_id); return ImGui::TreePush(str_id);
} }
CIMGUI_API void ig_TreePushPtr(const void* ptr_id) CIMGUI_API void ig_TreePushPtr(CONST void* ptr_id)
{ {
return ImGui::TreePush(ptr_id); return ImGui::TreePush(ptr_id);
} }
@@ -883,32 +883,32 @@ CIMGUI_API void ig_SetNextTreeNodeOpened(bool opened, ImGuiSetCond cond)
} }
// Widgets: Selectable / Lists // 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, CONST ImVec2 size)
{ {
return ImGui::Selectable(label, selected, size); return ImGui::Selectable(label, selected, 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, CONST ImVec2 size)
{ {
return ImGui::Selectable(label,p_selected,size); return ImGui::Selectable(label,p_selected,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_ListBox(CONST char* label, int* current_item, CONST char** items, int items_count, int height_in_items)
{ {
return ImGui::ListBox(label, current_item, items, items_count, height_in_items); return ImGui::ListBox(label, current_item, items, items_count, 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_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)
{ {
return ImGui::ListBox(label, current_item, items_getter,data,items_count,height_in_items); return ImGui::ListBox(label, current_item, items_getter,data,items_count,height_in_items);
} }
CIMGUI_API bool ig_ListBoxHeader(const char* label, const ImVec2 size) CIMGUI_API bool ig_ListBoxHeader(CONST char* label, CONST ImVec2 size)
{ {
return ImGui::ListBoxHeader(label, size); return ImGui::ListBoxHeader(label, size);
} }
CIMGUI_API bool ig_ListBoxHeader2(const char* label, int items_count, int height_in_items) CIMGUI_API bool ig_ListBoxHeader2(CONST char* label, int items_count, int height_in_items)
{ {
return ImGui::ListBoxHeader(label,items_count,height_in_items); return ImGui::ListBoxHeader(label,items_count,height_in_items);
} }
@@ -919,32 +919,32 @@ CIMGUI_API void ig_ListBoxFooter()
} }
// Widgets: Value() Helpers. Output single value in "name: value" format (tip: freely declare your own within the ImGui namespace!) // 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_ValueBool(CONST char* prefix, bool b)
{ {
ImGui::Value(prefix, b); ImGui::Value(prefix, b);
} }
CIMGUI_API void ig_ValueInt(const char* prefix, int v) CIMGUI_API void ig_ValueInt(CONST char* prefix, int v)
{ {
ImGui::Value(prefix, v); ImGui::Value(prefix, v);
} }
CIMGUI_API void ig_ValueUInt(const char* prefix, unsigned int v) CIMGUI_API void ig_ValueUInt(CONST char* prefix, unsigned int v)
{ {
ImGui::Value(prefix, v); ImGui::Value(prefix, v);
} }
CIMGUI_API void ig_ValueFloat(const char* prefix, float v, const char* float_format) CIMGUI_API void ig_ValueFloat(CONST char* prefix, float v, CONST char* float_format)
{ {
ImGui::Value(prefix,v,float_format); ImGui::Value(prefix,v,float_format);
} }
CIMGUI_API void ig_Color(const char* prefix, const ImVec4 v) CIMGUI_API void ig_Color(CONST char* prefix, CONST ImVec4 v)
{ {
ImGui::Color(prefix,v); ImGui::Color(prefix,v);
} }
CIMGUI_API void ig_Color2(const char* prefix, unsigned int v) CIMGUI_API void ig_Color2(CONST char* prefix, unsigned int v)
{ {
ImGui::Color(prefix,v); ImGui::Color(prefix,v);
} }
@@ -955,7 +955,7 @@ CIMGUI_API void ig_LogToTTY(int max_depth)
ImGui::LogToTTY(max_depth); ImGui::LogToTTY(max_depth);
} }
CIMGUI_API void ig_LogToFile(int max_depth, const char* filename) CIMGUI_API void ig_LogToFile(int max_depth, CONST char* filename)
{ {
ImGui::LogToFile(max_depth,filename); ImGui::LogToFile(max_depth,filename);
} }
@@ -975,7 +975,7 @@ CIMGUI_API void ig_LogButtons()
ImGui::LogButtons(); ImGui::LogButtons();
} }
CIMGUI_API void ig_LogText(const char* fmt, ...) CIMGUI_API void ig_LogText(CONST char* fmt, ...)
{ {
char buffer[256]; char buffer[256];
va_list args; va_list args;
@@ -1042,7 +1042,7 @@ CIMGUI_API bool ig_IsRootWindowOrAnyChildFocused()
return ImGui::IsRootWindowOrAnyChildFocused(); return ImGui::IsRootWindowOrAnyChildFocused();
} }
CIMGUI_API bool ig_IsRectClipped(const ImVec2 item_size) CIMGUI_API bool ig_IsRectClipped(CONST ImVec2 item_size)
{ {
return ImGui::IsRectClipped(item_size); return ImGui::IsRectClipped(item_size);
} }
@@ -1072,7 +1072,7 @@ CIMGUI_API bool ig_IsMouseHoveringAnyWindow()
return ImGui::IsMouseHoveringAnyWindow(); return ImGui::IsMouseHoveringAnyWindow();
} }
CIMGUI_API bool ig_IsMouseHoveringRect(const ImVec2 rect_min, const ImVec2 rect_max) CIMGUI_API bool ig_IsMouseHoveringRect(CONST ImVec2 rect_min, CONST ImVec2 rect_max)
{ {
return ImGui::IsMouseHoveringRect(rect_min,rect_max); return ImGui::IsMouseHoveringRect(rect_min,rect_max);
} }
@@ -1081,7 +1081,7 @@ CIMGUI_API bool ig_IsMouseDragging(int button, float lock_threshold)
{ {
return ImGui::IsMouseDragging(button,lock_threshold); return ImGui::IsMouseDragging(button,lock_threshold);
} }
CIMGUI_API bool ig_IsPosHoveringAnyWindow(const ImVec2 pos) CIMGUI_API bool ig_IsPosHoveringAnyWindow(CONST ImVec2 pos)
{ {
return ImGui::IsPosHoveringAnyWindow(pos); return ImGui::IsPosHoveringAnyWindow(pos);
} }
@@ -1121,17 +1121,17 @@ CIMGUI_API int ig_GetFrameCount()
return ImGui::GetFrameCount(); return ImGui::GetFrameCount();
} }
CIMGUI_API const char* ig_GetStyleColName(ImGuiCol idx) CIMGUI_API CONST char* ig_GetStyleColName(ImGuiCol idx)
{ {
return ImGui::GetStyleColName(idx); return ImGui::GetStyleColName(idx);
} }
CIMGUI_API void ig_CalcItemRectClosestPoint(ImVec2* pOut, const ImVec2 pos, bool on_edge, float outward) CIMGUI_API void ig_CalcItemRectClosestPoint(ImVec2* pOut, CONST ImVec2 pos, bool on_edge, float outward)
{ {
*pOut = ImGui::CalcItemRectClosestPoint(pos,on_edge,outward); *pOut = ImGui::CalcItemRectClosestPoint(pos,on_edge,outward);
} }
CIMGUI_API void ig_CalcTextSize(ImVec2* pOut, const char* text, const char* text_end, bool hide_text_after_double_hash, float wrap_width) CIMGUI_API void ig_CalcTextSize(ImVec2* pOut, CONST char* text, CONST char* text_end, bool hide_text_after_double_hash, float wrap_width)
{ {
*pOut = ImGui::CalcTextSize(text, text_end, hide_text_after_double_hash, wrap_width); *pOut = ImGui::CalcTextSize(text, text_end, hide_text_after_double_hash, wrap_width);
} }
@@ -1141,7 +1141,7 @@ 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); 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 void ig_BeginChildFrame(ImGuiID id, CONST ImVec2 size)
{ {
ImGui::BeginChildFrame(id, size); ImGui::BeginChildFrame(id, size);
} }
@@ -1151,7 +1151,7 @@ CIMGUI_API void ig_EndChildFrame()
ImGui::EndChildFrame(); ImGui::EndChildFrame();
} }
CIMGUI_API ImU32 ig_ColorConvertFloat4ToU32(const ImVec4 in) CIMGUI_API ImU32 ig_ColorConvertFloat4ToU32(CONST ImVec4 in)
{ {
return ImGui::ColorConvertFloat4ToU32(in); return ImGui::ColorConvertFloat4ToU32(in);
} }
@@ -1166,7 +1166,7 @@ CIMGUI_API void ig_ColorConvertHSVtoRGB(float h, float s, float v, float* out
ImGui::ColorConvertHSVtoRGB(h,s,v,*out_r,*out_g,*out_b); ImGui::ColorConvertHSVtoRGB(h,s,v,*out_r,*out_g,*out_b);
} }
CIMGUI_API const char* ig_GetVersion() CIMGUI_API CONST char* ig_GetVersion()
{ {
return ImGui::GetVersion(); return ImGui::GetVersion();
} }

View File

@@ -15,7 +15,9 @@
#include <stdbool.h> #include <stdbool.h>
#define EXTERN extern #define EXTERN extern
#endif #endif
#define CIMGUI_API EXTERN API #define CIMGUI_API EXTERN API
#define CONST const
typedef int ImGuiWindowFlags; typedef int ImGuiWindowFlags;
typedef int ImGuiSetCond; typedef int ImGuiSetCond;
@@ -32,11 +34,11 @@ CIMGUI_API void ig_ShowTestWindow(bool* opened);
CIMGUI_API void ig_ShowMetricsWindow(bool* opened); CIMGUI_API void ig_ShowMetricsWindow(bool* opened);
// Window // Window
CIMGUI_API bool ig_Begin(const char* name, bool* p_opened, ImGuiWindowFlags flags); CIMGUI_API bool ig_Begin(CONST char* name, bool* p_opened, ImGuiWindowFlags flags);
CIMGUI_API bool ig_Begin2(const char* name, bool* p_opened, const struct ImVec2 size_on_first_use, float bg_alpha, ImGuiWindowFlags flags); CIMGUI_API bool ig_Begin2(CONST char* name, bool* p_opened, CONST struct ImVec2 size_on_first_use, float bg_alpha, ImGuiWindowFlags flags);
CIMGUI_API void ig_End(); CIMGUI_API void ig_End();
CIMGUI_API bool ig_BeginChild(const char* str_id, const struct ImVec2 size, bool border, ImGuiWindowFlags extra_flags); CIMGUI_API bool ig_BeginChild(CONST char* str_id, CONST struct ImVec2 size, bool border, ImGuiWindowFlags extra_flags);
CIMGUI_API bool ig_BeginChildEx(ImGuiID id, const struct ImVec2 size, bool border, ImGuiWindowFlags extra_flags); CIMGUI_API bool ig_BeginChildEx(ImGuiID id, CONST struct ImVec2 size, bool border, ImGuiWindowFlags extra_flags);
CIMGUI_API void ig_EndChild(); CIMGUI_API void ig_EndChild();
CIMGUI_API void ig_GetContentRegionMax(struct ImVec2* out); CIMGUI_API void ig_GetContentRegionMax(struct ImVec2* out);
CIMGUI_API void ig_GetWindowContentRegionMin(struct ImVec2* out); CIMGUI_API void ig_GetWindowContentRegionMin(struct ImVec2* out);
@@ -50,18 +52,18 @@ CIMGUI_API void ig_GetWindowSize(struct ImVec2* out);
CIMGUI_API float ig_GetWindowWidth(); CIMGUI_API float ig_GetWindowWidth();
CIMGUI_API bool ig_GetWindowCollapsed(); CIMGUI_API bool ig_GetWindowCollapsed();
CIMGUI_API void ig_SetNextWindowPos(const struct ImVec2 pos, ImGuiSetCond cond); CIMGUI_API void ig_SetNextWindowPos(CONST struct ImVec2 pos, ImGuiSetCond cond);
CIMGUI_API void ig_SetNextWindowSize(const struct ImVec2 size, 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_SetNextWindowCollapsed(bool collapsed, ImGuiSetCond cond);
CIMGUI_API void ig_SetNextWindowFocus(); CIMGUI_API void ig_SetNextWindowFocus();
CIMGUI_API void ig_SetWindowPos(const struct ImVec2 pos, ImGuiSetCond cond); CIMGUI_API void ig_SetWindowPos(CONST struct ImVec2 pos, ImGuiSetCond cond);
CIMGUI_API void ig_SetWindowSize(const struct ImVec2 size, ImGuiSetCond cond); CIMGUI_API void ig_SetWindowSize(CONST struct ImVec2 size, ImGuiSetCond cond);
CIMGUI_API void ig_SetWindowCollapsed(bool collapsed, ImGuiSetCond cond); CIMGUI_API void ig_SetWindowCollapsed(bool collapsed, ImGuiSetCond cond);
CIMGUI_API void ig_SetWindowFocus(); CIMGUI_API void ig_SetWindowFocus();
CIMGUI_API void ig_SetWindowPosByName(const char* name, const struct ImVec2 pos, ImGuiSetCond cond); CIMGUI_API void ig_SetWindowPosByName(CONST char* name, CONST struct ImVec2 pos, ImGuiSetCond cond);
CIMGUI_API void ig_SetWindowSize2(const char* name, const struct ImVec2 size, ImGuiSetCond cond); CIMGUI_API void ig_SetWindowSize2(CONST char* name, CONST struct ImVec2 size, ImGuiSetCond cond);
CIMGUI_API void ig_SetWindowCollapsed2(const char* name, bool collapsed, ImGuiSetCond cond); CIMGUI_API void ig_SetWindowCollapsed2(CONST char* name, bool collapsed, ImGuiSetCond cond);
CIMGUI_API void ig_SetWindowFocus2(const char* name); CIMGUI_API void ig_SetWindowFocus2(CONST char* name);
CIMGUI_API float ig_GetScrollPosY(); CIMGUI_API float ig_GetScrollPosY();
CIMGUI_API float ig_GetScrollMaxY(); CIMGUI_API float ig_GetScrollMaxY();
@@ -73,10 +75,10 @@ CIMGUI_API ImGuiStorage* ig_GetStateStorage();
// Parameters stacks (shared) // Parameters stacks (shared)
CIMGUI_API void ig_PushFont(ImFont* font); CIMGUI_API void ig_PushFont(ImFont* font);
CIMGUI_API void ig_PopFont(); CIMGUI_API void ig_PopFont();
CIMGUI_API void ig_PushStyleColor(ImGuiCol idx, const struct ImVec4 col); CIMGUI_API void ig_PushStyleColor(ImGuiCol idx, CONST struct ImVec4 col);
CIMGUI_API void ig_PopStyleColor(int count); CIMGUI_API void ig_PopStyleColor(int count);
CIMGUI_API void ig_PushStyleVar(ImGuiStyleVar idx, float val); CIMGUI_API void ig_PushStyleVar(ImGuiStyleVar idx, float val);
CIMGUI_API void ig_PushStyleVarVec(ImGuiStyleVar idx, const struct ImVec2 val); CIMGUI_API void ig_PushStyleVarVec(ImGuiStyleVar idx, CONST struct ImVec2 val);
CIMGUI_API void ig_PopStyleVar(int count); CIMGUI_API void ig_PopStyleVar(int count);
// Parameters stacks (current window) // Parameters stacks (current window)
@@ -89,8 +91,8 @@ CIMGUI_API void ig_PushTextWrapPos(float wrap_pos_x);
CIMGUI_API void ig_PopTextWrapPos(); CIMGUI_API void ig_PopTextWrapPos();
// Tooltip // Tooltip
CIMGUI_API void ig_SetTooltip(const char* fmt, ...); CIMGUI_API void ig_SetTooltip(CONST char* fmt, ...);
CIMGUI_API void ig_SetTooltipV(const char* fmt, va_list args); CIMGUI_API void ig_SetTooltipV(CONST char* fmt, va_list args);
CIMGUI_API void ig_BeginTooltip(); CIMGUI_API void ig_BeginTooltip();
CIMGUI_API void ig_EndTooltip(); CIMGUI_API void ig_EndTooltip();
@@ -106,7 +108,7 @@ CIMGUI_API void ig_SameLine(int column_x, int spacing_w);
CIMGUI_API void ig_Spacing(); CIMGUI_API void ig_Spacing();
CIMGUI_API void ig_Indent(); CIMGUI_API void ig_Indent();
CIMGUI_API void ig_Unindent(); CIMGUI_API void ig_Unindent();
CIMGUI_API void ig_Columns(int count, const char* id, bool border); CIMGUI_API void ig_Columns(int count, CONST char* id, bool border);
CIMGUI_API void ig_NextColumn(); CIMGUI_API void ig_NextColumn();
CIMGUI_API int ig_GetColumnIndex(); CIMGUI_API int ig_GetColumnIndex();
CIMGUI_API float ig_GetColumnOffset(int column_index); CIMGUI_API float ig_GetColumnOffset(int column_index);
@@ -116,11 +118,11 @@ CIMGUI_API int ig_GetColumnsCount();
CIMGUI_API void ig_GetCursorPos(struct ImVec2* pOut); CIMGUI_API void ig_GetCursorPos(struct ImVec2* pOut);
CIMGUI_API float ig_GetCursorPosX(); CIMGUI_API float ig_GetCursorPosX();
CIMGUI_API float ig_GetCursorPosY(); CIMGUI_API float ig_GetCursorPosY();
CIMGUI_API void ig_SetCursorPos(const struct ImVec2 pos); CIMGUI_API void ig_SetCursorPos(CONST struct ImVec2 pos);
CIMGUI_API void ig_SetCursorPosX(float x); CIMGUI_API void ig_SetCursorPosX(float x);
CIMGUI_API void ig_SetCursorPosY(float y); CIMGUI_API void ig_SetCursorPosY(float y);
CIMGUI_API void ig_GetCursorScreenPos(struct ImVec2* pOut); CIMGUI_API void ig_GetCursorScreenPos(struct ImVec2* pOut);
CIMGUI_API void ig_SetCursorScreenPos(const struct ImVec2 pos); CIMGUI_API void ig_SetCursorScreenPos(CONST struct ImVec2 pos);
CIMGUI_API void ig_AlignFirstTextHeightToWidgets(); CIMGUI_API void ig_AlignFirstTextHeightToWidgets();
CIMGUI_API float ig_GetTextLineHeight(); CIMGUI_API float ig_GetTextLineHeight();
CIMGUI_API float ig_GetTextLineHeightWithSpacing(); CIMGUI_API float ig_GetTextLineHeightWithSpacing();
@@ -128,120 +130,120 @@ CIMGUI_API float ig_GetTextLineHeightWithSpacing();
// 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 ig_PushIdStr(const char* str_id); CIMGUI_API void ig_PushIdStr(CONST char* str_id);
CIMGUI_API void ig_PushIdStrRange(const char* str_begin, const char* str_end); CIMGUI_API void ig_PushIdStrRange(CONST char* str_begin, CONST char* str_end);
CIMGUI_API void ig_PushIdPtr(const void* ptr_id); CIMGUI_API void ig_PushIdPtr(CONST void* ptr_id);
CIMGUI_API void ig_PushIdInt(const int int_id); CIMGUI_API void ig_PushIdInt(CONST int int_id);
CIMGUI_API void ig_PopId(); CIMGUI_API void ig_PopId();
CIMGUI_API ImGuiID ig_GetIdStr(const char* str_id); CIMGUI_API ImGuiID ig_GetIdStr(CONST char* str_id);
CIMGUI_API ImGuiID ig_GetIdStrRange(const char* str_begin,const char* str_end); CIMGUI_API ImGuiID ig_GetIdStrRange(CONST char* str_begin,CONST char* str_end);
CIMGUI_API ImGuiID ig_GetIdPtr(const void* ptr_id); CIMGUI_API ImGuiID ig_GetIdPtr(CONST void* ptr_id);
// Widgets // Widgets
CIMGUI_API void ig_Text(const char* fmt, ...); CIMGUI_API void ig_Text(CONST char* fmt, ...);
CIMGUI_API void ig_TextV(const char* fmt, va_list args); CIMGUI_API void ig_TextV(CONST char* fmt, va_list args);
CIMGUI_API void ig_TextColored(const struct ImVec4 col, const char* fmt, ...); CIMGUI_API void ig_TextColored(CONST struct ImVec4 col, CONST char* fmt, ...);
CIMGUI_API void ig_TextColoredV(const struct ImVec4 col, const char* fmt, va_list args); CIMGUI_API void ig_TextColoredV(CONST struct ImVec4 col, CONST char* fmt, va_list args);
CIMGUI_API void ig_TextWrapped(const char* fmt, ...); CIMGUI_API void ig_TextWrapped(CONST char* fmt, ...);
CIMGUI_API void ig_TextWrappedV(const char* fmt, va_list args); CIMGUI_API void ig_TextWrappedV(CONST char* fmt, va_list args);
CIMGUI_API void ig_TextUnformatted(const char* text, const char* text_end); CIMGUI_API void ig_TextUnformatted(CONST char* text, CONST char* text_end);
CIMGUI_API void ig_LabelText(const char* label, const char* fmt, ...); CIMGUI_API void ig_LabelText(CONST char* label, CONST char* fmt, ...);
CIMGUI_API void ig_LabelTextV(const char* label, const char* fmt, va_list args); CIMGUI_API void ig_LabelTextV(CONST char* label, CONST char* fmt, va_list args);
CIMGUI_API void ig_Bullet(); CIMGUI_API void ig_Bullet();
CIMGUI_API void ig_BulletText(const char* fmt, ...); CIMGUI_API void ig_BulletText(CONST char* fmt, ...);
CIMGUI_API void ig_BulletTextV(const char* fmt, va_list args); CIMGUI_API void ig_BulletTextV(CONST char* fmt, va_list args);
CIMGUI_API bool ig_Button(const char* label, const struct ImVec2 size, bool repeat_when_held); CIMGUI_API bool ig_Button(CONST char* label, CONST struct ImVec2 size, bool repeat_when_held);
CIMGUI_API bool ig_SmallButton(const char* label); CIMGUI_API bool ig_SmallButton(CONST char* label);
CIMGUI_API bool ig_InvisibleButton(const char* str_id, const struct ImVec2 size); CIMGUI_API bool ig_InvisibleButton(CONST char* str_id, CONST struct ImVec2 size);
CIMGUI_API void ig_Image(ImTextureID user_texture_id, const struct ImVec2 size, const struct ImVec2 uv0, const struct ImVec2 uv1, const struct ImVec4 tint_col, const struct ImVec4 border_col); CIMGUI_API void ig_Image(ImTextureID user_texture_id, CONST struct ImVec2 size, CONST struct ImVec2 uv0, CONST struct ImVec2 uv1, CONST struct ImVec4 tint_col, CONST struct ImVec4 border_col);
CIMGUI_API bool ig_ImageButton(ImTextureID user_texture_id, const struct ImVec2 size, const struct ImVec2 uv0, const struct ImVec2 uv1, int frame_padding, const struct ImVec4 bg_col, const struct ImVec4 tint_col); CIMGUI_API bool ig_ImageButton(ImTextureID user_texture_id, CONST struct ImVec2 size, CONST struct ImVec2 uv0, CONST struct ImVec2 uv1, int frame_padding, CONST struct ImVec4 bg_col, CONST struct ImVec4 tint_col);
CIMGUI_API bool ig_CollapsingHeader(const char* label, const char* str_id, bool display_frame, bool default_open); CIMGUI_API bool ig_CollapsingHeader(CONST char* label, CONST char* str_id, bool display_frame, bool default_open);
CIMGUI_API bool ig_Checkbox(const char* label, bool* v); CIMGUI_API bool ig_Checkbox(CONST char* label, bool* v);
CIMGUI_API bool ig_CheckboxFlags(const char* label, unsigned int* flags, unsigned int flags_value); CIMGUI_API bool ig_CheckboxFlags(CONST char* label, unsigned int* flags, unsigned int flags_value);
CIMGUI_API bool ig_RadioButtonBool(const char* label, bool active); CIMGUI_API bool ig_RadioButtonBool(CONST char* label, bool active);
CIMGUI_API bool ig_RadioButton(const char* label, int* v, int v_button); CIMGUI_API bool ig_RadioButton(CONST char* label, int* v, int v_button);
CIMGUI_API bool ig_Combo(const char* label, int* current_item, const char** items, int items_count, int height_in_items); CIMGUI_API bool ig_Combo(CONST char* label, int* current_item, CONST char** items, int items_count, int height_in_items);
CIMGUI_API bool ig_Combo2(const char* label, int* current_item, const char* items_separated_by_zeros, int height_in_items); CIMGUI_API bool ig_Combo2(CONST char* label, int* current_item, CONST char* items_separated_by_zeros, int height_in_items);
CIMGUI_API bool ig_Combo3(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_Combo3(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_ColorButton(const struct ImVec4 col, bool small_height, bool outline_border); CIMGUI_API bool ig_ColorButton(CONST struct ImVec4 col, bool small_height, bool outline_border);
CIMGUI_API bool ig_ColorEdit3(const char* label, float col[3]); 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 bool ig_ColorEdit4(CONST char* label, float col[4], bool show_alpha);
CIMGUI_API void ig_ColorEditMode(ImGuiColorEditMode mode); 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, size_t 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_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, size_t 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); 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) // Widgets: Sliders (tip: ctrl+click on a slider to input text)
CIMGUI_API bool ig_SliderFloat(const char* label, float* v, float v_min, float v_max, const char* display_format, float power); CIMGUI_API bool ig_SliderFloat(CONST char* label, float* v, float v_min, float v_max, CONST char* display_format, float power);
CIMGUI_API bool ig_SliderFloat2(const char* label, float v[2], float v_min, float v_max, const char* display_format, float power); CIMGUI_API bool ig_SliderFloat2(CONST char* label, float v[2], float v_min, float v_max, CONST char* display_format, float power);
CIMGUI_API bool ig_SliderFloat3(const char* label, float v[3], float v_min, float v_max, const char* display_format, float power); CIMGUI_API bool ig_SliderFloat3(CONST char* label, float v[3], float v_min, float v_max, CONST char* display_format, float power);
CIMGUI_API bool ig_SliderFloat4(const char* label, float v[4], float v_min, float v_max, const char* display_format, float power); CIMGUI_API bool ig_SliderFloat4(CONST char* label, float v[4], float v_min, float v_max, CONST char* display_format, float power);
CIMGUI_API bool ig_SliderAngle(const char* label, float* v_rad, float v_degrees_min, float v_degrees_max); CIMGUI_API bool ig_SliderAngle(CONST char* label, float* v_rad, float v_degrees_min, float v_degrees_max);
CIMGUI_API bool ig_SliderInt(const char* label, int* v, int v_min, int v_max, const char* display_format); CIMGUI_API bool ig_SliderInt(CONST char* label, int* v, int v_min, int v_max, CONST char* display_format);
CIMGUI_API bool ig_SliderInt2(const char* label, int v[2], int v_min, int v_max, const char* display_format); CIMGUI_API bool ig_SliderInt2(CONST char* label, int v[2], int v_min, int v_max, CONST char* display_format);
CIMGUI_API bool ig_SliderInt3(const char* label, int v[3], int v_min, int v_max, const char* display_format); CIMGUI_API bool ig_SliderInt3(CONST char* label, int v[3], int v_min, int v_max, CONST char* display_format);
CIMGUI_API bool ig_SliderInt4(const char* label, int v[4], int v_min, int v_max, const char* display_format); CIMGUI_API bool ig_SliderInt4(CONST char* label, int v[4], int v_min, int v_max, CONST char* display_format);
CIMGUI_API bool ig_VSliderFloat(const char* label, const struct ImVec2 size, float* v, float v_min, float v_max, const char* display_format, float power); CIMGUI_API bool ig_VSliderFloat(CONST char* label, CONST struct ImVec2 size, float* v, float v_min, float v_max, CONST char* display_format, float power);
CIMGUI_API bool ig_VSliderInt(const char* label, const struct ImVec2 size, int* v, int v_min, int v_max, const char* display_format); CIMGUI_API bool ig_VSliderInt(CONST char* label, CONST struct ImVec2 size, int* v, int v_min, int v_max, CONST char* display_format);
// Widgets: Drags (tip: ctrl+click on a drag box to input text) // Widgets: Drags (tip: ctrl+click on a drag box to input text)
CIMGUI_API bool ig_DragFloat(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 ig_DragFloat(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 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_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_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_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_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_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_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_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_DragInt4(CONST char* label, int v[4], float v_speed, int v_min, int v_max, CONST char* display_format);
// Widgets: Input // 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_InputText(CONST char* label, char* buf, size_t buf_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_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); CIMGUI_API bool ig_InputFloat2(CONST char* label, float v[2], int decimal_precision);
CIMGUI_API bool ig_InputFloat3(const char* label, float v[3], int decimal_precision); CIMGUI_API bool ig_InputFloat3(CONST char* label, float v[3], int decimal_precision);
CIMGUI_API bool ig_InputFloat4(const char* label, float v[4], int decimal_precision); CIMGUI_API bool ig_InputFloat4(CONST char* label, float v[4], int decimal_precision);
CIMGUI_API bool ig_InputInt(const char* label, int* v, int step, int step_fast, ImGuiInputTextFlags extra_flags); CIMGUI_API bool ig_InputInt(CONST char* label, int* v, int step, int step_fast, ImGuiInputTextFlags extra_flags);
CIMGUI_API bool ig_InputInt2(const char* label, int v[2]); CIMGUI_API bool ig_InputInt2(CONST char* label, int v[2]);
CIMGUI_API bool ig_InputInt3(const char* label, int v[3]); CIMGUI_API bool ig_InputInt3(CONST char* label, int v[3]);
CIMGUI_API bool ig_InputInt4(const char* label, int v[4]); CIMGUI_API bool ig_InputInt4(CONST char* label, int v[4]);
// Widgets: Trees // Widgets: Trees
CIMGUI_API bool ig_TreeNode(const char* str_label_id); CIMGUI_API bool ig_TreeNode(CONST char* str_label_id);
CIMGUI_API bool ig_TreeNodeStr(const char* str_id, const char* fmt, ...); CIMGUI_API bool ig_TreeNodeStr(CONST char* str_id, CONST char* fmt, ...);
CIMGUI_API bool ig_TreeNodePtr(const void* ptr_id, const char* fmt, ...); CIMGUI_API bool ig_TreeNodePtr(CONST void* ptr_id, CONST char* fmt, ...);
CIMGUI_API bool ig_TreeNodeStrV(const char* str_id, const char* fmt, va_list args); CIMGUI_API bool ig_TreeNodeStrV(CONST char* str_id, CONST char* fmt, va_list args);
CIMGUI_API bool ig_TreeNodePtrV(const void* ptr_id, const char* fmt, va_list args); CIMGUI_API bool ig_TreeNodePtrV(CONST void* ptr_id, CONST char* fmt, va_list args);
CIMGUI_API void ig_TreePushStr(const char* str_id); CIMGUI_API void ig_TreePushStr(CONST char* str_id);
CIMGUI_API void ig_TreePushPtr(const void* ptr_id); CIMGUI_API void ig_TreePushPtr(CONST void* ptr_id);
CIMGUI_API void ig_TreePop(); CIMGUI_API void ig_TreePop();
CIMGUI_API void ig_SetNextTreeNodeOpened(bool opened, ImGuiSetCond cond); CIMGUI_API void ig_SetNextTreeNodeOpened(bool opened, ImGuiSetCond cond);
// Widgets: Selectable / Lists // Widgets: Selectable / Lists
CIMGUI_API bool ig_Selectable(const char* label, bool selected, const struct ImVec2 size); 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_SelectableEx(CONST char* label, bool* p_selected, CONST struct 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_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_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_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 bool ig_ListBoxHeader2(CONST char* label, int items_count, int height_in_items);
CIMGUI_API void ig_ListBoxFooter(); CIMGUI_API void ig_ListBoxFooter();
// Widgets: Value() Helpers. Output single value in "name: value" format (tip: freely declare your own within the ImGui namespace!) // 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_ValueBool(CONST char* prefix, bool b);
CIMGUI_API void ig_ValueInt(const char* prefix, int v); 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_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_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_Color(CONST char* prefix, CONST struct ImVec4 v);
CIMGUI_API void ig_Color2(const char* prefix, unsigned int v); CIMGUI_API void ig_Color2(CONST char* prefix, unsigned int v);
// Logging: all text output from interface is redirected to tty/file/clipboard. Tree nodes are automatically opened. // Logging: all text output from interface is redirected to tty/file/clipboard. Tree nodes are automatically opened.
CIMGUI_API void ig_LogToTTY(int max_depth); CIMGUI_API void ig_LogToTTY(int max_depth);
CIMGUI_API void ig_LogToFile(int max_depth, const char* filename); CIMGUI_API void ig_LogToFile(int max_depth, CONST char* filename);
CIMGUI_API void ig_LogToClipboard(int max_depth); CIMGUI_API void ig_LogToClipboard(int max_depth);
CIMGUI_API void ig_LogFinish(); CIMGUI_API void ig_LogFinish();
CIMGUI_API void ig_LogButtons(); CIMGUI_API void ig_LogButtons();
CIMGUI_API void ig_LogText(const char* fmt, ...); CIMGUI_API void ig_LogText(CONST char* fmt, ...);
// Utilities // Utilities
CIMGUI_API bool ig_IsItemHovered(); CIMGUI_API bool ig_IsItemHovered();
@@ -255,15 +257,15 @@ CIMGUI_API void ig_GetItemRectSize(struct ImVec2* pOut);
CIMGUI_API bool ig_IsWindowFocused(); CIMGUI_API bool ig_IsWindowFocused();
CIMGUI_API bool ig_IsRootWindowFocused(); CIMGUI_API bool ig_IsRootWindowFocused();
CIMGUI_API bool ig_IsRootWindowOrAnyChildFocused(); CIMGUI_API bool ig_IsRootWindowOrAnyChildFocused();
CIMGUI_API bool ig_IsRectClipped(const struct ImVec2 item_size); CIMGUI_API bool ig_IsRectClipped(CONST struct ImVec2 item_size);
CIMGUI_API bool ig_IsKeyPressed(int key_index, bool repeat); CIMGUI_API bool ig_IsKeyPressed(int key_index, bool repeat);
CIMGUI_API bool ig_IsMouseClicked(int button, bool repeat); CIMGUI_API bool ig_IsMouseClicked(int button, bool repeat);
CIMGUI_API bool ig_IsMouseDoubleClicked(int button); CIMGUI_API bool ig_IsMouseDoubleClicked(int button);
CIMGUI_API bool ig_IsMouseHoveringWindow(); CIMGUI_API bool ig_IsMouseHoveringWindow();
CIMGUI_API bool ig_IsMouseHoveringAnyWindow(); CIMGUI_API bool ig_IsMouseHoveringAnyWindow();
CIMGUI_API bool ig_IsMouseHoveringRect(const struct ImVec2 rect_min, const struct ImVec2 rect_max); 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_IsMouseDragging(int button, float lock_threshold);
CIMGUI_API bool ig_IsPosHoveringAnyWindow(const struct ImVec2 pos); CIMGUI_API bool ig_IsPosHoveringAnyWindow(CONST struct ImVec2 pos);
CIMGUI_API void ig_GetMousePos(struct ImVec2* pOut); 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_GetMouseDragDelta(struct ImVec2* pOut, int button, float lock_threshold);
CIMGUI_API void ig_ResetMouseDragDelta(int button); CIMGUI_API void ig_ResetMouseDragDelta(int button);
@@ -271,20 +273,20 @@ CIMGUI_API ImGuiMouseCursor ig_GetMouseCursor();
CIMGUI_API void ig_SetMouseCursor(ImGuiMouseCursor type); CIMGUI_API void ig_SetMouseCursor(ImGuiMouseCursor type);
CIMGUI_API float ig_GetTime(); CIMGUI_API float ig_GetTime();
CIMGUI_API int ig_GetFrameCount(); CIMGUI_API int ig_GetFrameCount();
CIMGUI_API const char* ig_GetStyleColName(ImGuiCol idx); CIMGUI_API CONST char* ig_GetStyleColName(ImGuiCol idx);
CIMGUI_API void ig_CalcItemRectClosestPoint(struct ImVec2* pOut, const struct ImVec2 pos, bool on_edge, float outward); CIMGUI_API void ig_CalcItemRectClosestPoint(struct ImVec2* pOut, CONST struct ImVec2 pos, bool on_edge, float outward);
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_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_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 void ig_BeginChildFrame(ImGuiID id, CONST struct ImVec2 size);
CIMGUI_API void ig_EndChildFrame(); CIMGUI_API void ig_EndChildFrame();
CIMGUI_API ImU32 ig_ColorConvertFloat4ToU32(const struct ImVec4 in); 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_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 void ig_ColorConvertHSVtoRGB(float h, float s, float v, float* out_r, float* out_g, float* out_b);
// Internal state access - if you want to share ImGui state between modules (e.g. DLL) or allocate it yourself // 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 CONST char* ig_GetVersion();
CIMGUI_API void* ig_GetInternalState(); CIMGUI_API void* ig_GetInternalState();
CIMGUI_API size_t ig_GetInternalStateSize(); CIMGUI_API size_t ig_GetInternalStateSize();
CIMGUI_API void ig_SetInternalState(void* state, bool construct); CIMGUI_API void ig_SetInternalState(void* state, bool construct);
@@ -293,8 +295,8 @@ CIMGUI_API void ImFontAtlas_GetTexDataAsRGBA32(ImFontAtlas* atlas, unsigned c
CIMGUI_API void ImFontAtlas_GetTexDataAsAlpha8(ImFontAtlas* atlas, unsigned char** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel); CIMGUI_API void ImFontAtlas_GetTexDataAsAlpha8(ImFontAtlas* atlas, unsigned char** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel);
CIMGUI_API void ImFontAtlas_SetTexID(ImFontAtlas* atlas, void* tex); CIMGUI_API void ImFontAtlas_SetTexID(ImFontAtlas* atlas, void* tex);
CIMGUI_API ImFont* ImFontAtlas_AddFontDefault(ImFontAtlas* atlas); CIMGUI_API ImFont* ImFontAtlas_AddFontDefault(ImFontAtlas* atlas);
CIMGUI_API ImFont* ImFontAtlas_AddFontFromFileTTF(ImFontAtlas* atlas, const char* filename, float size_pixels, const ImWchar* glyph_ranges, int font_no); CIMGUI_API ImFont* ImFontAtlas_AddFontFromFileTTF(ImFontAtlas* atlas, CONST char* filename, float size_pixels, CONST ImWchar* glyph_ranges, int font_no);
CIMGUI_API ImFont* ImFontAtlas_AddFontFromMemoryTTF(ImFontAtlas* atlas, void* in_ttf_data, unsigned int in_ttf_data_size, float size_pixels, const ImWchar* glyph_ranges, int font_no); CIMGUI_API ImFont* ImFontAtlas_AddFontFromMemoryTTF(ImFontAtlas* atlas, void* in_ttf_data, unsigned int in_ttf_data_size, float size_pixels, CONST ImWchar* glyph_ranges, int font_no);
CIMGUI_API ImFont* ImFontAtlas_AddFontFromMemoryCompressedTTF(ImFontAtlas* atlas, const void* in_compressed_ttf_data, unsigned int in_compressed_ttf_data_size, float size_pixels, const ImWchar* glyph_ranges = NULL, int font_no = 0); CIMGUI_API ImFont* ImFontAtlas_AddFontFromMemoryCompressedTTF(ImFontAtlas* atlas, CONST void* in_compressed_ttf_data, unsigned int in_compressed_ttf_data_size, float size_pixels, CONST ImWchar* glyph_ranges = NULL, int font_no = 0);
CIMGUI_API void ImFontAtlas_ClearTexData(ImFontAtlas* atlas); CIMGUI_API void ImFontAtlas_ClearTexData(ImFontAtlas* atlas);
CIMGUI_API void ImFontAtlas_Clear(ImFontAtlas* atlas); CIMGUI_API void ImFontAtlas_Clear(ImFontAtlas* atlas);