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