Dali 3D User Interface Engine
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
Dali::Toolkit::Text Namespace Reference

Namespaces

namespace  anonymous_namespace{bidirectional-support.cpp}
 
namespace  anonymous_namespace{character-set-conversion.cpp}
 
namespace  anonymous_namespace{layout-engine.cpp}
 
namespace  anonymous_namespace{markup-processor-color.cpp}
 
namespace  anonymous_namespace{markup-processor-font.cpp}
 
namespace  anonymous_namespace{markup-processor-helper-functions.cpp}
 
namespace  anonymous_namespace{markup-processor.cpp}
 
namespace  anonymous_namespace{text-font-style.cpp}
 
namespace  DALI_INTERNAL
 
namespace  FontStyle
 
namespace  Internal
 

Classes

struct  BidirectionalLineInfoRun
 BidirectionalLineInfoRun. More...
 
struct  BidirectionalParagraphInfoRun
 BidirectionalParagraphInfoRun. More...
 
struct  CharacterRun
 A run of consecutive characters. More...
 
class  Clipper
 A helper class for clipping actors using a FrameBufferImage. More...
 
struct  ColorRun
 Run of characters with the same color. More...
 
struct  ColorGlyphRun
 
class  Decorator
 A Text Decorator is used to display cursors, handles, selection highlights and pop-ups. More...
 
struct  FontDescriptionRun
 Run of characters with the same font. More...
 
struct  FontRun
 Run of characters with the same font. More...
 
struct  GlyphRun
 A run of consecutive glyphs. More...
 
struct  InputStyle
 The input text's style. More...
 
struct  LineLayout
 Stores temporary layout info of the line. More...
 
class  LayoutEngine
 LayoutEngine is responsible for calculating the visual position of glyphs in layout. More...
 
struct  LayoutParameters
 Struct used to pass parameters. More...
 
struct  LineRun
 LineRun. More...
 
class  LogicalModel
 A logical text model contains layout independent information. More...
 
struct  Attribute
 Stores an attribute pair: name, value. More...
 
struct  Tag
 Stores a tag and its attributes. More...
 
struct  MarkupProcessData
 Keeps the plain text and references to vectors from the model which stores runs with text styles. More...
 
class  Metrics
 A wrapper around FontClient used to get metrics & potentially down-scaled Emoji metrics. More...
 
class  MultilanguageSupport
 Sets the character's scripts to the model and validates the fonts set by the user or assigns default ones. More...
 
class  AtlasRenderer
 Implementation of a text renderer based on dynamic atlases. More...
 
class  Backend
 Provides access to different text rendering backends. More...
 
class  Renderer
 Abstract base class for Text renderers. More...
 
struct  ScriptRun
 Run of characters with the same script. More...
 
class  ControlInterface
 An interface that the Text::Controller uses to request a text relayout. More...
 
struct  Event
 
struct  CursorInfo
 
struct  EventData
 
struct  ModifyEvent
 
struct  FontDefaults
 
class  Controller
 A Text Controller is used by UI Controls which display text. More...
 
class  ViewInterface
 Abstract interface to provide the information necessary displaying text. More...
 
class  View
 View provides an interface between the Text layout engine and rendering back-end. More...
 
class  VisualModel
 A visual text model contains layout specific information. More...
 

Typedefs

typedef IntrusivePtr< ClipperClipperPtr
 
typedef IntrusivePtr< DecoratorDecoratorPtr
 
typedef IntrusivePtr
< LogicalModel
LogicalModelPtr
 
typedef IntrusivePtr< MetricsMetricsPtr
 
typedef IntrusivePtr< RendererRendererPtr
 
typedef IntrusivePtr< ControllerControllerPtr
 
typedef
Dali::Toolkit::Text::ControlInterface 
ControlInterface
 
typedef TextAbstraction::FontId FontId
 The unique identifier for a font face (generated by FontClient). More...
 
typedef
TextAbstraction::FontWidth::Type 
FontWidth
 The font's width. More...
 
typedef
TextAbstraction::FontWeight::Type 
FontWeight
 The font's weight. More...
 
typedef
TextAbstraction::FontSlant::Type 
FontSlant
 The font's slant. More...
 
typedef
TextAbstraction::FontMetrics 
FontMetrics
 The metrics for a Font expressed in 26.6 fractional pixel format. More...
 
typedef
TextAbstraction::PointSize26Dot6 
PointSize26Dot6
 The point size in 26.6 fractional points. More...
 
typedef TextAbstraction::FaceIndex FaceIndex
 Used with fonts which allow several font faces. More...
 
typedef TextAbstraction::GlyphIndex GlyphIndex
 Uniquely identifies a glyph within a particular font. More...
 
typedef TextAbstraction::Character Character
 A UTF-32 representation of a character. More...
 
typedef TextAbstraction::GlyphInfo GlyphInfo
 The information describing a glyph (font ID, index, metrics). More...
 
typedef
TextAbstraction::CharacterIndex 
CharacterIndex
 An index into an array of characters. More...
 
typedef TextAbstraction::Length Length
 The length of an array. More...
 
typedef
TextAbstraction::BidiInfoIndex 
BidiInfoIndex
 Index to the bidirectional info for a paragraph. More...
 
typedef TextAbstraction::Script Script
 The character's script. More...
 
typedef
TextAbstraction::LineBreakInfo 
LineBreakInfo
 Line break info (must break, allow break, no break). Possible values are: LINE_MUST_BREAK, LINE_ALLOW_BREAK and LINE_NO_BREAK (in the TextAbstraction namespace). More...
 
typedef
TextAbstraction::WordBreakInfo 
WordBreakInfo
 Word break info (break, no break). Possible values are: WORD_BREAK and WORD_NO_BREAK (in the TextAbstraction namespace). More...
 
typedef
TextAbstraction::CharacterDirection 
CharacterDirection
 The character's direction: false is left to right, true is right to left. More...
 
typedef uint32_t ScriptRunIndex
 An index into an array of script runs. More...
 
typedef uint32_t FontRunIndex
 An index into an array of font runs. More...
 
typedef uint32_t UnderlineRunIndex
 An index into an array of underline runs. More...
 
typedef uint32_t BidirectionalRunIndex
 An index into an array of font runs. More...
 
typedef uint32_t LineIndex
 An index into an array of lines. More...
 
typedef IntrusivePtr< VisualModelVisualModelPtr
 

Enumerations

enum  Cursor { PRIMARY_CURSOR, SECONDARY_CURSOR, CURSOR_COUNT }
 
enum  ActiveCursor { ACTIVE_CURSOR_NONE, ACTIVE_CURSOR_PRIMARY, ACTIVE_CURSOR_BOTH }
 
enum  HandleState {
  HANDLE_TAPPED, HANDLE_PRESSED, HANDLE_RELEASED, HANDLE_SCROLLING,
  HANDLE_STOP_SCROLLING
}
 
enum  HandleImageType { HANDLE_IMAGE_PRESSED, HANDLE_IMAGE_RELEASED, HANDLE_IMAGE_TYPE_COUNT }
 
enum  HandleType {
  GRAB_HANDLE, LEFT_SELECTION_HANDLE, RIGHT_SELECTION_HANDLE, LEFT_SELECTION_HANDLE_MARKER,
  RIGHT_SELECTION_HANDLE_MARKER, HANDLE_TYPE_COUNT
}
 
enum  PlaceholderType { PLACEHOLDER_TYPE_ACTIVE, PLACEHOLDER_TYPE_INACTIVE }
 Different placeholder-text can be shown when the control is active/inactive. More...
 
enum  RenderingType { RENDERING_SHARED_ATLAS }
 

Functions

void SetBidirectionalInfo (const Vector< Character > &text, const Vector< ScriptRun > &scripts, const Vector< LineBreakInfo > &lineBreakInfo, Vector< BidirectionalParagraphInfoRun > &bidirectionalInfo)
 Sets the bidirectional info into the logical model. More...
 
void ReorderLines (const Vector< BidirectionalParagraphInfoRun > &bidirectionalInfo, Vector< LineRun > &lineRuns, Vector< BidirectionalLineInfoRun > &lineInfoRuns)
 Sets the visual to logical map tables. More...
 
bool GetMirroredText (const Vector< Character > &text, const Vector< CharacterDirection > &directions, const Vector< BidirectionalParagraphInfoRun > &bidirectionalInfo, Vector< Character > &mirroredText)
 Replaces any character in the right to left paragraphs which could be mirrored. More...
 
void GetCharactersDirection (const Vector< BidirectionalParagraphInfoRun > &bidirectionalInfo, Vector< CharacterDirection > &directions)
 Retrieves the character's directions. More...
 
uint8_t GetUtf8Length (uint8_t utf8LeadByte)
 Retrieves the number of bytes of a utf8 character. More...
 
uint32_t GetNumberOfUtf8Characters (const uint8_t *const utf8, uint32_t length)
 Retrieves the number of characters of the text array encoded in UTF8. More...
 
uint32_t GetNumberOfUtf8Bytes (const uint32_t *const utf32, uint32_t numberOfCharacters)
 Retrieves the number of bytes needed to encode in UTF8 the given text array encoded in UTF32. More...
 
uint32_t Utf8ToUtf32 (const uint8_t *const utf8, uint32_t length, uint32_t *utf32)
 Converts a text array encoded in UTF8 into a text array encoded in UTF32. More...
 
uint32_t Utf32ToUtf8 (const uint32_t *const utf32, uint32_t numberOfCharacters, uint8_t *utf8)
 Converts a text array encoded in UTF32 into a text array encoded in UTF8. More...
 
void Utf32ToUtf8 (const uint32_t *const utf32, uint32_t numberOfCharacters, std::string &utf8)
 Converts a text array encoded in UTF32 into a text array encoded in UTF8. More...
 
void SetColorSegmentationInfo (const Vector< ColorRun > &characterColorRuns, const Vector< GlyphIndex > &charactersToGlyph, const Vector< Length > &glyphsPerCharacter, Vector< ColorGlyphRun > &glyphColorRuns)
 Creates color glyph runs. More...
 
void FreeFontFamilyNames (Vector< FontDescriptionRun > &fontDescriptionRuns)
 
void ProcessColorTag (const Tag &tag, ColorRun &colorRun)
 Retrieves the color value from the tag and sets it to the color run. More...
 
void ProcessFontTag (const Tag &tag, FontDescriptionRun &fontRun)
 Retrieves the font attributes from the tag and sets it to the font run. More...
 
bool TokenComparison (const std::string &string1, const char *const stringBuffer2, Length length)
 Compare if two tokens are equal. More...
 
void SkipWhiteSpace (const char *&markupStringBuffer, const char *const markupStringEndBuffer)
 Skips any unnecessary white space. More...
 
unsigned int StringToHex (const char *const uintStr)
 Converts a string into an hexadecimal unsigned int. More...
 
float StringToFloat (const char *const floatStr)
 Converts a string into a float value. More...
 
void UintColorToVector4 (unsigned int color, Vector4 &retColor)
 Converts an ARGB color packed in 4 byte unsigned int into a Vector4 color used in Dali. More...
 
void ColorStringToVector4 (const char *const colorStr, Length length, Vector4 &retColor)
 Converts a color packed inside a string into an ARGB Vector4 color. More...
 
void ProcessMarkupString (const std::string &markupString, MarkupProcessData &markupProcessData)
 Process the mark-up string. More...
 
static
Internal::MultilanguageSupport
GetImplementation (MultilanguageSupport &multilanguageSupport)
 
static const
Internal::MultilanguageSupport
GetImplementation (const MultilanguageSupport &multilanguageSupport)
 
static Internal::BackendGetImplementation (Backend &backend)
 
static const Internal::BackendGetImplementation (const Backend &backend)
 
void SetLineBreakInfo (const Vector< Character > &text, Vector< LineBreakInfo > &lineBreakInfo)
 Sets line break info. More...
 
void SetWordBreakInfo (const Vector< Character > &text, Vector< WordBreakInfo > &wordBreakInfo)
 Sets word break info. More...
 
CharacterIndex min (CharacterIndex index0, CharacterIndex index1)
 
void ShapeText (const Vector< Character > &text, const Vector< LineBreakInfo > &lineBreakInfo, const Vector< ScriptRun > &scripts, const Vector< FontRun > &fonts, Vector< GlyphInfo > &glyphs, Vector< CharacterIndex > &glyphToCharacterMap, Vector< Length > &charactersPerGlyph, Vector< GlyphIndex > &newParagraphGlyphs)
 Shapes the whole text. More...
 
void GetGlyphsMetrics (GlyphIndex glyphIndex, Length numberOfGlyphs, GlyphMetrics &glyphMetrics, VisualModelPtr &visualModel, MetricsPtr &metrics)
 Get some glyph's metrics of a group of glyphs formed as a result of shaping one character. More...
 
FontDescriptionRunUpdateSelectionFontStyleRun (EventData *eventData, LogicalModelPtr logicalModel)
 Adds a new font description run for the selected text. More...
 
void CreateFontStyleMap (const TreeNode *const node, Property::Map &map)
 Creates a map with pairs 'key,value' with the font's style parameters. More...
 
void ParseFontStyleString (const std::string &style, Property::Map &map)
 Parses the font's style string. More...
 
void SetFontStyleProperty (ControllerPtr controller, const Property::Value &value, FontStyle::Type type)
 Sets the font's style property. More...
 
void GetFontStyleProperty (ControllerPtr controller, Property::Value &value, FontStyle::Type type)
 Retrieves the font's style property. More...
 
FontWeight StringToWeight (const char *const weightStr)
 Converts a weight string into FontWeight. More...
 
FontWidth StringToWidth (const char *const widthStr)
 Converts a width string into FontWidth. More...
 
FontSlant StringToSlant (const char *const slantStr)
 Converts a slant string into FontSlant. More...
 
std::ostream & operator<< (std::ostream &o, const Vector< Character > &text)
 Print a vector of characters. More...
 
std::ostream & operator<< (std::ostream &o, const Vector< ScriptRun > &scriptRuns)
 Print a vector of script runs. More...
 
std::ostream & operator<< (std::ostream &o, const Vector< FontRun > &fontRuns)
 Print a vector of font runs. More...
 
std::ostream & operator<< (std::ostream &o, const Vector< LineRun > &lineRuns)
 Print a vector of line runs. More...
 
template<typename T >
void UpdateCharacterRuns (CharacterIndex index, int numberOfCharacters, Length totalNumberOfCharacters, Vector< T > &runs, Vector< T > &removedRuns)
 Updates the number of characters and the character index of the text's style runs. More...
 

Variables

const Scripting::StringEnum FONT_WEIGHT_STRING_TABLE []
 
const unsigned int FONT_WEIGHT_STRING_TABLE_COUNT = sizeof( FONT_WEIGHT_STRING_TABLE ) / sizeof( FONT_WEIGHT_STRING_TABLE[0] )
 
const Scripting::StringEnum FONT_WIDTH_STRING_TABLE []
 
const unsigned int FONT_WIDTH_STRING_TABLE_COUNT = sizeof( FONT_WIDTH_STRING_TABLE ) / sizeof( FONT_WIDTH_STRING_TABLE[0] )
 
const Scripting::StringEnum FONT_SLANT_STRING_TABLE []
 
const unsigned int FONT_SLANT_STRING_TABLE_COUNT = sizeof( FONT_SLANT_STRING_TABLE ) / sizeof( FONT_SLANT_STRING_TABLE[0] )
 
const unsigned int DEFAULT_RENDERING_BACKEND = RENDERING_SHARED_ATLAS
 

Typedef Documentation

typedef TextAbstraction::BidiInfoIndex Dali::Toolkit::Text::BidiInfoIndex

Index to the bidirectional info for a paragraph.

Definition at line 49 of file text-definitions.h.

An index into an array of font runs.

Definition at line 59 of file text-definitions.h.

typedef TextAbstraction::Character Dali::Toolkit::Text::Character

A UTF-32 representation of a character.

Definition at line 45 of file text-definitions.h.

typedef TextAbstraction::CharacterDirection Dali::Toolkit::Text::CharacterDirection

The character's direction: false is left to right, true is right to left.

Definition at line 53 of file text-definitions.h.

typedef TextAbstraction::CharacterIndex Dali::Toolkit::Text::CharacterIndex

An index into an array of characters.

Definition at line 47 of file text-definitions.h.

Definition at line 36 of file text-clipper.h.

Definition at line 44 of file text-controller.h.

Definition at line 41 of file text-controller.h.

Definition at line 41 of file text-decorator.h.

typedef TextAbstraction::FaceIndex Dali::Toolkit::Text::FaceIndex

Used with fonts which allow several font faces.

Definition at line 43 of file text-definitions.h.

typedef TextAbstraction::FontId Dali::Toolkit::Text::FontId

The unique identifier for a font face (generated by FontClient).

Definition at line 37 of file text-definitions.h.

typedef TextAbstraction::FontMetrics Dali::Toolkit::Text::FontMetrics

The metrics for a Font expressed in 26.6 fractional pixel format.

Definition at line 41 of file text-definitions.h.

An index into an array of font runs.

Definition at line 57 of file text-definitions.h.

typedef TextAbstraction::FontSlant::Type Dali::Toolkit::Text::FontSlant

The font's slant.

Definition at line 40 of file text-definitions.h.

typedef TextAbstraction::FontWeight::Type Dali::Toolkit::Text::FontWeight

The font's weight.

Definition at line 39 of file text-definitions.h.

typedef TextAbstraction::FontWidth::Type Dali::Toolkit::Text::FontWidth

The font's width.

Definition at line 38 of file text-definitions.h.

Uniquely identifies a glyph within a particular font.

An index into an array of glyphs.

Definition at line 44 of file text-definitions.h.

typedef TextAbstraction::GlyphInfo Dali::Toolkit::Text::GlyphInfo

The information describing a glyph (font ID, index, metrics).

Definition at line 46 of file text-definitions.h.

typedef TextAbstraction::Length Dali::Toolkit::Text::Length

The length of an array.

Definition at line 48 of file text-definitions.h.

typedef TextAbstraction::LineBreakInfo Dali::Toolkit::Text::LineBreakInfo

Line break info (must break, allow break, no break). Possible values are: LINE_MUST_BREAK, LINE_ALLOW_BREAK and LINE_NO_BREAK (in the TextAbstraction namespace).

Definition at line 51 of file text-definitions.h.

An index into an array of lines.

Definition at line 60 of file text-definitions.h.

Definition at line 43 of file logical-model-impl.h.

Definition at line 34 of file metrics.h.

typedef TextAbstraction::PointSize26Dot6 Dali::Toolkit::Text::PointSize26Dot6

The point size in 26.6 fractional points.

Definition at line 42 of file text-definitions.h.

Definition at line 35 of file text-renderer.h.

typedef TextAbstraction::Script Dali::Toolkit::Text::Script

The character's script.

Definition at line 50 of file text-definitions.h.

An index into an array of script runs.

Definition at line 56 of file text-definitions.h.

An index into an array of underline runs.

Definition at line 58 of file text-definitions.h.

Definition at line 41 of file visual-model-impl.h.

typedef TextAbstraction::WordBreakInfo Dali::Toolkit::Text::WordBreakInfo

Word break info (break, no break). Possible values are: WORD_BREAK and WORD_NO_BREAK (in the TextAbstraction namespace).

Definition at line 52 of file text-definitions.h.

Enumeration Type Documentation

Enumerator
ACTIVE_CURSOR_NONE 

Neither primary nor secondary cursor are active.

ACTIVE_CURSOR_PRIMARY 

Primary cursor is active (only)

ACTIVE_CURSOR_BOTH 

Both primary and secondary cursor are active.

Definition at line 53 of file text-decorator.h.

Enumerator
PRIMARY_CURSOR 

The primary cursor for bidirectional text (or the regular cursor for single-direction text)

SECONDARY_CURSOR 

The secondary cursor for bidirectional text.

CURSOR_COUNT 

Definition at line 45 of file text-decorator.h.

Enumerator
HANDLE_IMAGE_PRESSED 
HANDLE_IMAGE_RELEASED 
HANDLE_IMAGE_TYPE_COUNT 

Definition at line 71 of file text-decorator.h.

Enumerator
HANDLE_TAPPED 
HANDLE_PRESSED 
HANDLE_RELEASED 
HANDLE_SCROLLING 
HANDLE_STOP_SCROLLING 

Definition at line 61 of file text-decorator.h.

Enumerator
GRAB_HANDLE 
LEFT_SELECTION_HANDLE 
RIGHT_SELECTION_HANDLE 
LEFT_SELECTION_HANDLE_MARKER 
RIGHT_SELECTION_HANDLE_MARKER 
HANDLE_TYPE_COUNT 

Definition at line 79 of file text-decorator.h.

Different placeholder-text can be shown when the control is active/inactive.

Enumerator
PLACEHOLDER_TYPE_ACTIVE 
PLACEHOLDER_TYPE_INACTIVE 

Definition at line 49 of file text-controller.h.

Enumerator
RENDERING_SHARED_ATLAS 

A bitmap-based solution where renderers can share a texture atlas .0.

Definition at line 31 of file rendering-backend.h.

Function Documentation

void Dali::Toolkit::Text::ColorStringToVector4 ( const char *const  colorStr,
Length  length,
Vector4 &  retColor 
)

Converts a color packed inside a string into an ARGB Vector4 color.

The string color could be in hexadecimal ( 0xFF0000FF ), webcolor ( #0000FF or #00F ) or some constant values: black, white, red, green, blue, yellow, magenta, cyan, transparent.

Parameters
[in]colorStrA color packed inside a string.
[in]lengthThe length of the color string.
[out]retColorA color packed inside a Vector4.

Definition at line 102 of file markup-processor-helper-functions.cpp.

References Dali::Toolkit::Text::anonymous_namespace{markup-processor-helper-functions.cpp}::ALPHA_ONE(), Dali::Color::BLACK, Dali::Toolkit::Text::anonymous_namespace{markup-processor-helper-functions.cpp}::BLACK_COLOR(), Dali::Color::BLUE, Dali::Toolkit::Text::anonymous_namespace{markup-processor-helper-functions.cpp}::BLUE_COLOR(), Dali::Color::CYAN, Dali::Toolkit::Text::anonymous_namespace{markup-processor-helper-functions.cpp}::CYAN_COLOR(), Dali::Color::GREEN, Dali::Toolkit::Text::anonymous_namespace{markup-processor-helper-functions.cpp}::GREEN_COLOR(), Dali::Toolkit::Text::anonymous_namespace{markup-processor-helper-functions.cpp}::HEX_COLOR_TOKEN(), Dali::Color::MAGENTA, Dali::Toolkit::Text::anonymous_namespace{markup-processor-helper-functions.cpp}::MAGENTA_COLOR(), Dali::Color::RED, Dali::Toolkit::Text::anonymous_namespace{markup-processor-helper-functions.cpp}::RED_COLOR(), StringToHex(), TokenComparison(), Dali::Color::TRANSPARENT, Dali::Toolkit::Text::anonymous_namespace{markup-processor-helper-functions.cpp}::TRANSPARENT_COLOR(), UintColorToVector4(), Dali::Toolkit::Text::anonymous_namespace{markup-processor-helper-functions.cpp}::WEB_COLOR_TOKEN(), Dali::Color::WHITE, Dali::Toolkit::Text::anonymous_namespace{markup-processor-helper-functions.cpp}::WHITE_COLOR(), Dali::Color::YELLOW, and Dali::Toolkit::Text::anonymous_namespace{markup-processor-helper-functions.cpp}::YELLOW_COLOR().

Referenced by ProcessColorTag().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Toolkit::Text::CreateFontStyleMap ( const TreeNode *const  node,
Property::Map &  map 
)

Creates a map with pairs 'key,value' with the font's style parameters.

Parameters
[in]nodeData structure with the font's style parameters.
[out]mapA map with the font's style parameters.

Definition at line 58 of file text-font-style.cpp.

References Dali::Toolkit::TreeNode::ARRAY, Dali::Toolkit::TreeNode::BOOLEAN, Dali::Toolkit::TreeNode::CBegin(), Dali::Toolkit::TreeNode::CEnd(), Dali::Toolkit::TreeNode::FLOAT, Dali::Toolkit::TreeNode::GetName(), Dali::Toolkit::TreeNode::GetString(), Dali::Toolkit::TreeNode::GetType(), Dali::Toolkit::TreeNode::INTEGER, Dali::Toolkit::TreeNode::IS_NULL, Dali::Toolkit::TreeNode::OBJECT, Dali::Toolkit::TreeNode::STRING, and Dali::Property::Value().

Referenced by ParseFontStyleString().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Toolkit::Text::FreeFontFamilyNames ( Vector< FontDescriptionRun > &  fontDescriptionRuns)
void Dali::Toolkit::Text::GetCharactersDirection ( const Vector< BidirectionalParagraphInfoRun > &  bidirectionalInfo,
Vector< CharacterDirection > &  directions 
)

Retrieves the character's directions.

Precondition
The logicalModel needs to have a text set.
The logicalModel needs to have the bidirectional info indices for each paragraph set.
Parameters
[in]bidirectionalInfoVector with the bidirectional infor for each paragraph.
[out]directionsThe direction, false is left to right and true is right to left, of each character of the paragraph.

Definition at line 266 of file bidirectional-support.cpp.

References Dali::Vector< T, IsTrivialType >::Begin(), Dali::Toolkit::Text::BidirectionalParagraphInfoRun::bidirectionalInfoIndex, Dali::Toolkit::Text::CharacterRun::characterIndex, Dali::Toolkit::Text::BidirectionalParagraphInfoRun::characterRun, Dali::VectorBase::Count(), Dali::Vector< T, IsTrivialType >::End(), Dali::PropertyTypes::Get(), and Dali::Toolkit::Text::CharacterRun::numberOfCharacters.

Referenced by Dali::Toolkit::Text::Controller::Impl::UpdateModel().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Toolkit::Text::GetFontStyleProperty ( ControllerPtr  controller,
Property::Value &  value,
FontStyle::Type  type 
)

Retrieves the font's style property.

Parameters
[in]controllerThe text's controller.
[out]valueThe value of the font's style.

Definition at line 226 of file text-font-style.cpp.

References Dali::Toolkit::Text::FontStyle::DEFAULT, Dali::Toolkit::Text::Controller::GetDefaultFontStyle(), Dali::Toolkit::Text::Controller::GetInputFontStyle(), and Dali::Toolkit::Text::FontStyle::INPUT.

Referenced by Dali::Toolkit::Internal::TextLabel::GetProperty(), Dali::Toolkit::Internal::TextEditor::GetProperty(), and Dali::Toolkit::Internal::TextField::GetProperty().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Toolkit::Text::GetGlyphsMetrics ( GlyphIndex  glyphIndex,
Length  numberOfGlyphs,
GlyphMetrics &  glyphMetrics,
VisualModelPtr &  visualModel,
MetricsPtr &  metrics 
)

Get some glyph's metrics of a group of glyphs formed as a result of shaping one character.

Parameters
[in]glyphIndexThe index to the first glyph.
[in]numberOfGlyphsThe number of glyphs.
[out]glyphMetricsSome glyph metrics (font height, advance, ascender and x bearing).
[in]visualModelThe visual model.
[in]metricsUsed to access metrics from FontClient.

Definition at line 82 of file text-controller-impl.cpp.

References Dali::Vector< T, IsTrivialType >::Begin(), Dali::Toolkit::Text::Metrics::GetFontMetrics(), and Dali::Toolkit::Text::VisualModel::mGlyphs.

Referenced by Dali::Toolkit::Text::Controller::Impl::GetClosestCursorIndex(), and Dali::Toolkit::Text::Controller::Impl::GetCursorPosition().

Here is the call graph for this function:

Here is the caller graph for this function:

static Internal::Backend& Dali::Toolkit::Text::GetImplementation ( Backend &  backend)
inlinestatic

Definition at line 83 of file text-backend-impl.h.

References DALI_ASSERT_ALWAYS, and Dali::BaseHandle::GetBaseObject().

Here is the call graph for this function:

static const Internal::Backend& Dali::Toolkit::Text::GetImplementation ( const Backend &  backend)
inlinestatic

Definition at line 90 of file text-backend-impl.h.

References DALI_ASSERT_ALWAYS, and Dali::BaseHandle::GetBaseObject().

Here is the call graph for this function:

static Internal::MultilanguageSupport& Dali::Toolkit::Text::GetImplementation ( MultilanguageSupport &  multilanguageSupport)
inlinestatic

Definition at line 115 of file multi-language-support-impl.h.

References DALI_ASSERT_ALWAYS, and Dali::BaseHandle::GetBaseObject().

Referenced by Dali::Toolkit::Text::Backend::NewRenderer(), Dali::Toolkit::Text::MultilanguageSupport::SetScripts(), and Dali::Toolkit::Text::MultilanguageSupport::ValidateFonts().

Here is the call graph for this function:

Here is the caller graph for this function:

static const Internal::MultilanguageSupport& Dali::Toolkit::Text::GetImplementation ( const MultilanguageSupport &  multilanguageSupport)
inlinestatic

Definition at line 122 of file multi-language-support-impl.h.

References DALI_ASSERT_ALWAYS, and Dali::BaseHandle::GetBaseObject().

Here is the call graph for this function:

bool Dali::Toolkit::Text::GetMirroredText ( const Vector< Character > &  text,
const Vector< CharacterDirection > &  directions,
const Vector< BidirectionalParagraphInfoRun > &  bidirectionalInfo,
Vector< Character > &  mirroredText 
)

Replaces any character in the right to left paragraphs which could be mirrored.

Parameters
[in]textThe text.
[in]directionsVector with the direction of each paragraph.
[in]bidirectionalInfoVector with the bidirectional infor for each paragraph.
[out]mirroredTextThe mirroredText.
Returns
true if a character has been replaced.

Definition at line 233 of file bidirectional-support.cpp.

References Dali::Vector< T, IsTrivialType >::Begin(), Dali::Toolkit::Text::CharacterRun::characterIndex, Dali::Toolkit::Text::BidirectionalParagraphInfoRun::characterRun, Dali::Vector< T, IsTrivialType >::End(), Dali::PropertyTypes::Get(), and Dali::Toolkit::Text::CharacterRun::numberOfCharacters.

Referenced by Dali::Toolkit::Text::Controller::Impl::UpdateModel().

Here is the call graph for this function:

Here is the caller graph for this function:

uint32_t Dali::Toolkit::Text::GetNumberOfUtf8Bytes ( const uint32_t *const  utf32,
uint32_t  numberOfCharacters 
)

Retrieves the number of bytes needed to encode in UTF8 the given text array encoded in UTF32.

Parameters
[in]utf32The pointer to the UTF32 array.
[in]numberOfCharactersThe number of characters of the UTF32 array.
Returns
The number of bytes.

Definition at line 94 of file character-set-conversion.cpp.

References Dali::Toolkit::Text::anonymous_namespace{character-set-conversion.cpp}::U2, Dali::Toolkit::Text::anonymous_namespace{character-set-conversion.cpp}::U3, and Dali::Toolkit::Text::anonymous_namespace{character-set-conversion.cpp}::U4.

Referenced by anonymous_namespace{utc-Dali-Text-CharacterSetConversion.cpp}::GetNumberOfUtf8BytesTest(), and Utf32ToUtf8().

Here is the caller graph for this function:

uint32_t Dali::Toolkit::Text::GetNumberOfUtf8Characters ( const uint8_t *const  utf8,
uint32_t  length 
)

Retrieves the number of characters of the text array encoded in UTF8.

Parameters
[in]utf8The pointer to the UTF8 array.
[in]lengthThe length of the UTF8 array.
Returns
The number of characters.

Definition at line 82 of file character-set-conversion.cpp.

References Dali::Toolkit::Text::anonymous_namespace{character-set-conversion.cpp}::UTF8_LENGTH.

Referenced by anonymous_namespace{utc-Dali-Text-CharacterSetConversion.cpp}::GetNumberOfUtf8CharactersTest().

Here is the caller graph for this function:

uint8_t Dali::Toolkit::Text::GetUtf8Length ( uint8_t  utf8LeadByte)

Retrieves the number of bytes of a utf8 character.

Parameters
[in]utf8LeadByteThe lead byte of the utf8 character.
Returns
The number of bytes of the character.

Definition at line 77 of file character-set-conversion.cpp.

References Dali::Toolkit::Text::anonymous_namespace{character-set-conversion.cpp}::UTF8_LENGTH.

Referenced by ProcessMarkupString().

Here is the caller graph for this function:

CharacterIndex Dali::Toolkit::Text::min ( CharacterIndex  index0,
CharacterIndex  index1 
)

Definition at line 33 of file shaper.cpp.

Referenced by Dali::Toolkit::Internal::ItemView::AddActorsWithinRange(), Dali::Toolkit::Text::Decorator::Impl::AlternatePopUpPositionRelativeToCursor(), Dali::Toolkit::Text::LayoutEngine::Impl::CalculateHorizontalAlignment(), Dali::Toolkit::Internal::ItemView::CalculateScrollOvershoot(), Dali::TizenPlatform::anonymous_namespace{loader-ktx.cpp}::CheckFileIdentifier(), Dali::Clamp(), Dali::Internal::Actor::ClampDimension(), Dali::Toolkit::Internal::ItemView::ClampFirstItemPosition(), Dali::ClampInPlace(), Dali::Toolkit::Internal::ObjLoader::BoundingVolume::ConsiderNewPointInVolume(), Dali::Toolkit::CreateBouncingEffect(), Dali::Toolkit::Internal::CreateBubbleShader(), Dali::Toolkit::Internal::CreateColorAdjuster(), Dali::Toolkit::Internal::CreatePageTurnEffect(), Dali::Toolkit::Text::Decorator::Impl::DeterminePositionPopup(), Dali::Toolkit::Text::View::GetGlyphs(), Dali::Toolkit::Internal::SpiralLayout::GetItemsWithinArea(), Dali::Toolkit::Internal::ImageView::GetNaturalSize(), Dali::Internal::SceneGraph::RenderInstruction::GetRenderList(), Dali::Internal::HitTestAlgorithm::anonymous_namespace{hit-test-algorithm-impl.cpp}::HitTestWithinLayer(), Dali::Toolkit::Text::Clipper::Initialize(), Dali::Toolkit::Text::Controller::InsertText(), anonymous_namespace{scroll-view-impl.cpp}::InternalRelativePositionConstraint(), anonymous_namespace{scroll-view-impl.cpp}::InternalScrollDomainConstraint(), Dali::Toolkit::ItemRange::Intersection(), Dali::TizenPlatform::LoadWbmpHeader(), Dali::Toolkit::Internal::ScrollBar::OnPan(), Dali::Toolkit::Internal::Alignment::OnRelayout(), Dali::Internal::LinearConstraintFunctor::operator()(), anonymous_namespace{scroll-bar-impl.cpp}::IndicatorPositionConstraint::operator()(), Dali::Toolkit::Internal::anonymous_namespace{scroll-view-impl.cpp}::InternalPositionConstraint::operator()(), Dali::Toolkit::Internal::anonymous_namespace{scroll-view-impl.cpp}::OvershootXConstraint::operator()(), Dali::Toolkit::Internal::anonymous_namespace{scroll-view-impl.cpp}::OvershootYConstraint::operator()(), Dali::Random::Range(), Dali::Toolkit::Text::Clipper::Refresh(), Dali::anonymous_namespace{distance-field.cpp}::ScaleField(), ShapeText(), Dali::Toolkit::Internal::ScrollView::SnapInternalXTo(), Dali::Toolkit::Internal::ScrollView::SnapInternalYTo(), Dali::Toolkit::Internal::ScrollView::SnapWithVelocity(), anonymous_namespace{utc-Dali-ScrollView.cpp}::TestAlphaFunction(), UpdateCharacterRuns(), Dali::Internal::ImageActor::UpdateGeometry(), Dali::Internal::SceneGraph::PanGesture::UpdateProperties(), Dali::Toolkit::Internal::ScrollView::UpdatePropertyDomain(), Dali::Toolkit::Text::Controller::Impl::UpdateSelectionHandle(), UtcDaliLongPressGestureSetTouchesRequired02(), UtcDaliMathUtilsClampInPlaceP(), UtcDaliMathUtilsClampP(), UtcDaliPanGestureSetMinimumTouchesRequired(), UtcDaliVector2ClampVector2P(), UtcDaliVector3ClampVector3P(), UtcDaliVector4ClampVector4P(), and Dali::Toolkit::WrapActorConstraint().

std::ostream & Dali::Toolkit::Text::operator<< ( std::ostream &  o,
const Vector< Character > &  text 
)

Print a vector of characters.

Parameters
[in]oThe output stream operator.
[in]textThe text to print.
Returns
The output stream operator.

Definition at line 35 of file text-io.cpp.

std::ostream & Dali::Toolkit::Text::operator<< ( std::ostream &  o,
const Vector< ScriptRun > &  scriptRuns 
)

Print a vector of script runs.

Parameters
[in]oThe output stream operator.
[in]scriptRunsThe script runs to print.
Returns
The output stream operator.

Definition at line 51 of file text-io.cpp.

std::ostream & Dali::Toolkit::Text::operator<< ( std::ostream &  o,
const Vector< FontRun > &  fontRuns 
)

Print a vector of font runs.

Parameters
[in]oThe output stream operator.
[in]fontRunsThe font runs to print.
Returns
The output stream operator.

Definition at line 68 of file text-io.cpp.

References Dali::PropertyTypes::Get().

Here is the call graph for this function:

std::ostream & Dali::Toolkit::Text::operator<< ( std::ostream &  o,
const Vector< LineRun > &  lineRuns 
)

Print a vector of line runs.

Parameters
[in]oThe output stream operator.
[in]lineRunsThe line runs to print.
Returns
The output stream operator.

Definition at line 91 of file text-io.cpp.

void Dali::Toolkit::Text::ParseFontStyleString ( const std::string &  style,
Property::Map &  map 
)

Parses the font's style string.

Parameters
[in]styleThe font's style string.
[out]mapA map with the font's style parameters.

Definition at line 95 of file text-font-style.cpp.

References CreateFontStyleMap(), Dali::Toolkit::JsonParser::GetRoot(), Dali::Toolkit::JsonParser::New(), and Dali::Toolkit::JsonParser::Parse().

Referenced by SetFontStyleProperty().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Toolkit::Text::ProcessColorTag ( const Tag &  tag,
ColorRun &  colorRun 
)

Retrieves the color value from the tag and sets it to the color run.

Parameters
[in]tagThe color tag and its attributes.
[in,out]colorRunThe color run.

Definition at line 42 of file markup-processor-color.cpp.

References Dali::Toolkit::Text::Tag::attributes, Dali::Toolkit::Text::ColorRun::color, ColorStringToVector4(), Dali::Toolkit::Text::Attribute::nameBuffer, Dali::Toolkit::Text::Attribute::nameLength, TokenComparison(), Dali::Toolkit::Text::Attribute::valueBuffer, Dali::Toolkit::Text::Attribute::valueLength, and Dali::Toolkit::Text::anonymous_namespace{markup-processor-color.cpp}::XHTML_VALUE_ATTRIBUTE().

Referenced by ProcessMarkupString().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Toolkit::Text::ProcessFontTag ( const Tag &  tag,
FontDescriptionRun &  fontRun 
)

Retrieves the font attributes from the tag and sets it to the font run.

Parameters
[in]tagThe font tag and its attributes.
[in,out]fontRunThe font description run.

Definition at line 50 of file markup-processor-font.cpp.

References Dali::Toolkit::Text::Tag::attributes, Dali::Toolkit::Text::FontDescriptionRun::familyDefined, Dali::Toolkit::Text::FontDescriptionRun::familyLength, Dali::Toolkit::Text::FontDescriptionRun::familyName, Dali::Toolkit::Text::anonymous_namespace{markup-processor-font.cpp}::MAX_FONT_ATTRIBUTE_SIZE, Dali::Toolkit::Text::Attribute::nameBuffer, Dali::Toolkit::Text::Attribute::nameLength, Dali::Toolkit::Text::FontDescriptionRun::size, Dali::Toolkit::Text::FontDescriptionRun::sizeDefined, Dali::Toolkit::Text::FontDescriptionRun::slant, Dali::Toolkit::Text::FontDescriptionRun::slantDefined, StringToFloat(), StringToSlant(), StringToWeight(), StringToWidth(), TokenComparison(), Dali::Toolkit::Text::Attribute::valueBuffer, Dali::Toolkit::Text::Attribute::valueLength, Dali::Toolkit::Text::FontDescriptionRun::weight, Dali::Toolkit::Text::FontDescriptionRun::weightDefined, Dali::Toolkit::Text::FontDescriptionRun::width, Dali::Toolkit::Text::FontDescriptionRun::widthDefined, Dali::Toolkit::Text::anonymous_namespace{markup-processor-font.cpp}::XHTML_FAMILY_ATTRIBUTE(), Dali::Toolkit::Text::anonymous_namespace{markup-processor-font.cpp}::XHTML_SIZE_ATTRIBUTE(), Dali::Toolkit::Text::anonymous_namespace{markup-processor-font.cpp}::XHTML_SLANT_ATTRIBUTE(), Dali::Toolkit::Text::anonymous_namespace{markup-processor-font.cpp}::XHTML_WEIGHT_ATTRIBUTE(), and Dali::Toolkit::Text::anonymous_namespace{markup-processor-font.cpp}::XHTML_WIDTH_ATTRIBUTE().

Referenced by ProcessMarkupString().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Toolkit::Text::ProcessMarkupString ( const std::string &  markupString,
MarkupProcessData &  markupProcessData 
)

Process the mark-up string.

Parameters
[in]markupStringThe mark-up string.
[out]markupProcessDataThe plain text and the style.

Definition at line 337 of file markup-processor.cpp.

References Dali::Toolkit::Text::anonymous_namespace{markup-processor.cpp}::BACK_SLASH, Dali::Toolkit::Text::Tag::buffer, Dali::Toolkit::Text::CharacterRun::characterIndex, Dali::Toolkit::Text::ColorRun::characterRun, Dali::Toolkit::Text::FontDescriptionRun::characterRun, Dali::Toolkit::Text::MarkupProcessData::colorRuns, Dali::Toolkit::Text::anonymous_namespace{markup-processor.cpp}::DEFAULT_VECTOR_SIZE, Dali::Toolkit::Text::FontDescriptionRun::familyDefined, Dali::Toolkit::Text::FontDescriptionRun::familyName, Dali::Toolkit::Text::MarkupProcessData::fontRuns, GetUtf8Length(), Dali::Toolkit::Text::anonymous_namespace{markup-processor.cpp}::GREATER_THAN, Dali::Toolkit::Text::Tag::isEndTag, Dali::Toolkit::Text::anonymous_namespace{markup-processor.cpp}::IsTag(), Dali::Toolkit::Text::Tag::length, Dali::Toolkit::Text::anonymous_namespace{markup-processor.cpp}::LESS_THAN, Dali::Toolkit::Text::MarkupProcessData::markupProcessedText, Dali::Toolkit::Text::CharacterRun::numberOfCharacters, ProcessColorTag(), ProcessFontTag(), Dali::Toolkit::Text::FontDescriptionRun::sizeDefined, Dali::Toolkit::Text::FontDescriptionRun::slant, Dali::Toolkit::Text::FontDescriptionRun::slantDefined, TokenComparison(), Dali::Toolkit::Text::FontDescriptionRun::weight, Dali::Toolkit::Text::FontDescriptionRun::weightDefined, Dali::Toolkit::Text::FontDescriptionRun::widthDefined, Dali::Toolkit::Text::anonymous_namespace{markup-processor.cpp}::XHTML_B_TAG(), Dali::Toolkit::Text::anonymous_namespace{markup-processor.cpp}::XHTML_COLOR_TAG(), Dali::Toolkit::Text::anonymous_namespace{markup-processor.cpp}::XHTML_FONT_TAG(), Dali::Toolkit::Text::anonymous_namespace{markup-processor.cpp}::XHTML_GLOW_TAG(), Dali::Toolkit::Text::anonymous_namespace{markup-processor.cpp}::XHTML_I_TAG(), Dali::Toolkit::Text::anonymous_namespace{markup-processor.cpp}::XHTML_OUTLINE_TAG(), Dali::Toolkit::Text::anonymous_namespace{markup-processor.cpp}::XHTML_SHADOW_TAG(), and Dali::Toolkit::Text::anonymous_namespace{markup-processor.cpp}::XHTML_U_TAG().

Referenced by Dali::Toolkit::Text::Controller::SetText().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Toolkit::Text::ReorderLines ( const Vector< BidirectionalParagraphInfoRun > &  bidirectionalInfo,
Vector< LineRun > &  lineRuns,
Vector< BidirectionalLineInfoRun > &  lineInfoRuns 
)

Sets the visual to logical map tables.

Any map tables previously set are removed. It sets the paragraph's direction to each line.

Precondition
The logicalModel needs to have a text set.
The logicalModel needs to have the bidirectional info indices for each paragraph set.
The visualModel needs to have the laid-out lines info set.
Parameters
[in]bidirectionalInfoVector with the bidirectional infor for each paragraph.
[in,out]lineRunsThe line runs converted to characters.
[out]lineInfoRunsline runs with the visual to logical conversion maps.

Definition at line 165 of file bidirectional-support.cpp.

References Dali::Vector< T, IsTrivialType >::Begin(), Dali::Toolkit::Text::BidirectionalParagraphInfoRun::bidirectionalInfoIndex, Dali::Toolkit::Text::CharacterRun::characterIndex, Dali::Toolkit::Text::BidirectionalLineInfoRun::characterRun, Dali::Toolkit::Text::LineRun::characterRun, Dali::Toolkit::Text::BidirectionalParagraphInfoRun::characterRun, Dali::Toolkit::Text::BidirectionalLineInfoRun::direction, Dali::Toolkit::Text::LineRun::direction, Dali::Vector< T, IsTrivialType >::End(), Dali::PropertyTypes::Get(), Dali::Toolkit::Text::anonymous_namespace{bidirectional-support.cpp}::GetLines(), Dali::Toolkit::Text::CharacterRun::numberOfCharacters, Dali::Vector< T, IsTrivialType >::PushBack(), and Dali::Toolkit::Text::BidirectionalLineInfoRun::visualToLogicalMap.

Referenced by Dali::Toolkit::Text::Controller::DoRelayout().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Toolkit::Text::SetBidirectionalInfo ( const Vector< Character > &  text,
const Vector< ScriptRun > &  scripts,
const Vector< LineBreakInfo > &  lineBreakInfo,
Vector< BidirectionalParagraphInfoRun > &  bidirectionalInfo 
)

Sets the bidirectional info into the logical model.

Parameters
[in]textVector of UTF-32 characters.
[in]scriptsVector containing the script runs for the whole text.
[in]lineBreakInfoThe line break info.
[out]bidirectionalInfoVector with the bidirectional infor for each paragraph.

Definition at line 86 of file bidirectional-support.cpp.

References Dali::Vector< T, IsTrivialType >::Begin(), Dali::Toolkit::Text::BidirectionalParagraphInfoRun::bidirectionalInfoIndex, Dali::Toolkit::Text::CharacterRun::characterIndex, Dali::Toolkit::Text::ScriptRun::characterRun, Dali::Toolkit::Text::BidirectionalParagraphInfoRun::characterRun, Dali::VectorBase::Count(), Dali::Vector< T, IsTrivialType >::End(), Dali::PropertyTypes::Get(), Dali::Toolkit::Text::CharacterRun::numberOfCharacters, Dali::Vector< T, IsTrivialType >::PushBack(), and Dali::Toolkit::Text::ScriptRun::script.

Referenced by Dali::Toolkit::Text::Controller::Impl::UpdateModel().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Toolkit::Text::SetColorSegmentationInfo ( const Vector< ColorRun > &  characterColorRuns,
const Vector< GlyphIndex > &  charactersToGlyph,
const Vector< Length > &  glyphsPerCharacter,
Vector< ColorGlyphRun > &  glyphColorRuns 
)

Creates color glyph runs.

Parameters
[in]characterColorRunsThe color runs in characters (set in the mark-up string).
[in]charactersToGlyphConversion table from characters to glyphs.
[in]glyphsPerCharacterTable with the number of glyphs for each character.
[out]glyphColorRunsThe color runs in glyphs.

Definition at line 36 of file color-segmentation.cpp.

References Dali::Vector< T, IsTrivialType >::Begin(), Dali::Toolkit::Text::CharacterRun::characterIndex, Dali::Toolkit::Text::ColorRun::characterRun, Dali::Toolkit::Text::ColorRun::color, Dali::Toolkit::Text::ColorGlyphRun::color, Dali::VectorBase::Count(), Dali::Vector< T, IsTrivialType >::End(), Dali::Toolkit::Text::GlyphRun::glyphIndex, Dali::Toolkit::Text::ColorGlyphRun::glyphRun, Dali::Toolkit::Text::CharacterRun::numberOfCharacters, Dali::Toolkit::Text::GlyphRun::numberOfGlyphs, and Dali::Vector< T, IsTrivialType >::Resize().

Referenced by Dali::Toolkit::Text::Controller::Impl::UpdateModelStyle().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Toolkit::Text::SetFontStyleProperty ( ControllerPtr  controller,
const Property::Value &  value,
FontStyle::Type  type 
)

Sets the font's style property.

Parameters
[in]controllerThe text's controller.
[in]valueThe value of the font's style.

Weight key

Width key

Slant key

Definition at line 107 of file text-font-style.cpp.

References DALI_LOG_INFO, Dali::Toolkit::Text::FontStyle::DEFAULT, FONT_SLANT_STRING_TABLE, FONT_SLANT_STRING_TABLE_COUNT, FONT_WEIGHT_STRING_TABLE, FONT_WEIGHT_STRING_TABLE_COUNT, FONT_WIDTH_STRING_TABLE, FONT_WIDTH_STRING_TABLE_COUNT, Dali::IntrusivePtr< T >::Get(), Dali::Toolkit::Text::Controller::GetDefaultFontSlant(), Dali::Toolkit::Text::Controller::GetDefaultFontWeight(), Dali::Toolkit::Text::Controller::GetDefaultFontWidth(), Dali::Toolkit::Text::Controller::GetInputFontSlant(), Dali::Toolkit::Text::Controller::GetInputFontWeight(), Dali::Toolkit::Text::Controller::GetInputFontWidth(), Dali::Toolkit::Text::FontStyle::INPUT, Dali::Property::Map(), NORMAL, ParseFontStyleString(), Dali::Toolkit::Text::Controller::SetDefaultFontSlant(), Dali::Toolkit::Text::Controller::SetDefaultFontStyle(), Dali::Toolkit::Text::Controller::SetDefaultFontWeight(), Dali::Toolkit::Text::Controller::SetDefaultFontWidth(), Dali::Toolkit::Text::Controller::SetInputFontSlant(), Dali::Toolkit::Text::Controller::SetInputFontStyle(), Dali::Toolkit::Text::Controller::SetInputFontWeight(), Dali::Toolkit::Text::Controller::SetInputFontWidth(), Dali::Toolkit::Text::anonymous_namespace{text-font-style.cpp}::SLANT_KEY(), Dali::Property::Value(), Dali::Toolkit::Text::anonymous_namespace{text-font-style.cpp}::WEIGHT_KEY(), width, and Dali::Toolkit::Text::anonymous_namespace{text-font-style.cpp}::WIDTH_KEY().

Referenced by Dali::Toolkit::Internal::TextLabel::SetProperty(), Dali::Toolkit::Internal::TextEditor::SetProperty(), and Dali::Toolkit::Internal::TextField::SetProperty().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Toolkit::Text::SetLineBreakInfo ( const Vector< Character > &  text,
Vector< LineBreakInfo > &  lineBreakInfo 
)

Sets line break info.

Possible values for LineBreakInfo are:

  • 0 is a LINE_MUST_BREAK. Text must be broken into a new line.
  • 1 is a LINE_ALLOW_BREAK. Is possible to break the text into a new line.
  • 2 is a LINE_NO_BREAK. Text can't be broken into a new line.
Parameters
[in]textVector of UTF-32 characters.
[out]lineBreakInfoThe line break info

Definition at line 52 of file segmentation.cpp.

References Dali::Vector< T, IsTrivialType >::Begin(), Dali::VectorBase::Count(), DALI_LOG_INFO, Dali::PropertyTypes::Get(), Dali::Vector< T, IsTrivialType >::Resize(), and Utf32ToUtf8().

Referenced by anonymous_namespace{utc-Dali-Text-Segmentation.cpp}::LineBreakInfoTest(), and Dali::Toolkit::Text::Controller::Impl::UpdateModel().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Toolkit::Text::SetWordBreakInfo ( const Vector< Character > &  text,
Vector< WordBreakInfo > &  wordBreakInfo 
)

Sets word break info.

  • 0 is a WORD_BREAK. Text can be broken into a new word.
  • 1 is a WORD_NO_BREAK. Text can't be broken into a new word.
Parameters
[in]textVector of UTF-32 characters.
[out]wordBreakInfoThe word break info.

Definition at line 87 of file segmentation.cpp.

References Dali::Vector< T, IsTrivialType >::Begin(), Dali::VectorBase::Count(), DALI_LOG_INFO, Dali::PropertyTypes::Get(), Dali::Vector< T, IsTrivialType >::Resize(), and Utf32ToUtf8().

Referenced by Dali::Toolkit::Text::Controller::Impl::UpdateModel(), and anonymous_namespace{utc-Dali-Text-Segmentation.cpp}::WordBreakInfoTest().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Toolkit::Text::ShapeText ( const Vector< Character > &  text,
const Vector< LineBreakInfo > &  lineBreakInfo,
const Vector< ScriptRun > &  scripts,
const Vector< FontRun > &  fonts,
Vector< GlyphInfo > &  glyphs,
Vector< CharacterIndex > &  glyphToCharacterMap,
Vector< Length > &  charactersPerGlyph,
Vector< GlyphIndex > &  newParagraphGlyphs 
)

Shapes the whole text.

Parameters
[in]textVector of UTF-32 characters.
[in]lineBreakInfoThe line break info.
[in]scriptsVector containing the script runs for the whole text.
[in]fontsVector with validated fonts.
[out]glyphsVector of glyphs in the visual order.
[out]glyphToCharacterMapVector containing the first character in the logical model that each glyph relates to.
[out]charactersPerGlyphVector containing the number of characters per glyph.
[out]newParagraphGlyphsVector containing the indices to the new paragraph glyphs.

Definition at line 39 of file shaper.cpp.

References Dali::Vector< T, IsTrivialType >::Begin(), Dali::Toolkit::Text::CharacterRun::characterIndex, Dali::Toolkit::Text::FontRun::characterRun, Dali::Toolkit::Text::ScriptRun::characterRun, Dali::VectorBase::Count(), DALI_ASSERT_DEBUG, Dali::Toolkit::Text::FontRun::fontId, Dali::PropertyTypes::Get(), min(), Dali::Toolkit::Text::CharacterRun::numberOfCharacters, Dali::Vector< T, IsTrivialType >::PushBack(), Dali::Vector< T, IsTrivialType >::Reserve(), Dali::Vector< T, IsTrivialType >::Resize(), and Dali::Toolkit::Text::ScriptRun::script.

Referenced by Dali::Toolkit::Text::Controller::Impl::UpdateModel().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Toolkit::Text::SkipWhiteSpace ( const char *&  markupStringBuffer,
const char *const  markupStringEndBuffer 
)

Skips any unnecessary white space.

Parameters
[in,out]markupStringBufferThe mark-up string buffer. It's a const iterator pointing the current character.
[in]markupStringEndBufferPointer to one character after the end of the mark-up string buffer.

Definition at line 78 of file markup-processor-helper-functions.cpp.

References Dali::Toolkit::Text::anonymous_namespace{markup-processor-helper-functions.cpp}::WHITE_SPACE.

Referenced by Dali::Toolkit::Text::anonymous_namespace{markup-processor.cpp}::IsTag(), and Dali::Toolkit::Text::anonymous_namespace{markup-processor.cpp}::ParseAttributes().

Here is the caller graph for this function:

float Dali::Toolkit::Text::StringToFloat ( const char *const  floatStr)

Converts a string into a float value.

Parameters
[in]floatStrA float packed inside a string.
Returns
The float value.

Definition at line 89 of file markup-processor-helper-functions.cpp.

Referenced by ProcessFontTag().

Here is the caller graph for this function:

unsigned int Dali::Toolkit::Text::StringToHex ( const char *const  uintStr)

Converts a string into an hexadecimal unsigned int.

Parameters
[in]uintStrAn hexadecimal unsigned int packed inside a string.
Returns
The hexadecimal value.

Definition at line 84 of file markup-processor-helper-functions.cpp.

Referenced by ColorStringToVector4().

Here is the caller graph for this function:

FontSlant Dali::Toolkit::Text::StringToSlant ( const char *const  slantStr)

Converts a slant string into FontSlant.

Parameters
[in]slantStrThe slant string. Must end with '\0'.
Returns
The FontSlant value corresponding to the string.

Definition at line 268 of file text-font-style.cpp.

References FONT_SLANT_STRING_TABLE, FONT_SLANT_STRING_TABLE_COUNT, and NORMAL.

Referenced by ProcessFontTag().

Here is the caller graph for this function:

FontWeight Dali::Toolkit::Text::StringToWeight ( const char *const  weightStr)

Converts a weight string into FontWeight.

Parameters
[in]weightStrThe weight string. Must end with '\0'.
Returns
The FontWeight value corresponding to the string.

Definition at line 246 of file text-font-style.cpp.

References FONT_WEIGHT_STRING_TABLE, FONT_WEIGHT_STRING_TABLE_COUNT, and NORMAL.

Referenced by ProcessFontTag().

Here is the caller graph for this function:

FontWidth Dali::Toolkit::Text::StringToWidth ( const char *const  widthStr)

Converts a width string into FontWidth.

Parameters
[in]widthStrThe width string. Must end with '\0'.
Returns
The FontWidth value corresponding to the string.

Definition at line 257 of file text-font-style.cpp.

References FONT_WIDTH_STRING_TABLE, FONT_WIDTH_STRING_TABLE_COUNT, NORMAL, and width.

Referenced by ProcessFontTag().

Here is the caller graph for this function:

bool Dali::Toolkit::Text::TokenComparison ( const std::string &  string1,
const char *const  stringBuffer2,
Length  length 
)

Compare if two tokens are equal.

Precondition
string1 must be lower case. (The html-ish constant tokens) The stringBuffer2 parameter is transformed to lower case. This function is used in the mark-up parser. It has no sense to transform the constants html-ish tokens to lower case when it's known they already are.
Parameters
[in]string1The html-ish constant token.
[in]stringBuffer2Pointer to the html-ish token buffer.
[in]lengthThe length of the html-ish token.
Returns
true if both strings are equal.

Definition at line 55 of file markup-processor-helper-functions.cpp.

References Dali::Toolkit::Text::anonymous_namespace{markup-processor-helper-functions.cpp}::LAST_UPPER_CASE, and Dali::Toolkit::Text::anonymous_namespace{markup-processor-helper-functions.cpp}::TO_LOWER_CASE.

Referenced by ColorStringToVector4(), ProcessColorTag(), ProcessFontTag(), and ProcessMarkupString().

Here is the caller graph for this function:

void Dali::Toolkit::Text::UintColorToVector4 ( unsigned int  color,
Vector4 &  retColor 
)

Converts an ARGB color packed in 4 byte unsigned int into a Vector4 color used in Dali.

Parameters
[in]colorAn ARGB color packed in an unsigned int.
[out]retColorA Vector4 with the converted color.

Definition at line 94 of file markup-processor-helper-functions.cpp.

References Dali::Vector4::a, Dali::Vector4::b, Dali::Vector4::g, and Dali::Vector4::r.

Referenced by ColorStringToVector4().

Here is the caller graph for this function:

template<typename T >
void Dali::Toolkit::Text::UpdateCharacterRuns ( CharacterIndex  index,
int  numberOfCharacters,
Length  totalNumberOfCharacters,
Vector< T > &  runs,
Vector< T > &  removedRuns 
)

Updates the number of characters and the character index of the text's style runs.

If the numberOfCharacters is a negative value, it means the number of characters that are removed starting from the index.

It deletes runs if all their characters are removed.

Parameters
[in]indexIndex to the first character updated.
[in]numberOfCharactersThe number of characters to be updated.
[in]totalNumberOfCharactersTotal number of characters of the text.
[in,out]runsThe text's style runs.
[out]removedRunsThe text's style removed runs.

Definition at line 47 of file text-style-run-container.h.

References Dali::Vector< T, IsTrivialType >::Begin(), Dali::Vector< T, IsTrivialType >::Clear(), Dali::VectorBase::Count(), Dali::Vector< T, IsTrivialType >::End(), min(), Dali::Vector< T, IsTrivialType >::PushBack(), and Dali::Vector< T, IsTrivialType >::Reserve().

Here is the call graph for this function:

FontDescriptionRun& Dali::Toolkit::Text::UpdateSelectionFontStyleRun ( EventData *  eventData,
LogicalModelPtr  logicalModel 
)
uint32_t Dali::Toolkit::Text::Utf32ToUtf8 ( const uint32_t *const  utf32,
uint32_t  numberOfCharacters,
uint8_t *  utf8 
)

Converts a text array encoded in UTF32 into a text array encoded in UTF8.

The utf8 buffer needs to be big enough to store all the characters.

Parameters
[in]utf32The pointer to the UTF32 array.
[in]numberOfCharactersThe number of characters of the UTF32 array.
[out]utf8The pointer to the UTF8 array.
Returns
The number of bytes.

Definition at line 205 of file character-set-conversion.cpp.

Referenced by Dali::Toolkit::Text::Controller::GetText(), Dali::Toolkit::Text::Controller::Impl::RetrieveSelection(), SetLineBreakInfo(), SetWordBreakInfo(), Utf32ToUtf8(), and Utf32ToUtf8Test().

Here is the caller graph for this function:

void Dali::Toolkit::Text::Utf32ToUtf8 ( const uint32_t *const  utf32,
uint32_t  numberOfCharacters,
std::string &  utf8 
)

Converts a text array encoded in UTF32 into a text array encoded in UTF8.

Parameters
[in]utf32The pointer to the UTF32 array.
[in]numberOfCharactersThe number of characters of the UTF32 array.
[out]utf8The UTF8 characters will be stored here.

Definition at line 243 of file character-set-conversion.cpp.

References GetNumberOfUtf8Bytes(), and Utf32ToUtf8().

Here is the call graph for this function:

uint32_t Dali::Toolkit::Text::Utf8ToUtf32 ( const uint8_t *const  utf8,
uint32_t  length,
uint32_t *  utf32 
)

Converts a text array encoded in UTF8 into a text array encoded in UTF32.

The utf32 buffer needs to be big enough to store all the characters.

If the text contains a single 'CR' character or a pair 'CR'+'LF', they are replaced by a 'LF'.

Note
GetNumberOfUtf8Characters() does not convert 'CR' or 'CR'+'LF' to 'LF' so the return number of characters of that method may be higher than the number of characters returned by this one.
Parameters
[in]utf8The pointer to the UTF8 array.
[in]lengthThe length of the UTF8 array.
[out]utf32The pointer to the UTF32 array.
Returns
The number of characters.

Definition at line 126 of file character-set-conversion.cpp.

References Dali::Toolkit::Text::anonymous_namespace{character-set-conversion.cpp}::CR, Dali::Toolkit::Text::anonymous_namespace{character-set-conversion.cpp}::LF, Dali::Toolkit::Text::anonymous_namespace{character-set-conversion.cpp}::U1, Dali::Toolkit::Text::anonymous_namespace{character-set-conversion.cpp}::U2, Dali::Toolkit::Text::anonymous_namespace{character-set-conversion.cpp}::U3, Dali::Toolkit::Text::anonymous_namespace{character-set-conversion.cpp}::U4, and Dali::Toolkit::Text::anonymous_namespace{character-set-conversion.cpp}::UTF8_LENGTH.

Referenced by Dali::Toolkit::Text::Controller::InsertText(), anonymous_namespace{utc-Dali-Text-Segmentation.cpp}::LineBreakInfoTest(), anonymous_namespace{utc-Dali-Text-MultiLanguage.cpp}::ScriptsTest(), Dali::Toolkit::Text::Controller::SetText(), Dali::Toolkit::Text::Controller::ShowPlaceholderText(), anonymous_namespace{utc-Dali-Text-CharacterSetConversion.cpp}::Utf8ToUtf32Test(), anonymous_namespace{utc-Dali-Text-MultiLanguage.cpp}::ValidateFontTest(), and anonymous_namespace{utc-Dali-Text-Segmentation.cpp}::WordBreakInfoTest().

Here is the caller graph for this function:

Variable Documentation

const unsigned int Dali::Toolkit::Text::DEFAULT_RENDERING_BACKEND = RENDERING_SHARED_ATLAS

Definition at line 36 of file rendering-backend.h.

const Scripting::StringEnum Dali::Toolkit::Text::FONT_SLANT_STRING_TABLE[]
Initial value:
=
{
{ "roman", TextAbstraction::FontSlant::ROMAN },
{ "italic", TextAbstraction::FontSlant::ITALIC },
{ "oblique", TextAbstraction::FontSlant::OBLIQUE }
}

Definition at line 74 of file text-font-style.h.

Referenced by SetFontStyleProperty(), and StringToSlant().

const unsigned int Dali::Toolkit::Text::FONT_SLANT_STRING_TABLE_COUNT = sizeof( FONT_SLANT_STRING_TABLE ) / sizeof( FONT_SLANT_STRING_TABLE[0] )

Definition at line 81 of file text-font-style.h.

Referenced by SetFontStyleProperty(), and StringToSlant().

const Scripting::StringEnum Dali::Toolkit::Text::FONT_WEIGHT_STRING_TABLE[]
Initial value:
=
{
{ "thin", TextAbstraction::FontWeight::THIN },
{ "ultraLight", TextAbstraction::FontWeight::ULTRA_LIGHT },
{ "extraLight", TextAbstraction::FontWeight::EXTRA_LIGHT },
{ "light", TextAbstraction::FontWeight::LIGHT },
{ "demiLight", TextAbstraction::FontWeight::DEMI_LIGHT },
{ "semiLight", TextAbstraction::FontWeight::SEMI_LIGHT },
{ "book", TextAbstraction::FontWeight::BOOK },
{ "regular", TextAbstraction::FontWeight::REGULAR },
{ "medium", TextAbstraction::FontWeight::MEDIUM },
{ "demiBold", TextAbstraction::FontWeight::DEMI_BOLD },
{ "semiBold", TextAbstraction::FontWeight::SEMI_BOLD },
{ "bold", TextAbstraction::FontWeight::BOLD },
{ "ultraBold", TextAbstraction::FontWeight::ULTRA_BOLD },
{ "extraBold", TextAbstraction::FontWeight::EXTRA_BOLD },
{ "heavy", TextAbstraction::FontWeight::HEAVY },
{ "extraBlack", TextAbstraction::FontWeight::EXTRA_BLACK }
}

Definition at line 37 of file text-font-style.h.

Referenced by SetFontStyleProperty(), and StringToWeight().

const unsigned int Dali::Toolkit::Text::FONT_WEIGHT_STRING_TABLE_COUNT = sizeof( FONT_WEIGHT_STRING_TABLE ) / sizeof( FONT_WEIGHT_STRING_TABLE[0] )

Definition at line 58 of file text-font-style.h.

Referenced by SetFontStyleProperty(), and StringToWeight().

const Scripting::StringEnum Dali::Toolkit::Text::FONT_WIDTH_STRING_TABLE[]
Initial value:
=
{
{ "ultraCondensed", TextAbstraction::FontWidth::ULTRA_CONDENSED },
{ "extraCondensed", TextAbstraction::FontWidth::EXTRA_CONDENSED },
{ "condensed", TextAbstraction::FontWidth::CONDENSED },
{ "semiCondensed", TextAbstraction::FontWidth::SEMI_CONDENSED },
{ "semiExpanded", TextAbstraction::FontWidth::SEMI_EXPANDED },
{ "expanded", TextAbstraction::FontWidth::EXPANDED },
{ "extraExpanded", TextAbstraction::FontWidth::EXTRA_EXPANDED },
{ "ultraExpanded", TextAbstraction::FontWidth::ULTRA_EXPANDED },
}

Definition at line 60 of file text-font-style.h.

Referenced by SetFontStyleProperty(), and StringToWidth().

const unsigned int Dali::Toolkit::Text::FONT_WIDTH_STRING_TABLE_COUNT = sizeof( FONT_WIDTH_STRING_TABLE ) / sizeof( FONT_WIDTH_STRING_TABLE[0] )

Definition at line 72 of file text-font-style.h.

Referenced by SetFontStyleProperty(), and StringToWidth().

Dali Docs Home
Read more about Dali