Kanzi 3.9.10
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.
 

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.
 
static PropertyType< ResourceSharedPtrFontMaterialProperty
 Sets the material whose shader is used to render the text in a 3D text node.
 
static PropertyType< string > TextProperty
 Sets the text content that a text node renders.
 
static PropertyType< TextFormat::TextHorizontalAlignmentTextHorizontalAlignmentProperty
 Sets the horizontal alignment of the text in a text node.
 
static PropertyType< TextFormat::TextVerticalAlignmentTextVerticalAlignmentProperty
 Sets the vertical alignment of the text in a text node.
 
static PropertyType< Vector2HorizontalPaddingProperty
 Sets the padding spaces between the content and the left and right boundaries of a text node.
 
static PropertyType< Vector2VerticalPaddingProperty
 Sets the padding spaces between the content and the top and bottom boundaries of a text node.
 
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.
 
static PropertyType< TextFormat::TruncationTruncationProperty
 Sets how to truncate the text when the text string to be rendered is too long to fit in a node.
 
static PropertyType< TextFormat::TruncationDirectionTruncationDirectionProperty
 Sets which part of the text to truncate when the text string to be rendered is too long to fit in a node.
 
static PropertyType< boolRemoveSideBearingsProperty
 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.
 
static PropertyType< boolHorizontalFitProperty
 Allows a Text Block to scale glyphs horizontally when the text string is too long to fit in that Text Block.
 
static PropertyType< Vector2HorizontalFitScaleLimitsProperty
 Sets the scale range that the HorizontalFitProperty can use when it scales the text horizontally.
 

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 3D 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()

◆ 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()

◆ 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()

◆ 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()

◆ TruncationProperty

PropertyType<TextFormat::Truncation> kanzi::TextConcept::TruncationProperty
static

Sets how to truncate the text when the text string to be rendered is too long to fit in a node.

The default value is TextFormat::Truncation::AtCharacter.

See also
TextConceptImpl::setTruncation(), TextConceptImpl::getTruncation()
Since
Kanzi 3.9.6

◆ TruncationDirectionProperty

PropertyType<TextFormat::TruncationDirection> kanzi::TextConcept::TruncationDirectionProperty
static

Sets which part of the text to truncate when the text string to be rendered is too long to fit in a node.

The default value is TextFormat::TruncationDirection::Trailing.

See also
TextConceptImpl::setTruncationDirection(), TextConceptImpl::getTruncationDirection()
Since
Kanzi 3.9.6

◆ 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.

◆ 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: