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();
 
  139     DISTI_DEPRECATED( 
"This identifier is forbidden by the C++ standard. Use BaseClass instead." )
 
  143     friend class GlsTextGridEditor;
 
  149     GLSGEN_GLSTEXTGRID_EXPORT 
GlsTextGrid( 
const GlsTextGrid& that, 
const bool generateNames );
 
  171     virtual GLSGEN_GLSTEXTGRID_EXPORT 
void SetAvailableAttributes( 
unsigned int value ) DISTI_METHOD_OVERRIDE;
 
  178     GLSGEN_GLSTEXTGRID_EXPORT 
void Baseline(
 
  181         float        baselineShift );
 
  189     GLSGEN_GLSTEXTGRID_EXPORT 
void Baseline(
 
  190         unsigned int startCol,
 
  191         unsigned int startRow,
 
  193         float        baselineShift );
 
  200     GLSGEN_GLSTEXTGRID_EXPORT 
void BgColor(
 
  211     GLSGEN_GLSTEXTGRID_EXPORT 
void BgColor(
 
  212         unsigned int    startCol,
 
  213         unsigned int    startRow,
 
  221     virtual GLSGEN_GLSTEXTGRID_EXPORT 
void Calculate( 
double time ) DISTI_METHOD_OVERRIDE;
 
  228     GLSGEN_GLSTEXTGRID_EXPORT 
void Char( 
unsigned int col, 
unsigned int row, Char_t code );
 
  236     GLSGEN_GLSTEXTGRID_EXPORT 
void Char(
 
  237         unsigned int startCol,
 
  238         unsigned int startRow,
 
  267         unsigned int startCol,
 
  268         unsigned int startRow,
 
  281         float        horizontalSpacing );
 
  291         unsigned int startCol,
 
  292         unsigned int startRow,
 
  294         float        horizontalSpacing );
 
  326     virtual GLSGEN_GLSTEXTGRID_EXPORT 
void Draw( 
void ) DISTI_METHOD_OVERRIDE;
 
  332     GLSGEN_GLSTEXTGRID_EXPORT 
void Erase( 
unsigned int col, 
unsigned int row );
 
  339     GLSGEN_GLSTEXTGRID_EXPORT 
void Erase(
 
  340         unsigned int startCol,
 
  341         unsigned int startRow,
 
  350     GLSGEN_GLSTEXTGRID_EXPORT 
void Erase(
 
  351         unsigned int startCol,
 
  352         unsigned int startRow,
 
  354         unsigned int endRow );
 
  361     GLSGEN_GLSTEXTGRID_EXPORT 
void FauxBold( 
unsigned int col, 
unsigned int row, 
bool bold );
 
  369     GLSGEN_GLSTEXTGRID_EXPORT 
void FauxBold(
 
  370         unsigned int startCol,
 
  371         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 ) DISTI_METHOD_OVERRIDE;
 
  443     virtual GLSGEN_GLSTEXTGRID_EXPORT 
void SetValue( 
int spec, va_list& args ) DISTI_METHOD_OVERRIDE;
 
  446     virtual GLSGEN_GLSTEXTGRID_EXPORT 
void SetVertices( 
unsigned int nPoints, 
Vertex* vertices ) DISTI_METHOD_OVERRIDE;
 
  452     GLSGEN_GLSTEXTGRID_EXPORT 
void Size( 
unsigned int cols, 
unsigned int rows );
 
  459     GLSGEN_GLSTEXTGRID_EXPORT 
void StrikeThru( 
unsigned int col, 
unsigned int row, 
bool strike );
 
  468         unsigned int startCol,
 
  469         unsigned int startRow,
 
  479     GLSGEN_GLSTEXTGRID_EXPORT 
void String(
 
  480         unsigned int       startCol,
 
  481         unsigned int       startRow,
 
  482         const std::string& s );
 
  490     void String( 
unsigned int startCol, 
unsigned int startRow, 
const char* s )
 
  492         String( startCol, startRow, std::string( s ) );
 
  500     GLSGEN_GLSTEXTGRID_EXPORT 
void TextColor(
 
  511     GLSGEN_GLSTEXTGRID_EXPORT 
void TextColor(
 
  512         unsigned int    startCol,
 
  513         unsigned int    startRow,
 
  524         unsigned int col = 0,
 
  525         unsigned int row = 0 ) 
const;
 
  532     GLSGEN_GLSTEXTGRID_EXPORT 
void Underline(
 
  543     GLSGEN_GLSTEXTGRID_EXPORT 
void Underline(
 
  544         unsigned int startCol,
 
  545         unsigned int startRow,
 
  555     GLSGEN_GLSTEXTGRID_EXPORT 
void VaString( 
const char* format, ... );
 
  568     GLSGEN_GLSTEXTGRID_EXPORT 
void VaString(
 
  569         unsigned int startCol,
 
  570         unsigned int startRow,
 
  587     GLSGEN_GLSTEXTGRID_EXPORT 
void VaString(
 
  590         unsigned char rgba[],
 
  606     GLSGEN_GLSTEXTGRID_EXPORT 
void Center( 
bool flag )
 
  615     GLSGEN_GLSTEXTGRID_EXPORT 
void Clear( 
void )
 
  639     GLSGEN_GLSTEXTGRID_EXPORT 
void SetChar( 
unsigned int col, 
unsigned int row, 
char ch )
 
  641         Char( col, row, Char_t( ch ) );
 
  658         unsigned char rgba[] )
 
  660         Char( col, row, Char_t( ch ) );
 
  673     GLSGEN_GLSTEXTGRID_EXPORT 
void SetString( 
const char* s )
 
  690     GLSGEN_GLSTEXTGRID_EXPORT 
void SetString( 
unsigned int col, 
unsigned int row, 
const char* s )
 
  708     GLSGEN_GLSTEXTGRID_EXPORT 
void SetString(
 
  711         unsigned char rgba[],
 
  722     GLSGEN_GLSTEXTGRID_EXPORT 
void VaSetString( 
const char* format, ... );
 
  757         unsigned char rgba[],
 
  764     GLSGEN_GLSTEXTGRID_EXPORT 
bool LeftToRight( 
void );
 
  769     GLSGEN_GLSTEXTGRID_EXPORT 
void LeftToRight( 
bool leftToRight );
 
  776     virtual GLSGEN_GLSTEXTGRID_EXPORT 
void SetFromGloData( 
GlsGloFileAttribute& data ) DISTI_METHOD_OVERRIDE;
 
  794     bool _numRowsChanged;
 
  814     GLSGEN_GLSTEXTGRID_EXPORT 
void EraseIndex( 
unsigned int textIndex );
 
  821         if( !_perCharAttribs )
 
  823             _perCharAttribs = 
true;
 
  835     GLSGEN_GLSTEXTGRID_EXPORT 
char* 
FormatVarArgList( 
const char* format, va_list args );
 
  840     GLSGEN_GLSTEXTGRID_EXPORT 
float BoxHeight();
 
  845     GLSGEN_GLSTEXTGRID_EXPORT 
float BoxWidth();
 
  852     unsigned int IndexOf( 
unsigned int col, 
unsigned int row )
 const 
  854         unsigned int index( 0 );
 
  856         if( col < _cols && row < _rows )
 
  858             index = ( row * 
_cols ) + col;
 
  862             index = _rows * 
_cols;
 
  870     GLSGEN_GLSTEXTGRID_EXPORT 
float JustificationOffset( 
unsigned int row );
 
  875     GLSGEN_GLSTEXTGRID_EXPORT 
float LinePixelWidth( 
unsigned int line, 
float cellWidth ) 
const;
 
  880     GLSGEN_GLSTEXTGRID_EXPORT 
void Rebuild();
 
  885     GLSGEN_GLSTEXTGRID_EXPORT 
void RecalcCellSize();
 
  890     GLSGEN_GLSTEXTGRID_EXPORT 
void RecalcVertices();
 
  895     GLSGEN_GLSTEXTGRID_EXPORT 
void ResizeGrid();
 
  903     GLSGEN_GLSTEXTGRID_EXPORT
 
  904     unsigned int TextIndexOf( 
unsigned int col, 
unsigned int row, 
unsigned int startRow = 0 ) 
const;
 
  911     GLSGEN_GLSTEXTGRID_EXPORT
 
  912     unsigned int GridIndexOf( 
unsigned int col, 
unsigned int row ) 
const;
 
  939             float underlineOffset, 
float underlineSize, 
bool halo, 
float haloOffset, 
GlsColor haloColor, 
bool leftToRight );
 
  964         void IgnoreShadowAndHalo()
 
  966             _allowShadow = 
false;
 
  971         const float _cellWidth;
 
  972         const float _cellHeight;
 
  976         const Vector   _shadowOffset;
 
  981         const float _underlineOffset;
 
  982         const float _underlineSize;
 
  986         const float    _haloOffset;
 
  990         const bool _leftToRight;
 
  993         float    _underlineX1, _underlineX2, _underlineY, _underlineScale;
 
  998         float    _strikeX1, _strikeX2, _strikeY, _strikeScale;
 
 1003         typedef std::list<LineSegment_t> LineSegmentCont_t;
 
 1004         LineSegmentCont_t                _lineSegments;
 
 1009     void OnCellDimensionChanged() DISTI_METHOD_OVERRIDE
 
 1014     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:654
void SetString(unsigned int col, unsigned int row, const char *s)
Definition: gls_text_grid.h:690
Definition: gls_text_grid.h:123
#define DISTI_DEPRECATED(msg)
Defines whether this compiler supports the C++14 deprecated attribute. 
Definition: gls_cpp_lang_support.h:436
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)
Definition: dynamic_array.h:66
Class to contain current OpenGL view, projection and draw matrices. 
Definition: util.h:473
unsigned int _cols
Definition: gls_text_grid.h:789
virtual void SetVertices(unsigned int nPoints, Vertex *vertices) DISTI_METHOD_OVERRIDE
virtual void PreDraw(const OpenGLMatrices ¤t, Culler &culler)
The disti::GlsQuadListVC_3D and GlsQuadListVCT_2D classes. 
bool _perCharAttribs
Definition: gls_text_grid.h:801
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL) DISTI_METHOD_OVERRIDE
Attributes for each character position in the grid. 
Definition: gls_text.h:177
unsigned int GridIndexOf(unsigned int col, unsigned int row) const 
void EnablePerCharAttribs(void)
Definition: gls_text_grid.h:819
void RenderLineSegments(void)
unsigned int Columns() const 
Definition: gls_text_grid.h:301
Definition: gls_text.h:151
std::string _text
Definition: gls_text.h:711
CharAttrCont_t _chars
Definition: gls_text.h:656
void EraseIndex(unsigned int textIndex)
Definition: gls_quad_storage.h:158
The disti::GlsText class. 
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *array) DISTI_METHOD_OVERRIDE
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:805
void SetChar(unsigned int col, unsigned int row, char ch)
Definition: gls_text_grid.h:639
Definition: gls_glo_file.h:988
float pixelWidth
Definition: gls_text_grid.h:785
Justify_t Justify() const 
Definition: gls_text.h:425
virtual void Calculate(double time) DISTI_METHOD_OVERRIDE
float CellWidth() const 
Definition: gls_text.h:270
virtual void CalculateRowData(void)
Definition: gls_text_grid.h:921
RowInfo * _rowInfo
Definition: gls_text_grid.h:803
void VaString(const char *format,...)
void Char(unsigned int col, unsigned int row, Char_t code)
virtual void SetValue(int spec, va_list &args) DISTI_METHOD_OVERRIDE
void Clear(void)
Definition: gls_text_grid.h:615
unsigned int startingIndex
Definition: gls_text_grid.h:782
Definition: gls_color.h:53
unsigned int IndexOf(unsigned int col, unsigned int row) const 
Definition: gls_text_grid.h:852
virtual DisplayObject * CloneObject(bool generateNames=false) DISTI_METHOD_OVERRIDE
unsigned int Rows() const 
Definition: gls_text_grid.h:414
Definition: gls_text_grid.h:780
void Center(bool flag)
Definition: gls_text_grid.h:606
virtual void Draw(void) DISTI_METHOD_OVERRIDE
void SetString(const char *s)
Definition: gls_text_grid.h:673
CharAttr_t CharAttr(unsigned int index) const 
Definition: gls_text.h:292
virtual void Scale(float px, float py, float pz, Vertex *anchor, int handleBar=0)
CharAttr_t CharAttr(unsigned int col, unsigned int row) const 
Definition: gls_text_grid.h:243
void VaSetString(const char *format,...)
std::string String() const 
Definition: gls_text.h:543
void SetRebuild()
Definition: gls_text.h:587
void String(unsigned int startCol, unsigned int startRow, const char *s)
Definition: gls_text_grid.h:490
unsigned int length
Definition: gls_text_grid.h:784
void ClearChars(void)
Definition: gls_text_grid.h:624
virtual void CopyProperties(DisplayObject *src) DISTI_METHOD_OVERRIDE
virtual void SetAvailableAttributes(unsigned int value) DISTI_METHOD_OVERRIDE
void Rows(unsigned int newRows)
Definition: gls_text_grid.h:422
void Columns(unsigned int newCols)
Definition: gls_text_grid.h:309
Definition: gls_quad_storage.h:63
unsigned int TextIndexOf(unsigned int col, unsigned int row, unsigned int startRow=0) const 
Definition: bmpimage.h:46
UTF16String _unicodeText
Definition: gls_text_grid.h:808
void Size(unsigned int cols, unsigned int rows)
virtual void CopyGeometry(DisplayObject *src) DISTI_METHOD_OVERRIDE
float CellHeight() const 
Definition: gls_text.h:256
virtual void Scale(float px, float py, float pz, Vertex *anchor, int handleBar) DISTI_METHOD_OVERRIDE
unsigned int _rows
Definition: gls_text_grid.h:792