+ TextAbstraction::FontDescription mFontDescription; ///< The default font's description.
+ std::string mFontStyle; ///< The font's style string set through the property system.
+ float mDefaultPointSize; ///< The default font's point size.
+ FontId mFontId; ///< The font's id of the default font.
+ bool familyDefined:1; ///< Whether the default font's family name is defined.
+ bool weightDefined:1; ///< Whether the default font's weight is defined.
+ bool widthDefined:1; ///< Whether the default font's width is defined.
+ bool slantDefined:1; ///< Whether the default font's slant is defined.
+ bool sizeDefined:1; ///< Whether the default font's point size is defined.
+};
+
+/**
+ * @brief Stores indices used to update the text.
+ * Stores the character index where the text is updated and the number of characters removed and added.
+ * Stores as well indices to the first and the last paragraphs to be updated.
+ */
+struct TextUpdateInfo
+{
+ TextUpdateInfo()
+ : mCharacterIndex( 0u ),
+ mNumberOfCharactersToRemove( 0u ),
+ mNumberOfCharactersToAdd( 0u ),
+ mPreviousNumberOfCharacters( 0u ),
+ mParagraphCharacterIndex( 0u ),
+ mRequestedNumberOfCharacters( 0u ),
+ mStartGlyphIndex( 0u ),
+ mStartLineIndex( 0u ),
+ mEstimatedNumberOfLines( 0u ),
+ mClearAll( true ),
+ mFullRelayoutNeeded( true ),
+ mIsLastCharacterNewParagraph( false )
+ {}
+
+ ~TextUpdateInfo()
+ {}
+
+ CharacterIndex mCharacterIndex; ///< Index to the first character to be updated.
+ Length mNumberOfCharactersToRemove; ///< The number of characters to be removed.
+ Length mNumberOfCharactersToAdd; ///< The number of characters to be added.
+ Length mPreviousNumberOfCharacters; ///< The number of characters before the text update.
+
+ CharacterIndex mParagraphCharacterIndex; ///< Index of the first character of the first paragraph to be updated.
+ Length mRequestedNumberOfCharacters; ///< The requested number of characters.
+ GlyphIndex mStartGlyphIndex;
+ LineIndex mStartLineIndex;
+ Length mEstimatedNumberOfLines; ///< The estimated number of lines. Used to avoid reallocations when layouting.
+
+ bool mClearAll:1; ///< Whether the whole text is cleared. i.e. when the text is reset.
+ bool mFullRelayoutNeeded:1; ///< Whether a full re-layout is needed. i.e. when a new size is set to the text control.
+ bool mIsLastCharacterNewParagraph:1; ///< Whether the last character is a new paragraph character.
+
+ void Clear()
+ {
+ // Clear all info except the mPreviousNumberOfCharacters member.
+ mCharacterIndex = static_cast<CharacterIndex>( -1 );
+ mNumberOfCharactersToRemove = 0u;
+ mNumberOfCharactersToAdd = 0u;
+ mParagraphCharacterIndex = 0u;
+ mRequestedNumberOfCharacters = 0u;
+ mStartGlyphIndex = 0u;
+ mStartLineIndex = 0u;
+ mEstimatedNumberOfLines = 0u;
+ mClearAll = false;
+ mFullRelayoutNeeded = false;
+ mIsLastCharacterNewParagraph = false;
+ }
+};
+
+struct UnderlineDefaults
+{
+ std::string properties;
+ // TODO: complete with underline parameters.
+};
+
+struct ShadowDefaults
+{
+ std::string properties;
+ // TODO: complete with shadow parameters.
+};
+
+struct EmbossDefaults
+{
+ std::string properties;
+ // TODO: complete with emboss parameters.
+};
+
+struct OutlineDefaults
+{
+ std::string properties;
+ // TODO: complete with outline parameters.