TextConceptImplementation is an abstract class for implementing text concept. More...
#include <kanzi/ui/node/concept/text_block.hpp>
Static Public Member Functions | |
static PropertyTypeEditorInfoSharedPtr | makeEditorInfo () |
Static Public Member Functions inherited from kanzi::TextBlockConcept | |
static PropertyTypeEditorInfoSharedPtr | makeEditorInfo () |
Protected Member Functions | |
TextBlockConceptImpl (Domain *domain, string_view name) | |
Constructor. More... | |
void | prepareTextFormat (float textFormatWidth, float textFormatHeight, bool constrainToActualSize) |
Position the text. More... | |
virtual void | onNodePropertyChanged (AbstractPropertyType propertyType, PropertyNotificationReason reason) KZ_OVERRIDE |
Node::onPropertyChanged implementation. More... | |
Protected Attributes | |
MaterialSharedPtr | m_cachedFontMaterial |
Font material resource reference. More... | |
FontSharedPtr | m_cachedFont |
Font resource reference. More... | |
TextFormatSharedPtr | m_textFormat |
The text layout for the glyphs that this node displays. More... | |
ClassPropertyDefaultValue< ResourceSharedPtr > | m_classValueFontMaterialProperty |
Default value for font material property. More... | |
ClassPropertyDefaultValue< ResourceSharedPtr > | m_classValueFontProperty |
Default value for font property. More... | |
TextConceptImplementation is an abstract class for implementing text concept.
|
explicitprotected |
Constructor.
domain | The UI domain the new node belongs to. |
name | The name of the node. |
|
static |
FontSharedPtr kanzi::TextBlockConceptImpl< TBaseClass, TDerivedClass >::getFont | ( | ) | const |
Gets the value of the FontProperty.
void kanzi::TextBlockConceptImpl< TBaseClass, TDerivedClass >::setFont | ( | FontSharedPtr | value | ) |
Sets the value of the FontProperty.
value | The resource ID of the font to use. |
float kanzi::TextBlockConceptImpl< TBaseClass, TDerivedClass >::getFontSize | ( | ) | const |
Gets the value of the FontSizeProperty.
void kanzi::TextBlockConceptImpl< TBaseClass, TDerivedClass >::setFontSize | ( | float | value | ) |
Sets the value of the FontSizeProperty.
value | The size of the font in device independent pixels. |
MaterialSharedPtr kanzi::TextBlockConceptImpl< TBaseClass, TDerivedClass >::getFontMaterialResourceID | ( | ) | const |
Gets the value of the FontMaterialProperty.
void kanzi::TextBlockConceptImpl< TBaseClass, TDerivedClass >::setFontMaterialResourceID | ( | MaterialSharedPtr | value | ) |
Sets the value of the FontMaterialProperty.
value | The resource ID of the font material. |
ColorRGBA kanzi::TextBlockConceptImpl< TBaseClass, TDerivedClass >::getFontColor | ( | ) | const |
Gets the value of the FontColorProperty.
void kanzi::TextBlockConceptImpl< TBaseClass, TDerivedClass >::setFontColor | ( | ColorRGBA | value | ) |
Sets the value of the FontColorProperty.
value | The ColorRGBA color value of the font material with fragment shader that uses the FontColor uniform. |
TextBlockConcept::TextHorizontalAlignment kanzi::TextBlockConceptImpl< TBaseClass, TDerivedClass >::getTextHorizontalAlignment | ( | ) | const |
Gets the value of the TextHorizontalAlignmentProperty.
void kanzi::TextBlockConceptImpl< TBaseClass, TDerivedClass >::setTextHorizontalAlignment | ( | TextBlockConcept::TextHorizontalAlignment | value | ) |
Sets the value of the TextHorizontalAlignmentProperty.
value | One of the TextHorizontalAlignment enumerator values. |
TextBlockConcept::TextVerticalAlignment kanzi::TextBlockConceptImpl< TBaseClass, TDerivedClass >::getTextVerticalAlignment | ( | ) | const |
Gets the value of the TextVerticalAlignmentProperty.
void kanzi::TextBlockConceptImpl< TBaseClass, TDerivedClass >::setTextVerticalAlignment | ( | TextBlockConcept::TextVerticalAlignment | value | ) |
Sets the value of the TextVerticalAlignmentProperty.
value | One of the TextVerticalAlignment enumerator values. |
float kanzi::TextBlockConceptImpl< TBaseClass, TDerivedClass >::getLineSpacing | ( | ) | const |
Gets the value of the LineSpacingProperty.
void kanzi::TextBlockConceptImpl< TBaseClass, TDerivedClass >::setLineSpacing | ( | float | value | ) |
Sets the value of the LineSpacingProperty.
value | The line spacing in multiples of the normal line height of the selected font. |
float kanzi::TextBlockConceptImpl< TBaseClass, TDerivedClass >::getCharacterSpacing | ( | ) | const |
Gets the value of the CharacterSpacingProperty.
void kanzi::TextBlockConceptImpl< TBaseClass, TDerivedClass >::setCharacterSpacing | ( | float | value | ) |
Sets the value of the CharacterSpacingProperty.
value | The character spacing in device independent pixels. |
float kanzi::TextBlockConceptImpl< TBaseClass, TDerivedClass >::getFixedCharacterWidth | ( | ) | const |
Gets the value of the FixedCharacterWidthProperty.
void kanzi::TextBlockConceptImpl< TBaseClass, TDerivedClass >::setFixedCharacterWidth | ( | float | value | ) |
Sets the value of the FixedCharacterWidthProperty.
value | The fixed character width in device independent pixels. |
string kanzi::TextBlockConceptImpl< TBaseClass, TDerivedClass >::getOverflow | ( | ) | const |
Gets the value of the OverflowProperty.
void kanzi::TextBlockConceptImpl< TBaseClass, TDerivedClass >::setOverflow | ( | string_view | value | ) |
Sets the value of the OverflowProperty.
value | The characters that represent the clipped text when the text string is too long to fit in the node. |
string kanzi::TextBlockConceptImpl< TBaseClass, TDerivedClass >::getText | ( | ) | const |
Gets the value of TextProperty.
void kanzi::TextBlockConceptImpl< TBaseClass, TDerivedClass >::setText | ( | string | value | ) |
Sets the value of TextProperty.
bool kanzi::TextBlockConceptImpl< TBaseClass, TDerivedClass >::isWordWrap | ( | ) | const |
Gets the value of WordWrapProperty.
void kanzi::TextBlockConceptImpl< TBaseClass, TDerivedClass >::setWordWrap | ( | bool | value | ) |
Sets the value of WordWrapProperty.
bool kanzi::TextBlockConceptImpl< TBaseClass, TDerivedClass >::isConstrainContentHeight | ( | ) | const |
Gets the value of ConstrainContentHeightProperty.
void kanzi::TextBlockConceptImpl< TBaseClass, TDerivedClass >::setConstrainContentHeight | ( | bool | value | ) |
Sets the value of ConstrainContentHeightProperty.
Vector2 kanzi::TextBlockConceptImpl< TBaseClass, TDerivedClass >::getHorizontalPadding | ( | ) | const |
Gets the value of HorizontalPaddingProperty.
void kanzi::TextBlockConceptImpl< TBaseClass, TDerivedClass >::setHorizontalPadding | ( | Vector2 | value | ) |
Sets the value of HorizontalPaddingProperty.
Vector2 kanzi::TextBlockConceptImpl< TBaseClass, TDerivedClass >::getVerticalPadding | ( | ) | const |
Gets the value of VerticalPaddingProperty.
void kanzi::TextBlockConceptImpl< TBaseClass, TDerivedClass >::setVerticalPadding | ( | Vector2 | value | ) |
Sets the value of VerticalPaddingProperty.
KzcRectangle kanzi::TextBlockConceptImpl< TBaseClass, TDerivedClass >::getTextBounds | ( | ) | const |
Get bounding rectangle for the text.
|
protected |
Position the text.
textFormatWidth | The width of the area available for the glyphs in font units. Set to infinity for an unbound area. |
textFormatHeight | The height of the area available for the glyphs in font units. Set to infinity for an unbound area. |
constrainToActualSize | Flag indicating whether text format should be constrained to actual size provided by layout. Set to false to use unconstrained layout. |
|
protectedvirtual |
Node::onPropertyChanged implementation.
Reimplemented in kanzi::TextBlock3D, and kanzi::TextBlock2D.
|
protected |
Font material resource reference.
|
protected |
Font resource reference.
|
protected |
The text layout for the glyphs that this node displays.
|
protected |
Default value for font material property.
|
protected |
Default value for font property.