40 #ifndef _GLS_TEXT_BOX_H 
   41 #define _GLS_TEXT_BOX_H 
   44 #if( defined( GLSGEN_EXPORT_GLSTEXTBOX ) || defined( GLSGEN_IMPORT_GLSTEXTBOX ) || defined( GLSGEN_GLSTEXTBOX_EXPORT_GENERATED ) || defined( GLS_IMPORT_GENERATED ) ) \ 
   45     && defined( _MSC_VER ) 
   46 #    if defined( GLSGEN_EXPORT_GLSTEXTBOX ) || defined( GLSGEN_GLSTEXTBOX_EXPORT_GENERATED ) 
   47 #        define GLSGEN_GLSTEXTBOX_EXPORT __declspec( dllexport ) 
   49 #        define GLSGEN_GLSTEXTBOX_EXPORT __declspec( dllimport ) 
   52 #    define GLSGEN_GLSTEXTBOX_EXPORT 
   68 #define LIB_BASE_NAME "gls_text_box" 
   79 class GlsGloFileAttribute;
 
   99     void PopulateQuadStorage();
 
  103     DISTI_DEPRECATED( 
"This identifier is forbidden by the C++ standard. Use BaseClass instead." )
 
  107     friend class GlsTextBoxEditor;
 
  111     GLSGEN_GLSTEXTBOX_EXPORT 
GlsTextBox( 
const GlsTextBox& that, 
const bool generateNames );
 
  140     virtual GLSGEN_GLSTEXTBOX_EXPORT 
void Calculate( 
double time );
 
  152     virtual GLSGEN_GLSTEXTBOX_EXPORT 
void Draw( 
void );
 
  170     virtual GLSGEN_GLSTEXTBOX_EXPORT 
void SetVertices( 
unsigned int nPoints, 
Vertex* vertices );
 
  173     virtual GLSGEN_GLSTEXTBOX_EXPORT 
void Initialize();
 
  186     virtual GLSGEN_GLSTEXTBOX_EXPORT 
unsigned int MaxLinesToDraw( 
void );
 
  189     virtual GLSGEN_GLSTEXTBOX_EXPORT 
void Scale( 
float px, 
float py, 
float pz, 
Vertex* anchor, 
int handleBar );
 
  209         return _verticalAlignment;
 
  222     GLSGEN_GLSTEXTBOX_EXPORT 
void Clear( 
void )
 
  246     GLSGEN_GLSTEXTBOX_EXPORT 
void SetString( 
const char* s )
 
  256     GLSGEN_GLSTEXTBOX_EXPORT 
void VaString( 
const char* format, ... );
 
  261     GLSGEN_GLSTEXTBOX_EXPORT 
void NextLineInfo( 
const unsigned int currentStringIndex,
 
  262         unsigned int*                                              lineEndIndex,
 
  263         unsigned int*                                              nextLineStringIndex,
 
  265         float*                                                     lineLengthPixels );
 
  270     GLSGEN_GLSTEXTBOX_EXPORT 
unsigned int GetLineCount();
 
  273     GLSGEN_GLSTEXTBOX_EXPORT 
void TabSpacing( 
float );
 
  288     GLSGEN_GLSTEXTBOX_EXPORT 
void LeftToRight( 
bool leftToRight );
 
  305     GLSGEN_GLSTEXTBOX_EXPORT 
char* FormatVarArgList( 
const char* format, va_list args );
 
  312     bool _perCharAttribs;
 
  317     GLSGEN_GLSTEXTBOX_EXPORT 
void EnablePerCharAttribs( 
void )
 
  319         if( !_perCharAttribs )
 
  321             _perCharAttribs = 
true;
 
  327     Align_t _verticalAlignment;
 
  335     GLSGEN_GLSTEXTBOX_EXPORT 
void Rebuild();
 
  340     GLSGEN_GLSTEXTBOX_EXPORT 
void RecalcCellSize();
 
  345     GLSGEN_GLSTEXTBOX_EXPORT 
void RecalcVertices();
 
  365     GLSGEN_GLSTEXTBOX_EXPORT 
void GetNextRowInfo( 
const unsigned int strIndex,
 
  366         unsigned int&                                                rowLength,
 
  367         float&                                                       rowPixelWidth,
 
  368         unsigned int&                                                nextRowStartIndex ) 
const;
 
  378     GLSGEN_GLSTEXTBOX_EXPORT 
float GetCharWidth( 
const unsigned short c ) 
const;
 
  392     bool         _lineCountChanged;
 
  396     float _cellWidthRatio;
 
  398     float        _maxLineLengthPixels;
 
  399     float        _maxTextHeightPixels;
 
  400     unsigned int _maxLinesToDraw;
 
  426             float underlineOffset, 
float underlineSize, 
bool halo, 
float haloOffset, 
GlsColor haloColor, 
bool leftToRight );
 
  466         void IgnoreShadow( 
void );
 
  468         void AllowShadow( 
void );
 
  472         const float _cellWidth;
 
  473         const float _cellHeight;
 
  477         const Vector   _shadowOffset;
 
  482         const float _underlineOffset;
 
  483         const float _underlineSize;
 
  487         const float    _haloOffset;
 
  491         const bool _leftToRight;
 
  494         float    _underlineX1, _underlineX2, _underlineY, _underlineScale;
 
  499         float    _strikeX1, _strikeX2, _strikeY, _strikeScale;
 
  507         typedef std::list<LineSegment_t> LineSegmentCont_t;
 
  508         LineSegmentCont_t                _lineSegments;
 
  512     GlsTextBox& operator=( 
const GlsTextBox& ) DISTI_SPECIAL_MEM_FUN_DELETE;
 
  513     GlsTextBox( const GlsTextBox& ) DISTI_SPECIAL_MEM_FUN_DELETE;
 
  516     void OnCellDimensionChanged()
 
  525 inline std::istream& operator>>(
 
  526     std::istream& instr, disti::GlsTextBox::Align_t& j )
 
  531     if( str == 
"ALIGN_TOP" )
 
  533         j = disti::GlsTextBox::ALIGN_TOP;
 
  535     else if( str == 
"ALIGN_CENTER" )
 
  537         j = disti::GlsTextBox::ALIGN_CENTER;
 
  539     else if( str == 
"ALIGN_BOTTOM" )
 
  541         j = disti::GlsTextBox::ALIGN_BOTTOM;
 
  547 inline std::ostream& 
operator<<( std::ostream& outstr, disti::GlsTextBox::Align_t j )
 
  551     case disti::GlsTextBox::ALIGN_TOP:
 
  552         outstr << 
"ALIGN_TOP";
 
  554     case disti::GlsTextBox::ALIGN_CENTER:
 
  555         outstr << 
"ALIGN_CENTER";
 
  557     case disti::GlsTextBox::ALIGN_BOTTOM:
 
  558         outstr << 
"ALIGN_BOTTOM";
 
The DistiUnhideGlobalsDummyClass class. 
virtual void SetVertices(unsigned int nPoints, Vertex *vertices)
UnicodeString _unicodeText
Definition: gls_text_box.h:405
#define DISTI_DEPRECATED(msg)
Defines whether this compiler supports the C++14 deprecated attribute. 
Definition: gls_cpp_lang_support.h:436
virtual DisplayObject * CloneObject(bool generateNames=false)
virtual void SetAvailableAttributes(unsigned int value)
Definition: dynamic_array.h:66
Class to contain current OpenGL view, projection and draw matrices. 
Definition: util.h:296
virtual void PreDraw(const OpenGLMatrices ¤t, Culler &culler)
virtual unsigned int MaxLinesToDraw(void)
unsigned int length
Definition: gls_text_box.h:386
void VaString(const char *format,...)
float GetCharWidth(const unsigned short c) const 
The disti::GlsQuadListVC_3D and GlsQuadListVCT_2D classes. 
Attributes for each character position in the grid. 
Definition: gls_text.h:177
void PostProcessCharacter(const CharAttr_t &charAttr, const Char_t &c, float cellX, float charY, float cellWidth, bool endOfLine)
RowInfo * _rowInfo
Definition: gls_text_box.h:394
void Clear(void)
Definition: gls_text_box.h:222
Definition: gls_text_box.h:382
Definition: gls_text.h:151
std::string _text
Definition: gls_text.h:837
Definition: gls_quad_storage.h:158
The disti::GlsText class. 
The disti::GlsStateManager factory class. Creates an instance of a state manager that manages the GL ...
void PreProcessCharacter(const CharAttr_t &charAttr, const Char_t &c, float cellX, float charY)
void SetString(const char *s)
Definition: gls_text_box.h:246
Definition: gls_text_box.h:408
Definition: gls_glo_file.h:982
std::ostream & operator<<(std::ostream &outstr, const AttributeName &name)
Defines the stream out operator. 
virtual void Scale(float px, float py, float pz, Vertex *anchor, int handleBar)
float CellWidth() const 
Definition: gls_text.h:394
unsigned int _lineCount
Definition: gls_text_box.h:391
void ClearChars(void)
Definition: gls_text_box.h:231
virtual void CopyGeometry(DisplayObject *src)
bool _leftToRight
Definition: gls_text_box.h:402
Definition: gls_text_box.h:86
void RenderLineSegments(void)
UnderlineStrikeThruHelper(float cellWidth, float cellHeight, float cellYScale, bool shadow, const Vector &shadowOffset, const GlsColor &shadowColor, float underlineOffset, float underlineSize, bool halo, float haloOffset, GlsColor haloColor, bool leftToRight)
float pixelWidth
Definition: gls_text_box.h:387
Definition: gls_color.h:53
virtual void CopyProperties(DisplayObject *src)
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL)
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *array)
CharAttr_t CharAttr(unsigned int index) const 
Definition: gls_text.h:416
virtual void Scale(float px, float py, float pz, Vertex *anchor, int handleBar=0)
std::string String() const 
Definition: gls_text.h:669
void SetRebuild()
Definition: gls_text.h:713
virtual Align_t VerticalAlignment() const 
Definition: gls_text_box.h:207
virtual void CalculateRowData(void)
Macros and helper code to determine what subset of C++11/14/17 is available. 
Definition: gls_quad_storage.h:63
bool _needToRebuild
Definition: gls_text.h:825
Definition: bmpimage.h:46
virtual void Calculate(double time)
float CellHeight() const 
Definition: gls_text.h:380
unsigned int startingIndex
Definition: gls_text_box.h:384