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 Sets the shadow's properties string.
504 * @note The string is stored to be recovered.
506 * @param[in] shadowProperties The shadow's properties string.
508 void SetDefaultShadowProperties( const std::string& shadowProperties );
511 * @brief Retrieves the shadow's properties string.
513 * @return The shadow's properties string.
515 const std::string& GetDefaultShadowProperties() const;
518 * @brief Set the underline color.
520 * @param[in] color color of underline.
522 void SetUnderlineColor( const Vector4& color );
525 * @brief Retrieve the underline color.
527 * @return The underline color.
529 const Vector4& GetUnderlineColor() const;
532 * @brief Set the underline enabled flag.
534 * @param[in] enabled The underline enabled flag.
536 void SetUnderlineEnabled( bool enabled );
539 * @brief Returns whether the text is underlined or not.
541 * @return The underline state.
543 bool IsUnderlineEnabled() const;
546 * @brief Set the override used for underline height, 0 indicates height will be supplied by font metrics
548 * @param[in] height The height in pixels of the underline
550 void SetUnderlineHeight( float height );
553 * @brief Retrieves the override height of an underline, 0 indicates height is supplied by font metrics
555 * @return The height of the underline, or 0 if height is not overrided.
557 float GetUnderlineHeight() const;
560 * @brief Sets the underline's properties string.
562 * @note The string is stored to be recovered.
564 * @param[in] underlineProperties The underline's properties string.
566 void SetDefaultUnderlineProperties( const std::string& underlineProperties );
569 * @brief Retrieves the underline's properties string.
571 * @return The underline's properties string.
573 const std::string& GetDefaultUnderlineProperties() const;
576 * @brief Sets the emboss's properties string.
578 * @note The string is stored to be recovered.
580 * @param[in] embossProperties The emboss's properties string.
582 void SetDefaultEmbossProperties( const std::string& embossProperties );
585 * @brief Retrieves the emboss's properties string.
587 * @return The emboss's properties string.
589 const std::string& GetDefaultEmbossProperties() const;
592 * @brief Sets the outline's properties string.
594 * @note The string is stored to be recovered.
596 * @param[in] outlineProperties The outline's properties string.
598 void SetDefaultOutlineProperties( const std::string& outlineProperties );
601 * @brief Retrieves the outline's properties string.
603 * @return The outline's properties string.
605 const std::string& GetDefaultOutlineProperties() const;
608 * @brief Sets the default line spacing.
610 * @param[in] lineSpacing The line spacing.
612 void SetDefaultLineSpacing( float lineSpacing );
615 * @brief Retrieves the default line spacing.
617 * @return The line spacing.
619 float GetDefaultLineSpacing() const;
622 * @brief Sets the input text's color.
624 * @param[in] color The input text's color.
626 void SetInputColor( const Vector4& color );
629 * @brief Retrieves the input text's color.
631 * @return The input text's color.
633 const Vector4& GetInputColor() const;
636 * @brief Sets the input text's font family name.
638 * @param[in] fontFamily The text's font family name.
640 void SetInputFontFamily( const std::string& fontFamily );
643 * @brief Retrieves the input text's font family name.
645 * @return The input text's font family name.
647 const std::string& GetInputFontFamily() const;
650 * @brief Sets the input font's weight.
652 * @param[in] weight The input font's weight.
654 void SetInputFontWeight( FontWeight weight );
657 * @return Whether the font's weight has been defined.
659 bool IsInputFontWeightDefined() const;
662 * @brief Retrieves the input font's weight.
664 * @return The input font's weight.
666 FontWeight GetInputFontWeight() const;
669 * @brief Sets the input font's width.
671 * @param[in] width The input font's width.
673 void SetInputFontWidth( FontWidth width );
676 * @return Whether the font's width has been defined.
678 bool IsInputFontWidthDefined() const;
681 * @brief Retrieves the input font's width.
683 * @return The input font's width.
685 FontWidth GetInputFontWidth() const;
688 * @brief Sets the input font's slant.
690 * @param[in] slant The input font's slant.
692 void SetInputFontSlant( FontSlant slant );
695 * @return Whether the font's slant has been defined.
697 bool IsInputFontSlantDefined() const;
700 * @brief Retrieves the input font's slant.
702 * @return The input font's slant.
704 FontSlant GetInputFontSlant() const;
707 * @brief Sets the input font's point size.
709 * @param[in] size The input font's point size.
711 void SetInputFontPointSize( float size );
714 * @brief Retrieves the input font's point size.
716 * @return The input font's point size.
718 float GetInputFontPointSize() const;
721 * @brief Sets the input line spacing.
723 * @param[in] lineSpacing The line spacing.
725 void SetInputLineSpacing( float lineSpacing );
728 * @brief Retrieves the input line spacing.
730 * @return The line spacing.
732 float GetInputLineSpacing() const;
735 * @brief Sets the input shadow's properties string.
737 * @note The string is stored to be recovered.
739 * @param[in] shadowProperties The shadow's properties string.
741 void SetInputShadowProperties( const std::string& shadowProperties );
744 * @brief Retrieves the input shadow's properties string.
746 * @return The shadow's properties string.
748 const std::string& GetInputShadowProperties() const;
751 * @brief Sets the input underline's properties string.
753 * @note The string is stored to be recovered.
755 * @param[in] underlineProperties The underline's properties string.
757 void SetInputUnderlineProperties( const std::string& underlineProperties );
760 * @brief Retrieves the input underline's properties string.
762 * @return The underline's properties string.
764 const std::string& GetInputUnderlineProperties() const;
767 * @brief Sets the input emboss's properties string.
769 * @note The string is stored to be recovered.
771 * @param[in] embossProperties The emboss's properties string.
773 void SetInputEmbossProperties( const std::string& embossProperties );
776 * @brief Retrieves the input emboss's properties string.
778 * @return The emboss's properties string.
780 const std::string& GetInputEmbossProperties() const;
783 * @brief Sets input the outline's properties string.
785 * @note The string is stored to be recovered.
787 * @param[in] outlineProperties The outline's properties string.
789 void SetInputOutlineProperties( const std::string& outlineProperties );
792 * @brief Retrieves the input outline's properties string.
794 * @return The outline's properties string.
796 const std::string& GetInputOutlineProperties() const;
798 public: // Queries & retrieves.
801 * @brief Return the layout engine.
803 * @return A reference to the layout engine.
805 LayoutEngine& GetLayoutEngine();
808 * @brief Return a view of the text.
810 * @return A reference to the view.
815 * @brief Query the current scroll position; the UI control is responsible for moving actors to this position.
817 * @return The scroll position.
819 const Vector2& GetScrollPosition() const;
822 * @copydoc Control::GetNaturalSize()
824 Vector3 GetNaturalSize();
827 * @copydoc Control::GetHeightForWidth()
829 float GetHeightForWidth( float width );
834 * @brief Triggers a relayout which updates View (if necessary).
836 * @note UI Controls are expected to minimize calls to this method e.g. call once after size negotiation.
837 * @param[in] size A the size of a bounding box to layout text within.
839 * @return Whether the text model or decorations were updated.
841 UpdateTextType Relayout( const Size& size );
843 public: // Input style change signals.
846 * @return Whether the queue of input style changed signals is empty.
848 bool IsInputStyleChangedSignalsQueueEmpty();
851 * @brief Process all pending input style changed signals.
853 * Calls the Text::ControlInterface::InputStyleChanged() method which is overriden by the
854 * text controls. Text controls may send signals to state the input style has changed.
856 void ProcessInputStyleChangedSignals();
858 public: // Text-input Event Queuing.
861 * @brief Called by editable UI controls when keyboard focus is gained.
863 void KeyboardFocusGainEvent();
866 * @brief Called by editable UI controls when focus is lost.
868 void KeyboardFocusLostEvent();
871 * @brief Called by editable UI controls when key events are received.
873 * @param[in] event The key event.
874 * @param[in] type Used to distinguish between regular key events and IMF events.
876 bool KeyEvent( const Dali::KeyEvent& event );
879 * @brief Called by editable UI controls when a tap gesture occurs.
880 * @param[in] tapCount The number of taps.
881 * @param[in] x The x position relative to the top-left of the parent control.
882 * @param[in] y The y position relative to the top-left of the parent control.
884 void TapEvent( unsigned int tapCount, float x, float y );
887 * @brief Called by editable UI controls when a pan gesture occurs.
889 * @param[in] state The state of the gesture.
890 * @param[in] displacement This distance panned since the last pan gesture.
892 void PanEvent( Gesture::State state, const Vector2& displacement );
895 * @brief Called by editable UI controls when a long press gesture occurs.
897 * @param[in] state The state of the gesture.
898 * @param[in] x The x position relative to the top-left of the parent control.
899 * @param[in] y The y position relative to the top-left of the parent control.
901 void LongPressEvent( Gesture::State state, float x, float y );
904 * @brief Event received from IMF manager
906 * @param[in] imfManager The IMF manager.
907 * @param[in] imfEvent The event received.
908 * @return A data struture indicating if update is needed, cursor position and current text.
910 ImfManager::ImfCallbackData OnImfEvent( ImfManager& imfManager, const ImfManager::ImfEventData& imfEvent );
913 * @brief Event from Clipboard notifying an Item has been selected for pasting
915 void PasteClipboardItemEvent();
917 protected: // Inherit from Text::Decorator::ControllerInterface.
920 * @copydoc Dali::Toolkit::Text::Decorator::ControllerInterface::GetTargetSize()
922 virtual void GetTargetSize( Vector2& targetSize );
925 * @copydoc Dali::Toolkit::Text::Decorator::ControllerInterface::AddDecoration()
927 virtual void AddDecoration( Actor& actor, bool needsClipping );
930 * @copydoc Dali::Toolkit::Text::Decorator::ControllerInterface::DecorationEvent()
932 virtual void DecorationEvent( HandleType handle, HandleState state, float x, float y );
934 protected: // Inherit from TextSelectionPopup::TextPopupButtonCallbackInterface.
937 * @copydoc Dali::Toolkit::TextSelectionPopup::TextPopupButtonCallbackInterface::TextPopupButtonTouched()
939 virtual void TextPopupButtonTouched( Dali::Toolkit::TextSelectionPopup::Buttons button );
944 * @brief Called by editable UI controls when key events are received.
946 * @param[in] text The text to insert.
947 * @param[in] type Used to distinguish between regular key events and IMF events.
949 void InsertText( const std::string& text, InsertType type );
952 * @brief Paste given string into Text model
953 * @param[in] stringToPaste this string will be inserted into the text model
955 void PasteText( const std::string& stringToPaste );
958 * @brief Remove a given number of characters
960 * When predictve text is used the pre-edit text is removed and inserted again with the new characters.
961 * The UpdateInputStyleType @type parameter if set to DONT_UPDATE_INPUT_STYLE avoids to update the input
962 * style when pre-edit text is removed.
964 * @param[in] cursorOffset Start position from the current cursor position to start deleting characters.
965 * @param[in] numberOfCharacters The number of characters to delete from the cursorOffset.
966 * @param[in] type Whether to update the input style.
967 * @return True if the remove was successful.
969 bool RemoveText( int cursorOffset,
970 int numberOfCharacters,
971 UpdateInputStyleType type );
974 * @brief Checks if text is selected and if so removes it.
975 * @return true if text was removed
977 bool RemoveSelectedText();
979 private: // Relayout.
982 * @brief Lays-out the text.
984 * GetNaturalSize(), GetHeightForWidth() and Relayout() calls this method.
986 * @param[in] size A the size of a bounding box to layout text within.
987 * @param[in] operations The layout operations which need to be done.
988 * @param[out] layoutSize The size of the laid-out text.
990 bool DoRelayout( const Size& size,
991 OperationsMask operations,
995 * @brief Calulates the vertical offset to align the text inside the bounding box.
997 * @param[in] size The size of the bounding box.
999 void CalculateVerticalOffset( const Size& size );
1004 * @brief Process queued events which modify the model.
1006 void ProcessModifyEvents();
1009 * @brief Used to process an event queued from SetText()
1011 void TextReplacedEvent();
1014 * @brief Used to process an event queued from key events etc.
1016 void TextInsertedEvent();
1019 * @brief Used to process an event queued from backspace key etc.
1021 void TextDeletedEvent();
1024 * @brief Creates a selection event.
1026 * It could be called from the TapEvent (double tap) or when the text selection popup's sellect all button is pressed.
1028 * @param[in] x The x position relative to the top-left of the parent control.
1029 * @param[in] y The y position relative to the top-left of the parent control.
1030 * @param[in] selectAll Whether the whole text is selected.
1032 void SelectEvent( float x, float y, bool selectAll );
1035 * @brief Helper to KeyEvent() to handle the backspace case.
1037 * @return True if a character was deleted.
1039 bool BackspaceKeyEvent();
1041 private: // Helpers.
1044 * @brief Used to remove the text included the placeholder text.
1049 * @brief Helper to show the place holder text..
1051 void ShowPlaceholderText();
1054 * @brief Helper to clear font-specific data (only).
1056 void ClearFontData();
1059 * @brief Helper to clear text's style data.
1061 void ClearStyleData();
1064 * @brief Used to reset the cursor position after setting a new text.
1066 * @param[in] cursorIndex Where to place the cursor.
1068 void ResetCursorPosition( CharacterIndex cursorIndex );
1071 * @brief Used to reset the scroll position after setting a new text.
1073 void ResetScrollPosition();
1075 private: // Private contructors & copy operator.
1078 * @brief Private constructor.
1083 * @brief Private constructor.
1085 Controller( ControlInterface* controlInterface );
1088 * @brief Private constructor.
1090 Controller( ControlInterface* controlInterface,
1091 EditableControlInterface* editableControlInterface );
1094 Controller( const Controller& handle );
1097 Controller& operator=( const Controller& handle );
1099 protected: // Destructor.
1102 * @brief A reference counted object may only be deleted by calling Unreference().
1104 virtual ~Controller();
1114 } // namespace Toolkit
1118 #endif // DALI_TOOLKIT_TEXT_CONTROLLER_H