GL Studio C++ Runtime API
gls_ctl_text_box.h
Go to the documentation of this file.
1 /*! \file
2  \brief The disti::GlsCTLTextBox class.
3 
4  \par Copyright Information
5 
6  Copyright (c) 2017 by The DiSTI Corporation.<br>
7  11301 Corporate Blvd; Suite 100<br>
8  Orlando, Florida 32817<br>
9  USA<br>
10  <br>
11  All rights reserved.<br>
12 
13  This Software contains proprietary trade secrets of DiSTI and may not be
14 reproduced, in whole or part, in any form, or by any means of electronic,
15 mechanical, or otherwise, without the written permission of DiSTI. Said
16 permission may be derived through the purchase of applicable DiSTI product
17 licenses which detail the distribution rights of this content and any
18 Derivative Works based on this or other copyrighted DiSTI Software.
19 
20  NO WARRANTY. THE SOFTWARE IS PROVIDED "AS-IS," WITHOUT WARRANTY OF ANY KIND,
21 AND ANY USE OF THIS SOFTWARE PRODUCT IS AT YOUR OWN RISK. TO THE MAXIMUM EXTENT
22 PERMITTED BY APPLICABLE LAW, DISTI AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES
23 AND CONDITIONS, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
24 IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY AND/OR FITNESS FOR A
25 PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT, WITH REGARD TO THE SOFTWARE.
26 
27  LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW,
28 IN NO EVENT SHALL DISTI OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
29 INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION,
30 DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS
31 INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR
32 INABILITY TO USE THE SOFTWARE, EVEN IF DISTI HAS BEEN ADVISED OF THE POSSIBILITY
33 OF SUCH DAMAGES. DISTI'S ENTIRE LIABILITY AND YOUR EXCLUSIVE REMEDY SHALL NOT
34 EXCEED FIVE DOLLARS (US$5.00).
35 
36  The aforementioned terms and restrictions are governed by the laws of the
37 State of Florida and the United States of America.
38 
39 */
40 
41 #ifndef INCLUDED_GLS_CTL_TEXT_BOX_H
42 #define INCLUDED_GLS_CTL_TEXT_BOX_H
43 
44 // CTL Text box does not work for WebGL/RPi due to issues with the Pango library and its dependencies
45 // CTL Text boxes will fall back to stock GlsTextBoxes, and any CTL functions will do nothing.
46 // GLS-5903: Remove Pango from CTL Text Box
47 #if defined( EMSCRIPTEN ) || defined( RPI_ARCH )
48 # define GLS_CTL_FALLBACK_ENABLED
49 # ifndef GLES
50 # error "GLES should always be enabled when using the CTL fallback code"
51 # endif
52 #endif
53 
54 //////////////////// Provides support for creating DLLs ////////////////////////
55 #if( defined( GLSGEN_EXPORT_GLSCTLTEXTBOX ) || defined( GLSGEN_IMPORT_GLSCTLTEXTBOX ) || defined( GLSGEN_GLSCTLTEXTBOX_EXPORT_GENERATED ) || defined( GLS_IMPORT_GENERATED ) ) \
56  && defined( _MSC_VER )
57 # if defined( GLSGEN_EXPORT_GLSCTLTEXTBOX ) || defined( GLSGEN_GLSCTLTEXTBOX_EXPORT_GENERATED )
58 # define GLSGEN_GLSCTLTEXTBOX_EXPORT __declspec( dllexport )
59 # else
60 # define GLSGEN_GLSCTLTEXTBOX_EXPORT __declspec( dllimport )
61 # endif
62 #else
63 # define GLSGEN_GLSCTLTEXTBOX_EXPORT
64 #endif
65 ///////////////////////////////////////////////////////////////////////////////
66 
67 #include "gls_cpp_lang_support.h"
68 #include "gls_gl.h"
69 #include "scoped_ptr.h"
70 #include "unhide_globals.h"
71 #include <string>
72 
73 #ifndef GLS_CTL_FALLBACK_ENABLED
74 # include "gls_text.h"
75 # define CTL_BASE_CLASS GlsText
76 #else
77 # include "gls_text_box.h"
78 # define CTL_BASE_CLASS GlsTextBox
79 #endif
80 
81 #define LIB_BASE_NAME "gls_ctl_text_box"
82 #include "gls_auto_lib.h"
83 #undef LIB_BASE_NAME
84 
85 // Force inclusion of the pango libraries
86 #ifdef WIN32
87 # if !defined( NO_GLS_AUTOLIB ) && !defined( GLS_IMPORT_LIBRARY )
88 # ifdef _WIN64
89 # define PANGO_SUFFIX "_64"
90 # else
91 # define PANGO_SUFFIX ""
92 # endif
93 # pragma message( "Will automatically link with libpango" PANGO_SUFFIX "-1.0.lib" )
94 # pragma message( "Will automatically link with libpangoft2" PANGO_SUFFIX "-1.0.lib" )
95 # pragma message( "Will automatically link with libgobject" PANGO_SUFFIX "-2.0.lib" )
96 # pragma comment( lib, "libpango" PANGO_SUFFIX "-1.0.lib" )
97 # pragma comment( lib, "libpangoft2" PANGO_SUFFIX "-1.0.lib" )
98 # pragma comment( lib, "libgobject" PANGO_SUFFIX "-2.0.lib" )
99 # endif
100 #endif
101 
102 namespace disti
103 {
104 // Forward Declarations
105 #ifndef GLS_CTL_FALLBACK_ENABLED
106 class GlsPangoWrapper;
107 struct PangoRect;
108 #else
109 class GlsTextBoxFontRenderer;
110 #endif // GLS_CTL_FALLBACK_ENABLED
111 
112 #ifdef GLES
113 class GlsGloFileAttribute;
114 class GlsStateManager;
115 class GlsQuadListVCT_2D;
116 #endif // GLES
117 
118 //===========================================================================
119 /** \brief The Gls CTL (Complex Text Layout) Text Box.
120  *
121  * On certain platforms, the text layout library is unavailable, and complex text rendering in the runtime will be missing.
122  *
123  * To account for this, the GlsCTLTextBox will 'Fallback' to being treated as a GlsTextBox. In those cases, certain
124  * GlsCTLTextBox functions will not have no effect.
125  */
126 class GlsCTLTextBox : public CTL_BASE_CLASS
127 {
128 public:
129  typedef CTL_BASE_CLASS _BaseClass;
130 
131  /** The internal border between the layout edges and the glyph edges.
132  * This will keep the glyph edges from appearing cut-off when linear texture filtering is applied.
133  */
134  static const unsigned int INTERNAL_BORDER = 1;
135 
136  friend class GlsCTLTextBoxEditor;
137 
138 #ifndef GLS_CTL_FALLBACK_ENABLED
139  /** The vertical alignment types. */
141  ALIGN_CENTER,
142  ALIGN_TOP,
143  ALIGN_BOTTOM
144  };
145 #else
146  typedef Align_t VerticalAlignment_t;
147 #endif // GLS_CTL_FALLBACK_ENABLED
148 
149  /** Deprecated */
151  {
152  VERTICAL_ALIGNMENT_CENTER = ALIGN_CENTER,
153  VERTICAL_ALIGNMENT_TOP = ALIGN_TOP,
154  VERTICAL_ALIGNMENT_BOTTOM = ALIGN_BOTTOM
155  };
156 
157  /** The ellipsize mode types. */
159  {
160  ELLIPSIZE_MODE_NONE,
161  ELLIPSIZE_MODE_START,
162  ELLIPSIZE_MODE_MIDDLE,
163  ELLIPSIZE_MODE_END
164  };
165 
166  /** The structure returned to the caller when getting the glyph metrics.
167  * These are in logical units, relative to the bottom-left corner of the text box.
168  */
170  {
171  float minX;
172  float minY;
173  float maxX;
174  float maxY;
175 
176  GlyphMetrics()
177  : minX( 0.0f )
178  , minY( 0.0f )
179  , maxX( 0.0f )
180  , maxY( 0.0f )
181  {}
182  };
183 
184  /** Default constructor. */
185  GLSGEN_GLSCTLTEXTBOX_EXPORT GlsCTLTextBox();
186 
187  /** The copy constructor for GlsCTLTextBox
188  *
189  * \param that The GlsCTLTextBox object that is being copied
190  * \param generateNames Whether or not to generate a new instance name
191  */
192  GLSGEN_GLSCTLTEXTBOX_EXPORT GlsCTLTextBox( const GlsCTLTextBox& that, const bool generateNames );
193 
194  /** Destructor.
195  */
196  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT ~GlsCTLTextBox();
197 
198  // See DisplayObject
199  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void SetAvailableAttributes( unsigned int value );
200 
201 #ifndef GLS_CTL_FALLBACK_ENABLED
202  // See DisplayObject
203  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT DisplayObject* CloneObject( bool generateNames = false );
204 
205  // See DisplayObject
206  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void CopyGeometry( DisplayObject* src );
207 
208  // See DisplayObject
209  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void CopyProperties( DisplayObject* src );
210 
211  // See DisplayObject
212  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void PreDraw( const OpenGLMatrices& current, Culler& culler );
213 
214  // See DisplayObject
215  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void Draw();
216 
217  // See DisplayObject
218  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void SetVertices( unsigned int nPoints, Vertex* vertices );
219 
220  // See DisplayObject
221  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void Scale( float px, float py, float pz, Vertex* anchor, int handleBar );
222 
223  /** Print a string into this text object.
224  * Replaces the entire string.
225  * \param format printf style varargs formatting string.
226  */
227  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void VaString( const char* format, ... );
228 
229  /** Set the vertical alignment for this text object
230  * \param[in] verticalAlignment The vertical alignment type.
231  */
232  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void VerticalAlignment( VerticalAlignment_t verticalAlignment );
233  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void VerticalAlignment( VerticalAlignmentCTL_t verticalAlignment ) { VerticalAlignment( static_cast<VerticalAlignment_t>( verticalAlignment ) ); }
234 
235  /** Get the vertical alignment for this text object
236  * \return The vertical alignment type.
237  */
238  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT VerticalAlignment_t VerticalAlignment();
239 
240 #else
241 
242  /** Set the vertical alignment for this text object
243  * \param[in] verticalAlignment The vertical alignment type.
244  */
245  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void VerticalAlignment( VerticalAlignment_t verticalAlignment ) { _BaseClass::VerticalAlignment( verticalAlignment ); }
246  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void VerticalAlignment( VerticalAlignmentCTL_t verticalAlignment );
247 
248 #endif // GLS_CTL_FALLBACK_ENABLED
249 
250 #ifndef GLES
251 
252  // See DisplayObject
253  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT InterfaceListType* GetCppInterfaceDescription( InterfaceListType* addToThisList = NULL );
254 
255  // See DisplayObject
256  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void GetCppInterfaceDescriptionFree( InterfaceListType* array );
257 
258 #endif // GLES
259 
260  /** Rebuilds this text box layout. This may be an expensive call, so it should only be called when a property changes.
261  * \note In CTL Fallback mode, GlsText::SetRebuild will be called instead, as this is a protected method in GlsTextBox.
262  */
263  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void Rebuild();
264 
265  // NO CTL-only functions should be disabled when using the GlsTextBox fallback.
266  // They should be available to every runtime, even if they do nothing.
267 
268  /** Gets the type of automatic ellipsize if the text does not fit in the boundary.
269  * \return The type of automatic ellipsize if the text does not fit in the boundary.
270  * \note In CTL Fallback mode, returns ELLIPSIZE_MODE_NONE.
271  */
272  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT EllipsizeMode_t EllipsizeMode();
273 
274  /** Sets the type of automatic ellipsize if the text does not fit in the boundary.
275  * \param[in] ellipsizeMode The type of automatic ellipsize if the text does not fit in the boundary.
276  * \note In CTL Fallback mode, has no effect.
277  */
278  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void EllipsizeMode( const EllipsizeMode_t ellipsizeMode );
279 
280  /** Gets the number of lines in the layout.
281  * \return The number of lines in the layout.
282  * \note In CTL Fallback mode, returns 0.
283  */
284  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT unsigned int GetLineCount();
285 
286  /** Gets the number of glyphs in the layout.
287  * \return The number of glyphs in the layout.
288  * \note In CTL Fallback mode, returns 0.
289  */
290  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT unsigned int GetGlyphCount();
291 
292  /** Gets the glyph metrics for the given glyph index.
293  * \param[in] glyphIndex The index of the glyph in the layout line to get the glyph metrics for.
294  * \return The glyph metrics for the given glyph index.
295  * \note In CTL Fallback mode, returns a default GlyphMetrics struct.
296  */
297  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT GlyphMetrics GetGlyphMetrics( const unsigned int glyphIndex );
298 
299  /** Set the Pango Layout auto dir, exposes pango_layout_set_auto_dir ()
300  * see: https://developer.gnome.org/pango/stable/pango-Layout-Objects.html#pango-layout-set-auto-dir
301  * \param[in] autoDir Whether or not the layout should automatically determine base direction based on content
302  * \note In CTL Fallback mode, has no effect.
303  */
304  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void SetLayoutAutoDir( bool autoDir );
305 
306  /** Set width used to render the text. If the width of the vertices is smaller than this width, the text will be truncated. If the
307  * value is 0.0, the text will be rendered to the full width of the vertices
308  * \note In CTL Fallback mode, has no effect.
309  */
310  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void SetAltWidth( float width );
311 
312  /** Set height used to render the text. If the height of the vertices is smaller than this height, the text will be truncated. If the
313  * value is 0.0, the text will be rendered to the full height of the vertices
314  * \note In CTL Fallback mode, has no effect.
315  */
316  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void SetAltHeight( float height );
317 
318  /** Scales the text horizontally by the given value. Text is still clamped by the bounds of the text box
319  * \param value the horizontal scale
320  */
321  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void TextHorizontalScale( float value );
322 
323  /** Get the horizontal scale */
324  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT float TextHorizontalScale();
325 
326  /** Scales the text vertically by the given value. Text is still clamped by the bounds of the text box
327  * \param value the vertical scale
328  */
329  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void TextVerticalScale( float value );
330 
331  /** Get the vertical scale */
332  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT float TextVerticalScale();
333 
334  /** \see GlsText */
335  bool RequiresFontFile() const DISTI_METHOD_OVERRIDE
336  {
337  return true;
338  }
339 
340 protected:
341 #ifndef GLS_CTL_FALLBACK_ENABLED
342  /** Width used to render the text */
343  float _altWidth;
344  /** Height used to render the text */
345  float _altHeight;
346 
347  /** the horizontal scale */
349  /** the vertical scale */
351 
352  /** Pointer to the internal data needed for Pango. */
354 
355  /** makes adjustment to the image verts and texture coords for the alt width / height and text scaling properties
356  * \param[inout] verts the image verts
357  * \param[inout] texCoords the image texture coords
358  */
359  void AdjustImageVertsAndCoords( PangoRect& verts, PangoRect& texCoords );
360 
361 #endif // GLS_CTL_FALLBACK_ENABLED
362 
363 #ifdef GLES
364 
365  // See DisplayObject
366  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void SetFromGloData( GlsGloFileAttribute& data );
367 
368 # ifndef GLS_CTL_FALLBACK_ENABLED
369  /** The list of quads to draw for the shadows. */
371  /** The list of quads to draw for the characters. */
372  ScopedPtr<GlsQuadListVCT_2D> _characters;
373 
374  /** True if _geometryRefresh was true in PreDraw. This is just so we can rebuild the quads in Draw(). */
375  bool _geometryRefreshDraw;
376 
377  /** Populate the quad storage
378  * \param stateManager
379  */
380  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void PopulateQuadStorage( IGlsStateManager* stateManager );
381 
382  /** Draws the polygons that make up the characters.
383  * \param stateManager
384  */
385  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void DrawText( IGlsStateManager* stateManager );
386 # endif // GLS_CTL_FALLBACK_ENABLED
387 
388 #else
389  /** Draws the polygons that make up the characters.
390  */
391  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void DrawText();
392 #endif // GLES
393 #ifndef GLS_CTL_FALLBACK_ENABLED
394  /** Rebuilds the vertices of the text box.
395  */
396  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void RecalcVertices();
397 #endif // GLS_CTL_FALLBACK_ENABLED
398 
399 private:
400  /* See base class */
401  void OnCellDimensionChanged()
402  {
403  // Prevent changing cell dimensions for CTL Textbox
404  _cellHeight = 0;
405  _cellWidth = 0;
406  ControlCellSize( false );
407  }
408 
409  GlsCTLTextBox& operator=( const GlsCTLTextBox& ) DISTI_SPECIAL_MEM_FUN_DELETE;
410  GlsCTLTextBox( const GlsCTLTextBox& ) DISTI_SPECIAL_MEM_FUN_DELETE;
411 };
412 
413 #ifndef GLS_CTL_FALLBACK_ENABLED
414 
415 /** In stream operator for VerticalAlignment_t enumeration.
416  */
417 inline std::istream& operator>>( std::istream& instr, disti::GlsCTLTextBox::VerticalAlignment_t& verticalAlignment )
418 {
419  std::string str;
420  instr >> str;
421 
422  if( str == "ALIGN_TOP" || str == "VERTICAL_ALIGNMENT_TOP" )
423  {
424  verticalAlignment = disti::GlsCTLTextBox::ALIGN_TOP;
425  }
426  else if( str == "ALIGN_CENTER" || str == "VERTICAL_ALIGNMENT_CENTER" )
427  {
428  verticalAlignment = disti::GlsCTLTextBox::ALIGN_CENTER;
429  }
430  else if( str == "ALIGN_BOTTOM" || str == "VERTICAL_ALIGNMENT_BOTTOM" )
431  {
432  verticalAlignment = disti::GlsCTLTextBox::ALIGN_BOTTOM;
433  }
434  return instr;
435 }
436 
437 /** Out stream operator for VerticalAlignment_t enumeration.
438  */
439 inline std::ostream& operator<<( std::ostream& outstr, disti::GlsCTLTextBox::VerticalAlignment_t verticalAlignment )
440 {
441  switch( verticalAlignment )
442  {
443  case disti::GlsCTLTextBox::ALIGN_TOP:
444  outstr << "ALIGN_TOP";
445  break;
446  case disti::GlsCTLTextBox::ALIGN_CENTER:
447  outstr << "ALIGN_CENTER";
448  break;
449  case disti::GlsCTLTextBox::ALIGN_BOTTOM:
450  outstr << "ALIGN_BOTTOM";
451  break;
452  }
453  return outstr;
454 }
455 #endif // GLS_CTL_FALLBACK_ENABLED
456 
457 /** In stream operator for EllipsizeMode_t enumeration.
458  */
459 inline std::istream& operator>>( std::istream& instr, disti::GlsCTLTextBox::EllipsizeMode_t& ellipsizeMode )
460 {
461  std::string str;
462  instr >> str;
463 
464  if( str == "ELLIPSIZE_MODE_NONE" )
465  {
466  ellipsizeMode = disti::GlsCTLTextBox::ELLIPSIZE_MODE_NONE;
467  }
468  else if( str == "ELLIPSIZE_MODE_START" )
469  {
470  ellipsizeMode = disti::GlsCTLTextBox::ELLIPSIZE_MODE_START;
471  }
472  else if( str == "ELLIPSIZE_MODE_MIDDLE" )
473  {
474  ellipsizeMode = disti::GlsCTLTextBox::ELLIPSIZE_MODE_MIDDLE;
475  }
476  else if( str == "ELLIPSIZE_MODE_END" )
477  {
478  ellipsizeMode = disti::GlsCTLTextBox::ELLIPSIZE_MODE_END;
479  }
480  return instr;
481 }
482 
483 /** Out stream operator for EllipsizeMode_t enumeration.
484  */
485 inline std::ostream& operator<<( std::ostream& outstr, disti::GlsCTLTextBox::EllipsizeMode_t ellipsizeMode )
486 {
487  switch( ellipsizeMode )
488  {
489  case disti::GlsCTLTextBox::ELLIPSIZE_MODE_NONE:
490  outstr << "ELLIPSIZE_MODE_NONE";
491  break;
492  case disti::GlsCTLTextBox::ELLIPSIZE_MODE_START:
493  outstr << "ELLIPSIZE_MODE_START";
494  break;
495  case disti::GlsCTLTextBox::ELLIPSIZE_MODE_MIDDLE:
496  outstr << "ELLIPSIZE_MODE_MIDDLE";
497  break;
498  case disti::GlsCTLTextBox::ELLIPSIZE_MODE_END:
499  outstr << "ELLIPSIZE_MODE_END";
500  break;
501  }
502  return outstr;
503 }
504 
505 } // namespace disti
506 
507 #endif // INCLUDED_GLS_CTL_TEXT_BOX_H
The DistiUnhideGlobalsDummyClass class.
Definition: cull.h:49
virtual VerticalAlignment_t VerticalAlignment()
Definition: vertex.h:408
The disti::GlsTextBox class.
ScopedPtr< GlsPangoWrapper > _glsPangoWrapper
Definition: gls_ctl_text_box.h:353
virtual float TextHorizontalScale()
void AdjustImageVertsAndCoords(PangoRect &verts, PangoRect &texCoords)
virtual void PreDraw(const OpenGLMatrices &current, Culler &culler)
Class to contain current OpenGL view, projection and draw matrices.
Definition: util.h:278
virtual void CopyGeometry(DisplayObject *src)
virtual void SetVertices(unsigned int nPoints, Vertex *vertices)
float _altWidth
Definition: gls_ctl_text_box.h:343
bool RequiresFontFile() const DISTI_METHOD_OVERRIDE
Definition: gls_ctl_text_box.h:335
virtual DisplayObject * CloneObject(bool generateNames=false)
EllipsizeMode_t
Definition: gls_ctl_text_box.h:158
virtual void SetAvailableAttributes(unsigned int value)
virtual void VaString(const char *format,...)
Definition: display.h:97
virtual GlyphMetrics GetGlyphMetrics(const unsigned int glyphIndex)
float _cellHeight
Definition: gls_text.h:784
Definition: gls_state_manager_interface.h:66
virtual void RecalcVertices()
virtual unsigned int GetLineCount()
The disti::GlsText class.
float _altHeight
Definition: gls_ctl_text_box.h:345
Definition: gls_glo_file.h:835
virtual unsigned int GetGlyphCount()
virtual ~GlsCTLTextBox()
virtual void CopyProperties(DisplayObject *src)
virtual float TextVerticalScale()
virtual void Scale(float px, float py, float pz, Vertex *anchor, int handleBar)
virtual void Draw()
The Gls CTL (Complex Text Layout) Text Box.
Definition: gls_ctl_text_box.h:126
bool ControlCellSize() const
Definition: gls_text.h:463
VerticalAlignmentCTL_t
Definition: gls_ctl_text_box.h:150
static const unsigned int INTERNAL_BORDER
Definition: gls_ctl_text_box.h:134
Definition: gls_ctl_text_box.h:169
VerticalAlignment_t
Definition: gls_ctl_text_box.h:140
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL)
float _cellWidth
Definition: gls_text.h:787
The gls_auto_lib.
virtual void Rebuild()
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *array)
float _textVerticalScale
Definition: gls_ctl_text_box.h:350
virtual EllipsizeMode_t EllipsizeMode()
virtual void SetAltHeight(float height)
A smart pointer with unique ownership – poor man's std::unique_ptr.
virtual void DrawText()
virtual void SetLayoutAutoDir(bool autoDir)
Macros and helper code to determine what subset of C++11/14/17 is available.
float _textHorizontalScale
Definition: gls_ctl_text_box.h:348
Definition: bmpimage.h:46
virtual void SetAltWidth(float width)
The gls_gl.