63 # define GLS_TEXT_SET_GEOMETRY_REFRESH GeometryRefresh();
65 # define GLS_TEXT_SET_GEOMETRY_REFRESH
68 #define SET_ALL_CHARS( attribute, value ) \
70 for( CharAttrCont_t::iterator i = _chars.begin(); i != _chars.end(); ++i ) \
72 i->attribute = value; \
74 GLS_TEXT_SET_GEOMETRY_REFRESH \
84 class GlsGloFileAttribute;
88 class RuntimeGlyphGenerationText;
93 GLS_TEXT_BORDER = GLS_LAST_INITIALIZER + 1,
96 GLS_TEXT_CONSTRAIN_CELL_RATIO,
97 GLS_TEXT_CONTROL_CELL_SIZE,
100 GLS_TEXT_LINESPACING,
101 GLS_TEXT_LOCK_CELL_SIZE,
107 GLS_LAST_TEXT_INITIALIZER = GLS_TEXT_WRAP
108 } GlsTextInitializers_t;
154 DISTI_DEPRECATED(
"This identifier is forbidden by the C++ standard. Use BaseClass instead." )
158 typedef GlsFontBase::Char_t Char_t;
161 static GLS_EXPORT
const Char_t EOL;
194 GLS_EXPORT CharAttr_t(
const CharAttr_t& r );
197 GLS_EXPORT
void Clear();
200 GLS_EXPORT CharAttr_t& operator=(
const CharAttr_t& r );
205 GLS_EXPORT
GlsText(
const GlsText& that,
const bool generateNames );
219 GLS_EXPORT
void Baseline(
const float& baselineShift );
237 GLS_EXPORT
void Border(
const float& units );
267 GLS_EXPORT
void CellWidth(
float width );
278 GLS_EXPORT
void Char( Char_t code );
301 GLS_EXPORT
void CharScaling(
const float& newScale );
312 GLS_EXPORT
void CharSpacing(
const float& horizontalSpacing );
353 GLS_EXPORT
void Erase();
358 GLS_EXPORT
void FauxBold(
const bool& bold );
387 GLS_EXPORT
void Halo(
bool halo );
397 GLS_EXPORT
void HaloColor(
const GlsColor& color );
399 GlsColor HaloColor()
const
413 GLS_EXPORT
void Inverse(
const bool& inverse );
456 #if !defined( GCC_2_95 )
462 virtual GLS_EXPORT
void Rotate(
const Vector& orig,
float angle,
const Vector& axis ) DISTI_METHOD_OVERRIDE;
465 virtual GLS_EXPORT
void SetValue(
int spec, va_list& args ) DISTI_METHOD_OVERRIDE;
477 GLS_EXPORT
void Shadow(
bool shadow );
487 GLS_EXPORT
void ShadowColor(
const GlsColor& color );
489 GlsColor ShadowColor()
const
509 GLS_EXPORT
void ShadowOffset(
const Vector& offset );
519 GLS_EXPORT
void StrikeThru(
const bool& strike );
528 virtual GLS_EXPORT
void String(
const std::string& s );
535 String( std::string( s ) );
560 GLS_EXPORT
void Underline(
const bool& underline );
569 GLS_EXPORT
void Uppercase(
bool uppercase );
570 bool Uppercase()
const
578 GLS_EXPORT
void WrapText(
bool wrap );
617 , shadowOffsetX( 0.0f )
618 , shadowOffsetY( 0.0f )
623 const float segmentX1,
624 const float segmentX2,
625 const float segmentY,
626 const float segmentThickness,
627 const float segmentShadowOffsetX,
628 const float segmentShadowOffsetY,
633 , thickness( segmentThickness )
634 , shadowOffsetX( segmentShadowOffsetX )
635 , shadowOffsetY( segmentShadowOffsetY )
636 , color( segmentColor )
642 typedef std::vector<CharAttr_t> CharAttrCont_t;
644 static GLS_EXPORT
const Vector XAXIS;
645 static GLS_EXPORT
const Vector YAXIS;
647 static GLS_EXPORT
Vertex INITIAL_VERTICES[ NUM_VERTICES ];
658 Vertex _currentVertices[ NUM_VERTICES ];
743 glBegin( GL_POLYGON );
744 glVertex2f( x1, y1 );
745 glVertex2f( x1, y2 );
746 glVertex2f( x2, y2 );
747 glVertex2f( x2, y1 );
768 GLS_EXPORT
char*
FormatVarArgList(
const int initialBufferLength,
const char* format, va_list args );
774 GLS_EXPORT
void RecalcDirectionVectors();
781 virtual GLS_EXPORT
void OnCellDimensionChanged()
786 void operator=( const
GlsText& ) DISTI_SPECIAL_MEM_FUN_DELETE;
792 inline std::istream& operator>>(
800 j = disti::GlsText::LEFT;
802 else if( str ==
"CENTER" )
804 j = disti::GlsText::CENTER;
806 else if( str ==
"RIGHT" )
808 j = disti::GlsText::RIGHT;
818 case disti::GlsText::LEFT:
821 case disti::GlsText::CENTER:
824 case disti::GlsText::RIGHT:
841 DISTI_DEPRECATED(
"This identifier is forbidden by the C++ standard. Use BaseClass instead." )
861 _charAttr = _text->CharAttr( 0 );
862 return BaseClass::WriteValue( outstr );
869 _charAttr = _text->CharAttr( 0 );
871 BaseClass::ReadValue( instr );
873 _text->Baseline( _charAttr.baselineShift );
874 _text->BgColor( _charAttr.bgColor );
875 _text->CharSpacing( _charAttr.spacing );
876 _text->TextColor( _charAttr.fgColor );
877 _text->FauxBold( _charAttr.fauxBold );
878 _text->Inverse( _charAttr.inverse );
879 _text->CharScaling( _charAttr.scale );
880 _text->StrikeThru( _charAttr.strikeThru );
881 _text->Underline( _charAttr.underline );
The DistiUnhideGlobalsDummyClass class.
Vector _vX
Definition: gls_text.h:717
void ShadowOffset(const Vector &offset)
bool _uppercase
Definition: gls_text.h:714
virtual void CopyProperties(DisplayObject *src) override
#define DISTI_DEPRECATED(msg)
Defines whether this compiler supports the C++14 deprecated attribute.
Definition: gls_cpp_lang_support.h:436
virtual bool OkToWrite() const
Definition: gls_text.h:854
bool ConstrainCellRatio() const
Definition: gls_text.h:327
#define GLS_UNICODE_FONT_NAME_PREFIX
Definition: gls_font_man.h:50
Definition: dynamic_array.h:66
virtual std::istream & ReadValue(std::istream &instr)
Definition: gls_text.h:864
virtual void SetValue(int spec, va_list &args) override
char * FormatVarArgList(const int initialBufferLength, const char *format, va_list args)
The disti::GlsFontBase class and related classes.
The Polygon class. Implements Polygons.
Definition: glpolygon.h:55
bool _constrainRatio
Definition: gls_text.h:669
Attributes for each character position in the grid.
Definition: gls_text.h:177
Justify_t _justify
Definition: gls_text.h:684
virtual bool RequiresFontFile() const
Definition: gls_text.h:594
float LineSpacing() const
Definition: gls_text.h:437
virtual void Rotate(const Vector &orig, float angle, const Vector &axis) override
Definition: gls_text.h:838
void ShadowDistance(const float &dist)
Definition: gls_text.h:499
The disti::GLPolygon class. Implements Polygons.
float _cellHeight
Definition: gls_text.h:661
Definition: gls_text.h:151
std::string _text
Definition: gls_text.h:711
CharAttrCont_t _chars
Definition: gls_text.h:656
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL) override
The Color class: Implements a 4 component RGBA color.
Justify_t
Different text justifications.
Definition: gls_text.h:169
float _lineSpacing
Definition: gls_text.h:687
Definition: gls_glo_file.h:988
Definition: gls_unicode_font_base.h:65
std::ostream & operator<<(std::ostream &outstr, const AttributeName &name)
Defines the stream out operator.
Justify_t Justify() const
Definition: gls_text.h:425
ScopedPtr< RuntimeGlyphGenerationText > _runtimeGlyphGenerationText
Definition: gls_text.h:777
GlsRuntimeFontBase * GetGlsRuntimeFontBase(const GlsFontBase *font)
Definition: gls_text.h:114
float CellWidth() const
Definition: gls_text.h:270
bool LockCellSize() const
Definition: gls_text.h:451
The disti::GlsFontMan class.
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *array) override
VertexNoColor Vector
Definition: gls_font_base.h:66
bool _lockCellSize
Definition: gls_text.h:694
bool _controlCellSize
Definition: gls_text.h:672
float _border
Definition: gls_text.h:653
bool ControlCellSize() const
Definition: gls_text.h:341
CharAttr_t CharAttribs() const
Definition: gls_text.h:286
GlsColor _haloColor
Definition: gls_text.h:681
Definition: gls_runtime_font_base.h:66
static void DrawScalableLine(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
Definition: gls_text.h:736
bool WrapText() const
Definition: gls_text.h:581
Definition: gls_color.h:53
virtual void Rotate(float angle, int axis=Z_AXIS)
GlsFontBase * Font() const
Definition: gls_text.h:366
Vector _vZ
Definition: gls_text.h:723
float _cellWidth
Definition: gls_text.h:664
virtual std::ostream & WriteValue(std::ostream &outstr)
Definition: gls_text.h:859
CharAttr_t CharAttr(unsigned int index) const
Definition: gls_text.h:292
Vector _vY
Definition: gls_text.h:720
GlsFontBase * _font
Definition: gls_text.h:675
Definition: gls_metadata_attributes.h:617
The disti::GlsUnicodeFontBase class and related classes.
std::string String() const
Definition: gls_text.h:543
void SetRebuild()
Definition: gls_text.h:587
A smart pointer with unique ownership – poor man's std::unique_ptr.
virtual void CopyGeometry(DisplayObject *src) override
bool _wrapText
Definition: gls_text.h:726
const GlsUnicodeFontBase * GetGlsUnicodeFontBase(const GlsFontBase *font)
Definition: gls_text.h:132
virtual void SetAvailableAttributes(unsigned int value) override
std::string Family() const
Definition: gls_font_base.h:258
Vector _shadowOffset
Definition: gls_text.h:708
Macros and helper code to determine what subset of C++11/14/17 is available.
virtual void String(const char *s)
Definition: gls_text.h:533
Definition: disti_metadata.h:85
bool _needToRebuild
Definition: gls_text.h:699
Definition: bmpimage.h:46
float Border() const
Definition: gls_text.h:241
Definition: gls_text.h:601
The disti::GlsRuntimeFontBase class and related classes.
float CellHeight() const
Definition: gls_text.h:256
GlsColor _shadowColor
Definition: gls_text.h:705
Definition: gls_font_base.h:85
#define GLS_RUNTIME_FONT_NAME_PREFIX
Definition: gls_font_man.h:53