[dali_1.4.25] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / text-controller.h
1 #ifndef DALI_TOOLKIT_TEXT_CONTROLLER_H
2 #define DALI_TOOLKIT_TEXT_CONTROLLER_H
3
4 /*
5  * Copyright (c) 2018 Samsung Electronics Co., Ltd.
6  *
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
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
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.
18  *
19  */
20
21 // EXTERNAL INCLUDES
22 #include <dali/devel-api/adaptor-framework/input-method-context.h>
23 #include <dali/public-api/events/gesture.h>
24
25 // INTERNAL INCLUDES
26 #include <dali-toolkit/public-api/text/text-enumerations.h>
27 #include <dali-toolkit/devel-api/controls/text-controls/text-selection-popup-callback-interface.h>
28 #include <dali-toolkit/devel-api/controls/text-controls/text-label-devel.h>
29 #include <dali-toolkit/devel-api/text/text-enumerations-devel.h>
30 #include <dali-toolkit/internal/text/decorator/text-decorator.h>
31 #include <dali-toolkit/internal/text/layouts/layout-engine.h>
32 #include <dali-toolkit/internal/text/hidden-text.h>
33 #include <dali-toolkit/internal/text/text-model-interface.h>
34
35 namespace Dali
36 {
37
38 namespace Toolkit
39 {
40
41 namespace Text
42 {
43
44 class Controller;
45 class ControlInterface;
46 class EditableControlInterface;
47 class View;
48 class RenderingController;
49
50 typedef IntrusivePtr<Controller> ControllerPtr;
51
52 /**
53  * @brief A Text Controller is used by UI Controls which display text.
54  *
55  * It manipulates the Logical & Visual text models on behalf of the UI Controls.
56  * It provides a view of the text that can be used by rendering back-ends.
57  *
58  * For selectable/editable UI controls, the controller handles input events from the UI control
59  * and decorations (grab handles etc) via the Decorator::ControllerInterface interface.
60  *
61  * The text selection popup button callbacks are as well handled via the TextSelectionPopupCallbackInterface interface.
62  */
63 class Controller : public RefObject, public Decorator::ControllerInterface, public TextSelectionPopupCallbackInterface, public HiddenText::Observer
64 {
65 public: // Enumerated types.
66
67   /**
68    * @brief Text related operations to be done in the relayout process.
69    */
70   enum OperationsMask
71   {
72     NO_OPERATION       = 0x0000,
73     CONVERT_TO_UTF32   = 0x0001,
74     GET_SCRIPTS        = 0x0002,
75     VALIDATE_FONTS     = 0x0004,
76     GET_LINE_BREAKS    = 0x0008,
77     GET_WORD_BREAKS    = 0x0010,
78     BIDI_INFO          = 0x0020,
79     SHAPE_TEXT         = 0x0040,
80     GET_GLYPH_METRICS  = 0x0080,
81     LAYOUT             = 0x0100,
82     UPDATE_LAYOUT_SIZE = 0x0200,
83     REORDER            = 0x0400,
84     ALIGN              = 0x0800,
85     COLOR              = 0x1000,
86     UPDATE_DIRECTION   = 0x2000,
87     ALL_OPERATIONS     = 0xFFFF
88   };
89
90   /**
91    * @brief Used to distinguish between regular key events and InputMethodContext events
92    */
93   enum InsertType
94   {
95     COMMIT,
96     PRE_EDIT
97   };
98
99   /**
100    * @brief Used to specify whether to update the input style.
101    */
102   enum UpdateInputStyleType
103   {
104     UPDATE_INPUT_STYLE,
105     DONT_UPDATE_INPUT_STYLE
106   };
107
108   /**
109    * @brief Used to specify what has been updated after the Relayout() method has been called.
110    */
111   enum UpdateTextType
112   {
113     NONE_UPDATED      = 0x0, ///< Nothing has been updated.
114     MODEL_UPDATED     = 0x1, ///< The text's model has been updated.
115     DECORATOR_UPDATED = 0x2  ///< The decoration has been updated.
116   };
117
118   /**
119    * @brief Different placeholder-text can be shown when the control is active/inactive.
120    */
121   enum PlaceholderType
122   {
123     PLACEHOLDER_TYPE_ACTIVE,
124     PLACEHOLDER_TYPE_INACTIVE,
125   };
126
127   /**
128    * @brief Enumeration for Font Size Type.
129    */
130   enum FontSizeType
131   {
132     POINT_SIZE,   // The size of font in points.
133     PIXEL_SIZE    // The size of font in pixels.
134   };
135
136   struct NoTextTap
137   {
138     enum Action
139     {
140       NO_ACTION,           ///< Does no action if there is a tap on top of an area with no text.
141       HIGHLIGHT,           ///< Highlights the nearest text (at the beginning or end of the text) and shows the text's selection popup.
142       SHOW_SELECTION_POPUP ///< Shows the text's selection popup.
143     };
144   };
145
146   struct TextFitInfo
147   {
148     enum Property
149     {
150       TEXT_FIT_ENABLE,
151       TEXT_FIT_MIN_SIZE,
152       TEXT_FIT_MAX_SIZE,
153       TEXT_FIT_STEP_SIZE,
154       TEXT_FIT_FONT_SIZE_TYPE
155     };
156   };
157
158 public: // Constructor.
159
160   /**
161    * @brief Create a new instance of a Controller.
162    *
163    * @return A pointer to a new Controller.
164    */
165   static ControllerPtr New();
166
167   /**
168    * @brief Create a new instance of a Controller.
169    *
170    * @param[in] controlInterface The control's interface.
171    *
172    * @return A pointer to a new Controller.
173    */
174   static ControllerPtr New( ControlInterface* controlInterface );
175
176   /**
177    * @brief Create a new instance of a Controller.
178    *
179    * @param[in] controlInterface The control's interface.
180    * @param[in] editableControlInterface The editable control's interface.
181    *
182    * @return A pointer to a new Controller.
183    */
184   static ControllerPtr New( ControlInterface* controlInterface,
185                             EditableControlInterface* editableControlInterface );
186
187 public: // Configure the text controller.
188
189   /**
190    * @brief Called to enable text input.
191    *
192    * @note Selectable or editable controls should call this once after Controller::New().
193    * @param[in] decorator Used to create cursor, selection handle decorations etc.
194    * @param[in] inputMethodContext Used to manager ime.
195    */
196   void EnableTextInput( DecoratorPtr decorator, InputMethodContext& inputMethodContext );
197
198   /**
199    * @brief Used to switch between bitmap & vector based glyphs
200    *
201    * @param[in] glyphType The type of glyph; note that metrics for bitmap & vector based glyphs are different.
202    */
203   void SetGlyphType( TextAbstraction::GlyphType glyphType );
204
205   /**
206    * @brief Enables/disables the mark-up processor.
207    *
208    * By default is disabled.
209    *
210    * @param[in] enable Whether to enable the mark-up processor.
211    */
212   void SetMarkupProcessorEnabled( bool enable );
213
214   /**
215    * @brief Retrieves whether the mark-up processor is enabled.
216    *
217    * By default is disabled.
218    *
219    * @return @e true if the mark-up processor is enabled, otherwise returns @e false.
220    */
221   bool IsMarkupProcessorEnabled() const;
222
223   /**
224    * @brief Enables/disables the auto text scrolling
225    *
226    * By default is disabled.
227    *
228    * @param[in] enable Whether to enable the auto scrolling
229    */
230   void SetAutoScrollEnabled( bool enable );
231
232   /**
233    * @brief Retrieves whether auto text scrolling is enabled.
234    *
235    * By default is disabled.
236    *
237    * @return @e true if auto scrolling is enabled, otherwise returns @e false.
238    */
239   bool IsAutoScrollEnabled() const;
240
241   /**
242    * @brief Get direction of the text from the first line of text,
243    * @return bool rtl (right to left) is true
244    */
245   CharacterDirection GetAutoScrollDirection() const;
246
247   /**
248    * @brief Get the alignment offset of the first line of text.
249    *
250    * @return The alignment offset.
251    */
252   float GetAutoScrollLineAlignment() const;
253
254   /**
255    * @brief Enables the horizontal scrolling.
256    *
257    * @param[in] enable Whether to enable the horizontal scrolling.
258    */
259   void SetHorizontalScrollEnabled( bool enable );
260
261   /**
262    * @brief Retrieves whether the horizontal scrolling is enabled.
263    *
264    * @return @e true if the horizontal scrolling is enabled, otherwise it returns @e false.
265    */
266   bool IsHorizontalScrollEnabled() const;
267
268   /**
269    * @brief Enables the vertical scrolling.
270    *
271    * @param[in] enable Whether to enable the vertical scrolling.
272    */
273   void SetVerticalScrollEnabled( bool enable );
274
275   /**
276    * @brief Retrieves whether the verticall scrolling is enabled.
277    *
278    * @return @e true if the vertical scrolling is enabled, otherwise it returns @e false.
279    */
280   bool IsVerticalScrollEnabled() const;
281
282   /**
283    * @brief Enables the smooth handle panning.
284    *
285    * @param[in] enable Whether to enable the smooth handle panning.
286    */
287   void SetSmoothHandlePanEnabled( bool enable );
288
289   /**
290    * @brief Retrieves whether the smooth handle panning is enabled.
291    *
292    * @return @e true if the smooth handle panning is enabled.
293    */
294   bool IsSmoothHandlePanEnabled() const;
295
296   /**
297    * @brief Sets the maximum number of characters that can be inserted into the TextModel
298    *
299    * @param[in] maxCharacters maximum number of characters to be accepted
300    */
301   void SetMaximumNumberOfCharacters( Length maxCharacters );
302
303   /**
304    * @brief Sets the maximum number of characters that can be inserted into the TextModel
305    *
306    * @param[in] maxCharacters maximum number of characters to be accepted
307    */
308   int GetMaximumNumberOfCharacters();
309
310   /**
311    * @brief Called to enable/disable cursor blink.
312    *
313    * @note Only editable controls should calls this.
314    * @param[in] enabled Whether the cursor should blink or not.
315    */
316   void SetEnableCursorBlink( bool enable );
317
318   /**
319    * @brief Query whether cursor blink is enabled.
320    *
321    * @return Whether the cursor should blink or not.
322    */
323   bool GetEnableCursorBlink() const;
324
325   /**
326    * @brief Whether to enable the multi-line layout.
327    *
328    * @param[in] enable \e true enables the multi-line (by default)
329    */
330   void SetMultiLineEnabled( bool enable );
331
332   /**
333    * @return Whether the multi-line layout is enabled.
334    */
335   bool IsMultiLineEnabled() const;
336
337   /**
338    * @brief Sets the text's horizontal alignment.
339    *
340    * @param[in] alignment The horizontal alignment.
341    */
342   void SetHorizontalAlignment( HorizontalAlignment::Type alignment );
343
344   /**
345    * @copydoc ModelInterface::GetHorizontalAlignment()
346    */
347   HorizontalAlignment::Type GetHorizontalAlignment() const;
348
349   /**
350    * @brief Sets the text's vertical alignment.
351    *
352    * @param[in] alignment The vertical alignment.
353    */
354   void SetVerticalAlignment( VerticalAlignment::Type alignment );
355
356   /**
357    * @copydoc ModelInterface::GetVerticalAlignment()
358    */
359   VerticalAlignment::Type GetVerticalAlignment() const;
360
361   /**
362    * @brief Sets the text's wrap mode
363    * @param[in] text wrap mode The unit of wrapping
364    */
365   void SetLineWrapMode( Text::LineWrap::Mode textWarpMode );
366
367   /**
368    * @brief Retrieve text wrap mode previously set.
369    * @return text wrap mode
370    */
371   Text::LineWrap::Mode GetLineWrapMode() const;
372
373   /**
374    * @brief Enable or disable the text elide.
375    *
376    * @param[in] enabled Whether to enable the text elide.
377    */
378   void SetTextElideEnabled( bool enabled );
379
380   /**
381    * @copydoc ModelInterface::IsTextElideEnabled()
382    */
383   bool IsTextElideEnabled() const;
384
385   /**
386    * @brief Enable or disable the text fit.
387    *
388    * @param[in] enabled Whether to enable the text fit.
389    */
390   void SetTextFitEnabled(bool enabled);
391
392   /**
393    * @brief Whether the text fit is enabled or not.
394    *
395    * @return True if the text fit is enabled
396    */
397   bool IsTextFitEnabled() const;
398
399   /**
400    * @brief Sets minimum size valid for text fit.
401    *
402    * @param[in] minimum size value.
403    * @param[in] type The font size type is point size or pixel size
404    */
405   void SetTextFitMinSize( float pointSize, FontSizeType type );
406
407   /**
408    * @brief Retrieves the minimum point size valid for text fit.
409    *
410    * @return The minimum point size valid for text fit
411    */
412   float GetTextFitMinSize() const;
413
414   /**
415    * @brief Sets maximum size valid for text fit.
416    *
417    * @param[in] maximum size value.
418    * @param[in] type The font size type is point size or pixel size
419    */
420   void SetTextFitMaxSize( float pointSize, FontSizeType type );
421
422   /**
423    * @brief Retrieves the maximum point size valid for text fit.
424    *
425    * @return The maximum point size valid for text fit
426    */
427   float GetTextFitMaxSize() const;
428
429   /**
430    * @brief Sets step size for font increase valid for text fit.
431    *
432    * @param[in] step size value.
433    * @param[in] type The font size type is point size or pixel size
434    */
435   void SetTextFitStepSize( float step, FontSizeType type );
436
437   /**
438    * @brief Retrieves the step point size valid for text fit.
439    *
440    * @return The step point size valid for text fit
441    */
442   float GetTextFitStepSize() const;
443
444   /**
445    * @brief Sets content size valid for text fit.
446    *
447    * @param[in] Content size value.
448    */
449   void SetTextFitContentSize(Vector2 size);
450
451   /**
452    * @brief Retrieves the content size valid for text fit.
453    *
454    * @return The content size valid for text fit
455    */
456   Vector2 GetTextFitContentSize() const;
457
458   /**
459    * @brief Enable or disable the placeholder text elide.
460    * @param enabled Whether to enable the placeholder text elide.
461    */
462   void SetPlaceholderTextElideEnabled( bool enabled );
463
464   /**
465    * @brief Whether the placeholder text elide property is enabled.
466    * @return True if the placeholder text elide property is enabled, false otherwise.
467    */
468   bool IsPlaceholderTextElideEnabled() const;
469
470   /**
471    * @brief Enable or disable the text selection.
472    * @param[in] enabled Whether to enable the text selection.
473    */
474   void SetSelectionEnabled( bool enabled );
475
476   /**
477    * @brief Whether the text selection is enabled or not.
478    * @return True if the text selection is enabled
479    */
480   bool IsSelectionEnabled() const;
481
482   /**
483    * @brief Enable or disable the text selection using Shift key.
484    * @param enabled Whether to enable the text selection using Shift key
485    */
486   void SetShiftSelectionEnabled( bool enabled );
487
488   /**
489    * @brief Whether the text selection using Shift key is enabled or not.
490    * @return True if the text selection using Shift key is enabled
491    */
492   bool IsShiftSelectionEnabled() const;
493
494   /**
495    * @brief Enable or disable the grab handles for text selection.
496    *
497    * @param[in] enabled Whether to enable the grab handles
498    */
499   void SetGrabHandleEnabled( bool enabled );
500
501   /**
502    * @brief Returns whether the grab handles are enabled.
503    *
504    * @return True if the grab handles are enabled
505    */
506   bool IsGrabHandleEnabled() const;
507
508   /**
509    * @brief Enable or disable the grab handles for text selection.
510    *
511    * @param[in] enabled Whether to enable the grab handles
512    */
513   void SetGrabHandlePopupEnabled( bool enabled );
514
515   /**
516    * @brief Returns whether the grab handles are enabled.
517    *
518    * @return True if the grab handles are enabled
519    */
520   bool IsGrabHandlePopupEnabled() const;
521
522   /**
523    * @brief Sets input type to password
524    *
525    * @note The string is displayed hidden character
526    *
527    * @param[in] passwordInput True if password input is enabled.
528    */
529   void SetInputModePassword( bool passwordInput );
530
531   /**
532    * @brief Returns whether the input mode type is set as password.
533    *
534    * @return True if input mode type is password
535    */
536   bool IsInputModePassword();
537
538   /**
539    * @brief Sets the action when there is a double tap event on top of a text area with no text.
540    *
541    * @param[in] action The action to do.
542    */
543   void SetNoTextDoubleTapAction( NoTextTap::Action action );
544
545   /**
546    * @brief Retrieves the action when there is a double tap event on top of a text area with no text.
547    *
548    * @return The action to do.
549    */
550   NoTextTap::Action GetNoTextDoubleTapAction() const;
551
552   /**
553    * @briefSets the action when there is a long press event on top of a text area with no text.
554    *
555    * @param[in] action The action to do.
556    */
557   void SetNoTextLongPressAction( NoTextTap::Action action );
558
559   /**
560    * @brief Retrieves the action when there is a long press event on top of a text area with no text.
561    *
562    * @return The action to do.
563    */
564   NoTextTap::Action GetNoTextLongPressAction() const;
565
566   /**
567    * @brief Query if Underline settings were provided by string or map
568    * @return bool true if set by string
569    */
570   bool IsUnderlineSetByString();
571
572   /**
573    * Set method underline setting were set by
574    * @param[in] bool, true if set by string
575    */
576   void UnderlineSetByString( bool setByString );
577
578   /**
579    * @brief Query if shadow settings were provided by string or map
580    * @return bool true if set by string
581    */
582   bool IsShadowSetByString();
583
584   /**
585    * Set method shadow setting were set by
586    * @param[in] bool, true if set by string
587    */
588   void ShadowSetByString( bool setByString );
589
590   /**
591    * @brief Query if outline settings were provided by string or map
592    * @return bool true if set by string
593    */
594   bool IsOutlineSetByString();
595
596   /**
597    * Set method outline setting were set by
598    * @param[in] bool, true if set by string
599    */
600   void OutlineSetByString( bool setByString );
601
602   /**
603    * @brief Query if font style settings were provided by string or map
604    * @return bool true if set by string
605    */
606   bool IsFontStyleSetByString();
607
608   /**
609    * Set method font style setting were set by
610    * @param[in] bool, true if set by string
611    */
612   void FontStyleSetByString( bool setByString );
613
614 public: // Update.
615
616   /**
617    * @brief Replaces any text previously set.
618    *
619    * @note This will be converted into UTF-32 when stored in the text model.
620    * @param[in] text A string of UTF-8 characters.
621    */
622   void SetText( const std::string& text );
623
624   /**
625    * @brief Retrieve any text previously set.
626    *
627    * @param[out] text A string of UTF-8 characters.
628    */
629   void GetText( std::string& text ) const;
630
631   /**
632    * @brief Replaces any placeholder text previously set.
633    *
634    * @param[in] type Different placeholder-text can be shown when the control is active/inactive.
635    * @param[in] text A string of UTF-8 characters.
636    */
637   void SetPlaceholderText( PlaceholderType type, const std::string& text );
638
639   /**
640    * @brief Retrieve any placeholder text previously set.
641    *
642    * @param[in] type Different placeholder-text can be shown when the control is active/inactive.
643    * @param[out] A string of UTF-8 characters.
644    */
645   void GetPlaceholderText( PlaceholderType type, std::string& text ) const;
646
647   /**
648    * @ brief Update the text after a font change
649    * @param[in] newDefaultFont The new font to change to
650    */
651   void UpdateAfterFontChange( const std::string& newDefaultFont );
652
653 public: // Default style & Input style
654
655   /**
656    * @brief Set the default font family.
657    *
658    * @param[in] defaultFontFamily The default font family.
659    */
660   void SetDefaultFontFamily( const std::string& defaultFontFamily );
661
662   /**
663    * @brief Retrieve the default font family.
664    *
665    * @return The default font family.
666    */
667   const std::string& GetDefaultFontFamily() const;
668
669   /**
670    * @brief Sets the placeholder text font family.
671    * @param[in] placeholderTextFontFamily The placeholder text font family.
672    */
673   void SetPlaceholderFontFamily( const std::string& placeholderTextFontFamily );
674
675   /**
676    * @brief Retrieves the placeholder text font family.
677    *
678    * @return The placeholder text font family
679    */
680   const std::string& GetPlaceholderFontFamily() const;
681
682   /**
683    * @brief Sets the default font weight.
684    *
685    * @param[in] weight The font weight.
686    */
687   void SetDefaultFontWeight( FontWeight weight );
688
689   /**
690    * @brief Whether the font's weight has been defined.
691    */
692   bool IsDefaultFontWeightDefined() const;
693
694   /**
695    * @brief Retrieves the default font weight.
696    *
697    * @return The default font weight.
698    */
699   FontWeight GetDefaultFontWeight() const;
700
701   /**
702    * @brief Sets the placeholder text font weight.
703    *
704    * @param[in] weight The font weight
705    */
706   void SetPlaceholderTextFontWeight( FontWeight weight );
707
708   /**
709    * @brief Whether the font's weight has been defined.
710    *
711    * @return True if the placeholder text font weight is defined
712    */
713   bool IsPlaceholderTextFontWeightDefined() const;
714
715   /**
716    * @brief Retrieves the placeholder text font weight.
717    *
718    * @return The placeholder text font weight
719    */
720   FontWeight GetPlaceholderTextFontWeight() const;
721
722   /**
723    * @brief Sets the default font width.
724    *
725    * @param[in] width The font width.
726    */
727   void SetDefaultFontWidth( FontWidth width );
728
729   /**
730    * @brief Whether the font's width has been defined.
731    */
732   bool IsDefaultFontWidthDefined() const;
733
734   /**
735    * @brief Retrieves the default font width.
736    *
737    * @return The default font width.
738    */
739   FontWidth GetDefaultFontWidth() const;
740
741   /**
742    * @brief Sets the placeholder text font width.
743    *
744    * @param[in] width The font width
745    */
746   void SetPlaceholderTextFontWidth( FontWidth width );
747
748   /**
749    * @brief Whether the font's width has been defined.
750    *
751    * @return True if the placeholder text font width is defined
752    */
753   bool IsPlaceholderTextFontWidthDefined() const;
754
755   /**
756    * @brief Retrieves the placeholder text font width.
757    *
758    * @return The placeholder text font width
759    */
760   FontWidth GetPlaceholderTextFontWidth() const;
761
762   /**
763    * @brief Sets the default font slant.
764    *
765    * @param[in] slant The font slant.
766    */
767   void SetDefaultFontSlant( FontSlant slant );
768
769   /**
770    * @brief Whether the font's slant has been defined.
771    */
772   bool IsDefaultFontSlantDefined() const;
773
774   /**
775    * @brief Retrieves the default font slant.
776    *
777    * @return The default font slant.
778    */
779   FontSlant GetDefaultFontSlant() const;
780
781   /**
782    * @brief Sets the placeholder text font slant.
783    *
784    * @param[in] slant The font slant
785    */
786   void SetPlaceholderTextFontSlant( FontSlant slant );
787
788   /**
789    * @brief Whether the font's slant has been defined.
790    *
791    * @return True if the placeholder text font slant is defined
792    */
793   bool IsPlaceholderTextFontSlantDefined() const;
794
795   /**
796    * @brief Retrieves the placeholder text font slant.
797    *
798    * @return The placeholder text font slant
799    */
800   FontSlant GetPlaceholderTextFontSlant() const;
801
802   /**
803    * @brief Set the default font size.
804    *
805    * @param[in] fontSize The default font size
806    * @param[in] type The font size type is point size or pixel size
807    */
808   void SetDefaultFontSize( float fontSize, FontSizeType type );
809
810   /**
811    * @brief Retrieve the default point size.
812    *
813    * @param[in] type The font size type
814    * @return The default point size.
815    */
816   float GetDefaultFontSize( FontSizeType type ) const;
817
818   /**
819    * @brief Sets the Placeholder text font size.
820    * @param[in] fontSize The placeholder text font size
821    * @param[in] type The font size type is point size or pixel size
822    */
823   void SetPlaceholderTextFontSize( float fontSize, FontSizeType type );
824
825   /**
826    * @brief Retrieves the Placeholder text font size.
827    * @param[in] type The font size type
828    * @return The placeholder font size
829    */
830   float GetPlaceholderTextFontSize( FontSizeType type ) const;
831
832   /**
833    * @brief Sets the text's default color.
834    *
835    * @param color The default color.
836    */
837   void SetDefaultColor( const Vector4& color );
838
839   /**
840    * @brief Retrieves the text's default color.
841    *
842    * @return The default color.
843    */
844   const Vector4& GetDefaultColor() const;
845
846   /**
847    * @brief Set the text color
848    *
849    * @param textColor The text color
850    */
851   void SetPlaceholderTextColor( const Vector4& textColor );
852
853   /**
854    * @brief Retrieve the text color
855    *
856    * @return The text color
857    */
858   const Vector4& GetPlaceholderTextColor() const;
859
860   /**
861    * @brief Set the shadow offset.
862    *
863    * @param[in] shadowOffset The shadow offset, 0,0 indicates no shadow.
864    */
865   void SetShadowOffset( const Vector2& shadowOffset );
866
867   /**
868    * @brief Retrieve the shadow offset.
869    *
870    * @return The shadow offset.
871    */
872   const Vector2& GetShadowOffset() const;
873
874   /**
875    * @brief Set the shadow color.
876    *
877    * @param[in] shadowColor The shadow color.
878    */
879   void SetShadowColor( const Vector4& shadowColor );
880
881   /**
882    * @brief Retrieve the shadow color.
883    *
884    * @return The shadow color.
885    */
886   const Vector4& GetShadowColor() const;
887
888   /**
889    * @brief Set the shadow blur radius.
890    *
891    * @param[in] shadowBlurRadius The shadow blur radius, 0,0 indicates no blur.
892    */
893   void SetShadowBlurRadius( const float& shadowBlurRadius );
894
895   /**
896    * @brief Retrieve the shadow blur radius.
897    *
898    * @return The shadow blur radius.
899    */
900   const float& GetShadowBlurRadius() const;
901
902   /**
903    * @brief Set the underline color.
904    *
905    * @param[in] color color of underline.
906    */
907   void SetUnderlineColor( const Vector4& color );
908
909   /**
910    * @brief Retrieve the underline color.
911    *
912    * @return The underline color.
913    */
914   const Vector4& GetUnderlineColor() const;
915
916   /**
917    * @brief Set the underline enabled flag.
918    *
919    * @param[in] enabled The underline enabled flag.
920    */
921   void SetUnderlineEnabled( bool enabled );
922
923   /**
924    * @brief Returns whether the text is underlined or not.
925    *
926    * @return The underline state.
927    */
928   bool IsUnderlineEnabled() const;
929
930   /**
931    * @brief Set the override used for underline height, 0 indicates height will be supplied by font metrics
932    *
933    * @param[in] height The height in pixels of the underline
934    */
935   void SetUnderlineHeight( float height );
936
937   /**
938    * @brief Retrieves the override height of an underline, 0 indicates height is supplied by font metrics
939    *
940    * @return The height of the underline, or 0 if height is not overrided.
941    */
942   float GetUnderlineHeight() const;
943
944   /**
945    * @brief Set the outline color.
946    *
947    * @param[in] color color of outline.
948    */
949   void SetOutlineColor( const Vector4& color );
950
951   /**
952    * @brief Retrieve the outline color.
953    *
954    * @return The outline color.
955    */
956   const Vector4& GetOutlineColor() const;
957
958   /**
959    * @brief Set the outline width
960    *
961    * @param[in] width The width in pixels of the outline, 0 indicates no outline
962    */
963   void SetOutlineWidth( uint16_t width );
964
965   /**
966    * @brief Retrieves the width of an outline
967    *
968    * @return The width of the outline.
969    */
970   uint16_t GetOutlineWidth() const;
971
972   /**
973    * @brief Set the background color.
974    *
975    * @param[in] color color of background.
976    */
977   void SetBackgroundColor( const Vector4& color );
978
979   /**
980    * @brief Retrieve the background color.
981    *
982    * @return The background color.
983    */
984   const Vector4& GetBackgroundColor() const;
985
986   /**
987    * @brief Set the background enabled flag.
988    *
989    * @param[in] enabled The background enabled flag.
990    */
991   void SetBackgroundEnabled( bool enabled );
992
993   /**
994    * @brief Returns whether to enable text background or not.
995    *
996    * @return Whether text background is enabled.
997    */
998   bool IsBackgroundEnabled() const;
999
1000   /**
1001    * @brief Sets the emboss's properties string.
1002    *
1003    * @note The string is stored to be recovered.
1004    *
1005    * @param[in] embossProperties The emboss's properties string.
1006    */
1007   void SetDefaultEmbossProperties( const std::string& embossProperties );
1008
1009   /**
1010    * @brief Retrieves the emboss's properties string.
1011    *
1012    * @return The emboss's properties string.
1013    */
1014   const std::string& GetDefaultEmbossProperties() const;
1015
1016   /**
1017    * @brief Sets the outline's properties string.
1018    *
1019    * @note The string is stored to be recovered.
1020    *
1021    * @param[in] outlineProperties The outline's properties string.
1022    */
1023   void SetDefaultOutlineProperties( const std::string& outlineProperties );
1024
1025   /**
1026    * @brief Retrieves the outline's properties string.
1027    *
1028    * @return The outline's properties string.
1029    */
1030   const std::string& GetDefaultOutlineProperties() const;
1031
1032   /**
1033    * @brief Sets the default line spacing.
1034    *
1035    * @param[in] lineSpacing The line spacing.
1036    *
1037    * @return True if lineSpacing has been updated, false otherwise
1038    */
1039   bool SetDefaultLineSpacing( float lineSpacing );
1040
1041   /**
1042    * @brief Retrieves the default line spacing.
1043    *
1044    * @return The line spacing.
1045    */
1046   float GetDefaultLineSpacing() const;
1047
1048   /**
1049    * @brief Sets the input text's color.
1050    *
1051    * @param[in] color The input text's color.
1052    */
1053   void SetInputColor( const Vector4& color );
1054
1055   /**
1056    * @brief Retrieves the input text's color.
1057    *
1058    * @return The input text's color.
1059    */
1060   const Vector4& GetInputColor() const;
1061
1062   /**
1063    * @brief Sets the input text's font family name.
1064    *
1065    * @param[in] fontFamily The text's font family name.
1066    */
1067   void SetInputFontFamily( const std::string& fontFamily );
1068
1069   /**
1070    * @brief Retrieves the input text's font family name.
1071    *
1072    * @return The input text's font family name.
1073    */
1074   const std::string& GetInputFontFamily() const;
1075
1076   /**
1077    * @brief Sets the input font's weight.
1078    *
1079    * @param[in] weight The input font's weight.
1080    */
1081   void SetInputFontWeight( FontWeight weight );
1082
1083   /**
1084    * @return Whether the font's weight has been defined.
1085    */
1086   bool IsInputFontWeightDefined() const;
1087
1088   /**
1089    * @brief Retrieves the input font's weight.
1090    *
1091    * @return The input font's weight.
1092    */
1093   FontWeight GetInputFontWeight() const;
1094
1095   /**
1096    * @brief Sets the input font's width.
1097    *
1098    * @param[in] width The input font's width.
1099    */
1100   void SetInputFontWidth( FontWidth width );
1101
1102   /**
1103    * @return Whether the font's width has been defined.
1104    */
1105   bool IsInputFontWidthDefined() const;
1106
1107   /**
1108    * @brief Retrieves the input font's width.
1109    *
1110    * @return The input font's width.
1111    */
1112   FontWidth GetInputFontWidth() const;
1113
1114   /**
1115    * @brief Sets the input font's slant.
1116    *
1117    * @param[in] slant The input font's slant.
1118    */
1119   void SetInputFontSlant( FontSlant slant );
1120
1121   /**
1122    * @return Whether the font's slant has been defined.
1123    */
1124   bool IsInputFontSlantDefined() const;
1125
1126   /**
1127    * @brief Retrieves the input font's slant.
1128    *
1129    * @return The input font's slant.
1130    */
1131   FontSlant GetInputFontSlant() const;
1132
1133   /**
1134    * @brief Sets the input font's point size.
1135    *
1136    * @param[in] size The input font's point size.
1137    */
1138   void SetInputFontPointSize( float size );
1139
1140   /**
1141    * @brief Retrieves the input font's point size.
1142    *
1143    * @return The input font's point size.
1144    */
1145   float GetInputFontPointSize() const;
1146
1147   /**
1148    * @brief Sets the input line spacing.
1149    *
1150    * @param[in] lineSpacing The line spacing.
1151    */
1152   void SetInputLineSpacing( float lineSpacing );
1153
1154   /**
1155    * @brief Retrieves the input line spacing.
1156    *
1157    * @return The line spacing.
1158    */
1159   float GetInputLineSpacing() const;
1160
1161   /**
1162    * @brief Sets the input shadow's properties string.
1163    *
1164    * @note The string is stored to be recovered.
1165    *
1166    * @param[in] shadowProperties The shadow's properties string.
1167    */
1168   void SetInputShadowProperties( const std::string& shadowProperties );
1169
1170   /**
1171    * @brief Retrieves the input shadow's properties string.
1172    *
1173    * @return The shadow's properties string.
1174    */
1175   const std::string& GetInputShadowProperties() const;
1176
1177   /**
1178    * @brief Sets the input underline's properties string.
1179    *
1180    * @note The string is stored to be recovered.
1181    *
1182    * @param[in] underlineProperties The underline's properties string.
1183    */
1184   void SetInputUnderlineProperties( const std::string& underlineProperties );
1185
1186   /**
1187    * @brief Retrieves the input underline's properties string.
1188    *
1189    * @return The underline's properties string.
1190    */
1191   const std::string& GetInputUnderlineProperties() const;
1192
1193   /**
1194    * @brief Sets the input emboss's properties string.
1195    *
1196    * @note The string is stored to be recovered.
1197    *
1198    * @param[in] embossProperties The emboss's properties string.
1199    */
1200   void SetInputEmbossProperties( const std::string& embossProperties );
1201
1202   /**
1203    * @brief Retrieves the input emboss's properties string.
1204    *
1205    * @return The emboss's properties string.
1206    */
1207   const std::string& GetInputEmbossProperties() const;
1208
1209   /**
1210    * @brief Sets input the outline's properties string.
1211    *
1212    * @note The string is stored to be recovered.
1213    *
1214    * @param[in] outlineProperties The outline's properties string.
1215    */
1216   void SetInputOutlineProperties( const std::string& outlineProperties );
1217
1218   /**
1219    * @brief Retrieves the input outline's properties string.
1220    *
1221    * @return The outline's properties string.
1222    */
1223   const std::string& GetInputOutlineProperties() const;
1224
1225   /**
1226    * @brief Set the control's interface.
1227    *
1228    * @param[in] controlInterface The control's interface.
1229    */
1230   void SetControlInterface( ControlInterface* controlInterface );
1231
1232 public: // Queries & retrieves.
1233
1234   /**
1235    * @brief Return the layout engine.
1236    *
1237    * @return A reference to the layout engine.
1238    */
1239   Layout::Engine& GetLayoutEngine();
1240
1241   /**
1242    * @brief Return a view of the text.
1243    *
1244    * @return A reference to the view.
1245    */
1246   View& GetView();
1247
1248   /**
1249    * @copydoc Control::GetNaturalSize()
1250    */
1251   Vector3 GetNaturalSize();
1252
1253   /**
1254    * @copydoc Control::GetHeightForWidth()
1255    */
1256   float GetHeightForWidth( float width );
1257
1258   /**
1259    * @brief Calculates the point size for text for given layout()
1260    */
1261   void FitPointSizeforLayout( Size layoutSize );
1262
1263   /**
1264    * @brief Checks if the point size fits within the layout size.
1265    *
1266    * @return Whether the point size fits within the layout size.
1267    */
1268   bool CheckForTextFit( float pointSize, Size& layoutSize );
1269
1270   /**
1271    * @brief Retrieves the text's number of lines for a given width.
1272    * @param[in] width The width of the text's area.
1273    * @ return The number of lines.
1274    */
1275   int GetLineCount( float width );
1276
1277   /**
1278    * @brief Retrieves the text's model.
1279    *
1280    * @return A pointer to the text's model.
1281    */
1282   const ModelInterface* const GetTextModel() const;
1283
1284   /**
1285    * @brief Used to get scrolled distance by user input
1286    *
1287    * @return Distance from last scroll offset to new scroll offset
1288    */
1289   float GetScrollAmountByUserInput();
1290
1291   /**
1292    * @brief Get latest scroll amount, control size and layout size
1293    *
1294    * This method is used to get information of control's scroll
1295    * @param[out] scrollPosition The current scrolled position
1296    * @param[out] controlHeight The size of a UI control
1297    * @param[out] layoutHeight The size of a bounding box to layout text within.
1298    *
1299    * @return Whether the text scroll position is changed or not after last update.
1300    */
1301   bool GetTextScrollInfo( float& scrollPosition, float& controlHeight, float& layoutHeight );
1302
1303   /**
1304    * @brief Used to set the hidden input option
1305    */
1306   void SetHiddenInputOption( const Property::Map& options );
1307
1308   /**
1309    * @brief Used to get the hidden input option
1310    */
1311   void GetHiddenInputOption( Property::Map& options );
1312
1313   /**
1314    * @brief Sets the Placeholder Properties.
1315    *
1316    * @param[in] map The placeholder property map
1317    */
1318   void SetPlaceholderProperty( const Property::Map& map );
1319
1320   /**
1321    * @brief Retrieves the Placeholder Property map.
1322    *
1323    * @param[out] map The property map
1324    */
1325   void GetPlaceholderProperty( Property::Map& map );
1326
1327   /**
1328    * @brief Checks text direction.
1329    * @return The text direction.
1330    */
1331   Toolkit::DevelText::TextDirection::Type GetTextDirection();
1332
1333   /**
1334    * @brief Retrieves vertical line alignment
1335    * @return The vertical line alignment
1336    */
1337   Toolkit::DevelText::VerticalLineAlignment::Type GetVerticalLineAlignment() const;
1338
1339   /**
1340    * @brief Sets vertical line alignment
1341    * @param[in] alignment The vertical line alignment for the text
1342    */
1343   void SetVerticalLineAlignment( Toolkit::DevelText::VerticalLineAlignment::Type alignment );
1344
1345   /**
1346    * @brief Retrieves ignoreSpaceAfterText value from model
1347    * @return The value of ignoreSpaceAfterText
1348    */
1349   bool IsIgnoreSpacesAfterText() const;
1350
1351   /**
1352    * @brief Sets ignoreSpaceAfterText value to model
1353    * @param[in] ignore The value of ignoreSpacesAfterText for the text
1354    */
1355   void SetIgnoreSpacesAfterText( bool ignore );
1356
1357   /**
1358    * @brief Retrieves matchSystemLanguageDirection value from model
1359    * @return The value of matchSystemLanguageDirection
1360    */
1361   bool IsMatchSystemLanguageDirection() const;
1362
1363   /**
1364    * @brief Sets matchSystemLanguageDirection value to model
1365    * @param[in] match The value of matchSystemLanguageDirection for the text
1366    */
1367   void SetMatchSystemLanguageDirection( bool match );
1368
1369   /**
1370    * @brief Sets layoutDirection value
1371    * @param[in] layoutDirection The value of system language direction
1372    */
1373   void SetLayoutDirection( Dali::LayoutDirection::Type layoutDirection );
1374
1375   /**
1376    * @brief Retrieves if showing real text or not.
1377    * @return The value of showing real text.
1378    */
1379   bool IsShowingRealText() const;
1380
1381 public: // Relayout.
1382
1383   /**
1384    * @brief Triggers a relayout which updates View (if necessary).
1385    *
1386    * @note UI Controls are expected to minimize calls to this method e.g. call once after size negotiation.
1387    * @param[in] size A the size of a bounding box to layout text within.
1388    * @param[in] layoutDirection The direction of the system language.
1389    *
1390    * @return Whether the text model or decorations were updated.
1391    */
1392   UpdateTextType Relayout( const Size& size, Dali::LayoutDirection::Type layoutDirection = Dali::LayoutDirection::LEFT_TO_RIGHT );
1393
1394   /**
1395    * @brief Request a relayout using the ControlInterface.
1396    */
1397   void RequestRelayout();
1398
1399 public: // Input style change signals.
1400
1401   /**
1402    * @return Whether the queue of input style changed signals is empty.
1403    */
1404   bool IsInputStyleChangedSignalsQueueEmpty();
1405
1406   /**
1407    * @brief Process all pending input style changed signals.
1408    *
1409    * Calls the Text::ControlInterface::InputStyleChanged() method which is overriden by the
1410    * text controls. Text controls may send signals to state the input style has changed.
1411    */
1412   void ProcessInputStyleChangedSignals();
1413
1414 public: // Text-input Event Queuing.
1415
1416   /**
1417    * @brief Called by editable UI controls when keyboard focus is gained.
1418    */
1419   void KeyboardFocusGainEvent();
1420
1421   /**
1422    * @brief Called by editable UI controls when focus is lost.
1423    */
1424   void KeyboardFocusLostEvent();
1425
1426   /**
1427    * @brief Called by editable UI controls when key events are received.
1428    *
1429    * @param[in] event The key event.
1430    * @param[in] type Used to distinguish between regular key events and InputMethodContext events.
1431    */
1432   bool KeyEvent( const Dali::KeyEvent& event );
1433
1434   /**
1435    * @brief Called by editable UI controls when a tap gesture occurs.
1436    * @param[in] tapCount The number of taps.
1437    * @param[in] x The x position relative to the top-left of the parent control.
1438    * @param[in] y The y position relative to the top-left of the parent control.
1439    */
1440   void TapEvent( unsigned int tapCount, float x, float y );
1441
1442   /**
1443    * @brief Called by editable UI controls when a pan gesture occurs.
1444    *
1445    * @param[in] state The state of the gesture.
1446    * @param[in] displacement This distance panned since the last pan gesture.
1447    */
1448   void PanEvent( Gesture::State state, const Vector2& displacement );
1449
1450   /**
1451    * @brief Called by editable UI controls when a long press gesture occurs.
1452    *
1453    * @param[in] state The state of the gesture.
1454    * @param[in] x The x position relative to the top-left of the parent control.
1455    * @param[in] y The y position relative to the top-left of the parent control.
1456    */
1457   void LongPressEvent( Gesture::State state, float x, float y );
1458
1459   /**
1460    * @brief Creates a selection event.
1461    *
1462    * It could be called from the TapEvent (double tap) or when the text selection popup's sellect all button is pressed.
1463    *
1464    * @param[in] x The x position relative to the top-left of the parent control.
1465    * @param[in] y The y position relative to the top-left of the parent control.
1466    * @param[in] selectAll Whether the whole text is selected.
1467    */
1468   void SelectEvent( float x, float y, bool selectAll );
1469
1470   /**
1471    * @brief Event received from input method context
1472    *
1473    * @param[in] inputMethodContext The input method context.
1474    * @param[in] inputMethodContextEvent The event received.
1475    * @return A data struture indicating if update is needed, cursor position and current text.
1476    */
1477   InputMethodContext::CallbackData OnInputMethodContextEvent( InputMethodContext& inputMethodContext, const InputMethodContext::EventData& inputMethodContextEvent );
1478
1479   /**
1480    * @brief Event from Clipboard notifying an Item has been selected for pasting
1481    */
1482   void PasteClipboardItemEvent();
1483
1484   /**
1485    * @brief Return true when text control should clear key input focus when escape key is pressed.
1486    *
1487    * @return Whether text control should clear key input focus or not when escape key is pressed.
1488    */
1489   bool ShouldClearFocusOnEscape() const;
1490
1491 protected: // Inherit from Text::Decorator::ControllerInterface.
1492
1493   /**
1494    * @copydoc Dali::Toolkit::Text::Decorator::ControllerInterface::GetTargetSize()
1495    */
1496   virtual void GetTargetSize( Vector2& targetSize );
1497
1498   /**
1499    * @copydoc Dali::Toolkit::Text::Decorator::ControllerInterface::AddDecoration()
1500    */
1501   virtual void AddDecoration( Actor& actor, bool needsClipping );
1502
1503   /**
1504    * @copydoc Dali::Toolkit::Text::Decorator::ControllerInterface::DecorationEvent()
1505    */
1506   virtual void DecorationEvent( HandleType handle, HandleState state, float x, float y );
1507
1508 protected: // Inherit from TextSelectionPopup::TextPopupButtonCallbackInterface.
1509
1510   /**
1511    * @copydoc Dali::Toolkit::TextSelectionPopup::TextPopupButtonCallbackInterface::TextPopupButtonTouched()
1512    */
1513   virtual void TextPopupButtonTouched( Dali::Toolkit::TextSelectionPopup::Buttons button );
1514
1515 protected: // Inherit from HiddenText.
1516
1517   /**
1518    * @brief Invoked from HiddenText when showing time of the last character was expired
1519    */
1520   virtual void DisplayTimeExpired();
1521
1522 private: // Update.
1523
1524   /**
1525    * @brief Called by editable UI controls when key events are received.
1526    *
1527    * @param[in] text The text to insert.
1528    * @param[in] type Used to distinguish between regular key events and InputMethodContext events.
1529    */
1530   void InsertText( const std::string& text, InsertType type );
1531
1532   /**
1533    * @brief Paste given string into Text model
1534    * @param[in] stringToPaste this string will be inserted into the text model
1535    */
1536   void PasteText( const std::string& stringToPaste );
1537
1538   /**
1539    * @brief Remove a given number of characters
1540    *
1541    * When predictve text is used the pre-edit text is removed and inserted again with the new characters.
1542    * The UpdateInputStyleType @type parameter if set to DONT_UPDATE_INPUT_STYLE avoids to update the input
1543    * style when pre-edit text is removed.
1544    *
1545    * @param[in] cursorOffset Start position from the current cursor position to start deleting characters.
1546    * @param[in] numberOfCharacters The number of characters to delete from the cursorOffset.
1547    * @param[in] type Whether to update the input style.
1548    * @return True if the remove was successful.
1549    */
1550   bool RemoveText( int cursorOffset,
1551                    int numberOfCharacters,
1552                    UpdateInputStyleType type  );
1553
1554   /**
1555    * @brief Checks if text is selected and if so removes it.
1556    * @return true if text was removed
1557    */
1558   bool RemoveSelectedText();
1559
1560 private: // Relayout.
1561
1562   /**
1563    * @brief Lays-out the text.
1564    *
1565    * GetNaturalSize(), GetHeightForWidth() and Relayout() calls this method.
1566    *
1567    * @param[in] size A the size of a bounding box to layout text within.
1568    * @param[in] operations The layout operations which need to be done.
1569    * @param[out] layoutSize The size of the laid-out text.
1570    */
1571   bool DoRelayout( const Size& size,
1572                    OperationsMask operations,
1573                    Size& layoutSize );
1574
1575   /**
1576    * @brief Calulates the vertical offset to align the text inside the bounding box.
1577    *
1578    * @param[in] size The size of the bounding box.
1579    */
1580   void CalculateVerticalOffset( const Size& size );
1581
1582 private: // Events.
1583
1584   /**
1585    * @brief Process queued events which modify the model.
1586    */
1587   void ProcessModifyEvents();
1588
1589   /**
1590    * @brief Used to process an event queued from SetText()
1591    */
1592   void TextReplacedEvent();
1593
1594   /**
1595    * @brief Used to process an event queued from key events etc.
1596    */
1597   void TextInsertedEvent();
1598
1599   /**
1600    * @brief Used to process an event queued from backspace key etc.
1601    */
1602   void TextDeletedEvent();
1603
1604   /**
1605    * @brief Helper to KeyEvent() to handle the backspace or delete key case.
1606    *
1607    * @param[in] keyCode The keycode for the key pressed
1608    * @return True if a character was deleted.
1609    */
1610   bool DeleteEvent( int keyCode );
1611
1612 private: // Helpers.
1613
1614   /**
1615    * @brief Used to remove the text included the placeholder text.
1616    */
1617   void ResetText();
1618
1619   /**
1620    * @brief Helper to show the place holder text..
1621    */
1622   void ShowPlaceholderText();
1623
1624   /**
1625    * @brief Helper to clear font-specific data (only).
1626    */
1627   void ClearFontData();
1628
1629   /**
1630    * @brief Helper to clear text's style data.
1631    */
1632   void ClearStyleData();
1633
1634   /**
1635    * @brief Used to reset the cursor position after setting a new text.
1636    *
1637    * @param[in] cursorIndex Where to place the cursor.
1638    */
1639   void ResetCursorPosition( CharacterIndex cursorIndex );
1640
1641   /**
1642    * @brief Used to reset the scroll position after setting a new text.
1643    */
1644   void ResetScrollPosition();
1645
1646 private: // Private contructors & copy operator.
1647
1648   /**
1649    * @brief Private constructor.
1650    */
1651   Controller();
1652
1653   /**
1654    * @brief Private constructor.
1655    */
1656   Controller( ControlInterface* controlInterface );
1657
1658   /**
1659    * @brief Private constructor.
1660    */
1661   Controller( ControlInterface* controlInterface,
1662               EditableControlInterface* editableControlInterface );
1663
1664   // Undefined
1665   Controller( const Controller& handle );
1666
1667   // Undefined
1668   Controller& operator=( const Controller& handle );
1669
1670 protected: // Destructor.
1671
1672   /**
1673    * @brief A reference counted object may only be deleted by calling Unreference().
1674    */
1675   virtual ~Controller();
1676
1677 public:
1678
1679   struct Impl; ///< Made public for testing purposes
1680
1681 private:
1682
1683   Impl* mImpl;
1684 };
1685
1686 } // namespace Text
1687
1688 } // namespace Toolkit
1689
1690 } // namespace Dali
1691
1692 #endif // DALI_TOOLKIT_TEXT_CONTROLLER_H