Implementation class for TextBlockConcept. 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 () |
Static Public Member Functions inherited from kanzi::FontStyleConcept | |
static PropertyTypeEditorInfoSharedPtr | makeEditorInfo () |
Static Public Member Functions inherited from kanzi::TextConceptImpl< TDerivedClass > | |
static PropertyTypeEditorInfoSharedPtr | makeEditorInfo () |
Static Public Member Functions inherited from kanzi::TextConcept | |
static PropertyTypeEditorInfoSharedPtr | makeEditorInfo () |
Protected Member Functions | |
TextConcept::TextFormatParameters | createTextFormatParameters (float width, float height) const |
Creates the parameters that are needed for initializing the TextFormat of a TextBlock node. More... | |
void | initialize () |
TextBlockConceptImpl -specific initialization. More... | |
void | onNodePropertyChanged (AbstractPropertyType propertyType, PropertyNotificationReason reason) override |
Node::onPropertyChanged implementation. More... | |
virtual void | onPostPrepareTextFormat (bool completeRelayoutingExecuted) |
Kanzi calls this function every time it completes the prepareTextFormat function. More... | |
TextBlockConceptImpl (Domain *domain, string_view name) | |
Constructor. More... | |
Protected Member Functions inherited from kanzi::FontStyleConceptImpl< TDerivedClass > | |
FontStyleConceptImpl ()=default | |
Constructor. More... | |
Protected Member Functions inherited from kanzi::TextConceptImpl< TDerivedClass > | |
void | prepareTextFormat (const TextFormatParameters ¶meters, string text) |
Updates the parameters and text of the internal text format. More... | |
TextConceptImpl ()=default | |
Constructor. More... | |
Additional Inherited Members | |
Static Public Attributes inherited from kanzi::TextBlockConcept | |
static PropertyType< bool > | WordWrapProperty |
Breaks long text lines to multiple lines to make the text fit within the boundaries of a Text Block node. More... | |
Static Public Attributes inherited from kanzi::FontStyleConcept | |
static PropertyType< float > | SizeProperty |
Sets the size for the font in pixels. More... | |
static PropertyType< FontStyle > | StyleProperty |
Sets the style for the font. More... | |
static PropertyType< FontWeight > | WeightProperty |
Sets the weight for the font. More... | |
static PropertyType< float > | CharacterSpacingProperty |
Sets the character spacing in pixels. More... | |
static PropertyType< float > | FixedCharacterWidthProperty |
Overrides the font advance widths and makes each character take a fixed amount of space specified in pixels. More... | |
static PropertyType< float > | LineSpacingProperty |
Sets the line spacing in multiples of the normal line height of the selected font. More... | |
static PropertyType< bool > | FractionalCharacterWidthProperty |
Sets whether Kanzi uses fractional or rounded character widths to lay out text. More... | |
static PropertyType< bool > | SnapCharacterToPixelProperty |
Sets whether Kanzi positions characters in 2D rendering to the nearest pixel: More... | |
static PropertyType< FontHintingPreference > | HintingPreferenceProperty |
Sets the hinting preference of the selected font. More... | |
Static Public Attributes inherited from kanzi::TextConcept | |
static PropertyType< ColorRGBA > | FontColorProperty |
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< ResourceSharedPtr > | FontMaterialProperty |
Sets the material whose shader is used to render the text in a text node. More... | |
static PropertyType< Vector2 > | HorizontalPaddingProperty |
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::TextHorizontalAlignment > | TextHorizontalAlignmentProperty |
Sets the horizontal alignment of the text in a text node. More... | |
static PropertyType< TextFormat::TextVerticalAlignment > | TextVerticalAlignmentProperty |
Sets the vertical alignment of the text in a text node. More... | |
static PropertyType< Vector2 > | VerticalPaddingProperty |
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< Vector2 > | HorizontalFitScaleLimitsProperty |
Sets the scale range that the HorizontalFitProperty can use when it scales the text horizontally. More... | |
Protected Attributes inherited from kanzi::TextConceptImpl< TDerivedClass > | |
TextFormatPtr | m_textFormat |
The text format for the text that this node displays. More... | |
Implementation class for TextBlockConcept.
Use the Text Block nodes to show a small amount of text in your application.
TextBlockConceptImpl derives from TextBlockConcept class, which defines the property types used by the implementation. Do not use these classes directly. To show a block of text in your application use TextBlock2D or TextBlock3D.
|
explicitprotected |
Constructor.
domain | The UI domain the new node belongs to. |
name | The name of the node. |
|
static |
bool kanzi::TextBlockConceptImpl< TBaseClass, TDerivedClass >::getWordWrap | ( | ) | const |
Gets the value of WordWrapProperty.
void kanzi::TextBlockConceptImpl< TBaseClass, TDerivedClass >::setWordWrap | ( | bool | value | ) |
Sets the value of WordWrapProperty.
value | Whether to wrap into a new line the text that is longer than the width of the Text Block node. |
RectangleFloat kanzi::TextBlockConceptImpl< TBaseClass, TDerivedClass >::getTextBounds | ( | ) | const |
Get bounding rectangle for the text.
void kanzi::TextBlockConceptImpl< TBaseClass, TDerivedClass >::notifyPostPrepareTextFormat | ( | bool | completeRelayoutingExecuted | ) |
Kanzi calls this function every time it successfully completes the TextConceptImpl::prepareTextFormat() function.
completeRelayoutingExecuted | Indicates whether a complete relayouting of the glyphs was required while preparing the text format. |
|
protected |
TextBlockConceptImpl -specific initialization.
|
overrideprotected |
Node::onPropertyChanged implementation.
|
protectedvirtual |
Kanzi calls this function every time it completes the prepareTextFormat function.
completeRelayoutingExecuted | Indicates whether a complete relayouting of the glyphs was required during the text format preparation. |
|
protected |
Creates the parameters that are needed for initializing the TextFormat of a TextBlock node.
width | The available width. |
height | The available height. |