Compare commits

...

12 Commits
v1.45 ... v1.48

Author SHA1 Message Date
Stephan Dilly
106686a212 update to imgui v1.48 2016-04-10 11:53:30 +02:00
Stephan Dilly
4d7868529d Update README.md 2016-02-09 09:02:25 +01:00
Stephan Dilly
d358ce52f2 Update README.md 2015-12-26 15:32:24 +01:00
Stephan Dilly
a5b4dc8ba9 fix #11 2015-12-26 15:21:59 +01:00
Stephan Dilly
2de7e50511 update to imgui 1.47 2015-12-26 14:44:18 +01:00
Stephan Dilly
8642306672 Merge pull request #10 from MrSmith33/master
Add ImDrawList functions. Fix spacing.
2015-11-22 13:01:58 +01:00
Andrey Penechko
26892981b9 Add ImDrawList functions. Fix spacing. 2015-11-17 20:58:37 +02:00
Stephan Dilly
af11bb9aa2 Update README.md 2015-11-16 09:22:17 +01:00
Stephan Dilly
b936bb3369 add missing methods from a previous release 2015-10-19 13:04:19 +02:00
Stephan Dilly
713d9f587c update to imgui 1.46 2015-10-19 13:01:52 +02:00
Stephan Dilly
59218e28d0 update visual studio project (VS2015) and imgui to version where version number is correctly set 2015-09-07 15:28:06 +02:00
Stephan Dilly
32b310e31f Update README.md 2015-09-07 01:49:39 +02:00
7 changed files with 664 additions and 293 deletions

2
.gitignore vendored
View File

@@ -33,3 +33,5 @@ cimgui/cimgui.v12.suo
cimgui/Release/
.idea
CMakeLists.txt
cimgui/.vs/
cimgui/cimgui.vcxproj.user

View File

@@ -1,14 +1,13 @@
# cimgui [![Build Status](https://travis-ci.org/Extrawurst/cimgui.svg)](https://travis-ci.org/Extrawurst/cimgui)
![sample](https://raw.github.com/extrawurst/cimgui/master/Screen Shot 2015-04-09.png)
![new menus api](https://raw.github.com/extrawurst/cimgui/master/menus-api.gif)
This is a thin c-api wrapper for the excellent C++ intermediate gui [imgui](https://github.com/ocornut/imgui).
Most of the functions have wrapper counterparts now, missing stuff is added on a as-needed basis (PR welcome).
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.44 of imgui](https://github.com/ocornut/imgui/releases/tag/v1.44)
* currently this wrapper is based on version [1.47 of imgui](https://github.com/ocornut/imgui/releases/tag/v1.47)
* 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

File diff suppressed because it is too large Load Diff

View File

@@ -25,6 +25,7 @@ typedef int ImGuiColorEditMode;
CIMGUI_API ImGuiIO* igGetIO();
CIMGUI_API ImGuiStyle* igGetStyle();
CIMGUI_API ImDrawData* igGetDrawData();
CIMGUI_API void igNewFrame();
CIMGUI_API void igRender();
CIMGUI_API void igShutdown();
@@ -42,19 +43,17 @@ CIMGUI_API bool igBeginChildEx(ImGuiID id, CONST struct ImVec2 size,
CIMGUI_API void igEndChild();
CIMGUI_API void igGetContentRegionMax(struct ImVec2* out);
CIMGUI_API void igGetContentRegionAvail(struct ImVec2* out);
CIMGUI_API float igGetContentRegionAvailWidth(); //
CIMGUI_API float igGetContentRegionAvailWidth();
CIMGUI_API void igGetWindowContentRegionMin(struct ImVec2* out);
CIMGUI_API void igGetWindowContentRegionMax(struct ImVec2* out);
CIMGUI_API float igGetWindowContentRegionWidth(); //
CIMGUI_API float igGetWindowContentRegionWidth();
CIMGUI_API ImDrawList* igGetWindowDrawList();
CIMGUI_API ImFont* igGetWindowFont();
CIMGUI_API float igGetWindowFontSize();
CIMGUI_API void igSetWindowFontScale(float scale);
CIMGUI_API void igGetWindowPos(struct ImVec2* out);
CIMGUI_API void igGetWindowSize(struct ImVec2* out);
CIMGUI_API float igGetWindowWidth();
CIMGUI_API float igGetWindowHeight();
CIMGUI_API bool igIsWindowCollapsed();
CIMGUI_API void igSetWindowFontScale(float scale);
CIMGUI_API void igSetNextWindowPos(CONST struct ImVec2 pos, ImGuiSetCond cond);
CIMGUI_API void igSetNextWindowPosCenter(ImGuiSetCond cond);
@@ -92,15 +91,21 @@ CIMGUI_API void igPopStyleColor(int count);
CIMGUI_API void igPushStyleVar(ImGuiStyleVar idx, float val);
CIMGUI_API void igPushStyleVarVec(ImGuiStyleVar idx, CONST struct ImVec2 val);
CIMGUI_API void igPopStyleVar(int count);
CIMGUI_API ImFont* igGetFont();
CIMGUI_API float igGetFontSize();
CIMGUI_API void igGetFontTexUvWhitePixel(ImVec2* pOut);
CIMGUI_API ImU32 igGetColorU32(ImGuiCol idx, float alpha_mul);
CIMGUI_API ImU32 igGetColorU32Vec(CONST ImVec4* col);
// Parameters stacks (current window)
CIMGUI_API void igPushItemWidth(float item_width);
CIMGUI_API void igPopItemWidth();
CIMGUI_API float igCalcItemWidth();
CIMGUI_API void igPushAllowKeyboardFocus(bool v);
CIMGUI_API void igPopAllowKeyboardFocus();
CIMGUI_API void igPushTextWrapPos(float wrap_pos_x);
CIMGUI_API void igPopTextWrapPos();
CIMGUI_API void igPushAllowKeyboardFocus(bool v);
CIMGUI_API void igPopAllowKeyboardFocus();
CIMGUI_API void igPushButtonRepeat(bool repeat);
CIMGUI_API void igPopButtonRepeat();
@@ -108,18 +113,11 @@ CIMGUI_API void igPopButtonRepeat();
CIMGUI_API void igBeginGroup();
CIMGUI_API void igEndGroup();
CIMGUI_API void igSeparator();
CIMGUI_API void igSameLine(float local_pos_x, float spacing_w);
CIMGUI_API void igSameLine(float pos_x, float spacing_w);
CIMGUI_API void igSpacing();
CIMGUI_API void igDummy(CONST ImVec2* size);
CIMGUI_API void igIndent();
CIMGUI_API void igUnindent();
CIMGUI_API void igColumns(int count, CONST char* id, bool border);
CIMGUI_API void igNextColumn();
CIMGUI_API int igGetColumnIndex();
CIMGUI_API float igGetColumnOffset(int column_index);
CIMGUI_API void igSetColumnOffset(int column_index, float offset_x);
CIMGUI_API float igGetColumnWidth(int column_index);
CIMGUI_API int igGetColumnsCount();
CIMGUI_API void igGetCursorPos(struct ImVec2* pOut);
CIMGUI_API float igGetCursorPosX();
CIMGUI_API float igGetCursorPosY();
@@ -134,6 +132,15 @@ CIMGUI_API float igGetTextLineHeight();
CIMGUI_API float igGetTextLineHeightWithSpacing();
CIMGUI_API float igGetItemsLineHeightWithSpacing();
//Columns
CIMGUI_API void igColumns(int count, CONST char* id, bool border);
CIMGUI_API void igNextColumn();
CIMGUI_API int igGetColumnIndex();
CIMGUI_API float igGetColumnOffset(int column_index);
CIMGUI_API void igSetColumnOffset(int column_index, float offset_x);
CIMGUI_API float igGetColumnWidth(int column_index);
CIMGUI_API int igGetColumnsCount();
// ID scopes
// If you are creating widgets in a loop you most likely want to push a unique identifier so ImGui can differentiate them
// You can also use "##extra" within your widget name to distinguish them from each others (see 'Programmer Guide')
@@ -182,6 +189,8 @@ CIMGUI_API void igPlotLines(CONST char* label, CONST float* values,
CIMGUI_API void igPlotLines2(CONST char* label, float(*values_getter)(void* data, int idx), void* data, int values_count, int values_offset, CONST char* overlay_text, float scale_min, float scale_max, struct ImVec2 graph_size);
CIMGUI_API void igPlotHistogram(CONST char* label, CONST float* values, int values_count, int values_offset, CONST char* overlay_text, float scale_min, float scale_max, struct ImVec2 graph_size, int stride);
CIMGUI_API void igPlotHistogram2(CONST char* label, float(*values_getter)(void* data, int idx), void* data, int values_count, int values_offset, CONST char* overlay_text, float scale_min, float scale_max, struct ImVec2 graph_size);
CIMGUI_API void igProgressBar(float fraction, CONST ImVec2* size_arg, const char* overlay);
// Widgets: Sliders (tip: ctrl+click on a slider to input text)
CIMGUI_API bool igSliderFloat(CONST char* label, float* v, float v_min, float v_max, CONST char* display_format, float power);
@@ -201,12 +210,12 @@ CIMGUI_API bool igDragFloat(CONST char* label, float* v, float v_spe
CIMGUI_API bool igDragFloat2(CONST char* label, float v[2], float v_speed, float v_min, float v_max, CONST char* display_format, float power);
CIMGUI_API bool igDragFloat3(CONST char* label, float v[3], float v_speed, float v_min, float v_max, CONST char* display_format, float power);
CIMGUI_API bool igDragFloat4(CONST char* label, float v[4], float v_speed, float v_min, float v_max, CONST char* display_format, float power);
CIMGUI_API bool igDragFloatRange2(const char* label, float* v_current_min, float* v_current_max, float v_speed = 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 igDragFloatRange2(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 igDragInt(CONST char* label, int* v, float v_speed, int v_min, int v_max, CONST char* display_format); // If v_max >= v_max we have no bound
CIMGUI_API bool igDragInt2(CONST char* label, int v[2], float v_speed, int v_min, int v_max, CONST char* display_format);
CIMGUI_API bool igDragInt3(CONST char* label, int v[3], float v_speed, int v_min, int v_max, CONST char* display_format);
CIMGUI_API bool igDragInt4(CONST char* label, int v[4], float v_speed, int v_min, int v_max, CONST char* display_format);
CIMGUI_API bool igDragIntRange2(const char* label, int* v_current_min, int* v_current_max, float v_speed = 1.0f, int v_min = 0, int v_max = 0, const char* display_format = "%.0f", const char* display_format_max = NULL);
CIMGUI_API bool igDragIntRange2(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
@@ -246,8 +255,8 @@ CIMGUI_API void igValueBool(CONST char* prefix, bool b);
CIMGUI_API void igValueInt(CONST char* prefix, int v);
CIMGUI_API void igValueUInt(CONST char* prefix, unsigned int v);
CIMGUI_API void igValueFloat(CONST char* prefix, float v, CONST char* float_format);
CIMGUI_API void igColor(CONST char* prefix, CONST struct ImVec4 v);
CIMGUI_API void igColor2(CONST char* prefix, unsigned int v);
CIMGUI_API void igValueColor(CONST char* prefix, CONST struct ImVec4 v);
CIMGUI_API void igValueColor2(CONST char* prefix, unsigned int v);
// Tooltip
CIMGUI_API void igSetTooltip(CONST char* fmt, ...);
@@ -293,6 +302,7 @@ CIMGUI_API bool igIsAnyItemActive();
CIMGUI_API void igGetItemRectMin(struct ImVec2* pOut);
CIMGUI_API void igGetItemRectMax(struct ImVec2* pOut);
CIMGUI_API void igGetItemRectSize(struct ImVec2* pOut);
CIMGUI_API void igSetItemAllowOverlap();
CIMGUI_API bool igIsWindowHovered();
CIMGUI_API bool igIsWindowFocused();
CIMGUI_API bool igIsRootWindowFocused();
@@ -306,7 +316,7 @@ CIMGUI_API void igCalcItemRectClosestPoint(struct ImVec2* pOut, CONS
CIMGUI_API void igCalcTextSize(struct ImVec2* pOut, CONST char* text, CONST char* text_end, bool hide_text_after_double_hash, float wrap_width);
CIMGUI_API void igCalcListClipping(int items_count, float items_height, int* out_items_display_start, int* out_items_display_end);
CIMGUI_API bool igBeginChildFrame(ImGuiID id, CONST struct ImVec2 size);
CIMGUI_API bool igBeginChildFrame(ImGuiID id, CONST struct ImVec2 size, ImGuiWindowFlags extra_flags);
CIMGUI_API void igEndChildFrame();
CIMGUI_API void igColorConvertU32ToFloat4(ImVec4* pOut, ImU32 in);
@@ -314,6 +324,7 @@ CIMGUI_API ImU32 igColorConvertFloat4ToU32(CONST struct ImVec4 in);
CIMGUI_API void igColorConvertRGBtoHSV(float r, float g, float b, float* out_h, float* out_s, float* out_v);
CIMGUI_API void igColorConvertHSVtoRGB(float h, float s, float v, float* out_r, float* out_g, float* out_b);
CIMGUI_API int igGetKeyIndex(ImGuiKey key);
CIMGUI_API bool igIsKeyDown(int key_index);
CIMGUI_API bool igIsKeyPressed(int key_index, bool repeat);
CIMGUI_API bool igIsKeyReleased(int key_index);
@@ -323,7 +334,7 @@ CIMGUI_API bool igIsMouseDoubleClicked(int button);
CIMGUI_API bool igIsMouseReleased(int button);
CIMGUI_API bool igIsMouseHoveringWindow();
CIMGUI_API bool igIsMouseHoveringAnyWindow();
CIMGUI_API bool igIsMouseHoveringRect(CONST struct ImVec2 pos_min, CONST struct ImVec2 pos_max);
CIMGUI_API bool igIsMouseHoveringRect(CONST struct ImVec2 r_min, CONST struct ImVec2 r_max, bool clip);
CIMGUI_API bool igIsMouseDragging(int button, float lock_threshold);
CIMGUI_API void igGetMousePos(struct ImVec2* pOut);
CIMGUI_API void igGetMousePosOnOpeningCurrentPopup(ImVec2* pOut);
@@ -331,6 +342,14 @@ CIMGUI_API void igGetMouseDragDelta(struct ImVec2* pOut, int button,
CIMGUI_API void igResetMouseDragDelta(int button);
CIMGUI_API ImGuiMouseCursor igGetMouseCursor();
CIMGUI_API void igSetMouseCursor(ImGuiMouseCursor type);
CIMGUI_API void igCaptureKeyboardFromApp(bool capture);
CIMGUI_API void igCaptureMouseFromApp(bool capture);
// Helpers functions to access functions pointers in ImGui::GetIO()
CIMGUI_API void* igMemAlloc(size_t sz);
CIMGUI_API void igMemFree(void* ptr);
CIMGUI_API CONST char* igGetClipboardText();
CIMGUI_API void igSetClipboardText(CONST char* text);
// Internal state access - if you want to share ImGui state between modules (e.g. DLL) or allocate it yourself
CIMGUI_API CONST char* igGetVersion();
@@ -352,11 +371,70 @@ CIMGUI_API void ImFontAtlas_Clear(ImFontAtlas* atlas);
CIMGUI_API void ImGuiIO_AddInputCharacter(unsigned short c);
CIMGUI_API void ImGuiIO_AddInputCharactersUTF8(CONST char* utf8_chars);
CIMGUI_API void ImGuiIO_ClearInputCharacters();
//ImDrawData
CIMGUI_API void ImDrawData_DeIndexAllBuffers(ImDrawData* drawData);
//ImDrawList
CIMGUI_API int ImDrawList_GetVertexBufferSize(ImDrawList* list);
CIMGUI_API ImDrawVert* ImDrawList_GetVertexPtr(ImDrawList* list, int n);
CIMGUI_API int ImDrawList_GetIndexBufferSize(ImDrawList* list);
CIMGUI_API ImDrawIdx* ImDrawList_GetIndexPtr(ImDrawList* list, int n);
CIMGUI_API int ImDrawList_GetCmdSize(ImDrawList* list);
CIMGUI_API ImDrawCmd* ImDrawList_GetCmdPtr(ImDrawList* list, int n);
CIMGUI_API void ImDrawData_DeIndexAllBuffers(ImDrawData* drawData);
CIMGUI_API void ImDrawList_Clear(ImDrawList* list);
CIMGUI_API void ImDrawList_ClearFreeMemory(ImDrawList* list);
CIMGUI_API void ImDrawList_PushClipRect(ImDrawList* list, CONST struct ImVec4 clip_rect); // Scissoring. The values are x1, y1, x2, y2.
CIMGUI_API void ImDrawList_PushClipRectFullScreen(ImDrawList* list);
CIMGUI_API void ImDrawList_PopClipRect(ImDrawList* list);
CIMGUI_API void ImDrawList_PushTextureID(ImDrawList* list, CONST ImTextureID texture_id);
CIMGUI_API void ImDrawList_PopTextureID(ImDrawList* list);
// Primitives
CIMGUI_API void ImDrawList_AddLine(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, ImU32 col, float thickness);
CIMGUI_API void ImDrawList_AddRect(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, ImU32 col, float rounding, int rounding_corners, float thickness);
CIMGUI_API void ImDrawList_AddRectFilled(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, ImU32 col, float rounding, int rounding_corners);
CIMGUI_API void ImDrawList_AddRectFilledMultiColor(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, ImU32 col_upr_left, ImU32 col_upr_right, ImU32 col_bot_right, ImU32 col_bot_left);
CIMGUI_API void ImDrawList_AddTriangle(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, CONST struct ImVec2 c, ImU32 col, float thickness);
CIMGUI_API void ImDrawList_AddTriangleFilled(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, CONST struct ImVec2 c, ImU32 col);
CIMGUI_API void ImDrawList_AddCircle(ImDrawList* list, CONST struct ImVec2 centre, float radius, ImU32 col, int num_segments, float thickness);
CIMGUI_API void ImDrawList_AddCircleFilled(ImDrawList* list, CONST struct ImVec2 centre, float radius, ImU32 col, int num_segments);
CIMGUI_API void ImDrawList_AddText(ImDrawList* list, CONST struct ImVec2 pos, ImU32 col, CONST char* text_begin, CONST char* text_end);
CIMGUI_API void ImDrawList_AddTextExt(ImDrawList* list, CONST ImFont* font, float font_size, CONST struct ImVec2 pos, ImU32 col, CONST char* text_begin, CONST char* text_end, float wrap_width, CONST ImVec4* cpu_fine_clip_rect);
CIMGUI_API void ImDrawList_AddImage(ImDrawList* list, ImTextureID user_texture_id, CONST struct ImVec2 a, CONST struct ImVec2 b, CONST struct ImVec2 uv0, CONST struct ImVec2 uv1, ImU32 col);
CIMGUI_API void ImDrawList_AddPolyline(ImDrawList* list, CONST ImVec2* points, CONST int num_points, ImU32 col, bool closed, float thickness, bool anti_aliased);
CIMGUI_API void ImDrawList_AddConvexPolyFilled(ImDrawList* list, CONST ImVec2* points, CONST int num_points, ImU32 col, bool anti_aliased);
CIMGUI_API void ImDrawList_AddBezierCurve(ImDrawList* list, CONST struct ImVec2 pos0, CONST struct ImVec2 cp0, CONST struct ImVec2 cp1, CONST struct ImVec2 pos1, ImU32 col, float thickness, int num_segments);
// Stateful path API, add points then finish with PathFill() or PathStroke()
CIMGUI_API void ImDrawList_PathClear(ImDrawList* list);
CIMGUI_API void ImDrawList_PathLineTo(ImDrawList* list, CONST struct ImVec2 pos);
CIMGUI_API void ImDrawList_PathLineToMergeDuplicate(ImDrawList* list, CONST struct ImVec2 pos);
CIMGUI_API void ImDrawList_PathFill(ImDrawList* list, ImU32 col);
CIMGUI_API void ImDrawList_PathStroke(ImDrawList* list, ImU32 col, bool closed, float thickness);
CIMGUI_API void ImDrawList_PathArcTo(ImDrawList* list, CONST struct ImVec2 centre, float radius, float a_min, float a_max, int num_segments);
CIMGUI_API void ImDrawList_PathArcToFast(ImDrawList* list, CONST struct ImVec2 centre, float radius, int a_min_of_12, int a_max_of_12); // Use precomputed angles for a 12 steps circle
CIMGUI_API void ImDrawList_PathBezierCurveTo(ImDrawList* list, CONST struct ImVec2 p1, CONST struct ImVec2 p2, CONST struct ImVec2 p3, int num_segments);
CIMGUI_API void ImDrawList_PathRect(ImDrawList* list, CONST struct ImVec2 rect_min, CONST struct ImVec2 rect_max, float rounding, int rounding_corners);
// Channels
CIMGUI_API void ImDrawList_ChannelsSplit(ImDrawList* list, int channels_count);
CIMGUI_API void ImDrawList_ChannelsMerge(ImDrawList* list);
CIMGUI_API void ImDrawList_ChannelsSetCurrent(ImDrawList* list, int channel_index);
// Advanced
CIMGUI_API void ImDrawList_AddCallback(ImDrawList* list, ImDrawCallback callback, void* callback_data); // Your rendering function must check for 'UserCallback' in ImDrawCmd and call the function instead of rendering triangles.
CIMGUI_API void ImDrawList_AddDrawCmd(ImDrawList* list); // This is useful if you need to forcefully create a new draw call (to allow for dependent rendering / blending). Otherwise primitives are merged into the same draw-call as much as possible
// Internal helpers
CIMGUI_API void ImDrawList_PrimReserve(ImDrawList* list, int idx_count, int vtx_count);
CIMGUI_API void ImDrawList_PrimRect(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, ImU32 col);
CIMGUI_API void ImDrawList_PrimRectUV(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, CONST struct ImVec2 uv_a, CONST struct ImVec2 uv_b, ImU32 col);
CIMGUI_API void ImDrawList_PrimQuadUV(ImDrawList* list,CONST struct ImVec2 a, CONST struct ImVec2 b, CONST struct ImVec2 c, CONST struct ImVec2 d, CONST struct ImVec2 uv_a, CONST struct ImVec2 uv_b, CONST struct ImVec2 uv_c, CONST struct ImVec2 uv_d, ImU32 col);
CIMGUI_API void ImDrawList_PrimVtx(ImDrawList* list, CONST struct ImVec2 pos, CONST struct ImVec2 uv, ImU32 col);
CIMGUI_API void ImDrawList_PrimWriteVtx(ImDrawList* list, CONST struct ImVec2 pos, CONST struct ImVec2 uv, ImU32 col);
CIMGUI_API void ImDrawList_PrimWriteIdx(ImDrawList* list, ImDrawIdx idx);
CIMGUI_API void ImDrawList_UpdateClipRect(ImDrawList* list);
CIMGUI_API void ImDrawList_UpdateTextureID(ImDrawList* list);

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -19,13 +19,13 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<PlatformToolset>v140</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>

View File

@@ -12,12 +12,12 @@ CIMGUI_API ImDrawVert* ImDrawList_GetVertexPtr(ImDrawList* list, int n)
return &list->VtxBuffer[n];
}
CIMGUI_API int ImDrawList_GetIndexBufferSize(ImDrawList* list)
CIMGUI_API int ImDrawList_GetIndexBufferSize(ImDrawList* list)
{
return list->IdxBuffer.size();
}
CIMGUI_API ImDrawIdx* ImDrawList_GetIndexPtr(ImDrawList* list, int n)
CIMGUI_API ImDrawIdx* ImDrawList_GetIndexPtr(ImDrawList* list, int n)
{
return &list->IdxBuffer[n];
}
@@ -35,4 +35,224 @@ CIMGUI_API ImDrawCmd* ImDrawList_GetCmdPtr(ImDrawList* list, int n)
CIMGUI_API void ImDrawData_DeIndexAllBuffers(ImDrawData* drawData)
{
return drawData->DeIndexAllBuffers();
}
}
CIMGUI_API void ImDrawList_Clear(ImDrawList* list)
{
return list->Clear();
}
CIMGUI_API void ImDrawList_ClearFreeMemory(ImDrawList* list)
{
return list->ClearFreeMemory();
}
CIMGUI_API void ImDrawList_PushClipRect(ImDrawList* list, CONST struct ImVec4 clip_rect)
{
return list->PushClipRect(clip_rect);
}
CIMGUI_API void ImDrawList_PushClipRectFullScreen(ImDrawList* list)
{
return list->PushClipRectFullScreen();
}
CIMGUI_API void ImDrawList_PopClipRect(ImDrawList* list)
{
return list->PopClipRect();
}
CIMGUI_API void ImDrawList_PushTextureID(ImDrawList* list, CONST ImTextureID texture_id)
{
return list->PushTextureID(texture_id);
}
CIMGUI_API void ImDrawList_PopTextureID(ImDrawList* list)
{
return list->PopTextureID();
}
CIMGUI_API void ImDrawList_AddLine(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, ImU32 col, float thickness)
{
return list->AddLine(a, b, col, thickness);
}
CIMGUI_API void ImDrawList_AddRect(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, ImU32 col, float rounding, int rounding_corners, float thickness)
{
return list->AddRect(a, b, col, rounding, rounding_corners, thickness);
}
CIMGUI_API void ImDrawList_AddRectFilled(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, ImU32 col, float rounding, int rounding_corners)
{
return list->AddRectFilled(a, b, col, rounding, rounding_corners);
}
CIMGUI_API void ImDrawList_AddRectFilledMultiColor(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, ImU32 col_upr_left, ImU32 col_upr_right, ImU32 col_bot_right, ImU32 col_bot_left)
{
return list->AddRectFilledMultiColor(a, b, col_upr_left, col_upr_right, col_bot_right, col_bot_left);
}
CIMGUI_API void ImDrawList_AddTriangle(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, CONST struct ImVec2 c, ImU32 col, float thickness)
{
return list->AddTriangle(a,b,c,col,thickness);
}
CIMGUI_API void ImDrawList_AddTriangleFilled(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, CONST struct ImVec2 c, ImU32 col)
{
return list->AddTriangleFilled(a, b, c, col);
}
CIMGUI_API void ImDrawList_AddCircle(ImDrawList* list, CONST struct ImVec2 centre, float radius, ImU32 col, int num_segments, float thickness)
{
return list->AddCircle(centre, radius, col, num_segments, thickness);
}
CIMGUI_API void ImDrawList_AddCircleFilled(ImDrawList* list, CONST struct ImVec2 centre, float radius, ImU32 col, int num_segments)
{
return list->AddCircleFilled(centre, radius, col, num_segments);
}
CIMGUI_API void ImDrawList_AddText(ImDrawList* list, CONST struct ImVec2 pos, ImU32 col, CONST char* text_begin, CONST char* text_end)
{
return list->AddText(pos, col, text_begin, text_end);
}
CIMGUI_API void ImDrawList_AddTextExt(ImDrawList* list, CONST ImFont* font, float font_size, CONST struct ImVec2 pos, ImU32 col, CONST char* text_begin, CONST char* text_end, float wrap_width, CONST ImVec4* cpu_fine_clip_rect)
{
return list->AddText(font, font_size, pos, col, text_begin, text_end, wrap_width, cpu_fine_clip_rect);
}
CIMGUI_API void ImDrawList_AddImage(ImDrawList* list, ImTextureID user_texture_id, CONST struct ImVec2 a, CONST struct ImVec2 b, CONST struct ImVec2 uv0, CONST struct ImVec2 uv1, ImU32 col)
{
return list->AddImage(user_texture_id, a, b, uv0, uv1, col);
}
CIMGUI_API void ImDrawList_AddPolyline(ImDrawList* list, CONST ImVec2* points, CONST int num_points, ImU32 col, bool closed, float thickness, bool anti_aliased)
{
return list->AddPolyline(points, num_points, col, closed, thickness, anti_aliased);
}
CIMGUI_API void ImDrawList_AddConvexPolyFilled(ImDrawList* list, CONST ImVec2* points, CONST int num_points, ImU32 col, bool anti_aliased)
{
return list->AddConvexPolyFilled(points, num_points, col, anti_aliased);
}
CIMGUI_API void ImDrawList_AddBezierCurve(ImDrawList* list, CONST struct ImVec2 pos0, CONST struct ImVec2 cp0, CONST struct ImVec2 cp1, CONST struct ImVec2 pos1, ImU32 col, float thickness, int num_segments)
{
return list->AddBezierCurve(pos0, cp0, cp1, pos1, col, thickness, num_segments);
}
CIMGUI_API void ImDrawList_PathClear(ImDrawList* list)
{
return list->PathClear();
}
CIMGUI_API void ImDrawList_PathLineTo(ImDrawList* list, CONST struct ImVec2 pos)
{
return list->PathLineTo(pos);
}
CIMGUI_API void ImDrawList_PathLineToMergeDuplicate(ImDrawList* list, CONST struct ImVec2 pos)
{
return list->PathLineToMergeDuplicate(pos);
}
CIMGUI_API void ImDrawList_PathFill(ImDrawList* list, ImU32 col)
{
return list->PathFill(col);
}
CIMGUI_API void ImDrawList_PathStroke(ImDrawList* list, ImU32 col, bool closed, float thickness)
{
return list->PathStroke(col, closed, thickness);
}
CIMGUI_API void ImDrawList_PathArcTo(ImDrawList* list, CONST struct ImVec2 centre, float radius, float a_min, float a_max, int num_segments)
{
return list->PathArcTo(centre, radius, a_min, a_max, num_segments);
}
CIMGUI_API void ImDrawList_PathArcToFast(ImDrawList* list, CONST struct ImVec2 centre, float radius, int a_min_of_12, int a_max_of_12)
{
return list->PathArcToFast(centre, radius, a_min_of_12, a_max_of_12);
}
CIMGUI_API void ImDrawList_PathBezierCurveTo(ImDrawList* list, CONST struct ImVec2 p1, CONST struct ImVec2 p2, CONST struct ImVec2 p3, int num_segments)
{
return list->PathBezierCurveTo(p1, p2, p3, num_segments);
}
CIMGUI_API void ImDrawList_PathRect(ImDrawList* list, CONST struct ImVec2 rect_min, CONST struct ImVec2 rect_max, float rounding, int rounding_corners)
{
return list->PathRect(rect_min, rect_max, rounding, rounding_corners);
}
CIMGUI_API void ImDrawList_ChannelsSplit(ImDrawList* list, int channels_count)
{
return list->ChannelsSplit(channels_count);
}
CIMGUI_API void ImDrawList_ChannelsMerge(ImDrawList* list)
{
return list->ChannelsMerge();
}
CIMGUI_API void ImDrawList_ChannelsSetCurrent(ImDrawList* list, int channel_index)
{
return list->ChannelsSetCurrent(channel_index);
}
CIMGUI_API void ImDrawList_AddCallback(ImDrawList* list, ImDrawCallback callback, void* callback_data)
{
return list->AddCallback(callback, callback_data);
}
CIMGUI_API void ImDrawList_AddDrawCmd(ImDrawList* list)
{
return list->AddDrawCmd();
}
CIMGUI_API void ImDrawList_PrimReserve(ImDrawList* list, int idx_count, int vtx_count)
{
return list->PrimReserve(idx_count, vtx_count);
}
CIMGUI_API void ImDrawList_PrimRect(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, ImU32 col)
{
return list->PrimRect(a, b, col);
}
CIMGUI_API void ImDrawList_PrimRectUV(ImDrawList* list, CONST struct ImVec2 a, CONST struct ImVec2 b, CONST struct ImVec2 uv_a, CONST struct ImVec2 uv_b, ImU32 col)
{
return list->PrimRectUV(a, b, uv_a, uv_b, col);
}
CIMGUI_API void ImDrawList_PrimQuadUV(ImDrawList* list,CONST struct ImVec2 a, CONST struct ImVec2 b, CONST struct ImVec2 c, CONST struct ImVec2 d, CONST struct ImVec2 uv_a, CONST struct ImVec2 uv_b, CONST struct ImVec2 uv_c, CONST struct ImVec2 uv_d, ImU32 col)
{
return list->PrimQuadUV(a,b,c,d,uv_a,uv_b,uv_c,uv_d,col);
}
CIMGUI_API void ImDrawList_PrimVtx(ImDrawList* list, CONST struct ImVec2 pos, CONST struct ImVec2 uv, ImU32 col)
{
return list->PrimVtx(pos, uv, col);
}
CIMGUI_API void ImDrawList_PrimWriteVtx(ImDrawList* list, CONST struct ImVec2 pos, CONST struct ImVec2 uv, ImU32 col)
{
return list->PrimWriteVtx(pos, uv, col);
}
CIMGUI_API void ImDrawList_PrimWriteIdx(ImDrawList* list, ImDrawIdx idx)
{
return list->PrimWriteIdx(idx);
}
CIMGUI_API void ImDrawList_UpdateClipRect(ImDrawList* list)
{
return list->UpdateClipRect();
}
CIMGUI_API void ImDrawList_UpdateTextureID(ImDrawList* list)
{
return list->UpdateTextureID();
}

2
imgui

Submodule imgui updated: 77bcb7152b...95cbcdca3f