forked from inkyblackness/imgui-go
-
Notifications
You must be signed in to change notification settings - Fork 15
/
FontGlyphRangesBuilderWrapper.cpp
43 lines (35 loc) · 1.48 KB
/
FontGlyphRangesBuilderWrapper.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include "imguiWrappedHeader.h"
#include "FontGlyphRangesBuilderWrapper.h"
IggGlyphRanges IggNewGlyphRanges() {
ImVector<ImWchar> *ranges = new ImVector<ImWchar>();
return static_cast<IggGlyphRanges>(ranges);
}
IggGlyphRanges IggGlyphRangesData(IggGlyphRanges handle) {
ImVector<ImWchar> *ranges = reinterpret_cast<ImVector<ImWchar>*>(handle);
return static_cast<IggGlyphRanges>(ranges->Data);
}
IggFontGlyphRangesBuilder IggNewFontGlyphRangesBuilder()
{
ImFontGlyphRangesBuilder *builder = new ImFontGlyphRangesBuilder();
return static_cast<IggFontGlyphRangesBuilder>(builder);
}
void IggFontGlyphRangesBuilderClear(IggFontGlyphRangesBuilder handle)
{
ImFontGlyphRangesBuilder *builder = reinterpret_cast<ImFontGlyphRangesBuilder*>(handle);
builder->Clear();
}
void IggFontGlyphRangesBuilderAddText(IggFontGlyphRangesBuilder handle, const char* text)
{
ImFontGlyphRangesBuilder *builder = reinterpret_cast<ImFontGlyphRangesBuilder*>(handle);
builder->AddText(text);
}
void IggFontGlyphRangesBuilderAddRanges(IggFontGlyphRangesBuilder handle, IggGlyphRanges ranges)
{
ImFontGlyphRangesBuilder *builder = reinterpret_cast<ImFontGlyphRangesBuilder*>(handle);
builder->AddRanges(reinterpret_cast<ImWchar*>(ranges));
}
void IggFontGlyphRangesBuilderBuildRanges(IggFontGlyphRangesBuilder handle, IggGlyphRanges ranges)
{
ImFontGlyphRangesBuilder *builder = reinterpret_cast<ImFontGlyphRangesBuilder*>(handle);
builder->BuildRanges(reinterpret_cast<ImVector<ImWchar>*>(ranges));
}