64# define GLS_TEXT_SET_GEOMETRY_REFRESH GeometryRefresh();
66# define GLS_TEXT_SET_GEOMETRY_REFRESH
70#define SET_ALL_CHARS( attribute, value ) \
72 for( CharAttrCont_t::iterator i = _chars.begin(); i != _chars.end(); ++i ) \
74 i->attribute = value; \
76 GLS_TEXT_SET_GEOMETRY_REFRESH \
86class GlsGloFileAttribute;
90class RuntimeGlyphGenerationText;
95 GLS_TEXT_BORDER = GLS_LAST_INITIALIZER + 1,
98 GLS_TEXT_CONSTRAIN_CELL_RATIO,
99 GLS_TEXT_CONTROL_CELL_SIZE,
102 GLS_TEXT_LINESPACING,
103 GLS_TEXT_LOCK_CELL_SIZE,
109 GLS_LAST_TEXT_INITIALIZER = GLS_TEXT_WRAP
156 DISTI_DEPRECATED(
"This identifier is forbidden by the C++ standard. Use BaseClass instead." )
453#if !defined( GCC_2_95 )
531 String( std::string( s ) );
628 const float segmentX1,
629 const float segmentX2,
630 const float segmentY,
631 const float segmentThickness,
632 const float segmentShadowOffsetX,
633 const float segmentShadowOffsetY,
641 ,
color( segmentColor )
743 glBegin( GL_POLYGON );
744 glVertex2f( x1, y1 );
745 glVertex2f( x1, y2 );
746 glVertex2f( x2, y2 );
747 glVertex2f( x2, y1 );
771 virtual GLS_EXPORT void OnCellDimensionChanged()
790 j = disti::GlsText::LEFT;
792 else if( str ==
"CENTER" )
794 j = disti::GlsText::CENTER;
796 else if( str ==
"RIGHT" )
798 j = disti::GlsText::RIGHT;
811 case disti::GlsText::LEFT:
814 case disti::GlsText::CENTER:
817 case disti::GlsText::RIGHT:
834 DISTI_DEPRECATED(
"This identifier is forbidden by the C++ standard. Use BaseClass instead." )
Definition: disti_metadata.h:87
virtual void Rotate(float angle, int axis=Z_AXIS)
Definition: gls_metadata_attributes.h:733
DistiAttribDict * _dict
An observing pointer to a dictionary of attributes.
Definition: gls_metadata_attributes.h:735
virtual std::istream & ReadValue(std::istream &instr) override
virtual std::ostream & WriteValue(std::ostream &outstr) override
Definition: dynamic_array.h:79
The Polygon class. Implements Polygons.
Definition: glpolygon.h:56
Definition: gls_color.h:54
Definition: gls_font_base.h:87
std::string Family() const
Definition: gls_font_base.h:275
Definition: gls_glo_file.h:1243
Definition: gls_runtime_font_base.h:67
Definition: gls_text.h:832
GlsText::CharAttr_t _charAttr
Character attribute structure to apply to text.
Definition: gls_text.h:884
virtual std::istream & ReadValue(std::istream &instr) override
Definition: gls_text.h:860
GlsText * _text
Observing pointer to the text object holding the attributes.
Definition: gls_text.h:883
virtual bool OkToWrite() const override
Definition: gls_text.h:849
virtual std::ostream & WriteValue(std::ostream &outstr) override
Definition: gls_text.h:854
Definition: gls_text.h:599
float x2
Right side of the segment.
Definition: gls_text.h:602
float x1
Left side of the segment.
Definition: gls_text.h:601
float shadowOffsetY
Y offset of the shadow in logical units.
Definition: gls_text.h:606
LineSegment_t(const float segmentX1, const float segmentX2, const float segmentY, const float segmentThickness, const float segmentShadowOffsetX, const float segmentShadowOffsetY, const GlsColor &segmentColor)
Definition: gls_text.h:627
float thickness
Thickness of the segment in logical units.
Definition: gls_text.h:604
GlsColor color
Color the segment is to be drawn.
Definition: gls_text.h:607
float y
Vertical position of the segment.
Definition: gls_text.h:603
float shadowOffsetX
X offset of the shadow in logical units.
Definition: gls_text.h:605
Definition: gls_text.h:154
void CharScaling(const float &newScale)
static const Vector XAXIS
Vector for the global X axis.
Definition: gls_text.h:649
float _cellWidth
Definition: gls_text.h:669
void BgColor(const GlsColor &color)
virtual void String(const std::string &s)
GlsColor _haloColor
Definition: gls_text.h:685
void Baseline(const float &baselineShift)
bool Shadow() const
Definition: gls_text.h:474
Justify_t
Different text justifications.
Definition: gls_text.h:171
char * FormatVarArgList(const int initialBufferLength, const char *format, va_list args)
float CellHeight() const
Definition: gls_text.h:260
std::vector< CharAttr_t > CharAttrCont_t
Typedef for a list of character attributes.
Definition: gls_text.h:647
virtual bool RequiresFontFile() const
Definition: gls_text.h:591
CharAttr_t CharAttr(unsigned int index) const
Definition: gls_text.h:297
void ConstrainCellRatio(bool constrain)
float _lineSpacing
Definition: gls_text.h:691
void CellHeight(float height)
void ControlCellSize(bool control)
virtual void Rotate(const Vector &orig, float angle, const Vector &axis) override
void Font(GlsFontBase *font)
Vector _shadowOffset
Definition: gls_text.h:711
virtual void SetAvailableAttributes(unsigned int value) override
void Border(const float &units)
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *array) override
GlsText(const GlsText &that, const bool generateNames)
GlsColor ShadowColor() const
Definition: gls_text.h:485
void CharSpacing(const float &horizontalSpacing)
float Border() const
Definition: gls_text.h:245
float _border
Definition: gls_text.h:658
virtual void SetValue(int spec, va_list &args) override
float CellWidth() const
Definition: gls_text.h:274
bool _uppercase
Definition: gls_text.h:717
virtual void String(const char *s)
Definition: gls_text.h:529
ScopedPtr< RuntimeGlyphGenerationText > _runtimeGlyphGenerationText
Definition: gls_text.h:767
void Inverse(const bool &inverse)
bool Halo() const
Definition: gls_text.h:386
bool _needToRebuild
Definition: gls_text.h:703
GlsFontBase * Font() const
Definition: gls_text.h:365
bool ConstrainCellRatio() const
Definition: gls_text.h:330
void Justify(Justify_t justification)
void Underline(const bool &underline)
float _cellHeight
Definition: gls_text.h:666
void Uppercase(bool uppercase)
float LineSpacing() const
Definition: gls_text.h:434
void SetRebuild()
Definition: gls_text.h:583
static const Char_t EOL
Carriage return (end of line) character.
Definition: gls_text.h:162
void StrikeThru(const bool &strike)
Vertex _currentVertices[NUM_VERTICES]
The corners of the text object.
Definition: gls_text.h:663
void LineSpacing(float spacing)
static const Vector YAXIS
Vector for the global Y axis.
Definition: gls_text.h:650
void RecalcDirectionVectors()
CharAttrCont_t _chars
Definition: gls_text.h:661
bool ControlCellSize() const
Definition: gls_text.h:344
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL) override
virtual void CopyProperties(DisplayObject *src) override
bool WrapText() const
Definition: gls_text.h:577
bool _halo
Whether or not the halo effect is on.
Definition: gls_text.h:682
bool LockCellSize() const
Definition: gls_text.h:448
bool _shadow
Whether or not the shadow effect is on.
Definition: gls_text.h:705
void LockCellSize(bool lock)
CharAttr_t CharAttribs() const
Definition: gls_text.h:290
GlsColor HaloColor() const
Definition: gls_text.h:397
static Vertex INITIAL_VERTICES[NUM_VERTICES]
Default corners for new text objects.
Definition: gls_text.h:652
bool _lockCellSize
Definition: gls_text.h:698
bool _wrapText
Definition: gls_text.h:729
bool _constrainRatio
Definition: gls_text.h:674
GlsFontBase::Char_t Char_t
Typedef shorthand for GlsFontBase::Char_t.
Definition: gls_text.h:160
GlsColor _shadowColor
Definition: gls_text.h:708
void CellWidth(float width)
void ShadowColor(const GlsColor &color)
void TextColor(const GlsColor &color)
void FauxBold(const bool &bold)
Vector _vZ
Definition: gls_text.h:726
Vector ShadowOffset()
Definition: gls_text.h:508
GlsFontBase * _font
Definition: gls_text.h:680
void ShadowDistance(const float &dist)
Definition: gls_text.h:495
Justify_t Justify() const
Definition: gls_text.h:422
virtual void CopyGeometry(DisplayObject *src) override
void HaloColor(const GlsColor &color)
bool Uppercase() const
Definition: gls_text.h:566
std::string String() const
Definition: gls_text.h:539
bool _controlCellSize
Definition: gls_text.h:677
static void DrawScalableLine(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
Definition: gls_text.h:740
Justify_t _justify
Definition: gls_text.h:688
void ShadowOffset(const Vector &offset)
std::string _text
Definition: gls_text.h:714
Vector _vX
Definition: gls_text.h:720
Vector _vY
Definition: gls_text.h:723
Definition: gls_unicode_font_base.h:66
The disti::GLPolygon class. Implements Polygons.
The Color class: Implements a 4 component RGBA color.
Macros and helper code to determine what subset of C++11/14/17 is available.
#define DISTI_SPECIAL_MEM_FUN_DELETE
Macro to wrap function deletion, removed on compilers that don't support it.
Definition: gls_cpp_lang_support.h:235
#define DISTI_DEPRECATED(msg)
Defines whether this compiler supports the C++14 deprecated attribute.
Definition: gls_cpp_lang_support.h:457
#define DISTI_METHOD_OVERRIDE
Macro to wrap the override keyword, removed on compilers that don't support it.
Definition: gls_cpp_lang_support.h:214
The disti::GlsFontBase class and related classes.
The disti::GlsFontMan class.
#define GLS_RUNTIME_FONT_NAME_PREFIX
Definition: gls_font_man.h:53
#define GLS_UNICODE_FONT_NAME_PREFIX
Definition: gls_font_man.h:50
#define GLS_EXPORT
Macro denoting which functions should be visible from the runtime library.
Definition: gls_include.h:52
The disti::GlsRuntimeFontBase class and related classes.
std::istream & operator>>(std::istream &instr, disti::GlsText::CharAttr_t &c)
std::ostream & operator<<(std::ostream &outstr, const disti::GlsText::CharAttr_t &c)
The disti::GlsUnicodeFontBase class and related classes.
Force inclusion of the DirectShow library.
Definition: bmpimage.h:47
std::ostream & operator<<(std::ostream &outstr, const AttributeName &name)
GlsRuntimeFontBase * GetGlsRuntimeFontBase(const GlsFontBase *font)
Definition: gls_text.h:116
VertexNoColor Vector
Definition: gls_font_base.h:69
GlsTextInitializers_t
Initializers for text.
Definition: gls_text.h:94
std::istream & operator>>(std::istream &instr, GlsColor &color)
const GlsUnicodeFontBase * GetGlsUnicodeFontBase(const GlsFontBase *font)
Definition: gls_text.h:134
A smart pointer with unique ownership – poor man's std::unique_ptr.
Attributes for each character position in the grid.
Definition: gls_text.h:179
bool fauxBold
Whether or not faux bold is enabled.
Definition: gls_text.h:184
GlsColor bgColor
The background color.
Definition: gls_text.h:182
float scale
Scaled size of this character.
Definition: gls_text.h:186
bool inverse
Whether or not inverse is enabled.
Definition: gls_text.h:185
CharAttr_t & operator=(const CharAttr_t &r)
Char_t code
The code point for this character.
Definition: gls_text.h:180
float baselineShift
The base line shift in pixels.
Definition: gls_text.h:181
bool underline
Whether or not underline is enabled.
Definition: gls_text.h:189
void Clear()
Reset values to their defaults.
CharAttr_t(const CharAttr_t &r)
float spacing
Scale of spacing between this character.
Definition: gls_text.h:187
GlsColor fgColor
The foreground (glyph itself) color.
Definition: gls_text.h:183
bool strikeThru
Whether or not strike through is enabled.
Definition: gls_text.h:188
The DistiUnhideGlobalsDummyClass class.