1 #ifndef DALI_TOOLKIT_TEXT_CONTROLLER_H
2 #define DALI_TOOLKIT_TEXT_CONTROLLER_H
5 * Copyright (c) 2016 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
22 #include <dali/devel-api/adaptor-framework/imf-manager.h>
23 #include <dali/public-api/events/gesture.h>
26 #include <dali-toolkit/devel-api/controls/text-controls/text-selection-popup-callback-interface.h>
27 #include <dali-toolkit/internal/text/decorator/text-decorator.h>
28 #include <dali-toolkit/internal/text/layouts/layout-engine.h>
40 class ControlInterface;
41 class EditableControlInterface;
44 typedef IntrusivePtr<Controller> ControllerPtr;
47 * @brief A Text Controller is used by UI Controls which display text.
49 * It manipulates the Logical & Visual text models on behalf of the UI Controls.
50 * It provides a view of the text that can be used by rendering back-ends.
52 * For selectable/editable UI controls, the controller handles input events from the UI control
53 * and decorations (grab handles etc) via the Decorator::ControllerInterface interface.
55 * The text selection popup button callbacks are as well handled via the TextSelectionPopupCallbackInterface interface.
57 class Controller : public RefObject, public Decorator::ControllerInterface, public TextSelectionPopupCallbackInterface
59 public: // Enumerated types.
62 * @brief Text related operations to be done in the relayout process.
66 NO_OPERATION = 0x0000,
67 CONVERT_TO_UTF32 = 0x0001,
69 VALIDATE_FONTS = 0x0004,
70 GET_LINE_BREAKS = 0x0008,
71 GET_WORD_BREAKS = 0x0010,
74 GET_GLYPH_METRICS = 0x0080,
76 UPDATE_LAYOUT_SIZE = 0x0200,
80 UPDATE_DIRECTION = 0x2000,
81 ALL_OPERATIONS = 0xFFFF
85 * @brief Used to distinguish between regular key events and IMF events
94 * @brief Used to specify whether to update the input style.
96 enum UpdateInputStyleType
99 DONT_UPDATE_INPUT_STYLE
103 * @brief Used to specify what has been updated after the Relayout() method has been called.
107 NONE_UPDATED = 0x0, ///< Nothing has been updated.
108 MODEL_UPDATED = 0x1, ///< The text's model has been updated.
109 DECORATOR_UPDATED = 0x2 ///< The decoration has been updated.
113 * @brief Different placeholder-text can be shown when the control is active/inactive.
117 PLACEHOLDER_TYPE_ACTIVE,
118 PLACEHOLDER_TYPE_INACTIVE,
121 public: // Constructor.
124 * @brief Create a new instance of a Controller.
126 * @return A pointer to a new Controller.
128 static ControllerPtr New();
131 * @brief Create a new instance of a Controller.
133 * @param[in] controlInterface The control's interface.
135 * @return A pointer to a new Controller.
137 static ControllerPtr New( ControlInterface* controlInterface );
140 * @brief Create a new instance of a Controller.
142 * @param[in] controlInterface The control's interface.
143 * @param[in] editableControlInterface The editable control's interface.
145 * @return A pointer to a new Controller.
147 static ControllerPtr New( ControlInterface* controlInterface,
148 EditableControlInterface* editableControlInterface );
150 public: // Configure the text controller.
153 * @brief Called to enable text input.
155 * @note Selectable or editable controls should call this once after Controller::New().
156 * @param[in] decorator Used to create cursor, selection handle decorations etc.
158 void EnableTextInput( DecoratorPtr decorator );
161 * @brief Used to switch between bitmap & vector based glyphs
163 * @param[in] glyphType The type of glyph; note that metrics for bitmap & vector based glyphs are different.
165 void SetGlyphType( TextAbstraction::GlyphType glyphType );
168 * @brief Enables/disables the mark-up processor.
170 * By default is disabled.
172 * @param[in] enable Whether to enable the mark-up processor.
174 void SetMarkupProcessorEnabled( bool enable );
177 * @brief Retrieves whether the mark-up processor is enabled.
179 * By default is disabled.
181 * @return @e true if the mark-up processor is enabled, otherwise returns @e false.
183 bool IsMarkupProcessorEnabled() const;
186 * @brief Enables/disables the auto text scrolling
188 * By default is disabled.
190 * @param[in] enable Whether to enable the auto scrolling
192 void SetAutoScrollEnabled( bool enable );
195 * @brief Retrieves whether auto text scrolling is enabled.
197 * By default is disabled.
199 * @return @e true if auto scrolling is enabled, otherwise returns @e false.
201 bool IsAutoScrollEnabled() const;
204 * @brief Get direction of the text from the first line of text,
205 * @return bool rtl (right to left) is true
207 CharacterDirection GetAutoScrollDirection() const;
210 * @brief Get the alignment offset of the first line of text.
212 * @return The alignment offset.
214 float GetAutoScrollLineAlignment() const;
217 * @brief Enables the horizontal scrolling.
219 * @param[in] enable Whether to enable the horizontal scrolling.
221 void SetHorizontalScrollEnabled( bool enable );
224 * @brief Retrieves whether the horizontal scrolling is enabled.
226 * @return @e true if the horizontal scrolling is enabled, otherwise it returns @e false.
228 bool IsHorizontalScrollEnabled() const;
231 * @brief Enables the vertical scrolling.
233 * @param[in] enable Whether to enable the vertical scrolling.
235 void SetVerticalScrollEnabled( bool enable );
238 * @brief Retrieves whether the verticall scrolling is enabled.
240 * @return @e true if the vertical scrolling is enabled, otherwise it returns @e false.
242 bool IsVerticalScrollEnabled() const;
245 * @brief Enables the smooth handle panning.
247 * @param[in] enable Whether to enable the smooth handle panning.
249 void SetSmoothHandlePanEnabled( bool enable );
252 * @brief Retrieves whether the smooth handle panning is enabled.
254 * @return @e true if the smooth handle panning is enabled.
256 bool IsSmoothHandlePanEnabled() const;
259 * @brief Sets the maximum number of characters that can be inserted into the TextModel
261 * @param[in] maxCharacters maximum number of characters to be accepted
263 void SetMaximumNumberOfCharacters( Length maxCharacters );
266 * @brief Sets the maximum number of characters that can be inserted into the TextModel
268 * @param[in] maxCharacters maximum number of characters to be accepted
270 int GetMaximumNumberOfCharacters();
273 * @brief Called to enable/disable cursor blink.
275 * @note Only editable controls should calls this.
276 * @param[in] enabled Whether the cursor should blink or not.
278 void SetEnableCursorBlink( bool enable );
281 * @brief Query whether cursor blink is enabled.
283 * @return Whether the cursor should blink or not.
285 bool GetEnableCursorBlink() const;
288 * @brief Whether to enable the multi-line layout.
290 * @param[in] enable \e true enables the multi-line (by default)
292 void SetMultiLineEnabled( bool enable );
295 * @return Whether the multi-line layout is enabled.
297 bool IsMultiLineEnabled() const;
300 * @copydoc Dali::Toolkit::Text::LayoutEngine::SetHorizontalAlignment()
302 void SetHorizontalAlignment( LayoutEngine::HorizontalAlignment alignment );
305 * @copydoc Dali::Toolkit::Text::LayoutEngine::GetHorizontalAlignment()
307 LayoutEngine::HorizontalAlignment GetHorizontalAlignment() const;
310 * @copydoc Dali::Toolkit::Text::LayoutEngine::SetVerticalAlignment()
312 void SetVerticalAlignment( LayoutEngine::VerticalAlignment alignment );
315 * @copydoc Dali::Toolkit::Text::LayoutEngine::GetVerticalAlignment()
317 LayoutEngine::VerticalAlignment GetVerticalAlignment() const;
322 * @brief Replaces any text previously set.
324 * @note This will be converted into UTF-32 when stored in the text model.
325 * @param[in] text A string of UTF-8 characters.
327 void SetText( const std::string& text );
330 * @brief Retrieve any text previously set.
332 * @param[out] text A string of UTF-8 characters.
334 void GetText( std::string& text ) const;
337 * @brief Replaces any placeholder text previously set.
339 * @param[in] type Different placeholder-text can be shown when the control is active/inactive.
340 * @param[in] text A string of UTF-8 characters.
342 void SetPlaceholderText( PlaceholderType type, const std::string& text );
345 * @brief Retrieve any placeholder text previously set.
347 * @param[in] type Different placeholder-text can be shown when the control is active/inactive.
348 * @param[out] A string of UTF-8 characters.
350 void GetPlaceholderText( PlaceholderType type, std::string& text ) const;
353 * @ brief Update the text after a font change
354 * @param[in] newDefaultFont The new font to change to
356 void UpdateAfterFontChange( const std::string& newDefaultFont );
358 public: // Default style & Input style
361 * @brief Set the default font family.
363 * @param[in] defaultFontFamily The default font family.
365 void SetDefaultFontFamily( const std::string& defaultFontFamily );
368 * @brief Retrieve the default font family.
370 * @return The default font family.
372 const std::string& GetDefaultFontFamily() const;
375 * @brief Sets the default font weight.
377 * @param[in] weight The font weight.
379 void SetDefaultFontWeight( FontWeight weight );
382 * @brief Whether the font's weight has been defined.
384 bool IsDefaultFontWeightDefined() const;
387 * @brief Retrieves the default font weight.
389 * @return The default font weight.
391 FontWeight GetDefaultFontWeight() const;
394 * @brief Sets the default font width.
396 * @param[in] width The font width.
398 void SetDefaultFontWidth( FontWidth width );
401 * @brief Whether the font's width has been defined.
403 bool IsDefaultFontWidthDefined() const;
406 * @brief Retrieves the default font width.
408 * @return The default font width.
410 FontWidth GetDefaultFontWidth() const;
413 * @brief Sets the default font slant.
415 * @param[in] slant The font slant.
417 void SetDefaultFontSlant( FontSlant slant );
420 * @brief Whether the font's slant has been defined.
422 bool IsDefaultFontSlantDefined() const;
425 * @brief Retrieves the default font slant.
427 * @return The default font slant.
429 FontSlant GetDefaultFontSlant() const;
432 * @brief Set the default point size.
434 * @param[in] pointSize The default point size.
436 void SetDefaultPointSize( float pointSize );
439 * @brief Retrieve the default point size.
441 * @return The default point size.
443 float GetDefaultPointSize() const;
446 * @brief Set the text color
448 * @param textColor The text color
450 void SetTextColor( const Vector4& textColor );
453 * @brief Retrieve the text color
455 * @return The text color
457 const Vector4& GetTextColor() const;
460 * @brief Set the text color
462 * @param textColor The text color
464 void SetPlaceholderTextColor( const Vector4& textColor );
467 * @brief Retrieve the text color
469 * @return The text color
471 const Vector4& GetPlaceholderTextColor() const;
474 * @brief Set the shadow offset.
476 * @param[in] shadowOffset The shadow offset, 0,0 indicates no shadow.
478 void SetShadowOffset( const Vector2& shadowOffset );
481 * @brief Retrieve the shadow offset.
483 * @return The shadow offset.
485 const Vector2& GetShadowOffset() const;
488 * @brief Set the shadow color.
490 * @param[in] shadowColor The shadow color.
492 void SetShadowColor( const Vector4& shadowColor );
495 * @brief Retrieve the shadow color.
497 * @return The shadow color.
499 const Vector4& GetShadowColor() const;
502 * @brief Set the underline color.
504 * @param[in] color color of underline.
506 void SetUnderlineColor( const Vector4& color );
509 * @brief Retrieve the underline color.
511 * @return The underline color.
513 const Vector4& GetUnderlineColor() const;
516 * @brief Set the underline enabled flag.
518 * @param[in] enabled The underline enabled flag.
520 void SetUnderlineEnabled( bool enabled );
523 * @brief Returns whether the text is underlined or not.
525 * @return The underline state.
527 bool IsUnderlineEnabled() const;
530 * @brief Set the override used for underline height, 0 indicates height will be supplied by font metrics
532 * @param[in] height The height in pixels of the underline
534 void SetUnderlineHeight( float height );
537 * @brief Retrieves the override height of an underline, 0 indicates height is supplied by font metrics
539 * @return The height of the underline, or 0 if height is not overrided.
541 float GetUnderlineHeight() const;
544 * @brief Sets the emboss's properties string.
546 * @note The string is stored to be recovered.
548 * @param[in] embossProperties The emboss's properties string.
550 void SetDefaultEmbossProperties( const std::string& embossProperties );
553 * @brief Retrieves the emboss's properties string.
555 * @return The emboss's properties string.
557 const std::string& GetDefaultEmbossProperties() const;
560 * @brief Sets the outline's properties string.
562 * @note The string is stored to be recovered.
564 * @param[in] outlineProperties The outline's properties string.
566 void SetDefaultOutlineProperties( const std::string& outlineProperties );
569 * @brief Retrieves the outline's properties string.
571 * @return The outline's properties string.
573 const std::string& GetDefaultOutlineProperties() const;
576 * @brief Sets the default line spacing.
578 * @param[in] lineSpacing The line spacing.
580 void SetDefaultLineSpacing( float lineSpacing );
583 * @brief Retrieves the default line spacing.
585 * @return The line spacing.
587 float GetDefaultLineSpacing() const;
590 * @brief Sets the input text's color.
592 * @param[in] color The input text's color.
594 void SetInputColor( const Vector4& color );
597 * @brief Retrieves the input text's color.
599 * @return The input text's color.
601 const Vector4& GetInputColor() const;
604 * @brief Sets the input text's font family name.
606 * @param[in] fontFamily The text's font family name.
608 void SetInputFontFamily( const std::string& fontFamily );
611 * @brief Retrieves the input text's font family name.
613 * @return The input text's font family name.
615 const std::string& GetInputFontFamily() const;
618 * @brief Sets the input font's weight.
620 * @param[in] weight The input font's weight.
622 void SetInputFontWeight( FontWeight weight );
625 * @return Whether the font's weight has been defined.
627 bool IsInputFontWeightDefined() const;
630 * @brief Retrieves the input font's weight.
632 * @return The input font's weight.
634 FontWeight GetInputFontWeight() const;
637 * @brief Sets the input font's width.
639 * @param[in] width The input font's width.
641 void SetInputFontWidth( FontWidth width );
644 * @return Whether the font's width has been defined.
646 bool IsInputFontWidthDefined() const;
649 * @brief Retrieves the input font's width.
651 * @return The input font's width.
653 FontWidth GetInputFontWidth() const;
656 * @brief Sets the input font's slant.
658 * @param[in] slant The input font's slant.
660 void SetInputFontSlant( FontSlant slant );
663 * @return Whether the font's slant has been defined.
665 bool IsInputFontSlantDefined() const;
668 * @brief Retrieves the input font's slant.
670 * @return The input font's slant.
672 FontSlant GetInputFontSlant() const;
675 * @brief Sets the input font's point size.
677 * @param[in] size The input font's point size.
679 void SetInputFontPointSize( float size );
682 * @brief Retrieves the input font's point size.
684 * @return The input font's point size.
686 float GetInputFontPointSize() const;
689 * @brief Sets the input line spacing.
691 * @param[in] lineSpacing The line spacing.
693 void SetInputLineSpacing( float lineSpacing );
696 * @brief Retrieves the input line spacing.
698 * @return The line spacing.
700 float GetInputLineSpacing() const;
703 * @brief Sets the input shadow's properties string.
705 * @note The string is stored to be recovered.
707 * @param[in] shadowProperties The shadow's properties string.
709 void SetInputShadowProperties( const std::string& shadowProperties );
712 * @brief Retrieves the input shadow's properties string.
714 * @return The shadow's properties string.
716 const std::string& GetInputShadowProperties() const;
719 * @brief Sets the input underline's properties string.
721 * @note The string is stored to be recovered.
723 * @param[in] underlineProperties The underline's properties string.
725 void SetInputUnderlineProperties( const std::string& underlineProperties );
728 * @brief Retrieves the input underline's properties string.
730 * @return The underline's properties string.
732 const std::string& GetInputUnderlineProperties() const;
735 * @brief Sets the input emboss's properties string.
737 * @note The string is stored to be recovered.
739 * @param[in] embossProperties The emboss's properties string.
741 void SetInputEmbossProperties( const std::string& embossProperties );
744 * @brief Retrieves the input emboss's properties string.
746 * @return The emboss's properties string.
748 const std::string& GetInputEmbossProperties() const;
751 * @brief Sets input the outline's properties string.
753 * @note The string is stored to be recovered.
755 * @param[in] outlineProperties The outline's properties string.
757 void SetInputOutlineProperties( const std::string& outlineProperties );
760 * @brief Retrieves the input outline's properties string.
762 * @return The outline's properties string.
764 const std::string& GetInputOutlineProperties() const;
766 public: // Queries & retrieves.
769 * @brief Return the layout engine.
771 * @return A reference to the layout engine.
773 LayoutEngine& GetLayoutEngine();
776 * @brief Return a view of the text.
778 * @return A reference to the view.
783 * @brief Query the current scroll position; the UI control is responsible for moving actors to this position.
785 * @return The scroll position.
787 const Vector2& GetScrollPosition() const;
790 * @copydoc Control::GetNaturalSize()
792 Vector3 GetNaturalSize();
795 * @copydoc Control::GetHeightForWidth()
797 float GetHeightForWidth( float width );
802 * @brief Triggers a relayout which updates View (if necessary).
804 * @note UI Controls are expected to minimize calls to this method e.g. call once after size negotiation.
805 * @param[in] size A the size of a bounding box to layout text within.
807 * @return Whether the text model or decorations were updated.
809 UpdateTextType Relayout( const Size& size );
812 * @brief Request a relayout using the ControlInterface.
814 void RequestRelayout();
816 public: // Input style change signals.
819 * @return Whether the queue of input style changed signals is empty.
821 bool IsInputStyleChangedSignalsQueueEmpty();
824 * @brief Process all pending input style changed signals.
826 * Calls the Text::ControlInterface::InputStyleChanged() method which is overriden by the
827 * text controls. Text controls may send signals to state the input style has changed.
829 void ProcessInputStyleChangedSignals();
831 public: // Text-input Event Queuing.
834 * @brief Called by editable UI controls when keyboard focus is gained.
836 void KeyboardFocusGainEvent();
839 * @brief Called by editable UI controls when focus is lost.
841 void KeyboardFocusLostEvent();
844 * @brief Called by editable UI controls when key events are received.
846 * @param[in] event The key event.
847 * @param[in] type Used to distinguish between regular key events and IMF events.
849 bool KeyEvent( const Dali::KeyEvent& event );
852 * @brief Called by editable UI controls when a tap gesture occurs.
853 * @param[in] tapCount The number of taps.
854 * @param[in] x The x position relative to the top-left of the parent control.
855 * @param[in] y The y position relative to the top-left of the parent control.
857 void TapEvent( unsigned int tapCount, float x, float y );
860 * @brief Called by editable UI controls when a pan gesture occurs.
862 * @param[in] state The state of the gesture.
863 * @param[in] displacement This distance panned since the last pan gesture.
865 void PanEvent( Gesture::State state, const Vector2& displacement );
868 * @brief Called by editable UI controls when a long press gesture occurs.
870 * @param[in] state The state of the gesture.
871 * @param[in] x The x position relative to the top-left of the parent control.
872 * @param[in] y The y position relative to the top-left of the parent control.
874 void LongPressEvent( Gesture::State state, float x, float y );
877 * @brief Event received from IMF manager
879 * @param[in] imfManager The IMF manager.
880 * @param[in] imfEvent The event received.
881 * @return A data struture indicating if update is needed, cursor position and current text.
883 ImfManager::ImfCallbackData OnImfEvent( ImfManager& imfManager, const ImfManager::ImfEventData& imfEvent );
886 * @brief Event from Clipboard notifying an Item has been selected for pasting
888 void PasteClipboardItemEvent();
890 protected: // Inherit from Text::Decorator::ControllerInterface.
893 * @copydoc Dali::Toolkit::Text::Decorator::ControllerInterface::GetTargetSize()
895 virtual void GetTargetSize( Vector2& targetSize );
898 * @copydoc Dali::Toolkit::Text::Decorator::ControllerInterface::AddDecoration()
900 virtual void AddDecoration( Actor& actor, bool needsClipping );
903 * @copydoc Dali::Toolkit::Text::Decorator::ControllerInterface::DecorationEvent()
905 virtual void DecorationEvent( HandleType handle, HandleState state, float x, float y );
907 protected: // Inherit from TextSelectionPopup::TextPopupButtonCallbackInterface.
910 * @copydoc Dali::Toolkit::TextSelectionPopup::TextPopupButtonCallbackInterface::TextPopupButtonTouched()
912 virtual void TextPopupButtonTouched( Dali::Toolkit::TextSelectionPopup::Buttons button );
917 * @brief Called by editable UI controls when key events are received.
919 * @param[in] text The text to insert.
920 * @param[in] type Used to distinguish between regular key events and IMF events.
922 void InsertText( const std::string& text, InsertType type );
925 * @brief Paste given string into Text model
926 * @param[in] stringToPaste this string will be inserted into the text model
928 void PasteText( const std::string& stringToPaste );
931 * @brief Remove a given number of characters
933 * When predictve text is used the pre-edit text is removed and inserted again with the new characters.
934 * The UpdateInputStyleType @type parameter if set to DONT_UPDATE_INPUT_STYLE avoids to update the input
935 * style when pre-edit text is removed.
937 * @param[in] cursorOffset Start position from the current cursor position to start deleting characters.
938 * @param[in] numberOfCharacters The number of characters to delete from the cursorOffset.
939 * @param[in] type Whether to update the input style.
940 * @return True if the remove was successful.
942 bool RemoveText( int cursorOffset,
943 int numberOfCharacters,
944 UpdateInputStyleType type );
947 * @brief Checks if text is selected and if so removes it.
948 * @return true if text was removed
950 bool RemoveSelectedText();
952 private: // Relayout.
955 * @brief Lays-out the text.
957 * GetNaturalSize(), GetHeightForWidth() and Relayout() calls this method.
959 * @param[in] size A the size of a bounding box to layout text within.
960 * @param[in] operations The layout operations which need to be done.
961 * @param[out] layoutSize The size of the laid-out text.
963 bool DoRelayout( const Size& size,
964 OperationsMask operations,
968 * @brief Calulates the vertical offset to align the text inside the bounding box.
970 * @param[in] size The size of the bounding box.
972 void CalculateVerticalOffset( const Size& size );
977 * @brief Process queued events which modify the model.
979 void ProcessModifyEvents();
982 * @brief Used to process an event queued from SetText()
984 void TextReplacedEvent();
987 * @brief Used to process an event queued from key events etc.
989 void TextInsertedEvent();
992 * @brief Used to process an event queued from backspace key etc.
994 void TextDeletedEvent();
997 * @brief Creates a selection event.
999 * It could be called from the TapEvent (double tap) or when the text selection popup's sellect all button is pressed.
1001 * @param[in] x The x position relative to the top-left of the parent control.
1002 * @param[in] y The y position relative to the top-left of the parent control.
1003 * @param[in] selectAll Whether the whole text is selected.
1005 void SelectEvent( float x, float y, bool selectAll );
1008 * @brief Helper to KeyEvent() to handle the backspace case.
1010 * @return True if a character was deleted.
1012 bool BackspaceKeyEvent();
1014 private: // Helpers.
1017 * @brief Used to remove the text included the placeholder text.
1022 * @brief Helper to show the place holder text..
1024 void ShowPlaceholderText();
1027 * @brief Helper to clear font-specific data (only).
1029 void ClearFontData();
1032 * @brief Helper to clear text's style data.
1034 void ClearStyleData();
1037 * @brief Used to reset the cursor position after setting a new text.
1039 * @param[in] cursorIndex Where to place the cursor.
1041 void ResetCursorPosition( CharacterIndex cursorIndex );
1044 * @brief Used to reset the scroll position after setting a new text.
1046 void ResetScrollPosition();
1048 private: // Private contructors & copy operator.
1051 * @brief Private constructor.
1056 * @brief Private constructor.
1058 Controller( ControlInterface* controlInterface );
1061 * @brief Private constructor.
1063 Controller( ControlInterface* controlInterface,
1064 EditableControlInterface* editableControlInterface );
1067 Controller( const Controller& handle );
1070 Controller& operator=( const Controller& handle );
1072 protected: // Destructor.
1075 * @brief A reference counted object may only be deleted by calling Unreference().
1077 virtual ~Controller();
1087 } // namespace Toolkit
1091 #endif // DALI_TOOLKIT_TEXT_CONTROLLER_H