Kanzi  3.9.4
Kanzi Engine API
kanzi::TextConcept Class Reference

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

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

Inheritance diagram for kanzi::TextConcept:
[legend]

Classes

struct  TextFormatParameters
 Structure that holds the parameters that TextConceptImpl::prepareTextFormat() needs. More...
 

Public Member Functions

virtual ~TextConcept ()=default
 Destructor. More...
 

Static Public Member Functions

static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 

Static Public Attributes

Properties
static PropertyType< ColorRGBAFontColorProperty
 Sets the text color for the default font material and for the materials with a fragment shader that uses the FontColor uniform. More...
 
static PropertyType< ResourceSharedPtrFontMaterialProperty
 Sets the material whose shader is used to render the text in a text node. More...
 
static PropertyType< Vector2HorizontalPaddingProperty
 Sets the padding spaces between the content and the left and right boundaries of a text node. More...
 
static PropertyType< bool > RemoveSideBearingsProperty
 Sets the position of the leftmost characters of left-aligned text and rightmost characters of right-aligned text exactly within the boundary of the text node. More...
 
static PropertyType< string > TextProperty
 Sets the text content that a text node renders. More...
 
static PropertyType< TextFormat::TextHorizontalAlignmentTextHorizontalAlignmentProperty
 Sets the horizontal alignment of the text in a text node. More...
 
static PropertyType< TextFormat::TextVerticalAlignmentTextVerticalAlignmentProperty
 Sets the vertical alignment of the text in a text node. More...
 
static PropertyType< Vector2VerticalPaddingProperty
 Sets the padding spaces between the content and the top and bottom boundaries of a text node. More...
 
static PropertyType< string > OverflowProperty
 Sets the characters that represent the truncated text when the text string to be rendered is too long to fit in a text node. More...
 
static PropertyType< bool > HorizontalFitProperty
 Allows a Text Block to scale glyphs horizontally when the text string is too long to fit in that Text Block. More...
 
static PropertyType< Vector2HorizontalFitScaleLimitsProperty
 Sets the scale range that the HorizontalFitProperty can use when it scales the text horizontally. More...
 

Detailed Description

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

This class defines the data and property types used to implement the text rendering nodes, such as TextBlock2D, TextBlock3D, TextBox2D, and TextBox3D.

Since
Kanzi 3.9.0

Constructor & Destructor Documentation

◆ ~TextConcept()

virtual kanzi::TextConcept::~TextConcept ( )
virtualdefault

Destructor.

Member Function Documentation

◆ makeEditorInfo()

static PropertyTypeEditorInfoSharedPtr kanzi::TextConcept::makeEditorInfo ( )
static

Member Data Documentation

◆ FontColorProperty

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

Sets the text color for the default font material and for the materials with a fragment shader that uses the FontColor uniform.

The default value is sRGB ColorRGBA(1.0f, 1.0f, 1.0f, 1.0f).

See also
TextConceptImpl::setFontColor(), TextConceptImpl::getFontColor()

◆ FontMaterialProperty

PropertyType<ResourceSharedPtr> kanzi::TextConcept::FontMaterialProperty
static

Sets the material whose shader is used to render the text in a text node.

The shader must use the ContentTexture uniform which is automatically filled with the glyph data. The default value is ResourceSharedPtr().

See also
TextConceptImpl::setFontMaterial(), TextConceptImpl::getFontMaterial()

◆ HorizontalPaddingProperty

PropertyType<Vector2> kanzi::TextConcept::HorizontalPaddingProperty
static

Sets the padding spaces between the content and the left and right boundaries of a text node.

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

See also
TextConceptImpl::setHorizontalPadding(), TextConceptImpl::getHorizontalPadding()

◆ RemoveSideBearingsProperty

PropertyType<bool> kanzi::TextConcept::RemoveSideBearingsProperty
static

Sets the position of the leftmost characters of left-aligned text and rightmost characters of right-aligned text exactly within the boundary of the text node.

The default value is false.

◆ TextProperty

PropertyType<string> kanzi::TextConcept::TextProperty
static

Sets the text content that a text node renders.

The default value is "".

See also
TextConceptImpl::setText(), TextConceptImpl::getText()

◆ TextHorizontalAlignmentProperty

PropertyType<TextFormat::TextHorizontalAlignment> kanzi::TextConcept::TextHorizontalAlignmentProperty
static

Sets the horizontal alignment of the text in a text node.

The default value is TextFormat::TextHorizontalAlignmentLeft.

See also
TextConceptImpl::setTextHorizontalAlignment(), TextConceptImpl::getTextHorizontalAlignment()

◆ TextVerticalAlignmentProperty

PropertyType<TextFormat::TextVerticalAlignment> kanzi::TextConcept::TextVerticalAlignmentProperty
static

Sets the vertical alignment of the text in a text node.

The default value is TextFormat::TextVerticalAlignmentTop.

See also
TextConceptImpl::setTextVerticalAlignment(), TextConceptImpl::getTextVerticalAlignment()

◆ VerticalPaddingProperty

PropertyType<Vector2> kanzi::TextConcept::VerticalPaddingProperty
static

Sets the padding spaces between the content and the top and bottom boundaries of a text node.

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

See also
TextConceptImpl::setVerticalPadding(), TextConceptImpl::getVerticalPadding()

◆ OverflowProperty

PropertyType<string> kanzi::TextConcept::OverflowProperty
static

Sets the characters that represent the truncated text when the text string to be rendered is too long to fit in a text node.

The default value is "...".

See also
TextConceptImpl::setOverflow(), TextConceptImpl::getOverflow()

◆ HorizontalFitProperty

PropertyType<bool> kanzi::TextConcept::HorizontalFitProperty
static

Allows a Text Block to scale glyphs horizontally when the text string is too long to fit in that Text Block.

The default value is false.

See also
TextConceptImpl::setHorizontalFit(), TextConceptImpl::getHorizontalFit()

◆ HorizontalFitScaleLimitsProperty

PropertyType<Vector2> kanzi::TextConcept::HorizontalFitScaleLimitsProperty
static

Sets the scale range that the HorizontalFitProperty can use when it scales the text horizontally.

The default value is Vector2(0.5f, 1.0f).

See also
TextConceptImpl::setHorizontalFitScaleLimits(), TextConceptImpl::getHorizontalFitScaleLimits()

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