Tizen 2.1 base
[framework/osp/uifw.git] / inc / FUiCtrlExpandableEditArea.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://floralicense.org/license/
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 /**
19  * @file        FUiCtrlExpandableEditArea.h
20  * @brief       This is the header file for the %ExpandableEditArea class.
21  *
22  * This header file contains the declarations of the %ExpandableEditArea class.
23  */
24
25 #ifndef _FUI_CTRL_EXPANDABLE_EDIT_AREA_H_
26 #define _FUI_CTRL_EXPANDABLE_EDIT_AREA_H_
27
28 #include <FBaseObject.h>
29 #include <FBaseString.h>
30 #include <FBaseTypes.h>
31 #include <FUiControl.h>
32 #include <FUiCtrlEditTypes.h>
33 #include <FUiCtrlITokenFilter.h>
34 #include <FUiIKeypadEventListener.h>
35 #include <FUiILanguageEventListener.h>
36 #include <FUiITextBlockEventListener.h>
37 #include <FUiITextEventListener.h>
38
39 // Forward declaration
40 namespace Tizen { namespace Graphics
41 {
42 class Rectangle;
43 }}      // Tizen::Graphics
44
45 namespace Tizen { namespace Ui { namespace Controls
46 {
47
48 class IExpandableEditAreaEventListener;
49
50 /**
51  * @enum ExpandableEditAreaStyle
52  *
53  * Defines the possible styles of the expandable edit area.
54  *
55  * @since               2.0
56  */
57 enum ExpandableEditAreaStyle
58 {
59         EXPANDABLE_EDIT_AREA_STYLE_NORMAL,  /**< The normal expandable edit area */
60         EXPANDABLE_EDIT_AREA_STYLE_TOKEN    /**< The token expandable edit area */
61 };
62
63
64 /**
65  * @enum ExpandableEditAreaTitleStyle
66  *
67  * Defines the possible styles of the expandable edit area title.
68  *
69  * @since               2.0
70  */
71 enum ExpandableEditAreaTitleStyle
72 {
73         EXPANDABLE_EDIT_AREA_TITLE_STYLE_NONE = 0,      /**< The style with no title */
74         EXPANDABLE_EDIT_AREA_TITLE_STYLE_INNER,         /**< The title appears as a right aligned text inside the edit text field */
75         EXPANDABLE_EDIT_AREA_TITLE_STYLE_TOP            /**< The title appears at the top of the edit text field */
76 };
77
78
79 /**
80  * @enum ExpandableEditAreaTokenStatus
81  *
82  * Defines the possible status of the expandable edit area tokens.
83  *
84  * @since               2.0
85  */
86 enum ExpandableEditAreaTokenStatus
87 {
88         EXPANDABLE_EDIT_AREA_TOKEN_STATUS_NORMAL = 0,   /**< The normal status */
89         EXPANDABLE_EDIT_AREA_TOKEN_STATUS_SELECTED      /**< The selected status */
90 };
91
92
93 /**
94  * @class       ExpandableEditArea
95  * @brief       This class is an implementation of %ExpandableEditArea.
96  *
97  * @since       2.0
98  *
99  * The %ExpandableEditArea class displays a multi-line text editor the height of that is automatically adjusted according to the number of lines currently visible in the text box.
100  *
101  * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_exp_editarea.htm">ExpandableEditArea</a>.
102  *
103  * The following sample code demonstrates how to use the %ExpandableEditArea class.
104  *
105  * @code
106 // Sample code for ExpandableEditAreaSample.h
107 #include <FUi.h>
108
109 class ExpandableEditAreaSample
110         : public Tizen::Ui::Controls::Form
111         , public Tizen::Ui::IKeypadEventListener
112         , public Tizen::Ui::Controls::IExpandableEditAreaEventListener
113 {
114 public:
115         ExpandableEditAreaSample(void)
116         : __pExpandableEdit(null){}
117
118         bool Initialize(void);
119         virtual result OnInitializing(void);
120
121         //IKeypadEventListener
122         virtual void OnKeypadActionPerformed(Tizen::Ui::Control& source, Tizen::Ui::KeypadAction keypadAction);
123         virtual void OnKeypadClosed(Tizen::Ui::Control& source);
124         virtual void OnKeypadOpened(Tizen::Ui::Control& source);
125         virtual void OnKeypadWillOpen(Tizen::Ui::Control& source);
126
127         //IExpandableEditAreaEventListener
128         virtual void OnExpandableEditAreaLineAdded(Tizen::Ui::Controls::ExpandableEditArea& source, int newLineCount);
129         virtual void OnExpandableEditAreaLineRemoved(Tizen::Ui::Controls::ExpandableEditArea& source, int newLineCount);
130
131 private:
132         Tizen::Ui::Controls::ExpandableEditArea* __pExpandableEdit;
133 };
134
135 // Sample code for ExpandableEditAreaSample.cpp
136 #include <FGraphics.h>
137
138 #include "ExpandableEditAreaSample.h"
139
140 using namespace Tizen::Graphics;;
141 using namespace Tizen::Ui;
142 using namespace Tizen::Ui::Controls;
143
144 bool
145 ExpandableEditAreaSample::Initialize(void)
146 {
147         Construct(FORM_STYLE_NORMAL);
148         return true;
149 }
150
151 result
152 ExpandableEditAreaSample::OnInitializing(void)
153 {
154         result r = E_SUCCESS;
155
156         __pExpandableEdit = new ExpandableEditArea();
157         __pExpandableEdit->Construct(Rectangle(25, 100, GetClientAreaBounds().width - 50, 150),
158                         EXPANDABLE_EDIT_AREA_STYLE_NORMAL, EXPANDABLE_EDIT_AREA_TITLE_STYLE_NONE, 5);
159
160         // Adds an instace of IKeypadEventListenerevent and an instance of IExpandableEditAreaEventListener
161         __pExpandableEdit->AddKeypadEventListener(*this);
162         __pExpandableEdit->AddExpandableEditAreaEventListener(*this);
163
164         AddControl(*__pExpandableEdit);
165
166         // Sets a focus to the expandable edit area
167         __pExpandableEdit->SetFocus();
168
169         return r;
170 }
171
172 // IKeypadEventListener implementation
173 void
174 ExpandableEditAreaSample::OnKeypadActionPerformed(Tizen::Ui::Control& source, Tizen::Ui::KeypadAction keypadAction)
175 {
176         // ....
177 }
178
179 void
180 ExpandableEditAreaSample::OnKeypadClosed(Tizen::Ui::Control& source)
181 {
182         // ....
183 }
184
185 void
186 ExpandableEditAreaSample::OnKeypadOpened(Tizen::Ui::Control& source)
187 {
188         // ....
189 }
190
191 void
192 ExpandableEditAreaSample::OnKeypadWillOpen(Tizen::Ui::Control& source)
193 {
194         // ....
195 }
196
197 // IExpandableEditAreaEventListener implementation
198 void
199 ExpandableEditAreaSample::OnExpandableEditAreaLineAdded(Tizen::Ui::Controls::ExpandableEditArea& source, int newLineCount)
200 {
201         // ....
202 }
203
204 void
205 ExpandableEditAreaSample::OnExpandableEditAreaLineRemoved(Tizen::Ui::Controls::ExpandableEditArea& source, int newLineCount)
206 {
207         // ....
208 }
209  * @endcode
210  */
211 class _OSP_EXPORT_ ExpandableEditArea
212         : public Tizen::Ui::Control
213 {
214 public:
215         /**
216          * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor.
217          *
218          * @since       2.0
219          */
220         ExpandableEditArea(void);
221
222         /**
223          * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
224          *
225          * @since       2.0
226          */
227         virtual ~ExpandableEditArea(void);
228
229         /**
230          * Initializes this instance of %ExpandableEditArea with the specified parameters.
231          *
232          * @since        2.0
233          *
234          * @return       An error code
235          * @param[in]    rect             An instance of the Graphics::Rectangle class @n
236          *                                                                              This instance represents the x and y coordinates of the top-left corner of the expandable edit area along with
237          *                                                                              the width and height.
238          * @param[in]    style            The style of the expandable edit area
239          * @param[in]    titleStyle       The title style
240          * @param[in]    maxExpandableLines         The maximum number of lines to which the control can be expanded.
241          * @exception   E_SUCCESS                               The method is successful.
242          * @exception    E_UNSUPPORTED_OPTION   The specified option is not supported. @n
243          *                                                                              The token style %ExpandabledEditArea does not support EXPANDABLE_EDIT_AREA_TITLE_STYLE_TOP.
244          * @exception    E_MAX_EXCEEDED         The number of lines has exceeded the maximum limit.
245          * @exception   E_INVALID_ARG           A specified input parameter is invalid, or @n
246          *                                                                              the specified @c maxLines is either negative or @c 0.
247          * @exception   E_SYSTEM                A system error has occurred.
248          * @remarks      By default, the line count is @c 1.
249          */
250         result Construct(const Tizen::Graphics::Rectangle& rect, ExpandableEditAreaStyle style, ExpandableEditAreaTitleStyle titleStyle, int maxExpandableLines = 10);
251
252 // TEXT MANAGEMENT
253         /**
254          * Appends the specified character at the end of the existing text.
255          *
256          * @since       2.0
257          *
258          * @return      An error code
259          * @param[in]   character       The character to be appended
260          * @exception   E_SUCCESS               The method is successful.
261          * @exception   E_MAX_EXCEEDED  The number of items has exceeded the maximum limit. @n
262          *                              The number of characters has exceeded the maximum limit.
263          * @exception   E_SYSTEM                A system error has occurred.
264          * @remarks             The method modifies the text buffer that is managed by the %ExpandableEditArea control. @n
265          *              To display the changes, the control must be drawn again.
266          */
267         result AppendCharacter(const Tizen::Base::Character& character);
268
269         /**
270          * Appends the specified text at the end of the existing text.
271          *
272          * @since       2.0
273          *
274          * @return      An error code
275          * @param[in]   text            The text to be appended
276          * @exception   E_SUCCESS       The method is successful.
277          * @exception   E_MAX_EXCEEDED  The number of items has exceeded the maximum limit @n
278          *                              The number of characters has exceeded the maximum limit.
279          * @exception   E_SYSTEM        A system error has occurred.
280          * @remarks     The method modifies the text buffer that is managed by the %ExpandableEditArea control. @n
281          *              To display the changes, the control must be drawn again.
282          */
283         result AppendText(const Tizen::Base::String& text);
284
285         /**
286          * Appends the text that will be displayed by bitmap at the end of the existing text.
287          *
288          * @since 2.0
289          *
290          * @return             An error code
291          * @param[in]   text            The text to be appended @n
292          *                                                                  It will be displayed by the @c textImage
293          * @param[in]   textImage The alternate bitmap to be displayed
294          * @exception   E_SUCCESS        The method is successful.
295          * @exception   E_MAX_EXCEEDED  The length of the specified @c text exceeds the maximum length of the text that can be displayed by % ExpanableEditArea.
296          * @exception   E_UNSUPPORTED_OPERATION  The current state of the instance prohibits the execution of the specified operation. @n
297          *                                                                                                              The operation is not supported if the style is EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
298          * @remarks                 The method modifies the text buffer that is managed by the %ExpanableEditArea control. @n
299          *              To display the changes, the control must be drawn again. The text to be appended will be displayed by the @c textImage.
300          */
301         result AppendText(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap& textImage);
302
303         /**
304          * Deletes the character present at the current cursor position.
305          *
306          * @since       2.0
307          *
308          * @return      An error code
309          * @param[in]   index                   The index
310          * @exception   E_SUCCESS               The method is successful.
311          * @exception   E_INVALID_ARG   The specified input parameter is invalid. @n
312          *                                                              The specified @c index is negative.
313          * @exception   E_OUT_OF_RANGE  The specified @c index is outside the bounds of the data structure. @n
314          *                                                              Either the specified @c index is greater than the number of elements or less than @c 0.
315          * @exception   E_SYSTEM                A system error has occurred.
316          * @remarks     The method modifies the text buffer that is managed by the %ExpandableEditArea control. @n
317          *              To display the changes, the control must be drawn again.
318          */
319         result DeleteCharacterAt(int index);
320
321         /**
322          * Inserts a character at the specified index.
323          *
324          * @since       2.0
325          *
326          * @return          An error code
327          * @param[in]   index           The position to insert the character
328          * @param[in]   character           The character to be inserted
329          * @exception   E_SUCCESS        The method is successful.
330          * @exception   E_OUT_OF_RANGE  The specified @c index is outside the bounds of the data structure. @n
331          *                                                              Either the specified @c index is greater than the number of elements or less than @c 0.
332          * @exception   E_MAX_EXCEEDED  The length of the specified @c text exceeds system limitations.
333          * @exception   E_SYSTEM        A system error has occurred.
334          * @remarks     The method modifies the text buffer that is managed by the %ExpandableEditArea control. @n
335          *              To display the changes, the control must be drawn again.
336          */
337         result InsertCharacterAt(int index, const Tizen::Base::Character& character);
338
339         /**
340          * Inserts the text at the specified index.
341          *
342          * @since       2.0
343          *
344          * @return          An error code
345          * @param[in]   index           The position to insert the text
346          * @param[in]   text            The text to be inserted
347          * @exception   E_SUCCESS        The method is successful.
348          * @exception   E_OUT_OF_RANGE  The specified @c index is outside the bounds of the data structure. @n
349          *                                                              Either the specified @c index is greater than the number of elements or less than @c 0.
350          * @exception   E_MAX_EXCEEDED  The length of the specified @c text exceeds system limitations.
351          * @exception   E_SYSTEM            A system error has occurred.
352          */
353         result InsertTextAt(int index, const Tizen::Base::String& text);
354
355         /**
356          * Inserts the text that will be displayed by bitmap at the specified text position.
357          *
358          * @since 2.0
359          *
360          * @return             An error code
361          * @param[in]   position           The position to insert the text
362          * @param[in]   text            The text to be inserted @n
363          *                                                                  It will be displayed by the @c textImage
364          * @param[in]   textImage The alternate bitmap to be displayed
365          * @exception   E_SUCCESS        The method is successful.
366          * @exception   E_OUT_OF_RANGE  The specified @c position is outside the valid range. @n
367          *                                Either the specified @c position is greater than the number of existing text in the % ExpanableEditArea or less than @c 0.
368          * @exception   E_MAX_EXCEEDED  The length of the specified @c text exceeds the maximum length of the text that can be displayed by % ExpanableEditArea.
369          * @exception   E_UNSUPPORTED_OPERATION  The current state of the instance prohibits the execution of the specified operation. @n
370          *                                                                                                              The operation is not supported if the style is EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
371          * @remarks                 The method modifies the text buffer that is managed by the %ExpanableEditArea control. @n
372          *              To display the changes, the control must be drawn again. The text to be inserted will be displayed by the @c textImage.
373          */
374         result InsertTextAt(int position, const Tizen::Base::String& text, const Tizen::Graphics::Bitmap& textImage);
375
376         /**
377          * Gets the portion of the text that is displayed by the %ExpandableEditArea control.
378          *
379          * @since        2.0
380          *
381          * @return       The specified portion of the text, @n
382          *               else an empty string if an error occurs
383          * @param[in]    start           The starting index of the range
384          * @param[in]    end             The last index of the range
385          * @exception    E_SUCCESS       The method is successful.
386          * @exception    E_OUT_OF_RANGE  The specified index is outside the bounds of the data structure. @n
387          *                                                               The specified @c start or @c end is greater than the number of elements or less than @c 0.
388          * @exception    E_SYSTEM        A system error has occurred.
389          * @remarks      The specific error code can be accessed using the GetLastResult() method.
390          * @see          GetText()
391          * @see          SetText()
392          */
393         Tizen::Base::String GetText(int start, int end) const;
394
395         /**
396          * Gets the text of the %ExpandableEditArea control.
397          *
398          * @since        2.0
399          *
400          * @return       The text of the %ExpandableEditArea control, @n
401          *               else an empty string if an error occurs
402          * @exception    E_SUCCESS       The method is successful.
403          * @exception    E_SYSTEM        A system error has occurred.
404          * @remarks      The specific error code can be accessed using the GetLastResult() method.
405          */
406         Tizen::Base::String GetText(void) const;
407
408         /**
409          * Gets the text length.
410          *
411          * @since       2.0
412          *
413          * @return      The length of the text, @n
414          *                  else @c -1 if an error occurs
415          * @exception   E_SUCCESS       The method is successful.
416          * @exception   E_SYSTEM        A system error has occurred.
417          * @remarks     The specific error code can be accessed using the GetLastResult() method.
418          */
419         int GetTextLength(void) const;
420
421         /**
422          * Sets the text to be displayed by the %ExpandableEditArea control.
423          *
424          * @since               2.0
425          *
426          * @param[in]   text            The text to be set
427          * @exception   E_SUCCESS       The method is successful.
428          * @exception   E_INVALID_ARG   The specified input parameter is invalid, @n
429          *                                                              or the length of the specified @c text exceeds system limitations.
430          * @exception   E_SYSTEM        A system error has occurred.
431          * @remarks     To denote the end of a line use '\\n'.
432          *              The method modifies the text buffer that is managed by the %ExpandableEditArea control.
433          *              To display the changes, the control must be drawn again.
434          */
435         result SetText(const Tizen::Base::String& text);
436
437         /**
438          * Clears the text that is displayed by the %ExpandableEditArea control.
439          *
440          * @since               2.0
441          *
442          * @return              An error code
443          * @exception   E_SUCCESS       The method is successful.
444          * @exception   E_SYSTEM        A system error has occurred.
445          * @remarks             The method modifies the text buffer that is managed by the %ExpandableEditArea control.
446          *              To display the changes, the control must be drawn again.
447          */
448         result Clear(void);
449
450         /**
451          * Sets the title of the %ExpandableEditArea control.
452          *
453          * @since               2.0
454          *
455          * @return              An error code
456          * @param[in]   title                   The title to be set
457          * @exception   E_SUCCESS               The method is successful.
458          * @exception   E_SYSTEM                A system error has occurred.
459          */
460         result SetTitleText(const Tizen::Base::String& title);
461
462         /**
463          * Gets the title of the %ExpandableEditArea control.
464          *
465          * @since               2.0
466          *
467          * @return              The title text of the entered string, @n
468          *                          else empty string if an error occurs
469          * @exception   E_SUCCESS       The method is successful.
470          * @exception   E_SYSTEM        A system error has occurred.
471          * @remarks     The specific error code can be accessed using the GetLastResult() method.
472          */
473         Tizen::Base::String GetTitleText(void) const;
474
475 // GUIDE TEXT
476         /**
477          * Gets the guide text.
478          *
479          * @since       2.0
480          *
481          * @return          The guide text, @n
482          *              else an empty string if an error occurs
483          * @exception   E_SUCCESS        The method is successful.
484          * @exception   E_SYSTEM         A system error has occurred.
485          * @remarks     The specific error code can be accessed using the GetLastResult() method.
486          * @see         SetGuideText()
487          */
488         Tizen::Base::String GetGuideText(void) const;
489
490         /**
491          * Sets the guide text to be displayed, when there is no data in the search field.
492          *
493          * @since       2.0
494          *
495          * @return          An error code
496          * @param[in]   guideText                The guide text
497          * @exception   E_SUCCESS        The method is successful.
498          * @exception   E_SYSTEM         A system error has occurred.
499          * @see         GetGuideText()
500          */
501         result SetGuideText(const Tizen::Base::String& guideText);
502
503 // LINE MANAGEMENT
504         /**
505          * Gets the maximum line count supported by the flexible text edit.
506          *
507          * @since       2.0
508          *
509          * @return      The maximum line count, @n
510          *                  else @c -1 if an error occurs
511          * @exception   E_SUCCESS           The method is successful.
512          * @exception   E_SYSTEM            A system error has occurred.
513          * @remarks     The specific error code can be accessed using the GetLastResult() method.
514          */
515         int GetMaxLineCount(void) const;
516
517         /**
518          * Gets the line spacing.
519          *
520          * @since 2.0
521          * @return      The line spacing, @n
522          *                  else @c -1 if an error occurs
523          * @see         SetLineSpacing ()
524          */
525         int GetLineSpacing (void) const;
526
527         /**
528          * Sets the line spacing. @n
529          * The line spacing is determined by multiplying @c multiplier to the default line spacing and adding @c extra.
530          *
531          * @code
532          * The line spacing = (default line spacing) * multiplier + extra
533          * @endcode
534          *
535          * @since 2.0
536          * @return      An error code
537          * @param[in]   multiplier               The line spacing multiplier
538          * @param[in]   extra            The extra line spacing
539          * @exception   E_SUCCESS           The method is successful.
540          * @exception   E_INVALID_ARG       This exception is returned when @c multiplier or @c extra is less than 0.
541          * @see         GetLineSpacing ()
542          */
543         result SetLineSpacing (int multiplier, int extra);
544
545         /**
546          * Gets the current line count.
547          *
548          * @since       2.0
549          *
550          * @return      The line count of the text
551          * @exception   E_SUCCESS           The method is successful.
552          * @exception   E_SYSTEM            A system error has occurred.
553          * @remarks     The specific error code can be accessed using the GetLastResult() method.
554          */
555         int GetTextLineCount(void) const;
556
557 // TEXT SIZE
558         /**
559          * Gets the text size.
560          *
561          * @since       2.0
562          *
563          * @return      The size of the text, @n
564          *                  else @c -1 if an error occurs
565          * @exception   E_SUCCESS           The method is successful.
566          * @exception   E_SYSTEM            A system error has occurred.
567          * @remarks     The specific error code can be accessed using the GetLastResult() method.
568          * @see         SetTextSize()
569          */
570         int GetTextSize(void) const;
571
572         /**
573          * Sets the text size.
574          *
575          * @since       2.0
576          *
577          * @return      An error code
578          * @param[in]   size                The text size
579          * @exception   E_SUCCESS           The method is successful.
580          * @exception   E_INVALID_ARG       The specified @c size is invalid, @n
581          *                                                                      or the specified @c size is a negative integer.
582          * @exception   E_SYSTEM            A system error has occurred.
583          * @see         GetTextSize()
584          */
585         result SetTextSize(int size);
586
587 // MARGINS
588         /**
589          * Gets the margin of the specified margin type.
590          *
591          * @since       2.0
592          *
593          * @return      The margin value of the specified margin type, @n
594          *                  else @c -1 if an error occurs
595          * @param[in]   marginType      The margin type
596          * @exception   E_SUCCESS       The method is successful.
597          * @exception   E_SYSTEM        A system error has occurred.
598          * @remarks     The specific error code can be accessed using the GetLastResult() method.
599          * @see         SetMargin()
600          */
601         int GetMargin(EditMarginType marginType) const;
602
603         /**
604          * Sets the margin for the specified margin type.
605          *
606          * @if OSPCOMPAT
607          * @brief <i> [Compatibility] </i>
608          * @endif
609          * @since       2.0
610          * @if OSPCOMPAT
611          * @compatibility This method has compatibility issues with OSP compatible applications. @n
612          *                         For more information, see @ref CompSetMarginPage "here".
613          * @endif
614          * @return      An error code
615          * @param[in]   marginType          The margin type
616          * @param[in]   margin              The margin to be set
617          * @exception   E_SUCCESS           The method is successful.
618          * @exception   E_INVALID_ARG       A specified input parameter is invalid. @n
619          *                                  The specified @c margin cannot be negative integer.
620          * @exception   E_SYSTEM            A system error has occurred.
621          * @see         GetMargin()
622          */
623         result SetMargin(EditMarginType marginType, int margin);
624         /**
625          * @if OSPCOMPAT
626          * @page                  CompSetMarginPage Compatibility for SetMargin()
627          * @section           CompSetMarginPageIssueSection                 Issues
628          * Implementing this method in OSP compatible applications has the following issues:   @n
629          * -# The SetMargin() method sets the margin value for ExpandableEditArea with only EXPANDABLE_EDIT_AREA_STYLE_NORMAL in API version 2.0. @n
630          *
631          * @section           CompSetMarginPageSolutionSection              Resolutions
632          * This issue has been resolved in Tizen.  @n
633          * @endif
634          */
635
636 // LOWER CASE
637         /**
638          * Enables or disables the lowercase mode.
639          *
640          * @since       2.0
641          *
642          * @return      An error code
643          * @param[in]   enable              Set to @c true to enable the lowercase mode, @n
644          *                                      else @c false
645          * @exception   E_SUCCESS           The method is successful.
646          * @exception   E_SYSTEM            A system error has occurred.
647          * @remarks     When the lowercase mode is enabled, the text input starts with a lowercase character.
648          * @see         IsLowerCaseModeEnabled()
649          */
650         result SetLowerCaseModeEnabled(bool enable);
651
652         /**
653          * Checks whether the lowercase mode is enabled.
654          *
655          * @since       2.0
656          *
657          * @return      @c true if the lowercase mode is enabled, @n
658          *                  else @c false
659          * @exception   E_SUCCESS           The method is successful.
660          * @exception   E_SYSTEM            A system error has occurred.
661          * @remarks     The specific error code can be accessed using the GetLastResult() method.
662          * @see         SetLowerCaseModeEnabled()
663          */
664         bool IsLowerCaseModeEnabled(void) const;
665
666 // CURSOR MANAGEMENT
667         /**
668          * Gets the cursor position.
669          *
670          * @since        2.0
671          *
672          * @return       The current cursor position, @n
673          *                               else @c -1 if an error occurs
674          * @exception    E_SUCCESS          The method is successful.
675          * @exception    E_SYSTEM           A system error has occurred.
676          * @remarks      The specific error code can be accessed using the GetLastResult() method.
677          */
678         int GetCursorPosition(void) const;
679
680         /**
681          * Sets the cursor at the specified position.
682          *
683          * @since        2.0
684          *
685          * @return       An error code
686          * @param[in]    position        The cursor position to be set
687          * @exception    E_SUCCESS       The method is successful.
688          * @exception    E_OUT_OF_RANGE  The specified @c position is less than @c 0 or greater than the maximum length.
689          * @exception    E_SYSTEM        A system error has occurred.
690          */
691         result SetCursorPosition(int position);
692
693 // TEXT BLOCKING
694         /**
695          * Gets the start and end indexes of the currently selected text block.
696          *
697          * @since       2.0
698          *
699          * @return      An error code
700          * @param[out]  start              The start index of the text block
701          * @param[out]  end                The end index of the text block
702          * @exception   E_SUCCESS          The method is successful.
703          * @exception   E_SYSTEM           A system error has occurred.
704          * @remarks     The method returns the start and end indexes as @c 0 if no text block is selected.
705          * @see         ReleaseBlock()
706          * @see         SetBlockRange()
707          */
708         result GetBlockRange(int& start, int& end) const;
709
710         /**
711          * Releases the selection of the current text block.
712          *
713          * @since       2.0
714          *
715          * @return      An error code
716          * @exception   E_SUCCESS          The method is successful.
717          * @exception   E_SYSTEM           A system error has occurred.
718          * @see         GetBlockRange()
719          * @see         SetBlockRange()
720          */
721         result ReleaseBlock(void);
722
723         /**
724          * Removes the text content of the current text block.
725          *
726          * @since        2.0
727          *
728          * @return       An error code
729          * @exception    E_SUCCESS          The method is successful.
730          * @exception    E_OBJ_NOT_FOUND    The specified instance is not found, @n
731          *                                                                      or the text block is not selected.
732          * @exception    E_SYSTEM           A system error has occurred.
733          */
734         result RemoveTextBlock(void);
735
736         /**
737          * Sets the block range for the text.
738          *
739          * @since       2.0
740          *
741          * @return      An error code
742          * @param[in]   start           The start index of the text block
743          * @param[in]   end             The end index of the text block
744          * @exception   E_SUCCESS       The method is successful.
745          * @exception   E_OUT_OF_RANGE  The specified index is outside the bounds of the data structure. @n
746          *                                                              Either the index is greater than the number of elements or less than @c 0.
747          * @exception   E_SYSTEM        A system error has occurred.
748          * @see         ReleaseBlock()
749          * @see         GetBlockRange()
750          */
751         result SetBlockRange(int start, int end);
752
753 // KEYPAD MANAGEMENT
754         /**
755          * Gets the keypad action type.
756          *
757          * @since       2.0
758          *
759          * @return      The keypad action
760          * @exception   E_SUCCESS           The method is successful.
761          * @exception   E_SYSTEM            A system error has occurred.
762          * @remarks     The specific error code can be accessed using the GetLastResult() method.
763          * @see         SetKeypadAction()
764          */
765         Tizen::Ui::KeypadAction GetKeypadAction(void) const;
766
767         /**
768          * Gets the keypad style.
769          *
770          * @since       2.0
771          *
772          * @return      The keypad style
773          * @exception   E_SUCCESS           The method is successful.
774          * @exception   E_SYSTEM            A system error has occurred.
775          * @remarks     The specific error code can be accessed using the GetLastResult() method.
776          * @see         SetKeypadStyle()
777          */
778         KeypadStyle GetKeypadStyle(void) const;
779
780         /**
781          * Hides the keypad associated with the %ExpandableEditArea control.
782          *
783          * @since       2.0
784          *
785          * @return      An error code
786          * @exception   E_SUCCESS           The method is successful.
787          * @exception   E_SYSTEM            A system error has occurred.
788          * @see         ShowKeypad()
789          */
790         result HideKeypad(void);
791
792         /**
793          * Checks whether the keypad is enabled.
794          *
795          * @since       2.0
796          *
797          * @return      @c true if the keypad is enabled, @n
798          *                  else @c false
799          * @exception   E_SUCCESS            The method is successful.
800          * @exception   E_SYSTEM             A system error has occurred.
801          * @remarks     The specific error code can be accessed using the GetLastResult() method.
802          * @see         SetKeypadEnabled()
803          */
804         bool IsKeypadEnabled(void) const;
805
806         /**
807          * Sets the keypad action type.
808          *
809          * @since               2.0
810          *
811          * @return      An error code
812          * @param[in]   keypadAction                    The keypad action
813          * @exception   E_SUCCESS                               The method is successful.
814          * @exception   E_SYSTEM                                A system error has occurred.
815          * @remarks     Depending on the value of @c keypadAction, the enter key label of the keypad will change accordingly.
816          * @see         GetKeypadAction()
817          */
818         result SetKeypadAction(Tizen::Ui::KeypadAction keypadAction);
819
820         /**
821          * Sets the keypad style.
822          *
823          * @since       2.0
824          *
825          * @return      An error code
826          * @param[in]   keypadStyle         The keypad style
827          * @exception   E_SUCCESS           The method is successful.
828          * @exception   E_INVALID_ARG       The specified input parameter is invalid. @n
829          *                                  The specified @c keypadStyle is KEYPAD_STYLE_PASSWORD.
830          * @exception   E_SYSTEM            A system error has occurred.
831          * @remarks     Depending on the value of the keypad style, the layout of the keypad will change accordingly.
832          * @see         GetKeypadStyle()
833          */
834         result SetKeypadStyle(KeypadStyle keypadStyle);
835
836         /**
837          * Checks whether the text prediction is enabled.
838          *
839          * @since 2.0
840          * @return                @c true if the text prediction is enabled, @n
841          *                                 else @c false
842          * @see                      SetTextPredictionEnabled()
843          */
844         bool IsTextPredictionEnabled(void) const;
845
846         /**
847          * Enables or disables the text prediction.
848          *
849          * @since 2.0
850          * @param[in]           enable                       Set to @c true to enable the text prediction, @n
851          *                                                                    else @c false
852          * @return                An error code
853          * @exception           E_SUCCESS                The method is successful.
854          * @exception           E_UNSUPPORTED_OPERATION     This operation is not supported.
855          * @see                    IsTextPredictionEnabled()
856          */
857         result SetTextPredictionEnabled(bool enable);
858
859         /**
860          * Enables or disables the keypad.
861          *
862          * @since       2.0
863          *
864          * @return      An error code
865          * @param[in]   enable                  Set to @c true to enable the virtual keypad, @n
866          *                                                              else @c false
867          * @exception   E_SUCCESS               The method is successful.
868          * @exception   E_SYSTEM                A system error has occurred.
869          * @see         IsKeypadEnabled()
870          */
871         result SetKeypadEnabled(bool enable);
872
873         /**
874          * Shows the keypad.
875          *
876          * @since       2.0
877          *
878          * @return      An error code
879          * @exception   E_SUCCESS           The method is successful.
880          * @exception   E_SYSTEM            A system error has occurred.
881          * @see         HideKeypad()
882          */
883         result ShowKeypad(void);
884
885 // TOKEN FILTER
886         /**
887          * Sets the text token filter.
888          *
889          * @since       2.0
890          *
891          * @return      An error code
892          * @param[in]   pFilter                 The filter
893          * @exception   E_SUCCESS               The method is successful.
894          * @exception   E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
895          *                                                                              The operation is not supported if the style is not EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
896          * @exception   E_SYSTEM                A system error has occurred.
897          * @remarks     The %ExpandableEditArea control checks with the registered filter to decide whether the user-entered text should be replaced.
898          */
899         result SetTokenFilter(const ITokenFilter* pFilter);
900
901         /**
902          * Gets the text token filter.
903          *
904          * @since        2.0
905          *
906          * @return       The filter, @n
907          *                               else @c null if an error occurs
908          * @exception    E_SUCCESS                   The method is successful.
909          * @exception    E_UNSUPPORTED_OPERATION        The current state of the instance prohibits the execution of the specified operation. @n
910          *                                                                                      The operation is not supported if the style is not EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
911          * @exception    E_SYSTEM                    A system error has occurred.
912          * @remarks      The specific error code can be accessed using the GetLastResult() method.
913          */
914         ITokenFilter* GetTokenFilter(void) const;
915
916         /**
917          * Appends the specified token.
918          *
919          * @since        2.0
920          *
921          * @return       An error code
922          * @param[in]    token                   The token to be appended
923          * @exception    E_SUCCESS               The method is successful.
924          * @exception    E_UNSUPPORTED_OPERATION        The current state of the instance prohibits the execution of the specified operation. @n
925          *                                                                                      The operation is not supported if the style is not EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
926          * @exception    E_INVALID_ARG           The specified input parameter is invalid. @n
927          *                                           The length of the specified @c token is @c 0.
928          * @exception    E_SYSTEM                A system error has occurred.
929          */
930         result AppendToken(const Tizen::Base::String& token);
931
932         /**
933          * Inserts the token at the specified index.
934          *
935          * @since        2.0
936          *
937          * @return       An error code
938          * @param[in]    index                                          The position to insert the token
939          * @param[in]    token                      The token to be added
940          * @exception    E_SUCCESS                  The method is successful.
941          * @exception    E_UNSUPPORTED_OPERATION        The current state of the instance prohibits the execution of the specified operation. @n
942          *                                                                                      The operation is not supported if the style is not EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
943          * @exception    E_INVALID_ARG              A specified input parameter is invalid. @n
944          *                                          The length of the specified @c token is @c 0.
945          * @exception    E_SYSTEM                   A system error has occurred.
946          */
947         result InsertTokenAt(int index, const Tizen::Base::String& token);
948
949         /**
950          * Gets the token text at the specified index.
951          *
952          * @since        2.0
953          *
954          * @return       The token text at the specified index, @n
955          *               else an empty string if an error occurs
956          * @param[in]      index                                                          The position to get the token
957          * @exception    E_SUCCESS                  The method is successful.
958          * @exception    E_UNSUPPORTED_OPERATION        The current state of the instance prohibits the execution of the specified operation. @n
959          *                                                                                      The operation is not supported if the style is not EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
960          * @exception    E_OUT_OF_RANGE                         The specified index parameter is outside the bounds of the data structure. @n
961          *                                                                                      Either the index is greater than the number of elements or less than @c 0.
962          * @exception    E_SYSTEM                   A system error has occurred.
963          * @remarks      The specific error code can be accessed using the GetLastResult() method.
964          */
965         Tizen::Base::String GetTokenAt(int index) const;
966
967         /**
968          * Gets the total token count.
969          *
970          * @since        2.0
971          *
972          * @return       The total token count, @n
973          *                   else @c -1 if an error occurs
974          * @exception    E_SUCCESS                  The method is successful.
975          * @exception    E_UNSUPPORTED_OPERATION        The current state of the instance prohibits the execution of the specified operation. @n
976          *                                                                                      The operation is not supported if the style is not EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
977          * @exception    E_SYSTEM                   A system error has occurred.
978          * @remarks      The specific error code can be accessed using the GetLastResult() method.
979          */
980         int GetTokenCount(void) const;
981
982         /**
983          * Gets the index of the token that is selected.
984          *
985          * @since        2.0
986          *
987          * @return       The index of the selected token, @n
988          *                   else @c -1 if no token is selected or if an error occurs
989          * @exception    E_SUCCESS                  The method is successful.
990          * @exception    E_UNSUPPORTED_OPERATION        The current state of the instance prohibits the execution of the specified operation. @n
991          *                                                                                      The operation is not supported if the style is not EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
992          * @exception    E_SYSTEM                   A system error has occurred.
993          * @remarks      The specific error code can be accessed using the GetLastResult() method.
994          */
995         int GetSelectedTokenIndex(void) const;
996
997         /**
998          * Checks whether the token editing mode is enabled.
999          *
1000          * @since        2.0
1001          *
1002          * @return       @c true if the editing mode is enabled, @n
1003          *                   else @c false
1004          * @exception    E_SUCCESS                   The method is successful.
1005          * @exception    E_UNSUPPORTED_OPERATION        The current state of the instance prohibits the execution of the specified operation. @n
1006          *                                                                                      The operation is not supported if the style is not EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1007          * @exception    E_SYSTEM                    A system error has occurred.
1008          * @remarks      The specific error code can be accessed using the GetLastResult() method.
1009          */
1010         bool IsTokenEditModeEnabled(void) const;
1011
1012         /**
1013          * Removes the token at the specified index.
1014          *
1015          * @since        2.0
1016          *
1017          * @return       An error code
1018          * @param[in]    index                   The index of the token to be removed
1019          * @exception    E_SUCCESS               The method is successful.
1020          * @exception    E_UNSUPPORTED_OPERATION        The current state of the instance prohibits the execution of the specified operation. @n
1021          *                                                                                      The operation is not supported if the style is not EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1022          * @exception    E_OUT_OF_RANGE          The specified index is outside the bounds of the data structure. @n
1023          *                                                                                      Either the index is greater than the number of elements or less than @c 0.
1024          * @exception    E_SYSTEM                A system error has occurred.
1025          */
1026         result RemoveTokenAt(int index);
1027
1028         /**
1029          * Sets the selected state of the specified token.
1030          *
1031          * @since        2.0
1032          *
1033          * @return       An error code
1034          * @param[in]    index                   The index of the token to select
1035          * @param[in]    selected                Set to @c true to select the specified token, @n
1036          *                                                                                      else @c false to unselect
1037          * @exception    E_SUCCESS               The method is successful.
1038          * @exception    E_UNSUPPORTED_OPERATION        The current state of the instance prohibits the execution of the specified operation. @n
1039          *                                                                                      The operation is not supported if the style is not EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1040          * @exception    E_OUT_OF_RANGE          The specified index is outside the bounds of the data structure. @n
1041          *                                                                                      Either the index is greater than the number of elements or less than @c 0.
1042          * @exception    E_SYSTEM                A system error has occurred.
1043          * @remarks      The currently selected token gets unselected automatically.
1044          */
1045         result SetTokenSelected(int index, bool selected);
1046
1047         /**
1048          * Enables or disables the token edit mode.
1049          *
1050          * @since        2.0
1051          *
1052          * @return       An error code
1053          * @param[in]    enable                     Set to @c true to enable the token editing mode, @n
1054          *                                                                                      else @c false
1055          * @exception    E_SUCCESS               The method is successful.
1056          * @exception    E_UNSUPPORTED_OPERATION        The current state of the instance prohibits the execution of the specified operation. @n
1057          *                                                                                      The operation is not supported if the style is not EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1058          * @exception    E_SYSTEM                A system error has occurred.
1059          */
1060         result SetTokenEditModeEnabled(bool enable);
1061
1062 // LIMIT LENGTH
1063         /**
1064          * Gets the limit length.
1065          *
1066          * @since               2.0
1067          *
1068          * @return      The limit length, @n
1069          *                  else @c -1 if an error occurs
1070          * @exception   E_SUCCESS                       The method is successful.
1071          * @exception   E_SYSTEM                        A system error has occurred.
1072          * @remarks     The specific error code can be accessed using the GetLastResult() method. @n
1073          *              The default limit length is @c 2048.
1074          * @see         SetLimitLength()
1075          */
1076         int GetLimitLength(void) const;
1077
1078         /**
1079          * Sets the limit length.
1080          *
1081          * @since       2.0
1082          *
1083          * @return      An error code
1084          * @param[in]   limitLength             The limit text length to be set
1085          * @exception   E_SUCCESS               The method is successful.
1086          * @exception   E_INVALID_ARG   The specified input parameter is invalid, @n
1087          *                                                              or the specified limit length is @c 0 or negative.
1088          * @exception   E_SYSTEM                A system error has occurred.
1089          * @remarks             The method modifies the text buffer that is managed by the %ExpandableEditArea control. @n
1090          *              To display the changes, the control must be drawn again.
1091          * @see         GetLimitLength()
1092          */
1093         result SetLimitLength(int limitLength);
1094
1095 // APPEARANCES
1096         /**
1097          * Gets the color of the %ExpandableEditArea control for the specified status.
1098          *
1099          * @since        2.0
1100          *
1101          * @return       The color, @n
1102          *                               else RGBA (0,0,0,0) if an error occurs
1103          * @param[in]    status                         The status
1104          * @exception    E_SUCCESS                      The method is successful.
1105          * @exception    E_SYSTEM                       A system error has occurred.
1106          * @remarks      The specific error code can be accessed using the GetLastResult() method.
1107          */
1108         Tizen::Graphics::Color GetColor(EditStatus status) const;
1109
1110         /**
1111          * Gets the text color of the specified text type.
1112          *
1113          * @since        2.0
1114          *
1115          * @return       The text color, @n
1116          *                               else RGBA (0,0,0,0) if an error occurs
1117          * @param[in]    type                The text type
1118          * @exception    E_SUCCESS                      The method is successful.
1119          * @exception    E_INVALID_ARG          The specified type is not supported, or @n
1120          *                                                                      the specified @c type is EDIT_TEXT_COLOR_LINK.
1121          * @exception    E_SYSTEM                       A system error has occurred.
1122          * @remarks      The specific error code can be accessed using the GetLastResult() method.
1123          * @see          SetTextColor()
1124          */
1125         Tizen::Graphics::Color GetTextColor(EditTextColor type) const;
1126
1127         /**
1128          * Gets the text color of the guide text.
1129          *
1130          * @since       2.0
1131          *
1132          * @return          The guide text color, @n
1133          *                              else RGBA (0,0,0,0) if an error occurs
1134          * @exception   E_SUCCESS                       The method is successful.
1135          * @exception   E_SYSTEM                        A system error has occurred.
1136          * @remarks     The specific error code can be accessed using the GetLastResult() method.
1137          * @see         SetGuideTextColor()
1138          */
1139         Tizen::Graphics::Color GetGuideTextColor(void) const;
1140
1141         /**
1142          * Gets the text color of the title for the specified status.
1143          *
1144          * @since               2.0
1145          *
1146          * @return              The title text color, @n
1147          *                              else RGBA (0,0,0,0) if an error occurs
1148          * @param[in]   status                  The state of the %ExpandableEditArea control
1149          * @exception   E_SUCCESS               The method is successful.
1150          * @exception   E_SYSTEM                A system error has occurred.
1151          * @remarks             The specific error code can be accessed using the GetLastResult() method.
1152          * @see                 SetTitleTextColor()
1153          */
1154         Tizen::Graphics::Color GetTitleTextColor(EditStatus status) const;
1155
1156         /**
1157          * Gets the color of the tokens for the specified status.
1158          *
1159          * @since        2.0
1160          *
1161          * @return       The token color, @n
1162          *                               else RGBA (0,0,0,0) if an error occurs
1163          * @param[in]    status                     The status
1164          * @exception    E_SUCCESS                  The method is successful.
1165          * @exception    E_UNSUPPORTED_OPERATION        The current state of the instance prohibits the execution of the specified operation. @n
1166          *                                                                                      The operation is not supported if the style is not EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1167          * @exception    E_SYSTEM                   A system error has occurred.
1168          * @remarks      The specific error code can be accessed using the GetLastResult() method.
1169          * @see          SetTokenColor
1170          */
1171         Tizen::Graphics::Color GetTokenColor(ExpandableEditAreaTokenStatus status) const;
1172
1173         /**
1174          * Gets the text color of tokens.
1175          *
1176          * @since        2.0
1177          *
1178          * @return       The text color, @n
1179          *                               else RGBA (0,0,0,0) if an error occurs
1180          * @exception    E_SUCCESS                  The method is successful.
1181          * @exception    E_UNSUPPORTED_OPERATION        The current state of the instance prohibits the execution of the specified operation. @n
1182          *                                                                                      The operation is not supported if the style is not EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1183          * @exception    E_SYSTEM                   A system error has occurred.
1184          * @remarks      The specific error code can be accessed using the GetLastResult() method.
1185          * @see          SetTokenTextColor()
1186          */
1187         Tizen::Graphics::Color GetTokenTextColor(void) const;
1188
1189         /**
1190          * Gets the text color of tokens at the specified index.
1191          *
1192          * @since 2.0
1193          *
1194          * @return       The text color, @n
1195          *                              else RGBA (0,0,0,0) if an error occurs
1196          * @exception    E_SUCCESS                                      The method is successful.
1197          * @exception    E_UNSUPPORTED_OPERATION        The current state of the instance prohibits     the execution of the specified operation. @n
1198          *                                                                                      The operation is not supported if the style is not EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1199          * @exception    E_SYSTEM                   A system error has occurred.
1200          * @remarks      The specific error code can be accessed using the GetLastResult() method.
1201          * @see          SetSelectedTokenTextColor()
1202          */
1203         Tizen::Graphics::Color GetSelectedTokenTextColor(void) const;
1204
1205         /**
1206          * Sets the background bitmap of the %ExpandableEditArea control.
1207          *
1208          * @since       2.0
1209          *
1210          * @return      An error code
1211          * @param[in]   status          The status
1212          * @param[in]   bitmap          The background bitmap
1213          * @exception   E_SUCCESS       The method is successful.
1214          * @exception   E_SYSTEM        A system error has occurred.
1215          */
1216         result SetBackgroundBitmap(EditStatus status, const Tizen::Graphics::Bitmap& bitmap);
1217
1218         /**
1219          * Sets the color of the %ExpandableEditArea control.
1220          *
1221          * @since       2.0
1222          *
1223          * @return      An error code
1224          * @param[in]   status          The status of the %ExpandableEditArea control
1225          * @param[in]   color           The color
1226          * @exception   E_SUCCESS       The method is successful.
1227          * @exception   E_SYSTEM        A system error has occurred.
1228          * @see         GetColor()
1229          */
1230         result SetColor(EditStatus status, const Tizen::Graphics::Color& color);
1231
1232         /**
1233          * Sets the text color of the guide text.
1234          *
1235          * @since       2.0
1236          *
1237          * @return          An error code
1238          * @param[in]   color                The guide text color
1239          * @exception   E_SUCCESS        The method is successful.
1240          * @exception   E_SYSTEM         A system error has occurred.
1241          * @see         GetGuideTextColor()
1242          */
1243         result SetGuideTextColor(const Tizen::Graphics::Color& color);
1244
1245         /**
1246          * Sets the text color of the title for the specified status.
1247          *
1248          * @since       2.0
1249          *
1250          * @return          An error code
1251          * @param[in]   status                  The status of the %ExpandableEditArea control
1252          * @param[in]   color                   The title text color
1253          * @exception   E_SUCCESS               The method is successful.
1254          * @exception   E_SYSTEM                A system error has occurred.
1255          * @see         GetTitleTextColor()
1256          */
1257         result SetTitleTextColor(EditStatus status, const Tizen::Graphics::Color& color);
1258
1259         /**
1260          * Sets the text color of the %ExpandableEditArea control.
1261          *
1262          * @since       2.0
1263          *
1264          * @return      An error code
1265          * @param[in]   type             The text type
1266          * @param[in]   color            The text color
1267          * @exception   E_SUCCESS        The method is successful.
1268          * @exception   E_SYSTEM         A system error has occurred.
1269          * @see         GetTextColor()
1270          */
1271         result SetTextColor(EditTextColor type, const Tizen::Graphics::Color& color);
1272
1273         /**
1274          * Sets the text color of the tokens at the specified index.
1275          *
1276          * @since 2.0
1277          *
1278          * @return       An error code
1279          * @param[in]    color                  The token text color
1280          * @exception    E_SUCCESS                  The method is successful.
1281          * @exception    E_UNSUPPORTED_OPERATION        The current state of the instance prohibits     the execution of the specified operation. @n
1282          *                                                                                      The     operation is not supported if the style is not EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1283          * @exception    E_SYSTEM                                       A system error has occurred.
1284          * @see          GetSelectedTokenTextColor()
1285          */
1286         result SetSelectedTokenTextColor(const Tizen::Graphics::Color& color);
1287
1288         /**
1289          * Sets the color of the tokens for the specified status.
1290          *
1291          * @since        2.0
1292          *
1293          * @return       An error code
1294          * @param[in]    status                     The status
1295          * @param[in]    color                      The token color
1296          * @exception    E_SUCCESS                  The method is successful.
1297          * @exception    E_UNSUPPORTED_OPERATION        The current state of the instance prohibits the execution of the specified operation. @n
1298          *                                                                                      The operation is not supported if the style is not EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1299          * @exception    E_SYSTEM                   A system error has occurred.
1300          * @see          GetTokenColor()
1301          */
1302         result SetTokenColor(ExpandableEditAreaTokenStatus status, const Tizen::Graphics::Color& color);
1303
1304         /**
1305          * Sets the text color of the tokens.
1306          *
1307          * @since        2.0
1308          *
1309          * @return       An error code
1310          * @param[in]    color                      The token text color
1311          * @exception    E_SUCCESS                  The method is successful.
1312          * @exception    E_UNSUPPORTED_OPERATION        The current state of the instance prohibits the execution of the specified operation. @n
1313          *                                                                                      The operation is not supported if the style is not EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1314          * @exception    E_SYSTEM                   A system error has occurred.
1315          * @see          GetTokenTextColor()
1316          */
1317         result SetTokenTextColor(const Tizen::Graphics::Color& color);
1318
1319         /**
1320          * @if OSPDEPREC
1321          * Enables or disables the auto resizing if the candidate word list appears.
1322          *
1323          * @brief <i> [Deprecated]  </i>
1324          * @deprecated     This API is deprecated because it is no longer necessary to handle the resizing of expandable edit area.
1325          * @since       2.0
1326          *
1327          * @return      An error code
1328          * @param[in]   enable                  Set to @c true to enable the auto resizing, @n
1329          *                                                                              else @c false
1330          * @exception   E_SUCCESS               The method is successful.
1331          * @exception   E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1332          *                                      The current style of the %ExpandableEditArea does not support the operation.
1333          * @remarks     Note that when this option is enabled, the normal style %ExpandableEditArea is auto resized and the line added and removed events are
1334          *                              generated if the candidate word list pop-up appears during the predictive texting. @n
1335          *              The operation is not supported by the token style %ExpandableEditArea.
1336          * @see         IsAutoResizingEnabled()
1337          * @see         Tizen::Ui::Controls::IExpandableEditAreaEventListener
1338          * @endif
1339          */
1340         result SetAutoResizingEnabled(bool enable);
1341
1342         /**
1343          * @if OSPDEPREC
1344          * Checks whether the auto-resizing is enabled.
1345          *
1346          * @brief <i> [Deprecated]  </i>
1347          * @deprecated     This API is deprecated because it is no longer necessary to handle the resizing of expandable edit area.
1348          * @since       2.0
1349          *
1350          * @return      @c true if the auto-resizing is enabled, @n
1351          *                              else @c false
1352          * @exception   E_SUCCESS               The method is successful.
1353          * @exception   E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1354          *                                                                              The current style of the %ExpandableEditArea control does not support the operation.
1355          * @remarks     The specific error code can be accessed using the GetLastResult() method.
1356          * @see         SetAutoResizingEnabled()
1357          * @endif
1358          */
1359         bool IsAutoResizingEnabled(void) const;
1360
1361         /**
1362          * Sets the input language.
1363          *
1364          * @since 2.0
1365          *
1366          * @return     An error code
1367          * @param[in]  languageCode               The language to set
1368          * @exception  E_SUCCESS              The method is successful.
1369          * @exception  E_OUT_OF_MEMORY                   The memory is insufficient.
1370          * @remarks    The application can set the language of the current keypad that is associated with the current %ExpandableEditArea. @n
1371          *             This method only works if the language to set is supported by the current preloaded keypad.
1372          */
1373         result SetCurrentLanguage(Tizen::Locales::LanguageCode languageCode);
1374
1375         /**
1376          * Gets the current input language.
1377          *
1378          * @since 2.0
1379          *
1380          * @return     An error code
1381          * @param[out] language               The current input language
1382          * @exception     E_SUCCESS                             The method is successful.
1383          * @remarks   The application can get the current language of the keypad that is associated with the current %ExpandableEditArea.
1384          */
1385         result GetCurrentLanguage(Tizen::Locales::LanguageCode& language) const;
1386
1387 // EVENT LISTENER MANAGEMENT
1388         /**
1389          * Adds the specified IExpandableEditAreaEventListener instance. @n
1390          * The added listener can listen to events when a line is added or removed or when a button is pressed.
1391          *
1392          * @since       2.0
1393          *
1394          * @param[in]   listener        The event listener to be added
1395          * @see         RemoveExpandableEditAreaEventListener()
1396          */
1397         void AddExpandableEditAreaEventListener(IExpandableEditAreaEventListener& listener);
1398
1399         /**
1400          * Adds the specified IKeypadEventListener instance. @n
1401          * The added listener is notified if the keypad associated with the edit area is opened or closed.
1402          *
1403          * @since       2.0
1404          *
1405          * @param[in]   listener        The event listener to be added
1406          * @see         RemoveKeypadEventListener()
1407          */
1408         void AddKeypadEventListener(Tizen::Ui::IKeypadEventListener& listener);
1409
1410         /**
1411          * Adds the specified ITextBlockEventListener instance.
1412          *
1413          * @since       2.0
1414          *
1415          * @param[in]   listener                The event listener to be added
1416          * @remarks             Programmatically modifying the text block does not cause the text block selection event to fire.
1417          * @see         RemoveTextBlockEventListener()
1418          */
1419         void AddTextBlockEventListener(Tizen::Ui::ITextBlockEventListener& listener);
1420
1421         /**
1422          * Adds the specified ITextEventListener instance. @n
1423          * The added listener can listen to the text-changed event.
1424          *
1425          * @since       2.0
1426          *
1427          * @param[in]   listener                The listener to be added
1428          * @see         RemoveTextEventListener()
1429          */
1430         void AddTextEventListener(Tizen::Ui::ITextEventListener& listener);
1431
1432         /**
1433          * Removes the specified IExpandableEditAreaEventListener instance. @n
1434          * The removed listener cannot listen to events when they are fired.
1435          *
1436          * @since       2.0
1437          *
1438          * @param[in]   listener                The event listener to be removed
1439          * @see         AddActionEventListener()
1440          */
1441         void RemoveExpandableEditAreaEventListener(IExpandableEditAreaEventListener& listener);
1442
1443         /**
1444          * Removes the specified IKeypadEventListener listener. @n
1445          * The removed listener cannot listen to events when they are fired.
1446          *
1447          * @since       2.0
1448          *
1449          * @param[in]   listener                The event listener to be removed
1450          * @see         AddKeypadEventListener()
1451          */
1452         void RemoveKeypadEventListener(Tizen::Ui::IKeypadEventListener& listener);
1453
1454         /**
1455          * Removes the specified ITextBlockEventListener listener. @n
1456          * The removed listener cannot listen to events when they are fired.
1457          *
1458          * @since       2.0
1459          *
1460          * @param[in]   listener                The event listener to be removed
1461          * @see         AddTextBlockEventListener()
1462          */
1463         void RemoveTextBlockEventListener(Tizen::Ui::ITextBlockEventListener& listener);
1464
1465         /**
1466          * Removes the specified ITextEventListener instance. @n
1467          * The removed listener cannot listen to events when they are fired.
1468          *
1469          * @since       2.0
1470          *
1471          * @param[in]   listener                The listener to be removed
1472          * @see         AddTextEventListener()
1473          */
1474         void RemoveTextEventListener(Tizen::Ui::ITextEventListener& listener);
1475
1476         /**
1477          * Adds a listener instance for language events. @n
1478          * The added listener is notified when the input language is changed.
1479          *
1480          * @since 2.0
1481          *
1482          * @param[in]  listener               The listener to add
1483          * @remarks    The application can recognize when the language is changed from the keypad by adding Tizen::Ui::ILanguageEventListener.
1484          * @see            RemoveLanguageEventListener()
1485          */
1486
1487         void AddLanguageEventListener(Tizen::Ui::ILanguageEventListener& listener);
1488
1489         /**
1490          * Removes the specified listener instance. @n
1491          * The removed listener cannot listen to events when they are fired.
1492          *
1493          * @since 2.0
1494          *
1495          * @param[in]  listener               The listener to remove
1496          * @see             AddLanguageEventListener()
1497          */
1498
1499         void RemoveLanguageEventListener(Tizen::Ui::ILanguageEventListener& listener);
1500
1501         /**
1502          * Enables or disables the auto shrinking if the focus is lost.
1503          *
1504          * @since 2.0
1505          *
1506          * @param[in]   enable                  Set to @c true to enable the auto shrinking, @n
1507          *                                                                              else @c false
1508          * @remarks     Note that when this option is enabled, the %ExpandableEditArea is auto shrinked
1509          *                              if the %ExpandableEditArea lost its focus. @n
1510          * @see         IsAutoShrinkModeEnabled()
1511          */
1512         void SetAutoShrinkModeEnabled(bool enable);
1513
1514         /**
1515          * Checks whether the auto-shrinking is enabled.
1516          *
1517          * @since 2.0
1518          *
1519          * @return      @c true if the auto-shrinking is enabled, @n
1520          *                              else @c false
1521          * @see         SetAutoShrinkModeEnabled()
1522          */
1523         bool IsAutoShrinkModeEnabled(void) const;
1524
1525
1526 protected:
1527         friend class _ExpandableEditAreaImpl;
1528
1529 private:
1530         //
1531         // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
1532         //
1533         ExpandableEditArea(const ExpandableEditArea& rhs);
1534
1535         //
1536         // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
1537         //
1538         ExpandableEditArea& operator =(const ExpandableEditArea& rhs);
1539 };      // ExpandableEditArea
1540
1541 }}} // Tizen::Ui::Controls
1542
1543 #endif      // _FUI_CTRL_EXPANDABLE_EDIT_AREA_H_