DDraceNetwork Docs
textrender.h File Reference
#include "kernel.h"
#include <base/color.h>
#include <engine/graphics.h>
#include <cstdint>
#include <memory>
Include dependency graph for textrender.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  STextBoundingBox
 
struct  STextColorSplit
 
class  CTextCursor
 
struct  STextContainerUsages
 
struct  STextContainerIndex
 
struct  STextSizeProperties
 
class  ITextRender
 
class  IEngineTextRender
 

Namespaces

namespace  FontIcons
 

Enumerations

enum  { TEXTFLAG_RENDER = 1 << 0 , TEXTFLAG_DISALLOW_NEWLINE = 1 << 1 , TEXTFLAG_STOP_AT_END = 1 << 2 , TEXTFLAG_ELLIPSIS_AT_END = 1 << 3 }
 
enum  ETextAlignment {
  TEXTALIGN_LEFT = 0 , TEXTALIGN_CENTER = 1 << 1 , TEXTALIGN_RIGHT = 1 << 2 , TEXTALIGN_TOP = 0 ,
  TEXTALIGN_MIDDLE = 1 << 3 , TEXTALIGN_BOTTOM = 1 << 4 , TEXTALIGN_TL = TEXTALIGN_TOP | TEXTALIGN_LEFT , TEXTALIGN_TC = TEXTALIGN_TOP | TEXTALIGN_CENTER ,
  TEXTALIGN_TR = TEXTALIGN_TOP | TEXTALIGN_RIGHT , TEXTALIGN_ML = TEXTALIGN_MIDDLE | TEXTALIGN_LEFT , TEXTALIGN_MC = TEXTALIGN_MIDDLE | TEXTALIGN_CENTER , TEXTALIGN_MR = TEXTALIGN_MIDDLE | TEXTALIGN_RIGHT ,
  TEXTALIGN_BL = TEXTALIGN_BOTTOM | TEXTALIGN_LEFT , TEXTALIGN_BC = TEXTALIGN_BOTTOM | TEXTALIGN_CENTER , TEXTALIGN_BR = TEXTALIGN_BOTTOM | TEXTALIGN_RIGHT , TEXTALIGN_MASK_HORIZONTAL = TEXTALIGN_LEFT | TEXTALIGN_CENTER | TEXTALIGN_RIGHT ,
  TEXTALIGN_MASK_VERTICAL = TEXTALIGN_TOP | TEXTALIGN_MIDDLE | TEXTALIGN_BOTTOM
}
 
enum  ETextRenderFlags {
  TEXT_RENDER_FLAG_NO_X_BEARING = 1 << 0 , TEXT_RENDER_FLAG_NO_Y_BEARING = 1 << 1 , TEXT_RENDER_FLAG_ONLY_ADVANCE_WIDTH = 1 << 2 , TEXT_RENDER_FLAG_NO_PIXEL_ALIGMENT = 1 << 3 ,
  TEXT_RENDER_FLAG_KERNING = 1 << 4 , TEXT_RENDER_FLAG_NO_OVERSIZE = 1 << 5 , TEXT_RENDER_FLAG_NO_FIRST_CHARACTER_X_BEARING = 1 << 6 , TEXT_RENDER_FLAG_NO_LAST_CHARACTER_ADVANCE = 1 << 7 ,
  TEXT_RENDER_FLAG_NO_AUTOMATIC_QUAD_UPLOAD = 1 << 8 , TEXT_RENDER_FLAG_ONE_TIME_USE = 1 << 9
}
 
enum class  EFontPreset { DEFAULT_FONT , ICON_FONT }
 
enum  ETextCursorSelectionMode { TEXT_CURSOR_SELECTION_MODE_NONE = 0 , TEXT_CURSOR_SELECTION_MODE_CALCULATE , TEXT_CURSOR_SELECTION_MODE_SET }
 
enum  ETextCursorCursorMode { TEXT_CURSOR_CURSOR_MODE_NONE = 0 , TEXT_CURSOR_CURSOR_MODE_CALCULATE , TEXT_CURSOR_CURSOR_MODE_SET }
 

Functions

IEngineTextRenderCreateEngineTextRender ()
 

Variables

static MAYBE_UNUSED const char * FontIcons::FONT_ICON_PLUS = "+"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_MINUS = "-"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_LOCK = "\xEF\x80\xA3"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_MAGNIFYING_GLASS = "\xEF\x80\x82"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_HEART = "\xEF\x80\x84"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_STAR = "\xEF\x80\x85"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_XMARK = "\xEF\x80\x8D"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_CIRCLE = "\xEF\x84\x91"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_ARROW_ROTATE_LEFT = "\xEF\x83\xA2"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_ARROW_ROTATE_RIGHT = "\xEF\x80\x9E"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_FLAG_CHECKERED = "\xEF\x84\x9E"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_BAN = "\xEF\x81\x9E"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_CIRCLE_CHEVRON_DOWN = "\xEF\x84\xBA"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_SQUARE_MINUS = "\xEF\x85\x86"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_SQUARE_PLUS = "\xEF\x83\xBE"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_SORT_UP = "\xEF\x83\x9E"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_SORT_DOWN = "\xEF\x83\x9D"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_HOUSE = "\xEF\x80\x95"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_NEWSPAPER = "\xEF\x87\xAA"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_POWER_OFF = "\xEF\x80\x91"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_GEAR = "\xEF\x80\x93"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_PEN_TO_SQUARE = "\xEF\x81\x84"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_CLAPPERBOARD = "\xEE\x84\xB1"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_EARTH_AMERICAS = "\xEF\x95\xBD"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_NETWORK_WIRED = "\xEF\x9B\xBF"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_LIST_UL = "\xEF\x83\x8A"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_INFO = "\xEF\x84\xA9"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_TERMINAL = "\xEF\x84\xA0"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_SLASH = "\xEF\x9C\x95"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_PLAY = "\xEF\x81\x8B"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_PAUSE = "\xEF\x81\x8C"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_STOP = "\xEF\x81\x8D"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_CHEVRON_LEFT = "\xEF\x81\x93"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_CHEVRON_RIGHT = "\xEF\x81\x94"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_CHEVRON_UP = "\xEF\x81\xB7"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_CHEVRON_DOWN = "\xEF\x81\xB8"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_BACKWARD = "\xEF\x81\x8A"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_FORWARD = "\xEF\x81\x8E"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_RIGHT_FROM_BRACKET = "\xEF\x8B\xB5"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_RIGHT_TO_BRACKET = "\xEF\x8B\xB6"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_ARROW_UP_RIGHT_FROM_SQUARE = "\xEF\x82\x8E"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_BACKWARD_STEP = "\xEF\x81\x88"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_FORWARD_STEP = "\xEF\x81\x91"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_BACKWARD_FAST = "\xEF\x81\x89"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_FORWARD_FAST = "\xEF\x81\x90"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_KEYBOARD = "\xE2\x8C\xA8"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_ELLIPSIS = "\xEF\x85\x81"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_FOLDER = "\xEF\x81\xBB"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_FOLDER_OPEN = "\xEF\x81\xBC"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_FOLDER_TREE = "\xEF\xA0\x82"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_FILM = "\xEF\x80\x88"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_VIDEO = "\xEF\x80\xBD"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_MAP = "\xEF\x89\xB9"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_IMAGE = "\xEF\x80\xBE"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_MUSIC = "\xEF\x80\x81"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_FILE = "\xEF\x85\x9B"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_PENCIL = "\xEF\x8C\x83"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_TRASH = "\xEF\x87\xB8"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_ARROWS_LEFT_RIGHT = "\xEF\x8C\xB7"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_ARROWS_UP_DOWN = "\xEF\x81\xBD"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_CIRCLE_PLAY = "\xEF\x85\x84"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_BORDER_ALL = "\xEF\xA1\x8C"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_EYE = "\xEF\x81\xAE"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_EYE_SLASH = "\xEF\x81\xB0"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_EYE_DROPPER = "\xEF\x87\xBB"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_DICE_ONE = "\xEF\x94\xA5"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_DICE_TWO = "\xEF\x94\xA8"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_DICE_THREE = "\xEF\x94\xA7"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_DICE_FOUR = "\xEF\x94\xA4"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_DICE_FIVE = "\xEF\x94\xA3"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_DICE_SIX = "\xEF\x94\xA6"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_LAYER_GROUP = "\xEF\x97\xBD"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_UNDO = "\xEF\x8B\xAA"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_REDO = "\xEF\x8B\xB9"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_ARROWS_ROTATE = "\xEF\x80\xA1"
 
static MAYBE_UNUSED const char * FontIcons::FONT_ICON_QUESTION = "?"
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
TEXTFLAG_RENDER 
TEXTFLAG_DISALLOW_NEWLINE 
TEXTFLAG_STOP_AT_END 
TEXTFLAG_ELLIPSIS_AT_END 

◆ EFontPreset

enum class EFontPreset
strong
Enumerator
DEFAULT_FONT 
ICON_FONT 

◆ ETextAlignment

Enumerator
TEXTALIGN_LEFT 
TEXTALIGN_CENTER 
TEXTALIGN_RIGHT 
TEXTALIGN_TOP 
TEXTALIGN_MIDDLE 
TEXTALIGN_BOTTOM 
TEXTALIGN_TL 
TEXTALIGN_TC 
TEXTALIGN_TR 
TEXTALIGN_ML 
TEXTALIGN_MC 
TEXTALIGN_MR 
TEXTALIGN_BL 
TEXTALIGN_BC 
TEXTALIGN_BR 
TEXTALIGN_MASK_HORIZONTAL 
TEXTALIGN_MASK_VERTICAL 

◆ ETextCursorCursorMode

Enumerator
TEXT_CURSOR_CURSOR_MODE_NONE 
TEXT_CURSOR_CURSOR_MODE_CALCULATE 
TEXT_CURSOR_CURSOR_MODE_SET 

◆ ETextCursorSelectionMode

Enumerator
TEXT_CURSOR_SELECTION_MODE_NONE 
TEXT_CURSOR_SELECTION_MODE_CALCULATE 
TEXT_CURSOR_SELECTION_MODE_SET 

◆ ETextRenderFlags

Enumerator
TEXT_RENDER_FLAG_NO_X_BEARING 
TEXT_RENDER_FLAG_NO_Y_BEARING 
TEXT_RENDER_FLAG_ONLY_ADVANCE_WIDTH 
TEXT_RENDER_FLAG_NO_PIXEL_ALIGMENT 
TEXT_RENDER_FLAG_KERNING 
TEXT_RENDER_FLAG_NO_OVERSIZE 
TEXT_RENDER_FLAG_NO_FIRST_CHARACTER_X_BEARING 
TEXT_RENDER_FLAG_NO_LAST_CHARACTER_ADVANCE 
TEXT_RENDER_FLAG_NO_AUTOMATIC_QUAD_UPLOAD 
TEXT_RENDER_FLAG_ONE_TIME_USE 

Function Documentation

◆ CreateEngineTextRender()

IEngineTextRender * CreateEngineTextRender ( )