GL Studio Safety Critical Embedded C++ Runtime Library
|
#include <gls_text.h>
Classes | |
struct | CharAttribute |
struct | InitParameters |
struct | RowInfo |
class | UnderlineStrikeThruRenderer |
Public Types | |
enum | Justification { JUSTIFICATION_LEFT, JUSTIFICATION_CENTER, JUSTIFICATION_RIGHT } |
Public Types inherited from GlsDisplayObject | |
enum | ObjectType { OBJECT_TYPE_COMPOSITE, OBJECT_TYPE_RENDERABLE } |
enum | PickMode { PICK_MODE_NEVER, PICK_MODE_FIRST, PICK_MODE_ALWAYS } |
Public Member Functions | |
virtual void | Draw (GlsStateManager &gl, const GlsFloat64 time) |
virtual void | SetAlphaMode (const GlsAlphaMode alphaMode) |
virtual void | SetFillColor (const GlsColor &fillColor) |
virtual void | SetLineColor (const GlsColor &lineColor) |
virtual void | SetLineWidth (const GlsFloat32 lineWidth) |
virtual void | SetPolygonMode (const GlsPolygonMode polygonMode) |
virtual void | SetTextureIndex (const GlsUInt32 textureIndex) |
virtual void | OffsetTexture (const GlsVector2D &offset) |
void | SetString (const GlsChar *const str) |
void | SetHaloColor (const GlsColor &haloColor) |
void | SetShadowColor (const GlsColor &shadowColor) |
virtual void | SetCharAttributes (const CharAttribute &charAttribute)=0 |
Public Member Functions inherited from GlsDisplayObject | |
virtual void | Calculate (const GlsFloat64 time) |
virtual GlsDisplayObject * | PickTest (const GlsVector2D &windowCoord, GlsInputManager &inputManager, const GlsMatrixAffineD::GLMatrixAffineF &parentDrawMatrix) |
GlsDisplayObject * | HandleEvent (GlsEvent &event) |
ObjectType | GetObjectType (void) const |
void | SetBlinking (const GlsBool blinking) |
void | SetBlinkRate (const GlsFloat32 blinkRate) |
void | SetDynamicRotation (const GlsVector3D &dynamicRotation) |
void | SetDynamicScale (const GlsVector3D &dynamicScale) |
void | SetDynamicTranslation (const GlsVector3D &dynamicTranslation) |
void | SetVisibility (const GlsBool visible) |
void | SetParent (GlsDisplayObject *const parent) |
void | SetPickMode (const PickMode pickMode) |
GlsBool | NeedCalculate (void) const |
void | InvalidatePickCache (void) |
Static Protected Attributes | |
static const GlsUInt32 | NUM_VERTS_BACKGROUND_POLY = 4u |
static const GlsChar | NEW_LINE_CHAR |
static const GlsChar | SPACE_CHAR |
Static Protected Attributes inherited from GlsRenderObject | |
static const GLclampf | ALPHA_MODE_2_LEVEL_REF |
This class serves as a base class for text displays
|
protected |
Constructor - create an instance
initParameters | initialization parameters |
maxNumLineSegmentsPerRow | maximum nubmer of line segments required per row to render underline / strike thru line segments (>0) |
eventDispatcher | event dispatcher for this object else GLS_NULL |
|
protectedvirtual |
Destructor – shall never be called
|
protectedpure virtual |
Populate the _rowInfo array based on the current display string
Implemented in GlsTextGrid, and GlsTextBox.
|
virtual |
Draws the text object
gl | GL State manager for OpenGL into which text object is drawn |
time | the elaspsed time in seconds since program start |
Implements GlsDisplayObject.
|
protectedpure virtual |
Draw the characters associated with the text object
gl | GL state manager to draw into |
Implemented in GlsTextGrid, and GlsTextBox.
|
protected |
Get the justification offset in pixels for the given row
row | row in question |
|
virtual |
Offset the texture on the object
offset | x, y offset for texture |
Implements GlsRenderObject.
|
protected |
Reset all of the line underline / strikethru renderers in the text objecy all of the underline and strikethru line segments to be recomputed the next time the text object is drawn
|
virtual |
Set the alpha mode
alphaMode | desired alpha mode |
Reimplemented from GlsRenderObject.
|
pure virtual |
Set the character attributes for the text ( pure virtual )
charAttribute | new character attributes for the text |
Implemented in GlsTextBox, and GlsTextGrid.
|
virtual |
Set the fill color
fillColor | desired fill color |
Reimplemented from GlsRenderObject.
void GlsText::SetHaloColor | ( | const GlsColor & | haloColor | ) |
Set the halo color
haloColor | new halo color |
|
virtual |
Set the line color
lineColor | desired line color |
Reimplemented from GlsRenderObject.
|
virtual |
Set the line width
lineWidth | new line width, GlsRenderObject::LINE_WIDTH_MIN <= lineWidth <= GlsRenderObject::LINE_WIDTH_MAX |
Reimplemented from GlsRenderObject.
|
virtual |
Set the polygon mode
polygonMode | new polygon mode |
Reimplemented from GlsRenderObject.
void GlsText::SetShadowColor | ( | const GlsColor & | shadowColor | ) |
Set the shadow color
shadowColor | new shadow color |
void GlsText::SetString | ( | const GlsChar *const | str | ) |
Set the display string. Will truncate to size of string buffer if str will not fit in buffer.
str | desired display string |
|
virtual |
Set the desired texture index
textureIndex | desired texture index into palette else GlsTexturePalette::NO_TEXTURE |
Reimplemented from GlsRenderObject.
|
protected |
background polygon
|
protected |
size of border in logical units
|
protected |
height of character cell in logical units ( >= 0.0f )
|
protected |
width of character cell in logical units ( >= 0.0f )
|
protected |
font for text display
|
protected |
GLS_TRUE if halo is enabled else GLS_FALSE
|
protected |
halo color
|
protected |
text justification mode
|
protected |
row offset when drawing chars
|
protected |
number of rows of text( > 0 )
|
protected |
GLS_TRUE if shadow effect is on else GLS_FALSE
|
protected |
color of the shadow effect behind the characters
|
protected |
amount of cell width for offset of shadow effect, ( -1.0f <= shadowDistance <= 1.0f )
|
protected |
string value to display
|
protected |
text object height when drawing
|
protected |
additional rotation matrix for text cells
|
protected |
GLS_TRUE if _textRotationMatrix is identity else GLS_FALSE
|
protected |
text object width when drawing
|
protected |
array ( _rows number of elements ) where element i is the underline strike thru renderer for row i
|
protected |
GLS_TRUE if all characters will display as uppercase else GLS_FALSE
|
protected |
GLS_TRUE if text wrapping is enabled else GLS_FALSE
|
staticprotected |
new line character constant
|
staticprotected |
required number of verts in background poly
|
staticprotected |
space character constant