APIs for text editor.
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / text-controller-impl.h
1 #ifndef __DALI_TOOLKIT_TEXT_CONTROLLER_IMPL_H__
2 #define __DALI_TOOLKIT_TEXT_CONTROLLER_IMPL_H__
3
4 /*
5  * Copyright (c) 2015 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/clipboard.h>
23 #include <dali/devel-api/text-abstraction/font-client.h>
24
25 // INTERNAL INCLUDES
26 #include <dali-toolkit/internal/text/input-style.h>
27 #include <dali-toolkit/internal/text/layouts/layout-engine.h>
28 #include <dali-toolkit/internal/text/logical-model-impl.h>
29 #include <dali-toolkit/internal/text/text-controller.h>
30 #include <dali-toolkit/internal/text/text-view.h>
31 #include <dali-toolkit/internal/text/visual-model-impl.h>
32
33 namespace Dali
34 {
35
36 namespace Toolkit
37 {
38
39 namespace Text
40 {
41
42 //Forward declarations
43 struct CursorInfo;
44
45 struct Event
46 {
47   // Used to queue input events until DoRelayout()
48   enum Type
49   {
50     CURSOR_KEY_EVENT,
51     TAP_EVENT,
52     PAN_EVENT,
53     LONG_PRESS_EVENT,
54     GRAB_HANDLE_EVENT,
55     LEFT_SELECTION_HANDLE_EVENT,
56     RIGHT_SELECTION_HANDLE_EVENT,
57     SELECT,
58     SELECT_ALL
59   };
60
61   union Param
62   {
63     int mInt;
64     unsigned int mUint;
65     float mFloat;
66   };
67
68   Event( Type eventType )
69   : type( eventType )
70   {
71     p1.mInt = 0;
72     p2.mInt = 0;
73     p3.mInt = 0;
74   }
75
76   Type type;
77   Param p1;
78   Param p2;
79   Param p3;
80 };
81
82 struct EventData
83 {
84   enum State
85   {
86     INACTIVE,
87     INTERRUPTED,
88     SELECTING,
89     EDITING,
90     EDITING_WITH_POPUP,
91     EDITING_WITH_GRAB_HANDLE,
92     EDITING_WITH_PASTE_POPUP,
93     GRAB_HANDLE_PANNING,
94     SELECTION_HANDLE_PANNING
95   };
96
97   EventData( DecoratorPtr decorator );
98
99   ~EventData();
100
101   static bool IsEditingState( State stateToCheck )
102   {
103     return ( stateToCheck == EDITING || stateToCheck == EDITING_WITH_POPUP || stateToCheck == EDITING_WITH_GRAB_HANDLE || stateToCheck == EDITING_WITH_PASTE_POPUP );
104   }
105
106   DecoratorPtr       mDecorator;               ///< Pointer to the decorator.
107   ImfManager         mImfManager;              ///< The Input Method Framework Manager.
108   std::string        mPlaceholderTextActive;   ///< The text to display when the TextField is empty with key-input focus.
109   std::string        mPlaceholderTextInactive; ///< The text to display when the TextField is empty and inactive.
110   Vector4            mPlaceholderTextColor;    ///< The in/active placeholder text color.
111
112   /**
113    * This is used to delay handling events until after the model has been updated.
114    * The number of updates to the model is minimized to improve performance.
115    */
116   std::vector<Event> mEventQueue;              ///< The queue of touch events etc.
117
118   InputStyle         mInputStyle;              ///< The style to be set to the new inputed text.
119
120   /**
121    * 0,0 means that the top-left corner of the layout matches the top-left corner of the UI control.
122    * Typically this will have a negative value with scrolling occurs.
123    */
124   Vector2            mScrollPosition;          ///< The text is offset by this position when scrolling.
125
126   State              mState;                   ///< Selection mode, edit mode etc.
127
128   CharacterIndex     mPrimaryCursorPosition;   ///< Index into logical model for primary cursor.
129   CharacterIndex     mLeftSelectionPosition;   ///< Index into logical model for left selection handle.
130   CharacterIndex     mRightSelectionPosition;  ///< Index into logical model for right selection handle.
131
132   CharacterIndex     mPreEditStartPosition;    ///< Used to remove the pre-edit text if necessary.
133   Length             mPreEditLength;           ///< Used to remove the pre-edit text if necessary.
134
135   bool mIsShowingPlaceholderText        : 1;   ///< True if the place-holder text is being displayed.
136   bool mPreEditFlag                     : 1;   ///< True if the model contains text in pre-edit state.
137   bool mDecoratorUpdated                : 1;   ///< True if the decorator was updated during event processing.
138   bool mCursorBlinkEnabled              : 1;   ///< True if cursor should blink when active.
139   bool mGrabHandleEnabled               : 1;   ///< True if grab handle is enabled.
140   bool mGrabHandlePopupEnabled          : 1;   ///< True if the grab handle popu-up should be shown.
141   bool mSelectionEnabled                : 1;   ///< True if selection handles, highlight etc. are enabled.
142   bool mHorizontalScrollingEnabled      : 1;   ///< True if horizontal scrolling is enabled.
143   bool mVerticalScrollingEnabled        : 1;   ///< True if vertical scrolling is enabled.
144   bool mUpdateCursorPosition            : 1;   ///< True if the visual position of the cursor must be recalculated.
145   bool mUpdateLeftSelectionPosition     : 1;   ///< True if the visual position of the left selection handle must be recalculated.
146   bool mUpdateRightSelectionPosition    : 1;   ///< True if the visual position of the right selection handle must be recalculated.
147   bool mScrollAfterUpdatePosition       : 1;   ///< Whether to scroll after the cursor position is updated.
148   bool mScrollAfterDelete               : 1;   ///< Whether to scroll after delete characters.
149   bool mAllTextSelected                 : 1;   ///< True if the selection handles are selecting all the text.
150   bool mUpdateInputStyle                : 1;   ///< Whether to update the input style after moving the cursor.
151 };
152
153 struct ModifyEvent
154 {
155   enum Type
156   {
157     TEXT_REPLACED,    ///< The entire text was replaced
158     TEXT_INSERTED,    ///< Insert characters at the current cursor position
159     TEXT_DELETED      ///< Characters were deleted
160   };
161
162   Type type;
163 };
164
165 struct FontDefaults
166 {
167   FontDefaults()
168   : mFontDescription(),
169     mFontStyle(),
170     mDefaultPointSize( 0.f ),
171     mFontId( 0u ),
172     familyDefined( false ),
173     weightDefined( false ),
174     widthDefined( false ),
175     slantDefined( false ),
176     sizeDefined( false )
177   {
178     // Initially use the default platform font
179     TextAbstraction::FontClient fontClient = TextAbstraction::FontClient::Get();
180     fontClient.GetDefaultPlatformFontDescription( mFontDescription );
181   }
182
183   FontId GetFontId( TextAbstraction::FontClient& fontClient )
184   {
185     if( !mFontId )
186     {
187       const PointSize26Dot6 pointSize = static_cast<PointSize26Dot6>( mDefaultPointSize * 64.f );
188       mFontId = fontClient.GetFontId( mFontDescription, pointSize );
189     }
190
191     return mFontId;
192   }
193
194   TextAbstraction::FontDescription mFontDescription;  ///< The default font's description.
195   std::string                      mFontStyle;        ///< The font's style string set through the property system.
196   float                            mDefaultPointSize; ///< The default font's point size.
197   FontId                           mFontId;           ///< The font's id of the default font.
198   bool familyDefined:1; ///< Whether the default font's family name is defined.
199   bool weightDefined:1; ///< Whether the default font's weight is defined.
200   bool  widthDefined:1; ///< Whether the default font's width is defined.
201   bool  slantDefined:1; ///< Whether the default font's slant is defined.
202   bool   sizeDefined:1; ///< Whether the default font's point size is defined.
203 };
204
205 /**
206  * @brief Stores indices used to update the text.
207  * Stores the character index where the text is updated and the number of characters removed and added.
208  * Stores as well indices to the first and the last paragraphs to be updated.
209  */
210 struct TextUpdateInfo
211 {
212   TextUpdateInfo()
213   : mCharacterIndex( 0u ),
214     mNumberOfCharactersToRemove( 0u ),
215     mNumberOfCharactersToAdd( 0u ),
216     mPreviousNumberOfCharacters( 0u ),
217     mParagraphCharacterIndex( 0u ),
218     mRequestedNumberOfCharacters( 0u ),
219     mStartGlyphIndex( 0u ),
220     mStartLineIndex( 0u ),
221     mEstimatedNumberOfLines( 0u ),
222     mClearAll( true ),
223     mFullRelayoutNeeded( true ),
224     mIsLastCharacterNewParagraph( false )
225   {}
226
227   ~TextUpdateInfo()
228   {}
229
230   CharacterIndex    mCharacterIndex;                ///< Index to the first character to be updated.
231   Length            mNumberOfCharactersToRemove;    ///< The number of characters to be removed.
232   Length            mNumberOfCharactersToAdd;       ///< The number of characters to be added.
233   Length            mPreviousNumberOfCharacters;    ///< The number of characters before the text update.
234
235   CharacterIndex    mParagraphCharacterIndex;       ///< Index of the first character of the first paragraph to be updated.
236   Length            mRequestedNumberOfCharacters;   ///< The requested number of characters.
237   GlyphIndex        mStartGlyphIndex;
238   LineIndex         mStartLineIndex;
239   Length            mEstimatedNumberOfLines;         ///< The estimated number of lines. Used to avoid reallocations when layouting.
240
241   bool              mClearAll:1;                    ///< Whether the whole text is cleared. i.e. when the text is reset.
242   bool              mFullRelayoutNeeded:1;          ///< Whether a full re-layout is needed. i.e. when a new size is set to the text control.
243   bool              mIsLastCharacterNewParagraph:1; ///< Whether the last character is a new paragraph character.
244
245   void Clear()
246   {
247     // Clear all info except the mPreviousNumberOfCharacters member.
248     mCharacterIndex = static_cast<CharacterIndex>( -1 );
249     mNumberOfCharactersToRemove = 0u;
250     mNumberOfCharactersToAdd = 0u;
251     mParagraphCharacterIndex = 0u;
252     mRequestedNumberOfCharacters = 0u;
253     mStartGlyphIndex = 0u;
254     mStartLineIndex = 0u;
255     mEstimatedNumberOfLines = 0u;
256     mClearAll = false;
257     mFullRelayoutNeeded = false;
258     mIsLastCharacterNewParagraph = false;
259   }
260 };
261
262 struct UnderlineDefaults
263 {
264   std::string properties;
265   // TODO: complete with underline parameters.
266 };
267
268 struct ShadowDefaults
269 {
270   std::string properties;
271   // TODO: complete with shadow parameters.
272 };
273
274 struct EmbossDefaults
275 {
276   std::string properties;
277   // TODO: complete with emboss parameters.
278 };
279
280 struct OutlineDefaults
281 {
282   std::string properties;
283   // TODO: complete with outline parameters.
284 };
285
286 struct Controller::Impl
287 {
288   Impl( ControlInterface& controlInterface )
289   : mControlInterface( controlInterface ),
290     mLogicalModel(),
291     mVisualModel(),
292     mFontDefaults( NULL ),
293     mUnderlineDefaults( NULL ),
294     mShadowDefaults( NULL ),
295     mEmbossDefaults( NULL ),
296     mOutlineDefaults( NULL ),
297     mEventData( NULL ),
298     mFontClient(),
299     mClipboard(),
300     mView(),
301     mMetrics(),
302     mLayoutEngine(),
303     mModifyEvents(),
304     mTextColor( Color::BLACK ),
305     mAlignmentOffset(),
306     mTextUpdateInfo(),
307     mOperationsPending( NO_OPERATION ),
308     mMaximumNumberOfCharacters( 50u ),
309     mRecalculateNaturalSize( true ),
310     mMarkupProcessorEnabled( false ),
311     mClipboardHideEnabled( true ),
312     mAutoScrollEnabled( false ),
313     mAutoScrollDirectionRTL( false )
314   {
315     mLogicalModel = LogicalModel::New();
316     mVisualModel  = VisualModel::New();
317
318     mFontClient = TextAbstraction::FontClient::Get();
319     mClipboard = Clipboard::Get();
320
321     mView.SetVisualModel( mVisualModel );
322
323     // Use this to access FontClient i.e. to get down-scaled Emoji metrics.
324     mMetrics = Metrics::New( mFontClient );
325     mLayoutEngine.SetMetrics( mMetrics );
326
327     // Set the text properties to default
328     mVisualModel->SetUnderlineEnabled( false );
329     mVisualModel->SetUnderlineHeight( 0.0f );
330   }
331
332   ~Impl()
333   {
334     delete mFontDefaults;
335     delete mUnderlineDefaults;
336     delete mShadowDefaults;
337     delete mEmbossDefaults;
338     delete mOutlineDefaults;
339     delete mEventData;
340   }
341
342   /**
343    * @brief Request a relayout using the ControlInterface.
344    */
345   void RequestRelayout();
346
347   /**
348    * @brief Request a relayout using the ControlInterface.
349    */
350   void QueueModifyEvent( ModifyEvent::Type type )
351   {
352     if( ModifyEvent::TEXT_REPLACED == type)
353     {
354       // Cancel previously queued inserts etc.
355       mModifyEvents.Clear();
356     }
357
358     ModifyEvent event;
359     event.type = type;
360     mModifyEvents.PushBack( event );
361
362     // The event will be processed during relayout
363     RequestRelayout();
364   }
365
366   /**
367    * @brief Helper to move the cursor, grab handle etc.
368    */
369   bool ProcessInputEvents();
370
371   /**
372    * @brief Helper to check whether any place-holder text is available.
373    */
374   bool IsPlaceholderAvailable() const
375   {
376     return ( mEventData &&
377              ( !mEventData->mPlaceholderTextInactive.empty() ||
378                !mEventData->mPlaceholderTextActive.empty() )
379            );
380   }
381
382   bool IsShowingPlaceholderText() const
383   {
384     return ( mEventData && mEventData->mIsShowingPlaceholderText );
385   }
386
387   /**
388    * @brief Helper to check whether active place-holder text is available.
389    */
390   bool IsFocusedPlaceholderAvailable() const
391   {
392     return ( mEventData && !mEventData->mPlaceholderTextActive.empty() );
393   }
394
395   bool IsShowingRealText() const
396   {
397     return ( !IsShowingPlaceholderText() &&
398              0u != mLogicalModel->mText.Count() );
399   }
400
401   /**
402    * @brief Called when placeholder-text is hidden
403    */
404   void PlaceholderCleared()
405   {
406     if( mEventData )
407     {
408       mEventData->mIsShowingPlaceholderText = false;
409
410       // Remove mPlaceholderTextColor
411       mVisualModel->SetTextColor( mTextColor );
412     }
413   }
414
415   void ClearPreEditFlag()
416   {
417     if( mEventData )
418     {
419       mEventData->mPreEditFlag = false;
420       mEventData->mPreEditStartPosition = 0;
421       mEventData->mPreEditLength = 0;
422     }
423   }
424
425   void ResetImfManager()
426   {
427     if( mEventData )
428     {
429       // Reset incase we are in a pre-edit state.
430       if( mEventData->mImfManager )
431       {
432         mEventData->mImfManager.Reset(); // Will trigger a message ( commit, get surrounding )
433       }
434
435       ClearPreEditFlag();
436     }
437   }
438
439   bool IsClipboardEmpty()
440   {
441     bool result( mClipboard && mClipboard.NumberOfItems() );
442     return !result; // If NumberOfItems greater than 0, return false
443   }
444
445   /**
446    * @brief Calculates the start character index of the first paragraph to be updated and
447    * the end character index of the last paragraph to be updated.
448    *
449    * @param[out] numberOfCharacters The number of characters to be updated.
450    */
451   void CalculateTextUpdateIndices( Length& numberOfCharacters );
452
453   /**
454    * @brief Helper to clear completely the parts of the model specified by the given @p operations.
455    *
456    * @note It never clears the text stored in utf32.
457    */
458   void ClearFullModelData( OperationsMask operations );
459
460   /**
461    * @brief Helper to clear completely the parts of the model related with the characters specified by the given @p operations.
462    *
463    * @note It never clears the text stored in utf32.
464    *
465    * @param[in] startIndex Index to the first character to be cleared.
466    * @param[in] endIndex Index to the last character to be cleared.
467    * @param[in] operations The operations required.
468    */
469   void ClearCharacterModelData( CharacterIndex startIndex, CharacterIndex endIndex, OperationsMask operations );
470
471   /**
472    * @brief Helper to clear completely the parts of the model related with the glyphs specified by the given @p operations.
473    *
474    * @note It never clears the text stored in utf32.
475    * @note Character indices are transformed to glyph indices.
476    *
477    * @param[in] startIndex Index to the first character to be cleared.
478    * @param[in] endIndex Index to the last character to be cleared.
479    * @param[in] operations The operations required.
480    */
481   void ClearGlyphModelData( CharacterIndex startIndex, CharacterIndex endIndex, OperationsMask operations );
482
483   /**
484    * @brief Helper to clear the parts of the model specified by the given @p operations and from @p startIndex to @p endIndex.
485    *
486    * @note It never clears the text stored in utf32.
487    *
488    * @param[in] startIndex Index to the first character to be cleared.
489    * @param[in] endIndex Index to the last character to be cleared.
490    * @param[in] operations The operations required.
491    */
492   void ClearModelData( CharacterIndex startIndex, CharacterIndex endIndex, OperationsMask operations );
493
494   /**
495    * @brief Updates the logical and visual models. Updates the style runs in the visual model when the text's styles changes.
496    *
497    * When text or style changes the model is set with some operations pending.
498    * When i.e. the text's size or a relayout is required this method is called
499    * with a given @p operationsRequired parameter. The operations required are
500    * matched with the operations pending to perform the minimum number of operations.
501    *
502    * @param[in] operationsRequired The operations required.
503    *
504    * @return @e true if the model has been modified.
505    */
506   bool UpdateModel( OperationsMask operationsRequired );
507
508   /**
509    * @brief Retreieves the default style.
510    *
511    * @param[out] inputStyle The default style.
512    */
513   void RetrieveDefaultInputStyle( InputStyle& inputStyle );
514
515   /**
516    * @brief Retrieve the line height of the default font.
517    */
518   float GetDefaultFontLineHeight();
519
520   void OnCursorKeyEvent( const Event& event );
521
522   void OnTapEvent( const Event& event );
523
524   void OnPanEvent( const Event& event );
525
526   void OnLongPressEvent( const Event& event );
527
528   void OnHandleEvent( const Event& event );
529
530   void OnSelectEvent( const Event& event );
531
532   void OnSelectAllEvent();
533
534   /**
535    * @brief Retrieves the selected text. It removes the text if the @p deleteAfterRetrieval parameter is @e true.
536    *
537    * @param[out] selectedText The selected text encoded in utf8.
538    * @param[in] deleteAfterRetrieval Whether the text should be deleted after retrieval.
539    */
540   void RetrieveSelection( std::string& selectedText, bool deleteAfterRetrieval );
541
542   void ShowClipboard();
543
544   void HideClipboard();
545
546   void SetClipboardHideEnable(bool enable);
547
548   bool CopyStringToClipboard( std::string& source );
549
550   void SendSelectionToClipboard( bool deleteAfterSending );
551
552   void GetTextFromClipboard( unsigned int itemIndex, std::string& retrievedString );
553
554   void RepositionSelectionHandles();
555   void RepositionSelectionHandles( float visualX, float visualY );
556
557   void SetPopupButtons();
558
559   void ChangeState( EventData::State newState );
560
561   /**
562    * @brief Calculates the cursor's position for a given character index in the logical order.
563    *
564    * It retrieves as well the line's height and the cursor's height and
565    * if there is a valid alternative cursor, its position and height.
566    *
567    * @param[in] logical The logical cursor position (in characters). 0 is just before the first character, a value equal to the number of characters is just after the last character.
568    * @param[out] cursorInfo The line's height, the cursor's height, the cursor's position and whether there is an alternative cursor.
569    */
570   void GetCursorPosition( CharacterIndex logical,
571                           CursorInfo& cursorInfo );
572
573   /**
574    * @brief Calculates the new cursor index.
575    *
576    * It takes into account that in some scripts multiple characters can form a glyph and all of them
577    * need to be jumped with one key event.
578    *
579    * @param[in] index The initial new index.
580    *
581    * @return The new cursor index.
582    */
583   CharacterIndex CalculateNewCursorIndex( CharacterIndex index ) const;
584
585   /**
586    * @brief Updates the cursor position.
587    *
588    * Sets the cursor's position into the decorator. It transforms the cursor's position into decorator's coords.
589    * It sets the position of the secondary cursor if it's a valid one.
590    * Sets which cursors are active.
591    *
592    * @param[in] cursorInfo Contains the selection handle position in Actor's coords.
593    *
594    */
595   void UpdateCursorPosition( const CursorInfo& cursorInfo );
596
597   /**
598    * @brief Updates the position of the given selection handle. It transforms the handle's position into decorator's coords.
599    *
600    * @param[in] handleType One of the selection handles.
601    * @param[in] cursorInfo Contains the selection handle position in Actor's coords.
602    */
603   void UpdateSelectionHandle( HandleType handleType,
604                               const CursorInfo& cursorInfo );
605
606   /**
607    * @biref Clamps the horizontal scrolling to get the control always filled with text.
608    *
609    * @param[in] actualSize The size of the laid out text.
610    */
611   void ClampHorizontalScroll( const Vector2& actualSize );
612
613   /**
614    * @biref Clamps the vertical scrolling to get the control always filled with text.
615    *
616    * @param[in] actualSize The size of the laid out text.
617    */
618   void ClampVerticalScroll( const Vector2& actualSize );
619
620   /**
621    * @brief Scrolls the text to make a position visible.
622    *
623    * @pre mEventData must not be NULL. (there is a text-input or selection capabilities).
624    *
625    * @param[in] position A position in text coords.
626    *
627    * This method is called after inserting text, moving the cursor with the grab handle or the keypad,
628    * or moving the selection handles.
629    */
630   void ScrollToMakePositionVisible( const Vector2& position );
631
632   /**
633    * @brief Scrolls the text to make the cursor visible.
634    *
635    * This method is called after deleting text.
636    */
637   void ScrollTextToMatchCursor( const CursorInfo& cursorInfo );
638
639 private:
640   // Declared private and left undefined to avoid copies.
641   Impl( const Impl& );
642   // Declared private and left undefined to avoid copies.
643   Impl& operator=( const Impl& );
644
645 public:
646
647   ControlInterface& mControlInterface;     ///< Reference to the text controller.
648   LogicalModelPtr mLogicalModel;           ///< Pointer to the logical model.
649   VisualModelPtr  mVisualModel;            ///< Pointer to the visual model.
650   FontDefaults* mFontDefaults;             ///< Avoid allocating this when the user does not specify a font.
651   UnderlineDefaults* mUnderlineDefaults;   ///< Avoid allocating this when the user does not specify underline parameters.
652   ShadowDefaults* mShadowDefaults;         ///< Avoid allocating this when the user does not specify shadow parameters.
653   EmbossDefaults* mEmbossDefaults;         ///< Avoid allocating this when the user does not specify emboss parameters.
654   OutlineDefaults* mOutlineDefaults;       ///< Avoid allocating this when the user does not specify outline parameters.
655   EventData* mEventData;                   ///< Avoid allocating everything for text input until EnableTextInput().
656   TextAbstraction::FontClient mFontClient; ///< Handle to the font client.
657   Clipboard mClipboard;                    ///< Handle to the system clipboard
658   View mView;                              ///< The view interface to the rendering back-end.
659   MetricsPtr mMetrics;                     ///< A wrapper around FontClient used to get metrics & potentially down-scaled Emoji metrics.
660   LayoutEngine mLayoutEngine;              ///< The layout engine.
661   Vector<ModifyEvent> mModifyEvents;       ///< Temporary stores the text set until the next relayout.
662   Vector4 mTextColor;                      ///< The regular text color
663   Vector2 mAlignmentOffset;                ///< Vertical and horizontal offset of the whole text inside the control due to alignment.
664   TextUpdateInfo mTextUpdateInfo;          ///< Info of the characters updated.
665   OperationsMask mOperationsPending;       ///< Operations pending to be done to layout the text.
666   Length mMaximumNumberOfCharacters;       ///< Maximum number of characters that can be inserted.
667
668   bool mRecalculateNaturalSize:1;          ///< Whether the natural size needs to be recalculated.
669   bool mMarkupProcessorEnabled:1;          ///< Whether the mark-up procesor is enabled.
670   bool mClipboardHideEnabled:1;            ///< Whether the ClipboardHide function work or not
671   bool mAutoScrollEnabled:1;               ///< Whether auto text scrolling is enabled.
672   CharacterDirection mAutoScrollDirectionRTL:1;  ///< Direction of auto scrolling, true if rtl
673
674 };
675
676 } // namespace Text
677
678 } // namespace Toolkit
679
680 } // namespace Dali
681
682 #endif // __DALI_TOOLKIT_TEXT_CONTROLLER_H__