Merge "Fix Ime Rotation" into tizen_2.1
[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_UNSUPPORTED_OPERATION The current state of the instance prohibits the @n
483          *                                                                              execution of the specified operation. This operation @n
484          *                                                                              is not supported if the title is not set.
485          * @exception   E_SYSTEM                A system error has occurred.
486          */
487         result SetTitleText(const Tizen::Base::String& title);
488
489         /**
490          * Gets the title of the %ExpandableEditArea control.
491          *
492          * @since               2.0
493          *
494          * @return              The title text of the entered string, @n
495          *                          else empty string if an error occurs
496          * @exception   E_SUCCESS       The method is successful.
497          * @exception   E_SYSTEM        A system error has occurred.
498          * @remarks     The specific error code can be accessed using the GetLastResult() method.
499          */
500         Tizen::Base::String GetTitleText(void) const;
501
502 // GUIDE TEXT
503         /**
504          * Gets the guide text.
505          *
506          * @since       2.0
507          *
508          * @return          The guide text, @n
509          *              else an empty string if an error occurs
510          * @exception   E_SUCCESS        The method is successful.
511          * @exception   E_SYSTEM         A system error has occurred.
512          * @remarks     The specific error code can be accessed using the GetLastResult() method.
513          * @see         SetGuideText()
514          */
515         Tizen::Base::String GetGuideText(void) const;
516
517         /**
518         * Sets the guide text to be displayed, when there is no data in the search field.
519         *
520         * @since       2.0
521         *
522         * @return           An error code
523         * @param[in]   guideText                 The guide text
524         * @exception   E_SUCCESS        The method is successful.
525         * @exception   E_SYSTEM         A system error has occurred.
526         * @see         GetGuideText()
527         */
528         result SetGuideText(const Tizen::Base::String& guideText);
529
530 // LINE MANAGEMENT
531         /**
532          * Gets the maximum line count supported by the flexible text edit.
533          *
534          * @since       2.0
535          *
536          * @return      The maximum line count, @n
537          *                  else @c -1 if an error occurs
538          * @exception   E_SUCCESS           The method is successful.
539          * @exception   E_SYSTEM            A system error has occurred.
540          * @remarks     The specific error code can be accessed using the GetLastResult() method.
541          */
542         int GetMaxLineCount(void) const;
543
544         /**
545          * Gets the line spacing.
546          *
547          * @since 2.0
548          * @return      The line spacing, @n
549          *                  else @c -1 if an error occurs
550          * @see         SetLineSpacing ()
551          */
552         int GetLineSpacing(void) const;
553
554         /**
555          * Gets the line spacing.
556          *
557          * @since 2.1
558          * @return      The line spacing, @n
559          *                  else @c -1.0f if an error occurs
560          * @see         SetLineSpacing ()
561          */
562
563         float GetLineSpacingF(void) const;
564
565         /**
566          * Sets the line spacing. @n
567          * The line spacing is determined by multiplying @c multiplier to the default line spacing and adding @c extra.
568          *
569          * @code
570          * The line spacing = (default line spacing) * multiplier + extra
571          * @endcode
572          *
573          * @since 2.0
574          * @return      An error code
575          * @param[in]   multiplier               The line spacing multiplier
576          * @param[in]   extra            The extra line spacing
577          * @exception   E_SUCCESS           The method is successful.
578          * @exception   E_INVALID_ARG       This exception is returned when @c multiplier or @c extra is less than 0.
579          * @see         GetLineSpacing ()
580          */
581         result SetLineSpacing(int multiplier, int extra);
582
583         /**
584          * Sets the line spacing. @n
585          * The line spacing is determined by multiplying @c multiplier to the default line spacing and adding @c extra.
586          *
587          * @code
588          * The line spacing = (default line spacing) * multiplier + extra
589          * @endcode
590          *
591          * @since 2.1
592          * @return      An error code
593          * @param[in]   multiplier               The line spacing multiplier
594          * @param[in]   extra            The extra line spacing
595          * @exception   E_SUCCESS           The method is successful.
596          * @exception   E_INVALID_ARG       This exception is returned when @c multiplier or @c extra is less than 0.
597          * @see         GetLineSpacing ()
598          */
599         result SetLineSpacing(int multiplier, float extra);
600
601         /**
602         * Gets the current line count.
603         *
604         * @since       2.0
605         *
606         * @return      The line count of the text
607         * @exception   E_SUCCESS           The method is successful.
608         * @exception   E_SYSTEM            A system error has occurred.
609         * @remarks     The specific error code can be accessed using the GetLastResult() method.
610         */
611         int GetTextLineCount(void) const;
612
613 // TEXT SIZE
614         /**
615          * Gets the text size.
616          *
617          * @since       2.0
618          *
619          * @return      The size of the text, @n
620          *                  else @c -1 if an error occurs
621          * @exception   E_SUCCESS           The method is successful.
622          * @exception   E_SYSTEM            A system error has occurred.
623          * @remarks     The specific error code can be accessed using the GetLastResult() method.
624          * @see         SetTextSize()
625          */
626         int GetTextSize(void) const;
627
628         /**
629          * Gets the text size.
630          *
631          * @since       2.1
632          *
633          * @return      The size of the text, @n
634          *                  else @c -1 if an error occurs
635          * @exception   E_SUCCESS           The method is successful.
636          * @exception   E_SYSTEM            A system error has occurred.
637          * @remarks     The specific error code can be accessed using the GetLastResult() method.
638          * @see         SetTextSize()
639          */
640         float GetTextSizeF(void) const;
641
642         /**
643         * Sets the text size.
644         *
645         * @since       2.0
646         *
647         * @return      An error code
648         * @param[in]   size                The text size
649         * @exception   E_SUCCESS           The method is successful.
650         * @exception   E_INVALID_ARG       The specified @c size is invalid, @n
651         *                                                                       or the specified @c size is a negative integer.
652         * @exception   E_SYSTEM            A system error has occurred.
653         * @see         GetTextSize()
654         */
655         result SetTextSize(int size);
656
657         /**
658         * Sets the text size.
659         *
660         * @since       2.1
661         *
662         * @return      An error code
663         * @param[in]   size                The text size
664         * @exception   E_SUCCESS           The method is successful.
665         * @exception   E_INVALID_ARG       The specified @c size is invalid, @n
666         *                                                                       or the specified @c size is a negative integer.
667         * @exception   E_SYSTEM            A system error has occurred.
668         * @see         GetTextSizeF()
669         */
670         result SetTextSize(float size);
671
672 // MARGINS
673         /**
674          * Gets the margin of the specified margin type.
675          *
676          * @since       2.0
677          *
678          * @return      The margin value of the specified margin type, @n
679          *                  else @c -1 if an error occurs
680          * @param[in]   marginType      The margin type
681          * @exception   E_SUCCESS       The method is successful.
682          * @exception   E_SYSTEM        A system error has occurred.
683          * @remarks     The specific error code can be accessed using the GetLastResult() method.
684          * @see         SetMargin()
685          */
686         int GetMargin(EditMarginType marginType) const;
687
688         /**
689          * Gets the margin of the specified margin type.
690          *
691          * @since       2.1
692          *
693          * @return      The margin value of the specified margin type, @n
694          *                  else @c -1.0f if an error occurs
695          * @param[in]   marginType      The margin type
696          * @exception   E_SUCCESS       The method is successful.
697          * @exception   E_SYSTEM        A system error has occurred.
698          * @remarks     The specific error code can be accessed using the GetLastResult() method.
699          * @see         SetMargin()
700          */
701         float GetMarginF(EditMarginType marginType) const;
702
703         /**
704          * Sets the margin for the specified margin type.
705          *
706          * @if OSPCOMPAT
707          * @brief <i> [Compatibility] </i>
708          * @endif
709          * @since       2.0
710          * @if OSPCOMPAT
711          * @compatibility This method has compatibility issues with OSP compatible applications. @n
712          *                         For more information, see @ref CompSetMarginPage "here".
713          * @endif
714          * @return      An error code
715          * @param[in]   marginType          The margin type
716          * @param[in]   margin              The margin to set
717          * @exception   E_SUCCESS           The method is successful.
718          * @exception   E_INVALID_ARG       A specified input parameter is invalid. @n
719          *                                  The specified @c margin cannot be negative integer.
720          * @exception   E_SYSTEM            A system error has occurred.
721          * @see         GetMargin()
722          */
723         result SetMargin(EditMarginType marginType, int margin);
724         /**
725          * @if OSPCOMPAT
726          * @page                  CompSetMarginPage Compatibility for SetMargin()
727          * @section           CompSetMarginPageIssueSection                 Issues
728          * Implementing this method in OSP compatible applications has the following issues:   @n
729          * -# The SetMargin() method sets the margin value for ExpandableEditArea with only @c EXPANDABLE_EDIT_AREA_STYLE_NORMAL in API version 2.0. @n
730          *
731          * @section           CompSetMarginPageSolutionSection              Resolutions
732          * This issue has been resolved in Tizen.  @n
733          * @endif 
734          */
735
736         /*
737          * Sets the margin for the specified margin type.
738          *
739          * @if OSPCOMPAT
740          * @brief <i> [Compatibility] </i>
741          * @endif
742          * @since       2.1
743          * @if OSPCOMPAT
744          * @compatibility This method has compatibility issues with OSP compatible applications. @n
745          *                         For more information, see @ref CompSetMarginPage "here".
746          * @endif
747          * @return      An error code
748          * @param[in]   marginType          The margin type
749          * @param[in]   margin              The margin to set
750          * @exception   E_SUCCESS           The method is successful.
751          * @exception   E_INVALID_ARG       A specified input parameter is invalid. @n
752          *                                  The specified @c margin cannot be negative integer.
753          * @exception   E_SYSTEM            A system error has occurred.
754          * @see         GetMargin()
755          */
756         result SetMargin(EditMarginType marginType, float margin);
757         /*
758          * @if OSPCOMPAT
759          * @page                  CompSetMarginPage Compatibility for SetMargin()
760          * @section           CompSetMarginPageIssueSection                 Issues
761          * Implementing this method in OSP compatible applications has the following issues:   @n
762          * -# The SetMargin() method sets the margin value for ExpandableEditArea with only @c EXPANDABLE_EDIT_AREA_STYLE_NORMAL in API version 2.0. @n
763          *
764          * @section           CompSetMarginPageSolutionSection              Resolutions
765          * This issue has been resolved in Tizen.  @n
766          * @endif
767          */
768
769 // LOWER CASE
770         /**
771          * Enables or disables the lowercase mode.
772
773          * @since       2.0
774          *
775          * @return      An error code
776          * @param[in]   enable              Set to @c true to enable the lowercase mode, @n
777          *                                      else @c false
778          * @exception   E_SUCCESS           The method is successful.
779          * @exception   E_SYSTEM            A system error has occurred.
780          * @remarks     When the lowercase mode is enabled, the text input starts with a lowercase character.
781          * @see         IsLowerCaseModeEnabled()
782          */
783         result SetLowerCaseModeEnabled(bool enable);
784
785         /**
786          * Checks whether the lowercase mode is enabled.
787          *
788          * @since       2.0
789          *
790          * @return      @c true if the lowercase mode is enabled, @n
791          *                  else @c false
792          * @exception   E_SUCCESS           The method is successful.
793          * @exception   E_SYSTEM            A system error has occurred.
794          * @remarks     The specific error code can be accessed using the GetLastResult() method.
795          * @see         SetLowerCaseModeEnabled()
796          */
797         bool IsLowerCaseModeEnabled(void) const;
798
799 // CURSOR MANAGEMENT
800         /**
801          * Gets the cursor position.
802          *
803          * @since        2.0
804          *
805          * @return       The current cursor position, @n
806          *                               else @c -1 if an error occurs
807          * @exception    E_SUCCESS          The method is successful.
808          * @exception    E_SYSTEM           A system error has occurred.
809          * @remarks      The specific error code can be accessed using the GetLastResult() method.
810          */
811         int GetCursorPosition(void) const;
812
813         /**
814          * Sets the cursor at the specified position.
815          *
816          * @since        2.0
817          *
818          * @return       An error code
819          * @param[in]    position        The cursor position to set
820          * @exception    E_SUCCESS       The method is successful.
821          * @exception    E_OUT_OF_RANGE  The specified @c position is less than @c 0 or greater than the maximum length.
822          * @exception    E_SYSTEM        A system error has occurred.
823          */
824         result SetCursorPosition(int position);
825
826 // TEXT BLOCKING
827         /**
828          * Gets the start and end indexes of the currently selected text block.
829          *
830          * @since       2.0
831          *
832          * @return      An error code
833          * @param[out]  start              The start index of the text block
834          * @param[out]  end                The end index of the text block
835          * @exception   E_SUCCESS          The method is successful.
836          * @exception   E_SYSTEM           A system error has occurred.
837          * @remarks     The method returns the start and end indexes as @c 0 if no text block is selected.
838          * @see         ReleaseBlock()
839          * @see         SetBlockRange()
840          */
841         result GetBlockRange(int& start, int& end) const;
842
843         /**
844         * Releases the selection of the current text block.
845         *
846         * @since       2.0
847         *
848         * @return      An error code
849         * @exception   E_SUCCESS          The method is successful.
850         * @exception   E_SYSTEM           A system error has occurred.
851         * @see         GetBlockRange()
852         * @see         SetBlockRange()
853         */
854         result ReleaseBlock(void);
855
856         /**
857         * Removes the text content of the current text block.
858         *
859         * @since        2.0
860         *
861         * @return       An error code
862         * @exception    E_SUCCESS          The method is successful.
863         * @exception    E_OBJ_NOT_FOUND    The specified instance is not found, @n
864         *                                                                       or the text block is not selected.
865         * @exception    E_SYSTEM           A system error has occurred.
866         */
867         result RemoveTextBlock(void);
868
869         /**
870         * Sets the block range for the text.
871         *
872         * @since       2.0
873         *
874         * @return      An error code
875         * @param[in]   start           The start index of the text block
876         * @param[in]   end             The end index of the text block
877         * @exception   E_SUCCESS       The method is successful.
878         * @exception   E_OUT_OF_RANGE  The specified index is outside the bounds of the data structure. @n
879         *                                                               Either the index is greater than the number of elements or less than @c 0.
880         * @exception   E_SYSTEM        A system error has occurred.
881         * @see         ReleaseBlock()
882         * @see         GetBlockRange()
883         */
884         result SetBlockRange(int start, int end);
885
886 // KEYPAD MANAGEMENT
887         /**
888          * Gets the keypad action type.
889          *
890          * @since       2.0
891          *
892          * @return      The keypad action
893          * @exception   E_SUCCESS           The method is successful.
894          * @exception   E_SYSTEM            A system error has occurred.
895          * @remarks     The specific error code can be accessed using the GetLastResult() method.
896          * @see         SetKeypadAction()
897          */
898         Tizen::Ui::KeypadAction GetKeypadAction(void) const;
899
900         /**
901         * Gets the keypad style.
902         *
903         * @since       2.0
904         *
905         * @return      The keypad style
906         * @exception   E_SUCCESS           The method is successful.
907         * @exception   E_SYSTEM            A system error has occurred.
908         * @remarks     The specific error code can be accessed using the GetLastResult() method.
909         * @see         SetKeypadStyle()
910         */
911         KeypadStyle GetKeypadStyle(void) const;
912
913         /**
914         * Hides the keypad associated with the %ExpandableEditArea control.
915         *
916         * @since       2.0
917         *
918         * @return      An error code
919         * @exception   E_SUCCESS           The method is successful.
920         * @exception   E_SYSTEM            A system error has occurred.
921         * @see         ShowKeypad()
922         */
923         result HideKeypad(void);
924
925         /**
926         * Checks whether the keypad is enabled.
927         *
928         * @since       2.0
929         *
930         * @return      @c true if the keypad is enabled, @n
931         *                   else @c false
932         * @exception   E_SUCCESS            The method is successful.
933         * @exception   E_SYSTEM             A system error has occurred.
934         * @remarks     The specific error code can be accessed using the GetLastResult() method.
935         * @see         SetKeypadEnabled()
936         */
937         bool IsKeypadEnabled(void) const;
938
939         /**
940          * Sets the keypad action type.
941          *
942          * @since               2.0
943          *
944          * @return      An error code
945          * @param[in]   keypadAction                    The keypad action
946          * @exception   E_SUCCESS                               The method is successful.
947          * @exception   E_SYSTEM                                A system error has occurred.
948          * @remarks     Depending on the value of @c keypadAction, the enter key label of the keypad will change accordingly.
949          * @see         GetKeypadAction()
950          */
951         result SetKeypadAction(Tizen::Ui::KeypadAction keypadAction);
952
953         /**
954         * Sets the keypad style.
955         *
956         * @since       2.0
957         *
958         * @return      An error code
959         * @param[in]   keypadStyle         The keypad style
960         * @exception   E_SUCCESS           The method is successful.
961         * @exception   E_INVALID_ARG       The specified input parameter is invalid. @n
962         *                                  The specified @c keypadStyle is @c KEYPAD_STYLE_PASSWORD.
963         * @exception   E_SYSTEM            A system error has occurred.
964         * @remarks     Depending on the value of the keypad style, the layout of the keypad will change accordingly.
965         * @see         GetKeypadStyle()
966         */
967         result SetKeypadStyle(KeypadStyle keypadStyle);
968
969         /**
970         * Checks whether the text prediction is enabled.
971         *
972         * @since 2.0
973         * @return                @c true if the text prediction is enabled, @n
974         *                                 else @c false
975         * @see                      SetTextPredictionEnabled()
976         */
977         bool IsTextPredictionEnabled(void) const;
978
979         /**
980         * Enables or disables the text prediction.
981         *
982         * @since 2.0
983         * @param[in]           enable                       Set to @c true to enable the text prediction, @n
984         *                                                                    else @c false
985         * @return                An error code
986         * @exception           E_SUCCESS                The method is successful.
987         * @exception            E_UNSUPPORTED_OPERATION     This operation is not supported.
988         * @see                    IsTextPredictionEnabled()
989         */
990         result SetTextPredictionEnabled(bool enable);
991
992         /**
993         * Enables or disables the keypad.
994         *
995         * @since       2.0
996         *
997         * @return      An error code
998         * @param[in]   enable                   Set to @c true to enable the virtual keypad, @n
999         *                                                               else @c false
1000         * @exception   E_SUCCESS                The method is successful.
1001         * @exception   E_SYSTEM         A system error has occurred.
1002         * @see         IsKeypadEnabled()
1003         */
1004         result SetKeypadEnabled(bool enable);
1005
1006         /**
1007         * Shows the keypad.
1008         *
1009         * @since       2.0
1010         *
1011         * @return      An error code
1012         * @exception   E_SUCCESS           The method is successful.
1013         * @exception   E_SYSTEM            A system error has occurred.
1014         * @see         HideKeypad()
1015         */
1016         result ShowKeypad(void);
1017
1018 // TOKEN FILTER
1019         /**
1020          * Sets the text token filter.
1021          *
1022          * @since       2.0
1023          *
1024          * @return      An error code
1025          * @param[in]   pFilter                 The filter
1026          * @exception   E_SUCCESS               The method is successful.
1027          * @exception   E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1028          *                                                                              The operation is not supported if the style is not @c EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1029          * @exception   E_SYSTEM                A system error has occurred.
1030          * @remarks     The %ExpandableEditArea control checks with the registered filter to decide whether the user-entered text should be replaced.
1031          */
1032         result SetTokenFilter(const ITokenFilter* pFilter);
1033
1034         /**
1035         * Gets the text token filter.
1036         *
1037         * @since        2.0
1038         *
1039         * @return       The filter, @n
1040         *                                else @c null if an error occurs
1041         * @exception    E_SUCCESS                   The method is successful.
1042         * @exception     E_UNSUPPORTED_OPERATION        The current state of the instance prohibits the execution of the specified operation. @n
1043         *                                                                                       The operation is not supported if the style is not @c EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1044         * @exception    E_SYSTEM                    A system error has occurred.
1045         * @remarks      The specific error code can be accessed using the GetLastResult() method.
1046         */
1047         ITokenFilter* GetTokenFilter(void) const;
1048
1049         /**
1050         * Appends the specified token.
1051         *
1052         * @since        2.0
1053         *
1054         * @return       An error code
1055         * @param[in]    token                   The token to append
1056         * @exception    E_SUCCESS               The method is successful.
1057         * @exception     E_UNSUPPORTED_OPERATION        The current state of the instance prohibits the execution of the specified operation. @n
1058         *                                                                                       The operation is not supported if the style is not @c EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1059         * @exception    E_INVALID_ARG           The specified input parameter is invalid. @n
1060         *                                           The length of the specified @c token is @c 0.
1061         * @exception    E_SYSTEM                A system error has occurred.
1062         */
1063         result AppendToken(const Tizen::Base::String& token);
1064
1065         /**
1066          * Inserts the token at the specified index.
1067          *
1068          * @since        2.0
1069          *
1070          * @return       An error code
1071          * @param[in]    index                                          The position to insert the token
1072          * @param[in]    token                      The token to add
1073          * @exception    E_SUCCESS                  The method is successful.
1074          * @exception    E_UNSUPPORTED_OPERATION        The current state of the instance prohibits the execution of the specified operation. @n
1075          *                                                                                      The operation is not supported if the style is not @c EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1076          * @exception    E_INVALID_ARG              A specified input parameter is invalid. @n
1077          *                                          The length of the specified @c token is @c 0.
1078          * @exception    E_SYSTEM                   A system error has occurred.
1079          */
1080         result InsertTokenAt(int index, const Tizen::Base::String& token);
1081
1082         /**
1083          * Gets the token text at the specified index.
1084          *
1085          * @since        2.0
1086          *
1087          * @return       The token text at the specified index, @n
1088          *               else an empty string if an error occurs
1089          * @param[in]      index                                                          The position to get the token
1090          * @exception    E_SUCCESS                  The method is successful.
1091          * @exception    E_UNSUPPORTED_OPERATION        The current state of the instance prohibits the execution of the specified operation. @n
1092          *                                                                                      The operation is not supported if the style is not @c EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1093          * @exception    E_OUT_OF_RANGE                         The specified index parameter is outside the bounds of the data structure. @n
1094          *                                                                                      Either the index is greater than the number of elements or less than @c 0.
1095          * @exception    E_SYSTEM                   A system error has occurred.
1096          * @remarks      The specific error code can be accessed using the GetLastResult() method.
1097          */
1098         Tizen::Base::String GetTokenAt(int index) const;
1099
1100         /**
1101          * Gets the total token count.
1102          *
1103          * @since        2.0
1104          *
1105          * @return       The total token count, @n
1106          *                   else @c -1 if an error occurs
1107          * @exception    E_SUCCESS                  The method is successful.
1108          * @exception    E_UNSUPPORTED_OPERATION        The current state of the instance prohibits the execution of the specified operation. @n
1109          *                                                                                      The operation is not supported if the style is not @c EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1110          * @exception    E_SYSTEM                   A system error has occurred.
1111          * @remarks      The specific error code can be accessed using the GetLastResult() method.
1112          */
1113         int GetTokenCount(void) const;
1114
1115         /**
1116          * Gets the index of the token that is selected.
1117          *
1118          * @since        2.0
1119          *
1120          * @return       The index of the selected token, @n
1121          *                   else @c -1 if no token is selected or if an error occurs
1122          * @exception    E_SUCCESS                  The method is successful.
1123          * @exception    E_UNSUPPORTED_OPERATION        The current state of the instance prohibits the execution of the specified operation. @n
1124          *                                                                                      The operation is not supported if the style is not @c EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1125          * @exception    E_SYSTEM                   A system error has occurred.
1126          * @remarks      The specific error code can be accessed using the GetLastResult() method.
1127          */
1128         int GetSelectedTokenIndex(void) const;
1129
1130         /**
1131         * Checks whether the token editing mode is enabled.
1132         *
1133         * @since        2.0
1134         *
1135         * @return       @c true if the editing mode is enabled, @n
1136         *                    else @c false
1137         * @exception    E_SUCCESS                   The method is successful.
1138         * @exception     E_UNSUPPORTED_OPERATION        The current state of the instance prohibits the execution of the specified operation. @n
1139         *                                                                                       The operation is not supported if the style is not @c EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1140         * @exception    E_SYSTEM                    A system error has occurred.
1141         * @remarks      The specific error code can be accessed using the GetLastResult() method.
1142         */
1143         bool IsTokenEditModeEnabled(void) const;
1144
1145         /**
1146         * Removes the token at the specified index.
1147         *
1148         * @since        2.0
1149         *
1150         * @return       An error code
1151         * @param[in]    index                   The index of the token to remove
1152         * @exception    E_SUCCESS               The method is successful.
1153         * @exception     E_UNSUPPORTED_OPERATION        The current state of the instance prohibits the execution of the specified operation. @n
1154         *                                                                                       The operation is not supported if the style is not @c EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1155         * @exception    E_OUT_OF_RANGE          The specified index is outside the bounds of the data structure. @n
1156         *                                                                                       Either the index is greater than the number of elements or less than @c 0.
1157         * @exception    E_SYSTEM                A system error has occurred.
1158         */
1159         result RemoveTokenAt(int index);
1160
1161         /**
1162         * Sets the selected state of the specified token.
1163         *
1164         * @since        2.0
1165         *
1166         * @return       An error code
1167         * @param[in]    index                   The index of the token to select
1168         * @param[in]    selected                Set to @c true to select the specified token, @n
1169         *                                                                                       else @c false to unselect
1170         * @exception    E_SUCCESS               The method is successful.
1171         * @exception     E_UNSUPPORTED_OPERATION        The current state of the instance prohibits the execution of the specified operation. @n
1172         *                                                                                       The operation is not supported if the style is not @c EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1173         * @exception    E_OUT_OF_RANGE          The specified index is outside the bounds of the data structure. @n
1174         *                                                                                       Either the index is greater than the number of elements or less than @c 0.
1175         * @exception    E_SYSTEM                A system error has occurred.
1176         * @remarks      The currently selected token gets unselected automatically.
1177         */
1178         result SetTokenSelected(int index, bool selected);
1179
1180         /**
1181         * Enables or disables the token edit mode.
1182         *
1183         * @since        2.0
1184         *
1185         * @return       An error code
1186         * @param[in]    enable                      Set to @c true to enable the token editing mode, @n
1187         *                                                                                       else @c false
1188         * @exception    E_SUCCESS               The method is successful.
1189         * @exception     E_UNSUPPORTED_OPERATION        The current state of the instance prohibits the execution of the specified operation. @n
1190         *                                                                                       The operation is not supported if the style is not @c EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1191         * @exception    E_SYSTEM                A system error has occurred.
1192         */
1193         result SetTokenEditModeEnabled(bool enable);
1194
1195 // LIMIT LENGTH
1196         /**
1197          * Gets the limit length.
1198          *
1199          * @since               2.0
1200          *
1201          * @return      The limit length, @n
1202          *                  else @c -1 if an error occurs
1203          * @exception   E_SUCCESS                       The method is successful.
1204          * @exception   E_SYSTEM                        A system error has occurred.
1205          * @remarks     The specific error code can be accessed using the GetLastResult() method. @n
1206          *              The default limit length is @c 2048.
1207          * @see         SetLimitLength()
1208          */
1209         int GetLimitLength(void) const;
1210
1211         /**
1212          * Sets the limit length.
1213          *
1214          * @since       2.0
1215          *
1216          * @return      An error code
1217          * @param[in]   limitLength             The limit text length to set
1218          * @exception   E_SUCCESS               The method is successful.
1219          * @exception   E_INVALID_ARG   The specified input parameter is invalid, @n
1220          *                                                              or the specified limit length is @c 0 or negative.
1221          * @exception   E_SYSTEM                A system error has occurred.
1222          * @remarks             The method modifies the text buffer that is managed by the %ExpandableEditArea control. @n
1223          *              To display the changes, the control must be drawn again.
1224          * @see         GetLimitLength()
1225          */
1226         result SetLimitLength(int limitLength);
1227
1228 // APPEARANCES
1229         /**
1230          * Gets the color of the %ExpandableEditArea control for the specified status.
1231          *
1232          * @since        2.0
1233          *
1234          * @return       The color, @n
1235          *                               else RGBA (0,0,0,0) if an error occurs
1236          * @param[in]    status                         The status
1237          * @exception    E_SUCCESS                      The method is successful.
1238          * @exception    E_SYSTEM                       A system error has occurred.
1239          * @remarks      The specific error code can be accessed using the GetLastResult() method.
1240          */
1241         Tizen::Graphics::Color GetColor(EditStatus status) const;
1242
1243         /**
1244          * Gets the text color of the specified text type.
1245          *
1246          * @since        2.0
1247          *
1248          * @return       The text color, @n
1249          *                               else RGBA (0,0,0,0) if an error occurs
1250          * @param[in]    type                The text type
1251          * @exception    E_SUCCESS                      The method is successful.
1252          * @exception    E_INVALID_ARG          The specified type is not supported, or @n
1253          *                                                                      the specified @c type is EDIT_TEXT_COLOR_LINK.
1254          * @exception    E_SYSTEM                       A system error has occurred.
1255          * @remarks      The specific error code can be accessed using the GetLastResult() method.
1256          * @see          SetTextColor()
1257          */
1258         Tizen::Graphics::Color GetTextColor(EditTextColor type) const;
1259
1260         /**
1261          * Gets the text color of the guide text.
1262          *
1263          * @since       2.0
1264          *
1265          * @return          The guide text color, @n
1266          *                              else RGBA (0,0,0,0) if an error occurs
1267          * @exception   E_SUCCESS                       The method is successful.
1268          * @exception   E_SYSTEM                        A system error has occurred.
1269          * @remarks     The specific error code can be accessed using the GetLastResult() method.
1270          * @see         SetGuideTextColor()
1271          */
1272         Tizen::Graphics::Color GetGuideTextColor(void) const;
1273
1274         /**
1275          * Gets the text color of the title for the specified status.
1276          *
1277          * @since               2.0
1278          *
1279          * @return              The title text color, @n
1280          *                              else RGBA (0,0,0,0) if an error occurs
1281          * @param[in]   status                  The state of the %ExpandableEditArea control
1282          * @exception   E_SUCCESS               The method is successful.
1283          * @exception   E_SYSTEM                A system error has occurred.
1284          * @remarks             The specific error code can be accessed using the GetLastResult() method.
1285          * @see                 SetTitleTextColor()
1286          */
1287         Tizen::Graphics::Color GetTitleTextColor(EditStatus status) const;
1288
1289         /**
1290          * Gets the color of the tokens for the specified status.
1291          *
1292          * @since        2.0
1293          *
1294          * @return       The token color, @n
1295          *                               else RGBA (0,0,0,0) if an error occurs
1296          * @param[in]    status                     The status
1297          * @exception    E_SUCCESS                  The method is successful.
1298          * @exception    E_UNSUPPORTED_OPERATION        The current state of the instance prohibits the execution of the specified operation. @n
1299          *                                                                                      The operation is not supported if the style is not @c EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1300          * @exception    E_SYSTEM                   A system error has occurred.
1301          * @remarks      The specific error code can be accessed using the GetLastResult() method.
1302          * @see          SetTokenColor
1303          */
1304         Tizen::Graphics::Color GetTokenColor(ExpandableEditAreaTokenStatus status) const;
1305
1306         /**
1307          * Gets the text color of tokens.
1308          *
1309          * @since        2.0
1310          *
1311          * @return       The text color, @n
1312          *                               else RGBA (0,0,0,0) if an error occurs
1313          * @exception    E_SUCCESS                  The method is successful.
1314          * @exception    E_UNSUPPORTED_OPERATION        The current state of the instance prohibits the execution of the specified operation. @n
1315          *                                                                                      The operation is not supported if the style is not @c EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1316          * @exception    E_SYSTEM                   A system error has occurred.
1317          * @remarks      The specific error code can be accessed using the GetLastResult() method.
1318          * @see          SetTokenTextColor()
1319          */
1320         Tizen::Graphics::Color GetTokenTextColor(void) const;
1321
1322         /**
1323          * Gets the text color of tokens at the specified index.
1324          *
1325          * @since 2.0
1326          *
1327          * @return       The text color, @n
1328          *                              else RGBA (0,0,0,0) if an error occurs
1329          * @exception    E_SUCCESS                                      The method is successful.
1330          * @exception    E_UNSUPPORTED_OPERATION        The current state of the instance prohibits     the execution of the specified operation. @n
1331          *                                                                                      The operation is not supported if the style is not @c EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1332          * @exception    E_SYSTEM                   A system error has occurred.
1333          * @remarks      The specific error code can be accessed using the GetLastResult() method.
1334          * @see          SetSelectedTokenTextColor()
1335          */
1336         Tizen::Graphics::Color GetSelectedTokenTextColor(void) const;
1337
1338         /**
1339          * Sets the background bitmap of the %ExpandableEditArea control.
1340          *
1341          * @since       2.0
1342          *
1343          * @return      An error code
1344          * @param[in]   status          The status
1345          * @param[in]   bitmap          The background bitmap
1346          * @exception   E_SUCCESS       The method is successful.
1347          * @exception   E_SYSTEM        A system error has occurred.
1348          */
1349         result SetBackgroundBitmap(EditStatus status, const Tizen::Graphics::Bitmap& bitmap);
1350
1351         /**
1352          * Sets the color of the %ExpandableEditArea control.
1353          *
1354          * @since       2.0
1355          *
1356          * @return      An error code
1357          * @param[in]   status          The status of the %ExpandableEditArea control
1358          * @param[in]   color           The color
1359          * @exception   E_SUCCESS       The method is successful.
1360          * @exception   E_SYSTEM        A system error has occurred.
1361          * @see         GetColor()
1362          */
1363         result SetColor(EditStatus status, const Tizen::Graphics::Color& color);
1364
1365         /**
1366          * Sets the text color of the guide text.
1367          *
1368          * @since       2.0
1369          *
1370          * @return          An error code
1371          * @param[in]   color                The guide text color
1372          * @exception   E_SUCCESS        The method is successful.
1373          * @exception   E_SYSTEM         A system error has occurred.
1374          * @see         GetGuideTextColor()
1375          */
1376         result SetGuideTextColor(const Tizen::Graphics::Color& color);
1377
1378         /**
1379          * Sets the text color of the title for the specified status.
1380          *
1381          * @since       2.0
1382          *
1383          * @return          An error code
1384          * @param[in]   status                  The status of the %ExpandableEditArea control
1385          * @param[in]   color                   The title text color
1386          * @exception   E_SUCCESS               The method is successful.
1387          * @exception   E_SYSTEM                A system error has occurred.
1388          * @see         GetTitleTextColor()
1389          */
1390         result SetTitleTextColor(EditStatus status, const Tizen::Graphics::Color& color);
1391
1392         /**
1393          * Sets the text color of the %ExpandableEditArea control.
1394          *
1395          * @since       2.0
1396          *
1397          * @return      An error code
1398          * @param[in]   type             The text type
1399          * @param[in]   color            The text color
1400          * @exception   E_SUCCESS        The method is successful.
1401          * @exception   E_SYSTEM         A system error has occurred.
1402          * @see         GetTextColor()
1403          */
1404         result SetTextColor(EditTextColor type, const Tizen::Graphics::Color& color);
1405
1406         /**
1407          * Sets the text color of the tokens at the specified index.
1408          *
1409          * @since 2.0
1410          *
1411          * @return       An error code
1412          * @param[in]    color                  The token text color
1413          * @exception    E_SUCCESS                  The method is successful.
1414          * @exception    E_UNSUPPORTED_OPERATION        The current state of the instance prohibits     the execution of the specified operation. @n
1415          *                                                                                      The     operation is not supported if the style is not @c EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1416          * @exception    E_SYSTEM                                       A system error has occurred.
1417          * @see          GetSelectedTokenTextColor()
1418          */
1419         result SetSelectedTokenTextColor(const Tizen::Graphics::Color& color);
1420
1421         /**
1422          * Sets the color of the tokens for the specified status.
1423          *
1424          * @since        2.0
1425          *
1426          * @return       An error code
1427          * @param[in]    status                     The status
1428          * @param[in]    color                      The token color
1429          * @exception    E_SUCCESS                  The method is successful.
1430          * @exception    E_UNSUPPORTED_OPERATION        The current state of the instance prohibits the execution of the specified operation. @n
1431          *                                                                                      The operation is not supported if the style is not @c EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1432          * @exception    E_SYSTEM                   A system error has occurred.
1433          * @see          GetTokenColor()
1434          */
1435         result SetTokenColor(ExpandableEditAreaTokenStatus status, const Tizen::Graphics::Color& color);
1436
1437         /**
1438          * Sets the text color of the tokens.
1439          *
1440          * @since        2.0
1441          *
1442          * @return       An error code
1443          * @param[in]    color                      The token text color
1444          * @exception    E_SUCCESS                  The method is successful.
1445          * @exception    E_UNSUPPORTED_OPERATION        The current state of the instance prohibits the execution of the specified operation. @n
1446          *                                                                                      The operation is not supported if the style is not @c EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1447          * @exception    E_SYSTEM                   A system error has occurred.
1448          * @see          GetTokenTextColor()
1449          */
1450         result SetTokenTextColor(const Tizen::Graphics::Color& color);
1451
1452         /**
1453          * @if OSPDEPREC
1454          * Enables or disables the auto resizing if the candidate word list appears.
1455          *
1456          * @brief <i> [Deprecated]  </i>
1457          * @deprecated     This API is deprecated because it is no longer necessary to handle the resizing of expandable edit area.
1458          * @since       2.0
1459          *
1460          * @return      An error code
1461          * @param[in]   enable                  Set to @c true to enable the auto resizing, @n
1462          *                                                                              else @c false
1463          * @exception   E_SUCCESS               The method is successful.
1464          * @exception   E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1465          *                                      The current style of the %ExpandableEditArea does not support the operation.
1466          * @remarks     Note that when this option is enabled, the normal style %ExpandableEditArea is auto resized and the line added and removed events are
1467          *                              generated if the candidate word list pop-up appears during the predictive texting. @n
1468          *              The operation is not supported by the token style %ExpandableEditArea.
1469          * @see         IsAutoResizingEnabled()
1470          * @see         Tizen::Ui::Controls::IExpandableEditAreaEventListener
1471          * @endif
1472          */
1473         result SetAutoResizingEnabled(bool enable);
1474
1475         /**
1476          * @if OSPDEPREC
1477          * Checks whether the auto-resizing is enabled.
1478          *
1479          * @brief <i> [Deprecated]  </i>
1480          * @deprecated     This API is deprecated because it is no longer necessary to handle the resizing of expandable edit area.
1481          * @since       2.0
1482          *
1483          * @return      @c true if the auto-resizing is enabled, @n
1484          *                              else @c false
1485          * @exception   E_SUCCESS               The method is successful.
1486          * @exception   E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1487          *                                                                              The current style of the %ExpandableEditArea control does not support the operation.
1488          * @remarks     The specific error code can be accessed using the GetLastResult() method.
1489          * @see         SetAutoResizingEnabled()
1490          * @endif
1491          */
1492         bool IsAutoResizingEnabled(void) const;
1493
1494         /**
1495         * Sets the input language.
1496         *
1497         * @since 2.0
1498         *
1499         * @return     An error code
1500         * @param[in]  languageCode               The language to set
1501         * @exception  E_SUCCESS              The method is successful.
1502         * @exception  E_OUT_OF_MEMORY                   The memory is insufficient.
1503         * @remarks    The application can set the language of the current keypad that is associated with the current %ExpandableEditArea. @n
1504         *             This method only works if the language to set is supported by the current preloaded keypad.
1505         */
1506         result SetCurrentLanguage(Tizen::Locales::LanguageCode languageCode);
1507
1508         /**
1509         * Gets the current input language.
1510         *
1511         * @since 2.0
1512         *
1513         * @return     An error code
1514         * @param[out] language               The current input language
1515         * @exception     E_SUCCESS                             The method is successful.
1516         * @remarks   The application can get the current language of the keypad that is associated with the current %ExpandableEditArea.
1517         */
1518         result GetCurrentLanguage(Tizen::Locales::LanguageCode& language) const;
1519
1520 // EVENT LISTENER MANAGEMENT
1521         /**
1522          * Adds the specified IExpandableEditAreaEventListener instance. @n
1523          * The added listener can listen to events when a line is added or removed or when a button is pressed.
1524          *
1525          * @since       2.0
1526          *
1527          * @param[in]   listener        The event listener to add
1528          * @see         RemoveExpandableEditAreaEventListener()
1529          */
1530         void AddExpandableEditAreaEventListener(IExpandableEditAreaEventListener& listener);
1531
1532         /**
1533          * Adds the specified IKeypadEventListener instance. @n
1534          * The added listener is notified if the keypad associated with the edit area is opened or closed.
1535          *
1536          * @since       2.0
1537          *
1538          * @param[in]   listener        The event listener to add
1539          * @see         RemoveKeypadEventListener()
1540          */
1541         void AddKeypadEventListener(Tizen::Ui::IKeypadEventListener& listener);
1542
1543         /**
1544          * Adds the specified ITextBlockEventListener instance.
1545          *
1546          * @since       2.0
1547          *
1548          * @param[in]   listener                The event listener to add
1549          * @remarks             Programmatically modifying the text block does not cause the text block selection event to fire.
1550          * @see         RemoveTextBlockEventListener()
1551          */
1552         void AddTextBlockEventListener(Tizen::Ui::ITextBlockEventListener& listener);
1553
1554         /**
1555         * Adds the specified ITextEventListener instance. @n
1556         * The added listener can listen to the text-changed event.
1557         *
1558         * @since       2.0
1559         *
1560         * @param[in]    listener                The listener to add
1561         * @see         RemoveTextEventListener()
1562         */
1563         void AddTextEventListener(Tizen::Ui::ITextEventListener& listener);
1564
1565         /**
1566          * Removes the specified IExpandableEditAreaEventListener instance. @n
1567          * The removed listener cannot listen to events when they are fired.
1568          *
1569          * @since       2.0
1570          *
1571          * @param[in]   listener                The event listener to remove
1572          * @see         AddActionEventListener()
1573          */
1574         void RemoveExpandableEditAreaEventListener(IExpandableEditAreaEventListener& listener);
1575
1576         /**
1577          * Removes the specified IKeypadEventListener listener. @n
1578          * The removed listener cannot listen to events when they are fired.
1579          *
1580          * @since       2.0
1581          *
1582          * @param[in]   listener                The event listener to remove
1583          * @see         AddKeypadEventListener()
1584          */
1585         void RemoveKeypadEventListener(Tizen::Ui::IKeypadEventListener& listener);
1586
1587         /**
1588          * Removes the specified ITextBlockEventListener listener. @n
1589          * The removed listener cannot listen to events when they are fired.
1590          *
1591          * @since       2.0
1592          *
1593          * @param[in]   listener                The event listener to remove
1594          * @see         AddTextBlockEventListener()
1595          */
1596         void RemoveTextBlockEventListener(Tizen::Ui::ITextBlockEventListener& listener);
1597
1598         /**
1599          * Removes the specified ITextEventListener instance. @n
1600          * The removed listener cannot listen to events when they are fired.
1601          *
1602          * @since       2.0
1603          *
1604          * @param[in]   listener                The listener to remove
1605          * @see         AddTextEventListener()
1606          */
1607         void RemoveTextEventListener(Tizen::Ui::ITextEventListener& listener);
1608
1609         /**
1610         * Adds a listener instance for language events. @n
1611         * The added listener is notified when the input language is changed.
1612         *
1613         * @since 2.0
1614         *
1615         * @param[in]  listener               The listener to add
1616         * @remarks    The application can recognize when the language is changed from the keypad by adding Tizen::Ui::ILanguageEventListener.
1617         * @see            RemoveLanguageEventListener()
1618         */
1619
1620         void AddLanguageEventListener(Tizen::Ui::ILanguageEventListener& listener);
1621
1622         /**
1623         * Removes the specified listener instance. @n
1624         * The removed listener cannot listen to events when they are fired.
1625         *
1626         * @since 2.0
1627         *
1628         * @param[in]  listener               The listener to remove
1629         * @see             AddLanguageEventListener()
1630         */
1631
1632         void RemoveLanguageEventListener(Tizen::Ui::ILanguageEventListener& listener);
1633
1634         /**
1635          * Enables or disables the auto shrinking if the focus is lost.
1636          *
1637          * @since 2.0
1638          *
1639          * @param[in]   enable                  Set to @c true to enable the auto shrinking, @n
1640          *                                                                              else @c false
1641          * @remarks     Note that when this option is enabled, the %ExpandableEditArea is auto shrinked
1642          *                              if the %ExpandableEditArea lost its focus. @n
1643          * @see         IsAutoShrinkModeEnabled()
1644          */
1645         void SetAutoShrinkModeEnabled(bool enable);
1646
1647         /**
1648          * Checks whether the auto-shrinking is enabled.
1649          *
1650          * @since 2.0
1651          *
1652          * @return      @c true if the auto-shrinking is enabled, @n
1653          *                              else @c false
1654          * @see         SetAutoShrinkModeEnabled()
1655          */
1656         bool IsAutoShrinkModeEnabled(void) const;
1657
1658         /**
1659          * Sets the text filter.
1660          *
1661          * @since               2.1
1662          *
1663          * @param[in]           pFilter The filter
1664          * @remarks     The %ExpandableEditArea control checks with the registered filter to decide whether the user-entered text should be replaced.
1665          */
1666         void  SetEditTextFilter(IEditTextFilter* pFilter);
1667
1668         /**
1669         * Sends opaque command to the input method.
1670         *
1671         * @since     2.1
1672         *
1673         * @param[in] command            The opaque command
1674         * @remarks   This method can be used to provide domain-specific features that are only known between certain input methods and their clients.
1675         *                   This method may not work, depending on the active Input Method.
1676         */
1677         void SendOpaqueCommand (const Tizen::Base::String& command);
1678
1679 protected:
1680         friend class _ExpandableEditAreaImpl;
1681
1682 private:
1683         //
1684         // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
1685         //
1686         ExpandableEditArea(const ExpandableEditArea& rhs);
1687
1688         //
1689         // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
1690         //
1691         ExpandableEditArea& operator =(const ExpandableEditArea& rhs);
1692 };      // ExpandableEditArea
1693
1694 }}} // Tizen::Ui::Controls
1695
1696 #endif      // _FUI_CTRL_EXPANDABLE_EDIT_AREA_H_