kanzi::TextBlockConcept Class Reference

TextConcept is base class for nodes that implement text rendering. More...

#include <kanzi/ui/node/concept/text_block.hpp>

Inheritance diagram for kanzi::TextBlockConcept:
kanzi::TextBlockConceptImpl< TBaseClass, TDerivedClass > kanzi::TextBlockConceptImpl< Node2D, TextBlock2D > kanzi::TextBlockConceptImpl< Node3D, TextBlock3D > kanzi::TextBlock2D kanzi::TextBlock3D

Public Types

enum  TextHorizontalAlignment { TextHorizontalAlignmentLeft, TextHorizontalAlignmentRight, TextHorizontalAlignmentCenter }
 Horizontal alignment options for text layout. More...
 
enum  TextVerticalAlignment { TextVerticalAlignmentTop, TextVerticalAlignmentBaseline, TextVerticalAlignmentCenter, TextVerticalAlignmentBottom }
 Vertical alignment options for text layout. More...
 

Static Public Member Functions

static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 

Static Public Attributes

Properties
static PropertyType< ColorRGBAFontColorProperty
 FontColor property. More...
 
static PropertyType< float > FontSizeProperty
 FontSize property. More...
 
static PropertyType< ResourceSharedPtrFontMaterialProperty
 FontMaterial property. More...
 
static PropertyType< TextBlockConcept::TextHorizontalAlignmentTextHorizontalAlignmentProperty
 TextHorizontalAlignment property. More...
 
static PropertyType< TextBlockConcept::TextVerticalAlignmentTextVerticalAlignmentProperty
 TextVerticalAlignment property. More...
 
static PropertyType< float > LineSpacingProperty
 LineSpacing property. More...
 
static PropertyType< float > CharacterSpacingProperty
 CharacterSpacing property. More...
 
static PropertyType< string > OverflowProperty
 Overflow property. More...
 
static PropertyType< string > TextProperty
 Text property. More...
 
static PropertyType< bool > WordWrapProperty
 WordWrap property. More...
 
static PropertyType< bool > ConstrainContentHeightProperty
 ConstrainContentHeight property. More...
 
static PropertyType< float > FixedCharacterWidthProperty
 FixedCharacterWidth property. More...
 
static PropertyType< Vector2HorizontalPaddingProperty
 HorizontalPadding property. More...
 
static PropertyType< Vector2VerticalPaddingProperty
 VerticalPadding property. More...
 

Detailed Description

TextConcept is base class for nodes that implement text rendering.

Member Enumeration Documentation

Horizontal alignment options for text layout.

Enumerator
TextHorizontalAlignmentLeft 

Text is aligned to the left.

TextHorizontalAlignmentRight 

Text is aligned to the right.

TextHorizontalAlignmentCenter 

Text is centered horizontally.

Vertical alignment options for text layout.

Enumerator
TextVerticalAlignmentTop 

Text is aligned to the top.

TextVerticalAlignmentBaseline 

Text is aligned to the baseline of the first line of the text.

TextVerticalAlignmentCenter 

Text is centered vertically.

TextVerticalAlignmentBottom 

Text is aligned to the bottom.

Member Function Documentation

static PropertyTypeEditorInfoSharedPtr kanzi::TextBlockConcept::makeEditorInfo ( )
static

Member Data Documentation

PropertyType<ColorRGBA> kanzi::TextBlockConcept::FontColorProperty
static

FontColor property.

Defines the text color for the default font material and for the materials with a fragment shader that use the FontColor uniform. The default value is ColorRGBA(1.0f, 1.0f, 1.0f, 1.0f).

See also
setFontColor(), getFontColor()
PropertyType<float> kanzi::TextBlockConcept::FontSizeProperty
static

FontSize property.

Defines the font size in device independent pixels. The default value is 36.0f.

See also
setFontSize(), getFontSize()
PropertyType<ResourceSharedPtr> kanzi::TextBlockConcept::FontMaterialProperty
static

FontMaterial property.

Defines the resource ID of the font material resource. The material's shader needs to include GlyphTexture uniform which is automatically filled with glyph data. The default value is ResourceSharedPtr().

See also
setFontMaterial(), getFontMaterial()
PropertyType<TextBlockConcept::TextHorizontalAlignment> kanzi::TextBlockConcept::TextHorizontalAlignmentProperty
static

TextHorizontalAlignment property.

Defines the horizontal alignment of the text. The default value is TextBlockConcept::TextHorizontalAlignmentLeft.

See also
setTextHorizontalAlignment(), getTextHorizontalAlignment()
PropertyType<TextBlockConcept::TextVerticalAlignment> kanzi::TextBlockConcept::TextVerticalAlignmentProperty
static

TextVerticalAlignment property.

Defines the vertical alignment of the text. The default value is TextBlockConcept::TextVerticalAlignmentTop.

See also
setTextVerticalAlignment(), getTextVerticalAlignment()
PropertyType<float> kanzi::TextBlockConcept::LineSpacingProperty
static

LineSpacing property.

Defines the line spacing in multiples of the normal line height of the selected font. The default value is 1.0f.

See also
setLineSpacing(), getLineSpacing()
PropertyType<float> kanzi::TextBlockConcept::CharacterSpacingProperty
static

CharacterSpacing property.

Defines the character spacing in device independent pixels. The default value is 0.0f.

See also
setCharacterSpacing(), getCharacterSpacing()
PropertyType<string> kanzi::TextBlockConcept::OverflowProperty
static

Overflow property.

Defines the characters that represent the clipped text when the text string to be rendered is too long to fit in the node. The default value is "...".

See also
setOverflow(), getOverflow()
PropertyType<string> kanzi::TextBlockConcept::TextProperty
static

Text property.

Defines the text that the TextBlock renders. The default value is "Text".

See also
setText(), getText()
PropertyType<bool> kanzi::TextBlockConcept::WordWrapProperty
static

WordWrap property.

When enabled, long text lines that don't fit to the layout wrap to multiple lines. The default value is true.

See also
setWordWrap(), isWordWrap()
PropertyType<bool> kanzi::TextBlockConcept::ConstrainContentHeightProperty
static

ConstrainContentHeight property.

When enabled, last lines that don't fit to the layout are cut out. The default value is true.

See also
setConstrainContentHeight(), isConstrainContentHeight()
PropertyType<float> kanzi::TextBlockConcept::FixedCharacterWidthProperty
static

FixedCharacterWidth property.

The default value is -1.0f.

See also
setFixedCharacterWidth(), getFixedCharacterWidth()
PropertyType<Vector2> kanzi::TextBlockConcept::HorizontalPaddingProperty
static

HorizontalPadding property.

The default value is Vector2(0.0f, 0.0f).

See also
setHorizontalPadding(), getHorizontalPadding()
PropertyType<Vector2> kanzi::TextBlockConcept::VerticalPaddingProperty
static

VerticalPadding property.

The default value is Vector2(0.0f, 0.0f).

See also
setVerticalPadding(), getVerticalPadding()

The documentation for this class was generated from the following file: