TextConceptImplementation is an abstract class for implementing text concept. More...
#include <kanzi/node/concept/text_block.hpp>
Static Public Member Functions | |
static PropertyTypeEditorInfoSharedPtr | makeEditorInfo () |
![]() | |
static PropertyTypeEditorInfoSharedPtr | makeEditorInfo () |
Protected Member Functions | |
TextBlockConceptImpl (Domain *domain, string_view name) | |
Constructor. More... | |
void | prepareTextFormat (float textFormatWidth, float textFormatHeight) |
Position the text. More... | |
Protected Attributes | |
ResourceReference< Material > | m_fontMaterial |
Font material resource reference. More... | |
ResourceReference< KzuFont > | m_font |
Font resource reference. More... | |
TextFormatSharedPtr | m_textFormat |
The text layout for the glyphs that this node displays. 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 font currently in use.
void kanzi::TextBlockConceptImpl< TBaseClass, TDerivedClass >::setUserFont | ( | const FontSharedPtr & | font | ) |
Sets a font to use.
The font you set with this method overrides the font set in the FontProperty.
font | The name of the font to use. |
MaterialSharedPtr kanzi::TextBlockConceptImpl< TBaseClass, TDerivedClass >::getFontMaterial | ( | ) | const |
Gets the currently used font material.
void kanzi::TextBlockConceptImpl< TBaseClass, TDerivedClass >::setUserFontMaterial | ( | const MaterialSharedPtr & | material | ) |
Sets a font material to use.
The material you set with this method overrides the material set in the FontMaterialProperty.
material | The name of the font material to use. |
ResourceID kanzi::TextBlockConceptImpl< TBaseClass, TDerivedClass >::getFontResourceID | ( | ) | const |
Gets the value of the FontProperty.
void kanzi::TextBlockConceptImpl< TBaseClass, TDerivedClass >::setFontResourceID | ( | ResourceID | 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. |
ResourceID kanzi::TextBlockConceptImpl< TBaseClass, TDerivedClass >::getFontMaterialResourceID | ( | ) | const |
Gets the value of the FontMaterialProperty.
void kanzi::TextBlockConceptImpl< TBaseClass, TDerivedClass >::setFontMaterialResourceID | ( | ResourceID | 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 KzcColorRGBA 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. |
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.
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. |
|
protected |
Font material resource reference.
|
protected |
Font resource reference.
|
protected |
The text layout for the glyphs that this node displays.