40 #ifndef _GLS_TEXT_GRID_H 
   41 #define _GLS_TEXT_GRID_H 
   53 #if( defined( GLSGEN_EXPORT_GLSTEXTGRID ) || defined( GLSGEN_IMPORT_GLSTEXTGRID ) || defined( GLSGEN_GLSTEXTGRID_EXPORT_GENERATED ) || defined( GLS_IMPORT_GENERATED ) ) \ 
   54     && defined( _MSC_VER ) 
   55 #    if defined( GLSGEN_EXPORT_GLSTEXTGRID ) || defined( GLSGEN_GLSTEXTGRID_EXPORT_GENERATED ) 
   56 #        define GLSGEN_GLSTEXTGRID_EXPORT __declspec( dllexport ) 
   58 #        define GLSGEN_GLSTEXTGRID_EXPORT __declspec( dllimport ) 
   61 #    define GLSGEN_GLSTEXTGRID_EXPORT 
   65 #define LIB_BASE_NAME "gls_text_grid" 
   73 #define SET_CHAR_RANGE( startCol, startRow, len, attribute, value )                          \ 
   75         unsigned int charsSet( 0 );                                                          \ 
   76         unsigned int col( startCol );                                                        \ 
   77         bool         notifyChanged = false;                                                  \ 
   79         if( startCol < _cols && startRow < _rows )                                           \ 
   81             for( unsigned int row = startRow; ( row < _rows ) && ( charsSet < len ); ++row ) \ 
   83                 for( ; ( col < _cols ) && ( charsSet < len ); ++col )                        \ 
   85                     if( _chars[ IndexOf( col, row ) ].attribute != value )                   \ 
   87                         _chars[ IndexOf( col, row ) ].attribute = value;                     \ 
   88                         notifyChanged                           = true;                      \ 
   97             EnablePerCharAttribs();                                                          \ 
   98             InvalidatePainter();                                                             \ 
  109 class GlsGloFileAttribute;
 
  115     GLS_TEXT_GRID_SIZE = GLS_LAST_TEXT_INITIALIZER + 1,
 
  116     GLS_TEXT_GRID_LEFT_TO_RIGHT
 
  135     void PopulateQuadStorage();
 
  141     friend class GlsTextGridEditor;
 
  147     GLSGEN_GLSTEXTGRID_EXPORT 
GlsTextGrid( 
const GlsTextGrid& that, 
const bool generateNames );
 
  176     GLSGEN_GLSTEXTGRID_EXPORT 
void Baseline(
 
  179         float        baselineShift );
 
  187     GLSGEN_GLSTEXTGRID_EXPORT 
void Baseline(
 
  188         unsigned int startCol,
 
  189         unsigned int startRow,
 
  191         float        baselineShift );
 
  198     GLSGEN_GLSTEXTGRID_EXPORT 
void BgColor(
 
  209     GLSGEN_GLSTEXTGRID_EXPORT 
void BgColor(
 
  210         unsigned int    startCol,
 
  211         unsigned int    startRow,
 
  219     virtual GLSGEN_GLSTEXTGRID_EXPORT 
void Calculate( 
double time );
 
  226     GLSGEN_GLSTEXTGRID_EXPORT 
void Char( 
unsigned int col, 
unsigned int row, Char_t code );
 
  234     GLSGEN_GLSTEXTGRID_EXPORT 
void Char(
 
  235         unsigned int startCol,
 
  236         unsigned int startRow,
 
  265         unsigned int startCol,
 
  266         unsigned int startRow,
 
  279         float        horizontalSpacing );
 
  289         unsigned int startCol,
 
  290         unsigned int startRow,
 
  292         float        horizontalSpacing );
 
  324     virtual GLSGEN_GLSTEXTGRID_EXPORT 
void Draw( 
void );
 
  330     GLSGEN_GLSTEXTGRID_EXPORT 
void Erase( 
unsigned int col, 
unsigned int row );
 
  337     GLSGEN_GLSTEXTGRID_EXPORT 
void Erase(
 
  338         unsigned int startCol,
 
  339         unsigned int startRow,
 
  348     GLSGEN_GLSTEXTGRID_EXPORT 
void Erase(
 
  349         unsigned int startCol,
 
  350         unsigned int startRow,
 
  352         unsigned int endRow );
 
  359     GLSGEN_GLSTEXTGRID_EXPORT 
void FauxBold( 
unsigned int col, 
unsigned int row, 
bool bold );
 
  367     GLSGEN_GLSTEXTGRID_EXPORT 
void FauxBold(
 
  368         unsigned int startCol,
 
  369         unsigned int startRow,
 
  384     virtual GLSGEN_GLSTEXTGRID_EXPORT 
void Initialize();
 
  391     GLSGEN_GLSTEXTGRID_EXPORT 
void Inverse( 
unsigned int col, 
unsigned int row, 
bool inverse );
 
  399     GLSGEN_GLSTEXTGRID_EXPORT 
void Inverse(
 
  400         unsigned int startCol,
 
  401         unsigned int startRow,
 
  410     GLSGEN_GLSTEXTGRID_EXPORT 
unsigned int LineLength( 
unsigned int row ) 
const;
 
  422     void Rows( 
unsigned int newRows )
 
  440     virtual GLSGEN_GLSTEXTGRID_EXPORT 
void Scale( 
float px, 
float py, 
float pz, 
Vertex* anchor, 
int handleBar );
 
  443     virtual GLSGEN_GLSTEXTGRID_EXPORT 
void SetValue( 
int spec, va_list& args );
 
  449     GLSGEN_GLSTEXTGRID_EXPORT 
void Size( 
unsigned int cols, 
unsigned int rows );
 
  456     GLSGEN_GLSTEXTGRID_EXPORT 
void StrikeThru( 
unsigned int col, 
unsigned int row, 
bool strike );
 
  465         unsigned int startCol,
 
  466         unsigned int startRow,
 
  476     GLSGEN_GLSTEXTGRID_EXPORT 
void String(
 
  477         unsigned int       startCol,
 
  478         unsigned int       startRow,
 
  479         const std::string& s );
 
  487     void String( 
unsigned int startCol, 
unsigned int startRow, 
const char* s )
 
  489         String( startCol, startRow, std::string( s ) );
 
  497     GLSGEN_GLSTEXTGRID_EXPORT 
void TextColor(
 
  508     GLSGEN_GLSTEXTGRID_EXPORT 
void TextColor(
 
  509         unsigned int    startCol,
 
  510         unsigned int    startRow,
 
  521         unsigned int col = 0,
 
  522         unsigned int row = 0 ) 
const;
 
  529     GLSGEN_GLSTEXTGRID_EXPORT 
void Underline(
 
  540     GLSGEN_GLSTEXTGRID_EXPORT 
void Underline(
 
  541         unsigned int startCol,
 
  542         unsigned int startRow,
 
  552     GLSGEN_GLSTEXTGRID_EXPORT 
void VaString( 
const char* format, ... );
 
  565     GLSGEN_GLSTEXTGRID_EXPORT 
void VaString(
 
  566         unsigned int startCol,
 
  567         unsigned int startRow,
 
  584     GLSGEN_GLSTEXTGRID_EXPORT 
void VaString(
 
  587         unsigned char rgba[],
 
  603     GLSGEN_GLSTEXTGRID_EXPORT 
void Center( 
bool flag )
 
  612     GLSGEN_GLSTEXTGRID_EXPORT 
void Clear( 
void )
 
  636     GLSGEN_GLSTEXTGRID_EXPORT 
void SetChar( 
unsigned int col, 
unsigned int row, 
char ch )
 
  638         Char( col, row, Char_t( ch ) );
 
  655         unsigned char rgba[] )
 
  657         Char( col, row, Char_t( ch ) );
 
  670     GLSGEN_GLSTEXTGRID_EXPORT 
void SetString( 
const char* s )
 
  687     GLSGEN_GLSTEXTGRID_EXPORT 
void SetString( 
unsigned int col, 
unsigned int row, 
const char* s )
 
  705     GLSGEN_GLSTEXTGRID_EXPORT 
void SetString(
 
  708         unsigned char rgba[],
 
  719     GLSGEN_GLSTEXTGRID_EXPORT 
void VaSetString( 
const char* format, ... );
 
  754         unsigned char rgba[],
 
  761     GLSGEN_GLSTEXTGRID_EXPORT 
bool LeftToRight( 
void );
 
  766     GLSGEN_GLSTEXTGRID_EXPORT 
void LeftToRight( 
bool leftToRight );
 
  791     bool _numRowsChanged;
 
  811     GLSGEN_GLSTEXTGRID_EXPORT 
void EraseIndex( 
unsigned int textIndex );
 
  818         if( !_perCharAttribs )
 
  820             _perCharAttribs = 
true;
 
  832     GLSGEN_GLSTEXTGRID_EXPORT 
char* 
FormatVarArgList( 
const char* format, va_list args );
 
  837     GLSGEN_GLSTEXTGRID_EXPORT 
float BoxHeight();
 
  842     GLSGEN_GLSTEXTGRID_EXPORT 
float BoxWidth();
 
  849     unsigned int IndexOf( 
unsigned int col, 
unsigned int row )
 const 
  851         unsigned int index( 0 );
 
  853         if( col < _cols && row < _rows )
 
  855             index = ( row * 
_cols ) + col;
 
  859             index = _rows * 
_cols;
 
  867     GLSGEN_GLSTEXTGRID_EXPORT 
float JustificationOffset( 
unsigned int row );
 
  872     GLSGEN_GLSTEXTGRID_EXPORT 
float LinePixelWidth( 
unsigned int line, 
float cellWidth ) 
const;
 
  877     GLSGEN_GLSTEXTGRID_EXPORT 
void Rebuild();
 
  882     GLSGEN_GLSTEXTGRID_EXPORT 
void RecalcCellSize();
 
  887     GLSGEN_GLSTEXTGRID_EXPORT 
void RecalcVertices();
 
  892     GLSGEN_GLSTEXTGRID_EXPORT 
void ResizeGrid();
 
  900     GLSGEN_GLSTEXTGRID_EXPORT
 
  901     unsigned int TextIndexOf( 
unsigned int col, 
unsigned int row, 
unsigned int startRow = 0 ) 
const;
 
  908     GLSGEN_GLSTEXTGRID_EXPORT
 
  909     unsigned int GridIndexOf( 
unsigned int col, 
unsigned int row ) 
const;
 
  936             float underlineOffset, 
float underlineSize, 
bool halo, 
float haloOffset, 
GlsColor haloColor, 
bool leftToRight );
 
  961         void IgnoreShadowAndHalo()
 
  963             _allowShadow = 
false;
 
  968         const float _cellWidth;
 
  969         const float _cellHeight;
 
  973         const Vector   _shadowOffset;
 
  978         const float _underlineOffset;
 
  979         const float _underlineSize;
 
  983         const float    _haloOffset;
 
  987         const bool _leftToRight;
 
  990         float    _underlineX1, _underlineX2, _underlineY, _underlineScale;
 
  995         float    _strikeX1, _strikeX2, _strikeY, _strikeScale;
 
 1000         typedef std::list<LineSegment_t> LineSegmentCont_t;
 
 1001         LineSegmentCont_t                _lineSegments;
 
 1006     void OnCellDimensionChanged()
 
 1011     GlsTextGrid& operator=( 
const GlsTextGrid& );
 
The DistiUnhideGlobalsDummyClass class. 
char * FormatVarArgList(const char *format, va_list args)
void SetChar(unsigned int col, unsigned int row, char ch, unsigned char rgba[])
Definition: gls_text_grid.h:651
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL)
void SetString(unsigned int col, unsigned int row, const char *s)
Definition: gls_text_grid.h:687
Definition: gls_text_grid.h:123
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)
virtual void SetValue(int spec, va_list &args)
Definition: dynamic_array.h:62
Class to contain current OpenGL view, projection and draw matrices. 
Definition: util.h:301
unsigned int _cols
Definition: gls_text_grid.h:786
virtual void PreDraw(const OpenGLMatrices ¤t, Culler &culler)
The disti::GlsQuadListVC_3D and GlsQuadListVCT_2D classes. 
bool _perCharAttribs
Definition: gls_text_grid.h:798
Attributes for each character position in the grid. 
Definition: gls_text.h:175
unsigned int GridIndexOf(unsigned int col, unsigned int row) const 
void EnablePerCharAttribs(void)
Definition: gls_text_grid.h:816
void RenderLineSegments(void)
unsigned int Columns() const 
Definition: gls_text_grid.h:299
Definition: gls_text.h:151
std::string _text
Definition: gls_text.h:835
CharAttrCont_t _chars
Definition: gls_text.h:780
void EraseIndex(unsigned int textIndex)
Definition: gls_quad_storage.h:156
The disti::GlsText class. 
virtual void CopyGeometry(DisplayObject *src)
void ProcessCharacter(const CharAttr_t &charAttr, float cellX, float nextCellX, float charY, bool endOfLine)
unsigned int LineLength(unsigned int row) const 
bool _leftToRight
Definition: gls_text_grid.h:802
void SetChar(unsigned int col, unsigned int row, char ch)
Definition: gls_text_grid.h:636
Definition: gls_glo_file.h:982
float pixelWidth
Definition: gls_text_grid.h:782
Justify_t Justify() const 
Definition: gls_text.h:549
virtual void Calculate(double time)
float CellWidth() const 
Definition: gls_text.h:392
UnicodeString _unicodeText
Definition: gls_text_grid.h:805
virtual void CalculateRowData(void)
Definition: gls_text_grid.h:918
RowInfo * _rowInfo
Definition: gls_text_grid.h:800
void VaString(const char *format,...)
virtual DisplayObject * CloneObject(bool generateNames=false)
void Char(unsigned int col, unsigned int row, Char_t code)
void Clear(void)
Definition: gls_text_grid.h:612
unsigned int startingIndex
Definition: gls_text_grid.h:779
Definition: gls_color.h:53
virtual void CopyProperties(DisplayObject *src)
unsigned int IndexOf(unsigned int col, unsigned int row) const 
Definition: gls_text_grid.h:849
unsigned int Rows() const 
Definition: gls_text_grid.h:414
Definition: gls_text_grid.h:777
void Center(bool flag)
Definition: gls_text_grid.h:603
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *array)
virtual void SetAvailableAttributes(unsigned int value)
virtual void Scale(float px, float py, float pz, Vertex *anchor, int handleBar)
void SetString(const char *s)
Definition: gls_text_grid.h:670
CharAttr_t CharAttr(unsigned int index) const 
Definition: gls_text.h:414
CharAttr_t CharAttr(unsigned int col, unsigned int row) const 
Definition: gls_text_grid.h:241
void Scale(int handleBar, float px, float py, Vertex *anchor=NULL)
Definition: display.h:1112
void VaSetString(const char *format,...)
std::string String() const 
Definition: gls_text.h:667
void SetRebuild()
Definition: gls_text.h:711
void String(unsigned int startCol, unsigned int startRow, const char *s)
Definition: gls_text_grid.h:487
unsigned int length
Definition: gls_text_grid.h:781
void ClearChars(void)
Definition: gls_text_grid.h:621
void Rows(unsigned int newRows)
Definition: gls_text_grid.h:422
void Columns(unsigned int newCols)
Definition: gls_text_grid.h:307
Definition: gls_quad_storage.h:63
unsigned int TextIndexOf(unsigned int col, unsigned int row, unsigned int startRow=0) const 
Definition: bmpimage.h:46
void Size(unsigned int cols, unsigned int rows)
float CellHeight() const 
Definition: gls_text.h:378
unsigned int _rows
Definition: gls_text_grid.h:789