iPlug2 - C++ Audio Plug-in Framework
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
IText Struct Reference

IText is used to manage font and text/text entry style for a piece of text on the UI, independent of draw class/platform. More...

#include <IGraphicsStructs.h>

Public Member Functions

 IText (float size=DEFAULT_TEXT_SIZE, const IColor &color=DEFAULT_TEXT_FGCOLOR, const char *fontID=nullptr, EAlign align=EAlign::Center, EVAlign valign=EVAlign::Middle, float angle=0, const IColor &TEBGColor=DEFAULT_TEXTENTRY_BGCOLOR, const IColor &TEFGColor=DEFAULT_TEXTENTRY_FGCOLOR)
 Create a new IText with size, color, fontID ... More...
 
 IText (float size, EVAlign valign, const IColor &color=DEFAULT_TEXT_FGCOLOR)
 Create a new IText with size, vertical align, color. More...
 
 IText (float size, EAlign align, const IColor &color=DEFAULT_TEXT_FGCOLOR)
 Create a new IText with size, horizontal align, color. More...
 
 IText (float size, const char *fontID)
 Create a new IText with size and fontID. More...
 
IText WithFGColor (const IColor &fgColor) const
 
IText WithTEColors (const IColor &teBgColor, const IColor &teFgColor) const
 
IText WithAlign (EAlign align) const
 
IText WithVAlign (EVAlign valign) const
 
IText WithSize (float size) const
 
IText WithAngle (float v) const
 
IText WithFont (const char *fontID) const
 

Public Attributes

char mFont [FONT_LEN]
 
float mSize
 
IColor mFGColor
 
IColor mTextEntryBGColor
 
IColor mTextEntryFGColor
 
float mAngle = 0.f
 
EAlign mAlign = EAlign::Near
 
EVAlign mVAlign = EVAlign::Middle
 

Detailed Description

IText is used to manage font and text/text entry style for a piece of text on the UI, independent of draw class/platform.

Definition at line 661 of file IGraphicsStructs.h.

Constructor & Destructor Documentation

◆ IText() [1/4]

IText::IText ( float  size = DEFAULT_TEXT_SIZE,
const IColor color = DEFAULT_TEXT_FGCOLOR,
const char *  fontID = nullptr,
EAlign  align = EAlign::Center,
EVAlign  valign = EVAlign::Middle,
float  angle = 0,
const IColor TEBGColor = DEFAULT_TEXTENTRY_BGCOLOR,
const IColor TEFGColor = DEFAULT_TEXTENTRY_FGCOLOR 
)
inline

Create a new IText with size, color, fontID ...

Parameters
sizeThe size of the text
colorThe color of the text
fontCString for the font name or nullptr for DEFAULT_FONT
alignHorizontal alignment
valignVertical alignment
angleAngle of the text in in degrees clockwise where 0 is normal, horizontal
TEBGColorBackground color for text entry
TEFGColorForeground color for text entry

Definition at line 672 of file IGraphicsStructs.h.

◆ IText() [2/4]

IText::IText ( float  size,
EVAlign  valign,
const IColor color = DEFAULT_TEXT_FGCOLOR 
)
inline

Create a new IText with size, vertical align, color.

Parameters
sizeThe size of the text
valignVertical alignment
colorThe color of the text

Definition at line 695 of file IGraphicsStructs.h.

◆ IText() [3/4]

IText::IText ( float  size,
EAlign  align,
const IColor color = DEFAULT_TEXT_FGCOLOR 
)
inline

Create a new IText with size, horizontal align, color.

Parameters
sizeThe size of the text
alignHorizontal alignment
colorThe color of the text

Definition at line 707 of file IGraphicsStructs.h.

◆ IText() [4/4]

IText::IText ( float  size,
const char *  fontID 
)
inline

Create a new IText with size and fontID.

Parameters
sizeThe size of the text
fontIDCString used to identify the font

Definition at line 718 of file IGraphicsStructs.h.

Member Function Documentation

◆ WithAlign()

IText IText::WithAlign ( EAlign  align) const
inline

Definition at line 727 of file IGraphicsStructs.h.

◆ WithAngle()

IText IText::WithAngle ( float  v) const
inline

Definition at line 730 of file IGraphicsStructs.h.

◆ WithFGColor()

IText IText::WithFGColor ( const IColor fgColor) const
inline

Definition at line 725 of file IGraphicsStructs.h.

◆ WithFont()

IText IText::WithFont ( const char *  fontID) const
inline

Definition at line 731 of file IGraphicsStructs.h.

◆ WithSize()

IText IText::WithSize ( float  size) const
inline

Definition at line 729 of file IGraphicsStructs.h.

◆ WithTEColors()

IText IText::WithTEColors ( const IColor teBgColor,
const IColor teFgColor 
) const
inline

Definition at line 726 of file IGraphicsStructs.h.

◆ WithVAlign()

IText IText::WithVAlign ( EVAlign  valign) const
inline

Definition at line 728 of file IGraphicsStructs.h.

Member Data Documentation

◆ mAlign

EAlign IText::mAlign = EAlign::Near

Definition at line 739 of file IGraphicsStructs.h.

◆ mAngle

float IText::mAngle = 0.f

Definition at line 738 of file IGraphicsStructs.h.

◆ mFGColor

IColor IText::mFGColor

Definition at line 735 of file IGraphicsStructs.h.

◆ mFont

char IText::mFont[FONT_LEN]

Definition at line 733 of file IGraphicsStructs.h.

◆ mSize

float IText::mSize

Definition at line 734 of file IGraphicsStructs.h.

◆ mTextEntryBGColor

IColor IText::mTextEntryBGColor

Definition at line 736 of file IGraphicsStructs.h.

◆ mTextEntryFGColor

IColor IText::mTextEntryFGColor

Definition at line 737 of file IGraphicsStructs.h.

◆ mVAlign

EVAlign IText::mVAlign = EVAlign::Middle

Definition at line 740 of file IGraphicsStructs.h.


The documentation for this struct was generated from the following file: