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