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();
 
  105     friend class GlsTextBoxEditor;
 
  109     GLSGEN_GLSTEXTBOX_EXPORT 
GlsTextBox( 
const GlsTextBox& that, 
const bool generateNames );
 
  138     virtual GLSGEN_GLSTEXTBOX_EXPORT 
void Calculate( 
double time );
 
  150     virtual GLSGEN_GLSTEXTBOX_EXPORT 
void Draw( 
void );
 
  168     virtual GLSGEN_GLSTEXTBOX_EXPORT 
void SetVertices( 
unsigned int nPoints, 
Vertex* vertices );
 
  171     virtual GLSGEN_GLSTEXTBOX_EXPORT 
void Initialize();
 
  184     virtual GLSGEN_GLSTEXTBOX_EXPORT 
unsigned int MaxLinesToDraw( 
void );
 
  187     virtual GLSGEN_GLSTEXTBOX_EXPORT 
void Scale( 
float px, 
float py, 
float pz, 
Vertex* anchor, 
int handleBar );
 
  207         return _verticalAlignment;
 
  220     GLSGEN_GLSTEXTBOX_EXPORT 
void Clear( 
void )
 
  244     GLSGEN_GLSTEXTBOX_EXPORT 
void SetString( 
const char* s )
 
  254     GLSGEN_GLSTEXTBOX_EXPORT 
void VaString( 
const char* format, ... );
 
  259     GLSGEN_GLSTEXTBOX_EXPORT 
void NextLineInfo( 
const unsigned int currentStringIndex,
 
  260         unsigned int*                                              lineEndIndex,
 
  261         unsigned int*                                              nextLineStringIndex,
 
  263         float*                                                     lineLengthPixels );
 
  268     GLSGEN_GLSTEXTBOX_EXPORT 
unsigned int GetLineCount();
 
  271     GLSGEN_GLSTEXTBOX_EXPORT 
void TabSpacing( 
float );
 
  286     GLSGEN_GLSTEXTBOX_EXPORT 
void LeftToRight( 
bool leftToRight );
 
  303     GLSGEN_GLSTEXTBOX_EXPORT 
char* FormatVarArgList( 
const char* format, va_list args );
 
  310     bool _perCharAttribs;
 
  315     GLSGEN_GLSTEXTBOX_EXPORT 
void EnablePerCharAttribs( 
void )
 
  317         if( !_perCharAttribs )
 
  319             _perCharAttribs = 
true;
 
  325     Align_t _verticalAlignment;
 
  333     GLSGEN_GLSTEXTBOX_EXPORT 
void Rebuild();
 
  338     GLSGEN_GLSTEXTBOX_EXPORT 
void RecalcCellSize();
 
  343     GLSGEN_GLSTEXTBOX_EXPORT 
void RecalcVertices();
 
  363     GLSGEN_GLSTEXTBOX_EXPORT 
void GetNextRowInfo( 
const unsigned int strIndex,
 
  364         unsigned int&                                                rowLength,
 
  365         float&                                                       rowPixelWidth,
 
  366         unsigned int&                                                nextRowStartIndex ) 
const;
 
  376     GLSGEN_GLSTEXTBOX_EXPORT 
float GetCharWidth( 
const unsigned short c ) 
const;
 
  390     bool         _lineCountChanged;
 
  394     float _cellWidthRatio;
 
  396     float        _maxLineLengthPixels;
 
  397     float        _maxTextHeightPixels;
 
  398     unsigned int _maxLinesToDraw;
 
  424             float underlineOffset, 
float underlineSize, 
bool halo, 
float haloOffset, 
GlsColor haloColor, 
bool leftToRight );
 
  464         void IgnoreShadow( 
void );
 
  466         void AllowShadow( 
void );
 
  470         const float _cellWidth;
 
  471         const float _cellHeight;
 
  475         const Vector   _shadowOffset;
 
  480         const float _underlineOffset;
 
  481         const float _underlineSize;
 
  485         const float    _haloOffset;
 
  489         const bool _leftToRight;
 
  492         float    _underlineX1, _underlineX2, _underlineY, _underlineScale;
 
  497         float    _strikeX1, _strikeX2, _strikeY, _strikeScale;
 
  505         typedef std::list<LineSegment_t> LineSegmentCont_t;
 
  506         LineSegmentCont_t                _lineSegments;
 
  510     GlsTextBox& operator=( 
const GlsTextBox& ) DISTI_SPECIAL_MEM_FUN_DELETE;
 
  511     GlsTextBox( const GlsTextBox& ) DISTI_SPECIAL_MEM_FUN_DELETE;
 
  514     void OnCellDimensionChanged()
 
  523 inline std::istream& operator>>(
 
  524     std::istream& instr, disti::GlsTextBox::Align_t& j )
 
  529     if( str == 
"ALIGN_TOP" )
 
  531         j = disti::GlsTextBox::ALIGN_TOP;
 
  533     else if( str == 
"ALIGN_CENTER" )
 
  535         j = disti::GlsTextBox::ALIGN_CENTER;
 
  537     else if( str == 
"ALIGN_BOTTOM" )
 
  539         j = disti::GlsTextBox::ALIGN_BOTTOM;
 
  545 inline std::ostream& 
operator<<( std::ostream& outstr, disti::GlsTextBox::Align_t j )
 
  549     case disti::GlsTextBox::ALIGN_TOP:
 
  550         outstr << 
"ALIGN_TOP";
 
  552     case disti::GlsTextBox::ALIGN_CENTER:
 
  553         outstr << 
"ALIGN_CENTER";
 
  555     case disti::GlsTextBox::ALIGN_BOTTOM:
 
  556         outstr << 
"ALIGN_BOTTOM";
 
The DistiUnhideGlobalsDummyClass class. 
virtual void SetVertices(unsigned int nPoints, Vertex *vertices)
UnicodeString _unicodeText
Definition: gls_text_box.h:403
virtual DisplayObject * CloneObject(bool generateNames=false)
virtual void SetAvailableAttributes(unsigned int value)
Definition: dynamic_array.h:62
Class to contain current OpenGL view, projection and draw matrices. 
Definition: util.h:301
virtual void PreDraw(const OpenGLMatrices ¤t, Culler &culler)
virtual unsigned int MaxLinesToDraw(void)
unsigned int length
Definition: gls_text_box.h:384
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:175
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:392
void Clear(void)
Definition: gls_text_box.h:220
Definition: gls_text_box.h:380
Definition: gls_text.h:151
std::string _text
Definition: gls_text.h:835
Definition: gls_quad_storage.h:156
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:244
Definition: gls_text_box.h:406
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:392
unsigned int _lineCount
Definition: gls_text_box.h:389
void ClearChars(void)
Definition: gls_text_box.h:229
virtual void CopyGeometry(DisplayObject *src)
bool _leftToRight
Definition: gls_text_box.h:400
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:385
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:414
void Scale(int handleBar, float px, float py, Vertex *anchor=NULL)
Definition: display.h:1112
std::string String() const 
Definition: gls_text.h:667
void SetRebuild()
Definition: gls_text.h:711
virtual Align_t VerticalAlignment() const 
Definition: gls_text_box.h:205
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:823
Definition: bmpimage.h:46
virtual void Calculate(double time)
float CellHeight() const 
Definition: gls_text.h:378
unsigned int startingIndex
Definition: gls_text_box.h:382