DDraceNetwork Documentation
Loading...
Searching...
No Matches
textrender.h
Go to the documentation of this file.
1/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
2/* If you are missing that file, acquire a complete release at teeworlds.com. */
3#ifndef ENGINE_TEXTRENDER_H
4#define ENGINE_TEXTRENDER_H
5#include "kernel.h"
6
7#include <base/color.h>
8
9#include <engine/graphics.h>
10
11#include <cstdint>
12#include <memory>
13
14enum
15{
20};
21
44
59
65
66namespace FontIcons
67{
68 // Each font icon is named according to its official name in Font Awesome
69 [[maybe_unused]] static const char *FONT_ICON_PLUS = "+";
70 [[maybe_unused]] static const char *FONT_ICON_MINUS = "-";
71 [[maybe_unused]] static const char *FONT_ICON_LOCK = "\xEF\x80\xA3";
72 [[maybe_unused]] static const char *FONT_ICON_MAGNIFYING_GLASS = "\xEF\x80\x82";
73 [[maybe_unused]] static const char *FONT_ICON_HEART = "\xEF\x80\x84";
74 [[maybe_unused]] static const char *FONT_ICON_HEART_CRACK = "\xEF\x9E\xA9";
75 [[maybe_unused]] static const char *FONT_ICON_STAR = "\xEF\x80\x85";
76 [[maybe_unused]] static const char *FONT_ICON_XMARK = "\xEF\x80\x8D";
77 [[maybe_unused]] static const char *FONT_ICON_CIRCLE = "\xEF\x84\x91";
78 [[maybe_unused]] static const char *FONT_ICON_ARROW_ROTATE_LEFT = "\xEF\x83\xA2";
79 [[maybe_unused]] static const char *FONT_ICON_ARROW_ROTATE_RIGHT = "\xEF\x80\x9E";
80 [[maybe_unused]] static const char *FONT_ICON_FLAG_CHECKERED = "\xEF\x84\x9E";
81 [[maybe_unused]] static const char *FONT_ICON_BAN = "\xEF\x81\x9E";
82 [[maybe_unused]] static const char *FONT_ICON_CIRCLE_CHEVRON_DOWN = "\xEF\x84\xBA";
83 [[maybe_unused]] static const char *FONT_ICON_KEY = "\xEF\x82\x84";
84 [[maybe_unused]] static const char *FONT_ICON_SQUARE_MINUS = "\xEF\x85\x86";
85 [[maybe_unused]] static const char *FONT_ICON_SQUARE_PLUS = "\xEF\x83\xBE";
86 [[maybe_unused]] static const char *FONT_ICON_SORT_UP = "\xEF\x83\x9E";
87 [[maybe_unused]] static const char *FONT_ICON_SORT_DOWN = "\xEF\x83\x9D";
88 [[maybe_unused]] static const char *FONT_ICON_TRIANGLE_EXCLAMATION = "\xEF\x81\xB1";
89
90 [[maybe_unused]] static const char *FONT_ICON_HOUSE = "\xEF\x80\x95";
91 [[maybe_unused]] static const char *FONT_ICON_BOOKMARK = "\xEF\x80\xAE";
92 [[maybe_unused]] static const char *FONT_ICON_NEWSPAPER = "\xEF\x87\xAA";
93 [[maybe_unused]] static const char *FONT_ICON_POWER_OFF = "\xEF\x80\x91";
94 [[maybe_unused]] static const char *FONT_ICON_GEAR = "\xEF\x80\x93";
95 [[maybe_unused]] static const char *FONT_ICON_PEN_TO_SQUARE = "\xEF\x81\x84";
96 [[maybe_unused]] static const char *FONT_ICON_CLAPPERBOARD = "\xEE\x84\xB1";
97 [[maybe_unused]] static const char *FONT_ICON_EARTH_AMERICAS = "\xEF\x95\xBD";
98 [[maybe_unused]] static const char *FONT_ICON_NETWORK_WIRED = "\xEF\x9B\xBF";
99 [[maybe_unused]] static const char *FONT_ICON_LIST_UL = "\xEF\x83\x8A";
100 [[maybe_unused]] static const char *FONT_ICON_INFO = "\xEF\x84\xA9";
101 [[maybe_unused]] static const char *FONT_ICON_TERMINAL = "\xEF\x84\xA0";
102 [[maybe_unused]] static const char *FONT_ICON_USER = "\xEF\x80\x87";
103
104 [[maybe_unused]] static const char *FONT_ICON_SLASH = "\xEF\x9C\x95";
105 [[maybe_unused]] static const char *FONT_ICON_PLAY = "\xEF\x81\x8B";
106 [[maybe_unused]] static const char *FONT_ICON_PAUSE = "\xEF\x81\x8C";
107 [[maybe_unused]] static const char *FONT_ICON_STOP = "\xEF\x81\x8D";
108 [[maybe_unused]] static const char *FONT_ICON_CHEVRON_LEFT = "\xEF\x81\x93";
109 [[maybe_unused]] static const char *FONT_ICON_CHEVRON_RIGHT = "\xEF\x81\x94";
110 [[maybe_unused]] static const char *FONT_ICON_CHEVRON_UP = "\xEF\x81\xB7";
111 [[maybe_unused]] static const char *FONT_ICON_CHEVRON_DOWN = "\xEF\x81\xB8";
112 [[maybe_unused]] static const char *FONT_ICON_BACKWARD = "\xEF\x81\x8A";
113 [[maybe_unused]] static const char *FONT_ICON_FORWARD = "\xEF\x81\x8E";
114 [[maybe_unused]] static const char *FONT_ICON_RIGHT_FROM_BRACKET = "\xEF\x8B\xB5";
115 [[maybe_unused]] static const char *FONT_ICON_RIGHT_TO_BRACKET = "\xEF\x8B\xB6";
116 [[maybe_unused]] static const char *FONT_ICON_ARROW_UP_RIGHT_FROM_SQUARE = "\xEF\x82\x8E";
117 [[maybe_unused]] static const char *FONT_ICON_BACKWARD_STEP = "\xEF\x81\x88";
118 [[maybe_unused]] static const char *FONT_ICON_FORWARD_STEP = "\xEF\x81\x91";
119 [[maybe_unused]] static const char *FONT_ICON_BACKWARD_FAST = "\xEF\x81\x89";
120 [[maybe_unused]] static const char *FONT_ICON_FORWARD_FAST = "\xEF\x81\x90";
121 [[maybe_unused]] static const char *FONT_ICON_KEYBOARD = "\xE2\x8C\xA8";
122 [[maybe_unused]] static const char *FONT_ICON_ELLIPSIS = "\xEF\x85\x81";
123
124 [[maybe_unused]] static const char *FONT_ICON_FOLDER = "\xEF\x81\xBB";
125 [[maybe_unused]] static const char *FONT_ICON_FOLDER_OPEN = "\xEF\x81\xBC";
126 [[maybe_unused]] static const char *FONT_ICON_FOLDER_TREE = "\xEF\xA0\x82";
127 [[maybe_unused]] static const char *FONT_ICON_FILM = "\xEF\x80\x88";
128 [[maybe_unused]] static const char *FONT_ICON_VIDEO = "\xEF\x80\xBD";
129 [[maybe_unused]] static const char *FONT_ICON_MAP = "\xEF\x89\xB9";
130 [[maybe_unused]] static const char *FONT_ICON_IMAGE = "\xEF\x80\xBE";
131 [[maybe_unused]] static const char *FONT_ICON_MUSIC = "\xEF\x80\x81";
132 [[maybe_unused]] static const char *FONT_ICON_FILE = "\xEF\x85\x9B";
133
134 [[maybe_unused]] static const char *FONT_ICON_PENCIL = "\xEF\x8C\x83";
135 [[maybe_unused]] static const char *FONT_ICON_TRASH = "\xEF\x87\xB8";
136
137 [[maybe_unused]] static const char *FONT_ICON_ARROWS_LEFT_RIGHT = "\xEF\x8C\xB7";
138 [[maybe_unused]] static const char *FONT_ICON_ARROWS_UP_DOWN = "\xEF\x81\xBD";
139 [[maybe_unused]] static const char *FONT_ICON_CIRCLE_PLAY = "\xEF\x85\x84";
140 [[maybe_unused]] static const char *FONT_ICON_BORDER_ALL = "\xEF\xA1\x8C";
141 [[maybe_unused]] static const char *FONT_ICON_EYE = "\xEF\x81\xAE";
142 [[maybe_unused]] static const char *FONT_ICON_EYE_SLASH = "\xEF\x81\xB0";
143 [[maybe_unused]] static const char *FONT_ICON_EYE_DROPPER = "\xEF\x87\xBB";
144 [[maybe_unused]] static const char *FONT_ICON_COMMENT = "\xEF\x81\xB5";
145 [[maybe_unused]] static const char *FONT_ICON_COMMENT_SLASH = "\xEF\x92\xB3";
146
147 [[maybe_unused]] static const char *FONT_ICON_DICE_ONE = "\xEF\x94\xA5";
148 [[maybe_unused]] static const char *FONT_ICON_DICE_TWO = "\xEF\x94\xA8";
149 [[maybe_unused]] static const char *FONT_ICON_DICE_THREE = "\xEF\x94\xA7";
150 [[maybe_unused]] static const char *FONT_ICON_DICE_FOUR = "\xEF\x94\xA4";
151 [[maybe_unused]] static const char *FONT_ICON_DICE_FIVE = "\xEF\x94\xA3";
152 [[maybe_unused]] static const char *FONT_ICON_DICE_SIX = "\xEF\x94\xA6";
153
154 [[maybe_unused]] static const char *FONT_ICON_LAYER_GROUP = "\xEF\x97\xBD";
155 [[maybe_unused]] static const char *FONT_ICON_UNDO = "\xEF\x8B\xAA";
156 [[maybe_unused]] static const char *FONT_ICON_REDO = "\xEF\x8B\xB9";
157
158 [[maybe_unused]] static const char *FONT_ICON_ARROWS_ROTATE = "\xEF\x80\xA1";
159 [[maybe_unused]] static const char *FONT_ICON_QUESTION = "?";
160
161 [[maybe_unused]] static const char *FONT_ICON_CAMERA = "\xEF\x80\xB0";
162}
163
165{
166 // ignore any kind of selection
168 // calculates the selection based on the mouse press and release cursor position
170 // sets the selection based on the character start and end count(these values have to be decoded character offsets)
172};
173
175{
176 // ignore any kind of cursor
178 // calculates the cursor based on the mouse release cursor position
180 // sets the cursor based on the current character (this value has to be decoded character offset)
182};
183
185{
186 float m_X;
187 float m_Y;
188 float m_W;
189 float m_H;
190
191 float Right() const { return m_X + m_W; }
192 float Bottom() const { return m_Y + m_H; }
193 vec2 Size() const { return vec2(m_W, m_H); }
194 void MoveBy(vec2 Offset)
195 {
196 m_X += Offset.x;
197 m_Y += Offset.y;
198 }
199};
200
201// Allow to render multi colored text in one go without having to call TextEx() multiple times.
202// Needed to allow multi colored multi line texts
204{
205 int m_CharIndex; // Which index within the text should the split occur
206 int m_Length; // How long is the split
207 ColorRGBA m_Color; // The color the text should be starting from m_CharIndex
208
209 STextColorSplit(int CharIndex, int Length, const ColorRGBA &Color) :
210 m_CharIndex(CharIndex), m_Length(Length), m_Color(Color) {}
211};
212
214{
215public:
217 int m_LineCount = 1;
219 int m_CharCount = 0;
220 int m_MaxLines = 0;
221
222 float m_StartX = 0.0f;
223 float m_StartY = 0.0f;
224 float m_LineWidth = -1.0f;
225 float m_X = 0.0f;
226 float m_Y = 0.0f;
228 float m_LongestLineWidth = 0.0f;
229
230 float m_FontSize = 0.0f;
231 float m_AlignedFontSize = 0.0f;
232 float m_LineSpacing = 0.0f;
234
237
238 // these coordinates are respected if selection mode is set to calculate @see ETextCursorSelectionMode
239 vec2 m_PressMouse = vec2(0.0f, 0.0f);
240 // these coordinates are respected if selection/cursor mode is set to calculate @see ETextCursorSelectionMode / @see ETextCursorCursorMode
241 vec2 m_ReleaseMouse = vec2(0.0f, 0.0f);
242
243 // note m_SelectionStart can be bigger than m_SelectionEnd, depending on how the mouse cursor was dragged
244 // also note, that these are the character offsets decoded
247
250 // note this is the decoded character offset
253
257 bool m_Truncated = false;
258
259 // Color splits of the cursor to allow multicolored text
260 std::vector<STextColorSplit> m_vColorSplits;
261
262 float Height() const;
264 void SetPosition(vec2 Position);
265};
266
268{
269 int m_Dummy = 0;
270};
271
273{
275 std::shared_ptr<STextContainerUsages> m_UseCount =
276 std::make_shared<STextContainerUsages>(STextContainerUsages());
277
279 bool Valid() const { return m_Index >= 0; }
280 void Reset() { m_Index = -1; }
281};
282
284{
285 float *m_pHeight = nullptr;
286 float *m_pAlignedFontSize = nullptr;
288 int *m_pLineCount = nullptr;
289};
290
292{
293 MACRO_INTERFACE("textrender")
294public:
295 virtual bool LoadFonts() = 0;
296 virtual void SetFontPreset(EFontPreset FontPreset) = 0;
297 virtual void SetFontLanguageVariant(const char *pLanguageFile) = 0;
298
299 virtual void SetRenderFlags(unsigned Flags) = 0;
300 virtual unsigned GetRenderFlags() const = 0;
301
302 ColorRGBA DefaultTextColor() const { return ColorRGBA(1, 1, 1, 1); }
303 ColorRGBA DefaultTextOutlineColor() const { return ColorRGBA(0, 0, 0, 0.3f); }
304 ColorRGBA DefaultTextSelectionColor() const { return ColorRGBA(1.0f, 1.0f, 1.0f, 0.5f); }
305
306 //
307 virtual void TextEx(CTextCursor *pCursor, const char *pText, int Length = -1) = 0;
308 virtual bool CreateTextContainer(STextContainerIndex &TextContainerIndex, CTextCursor *pCursor, const char *pText, int Length = -1) = 0;
309 virtual void AppendTextContainer(STextContainerIndex TextContainerIndex, CTextCursor *pCursor, const char *pText, int Length = -1) = 0;
310 // either creates a new text container or appends to a existing one
311 virtual bool CreateOrAppendTextContainer(STextContainerIndex &TextContainerIndex, CTextCursor *pCursor, const char *pText, int Length = -1) = 0;
312 // just deletes and creates text container
313 virtual void RecreateTextContainer(STextContainerIndex &TextContainerIndex, CTextCursor *pCursor, const char *pText, int Length = -1) = 0;
314 virtual void RecreateTextContainerSoft(STextContainerIndex &TextContainerIndex, CTextCursor *pCursor, const char *pText, int Length = -1) = 0;
315 virtual void DeleteTextContainer(STextContainerIndex &TextContainerIndex) = 0;
316
317 virtual void UploadTextContainer(STextContainerIndex TextContainerIndex) = 0;
318
319 virtual void RenderTextContainer(STextContainerIndex TextContainerIndex, const ColorRGBA &TextColor, const ColorRGBA &TextOutlineColor) = 0;
320 virtual void RenderTextContainer(STextContainerIndex TextContainerIndex, const ColorRGBA &TextColor, const ColorRGBA &TextOutlineColor, float X, float Y) = 0;
321
323
324 virtual void UploadEntityLayerText(const CImageInfo &TextImage, int TexSubWidth, int TexSubHeight, const char *pText, int Length, float x, float y, int FontSize) = 0;
325 virtual int AdjustFontSize(const char *pText, int TextLength, int MaxSize, int MaxWidth) const = 0;
326 virtual float GetGlyphOffsetX(int FontSize, char TextCharacter) const = 0;
327 virtual int CalculateTextWidth(const char *pText, int TextLength, int FontWidth, int FontSize) const = 0;
328
329 // old foolish interface
330 virtual void TextColor(float r, float g, float b, float a) = 0;
331 virtual void TextColor(ColorRGBA Color) = 0;
332 virtual void TextOutlineColor(float r, float g, float b, float a) = 0;
333 virtual void TextOutlineColor(ColorRGBA Color) = 0;
334 virtual void TextSelectionColor(float r, float g, float b, float a) = 0;
335 virtual void TextSelectionColor(ColorRGBA Color) = 0;
336 virtual void Text(float x, float y, float Size, const char *pText, float LineWidth = -1.0f) = 0;
337 virtual float TextWidth(float Size, const char *pText, int StrLength = -1, float LineWidth = -1.0f, int Flags = 0, const STextSizeProperties &TextSizeProps = {}) = 0;
338 virtual STextBoundingBox TextBoundingBox(float Size, const char *pText, int StrLength = -1, float LineWidth = -1.0f, float LineSpacing = 0.0f, int Flags = 0) = 0;
339
340 virtual ColorRGBA GetTextColor() const = 0;
341 virtual ColorRGBA GetTextOutlineColor() const = 0;
342 virtual ColorRGBA GetTextSelectionColor() const = 0;
343
344 virtual void OnPreWindowResize() = 0;
345 virtual void OnWindowResize() = 0;
346};
347
349{
350 MACRO_INTERFACE("enginetextrender")
351public:
352 virtual void Init() = 0;
353 void Shutdown() override = 0;
354};
355
357
358#endif
Definition image.h:12
Definition textrender.h:214
ETextCursorCursorMode m_CursorMode
Definition textrender.h:248
int m_GlyphCount
Definition textrender.h:218
float m_MaxCharacterHeight
Definition textrender.h:227
vec2 m_CursorRenderedPosition
Definition textrender.h:252
int m_CharCount
Definition textrender.h:219
STextBoundingBox BoundingBox() const
Definition text.cpp:931
float m_LineSpacing
Definition textrender.h:232
vec2 m_ReleaseMouse
Definition textrender.h:241
float Height() const
Definition text.cpp:926
float m_StartX
Definition textrender.h:222
int m_SelectionStart
Definition textrender.h:245
int m_MaxLines
Definition textrender.h:220
int m_Flags
Definition textrender.h:216
float m_LongestLineWidth
Definition textrender.h:228
float m_AlignedLineSpacing
Definition textrender.h:233
float m_LineWidth
Definition textrender.h:224
vec2 m_PressMouse
Definition textrender.h:239
bool m_Truncated
Definition textrender.h:257
int m_SelectionEnd
Definition textrender.h:246
std::vector< STextColorSplit > m_vColorSplits
Definition textrender.h:260
float m_FontSize
Definition textrender.h:230
int m_LineCount
Definition textrender.h:217
void SetPosition(vec2 Position)
Definition text.cpp:936
bool m_ForceCursorRendering
Definition textrender.h:249
float m_Y
Definition textrender.h:226
float m_AlignedFontSize
Definition textrender.h:231
ETextCursorSelectionMode m_CalculateSelectionMode
Definition textrender.h:235
float m_SelectionHeightFactor
Definition textrender.h:236
int m_CursorCharacter
Definition textrender.h:251
float m_X
Definition textrender.h:225
float m_StartY
Definition textrender.h:223
Definition color.h:182
Definition textrender.h:349
virtual void Init()=0
void Shutdown() override=0
IInterface()
Definition kernel.h:19
Definition textrender.h:292
virtual void UploadEntityLayerText(const CImageInfo &TextImage, int TexSubWidth, int TexSubHeight, const char *pText, int Length, float x, float y, int FontSize)=0
ColorRGBA DefaultTextColor() const
Definition textrender.h:302
virtual ColorRGBA GetTextSelectionColor() const =0
virtual void RecreateTextContainer(STextContainerIndex &TextContainerIndex, CTextCursor *pCursor, const char *pText, int Length=-1)=0
virtual ColorRGBA GetTextColor() const =0
virtual void RenderTextContainer(STextContainerIndex TextContainerIndex, const ColorRGBA &TextColor, const ColorRGBA &TextOutlineColor)=0
virtual int CalculateTextWidth(const char *pText, int TextLength, int FontWidth, int FontSize) const =0
virtual void SetRenderFlags(unsigned Flags)=0
virtual unsigned GetRenderFlags() const =0
virtual bool CreateTextContainer(STextContainerIndex &TextContainerIndex, CTextCursor *pCursor, const char *pText, int Length=-1)=0
virtual float TextWidth(float Size, const char *pText, int StrLength=-1, float LineWidth=-1.0f, int Flags=0, const STextSizeProperties &TextSizeProps={})=0
virtual void TextColor(ColorRGBA Color)=0
virtual void RecreateTextContainerSoft(STextContainerIndex &TextContainerIndex, CTextCursor *pCursor, const char *pText, int Length=-1)=0
virtual int AdjustFontSize(const char *pText, int TextLength, int MaxSize, int MaxWidth) const =0
virtual STextBoundingBox GetBoundingBoxTextContainer(STextContainerIndex TextContainerIndex)=0
ColorRGBA DefaultTextOutlineColor() const
Definition textrender.h:303
virtual void OnPreWindowResize()=0
virtual bool CreateOrAppendTextContainer(STextContainerIndex &TextContainerIndex, CTextCursor *pCursor, const char *pText, int Length=-1)=0
virtual void TextOutlineColor(ColorRGBA Color)=0
virtual ColorRGBA GetTextOutlineColor() const =0
virtual void SetFontPreset(EFontPreset FontPreset)=0
virtual void TextEx(CTextCursor *pCursor, const char *pText, int Length=-1)=0
virtual void UploadTextContainer(STextContainerIndex TextContainerIndex)=0
virtual STextBoundingBox TextBoundingBox(float Size, const char *pText, int StrLength=-1, float LineWidth=-1.0f, float LineSpacing=0.0f, int Flags=0)=0
virtual void DeleteTextContainer(STextContainerIndex &TextContainerIndex)=0
virtual void Text(float x, float y, float Size, const char *pText, float LineWidth=-1.0f)=0
virtual bool LoadFonts()=0
virtual void SetFontLanguageVariant(const char *pLanguageFile)=0
virtual void AppendTextContainer(STextContainerIndex TextContainerIndex, CTextCursor *pCursor, const char *pText, int Length=-1)=0
virtual void RenderTextContainer(STextContainerIndex TextContainerIndex, const ColorRGBA &TextColor, const ColorRGBA &TextOutlineColor, float X, float Y)=0
virtual void OnWindowResize()=0
ColorRGBA DefaultTextSelectionColor() const
Definition textrender.h:304
virtual void TextSelectionColor(ColorRGBA Color)=0
virtual void TextSelectionColor(float r, float g, float b, float a)=0
virtual void TextOutlineColor(float r, float g, float b, float a)=0
virtual float GetGlyphOffsetX(int FontSize, char TextCharacter) const =0
virtual void TextColor(float r, float g, float b, float a)=0
T x
Definition vmath.h:19
T y
Definition vmath.h:23
#define MACRO_INTERFACE(Name)
Definition kernel.h:25
Definition textrender.h:67
static const char * FONT_ICON_BACKWARD_FAST
Definition textrender.h:119
static const char * FONT_ICON_FORWARD_STEP
Definition textrender.h:118
static const char * FONT_ICON_VIDEO
Definition textrender.h:128
static const char * FONT_ICON_ARROWS_ROTATE
Definition textrender.h:158
static const char * FONT_ICON_DICE_TWO
Definition textrender.h:148
static const char * FONT_ICON_CHEVRON_RIGHT
Definition textrender.h:109
static const char * FONT_ICON_NEWSPAPER
Definition textrender.h:92
static const char * FONT_ICON_SQUARE_MINUS
Definition textrender.h:84
static const char * FONT_ICON_CHEVRON_DOWN
Definition textrender.h:111
static const char * FONT_ICON_PLUS
Definition textrender.h:69
static const char * FONT_ICON_CHEVRON_UP
Definition textrender.h:110
static const char * FONT_ICON_BAN
Definition textrender.h:81
static const char * FONT_ICON_COMMENT_SLASH
Definition textrender.h:145
static const char * FONT_ICON_KEYBOARD
Definition textrender.h:121
static const char * FONT_ICON_DICE_FIVE
Definition textrender.h:151
static const char * FONT_ICON_BOOKMARK
Definition textrender.h:91
static const char * FONT_ICON_ARROW_ROTATE_RIGHT
Definition textrender.h:79
static const char * FONT_ICON_QUESTION
Definition textrender.h:159
static const char * FONT_ICON_MAGNIFYING_GLASS
Definition textrender.h:72
static const char * FONT_ICON_HEART
Definition textrender.h:73
static const char * FONT_ICON_DICE_SIX
Definition textrender.h:152
static const char * FONT_ICON_FOLDER
Definition textrender.h:124
static const char * FONT_ICON_ARROW_ROTATE_LEFT
Definition textrender.h:78
static const char * FONT_ICON_LOCK
Definition textrender.h:71
static const char * FONT_ICON_ARROW_UP_RIGHT_FROM_SQUARE
Definition textrender.h:116
static const char * FONT_ICON_GEAR
Definition textrender.h:94
static const char * FONT_ICON_PAUSE
Definition textrender.h:106
static const char * FONT_ICON_EYE
Definition textrender.h:141
static const char * FONT_ICON_NETWORK_WIRED
Definition textrender.h:98
static const char * FONT_ICON_STOP
Definition textrender.h:107
static const char * FONT_ICON_EARTH_AMERICAS
Definition textrender.h:97
static const char * FONT_ICON_ARROWS_LEFT_RIGHT
Definition textrender.h:137
static const char * FONT_ICON_LIST_UL
Definition textrender.h:99
static const char * FONT_ICON_FORWARD_FAST
Definition textrender.h:120
static const char * FONT_ICON_STAR
Definition textrender.h:75
static const char * FONT_ICON_HEART_CRACK
Definition textrender.h:74
static const char * FONT_ICON_SORT_DOWN
Definition textrender.h:87
static const char * FONT_ICON_XMARK
Definition textrender.h:76
static const char * FONT_ICON_DICE_ONE
Definition textrender.h:147
static const char * FONT_ICON_MINUS
Definition textrender.h:70
static const char * FONT_ICON_DICE_THREE
Definition textrender.h:149
static const char * FONT_ICON_TRIANGLE_EXCLAMATION
Definition textrender.h:88
static const char * FONT_ICON_MUSIC
Definition textrender.h:131
static const char * FONT_ICON_RIGHT_TO_BRACKET
Definition textrender.h:115
static const char * FONT_ICON_UNDO
Definition textrender.h:155
static const char * FONT_ICON_TRASH
Definition textrender.h:135
static const char * FONT_ICON_CAMERA
Definition textrender.h:161
static const char * FONT_ICON_IMAGE
Definition textrender.h:130
static const char * FONT_ICON_POWER_OFF
Definition textrender.h:93
static const char * FONT_ICON_FORWARD
Definition textrender.h:113
static const char * FONT_ICON_ARROWS_UP_DOWN
Definition textrender.h:138
static const char * FONT_ICON_CIRCLE_PLAY
Definition textrender.h:139
static const char * FONT_ICON_CIRCLE_CHEVRON_DOWN
Definition textrender.h:82
static const char * FONT_ICON_SLASH
Definition textrender.h:104
static const char * FONT_ICON_BORDER_ALL
Definition textrender.h:140
static const char * FONT_ICON_INFO
Definition textrender.h:100
static const char * FONT_ICON_PLAY
Definition textrender.h:105
static const char * FONT_ICON_FLAG_CHECKERED
Definition textrender.h:80
static const char * FONT_ICON_EYE_SLASH
Definition textrender.h:142
static const char * FONT_ICON_CLAPPERBOARD
Definition textrender.h:96
static const char * FONT_ICON_DICE_FOUR
Definition textrender.h:150
static const char * FONT_ICON_CHEVRON_LEFT
Definition textrender.h:108
static const char * FONT_ICON_FOLDER_TREE
Definition textrender.h:126
static const char * FONT_ICON_TERMINAL
Definition textrender.h:101
static const char * FONT_ICON_EYE_DROPPER
Definition textrender.h:143
static const char * FONT_ICON_LAYER_GROUP
Definition textrender.h:154
static const char * FONT_ICON_CIRCLE
Definition textrender.h:77
static const char * FONT_ICON_HOUSE
Definition textrender.h:90
static const char * FONT_ICON_KEY
Definition textrender.h:83
static const char * FONT_ICON_BACKWARD_STEP
Definition textrender.h:117
static const char * FONT_ICON_PEN_TO_SQUARE
Definition textrender.h:95
static const char * FONT_ICON_RIGHT_FROM_BRACKET
Definition textrender.h:114
static const char * FONT_ICON_FILM
Definition textrender.h:127
static const char * FONT_ICON_PENCIL
Definition textrender.h:134
static const char * FONT_ICON_COMMENT
Definition textrender.h:144
static const char * FONT_ICON_SORT_UP
Definition textrender.h:86
static const char * FONT_ICON_MAP
Definition textrender.h:129
static const char * FONT_ICON_FOLDER_OPEN
Definition textrender.h:125
static const char * FONT_ICON_REDO
Definition textrender.h:156
static const char * FONT_ICON_ELLIPSIS
Definition textrender.h:122
static const char * FONT_ICON_SQUARE_PLUS
Definition textrender.h:85
static const char * FONT_ICON_BACKWARD
Definition textrender.h:112
static const char * FONT_ICON_USER
Definition textrender.h:102
static const char * FONT_ICON_FILE
Definition textrender.h:132
Definition textrender.h:185
void MoveBy(vec2 Offset)
Definition textrender.h:194
vec2 Size() const
Definition textrender.h:193
float m_W
Definition textrender.h:188
float m_X
Definition textrender.h:186
float m_Y
Definition textrender.h:187
float Right() const
Definition textrender.h:191
float Bottom() const
Definition textrender.h:192
float m_H
Definition textrender.h:189
STextColorSplit(int CharIndex, int Length, const ColorRGBA &Color)
Definition textrender.h:209
ColorRGBA m_Color
Definition textrender.h:207
int m_CharIndex
Definition textrender.h:205
int m_Length
Definition textrender.h:206
Definition textrender.h:273
std::shared_ptr< STextContainerUsages > m_UseCount
Definition textrender.h:275
bool Valid() const
Definition textrender.h:279
STextContainerIndex()
Definition textrender.h:278
void Reset()
Definition textrender.h:280
int m_Index
Definition textrender.h:274
Definition textrender.h:268
int m_Dummy
Definition textrender.h:269
Definition textrender.h:284
float * m_pHeight
Definition textrender.h:285
int * m_pLineCount
Definition textrender.h:288
float * m_pMaxCharacterHeightInLine
Definition textrender.h:287
float * m_pAlignedFontSize
Definition textrender.h:286
ETextCursorSelectionMode
Definition textrender.h:165
@ TEXT_CURSOR_SELECTION_MODE_SET
Definition textrender.h:171
@ TEXT_CURSOR_SELECTION_MODE_CALCULATE
Definition textrender.h:169
@ TEXT_CURSOR_SELECTION_MODE_NONE
Definition textrender.h:167
ETextRenderFlags
Definition textrender.h:46
@ TEXT_RENDER_FLAG_KERNING
Definition textrender.h:51
@ TEXT_RENDER_FLAG_NO_AUTOMATIC_QUAD_UPLOAD
Definition textrender.h:55
@ TEXT_RENDER_FLAG_NO_FIRST_CHARACTER_X_BEARING
Definition textrender.h:53
@ TEXT_RENDER_FLAG_ONLY_ADVANCE_WIDTH
Definition textrender.h:49
@ TEXT_RENDER_FLAG_NO_X_BEARING
Definition textrender.h:47
@ TEXT_RENDER_FLAG_NO_OVERSIZE
Definition textrender.h:52
@ TEXT_RENDER_FLAG_NO_LAST_CHARACTER_ADVANCE
Definition textrender.h:54
@ TEXT_RENDER_FLAG_NO_PIXEL_ALIGNMENT
Definition textrender.h:50
@ TEXT_RENDER_FLAG_ONE_TIME_USE
Definition textrender.h:57
@ TEXT_RENDER_FLAG_NO_Y_BEARING
Definition textrender.h:48
@ TEXTFLAG_STOP_AT_END
Definition textrender.h:18
@ TEXTFLAG_ELLIPSIS_AT_END
Definition textrender.h:19
@ TEXTFLAG_DISALLOW_NEWLINE
Definition textrender.h:17
@ TEXTFLAG_RENDER
Definition textrender.h:16
IEngineTextRender * CreateEngineTextRender()
Definition text.cpp:2343
ETextAlignment
Definition textrender.h:23
@ TEXTALIGN_MASK_VERTICAL
Definition textrender.h:42
@ TEXTALIGN_RIGHT
Definition textrender.h:26
@ TEXTALIGN_MASK_HORIZONTAL
Definition textrender.h:41
@ TEXTALIGN_MC
Definition textrender.h:35
@ TEXTALIGN_ML
Definition textrender.h:34
@ TEXTALIGN_BC
Definition textrender.h:38
@ TEXTALIGN_TL
Definition textrender.h:31
@ TEXTALIGN_BR
Definition textrender.h:39
@ TEXTALIGN_MR
Definition textrender.h:36
@ TEXTALIGN_TR
Definition textrender.h:33
@ TEXTALIGN_TC
Definition textrender.h:32
@ TEXTALIGN_LEFT
Definition textrender.h:24
@ TEXTALIGN_TOP
Definition textrender.h:27
@ TEXTALIGN_BL
Definition textrender.h:37
@ TEXTALIGN_BOTTOM
Definition textrender.h:29
@ TEXTALIGN_CENTER
Definition textrender.h:25
@ TEXTALIGN_MIDDLE
Definition textrender.h:28
EFontPreset
Definition textrender.h:61
@ DEFAULT_FONT
Definition textrender.h:62
@ ICON_FONT
Definition textrender.h:63
ETextCursorCursorMode
Definition textrender.h:175
@ TEXT_CURSOR_CURSOR_MODE_SET
Definition textrender.h:181
@ TEXT_CURSOR_CURSOR_MODE_NONE
Definition textrender.h:177
@ TEXT_CURSOR_CURSOR_MODE_CALCULATE
Definition textrender.h:179
vector2_base< float > vec2
Definition vmath.h:161