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 );                                                        \ 
   78         if( startCol < _cols && startRow < _rows )                                           \ 
   80             for( unsigned int row = startRow; ( row < _rows ) && ( charsSet < len ); ++row ) \ 
   82                 for( ; ( col < _cols ) && ( charsSet < len ); ++col )                        \ 
   84                     _chars[ IndexOf( col, row ) ].attribute = value;                         \ 
   90         EnablePerCharAttribs();                                                              \ 
  100 class GlsGloFileAttribute;
 
  106     GLS_TEXT_GRID_SIZE = GLS_LAST_TEXT_INITIALIZER + 1,
 
  107     GLS_TEXT_GRID_LEFT_TO_RIGHT
 
  126     void PopulateQuadStorage();
 
  132     friend class GlsTextGridEditor;
 
  138     GLSGEN_GLSTEXTGRID_EXPORT 
GlsTextGrid( 
const GlsTextGrid& that, 
const bool generateNames );
 
  167     GLSGEN_GLSTEXTGRID_EXPORT 
void Baseline(
 
  170         float        baselineShift );
 
  178     GLSGEN_GLSTEXTGRID_EXPORT 
void Baseline(
 
  179         unsigned int startCol,
 
  180         unsigned int startRow,
 
  182         float        baselineShift );
 
  189     GLSGEN_GLSTEXTGRID_EXPORT 
void BgColor(
 
  200     GLSGEN_GLSTEXTGRID_EXPORT 
void BgColor(
 
  201         unsigned int    startCol,
 
  202         unsigned int    startRow,
 
  210     virtual GLSGEN_GLSTEXTGRID_EXPORT 
void Calculate( 
double time );
 
  217     GLSGEN_GLSTEXTGRID_EXPORT 
void Char( 
unsigned int col, 
unsigned int row, Char_t code );
 
  225     GLSGEN_GLSTEXTGRID_EXPORT 
void Char(
 
  226         unsigned int startCol,
 
  227         unsigned int startRow,
 
  256         unsigned int startCol,
 
  257         unsigned int startRow,
 
  270         float        horizontalSpacing );
 
  280         unsigned int startCol,
 
  281         unsigned int startRow,
 
  283         float        horizontalSpacing );
 
  315     virtual GLSGEN_GLSTEXTGRID_EXPORT 
void Draw( 
void );
 
  321     GLSGEN_GLSTEXTGRID_EXPORT 
void Erase( 
unsigned int col, 
unsigned int row );
 
  328     GLSGEN_GLSTEXTGRID_EXPORT 
void Erase(
 
  329         unsigned int startCol,
 
  330         unsigned int startRow,
 
  339     GLSGEN_GLSTEXTGRID_EXPORT 
void Erase(
 
  340         unsigned int startCol,
 
  341         unsigned int startRow,
 
  343         unsigned int endRow );
 
  350     GLSGEN_GLSTEXTGRID_EXPORT 
void FauxBold( 
unsigned int col, 
unsigned int row, 
bool bold );
 
  358     GLSGEN_GLSTEXTGRID_EXPORT 
void FauxBold(
 
  359         unsigned int startCol,
 
  360         unsigned int startRow,
 
  375     virtual GLSGEN_GLSTEXTGRID_EXPORT 
void Initialize();
 
  382     GLSGEN_GLSTEXTGRID_EXPORT 
void Inverse( 
unsigned int col, 
unsigned int row, 
bool inverse );
 
  390     GLSGEN_GLSTEXTGRID_EXPORT 
void Inverse(
 
  391         unsigned int startCol,
 
  392         unsigned int startRow,
 
  401     GLSGEN_GLSTEXTGRID_EXPORT 
unsigned int LineLength( 
unsigned int row ) 
const;
 
  413     void Rows( 
unsigned int newRows )
 
  431     virtual GLSGEN_GLSTEXTGRID_EXPORT 
void Scale( 
float px, 
float py, 
float pz, 
Vertex* anchor, 
int handleBar );
 
  434     virtual GLSGEN_GLSTEXTGRID_EXPORT 
void SetValue( 
int spec, va_list& args );
 
  440     GLSGEN_GLSTEXTGRID_EXPORT 
void Size( 
unsigned int cols, 
unsigned int rows );
 
  447     GLSGEN_GLSTEXTGRID_EXPORT 
void StrikeThru( 
unsigned int col, 
unsigned int row, 
bool strike );
 
  456         unsigned int startCol,
 
  457         unsigned int startRow,
 
  467     GLSGEN_GLSTEXTGRID_EXPORT 
void String(
 
  468         unsigned int       startCol,
 
  469         unsigned int       startRow,
 
  470         const std::string& s );
 
  478     void String( 
unsigned int startCol, 
unsigned int startRow, 
const char* s )
 
  480         String( startCol, startRow, std::string( s ) );
 
  488     GLSGEN_GLSTEXTGRID_EXPORT 
void TextColor(
 
  499     GLSGEN_GLSTEXTGRID_EXPORT 
void TextColor(
 
  500         unsigned int    startCol,
 
  501         unsigned int    startRow,
 
  512         unsigned int col = 0,
 
  513         unsigned int row = 0 ) 
const;
 
  520     GLSGEN_GLSTEXTGRID_EXPORT 
void Underline(
 
  531     GLSGEN_GLSTEXTGRID_EXPORT 
void Underline(
 
  532         unsigned int startCol,
 
  533         unsigned int startRow,
 
  543     GLSGEN_GLSTEXTGRID_EXPORT 
void VaString( 
const char* format, ... );
 
  556     GLSGEN_GLSTEXTGRID_EXPORT 
void VaString(
 
  557         unsigned int startCol,
 
  558         unsigned int startRow,
 
  575     GLSGEN_GLSTEXTGRID_EXPORT 
void VaString(
 
  578         unsigned char rgba[],
 
  594     GLSGEN_GLSTEXTGRID_EXPORT 
void Center( 
bool flag )
 
  603     GLSGEN_GLSTEXTGRID_EXPORT 
void Clear( 
void )
 
  627     GLSGEN_GLSTEXTGRID_EXPORT 
void SetChar( 
unsigned int col, 
unsigned int row, 
char ch )
 
  629         Char( col, row, Char_t( ch ) );
 
  646         unsigned char rgba[] )
 
  648         Char( col, row, Char_t( ch ) );
 
  661     GLSGEN_GLSTEXTGRID_EXPORT 
void SetString( 
const char* s )
 
  678     GLSGEN_GLSTEXTGRID_EXPORT 
void SetString( 
unsigned int col, 
unsigned int row, 
const char* s )
 
  696     GLSGEN_GLSTEXTGRID_EXPORT 
void SetString(
 
  699         unsigned char rgba[],
 
  710     GLSGEN_GLSTEXTGRID_EXPORT 
void VaSetString( 
const char* format, ... );
 
  745         unsigned char rgba[],
 
  752     GLSGEN_GLSTEXTGRID_EXPORT 
bool LeftToRight( 
void );
 
  757     GLSGEN_GLSTEXTGRID_EXPORT 
void LeftToRight( 
bool leftToRight );
 
  782     bool _numRowsChanged;
 
  802     GLSGEN_GLSTEXTGRID_EXPORT 
void EraseIndex( 
unsigned int textIndex );
 
  809         if( !_perCharAttribs )
 
  811             _perCharAttribs = 
true;
 
  823     GLSGEN_GLSTEXTGRID_EXPORT 
char* 
FormatVarArgList( 
const char* format, va_list args );
 
  828     GLSGEN_GLSTEXTGRID_EXPORT 
float BoxHeight();
 
  833     GLSGEN_GLSTEXTGRID_EXPORT 
float BoxWidth();
 
  840     unsigned int IndexOf( 
unsigned int col, 
unsigned int row )
 const 
  842         unsigned int index( 0 );
 
  844         if( col < _cols && row < _rows )
 
  846             index = ( row * 
_cols ) + col;
 
  850             index = _rows * 
_cols;
 
  858     GLSGEN_GLSTEXTGRID_EXPORT 
float JustificationOffset( 
unsigned int row );
 
  863     GLSGEN_GLSTEXTGRID_EXPORT 
float LinePixelWidth( 
unsigned int line, 
float cellWidth ) 
const;
 
  868     GLSGEN_GLSTEXTGRID_EXPORT 
void Rebuild();
 
  873     GLSGEN_GLSTEXTGRID_EXPORT 
void RecalcCellSize();
 
  878     GLSGEN_GLSTEXTGRID_EXPORT 
void RecalcVertices();
 
  883     GLSGEN_GLSTEXTGRID_EXPORT 
void ResizeGrid();
 
  891     GLSGEN_GLSTEXTGRID_EXPORT
 
  892     unsigned int TextIndexOf( 
unsigned int col, 
unsigned int row, 
unsigned int startRow = 0 ) 
const;
 
  899     GLSGEN_GLSTEXTGRID_EXPORT
 
  900     unsigned int GridIndexOf( 
unsigned int col, 
unsigned int row ) 
const;
 
  927             float underlineOffset, 
float underlineSize, 
bool halo, 
float haloOffset, 
GlsColor haloColor, 
bool leftToRight );
 
  952         void IgnoreShadowAndHalo()
 
  954             _allowShadow = 
false;
 
  959         const float _cellWidth;
 
  960         const float _cellHeight;
 
  964         const Vector   _shadowOffset;
 
  969         const float _underlineOffset;
 
  970         const float _underlineSize;
 
  974         const float    _haloOffset;
 
  978         const bool _leftToRight;
 
  981         float    _underlineX1, _underlineX2, _underlineY, _underlineScale;
 
  986         float    _strikeX1, _strikeX2, _strikeY, _strikeScale;
 
  991         typedef std::list<LineSegment_t> LineSegmentCont_t;
 
  992         LineSegmentCont_t                _lineSegments;
 
  997     void OnCellDimensionChanged()
 
 1002     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:642
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL)
void SetString(unsigned int col, unsigned int row, const char *s)
Definition: gls_text_grid.h:678
Definition: gls_text_grid.h:114
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:278
unsigned int _cols
Definition: gls_text_grid.h:777
virtual void PreDraw(const OpenGLMatrices ¤t, Culler &culler)
The disti::GlsQuadListVC_3D and GlsQuadListVCT_2D classes. 
bool _perCharAttribs
Definition: gls_text_grid.h:789
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:807
void RenderLineSegments(void)
unsigned int Columns() const 
Definition: gls_text_grid.h:290
Definition: gls_text.h:151
std::string _text
Definition: gls_text.h:834
CharAttrCont_t _chars
Definition: gls_text.h:779
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:793
void SetChar(unsigned int col, unsigned int row, char ch)
Definition: gls_text_grid.h:627
Definition: gls_glo_file.h:835
float pixelWidth
Definition: gls_text_grid.h:773
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:796
virtual void CalculateRowData(void)
Definition: gls_text_grid.h:909
RowInfo * _rowInfo
Definition: gls_text_grid.h:791
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:603
unsigned int startingIndex
Definition: gls_text_grid.h:770
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:840
unsigned int Rows() const 
Definition: gls_text_grid.h:405
Definition: gls_text_grid.h:768
void Center(bool flag)
Definition: gls_text_grid.h:594
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:661
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:232
void Scale(int handleBar, float px, float py, Vertex *anchor=NULL)
Definition: display.h:1111
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:478
unsigned int length
Definition: gls_text_grid.h:772
void ClearChars(void)
Definition: gls_text_grid.h:612
void Rows(unsigned int newRows)
Definition: gls_text_grid.h:413
void Columns(unsigned int newCols)
Definition: gls_text_grid.h:298
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:780