mirror of
https://github.com/cimgui/cimgui.git
synced 2025-08-10 20:08:31 +01:00
Compare commits
54 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
3f0014b569 | ||
![]() |
49d62d30cf | ||
![]() |
2ea2b91ee1 | ||
![]() |
e75eaa7239 | ||
![]() |
fa1b93bea9 | ||
![]() |
511218914b | ||
![]() |
f60eb9a510 | ||
![]() |
9e52e73e9b | ||
![]() |
6a31578c1e | ||
![]() |
50bce34b67 | ||
![]() |
14b2c5cc58 | ||
![]() |
f12e74c20f | ||
![]() |
01578cb1bd | ||
![]() |
33679d6957 | ||
![]() |
b9cd7f2d83 | ||
![]() |
1df319b232 | ||
![]() |
516547dcd9 | ||
![]() |
dbbac62a84 | ||
![]() |
389c1f1ad1 | ||
![]() |
76001ce58c | ||
![]() |
38c89cf203 | ||
![]() |
c888da1c96 | ||
![]() |
2195a6f0dd | ||
![]() |
13ce2e0abc | ||
![]() |
64d2efaf70 | ||
![]() |
169eab1128 | ||
![]() |
51002084f8 | ||
![]() |
c7fcdace6c | ||
![]() |
98f480cc28 | ||
![]() |
09a51f162e | ||
![]() |
366754fc57 | ||
![]() |
fb044c4b6a | ||
![]() |
ffc80c11c7 | ||
![]() |
8591a0be77 | ||
![]() |
9274ef995f | ||
![]() |
3a215a0268 | ||
![]() |
b99ed85fb9 | ||
![]() |
b647142cf5 | ||
![]() |
00a9d14f34 | ||
![]() |
f4c0403f12 | ||
![]() |
1a57048f62 | ||
![]() |
9a7e7a2d28 | ||
![]() |
106686a212 | ||
![]() |
4d7868529d | ||
![]() |
d358ce52f2 | ||
![]() |
a5b4dc8ba9 | ||
![]() |
2de7e50511 | ||
![]() |
8642306672 | ||
![]() |
26892981b9 | ||
![]() |
af11bb9aa2 | ||
![]() |
b936bb3369 | ||
![]() |
713d9f587c | ||
![]() |
59218e28d0 | ||
![]() |
32b310e31f |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -33,3 +33,6 @@ cimgui/cimgui.v12.suo
|
||||
cimgui/Release/
|
||||
.idea
|
||||
CMakeLists.txt
|
||||
cimgui/.vs/
|
||||
cimgui/cimgui.vcxproj.user
|
||||
cimgui/x64/
|
||||
|
@@ -7,5 +7,6 @@ compiler:
|
||||
- gcc
|
||||
- clang
|
||||
|
||||
script:
|
||||
script:
|
||||
- make -C cimgui
|
||||
- $CC cimgui/cimgui.h # Make sure we can include in a plain C compiler
|
||||
|
13
README.md
13
README.md
@@ -1,14 +1,13 @@
|
||||
# cimgui [](https://travis-ci.org/Extrawurst/cimgui)
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
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.53 of imgui](https://github.com/ocornut/imgui/releases/tag/v1.53)
|
||||
* does not compile with pure C compiler yet (for writing bindings in languages that are able to use C-ABI it is enough though, see D-bindings)
|
||||
|
||||
# usage
|
||||
@@ -17,3 +16,11 @@ Notes:
|
||||
* make using makefile on linux/osx
|
||||
* use whatever method is in ImGui c++ namespace in the original [imgui.h](https://github.com/ocornut/imgui/blob/master/imgui.h) by prepending `ig`
|
||||
* methods have the same parameter list and return values (where possible)
|
||||
|
||||
# example bindings based on cimgui
|
||||
|
||||
* [DerelictImgui](https://github.com/Extrawurst/DerelictImgui)
|
||||
* [ImGui.NET](https://github.com/mellinoe/ImGui.NET)
|
||||
* [imgui-rs](https://github.com/Gekkio/imgui-rs)
|
||||
* [imgui-pas](https://github.com/dpethes/imgui-pas)
|
||||
* [odin-dear_imgui](https://github.com/ThisDrunkDane/odin-dear_imgui)
|
||||
|
4
cimgui/.vscode/settings.json
vendored
Normal file
4
cimgui/.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
// Place your settings in this file to overwrite default and user settings.
|
||||
{
|
||||
"editor.formatOnSave": false,
|
||||
}
|
@@ -3,8 +3,9 @@
|
||||
# Compatible with Ubuntu 14.04.1 and Mac OS X
|
||||
|
||||
OBJS = cimgui.o
|
||||
OBJS += fontAtlas.o
|
||||
OBJS += fontAtlas.o
|
||||
OBJS += drawList.o
|
||||
OBJS += listClipper.o
|
||||
#OBJS += test.o
|
||||
OBJS += ../imgui/imgui.o
|
||||
OBJS += ../imgui/imgui_draw.o
|
||||
@@ -32,6 +33,17 @@ ifeq ($(UNAME_S), Darwin) #APPLE
|
||||
CFLAGS = $(CXXFLAGS)
|
||||
endif
|
||||
|
||||
ifeq ($(OS), Windows_NT)
|
||||
ECHO_MESSAGE = "Windows"
|
||||
|
||||
OUTPUTNAME = cimgui.dll
|
||||
CXXFLAGS = -I../../
|
||||
CXXFLAGS += -Wall
|
||||
CXXFLAGS += -shared
|
||||
LINKFLAGS = -limm32
|
||||
CFLAGS = $(CXXFLAGS)
|
||||
endif
|
||||
|
||||
.cpp.o:
|
||||
$(CXX) $(CXXFLAGS) -c -o $@ $<
|
||||
|
||||
|
1286
cimgui/cimgui.cpp
1286
cimgui/cimgui.cpp
File diff suppressed because it is too large
Load Diff
1365
cimgui/cimgui.h
1365
cimgui/cimgui.h
File diff suppressed because it is too large
Load Diff
@@ -8,13 +8,19 @@ EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{EDE48926-0595-4488-B1A0-32CA71397271}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{EDE48926-0595-4488-B1A0-32CA71397271}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{EDE48926-0595-4488-B1A0-32CA71397271}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{EDE48926-0595-4488-B1A0-32CA71397271}.Debug|x64.Build.0 = Debug|x64
|
||||
{EDE48926-0595-4488-B1A0-32CA71397271}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{EDE48926-0595-4488-B1A0-32CA71397271}.Release|Win32.Build.0 = Release|Win32
|
||||
{EDE48926-0595-4488-B1A0-32CA71397271}.Release|x64.ActiveCfg = Release|x64
|
||||
{EDE48926-0595-4488-B1A0-32CA71397271}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@@ -1,14 +1,22 @@
|
||||
<?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>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{EDE48926-0595-4488-B1A0-32CA71397271}</ProjectGuid>
|
||||
@@ -19,13 +27,26 @@
|
||||
<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)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<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>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
@@ -35,16 +56,28 @@
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
@@ -58,6 +91,19 @@
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;CIMGUI_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
@@ -67,6 +113,27 @@
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;CIMGUI_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;CIMGUI_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
@@ -82,6 +149,7 @@
|
||||
<ClCompile Include="cimgui.cpp" />
|
||||
<ClCompile Include="drawList.cpp" />
|
||||
<ClCompile Include="fontAtlas.cpp" />
|
||||
<ClCompile Include="listClipper.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\imgui\imgui_internal.h" />
|
||||
|
@@ -33,6 +33,9 @@
|
||||
<ClCompile Include="..\imgui\imgui_demo.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="listClipper.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="cimgui.h">
|
||||
|
@@ -2,37 +2,292 @@
|
||||
#include "../imgui/imgui.h"
|
||||
#include "cimgui.h"
|
||||
|
||||
CIMGUI_API int ImDrawList_GetVertexBufferSize(ImDrawList* list)
|
||||
CIMGUI_API void ImDrawData_DeIndexAllBuffers(ImDrawData *drawData)
|
||||
{
|
||||
return list->VtxBuffer.size();
|
||||
return drawData->DeIndexAllBuffers();
|
||||
}
|
||||
|
||||
CIMGUI_API ImDrawVert* ImDrawList_GetVertexPtr(ImDrawList* list, int n)
|
||||
CIMGUI_API void ImDrawData_ScaleClipRects(ImDrawData *drawData, const struct ImVec2 sc)
|
||||
{
|
||||
return &list->VtxBuffer[n];
|
||||
return drawData->ScaleClipRects(sc);
|
||||
}
|
||||
|
||||
CIMGUI_API int ImDrawList_GetIndexBufferSize(ImDrawList* list)
|
||||
CIMGUI_API int ImDrawList_GetVertexBufferSize(ImDrawList *list)
|
||||
{
|
||||
return list->IdxBuffer.size();
|
||||
return list->VtxBuffer.size();
|
||||
}
|
||||
|
||||
CIMGUI_API ImDrawIdx* ImDrawList_GetIndexPtr(ImDrawList* list, int n)
|
||||
CIMGUI_API ImDrawVert *ImDrawList_GetVertexPtr(ImDrawList *list, int n)
|
||||
{
|
||||
return &list->IdxBuffer[n];
|
||||
return &list->VtxBuffer[n];
|
||||
}
|
||||
|
||||
CIMGUI_API int ImDrawList_GetCmdSize(ImDrawList* list)
|
||||
CIMGUI_API int ImDrawList_GetIndexBufferSize(ImDrawList *list)
|
||||
{
|
||||
return list->CmdBuffer.size();
|
||||
return list->IdxBuffer.size();
|
||||
}
|
||||
|
||||
CIMGUI_API ImDrawCmd* ImDrawList_GetCmdPtr(ImDrawList* list, int n)
|
||||
CIMGUI_API ImDrawIdx *ImDrawList_GetIndexPtr(ImDrawList *list, int n)
|
||||
{
|
||||
return &list->CmdBuffer[n];
|
||||
return &list->IdxBuffer[n];
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawData_DeIndexAllBuffers(ImDrawData* drawData)
|
||||
CIMGUI_API int ImDrawList_GetCmdSize(ImDrawList *list)
|
||||
{
|
||||
return drawData->DeIndexAllBuffers();
|
||||
}
|
||||
return list->CmdBuffer.size();
|
||||
}
|
||||
|
||||
CIMGUI_API ImDrawCmd *ImDrawList_GetCmdPtr(ImDrawList *list, int n)
|
||||
{
|
||||
return &list->CmdBuffer[n];
|
||||
}
|
||||
|
||||
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, struct ImVec2 clip_rect_min, struct ImVec2 clip_rect_max, bool intersect_with_current_clip_rect)
|
||||
{
|
||||
return list->PushClipRect(clip_rect_min, clip_rect_max, intersect_with_current_clip_rect);
|
||||
}
|
||||
|
||||
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_GetClipRectMin(ImVec2 *pOut, ImDrawList *list)
|
||||
{
|
||||
*pOut = list->GetClipRectMin();
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_GetClipRectMax(ImVec2 *pOut, ImDrawList *list)
|
||||
{
|
||||
*pOut = list->GetClipRectMax();
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_AddLine(ImDrawList *list, CONST struct ImVec2 a, CONST struct ImVec2 b, ImU32 col, float thickness)
|
||||
{
|
||||
return list->AddLine(a, b, col, thickness);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_AddRect(ImDrawList *list, CONST struct ImVec2 a, CONST struct ImVec2 b, ImU32 col, float rounding, int rounding_corners_flags, float thickness)
|
||||
{
|
||||
return list->AddRect(a, b, col, rounding, rounding_corners_flags, thickness);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_AddRectFilled(ImDrawList *list, CONST struct ImVec2 a, CONST struct ImVec2 b, ImU32 col, float rounding, int rounding_corners_flags)
|
||||
{
|
||||
return list->AddRectFilled(a, b, col, rounding, rounding_corners_flags);
|
||||
}
|
||||
|
||||
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_AddQuad(ImDrawList *list, CONST struct ImVec2 a, CONST struct ImVec2 b, CONST struct ImVec2 c, CONST struct ImVec2 d, ImU32 col, float thickness)
|
||||
{
|
||||
return list->AddQuad(a, b, c, d, col, thickness);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_AddQuadFilled(ImDrawList *list, CONST struct ImVec2 a, CONST struct ImVec2 b, CONST struct ImVec2 c, CONST struct ImVec2 d, ImU32 col)
|
||||
{
|
||||
return list->AddQuadFilled(a, b, c, d, col);
|
||||
}
|
||||
|
||||
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 uv_a, CONST struct ImVec2 uv_b, ImU32 col)
|
||||
{
|
||||
return list->AddImage(user_texture_id, a, b, uv_a, uv_b, col);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_AddImageQuad(struct ImDrawList *list, ImTextureID user_texture_id, CONST struct ImVec2 a, CONST ImVec2 b, CONST ImVec2 c, CONST ImVec2 d, CONST ImVec2 uv_a, CONST ImVec2 uv_b, CONST ImVec2 uv_c, CONST ImVec2 uv_d, ImU32 col)
|
||||
{
|
||||
return list->AddImageQuad(user_texture_id, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_AddImageRounded(struct ImDrawList *list, ImTextureID user_texture_id, CONST struct ImVec2 a, CONST struct ImVec2 b, CONST struct ImVec2 uv_a, CONST struct ImVec2 uv_b, ImU32 col, float rounding, int rounding_corners)
|
||||
{
|
||||
list->AddImageRounded(user_texture_id, a, b, uv_a, uv_b, col, rounding, rounding_corners);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_AddPolyline(ImDrawList *list, CONST ImVec2 *points, CONST int num_points, ImU32 col, bool closed, float thickness)
|
||||
{
|
||||
return list->AddPolyline(points, num_points, col, closed, thickness);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_AddConvexPolyFilled(ImDrawList *list, CONST ImVec2 *points, CONST int num_points, ImU32 col)
|
||||
{
|
||||
return list->AddConvexPolyFilled(points, num_points, col);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_AddBezierCurve(ImDrawList *list, CONST struct ImVec2 pos0, CONST struct ImVec2 cp0, CONST struct ImVec2 cp1, CONST struct ImVec2 pos1, ImU32 col, float thickness, int num_segments)
|
||||
{
|
||||
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_PathFillConvex(ImDrawList *list, ImU32 col)
|
||||
{
|
||||
return list->PathFillConvex(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_flags)
|
||||
{
|
||||
return list->PathRect(rect_min, rect_max, rounding, rounding_corners_flags);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImDrawList_ChannelsSplit(ImDrawList *list, int channels_count)
|
||||
{
|
||||
return list->ChannelsSplit(channels_count);
|
||||
}
|
||||
|
||||
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,57 +2,327 @@
|
||||
#include "../imgui/imgui.h"
|
||||
#include "cimgui.h"
|
||||
|
||||
CIMGUI_API void ImFontAtlas_GetTexDataAsRGBA32(ImFontAtlas* atlas, unsigned char** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel)
|
||||
CIMGUI_API void ImFontConfig_DefaultConstructor(ImFontConfig *config)
|
||||
{
|
||||
atlas->GetTexDataAsRGBA32(out_pixels, out_width, out_height, out_bytes_per_pixel);
|
||||
*config = ImFontConfig();
|
||||
}
|
||||
|
||||
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_GetTexDataAsRGBA32(ImFontAtlas *atlas, unsigned char **out_pixels, int *out_width, int *out_height, int *out_bytes_per_pixel)
|
||||
{
|
||||
atlas->GetTexDataAsAlpha8(out_pixels, out_width, out_height, out_bytes_per_pixel);
|
||||
atlas->GetTexDataAsRGBA32(out_pixels, out_width, out_height, out_bytes_per_pixel);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImFontAtlas_SetTexID(ImFontAtlas* atlas, void* tex)
|
||||
CIMGUI_API void ImFontAtlas_GetTexDataAsAlpha8(ImFontAtlas *atlas, unsigned char **out_pixels, int *out_width, int *out_height, int *out_bytes_per_pixel)
|
||||
{
|
||||
atlas->TexID = tex;
|
||||
atlas->GetTexDataAsAlpha8(out_pixels, out_width, out_height, out_bytes_per_pixel);
|
||||
}
|
||||
|
||||
CIMGUI_API ImFont* ImFontAtlas_AddFont(ImFontAtlas* atlas, CONST ImFontConfig* font_cfg)
|
||||
CIMGUI_API void ImFontAtlas_SetTexID(ImFontAtlas *atlas, ImTextureID id)
|
||||
{
|
||||
return atlas->AddFont(font_cfg);
|
||||
atlas->TexID = id;
|
||||
}
|
||||
|
||||
CIMGUI_API ImFont* ImFontAtlas_AddFontDefault(ImFontAtlas* atlas, CONST ImFontConfig* font_cfg)
|
||||
CIMGUI_API ImFont *ImFontAtlas_AddFont(ImFontAtlas *atlas, CONST ImFontConfig *font_cfg)
|
||||
{
|
||||
return atlas->AddFontDefault(font_cfg);
|
||||
return atlas->AddFont(font_cfg);
|
||||
}
|
||||
|
||||
CIMGUI_API ImFont* ImFontAtlas_AddFontFromFileTTF(ImFontAtlas* atlas,CONST char* filename, float size_pixels, CONST ImFontConfig* font_cfg, CONST ImWchar* glyph_ranges)
|
||||
CIMGUI_API ImFont *ImFontAtlas_AddFontDefault(ImFontAtlas *atlas, CONST ImFontConfig *font_cfg)
|
||||
{
|
||||
return atlas->AddFontFromFileTTF(filename, size_pixels, font_cfg, glyph_ranges);
|
||||
return atlas->AddFontDefault(font_cfg);
|
||||
}
|
||||
|
||||
CIMGUI_API ImFont* ImFontAtlas_AddFontFromMemoryTTF(ImFontAtlas* atlas, void* ttf_data, int ttf_size, float size_pixels, CONST ImFontConfig* font_cfg, CONST ImWchar* glyph_ranges)
|
||||
CIMGUI_API ImFont *ImFontAtlas_AddFontFromFileTTF(ImFontAtlas *atlas, CONST char *filename, float size_pixels, CONST ImFontConfig *font_cfg, CONST ImWchar *glyph_ranges)
|
||||
{
|
||||
return atlas->AddFontFromMemoryTTF(ttf_data, ttf_size, size_pixels, font_cfg, glyph_ranges);
|
||||
return atlas->AddFontFromFileTTF(filename, size_pixels, font_cfg, glyph_ranges);
|
||||
}
|
||||
|
||||
CIMGUI_API ImFont* ImFontAtlas_AddFontFromMemoryCompressedTTF(ImFontAtlas* atlas, CONST void* compressed_ttf_data, int compressed_ttf_size, float size_pixels, CONST ImFontConfig* font_cfg, CONST ImWchar* glyph_ranges)
|
||||
CIMGUI_API ImFont *ImFontAtlas_AddFontFromMemoryTTF(ImFontAtlas *atlas, void *font_data, int font_size, float size_pixels, CONST ImFontConfig *font_cfg, CONST ImWchar *glyph_ranges)
|
||||
{
|
||||
return atlas->AddFontFromMemoryCompressedTTF(compressed_ttf_data, compressed_ttf_size, size_pixels, font_cfg, glyph_ranges);
|
||||
return atlas->AddFontFromMemoryTTF(font_data, font_size, size_pixels, font_cfg, glyph_ranges);
|
||||
}
|
||||
|
||||
CIMGUI_API ImFont* ImFontAtlas_AddFontFromMemoryCompressedBase85TTF(ImFontAtlas* atlas, CONST char* compressed_ttf_data_base85, float size_pixels, CONST ImFontConfig* font_cfg, CONST ImWchar* glyph_ranges)
|
||||
CIMGUI_API ImFont *ImFontAtlas_AddFontFromMemoryCompressedTTF(ImFontAtlas *atlas, CONST void *compressed_font_data, int compressed_font_size, float size_pixels, CONST ImFontConfig *font_cfg, CONST ImWchar *glyph_ranges)
|
||||
{
|
||||
return atlas->AddFontFromMemoryCompressedBase85TTF(compressed_ttf_data_base85, size_pixels, font_cfg, glyph_ranges);
|
||||
return atlas->AddFontFromMemoryCompressedTTF(compressed_font_data, compressed_font_size, size_pixels, font_cfg, glyph_ranges);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImFontAtlas_ClearTexData(ImFontAtlas* atlas)
|
||||
CIMGUI_API ImFont *ImFontAtlas_AddFontFromMemoryCompressedBase85TTF(ImFontAtlas *atlas, CONST char *compressed_font_data_base85, float size_pixels, CONST ImFontConfig *font_cfg, CONST ImWchar *glyph_ranges)
|
||||
{
|
||||
return atlas->ClearTexData();
|
||||
return atlas->AddFontFromMemoryCompressedBase85TTF(compressed_font_data_base85, size_pixels, font_cfg, glyph_ranges);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImFontAtlas_Clear(ImFontAtlas* atlas)
|
||||
CIMGUI_API void ImFontAtlas_ClearTexData(ImFontAtlas *atlas)
|
||||
{
|
||||
return atlas->Clear();
|
||||
}
|
||||
return atlas->ClearTexData();
|
||||
}
|
||||
|
||||
CIMGUI_API void ImFontAtlas_ClearInputData(ImFontAtlas *atlas)
|
||||
{
|
||||
return atlas->ClearInputData();
|
||||
}
|
||||
|
||||
CIMGUI_API void ImFontAtlas_ClearFonts(ImFontAtlas *atlas)
|
||||
{
|
||||
return atlas->ClearFonts();
|
||||
}
|
||||
|
||||
CIMGUI_API void ImFontAtlas_Clear(ImFontAtlas *atlas)
|
||||
{
|
||||
return atlas->Clear();
|
||||
}
|
||||
|
||||
CIMGUI_API CONST ImWchar *ImFontAtlas_GetGlyphRangesDefault(struct ImFontAtlas *atlas)
|
||||
{
|
||||
return atlas->GetGlyphRangesDefault();
|
||||
}
|
||||
|
||||
CIMGUI_API CONST ImWchar *ImFontAtlas_GetGlyphRangesKorean(struct ImFontAtlas *atlas)
|
||||
{
|
||||
return atlas->GetGlyphRangesKorean();
|
||||
}
|
||||
|
||||
CIMGUI_API CONST ImWchar *ImFontAtlas_GetGlyphRangesJapanese(struct ImFontAtlas *atlas)
|
||||
{
|
||||
return atlas->GetGlyphRangesJapanese();
|
||||
}
|
||||
|
||||
CIMGUI_API CONST ImWchar *ImFontAtlas_GetGlyphRangesChinese(struct ImFontAtlas *atlas)
|
||||
{
|
||||
return atlas->GetGlyphRangesChinese();
|
||||
}
|
||||
|
||||
CIMGUI_API CONST ImWchar *ImFontAtlas_GetGlyphRangesCyrillic(struct ImFontAtlas *atlas)
|
||||
{
|
||||
return atlas->GetGlyphRangesCyrillic();
|
||||
}
|
||||
|
||||
CIMGUI_API CONST ImWchar *ImFontAtlas_GetGlyphRangesThai(struct ImFontAtlas *atlas)
|
||||
{
|
||||
return atlas->GetGlyphRangesThai();
|
||||
}
|
||||
|
||||
CIMGUI_API ImTextureID ImFontAtlas_GetTexID(struct ImFontAtlas *atlas)
|
||||
{
|
||||
return atlas->TexID;
|
||||
}
|
||||
|
||||
CIMGUI_API unsigned char *ImFontAtlas_GetTexPixelsAlpha8(struct ImFontAtlas *atlas)
|
||||
{
|
||||
return atlas->TexPixelsAlpha8;
|
||||
}
|
||||
|
||||
CIMGUI_API unsigned int *ImFontAtlas_GetTexPixelsRGBA32(struct ImFontAtlas *atlas)
|
||||
{
|
||||
return atlas->TexPixelsRGBA32;
|
||||
}
|
||||
|
||||
CIMGUI_API int ImFontAtlas_GetTexWidth(struct ImFontAtlas *atlas)
|
||||
{
|
||||
return atlas->TexWidth;
|
||||
}
|
||||
|
||||
CIMGUI_API int ImFontAtlas_GetTexHeight(struct ImFontAtlas *atlas)
|
||||
{
|
||||
return atlas->TexHeight;
|
||||
}
|
||||
|
||||
CIMGUI_API int ImFontAtlas_GetTexDesiredWidth(struct ImFontAtlas *atlas)
|
||||
{
|
||||
return atlas->TexDesiredWidth;
|
||||
}
|
||||
|
||||
CIMGUI_API void ImFontAtlas_SetTexDesiredWidth(struct ImFontAtlas *atlas, int TexDesiredWidth_)
|
||||
{
|
||||
atlas->TexDesiredWidth = TexDesiredWidth_;
|
||||
}
|
||||
|
||||
CIMGUI_API int ImFontAtlas_GetTexGlyphPadding(struct ImFontAtlas *atlas)
|
||||
{
|
||||
return atlas->TexGlyphPadding;
|
||||
}
|
||||
|
||||
CIMGUI_API void ImFontAtlas_SetTexGlyphPadding(struct ImFontAtlas *atlas, int TexGlyphPadding_)
|
||||
{
|
||||
atlas->TexGlyphPadding = TexGlyphPadding_;
|
||||
}
|
||||
|
||||
CIMGUI_API void ImFontAtlas_GetTexUvWhitePixel(struct ImFontAtlas *atlas, ImVec2 *pOut)
|
||||
{
|
||||
*pOut = atlas->TexUvWhitePixel;
|
||||
}
|
||||
|
||||
// ImFontAtlas::Fonts;
|
||||
CIMGUI_API int ImFontAtlas_Fonts_size(struct ImFontAtlas *atlas)
|
||||
{
|
||||
return atlas->Fonts.size();
|
||||
}
|
||||
|
||||
CIMGUI_API ImFont *ImFontAtlas_Fonts_index(struct ImFontAtlas *atlas, int index)
|
||||
{
|
||||
return atlas->Fonts[index];
|
||||
}
|
||||
|
||||
// ImFont
|
||||
CIMGUI_API float ImFont_GetFontSize(CONST struct ImFont *font)
|
||||
{
|
||||
return font->FontSize;
|
||||
}
|
||||
|
||||
CIMGUI_API void ImFont_SetFontSize(struct ImFont *font, float FontSize_)
|
||||
{
|
||||
font->FontSize = FontSize_;
|
||||
}
|
||||
|
||||
CIMGUI_API float ImFont_GetScale(CONST struct ImFont *font)
|
||||
{
|
||||
return font->Scale;
|
||||
}
|
||||
|
||||
CIMGUI_API void ImFont_SetScale(struct ImFont *font, float Scale_)
|
||||
{
|
||||
font->Scale = Scale_;
|
||||
}
|
||||
|
||||
CIMGUI_API void ImFont_GetDisplayOffset(CONST struct ImFont *font, ImVec2 *pOut)
|
||||
{
|
||||
*pOut = font->DisplayOffset;
|
||||
}
|
||||
|
||||
CIMGUI_API CONST struct IMFONTGLYPH *ImFont_GetFallbackGlyph(CONST struct ImFont *font)
|
||||
{
|
||||
return font->FallbackGlyph;
|
||||
}
|
||||
|
||||
CIMGUI_API void ImFont_SetFallbackGlyph(struct ImFont *font, CONST struct IMFONTGLYPH *FallbackGlyph_)
|
||||
{
|
||||
font->FallbackGlyph = FallbackGlyph_;
|
||||
}
|
||||
|
||||
CIMGUI_API float ImFont_GetFallbackAdvanceX(CONST struct ImFont *font)
|
||||
{
|
||||
return font->FallbackAdvanceX;
|
||||
}
|
||||
|
||||
CIMGUI_API ImWchar ImFont_GetFallbackChar(CONST struct ImFont *font)
|
||||
{
|
||||
return font->FallbackChar;
|
||||
}
|
||||
|
||||
CIMGUI_API short ImFont_GetConfigDataCount(CONST struct ImFont *font)
|
||||
{
|
||||
return font->ConfigDataCount;
|
||||
}
|
||||
|
||||
CIMGUI_API struct ImFontConfig *ImFont_GetConfigData(struct ImFont *font)
|
||||
{
|
||||
return font->ConfigData;
|
||||
}
|
||||
|
||||
CIMGUI_API struct ImFontAtlas *ImFont_GetContainerAtlas(struct ImFont *font)
|
||||
{
|
||||
return font->ContainerAtlas;
|
||||
}
|
||||
|
||||
CIMGUI_API float ImFont_GetAscent(CONST struct ImFont *font)
|
||||
{
|
||||
return font->Ascent;
|
||||
}
|
||||
|
||||
CIMGUI_API float ImFont_GetDescent(CONST struct ImFont *font)
|
||||
{
|
||||
return font->Descent;
|
||||
}
|
||||
|
||||
CIMGUI_API int ImFont_GetMetricsTotalSurface(CONST struct ImFont *font)
|
||||
{
|
||||
return font->MetricsTotalSurface;
|
||||
}
|
||||
|
||||
CIMGUI_API void ImFont_ClearOutputData(struct ImFont *font)
|
||||
{
|
||||
font->ClearOutputData();
|
||||
}
|
||||
|
||||
CIMGUI_API void ImFont_BuildLookupTable(struct ImFont *font)
|
||||
{
|
||||
font->BuildLookupTable();
|
||||
}
|
||||
|
||||
CIMGUI_API CONST struct IMFONTGLYPH *ImFont_FindGlyph(CONST struct ImFont *font, ImWchar c)
|
||||
{
|
||||
return font->FindGlyph(c);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImFont_SetFallbackChar(struct ImFont *font, ImWchar c)
|
||||
{
|
||||
font->SetFallbackChar(c);
|
||||
}
|
||||
|
||||
CIMGUI_API float ImFont_GetCharAdvance(CONST struct ImFont *font, ImWchar c)
|
||||
{
|
||||
return font->GetCharAdvance(c);
|
||||
}
|
||||
|
||||
CIMGUI_API bool ImFont_IsLoaded(CONST struct ImFont *font)
|
||||
{
|
||||
return font->IsLoaded();
|
||||
}
|
||||
|
||||
CIMGUI_API CONST char *ImFont_GetDebugName(CONST struct ImFont *font)
|
||||
{
|
||||
return font->GetDebugName();
|
||||
}
|
||||
|
||||
CIMGUI_API void ImFont_CalcTextSizeA(CONST struct ImFont *font, ImVec2 *pOut, float size, float max_width, float wrap_width, CONST char *text_begin, CONST char *text_end, CONST char **remaining)
|
||||
{
|
||||
*pOut = font->CalcTextSizeA(size, max_width, wrap_width, text_begin, text_end, remaining);
|
||||
}
|
||||
|
||||
CIMGUI_API CONST char *ImFont_CalcWordWrapPositionA(CONST struct ImFont *font, float scale, CONST char *text, CONST char *text_end, float wrap_width)
|
||||
{
|
||||
return font->CalcWordWrapPositionA(scale, text, text_end, wrap_width);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImFont_RenderChar(CONST struct ImFont *font, ImDrawList *draw_list, float size, ImVec2 pos, ImU32 col, unsigned short c)
|
||||
{
|
||||
return font->RenderChar(draw_list, size, pos, col, c);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImFont_RenderText(CONST struct ImFont *font, ImDrawList *draw_list, float size, ImVec2 pos, ImU32 col, CONST ImVec4 *clip_rect, CONST char *text_begin, CONST char *text_end, float wrap_width, bool cpu_fine_clip)
|
||||
{
|
||||
return font->RenderText(draw_list, size, pos, col, *clip_rect, text_begin, text_end, wrap_width, cpu_fine_clip);
|
||||
}
|
||||
|
||||
// ImFont::Glyph
|
||||
CIMGUI_API int ImFont_Glyphs_size(CONST struct ImFont *font)
|
||||
{
|
||||
return font->Glyphs.size();
|
||||
}
|
||||
|
||||
CIMGUI_API struct IMFONTGLYPH *ImFont_Glyphs_index(struct ImFont *font, int index)
|
||||
{
|
||||
return &font->Glyphs[index];
|
||||
}
|
||||
|
||||
// ImFont::IndexXAdvance
|
||||
CIMGUI_API int ImFont_IndexXAdvance_size(CONST struct ImFont *font)
|
||||
{
|
||||
return font->IndexAdvanceX.size();
|
||||
}
|
||||
|
||||
CIMGUI_API float ImFont_IndexXAdvance_index(CONST struct ImFont *font, int index)
|
||||
{
|
||||
return font->IndexAdvanceX[index];
|
||||
}
|
||||
|
||||
// ImFont::IndexLookup
|
||||
CIMGUI_API int ImFont_IndexLookup_size(CONST struct ImFont *font)
|
||||
{
|
||||
return font->IndexLookup.size();
|
||||
}
|
||||
|
||||
CIMGUI_API unsigned short ImFont_IndexLookup_index(CONST struct ImFont *font, int index)
|
||||
{
|
||||
return font->IndexLookup[index];
|
||||
}
|
||||
|
27
cimgui/listClipper.cpp
Normal file
27
cimgui/listClipper.cpp
Normal file
@@ -0,0 +1,27 @@
|
||||
#include "../imgui/imgui.h"
|
||||
#include "cimgui.h"
|
||||
|
||||
CIMGUI_API void ImGuiListClipper_Begin(ImGuiListClipper* clipper, int count, float items_height)
|
||||
{
|
||||
clipper->Begin(count, items_height);
|
||||
}
|
||||
|
||||
CIMGUI_API void ImGuiListClipper_End(ImGuiListClipper* clipper)
|
||||
{
|
||||
clipper->End();
|
||||
}
|
||||
|
||||
CIMGUI_API bool ImGuiListClipper_Step(ImGuiListClipper* clipper)
|
||||
{
|
||||
return clipper->Step();
|
||||
}
|
||||
|
||||
CIMGUI_API int ImGuiListClipper_GetDisplayStart(ImGuiListClipper* clipper)
|
||||
{
|
||||
return clipper->DisplayStart;
|
||||
}
|
||||
|
||||
CIMGUI_API int ImGuiListClipper_GetDisplayEnd(ImGuiListClipper* clipper)
|
||||
{
|
||||
return clipper->DisplayEnd;
|
||||
}
|
2
imgui
2
imgui
Submodule imgui updated: 77bcb7152b...e916310b2e
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 65 KiB |
Reference in New Issue
Block a user