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. | |
void | initialize () |
TextBlockConceptImpl -specific initialization. | |
void | onNodePropertyChanged (AbstractPropertyType propertyType, PropertyNotificationReason reason) override |
Node::onPropertyChanged implementation. | |
virtual void | onPostPrepareTextFormat (bool completeRelayoutingExecuted) |
Kanzi calls this function every time it completes the prepareTextFormat function. | |
TextBlockConceptImpl (Domain *domain, string_view name) | |
Constructor. | |
Protected Member Functions inherited from kanzi::FontStyleConceptImpl< TDerivedClass > | |
FontStyleConceptImpl ()=default | |
Constructor. | |
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. | |
TextConceptImpl ()=default | |
Constructor. | |
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. | |
Static Public Attributes inherited from kanzi::FontStyleConcept | |
static PropertyType< float > | SizeProperty |
Sets the size for the font in pixels. | |
static PropertyType< FontStyle > | StyleProperty |
Sets the style for the font. | |
static PropertyType< FontWeight > | WeightProperty |
Sets the weight for the font. | |
static PropertyType< float > | CharacterSpacingProperty |
Sets the character spacing in pixels. | |
static PropertyType< float > | FixedCharacterWidthProperty |
Overrides the font advance widths and makes each character take a fixed amount of space specified in pixels. | |
static PropertyType< float > | LineSpacingProperty |
Sets the line spacing in multiples of the normal line height of the selected font. | |
static PropertyType< bool > | FractionalCharacterWidthProperty |
Sets whether Kanzi uses fractional or rounded character widths to lay out text. | |
static PropertyType< bool > | SnapCharacterToPixelProperty |
Sets whether Kanzi positions characters in 2D rendering to the nearest pixel: | |
static PropertyType< FontHintingPreference > | HintingPreferenceProperty |
Sets the hinting preference of the selected font. | |
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. | |
static PropertyType< ResourceSharedPtr > | FontMaterialProperty |
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::TextHorizontalAlignment > | TextHorizontalAlignmentProperty |
Sets the horizontal alignment of the text in a text node. | |
static PropertyType< TextFormat::TextVerticalAlignment > | TextVerticalAlignmentProperty |
Sets the vertical alignment of the text in a text node. | |
static PropertyType< Vector2 > | HorizontalPaddingProperty |
Sets the padding spaces between the content and the left and right boundaries of a text node. | |
static PropertyType< Vector2 > | VerticalPaddingProperty |
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::Truncation > | TruncationProperty |
Sets how to truncate the text when the text string to be rendered is too long to fit in a node. | |
static PropertyType< TextFormat::TruncationDirection > | TruncationDirectionProperty |
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< 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. | |
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. | |
static PropertyType< Vector2 > | HorizontalFitScaleLimitsProperty |
Sets the scale range that the HorizontalFitProperty can use when it scales the text horizontally. | |
Protected Attributes inherited from kanzi::TextConceptImpl< TDerivedClass > | |
TextFormatPtr | m_textFormat |
The text format for the text that this node displays. | |
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. |