Kanzi Framework  3.9.0
Kanzi Engine API
kanzi::TextConceptImpl< TDerivedClass > Class Template Reference

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

Inheritance diagram for kanzi::TextConceptImpl< TDerivedClass >:
[legend]

Public Member Functions

ColorRGBA getFontColor () const
 Gets the value of the FontColorProperty. More...
 
MaterialSharedPtr getFontMaterial () const
 Gets the value of the FontMaterialProperty. More...
 
Vector2 getHorizontalPadding () const
 Gets the value of HorizontalPaddingProperty. More...
 
string getOverflow () const
 Gets the value of the OverflowProperty. More...
 
bool getRemoveSideBearings () const
 Gets the value of the RemoveSideBearingsProperty. More...
 
string getText () const
 Gets the value of TextProperty. More...
 
TextFormat::TextHorizontalAlignment getTextHorizontalAlignment () const
 Gets the value of the TextHorizontalAlignmentProperty. More...
 
TextFormat::TextVerticalAlignment getTextVerticalAlignment () const
 Gets the value of the TextVerticalAlignmentProperty. More...
 
Vector2 getVerticalPadding () const
 Gets the value of VerticalPaddingProperty. More...
 
void setFontColor (ColorRGBA value)
 Sets the value of the FontColorProperty. More...
 
void setFontMaterial (MaterialSharedPtr value)
 Sets the value of the FontMaterialProperty. More...
 
void setHorizontalPadding (Vector2 value)
 Sets the value of HorizontalPaddingProperty. More...
 
void setOverflow (string_view value)
 Sets the value of the OverflowProperty. More...
 
void setRemoveSideBearings (bool value)
 Sets the value of the RemoveSideBearingsProperty. More...
 
void setText (string value)
 Sets the value of TextProperty. More...
 
void setTextHorizontalAlignment (TextFormat::TextHorizontalAlignment value)
 Sets the value of the TextHorizontalAlignmentProperty. More...
 
void setTextVerticalAlignment (TextFormat::TextVerticalAlignment value)
 Sets the value of the TextVerticalAlignmentProperty. More...
 
void setVerticalPadding (Vector2 value)
 Sets the value of VerticalPaddingProperty. More...
 
virtual ~TextConceptImpl ()=default
 Destructor. More...
 
- Public Member Functions inherited from kanzi::TextConcept
virtual ~TextConcept ()=default
 Destructor. More...
 

Static Public Member Functions

static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 
- Static Public Member Functions inherited from kanzi::TextConcept
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 

Protected Member Functions

void prepareTextFormat (const TextFormatParameters &parameters, string text)
 Updates the parameters and text of the internal text format. More...
 
 TextConceptImpl ()=default
 Constructor. More...
 

Protected Attributes

TextFormatPtr m_textFormat
 The text format for the text that this node displays. More...
 

Additional Inherited Members

- Static Public Attributes inherited from kanzi::TextConcept
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...
 

Detailed Description

template<typename TDerivedClass>
class kanzi::TextConceptImpl< TDerivedClass >

Since
Kanzi 3.9.0

Constructor & Destructor Documentation

◆ ~TextConceptImpl()

template<typename TDerivedClass>
virtual kanzi::TextConceptImpl< TDerivedClass >::~TextConceptImpl ( )
virtualdefault

Destructor.

◆ TextConceptImpl()

template<typename TDerivedClass>
kanzi::TextConceptImpl< TDerivedClass >::TextConceptImpl ( )
explicitprotecteddefault

Constructor.

Member Function Documentation

◆ makeEditorInfo()

template<typename TDerivedClass>
static PropertyTypeEditorInfoSharedPtr kanzi::TextConceptImpl< TDerivedClass >::makeEditorInfo ( )
static

◆ getFontColor()

template<typename TDerivedClass >
ColorRGBA kanzi::TextConceptImpl< TDerivedClass >::getFontColor ( ) const

Gets the value of the FontColorProperty.

Returns
The color value of the default font material, or the color value of materials with fragment shader that uses the FontColor uniform. Returns the value in range [0,1].
See also
setFontColor()

◆ setFontColor()

template<typename TDerivedClass >
void kanzi::TextConceptImpl< TDerivedClass >::setFontColor ( ColorRGBA  value)

Sets the value of the FontColorProperty.

Parameters
valueThe ColorRGBA color value of the font material with fragment shader that uses the FontColor uniform.
See also
getFontColor()

◆ getFontMaterial()

template<typename TDerivedClass >
MaterialSharedPtr kanzi::TextConceptImpl< TDerivedClass >::getFontMaterial ( ) const

Gets the value of the FontMaterialProperty.

Returns
The font material currently in use.
See also
setFontMaterial()

◆ setFontMaterial()

template<typename TDerivedClass >
void kanzi::TextConceptImpl< TDerivedClass >::setFontMaterial ( MaterialSharedPtr  value)

Sets the value of the FontMaterialProperty.

Parameters
valueThe font material.
See also
getFontMaterial()

◆ getHorizontalPadding()

template<typename TDerivedClass >
Vector2 kanzi::TextConceptImpl< TDerivedClass >::getHorizontalPadding ( ) const

◆ setHorizontalPadding()

template<typename TDerivedClass >
void kanzi::TextConceptImpl< TDerivedClass >::setHorizontalPadding ( Vector2  value)

◆ getText()

template<typename TDerivedClass >
string kanzi::TextConceptImpl< TDerivedClass >::getText ( ) const

Gets the value of TextProperty.

See also
setText()

◆ setText()

template<typename TDerivedClass >
void kanzi::TextConceptImpl< TDerivedClass >::setText ( string  value)

Sets the value of TextProperty.

See also
getText()

◆ getTextHorizontalAlignment()

template<typename TDerivedClass >
TextFormat::TextHorizontalAlignment kanzi::TextConceptImpl< TDerivedClass >::getTextHorizontalAlignment ( ) const

Gets the value of the TextHorizontalAlignmentProperty.

Returns
The horizontal alignment of the object.
See also
setTextHorizontalAlignment()

◆ setTextHorizontalAlignment()

template<typename TDerivedClass >
void kanzi::TextConceptImpl< TDerivedClass >::setTextHorizontalAlignment ( TextFormat::TextHorizontalAlignment  value)

Sets the value of the TextHorizontalAlignmentProperty.

Parameters
valueOne of the TextFormat::TextHorizontalAlignment enumerator values.
See also
getTextHorizontalAlignment()

◆ getTextVerticalAlignment()

template<typename TDerivedClass >
TextFormat::TextVerticalAlignment kanzi::TextConceptImpl< TDerivedClass >::getTextVerticalAlignment ( ) const

Gets the value of the TextVerticalAlignmentProperty.

Returns
The vertical alignment of the object.
See also
setTextVerticalAlignment()

◆ setTextVerticalAlignment()

template<typename TDerivedClass >
void kanzi::TextConceptImpl< TDerivedClass >::setTextVerticalAlignment ( TextFormat::TextVerticalAlignment  value)

Sets the value of the TextVerticalAlignmentProperty.

Parameters
valueOne of the TextFormat::TextVerticalAlignment enumerator values.
See also
getTextVerticalAlignment()

◆ getVerticalPadding()

template<typename TDerivedClass >
Vector2 kanzi::TextConceptImpl< TDerivedClass >::getVerticalPadding ( ) const

Gets the value of VerticalPaddingProperty.

See also
setVerticalPadding()

◆ setVerticalPadding()

template<typename TDerivedClass >
void kanzi::TextConceptImpl< TDerivedClass >::setVerticalPadding ( Vector2  value)

Sets the value of VerticalPaddingProperty.

See also
getVerticalPadding()

◆ getOverflow()

template<typename TDerivedClass >
string kanzi::TextConceptImpl< TDerivedClass >::getOverflow ( ) const

Gets the value of the OverflowProperty.

Returns
The characters that represent the truncated text when the text string is too long to fit in the node.
See also
setOverflow()

◆ setOverflow()

template<typename TDerivedClass >
void kanzi::TextConceptImpl< TDerivedClass >::setOverflow ( string_view  value)

Sets the value of the OverflowProperty.

Parameters
valueThe characters that represent the truncated text when the text string is too long to fit in the node.
See also
getOverflow()

◆ getRemoveSideBearings()

template<typename TDerivedClass >
bool kanzi::TextConceptImpl< TDerivedClass >::getRemoveSideBearings ( ) const

Gets the value of the RemoveSideBearingsProperty.

Returns
If the position of the leftmost characters of left-aligned text and rightmost characters of right-aligned text are to be exactly within the boundary of the text node, true, otherwise false.

◆ setRemoveSideBearings()

template<typename TDerivedClass >
void kanzi::TextConceptImpl< TDerivedClass >::setRemoveSideBearings ( bool  value)

Sets the value of the RemoveSideBearingsProperty.

Parameters
valueThe value that determines if the position of the leftmost characters of left-aligned text and rightmost characters of right-aligned text are to be exactly within the boundary of the text node or not.

◆ prepareTextFormat()

template<typename TDerivedClass >
void kanzi::TextConceptImpl< TDerivedClass >::prepareTextFormat ( const TextFormatParameters parameters,
string  text 
)
protected

Updates the parameters and text of the internal text format.

Calls notifyPostPrepareTextFormat() when the text format is created or reused successfully.

Parameters
parametersCollection of parameters that are used to configure the text format.
textThe text that is layouted using the text format.

Member Data Documentation

◆ m_textFormat

template<typename TDerivedClass>
TextFormatPtr kanzi::TextConceptImpl< TDerivedClass >::m_textFormat
protected

The text format for the text that this node displays.


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