GL Studio 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) 2015 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 #if defined( ANDROID ) || defined (__APPLE__) || defined(RPI_ARCH) || _MSC_VER >= 1600
55 #define CTL_PTR std::unique_ptr
56 #else
57 #define CTL_PTR std::auto_ptr
58 #endif
59 
60 //////////////////// Provides support for creating DLLs ////////////////////////
61 #if (defined(GLSGEN_EXPORT_GLSCTLTEXTBOX) || \
62  defined(GLSGEN_IMPORT_GLSCTLTEXTBOX) || \
63  defined(GLSGEN_GLSCTLTEXTBOX_EXPORT_GENERATED) || \
64  defined(GLS_IMPORT_GENERATED)) \
65  && defined(_MSC_VER)
66 # if defined(GLSGEN_EXPORT_GLSCTLTEXTBOX) || defined(GLSGEN_GLSCTLTEXTBOX_EXPORT_GENERATED)
67 # define GLSGEN_GLSCTLTEXTBOX_EXPORT __declspec(dllexport)
68 # else
69 # define GLSGEN_GLSCTLTEXTBOX_EXPORT __declspec(dllimport)
70 # endif
71 #else
72 # define GLSGEN_GLSCTLTEXTBOX_EXPORT
73 #endif
74 ///////////////////////////////////////////////////////////////////////////////
75 
76 #include <memory>
77 #include <string>
78 #include "gls_gl.h"
79 #include "unhide_globals.h"
80 #include "gls_cpp_lang_support.h"
81 
82 #ifndef GLS_CTL_FALLBACK_ENABLED
83 # include "gls_text.h"
84 # define CTL_BASE_CLASS GlsText
85 #else
86 # include "gls_text_box.h"
87 # define CTL_BASE_CLASS GlsTextBox
88 #endif
89 
90 #define LIB_BASE_NAME "gls_ctl_text_box"
91 #include "gls_auto_lib.h"
92 #undef LIB_BASE_NAME
93 
94 // Force inclusion of the pango libraries
95 #if WIN32
96 # if !defined(NO_GLS_AUTOLIB) && !defined(GLS_IMPORT_LIBRARY)
97 # ifdef _WIN64
98 # define PANGO_SUFFIX "_64"
99 # else
100 # define PANGO_SUFFIX ""
101 # endif
102 # pragma message( "Will automatically link with libpango" PANGO_SUFFIX "-1.0.lib" )
103 # pragma message( "Will automatically link with libpangoft2" PANGO_SUFFIX "-1.0.lib" )
104 # pragma message( "Will automatically link with libgobject" PANGO_SUFFIX "-2.0.lib" )
105 # pragma comment(lib, "libpango" PANGO_SUFFIX "-1.0.lib")
106 # pragma comment(lib, "libpangoft2" PANGO_SUFFIX "-1.0.lib")
107 # pragma comment(lib, "libgobject" PANGO_SUFFIX "-2.0.lib")
108 # endif
109 #endif
110 
111 // autoptr is deprecated
112 #if __GNUC__ == 5
113 #pragma GCC diagnostic push
114 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
115 #endif
116 
117 namespace disti
118 {
119 
120 // Forward Declarations
121 #ifndef GLS_CTL_FALLBACK_ENABLED
122 class GlsPangoWrapper;
123 struct PangoRect;
124 #else
125 class GlsTextBoxFontRenderer;
126 #endif // GLS_CTL_FALLBACK_ENABLED
127 
128 #ifdef GLES
129 class GlsGloFileAttribute;
130 class GlsStateManager;
131 class GlsQuadListVCT_2D;
132 #endif // GLES
133 
134 //===========================================================================
135 /** \brief The Gls CTL (Complex Text Layout) Text Box.
136  *
137  * On certain platforms, the text layout library is unavailable, and complex text rendering in the runtime will be missing.
138  *
139  * To account for this, the GlsCTLTextBox will 'Fallback' to being treated as a GlsTextBox. In those cases, certain
140  * GlsCTLTextBox functions will not have no effect.
141  */
142 class GlsCTLTextBox : public CTL_BASE_CLASS
143 {
144 public:
145  typedef CTL_BASE_CLASS _BaseClass;
146 
147  /** The internal border between the layout edges and the glyph edges.
148  * This will keep the glyph edges from appearing cut-off when linear texture filtering is applied.
149  */
150  static const unsigned int INTERNAL_BORDER = 1;
151 
152  friend class GlsCTLTextBoxEditor;
153 
154 #ifndef GLS_CTL_FALLBACK_ENABLED
155  /** The vertical alignment types. */
157  {
158  ALIGN_CENTER,
159  ALIGN_TOP,
160  ALIGN_BOTTOM
161  };
162 #else
163  typedef Align_t VerticalAlignment_t;
164 #endif // GLS_CTL_FALLBACK_ENABLED
165 
166  /** Deprecated */
168  {
169  VERTICAL_ALIGNMENT_CENTER = ALIGN_CENTER,
170  VERTICAL_ALIGNMENT_TOP = ALIGN_TOP,
171  VERTICAL_ALIGNMENT_BOTTOM = ALIGN_BOTTOM
172  };
173 
174  /** The ellipsize mode types. */
176  {
177  ELLIPSIZE_MODE_NONE,
178  ELLIPSIZE_MODE_START,
179  ELLIPSIZE_MODE_MIDDLE,
180  ELLIPSIZE_MODE_END
181  };
182 
183  /** The structure returned to the caller when getting the glyph metrics.
184  * These are in logical units, relative to the bottom-left corner of the text box.
185  */
187  {
188  float minX;
189  float minY;
190  float maxX;
191  float maxY;
192 
193  GlyphMetrics()
194  : minX( 0.0f )
195  , minY( 0.0f )
196  , maxX( 0.0f )
197  , maxY( 0.0f )
198  {}
199  };
200 
201  /** Default constructor. */
202  GLSGEN_GLSCTLTEXTBOX_EXPORT GlsCTLTextBox();
203 
204  /** The copy constructor for GlsCTLTextBox
205  *
206  * \param that The GlsCTLTextBox object that is being copied
207  * \param generateNames Whether or not to generate a new instance name
208  */
209  GLSGEN_GLSCTLTEXTBOX_EXPORT GlsCTLTextBox( const GlsCTLTextBox& that, const bool generateNames );
210 
211  /** Destructor.
212  */
213  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT ~GlsCTLTextBox();
214 
215  // See DisplayObject
216  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void SetAvailableAttributes( unsigned int value );
217 
218 #ifndef GLS_CTL_FALLBACK_ENABLED
219  // See DisplayObject
220  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT DisplayObject* CloneObject( bool generateNames = false );
221 
222  // See DisplayObject
223  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void CopyGeometry( DisplayObject* src );
224 
225  // See DisplayObject
226  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void CopyProperties( DisplayObject* src );
227 
228  // See DisplayObject
229  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void PreDraw( const OpenGLMatrices& current, Culler& culler );
230 
231  // See DisplayObject
232  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void Draw();
233 
234  // See DisplayObject
235  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void SetVertices( unsigned int nPoints, Vertex* vertices );
236 
237  // See DisplayObject
238  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void Scale( float px, float py, float pz, Vertex* anchor, int handleBar );
239 
240  /** Print a string into this text object.
241  * Replaces the entire string.
242  * \param format printf style varargs formatting string.
243  */
244  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void VaString( const char* format, ... );
245 
246  /** Set the vertical alignment for this text object
247  * \param[in] verticalAlignment The vertical alignment type.
248  */
249  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void VerticalAlignment( VerticalAlignment_t verticalAlignment );
250  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void VerticalAlignment( VerticalAlignmentCTL_t verticalAlignment ) { VerticalAlignment( static_cast<VerticalAlignment_t>( verticalAlignment ) ); }
251 
252  /** Get the vertical alignment for this text object
253  * \return The vertical alignment type.
254  */
255  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT VerticalAlignment_t VerticalAlignment();
256 
257 #else
258 
259  /** Set the vertical alignment for this text object
260  * \param[in] verticalAlignment The vertical alignment type.
261  */
262  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void VerticalAlignment( VerticalAlignment_t verticalAlignment ) { _BaseClass::VerticalAlignment( verticalAlignment ); }
263  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void VerticalAlignment( VerticalAlignmentCTL_t verticalAlignment );
264 
265 #endif // GLS_CTL_FALLBACK_ENABLED
266 
267 #ifndef GLES
268 
269  // See DisplayObject
270  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT InterfaceListType* GetCppInterfaceDescription( InterfaceListType* addToThisList = NULL );
271 
272  // See DisplayObject
273  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void GetCppInterfaceDescriptionFree( InterfaceListType* array );
274 
275 #endif // GLES
276 
277  /** Rebuilds this text box layout. This may be an expensive call, so it should only be called when a property changes.
278  * \note In CTL Fallback mode, GlsText::SetRebuild will be called instead, as this is a protected method in GlsTextBox.
279  */
280  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void Rebuild();
281 
282 // NO CTL-only functions should be disabled when using the GlsTextBox fallback.
283 // They should be available to every runtime, even if they do nothing.
284 
285 
286  /** Gets the type of automatic ellipsize if the text does not fit in the boundary.
287  * \return The type of automatic ellipsize if the text does not fit in the boundary.
288  * \note In CTL Fallback mode, returns ELLIPSIZE_MODE_NONE.
289  */
290  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT EllipsizeMode_t EllipsizeMode();
291 
292  /** Sets the type of automatic ellipsize if the text does not fit in the boundary.
293  * \param[in] ellipsizeMode The type of automatic ellipsize if the text does not fit in the boundary.
294  * \note In CTL Fallback mode, has no effect.
295  */
296  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void EllipsizeMode( const EllipsizeMode_t ellipsizeMode );
297 
298  /** Gets the number of lines in the layout.
299  * \return The number of lines in the layout.
300  * \note In CTL Fallback mode, returns 0.
301  */
302  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT unsigned int GetLineCount();
303 
304  /** Gets the number of glyphs in the layout.
305  * \return The number of glyphs in the layout.
306  * \note In CTL Fallback mode, returns 0.
307  */
308  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT unsigned int GetGlyphCount();
309 
310  /** Gets the glyph metrics for the given glyph index.
311  * \param[in] glyphIndex The index of the glyph in the layout line to get the glyph metrics for.
312  * \return The glyph metrics for the given glyph index.
313  * \note In CTL Fallback mode, returns a default GlyphMetrics struct.
314  */
315  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT GlyphMetrics GetGlyphMetrics( const unsigned int glyphIndex );
316 
317  /** Set the Pango Layout auto dir, exposes pango_layout_set_auto_dir ()
318  * see: https://developer.gnome.org/pango/stable/pango-Layout-Objects.html#pango-layout-set-auto-dir
319  * \param[in] autoDir Whether or not the layout should automatically determine base direction based on content
320  * \note In CTL Fallback mode, has no effect.
321  */
322  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void SetLayoutAutoDir( bool autoDir );
323 
324  /** 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
325  * value is 0.0, the text will be rendered to the full width of the vertices
326  * \note In CTL Fallback mode, has no effect.
327  */
328  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void SetAltWidth( float width );
329 
330  /** 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
331  * value is 0.0, the text will be rendered to the full height of the vertices
332  * \note In CTL Fallback mode, has no effect.
333  */
334  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void SetAltHeight( float height );
335 
336  /** Scales the text horizontally by the given value. Text is still clamped by the bounds of the text box
337  * \param value the horizontal scale
338  */
339  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void TextHorizontalScale( float value );
340 
341  /** Get the horizontal scale */
342  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT float TextHorizontalScale();
343 
344  /** Scales the text vertically by the given value. Text is still clamped by the bounds of the text box
345  * \param value the vertical scale
346  */
347  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void TextVerticalScale( float value );
348 
349  /** Get the vertical scale */
350  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT float TextVerticalScale();
351 
352 protected:
353 #ifndef GLS_CTL_FALLBACK_ENABLED
354  /** Width used to render the text */
355  float _altWidth;
356  /** Height used to render the text */
357  float _altHeight;
358 
359  /** the horizontal scale */
361  /** the vertical scale */
363 
364  /** Pointer to the internal data needed for Pango. */
365  CTL_PTR< GlsPangoWrapper > _glsPangoWrapper;
366 
367  /** makes adjustment to the image verts and texture coords for the alt width / height and text scaling properties
368  * \param[inout] verts the image verts
369  * \param[inout] texCoords the image texture coords
370  */
371  void AdjustImageVertsAndCoords( PangoRect& verts, PangoRect& texCoords );
372 
373 #endif // GLS_CTL_FALLBACK_ENABLED
374 
375 #ifdef GLES
376 
377  // See DisplayObject
378  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void SetFromGloData( GlsGloFileAttribute& data );
379 
380 #ifndef GLS_CTL_FALLBACK_ENABLED
381  /** The list of quads to draw for the shadows. */
382  CTL_PTR< GlsQuadListVCT_2D > _shadows;
383  /** The list of quads to draw for the characters. */
384  CTL_PTR< GlsQuadListVCT_2D > _characters;
385 
386  /** True if _geometryRefresh was true in PreDraw. This is just so we can rebuild the quads in Draw(). */
387  bool _geometryRefreshDraw;
388 
389  /** Populate the quad storage
390  * \param stateManager
391  */
392  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void PopulateQuadStorage( IGlsStateManager* stateManager );
393 
394  /** Draws the polygons that make up the characters.
395  * \param stateManager
396  */
397  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void DrawText( IGlsStateManager* stateManager );
398 #endif // GLS_CTL_FALLBACK_ENABLED
399 
400 
401 #else
402  /** Draws the polygons that make up the characters.
403  */
404  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void DrawText();
405 #endif // GLES
406 #ifndef GLS_CTL_FALLBACK_ENABLED
407  /** Rebuilds the vertices of the text box.
408  */
409  virtual GLSGEN_GLSCTLTEXTBOX_EXPORT void RecalcVertices();
410 #endif // GLS_CTL_FALLBACK_ENABLED
411 
412 private:
413  /* See base class */
414  void OnCellDimensionChanged()
415  {
416  // Prevent changing cell dimensions for CTL Textbox
417  _cellHeight = 0;
418  _cellWidth = 0;
419  ControlCellSize( false );
420  }
421 
422  GlsCTLTextBox& operator=( const GlsCTLTextBox& ) DISTI_SPECIAL_MEM_FUN_DELETE;
423  GlsCTLTextBox( const GlsCTLTextBox& ) DISTI_SPECIAL_MEM_FUN_DELETE;
424 };
425 
426 #ifndef GLS_CTL_FALLBACK_ENABLED
427 
428 /** In stream operator for VerticalAlignment_t enumeration.
429  */
430 inline std::istream& operator>>( std::istream& instr, disti::GlsCTLTextBox::VerticalAlignment_t& verticalAlignment )
431 {
432  std::string str;
433  instr >> str;
434 
435  if( str == "ALIGN_TOP" || str == "VERTICAL_ALIGNMENT_TOP" )
436  {
437  verticalAlignment = disti::GlsCTLTextBox::ALIGN_TOP;
438  }
439  else if( str == "ALIGN_CENTER" || str == "VERTICAL_ALIGNMENT_CENTER" )
440  {
441  verticalAlignment = disti::GlsCTLTextBox::ALIGN_CENTER;
442  }
443  else if( str == "ALIGN_BOTTOM" || str == "VERTICAL_ALIGNMENT_BOTTOM" )
444  {
445  verticalAlignment = disti::GlsCTLTextBox::ALIGN_BOTTOM;
446  }
447  return instr;
448 }
449 
450 /** Out stream operator for VerticalAlignment_t enumeration.
451  */
452 inline std::ostream& operator<<( std::ostream& outstr, disti::GlsCTLTextBox::VerticalAlignment_t verticalAlignment )
453 {
454  switch( verticalAlignment )
455  {
456  case disti::GlsCTLTextBox::ALIGN_TOP:
457  outstr << "ALIGN_TOP";
458  break;
459  case disti::GlsCTLTextBox::ALIGN_CENTER:
460  outstr << "ALIGN_CENTER";
461  break;
462  case disti::GlsCTLTextBox::ALIGN_BOTTOM:
463  outstr << "ALIGN_BOTTOM";
464  break;
465  }
466  return outstr;
467 }
468 #endif // GLS_CTL_FALLBACK_ENABLED
469 
470 /** In stream operator for EllipsizeMode_t enumeration.
471  */
472 inline std::istream& operator>>( std::istream& instr, disti::GlsCTLTextBox::EllipsizeMode_t& ellipsizeMode )
473 {
474  std::string str;
475  instr >> str;
476 
477  if( str == "ELLIPSIZE_MODE_NONE" )
478  {
479  ellipsizeMode = disti::GlsCTLTextBox::ELLIPSIZE_MODE_NONE;
480  }
481  else if( str == "ELLIPSIZE_MODE_START" )
482  {
483  ellipsizeMode = disti::GlsCTLTextBox::ELLIPSIZE_MODE_START;
484  }
485  else if( str == "ELLIPSIZE_MODE_MIDDLE" )
486  {
487  ellipsizeMode = disti::GlsCTLTextBox::ELLIPSIZE_MODE_MIDDLE;
488  }
489  else if( str == "ELLIPSIZE_MODE_END" )
490  {
491  ellipsizeMode = disti::GlsCTLTextBox::ELLIPSIZE_MODE_END;
492  }
493  return instr;
494 }
495 
496 /** Out stream operator for EllipsizeMode_t enumeration.
497  */
498 inline std::ostream& operator<<( std::ostream& outstr, disti::GlsCTLTextBox::EllipsizeMode_t ellipsizeMode )
499 {
500  switch( ellipsizeMode )
501  {
502  case disti::GlsCTLTextBox::ELLIPSIZE_MODE_NONE:
503  outstr << "ELLIPSIZE_MODE_NONE";
504  break;
505  case disti::GlsCTLTextBox::ELLIPSIZE_MODE_START:
506  outstr << "ELLIPSIZE_MODE_START";
507  break;
508  case disti::GlsCTLTextBox::ELLIPSIZE_MODE_MIDDLE:
509  outstr << "ELLIPSIZE_MODE_MIDDLE";
510  break;
511  case disti::GlsCTLTextBox::ELLIPSIZE_MODE_END:
512  outstr << "ELLIPSIZE_MODE_END";
513  break;
514  }
515  return outstr;
516 }
517 
518 }
519 #if __GNUC__ == 5
520 #pragma GCC diagnostic pop
521 #endif
522 
523 #endif // INCLUDED_GLS_CTL_TEXT_BOX_H
The DistiUnhideGlobalsDummyClass class.
Definition: cull.h:50
virtual VerticalAlignment_t VerticalAlignment()
Definition: vertex.h:365
The disti::GlsTextBox class.
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:289
virtual void CopyGeometry(DisplayObject *src)
virtual void SetVertices(unsigned int nPoints, Vertex *vertices)
float _altWidth
Definition: gls_ctl_text_box.h:355
virtual DisplayObject * CloneObject(bool generateNames=false)
EllipsizeMode_t
Definition: gls_ctl_text_box.h:175
virtual void SetAvailableAttributes(unsigned int value)
virtual void VaString(const char *format,...)
Definition: display.h:98
virtual GlyphMetrics GetGlyphMetrics(const unsigned int glyphIndex)
float _cellHeight
Definition: gls_text.h:783
virtual void RecalcVertices()
virtual unsigned int GetLineCount()
The disti::GlsText class.
float _altHeight
Definition: gls_ctl_text_box.h:357
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:142
bool ControlCellSize() const
Definition: gls_text.h:466
VerticalAlignmentCTL_t
Definition: gls_ctl_text_box.h:167
static const unsigned int INTERNAL_BORDER
Definition: gls_ctl_text_box.h:150
Definition: gls_ctl_text_box.h:186
VerticalAlignment_t
Definition: gls_ctl_text_box.h:156
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL)
float _cellWidth
Definition: gls_text.h:786
The gls_auto_lib.
virtual void Rebuild()
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *array)
float _textVerticalScale
Definition: gls_ctl_text_box.h:362
virtual EllipsizeMode_t EllipsizeMode()
virtual void SetAltHeight(float height)
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:360
std::auto_ptr< GlsPangoWrapper > _glsPangoWrapper
Definition: gls_ctl_text_box.h:365
Definition: bmpimage.h:46
virtual void SetAltWidth(float width)
The gls_gl.