Fixed to add the AllWindowList
[platform/framework/native/uifw.git] / inc / FUiCtrlEditField.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        FUiCtrlEditField.h
20  * @brief       This is the header file for the %EditField class.
21  *
22  * This header file contains the declarations of the %EditField class and its helper classes.
23  */
24
25 #ifndef _FUI_CTRL_EDIT_FIELD_H_
26 #define _FUI_CTRL_EDIT_FIELD_H_
27
28 #include <FBaseCharacter.h>
29 #include <FBaseString.h>
30 #include <FGrpBitmap.h>
31 #include <FGrpPoint.h>
32 #include <FGrpRectangle.h>
33 #include <FLclLocale.h>
34 #include <FUiControl.h>
35 #include <FUiContainer.h>
36 #include <FUiCtrlControlsTypes.h>
37 #include <FUiCtrlEditTypes.h>
38 #include <FUiCtrlIEditTextFilter.h>
39 #include <FUiCtrlInputTypes.h>
40 #include <FUiIActionEventListener.h>
41 #include <FUiIKeypadEventListener.h>
42 #include <FUiILanguageEventListener.h>
43 #include <FUiIScrollPanelEventListener.h>
44 #include <FUiITextBlockEventListener.h>
45 #include <FUiITextEventListener.h>
46 #include <FUiIUiLinkEventListener.h>
47
48 namespace Tizen { namespace Locales
49 {
50 class Locale;
51 }}
52
53 namespace Tizen { namespace Ui { namespace Controls
54 {
55
56 /**
57  * @class       EditField
58  * @brief   This class defines a common behavior for an %EditField control.
59  *
60  * @since               2.0
61  *
62  * The %EditField class displays a single-line text editor.
63  *
64  * For more information on the class features,
65  * see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_editfield_editarea.htm">EditArea and EditField</a>.
66  *
67  * The following example demonstrates how to use the %EditField class.
68  *
69  * @code
70 // Sample code for EditFieldSample.h
71 #include <FUi.h>
72
73 class EditFieldSample
74         : public Tizen::Ui::Controls::Form
75         , public Tizen::Ui::ITextEventListener
76 {
77 public:
78         EditFieldSample(void)
79         : __pEditField(null){}
80
81         bool Initialize(void);
82         virtual result OnInitializing(void);
83
84         // ITextEventListener
85         virtual void OnTextValueChanged(const Tizen::Ui::Control& source);
86         virtual void OnTextValueChangeCanceled(const Tizen::Ui::Control& source);
87
88 private:
89         Tizen::Ui::Controls::EditField* __pEditField;
90 };
91  * @endcode
92  *
93  * @code
94 // Sample code for EditFieldSample.cpp
95 #include <FGraphics.h>
96
97 #include "EditFieldSample.h"
98
99 using namespace Tizen::Graphics;
100 using namespace Tizen::Ui::Controls;
101
102 bool
103 EditFieldSample::Initialize(void)
104 {
105         Construct(FORM_STYLE_NORMAL);
106         return true;
107 }
108
109 result
110 EditFieldSample::OnInitializing(void)
111 {
112         result r = E_SUCCESS;
113
114         // Creates an instance of EditField
115         __pEditField = new EditField();
116         __pEditField->Construct(Rectangle(50, 100, 400, 150));
117         __pEditField->AddTextEventListener(*this);
118
119         //Adds the edit field to the Form
120         AddControl(__pEditField);
121
122         return r;
123 }
124
125 // ITextEventListener implementation
126 void
127 EditFieldSample::OnTextValueChanged(const Tizen::Ui::Control& source)
128 {
129     // ....
130 }
131
132 void
133 EditFieldSample::OnTextValueChangeCanceled(const Tizen::Ui::Control& source)
134 {
135     // ....
136 }
137  * @endcode
138  *
139  */
140
141 class _OSP_EXPORT_ EditField
142         : public Tizen::Ui::Control
143 {
144 public:
145         /**
146          * The object is not fully constructed after this constructor is called. @n
147          * For full construction, the %Construct() method must be called right after calling this constructor.
148          *
149          * @since               2.0
150          */
151         EditField(void);
152
153         /**
154         * This polymorphic destructor should be overridden if required.@n
155          * This way, the destructors of the derived classes are called when the destructor of this interface is called.
156         *
157         * @since                2.0
158         */
159         virtual ~EditField(void);
160
161         /**
162          * Initializes this instance of the %EditField control with the specified parameters.
163          *
164          * @since                       2.0
165          *
166          * @return                      An error code
167          * @param[in]           rect            An instance of the Graphics::Rectangle class @n
168          *                                                                              This instance represents the x and y coordinates of the top-left corner of the created window along with
169          *                                                                              the width and height of the control. @n
170          *                                                                              The optimal size of the control is defined in
171          *                                                                              <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
172          * @param[in]   style                   The style of the %EditField control
173          * @param[in]   inputStyle              The input style of the %EditField control
174          * @param[in]   showTitle                               Set to @c true to display the title, @n
175          *                                                              else @c false
176          * @param[in]   limitLength             The limit for the length of the text in the %EditField control
177          * @param[in]   groupStyle              The table view style of the %EditField control
178          * @exception   E_SUCCESS                               The method is successful.
179          * @exception   E_INVALID_ARG                   The specified @c limitLength is less than or equal to @c 0, or @n
180          *                                                                              either the @c rect.width or the @c rect.height is less than @c 0.
181          * @exception   E_UNSUPPORTED_OPTION    The specified option is not supported. @n
182          *                                                                              The title is not supported by small style %EditField.
183          * @exception   E_SYSTEM                                A system error has occurred.
184          * @remarks
185          *                      - A control is fully usable only after it has been added to a container. Therefore, some methods may fail if the control has been used
186          *                      earlier. The %EditField style of SMALL property cannot be used together with group styles.
187          *                      - If the specified size is less than the minimum size, %EditField is constructed with the minimum size.
188          *                      - Following are the input styles used for creating the different orientations of a keypad: @n
189          *                      @c INPUT_STYLE_FULLSCREEN: The orientation is decided by the G-sensor value. @n
190          *                      @c INPUT_STYLE_OVERLAY: The orientation is the same as that of a parent form.
191          */
192         result Construct(const Tizen::Graphics::Rectangle& rect, EditFieldStyle style = EDIT_FIELD_STYLE_NORMAL, InputStyle inputStyle = INPUT_STYLE_FULLSCREEN, bool showTitle = false, int limitLength = 100, GroupStyle groupStyle = GROUP_STYLE_NONE);
193
194         /**
195          * Initializes this instance of the %EditField control with the specified parameters.
196          *
197          * @since                       2.1
198          *
199          * @return                      An error code
200          * @param[in]           rect            An instance of the Tizen::Graphics::FloatRectangle class @n
201          *                                                                              This instance represents the x and y coordinates of the top-left corner of the created window along with
202          *                                                                              the width and height of the control. @n
203          *                                                                              The optimal size of the control is defined in
204          *                                                                              <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
205          * @param[in]   style                   The style of the %EditField control
206          * @param[in]   inputStyle              The input style of the %EditField control
207          * @param[in]   showTitle                               Set to @c true to display the title, @n
208          *                                                              else @c false
209          * @param[in]   limitLength     The limit for the length of the text in the %EditField control
210          * @param[in]   groupStyle              The table view style of the %EditField control
211          * @exception   E_SUCCESS                               The method is successful.
212          * @exception   E_INVALID_ARG                   The specified @c limitLength is less than or equal to @c 0, or @n
213          *                                                                              either the @c rect.width or the @c rect.height is less than @c 0.
214          * @exception   E_UNSUPPORTED_OPTION    The specified option is not supported. @n
215          *                                                                              The title is not supported by small style %EditField.
216          * @exception   E_SYSTEM                                A system error has occurred.
217          * @remarks
218          *                      - A control is fully usable only after it has been added to a container. Therefore, some methods may fail if the control has been used
219          *                      earlier. The %EditField style of SMALL property cannot be used together with group styles.
220          *                      - If the specified size is less than the minimum size, %EditField is constructed with the minimum size.
221          *                      - Following are the input styles used for creating the different orientations of a keypad: @n
222          *                      @c INPUT_STYLE_FULLSCREEN: The orientation is decided by the G-sensor value. @n
223          *                      @c INPUT_STYLE_OVERLAY: The orientation is the same as that of a parent form.
224          */
225         result Construct(const Tizen::Graphics::FloatRectangle& rect, EditFieldStyle style = EDIT_FIELD_STYLE_NORMAL, InputStyle inputStyle = INPUT_STYLE_FULLSCREEN, bool showTitle = false, int limitLength = 100, GroupStyle groupStyle = GROUP_STYLE_NONE);
226
227         /**
228          * Initializes this instance of the %EditField control.
229          *
230          * @since        2.0
231          *
232          * @return       An error code
233          * @param[in]   rect                    An instance of the Tizen::Graphics::FloatRectangle class @n
234          *                                                              This instance represents the x and y coordinates of the top-left corner of the created window along with
235          *                                                              the width and height of the control. @n
236          *                                                              The optimal size of the control is defined in
237          *                                                              <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
238          * @param[in]    style           The style of the %EditField control
239          * @param[in]    inputStyle      The input style of the %EditField control
240          * @param[in]    titleStyle      The title style
241          * @param[in]   enableClear                 Set to @c true to enable the clear button, @n
242          *                                                                              else @c false
243          * @param[in]    limitLength     The limit of the length of text in the %EditField control
244          * @param[in]    groupStyle      The table view style of the %EditField control
245          * @exception   E_SUCCESS               The method is successful.
246          * @exception   E_INVALID_ARG           A specified input parameter is invalid. @n
247          *                                      The specified @c limitLength is less than or equal to @c 0. @n
248          *                                                                      The specified @c rect.width or the @c rect.height is less than @c 0.
249          * @exception   E_UNSUPPORTED_OPTION    The specified option is not supported. @n
250          *                                                                              Title is not supported in small style %EditField.
251          * @exception   E_SYSTEM                                A system error has occurred.
252          * @remarks
253          *                      - A control is fully usable only after it has been added to a container. Therefore, some methods may fail if the control is used earlier.
254          *                      The %EditField style of SMALL property cannot be used together with group styles.
255          *                      - If the specified size is less than the minimum size, EditFied() is constructed with the minimum size.
256          *                      - Following are the input styles used for creating different orientations of a keypad: @n
257          *                      @c INPUT_STYLE_FULLSCREEN: The orientation is decided by the G-sensor value.@n
258          *                      @c INPUT_STYLE_OVERLAY: The orientation is similar to the parent form.
259          */
260         result Construct(const Tizen::Graphics::Rectangle& rect, EditFieldStyle style, InputStyle inputStyle, EditFieldTitleStyle titleStyle, bool enableClear = false, int limitLength = 100, GroupStyle groupStyle = GROUP_STYLE_NONE);
261
262         /**
263          * Initializes this instance of the %EditField control.
264          *
265          * @since                2.1
266          *
267          * @return               An error code
268          * @param[in]   rect                    An instance of the Tizen::Graphics::FloatRectangle class @n
269          *                                                              This instance represents the x and y coordinates of the top-left corner of the created window along with
270          *                                                              the width and height of the control. @n
271          *                                                              The optimal size of the control is defined in
272          *                                                              <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
273          * @param[in]    style                   The style of the %EditField control
274          * @param[in]    inputStyle      The input style of the %EditField control
275          * @param[in]    titleStyle      The title style
276          * @param[in]   enableClear                     Set to @c true to enable the clear button, @n
277          *                                                                              else @c false
278          * @param[in]    limitLength     The limit of the length of text in the %EditField control
279          * @param[in]    groupStyle      The table view style of the %EditField control
280          * @exception   E_SUCCESS                               The method is successful.
281          * @exception   E_INVALID_ARG                   A specified input parameter is invalid. @n
282          *                                                                              The specified @c limitLength is less than or equal to @c 0. @n
283          *                                                                              The specified @c rect.width or the @c rect.height is less than @c 0.
284          * @exception   E_UNSUPPORTED_OPTION    The specified option is not supported. @n
285          *                                                                              Title is not supported in small style %EditField.
286          * @exception   E_SYSTEM                                A system error has occurred.
287          * @remarks
288          *                      - A control is fully usable only after it has been added to a container. Therefore, some methods may fail if the control is used earlier.
289          *                      The %EditField style of SMALL property cannot be used together with group styles.
290          *                      - If the specified size is less than the minimum size, EditFied() is constructed with the minimum size.
291          *                      - Following are the input styles used for creating different orientations of a keypad: @n
292          *                      @c INPUT_STYLE_FULLSCREEN: The orientation is decided by the G-sensor value.@n
293          *                      @c INPUT_STYLE_OVERLAY: The orientation is similar to the parent form.
294          */
295         result Construct(const Tizen::Graphics::FloatRectangle& rect, EditFieldStyle style, InputStyle inputStyle, EditFieldTitleStyle titleStyle, bool enableClear = false, int limitLength = 100, GroupStyle groupStyle = GROUP_STYLE_NONE);
296
297 public:
298         /**
299          * Gets the horizontal text alignment of the %EditField control.
300          *
301          * @since               2.0
302          *
303          * @return              The horizontal text alignment
304          * @exception   E_SUCCESS                       The method is successful.
305          * @exception   E_SYSTEM                        A system error has occurred.
306          * @remarks         The specific error code can be accessed using the GetLastResult() method.
307          * @see                 SetTextAlignment()
308          */
309         HorizontalAlignment GetTextAlignment(void) const;
310
311         /**
312          * Sets the horizontal text alignment of the %EditField control.
313          *
314          * @since       2.0
315          *
316          * @return              An error code
317          * @exception   E_SUCCESS                       The method is successful.
318          * @exception   E_SYSTEM                        A system error has occurred.
319          * @see                 GetTextAlignment()
320          */
321         result SetTextAlignment(HorizontalAlignment alignment);
322
323         /**
324          * Checks whether the view mode is enabled. @n
325          * In the view mode, the auto-detected links are displayed as linked text.
326          *
327          * @since       2.0
328          *
329          * @return              @c true if the view mode is enabled, @n
330          *              else @c false
331          * @exception   E_SUCCESS                       The method is successful.
332          * @exception   E_SYSTEM                        A system error has occurred.
333          * @remarks     The specific error code can be accessed using the GetLastResult() method.
334          * @see   SetViewModeEnabled()
335          */
336         bool IsViewModeEnabled(void) const;
337
338         /**
339          * Enables or disables the view mode. @n
340          * In the view mode, the auto-detected links are displayed as linked text.
341          *
342          * @since       2.0
343          *
344          * @return              An error code
345          * @param[in]   enable              Set to @c true to enable the view mode, @n
346          *                                                                      else @c false
347          * @exception   E_SUCCESS                       The method is successful.
348          * @exception   E_SYSTEM                        A system error has occurred.
349          * @see         IsViewModeEnabled()
350          */
351         result SetViewModeEnabled(bool enable);
352
353         /**
354          * Sets the auto-link mask.
355          *
356          * @since               2.0
357          *
358          * @return              An error code
359          * @param[in]   autoLinks                               The auto-link mask @n
360          *                                                              Multiple link types can be combined using bitwise OR operator (see Tizen::Base::Utility::LinkType). @n
361          *                                                              For more information, see <a href="../org.tizen.native.appprogramming/html/guide/ui/auto_link_detection.htm">AutoLink Detection</a>. @n
362          *                                                              When it is set to @c 0, the auto-link detection is disabled.
363          * @exception   E_SUCCESS                               The method is successful.
364          * @exception   E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation @n
365          *                                                                              The input style is not ::INPUT_STYLE_OVERLAY.
366          * @exception   E_SYSTEM                                A system error has occurred.
367          * @see                 Tizen::Base::Utility::LinkType
368          * @see                 GetAutoLinkMask()
369          * @see                 IsViewModeEnabled()
370          * @see                 SetViewModeEnabled()
371          */
372         result SetAutoLinkMask(unsigned long autoLinks);
373
374         /**
375          * Gets the auto-link mask.
376          *
377          * @since               2.0
378          *
379          * @return              The auto-link mask
380          * @exception   E_SUCCESS                               The method is successful.
381          * @exception   E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation @n
382          *                                                                              The input style is not ::INPUT_STYLE_OVERLAY.
383          * @exception   E_SYSTEM                                A system error has occurred.
384          * @remarks             The specific error code can be accessed using the GetLastResult() method.
385          * @see                 SetAutoLinkMask()
386          */
387         unsigned long GetAutoLinkMask(void) const;
388
389         /**
390          * Adds a link event listener. @n
391          * The added listener is notified when the links are selected by the user. @n
392          * The %AddUiLinkEventListener() method is supported when the input style is ::INPUT_STYLE_OVERLAY.
393          *
394          * @since               2.0
395          *
396          * @param[in]   listener        The event listener to add
397          * @see                 RemoveUiLinkEventListener()
398          */
399         void AddUiLinkEventListener(Tizen::Ui::IUiLinkEventListener& listener);
400
401         /**
402          * Removes the specified link event listener. @n
403          * The removed listener cannot listen to events when they are fired. @n
404          * The %RemoveUiLinkEventListener() method is supported when the input style is ::INPUT_STYLE_OVERLAY.
405          *
406          * @since               2.0
407          *
408          * @param[in]   listener        The event listener to remove
409          * @see                 AddUiLinkEventListener()
410          */
411         void RemoveUiLinkEventListener(Tizen::Ui::IUiLinkEventListener& listener);
412
413         /**
414          * Gets the margin value of the specified margin type.
415          *
416          * @since       2.0
417          *
418          * @return          The margin value of the specified margin type, @n
419          *                              else @c -1 if an error occurs
420          * @param[in]   marginType              The margin type
421          * @exception   E_SUCCESS               The method is successful.
422          * @exception   E_SYSTEM                A system error has occurred.
423          * @remarks     The specific error code can be accessed using the GetLastResult() method.
424          * @see         SetMargin()
425          */
426         int GetMargin(EditMarginType marginType) const;
427
428         /**
429          * Gets the margin value of the specified margin type.
430          *
431          * @since       2.1
432          *
433          * @return          The margin value of the specified margin type, @n
434          *                              else @c -1 if an error occurs
435          * @param[in]   marginType              The margin type
436          * @exception   E_SUCCESS               The method is successful.
437          * @exception   E_SYSTEM                A system error has occurred.
438          * @remarks     The specific error code can be accessed using the GetLastResult() method.
439          * @see         SetMargin()
440          */
441         float GetMarginF(EditMarginType marginType) const;
442
443         /**
444          * Sets the margin for the specified margin type.
445          *
446          * @since       2.0
447          *
448          * @return          An error code
449          * @param[in]   marginType              The margin type
450          * @param[in]   margin                  The margin to set
451          * @exception   E_SUCCESS               The method is successful.
452          * @exception   E_INVALID_ARG   A specified input parameter is invalid. @n
453          *                                                              The specified @c margin cannot be a negative integer.
454          * @exception   E_SYSTEM                A system error has occurred.
455          * @see         GetMargin()
456          */
457         result SetMargin(EditMarginType marginType, int margin);
458
459         /**
460          * Sets the margin for the specified margin type.
461          *
462          * @since       2.1
463          *
464          * @return          An error code
465          * @param[in]   marginType              The margin type
466          * @param[in]   margin                  The margin to set
467          * @exception   E_SUCCESS               The method is successful.
468          * @exception   E_INVALID_ARG   A specified input parameter is invalid. @n
469          *                                                              The specified @c margin cannot be a negative integer.
470          * @exception   E_SYSTEM                A system error has occurred.
471          * @see         GetMarginF()
472          */
473         result SetMargin(EditMarginType marginType, float margin);
474
475         /**
476          * Enables or disables the keypad action.
477          *
478          * @since 2.0
479          * @return      An error code
480          * @param[in]   enable  Set to @c true to enable the keypad action, @n
481          *                                              else @c false
482          * @exception   E_SUCCESS                               The method is successful.
483          * @exception   E_UNSUPPORTED_OPERATION  The underlying input method does not support this operation.
484          * @remarks     Depending on the value of input param, the enter key have a enable or disable look accordingly.
485          */
486         result SetKeypadActionEnabled(bool enable);
487
488         /**
489          * Checks whether the keypad action is enabled.
490          *
491          * @since 2.0
492          * @return              @c true if the keypad action is enabled, @n
493          *                              else @c false
494          */
495         bool IsKeypadActionEnabled(void) const;
496
497         /**
498          * Gets the keypad action type.
499          *
500          * @since               2.0
501          *
502          * @return      The keypad action
503          * @exception   E_SUCCESS                               The method is successful.
504          * @exception   E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
505          *                                                                              The input style is not ::INPUT_STYLE_OVERLAY.
506          * @exception   E_SYSTEM                A system error has occurred.
507          * @remarks     The specific error code can be accessed using the GetLastResult() method.
508          * @see         SetKeypadAction()
509          */
510         Tizen::Ui::KeypadAction GetKeypadAction(void) const;
511
512         /**
513          * Sets the keypad action type.
514          *
515          * @since               2.0
516          *
517          * @return      An error code
518          * @param[in]   keypadAction                    The keypad action
519          * @exception   E_SUCCESS                               The method is successful.
520          * @exception   E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
521          *                                                                              The input style is not ::INPUT_STYLE_OVERLAY.
522          * @exception   E_SYSTEM                                A system error has occurred.
523          * @remarks             Depending on the value of input param, the enter key label of the keypad changes accordingly.
524          * @see         GetKeypadAction()
525          */
526         result SetKeypadAction(Tizen::Ui::KeypadAction keypadAction);
527
528         /**
529          * Sets the visibility of the command buttons of the overlay style keypad.
530          *
531          * @since               2.0
532          *
533          * @return              An error code
534          * @param[in]   visible                                 Set to @c true to set the visibility of the overlay keypad command buttons, @n
535          *                                      else @c false
536          * @exception   E_SUCCESS                               The method is successful.
537          * @exception   E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
538          *                                                                              The input style is not ::INPUT_STYLE_OVERLAY.
539          * @exception   E_SYSTEM                                A system error has occurred.
540          */
541         result SetOverlayKeypadCommandButtonVisible(bool visible);
542
543         /**
544          * Checks whether the command buttons of the overlay style keypad are visible.
545          *
546          * @since       2.0
547          *
548          * @return      @c true if the overlay command buttons are visible, @n
549          *              else @c false
550          * @exception   E_SUCCESS                   The method is successful.
551          * @exception   E_UNSUPPORTED_OPERATION         The current state of the instance prohibits the execution of the specified operation. @n
552          *                                                                              The input style is not ::INPUT_STYLE_OVERLAY.
553          * @exception   E_SYSTEM                    A system error has occurred.
554          * @remarks     The specific error code can be accessed using the GetLastResult() method.
555          */
556         bool IsOverlayCommandButtonVisible(void) const;
557
558         /**
559          * Hides the keypad.
560          *
561          * @since       2.0
562          *
563          * @return      An error code
564          * @exception   E_SUCCESS                               The method is successful.
565          * @exception   E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
566          *                                                                      The input style is not ::INPUT_STYLE_OVERLAY.
567          * @exception   E_SYSTEM                                A system error has occurred.
568          * @see         ShowKeypad()
569          */
570         result HideKeypad(void);
571
572         /**
573          * Gets the position of the ellipsis.
574          *
575          * @since       2.0
576          *
577          * @return      The ellipsis position
578          * @exception   E_SUCCESS                       The method is successful.
579          * @exception   E_SYSTEM                        A system error has occurred.
580          * @remarks     The specific error code can be accessed using the GetLastResult() method.
581          * @see         SetEllipsisPosition()
582          */
583         EllipsisPosition GetEllipsisPosition(void) const;
584
585         /**
586          * Sets the position of the ellipsis.
587          *
588          * @since       2.0
589          *
590          * @return      An error code
591          * @param[in]   position        The ellipsis position
592          * @exception   E_SUCCESS                       The method is successful.
593          * @exception   E_SYSTEM                        A system error has occurred.
594          * @see         GetEllipsisPosition()
595          */
596         result SetEllipsisPosition(EllipsisPosition position);
597
598         /**
599          * Gets the text size.
600          *
601          * @since       2.0
602          *
603          * @return      The size of the text, @n
604          *              else @c -1 if an error occurs
605          * @exception   E_SUCCESS                       The method is successful.
606          * @exception   E_SYSTEM                        A system error has occurred.
607          * @remarks     The specific error code can be accessed using the GetLastResult() method.
608          * @see         SetTextSize()
609          */
610         int GetTextSize(void) const;
611
612         /**
613          * Gets the text size.
614          *
615          * @since       2.1
616          *
617          * @return      The size of the text, @n
618          *              else @c -1 if an error occurs
619          * @exception   E_SUCCESS                       The method is successful.
620          * @exception   E_SYSTEM                        A system error has occurred.
621          * @remarks     The specific error code can be accessed using the GetLastResult() method.
622          * @see         SetTextSize()
623          */
624         float GetTextSizeF(void) const;
625
626         /**
627          * Sets the text size.
628          *
629          * @since               2.0
630          *
631          * @return              An error code
632          * @param[in]   size                    The text size
633          * @exception   E_SUCCESS               The method is successful.
634          * @exception   E_INVALID_ARG   The specified input parameter is invalid. @n
635          *                                                              The @c size cannot be a negative integer.
636          * @exception   E_SYSTEM                A system error has occurred.
637          * @remarks             The specified @c size should be greater than or equal to minimum font size which is 4.
638          * @see                 GetTextSize()
639          */
640         result SetTextSize(int size);
641
642         /**
643          * Sets the text size.
644          *
645          * @since               2.1
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 input parameter is invalid. @n
651          *                                                              The @c size cannot be 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.0f.
654          * @see                 GetTextSizeF()
655          */
656         result SetTextSize(float size);
657
658         /**
659          * Gets the color of the %EditField control for the specified status.
660          *
661          * @since        2.0
662          *
663          * @return       The color, @n
664          *                               else RGBA(0,0,0,0) if an error occurs
665          * @param[in]    status                         The status
666          * @exception   E_SUCCESS                       The method is successful.
667          * @exception   E_SYSTEM                        A system error has occurred.
668          * @remarks      The specific error code can be accessed using the GetLastResult() method.
669          */
670         Tizen::Graphics::Color GetColor(EditStatus status) const;
671
672         /**
673          * Gets the text color of the specified text color type.
674          *
675          * @since               2.0
676          *
677          * @return              The color, @n
678          *                              else RGBA(0,0,0,0) if an error occurs
679          * @param[in]   type                    The text color type
680          * @exception   E_SUCCESS               The method is successful.
681          * @exception   E_SYSTEM                A system error has occurred.
682          * @remarks             The specific error code can be accessed using the GetLastResult() method.
683          * @see                 SetTextColor()
684          */
685         Tizen::Graphics::Color GetTextColor(EditTextColor type) const;
686
687         /**
688          * Sets the background bitmap of the %EditField control for the specified status.
689          *
690          * @since               2.0
691          *
692          * @return              An error code
693          * @param[in]   status                  The status
694          * @param[in]   bitmap                  The background bitmap
695          * @exception   E_SUCCESS               The method is successful.
696          * @exception   E_SYSTEM                A system error has occurred.
697          */
698         result SetBackgroundBitmap(EditStatus status, const Tizen::Graphics::Bitmap& bitmap);
699
700         /**
701          * Sets the color of the %EditField control for the specified status.
702          *
703          * @since               2.0
704          *
705          * @return              An error code
706          * @param[in]   status                  The status
707          * @param[in]   color                   The color
708          * @exception   E_SUCCESS               The method is successful.
709          * @exception   E_SYSTEM                A system error has occurred.
710          * @see                 GetColor()
711          */
712         result SetColor(EditStatus status, const Tizen::Graphics::Color& color);
713
714         /**
715          * Sets the text color of the %EditField control for the specified text color type.
716          *
717          * @since               2.0
718          *
719          * @return              An error code
720          * @param[in]   type                    The text color type
721          * @param[in]   color                   The text color
722          * @exception   E_SUCCESS               The method is successful.
723          * @exception   E_SYSTEM                A system error has occurred.
724          * @see                 GetTextColor()
725          */
726         result SetTextColor(EditTextColor type, const Tizen::Graphics::Color& color);
727
728         /**
729          * Gets a portion of text that is displayed by the %EditField control.
730          *
731          * @since               2.0
732          *
733          * @return      The specified portion of the text, @n
734          *                              else an empty string if an error occurs
735          * @param[in]   start                   The starting index of the range
736          * @param[in]   end                             The last index of the range
737          * @exception   E_SUCCESS               The method is successful.
738          * @exception   E_OUT_OF_RANGE  The specified index is outside the bounds of the data structure, or @n
739          *                                                              the index is greater than the number of elements or less than @c 0.
740          * @exception   E_SYSTEM                A system error has occurred.
741          * @remarks     The specific error code can be accessed using the GetLastResult() method.
742          * @see         SetText()
743          */
744         Tizen::Base::String GetText(int start, int end) const;
745
746         /**
747          * Adds a keypad event listener. @n
748          * The added listener is notified when the keypad associated with the %EditField control is opened or closed.
749          *
750          * @since       2.0
751          *
752          * @param[in]   listener        The event listener to add
753          * @see         RemoveKeypadEventListener()
754          */
755         void AddKeypadEventListener(IKeypadEventListener& listener);
756
757         /**
758          * Removes the specified keypad event listener. @n
759          * The removed listener cannot listen to events when they are fired.
760          *
761          * @since       2.0
762          *
763          * @param[in]   listener        The event listener to remove
764          * @see         AddKeypadEventListener()
765          */
766         void RemoveKeypadEventListener(IKeypadEventListener& listener);
767
768         /**
769          * Adds a text block event listener. @n
770          * The added listener is notified when the text block is selected.
771          *
772          * @since               2.0
773          *
774          * @param[in]   listener        The event listener to add
775          * @remarks             Programmatically modifying the text block does not cause the text block selection event to fire.
776          * @see                 RemoveTextBlockEventListener()
777          */
778         void AddTextBlockEventListener(Tizen::Ui::ITextBlockEventListener& listener);
779
780         /**
781          * Removes the specified text block event listener. @n
782          * The removed listener cannot listen to events when they are fired.
783          *
784          * @since       2.0
785          *
786          * @param[in]   listener        The event listener to remove
787          * @see                 AddTextBlockEventListener()
788          */
789         void RemoveTextBlockEventListener(Tizen::Ui::ITextBlockEventListener& listener);
790
791         /**
792          * Adds the ITextEventListener instance. @n
793          * The added listener listens to events on the context of the specified event dispatcher when they are fired.
794          *
795          * @since               2.0
796          *
797          * @param[in]   listener    The listener to add
798          */
799         void AddTextEventListener(Tizen::Ui::ITextEventListener& listener);
800
801         /**
802         * Removes the ITextEventListener instance. @n
803         * The removed listener cannot listen to events when they are fired.
804         *
805         * @since                2.0
806         *
807         * @param[in]    listener    The listener to remove
808         */
809         void RemoveTextEventListener(Tizen::Ui::ITextEventListener& listener);
810
811         /**
812          * Adds the specified listener instance to listen to the scroll panel events. @n
813          * To listen to the scroll panel events, the parent of EditArea must be an instance of ScrollPanel.
814          *
815          * @since               2.0
816          *
817          * @param[in]   listener        The listener to add
818          * @remarks     When IScrollPanelEventListener::OnOverlayControlCreated() or IScrollPanelEventListener::OnOvelayControlClosed() is called,
819          *                      the application resets the bounds of the controls placed within the ScrollPanel control. %ScrollPanel is automatically
820          *                      drawn again after this method is called.
821          * @see         RemoveScrollPanelEventListener()
822          */
823         void AddScrollPanelEventListener(Tizen::Ui::IScrollPanelEventListener& listener);
824
825         /**
826         * Removes the specified scroll panel event listener instance. @n
827         * The removed listener cannot listen to events when they are fired.
828         *
829         * @since                2.0
830         *
831         * @param[in]    listener        The listener to remove
832         */
833         void RemoveScrollPanelEventListener(Tizen::Ui::IScrollPanelEventListener& listener);
834
835         /**
836          * Adds the specified listener instance. @n
837          * The added listener can listen to events on the context of the given event dispatcher when they are fired.
838          *
839          * @since               2.0
840          *
841          * @param[in]   listener        The event listener to add
842          */
843         void AddActionEventListener(Tizen::Ui::IActionEventListener& listener);
844
845         /**
846          * Removes a listener instance. @n
847          * The removed listener cannot listen to events when they are fired.
848          *
849          * @since                       2.0
850          *
851          * @param[in]   listener        The event listener to remove
852          */
853         void RemoveActionEventListener(Tizen::Ui::IActionEventListener& listener);
854
855         /**
856          * Adds the specified listener instance for language events. @n
857          * The added listener is notified when the input language is changed.
858          *
859          * @since      2.0
860          *
861          * @param[in]  listener                         The listener to add
862          * @remarks    The application can recognize when the language is changed from the keypad by adding Tizen::Ui::ILanguageEventListener.
863          * @see            RemoveLanguageEventListener()
864          */
865         void AddLanguageEventListener(Tizen::Ui::ILanguageEventListener& listener);
866
867         /**
868          * Removes the specified listener instance. @n
869          * The removed listener cannot listen to events when they are fired.
870          *
871          * @since      2.0
872          *
873          * @param[in]  listener                         The listener to remove
874          * @see            AddLanguageEventListener()
875          */
876         void RemoveLanguageEventListener(Tizen::Ui::ILanguageEventListener& listener);
877
878         /**
879          * Gets the remaining length of the %EditField control.
880          *
881          * @since       2.0
882          *
883          * @return      The remaining length of the %EditField control, @n
884          *                      else @c -1 if an error occurs
885          */
886         int GetRemainingLength(void) const;
887
888         /**
889          * Enables or disables the lowercase mode.
890          *
891          * @since               2.0
892          *
893          * @param[in]   enable  Set to @c true to enable the lowercase mode, @n
894          *                      else @c false
895          */
896         void SetLowerCaseModeEnabled(bool enable);
897
898         /**
899          * Checks whether the lowercase mode is enabled.
900          *
901          * @since       2.0
902          *
903          * @return      @c true if the lowercase mode is enabled, @n
904          *                      else @c false
905          */
906         bool IsLowerCaseModeEnabled(void) const;
907
908         /**
909          * @if OSPDEPREC
910          * Sets the input mode category.
911          *
912          * @brief <i> [Deprecated]  </i>
913          * @deprecated We no longer provide a method to specify the list of styles which the user can set the keypad to, @n
914          *                         or the current mode to initially set the keypad to, from this list. It is recommended to use EditFieldStyle in the Construct() method instead.
915          * @since        2.0
916          *
917          * @return       An error code
918          * @param[in]    categories             The categories to set @n
919          *                              Multiple input categories can be combined using bitwise OR operator (see Tizen::Ui::Controls::EditInputModeCategory).
920          * @param[in]    enable                 The category value to set
921          * @exception    E_SUCCESS                              The method is successful.
922          * @exception    E_INVALID_ARG                  A specified input mode category is invalid.
923          * @exception    E_INVALID_OPERATION    The current state of the instance prohibits the execution of the specified operation @n
924          *                                                                              The specified @c categories cannot be supported with the current keypad style.
925          * @exception    E_SYSTEM                               A system error has occurred.
926          * @endif
927          */
928         result SetInputModeCategory(unsigned long categories, bool enable);
929
930         /**
931          * @if OSPDEPREC
932          * Sets the current input mode category.
933          *
934          * @brief <i> [Deprecated]  </i>
935          * @deprecated We no longer provide a method to specify the list of styles which the user can set the keypad to, @n
936          *                         or the current mode to initially set the keypad to, from this list. It is recommended to use EditFieldStyle in the Construct() method instead.
937          * @since               2.0
938          *
939          * @return              An error code
940          * @param[in]   inputModeCategory   An item of input category
941          * @exception   E_SUCCESS                       The method is successful.
942          * @exception   E_SYSTEM                        A system error has occurred.
943          * @endif
944          */
945         result SetCurrentInputModeCategory(EditInputModeCategory inputModeCategory);
946
947         /**
948          * @if OSPDEPREC
949          * Gets the input mode category.
950          *
951          * @brief <i> [Deprecated]  </i>
952          * @deprecated This method is deprecated because we no longer provide a method to specify the list of styles which the user can set the keypad to.
953          * @since       2.0
954          *
955          * @return  A bitwise combination of Tizen::Ui::Controls::EditInputModeCategory, @n
956          *                      else EDIT_INPUTMODE_ALPHA if an error occurs
957          * @endif
958          */
959         unsigned long GetInputModeCategory(void) const;
960
961         /**
962          * @if OSPDEPREC
963          * Gets the current input mode category.
964          *
965          * @brief <i> [Deprecated]  </i>
966          * @deprecated This method is deprecated because we no longer provide a method to specify the list of styles which the user can set the keypad to.
967          * @since    2.0
968          *
969          * @return   The current input mode category
970          * @endif
971          */
972         EditInputModeCategory GetCurrentInputModeCategory(void) const;
973
974         /**
975          * Sets the cursor in the %EditField control at the specified position.
976          *
977          * @since               2.0
978          *
979          * @return              An error code
980          * @param[in]   position                The cursor position to set
981          * @exception   E_SUCCESS               The method is successful.
982          * @exception   E_OUT_OF_RANGE  The specified @c position is less than @c 0 or greater than the maximum length.
983          * @exception   E_SYSTEM                A system error has occurred.
984          */
985         result SetCursorPosition(int position);
986
987         /**
988          * Gets the cursor position.
989          *
990          * @since                       2.0
991          *
992          * @return                      The current cursor position, @n
993          *                  else @c -1 if an error occurs
994          */
995         int GetCursorPosition(void) const;
996
997         /**
998          * Gets the text that is displayed by the %EditField control.
999          *
1000          * @since       2.0
1001          *
1002          * @return      The text of the %EditField control, @n
1003          *          else an empty string if an error occurs
1004          */
1005         Tizen::Base::String GetText(void) const;
1006
1007         /**
1008          * Gets the length of the text that is displayed by the %EditField control.
1009          *
1010          * @since       2.0
1011          *
1012          * @return      The length of the text, @n
1013          *          else @c -1 if an error occurs
1014          */
1015         int GetTextLength(void) const;
1016
1017         /**
1018          * Sets the text of the %EditField control.
1019          *
1020          * @since               2.0
1021          *
1022          * @param[in]   text                    The text to display by the %EditField control @n
1023          *                                              Use @htmlonly '\n' @endhtmlonly to denote the end of the line.
1024          * @exception   E_SUCCESS               The method is successful.
1025          * @exception   E_INVALID_ARG   The specified input parameter is invalid. @n
1026          *                                                              The length of the specified @c text exceeds the system limitation or the limit length.
1027          * @exception   E_SYSTEM                A system error has occurred.
1028          */
1029         result SetText(const Tizen::Base::String& text);
1030
1031         /**
1032          * Inserts the specified text at the current cursor position.
1033          *
1034          * @since               2.0
1035          *
1036          * @return              An error code
1037          * @param[in]   text        The text to insert @n
1038          *                                      Use @htmlonly '\n' @endhtmlonly to denote the end of the line.
1039          * @exception   E_SUCCESS   The method is successful.
1040          * @exception   E_SYSTEM    A system error has occurred.
1041          */
1042         result InsertTextAtCursorPosition(const Tizen::Base::String& text);
1043
1044         /**
1045          * Appends the specified text at the end of the existing text.
1046          *
1047          * @since               2.0
1048          *
1049          * @return              An error code
1050          * @param[in]   text        The text to append @n
1051          *                                      Use @htmlonly '\n' @endhtmlonly to denote the end of the line.
1052          * @exception   E_SUCCESS   The method is successful.
1053          * @exception   E_SYSTEM    A system error has occurred.
1054          */
1055         result AppendText(const Tizen::Base::String& text);
1056
1057         /**
1058          * Appends the specified character at the end of the existing text.
1059          *
1060          * @since               2.0
1061          *
1062          * @return      An error code
1063          * @param[in]   character               The character to append
1064          * @exception   E_SUCCESS               The method is successful.
1065          * @exception   E_SYSTEM                A system error has occurred.
1066          * @remarks             The method modifies the text buffer that is managed by the %EditField control. To display the
1067          *              changes, the control must be drawn again.
1068          */
1069         result AppendCharacter(const Tizen::Base::Character& character);
1070
1071         /**
1072          * Clears the text that is displayed by the %EditField control.
1073          *
1074          * @since               2.0
1075          *
1076          * @return              An error code
1077          * @exception   E_SUCCESS               The method is successful.
1078          * @exception   E_SYSTEM                A system error has occurred.
1079          * @remarks             The method modifies the text buffer that is managed by the %EditField control. To display the
1080          *              changes, the control must be drawn again.
1081          */
1082         result Clear(void);
1083
1084         /**
1085          * Deletes a character at the current cursor position.
1086          *
1087          * @since               2.0
1088          *
1089          * @return              An error code
1090          * @exception   E_SUCCESS               The method is successful.
1091          * @exception   E_SYSTEM                A system error has occurred.
1092          * @remarks             The method modifies the text buffer that is managed by the %EditField control. To display the
1093          *              changes, the control must be drawn again.
1094          */
1095         result DeleteCharacterAtCursorPosition(void);
1096
1097         /**
1098          * Gets the range of the current text block.
1099          *
1100          * @since        2.0
1101          *
1102          * @param[out]   start   The first index of the current text block
1103          * @param[out]   end     The last index of the current text block
1104          */
1105         void GetCurrentTextRange(int& start, int& end) const;
1106
1107         /**
1108          * Sets the guide text.
1109          *
1110          * @since               2.0
1111          *
1112          * @param[in]   guideText    The guide text
1113          * @remarks             This is the default text that is displayed in the %EditField
1114          *              control when the focus is given to it and no text is entered.
1115          */
1116         void SetGuideText(const Tizen::Base::String& guideText);
1117
1118         /**
1119          * Gets the guide text.
1120          *
1121          * @since       2.0
1122          *
1123          * @return      The guide text, @n
1124          *              else an empty string if an error occurs
1125          * @exception   E_SUCCESS                       The method is successful.
1126          * @exception   E_SYSTEM                        A system error has occurred.
1127          * @remarks     The specific error code can be accessed using the GetLastResult() method.
1128          * @see         SetGuideText()
1129          */
1130         Tizen::Base::String GetGuideText(void) const;
1131
1132         /**
1133          * Gets the text color of the guide text.
1134          *
1135          * @since       2.0
1136          *
1137          * @return      The guide text color
1138          * @exception   E_SUCCESS                       The method is successful.
1139          * @exception   E_SYSTEM                        A system error has occurred.
1140          * @remarks     The specific error code can be accessed using the GetLastResult() method.
1141          * @see         SetGuideTextColor()
1142          */
1143         Tizen::Graphics::Color GetGuideTextColor(void) const;
1144
1145         /**
1146          * Sets the text color of the guide text.
1147          *
1148          * @since       2.0
1149          *
1150          * @return      An error code
1151          * @param[in]   color            The guide text color
1152          * @exception   E_SUCCESS                       The method is successful.
1153          * @exception   E_SYSTEM                        A system error has occurred.
1154          * @see         GetGuideTextColor()
1155          */
1156         result SetGuideTextColor(const Tizen::Graphics::Color& color);
1157
1158         /**
1159          * Gets the text color of the title for the specified status.
1160          *
1161          * @since               2.0
1162          *
1163          * @return              The title text color, @n
1164          *                              else RGBA(0,0,0,0) if an error occurs
1165          * @param[in]   status                  The state of the %EditField control
1166          * @exception   E_SUCCESS               The method is successful.
1167          * @exception   E_SYSTEM                A system error has occurred.
1168          * @remarks             The specific error code can be accessed using the GetLastResult() method.
1169          * @see                 SetTitleTextColor()
1170          */
1171         Tizen::Graphics::Color GetTitleTextColor(EditStatus status) const;
1172
1173         /**
1174          * Sets the text color of the title for the specified status.
1175          *
1176          * @since       2.0
1177          *
1178          * @return          An error code
1179          * @param[in]   status                  The state of the %EditField control
1180          * @param[in]   color                   The title text color
1181          * @exception   E_SUCCESS               The method is successful.
1182          * @exception   E_SYSTEM                A system error has occurred.
1183          * @see         GetTitleTextColor()
1184          */
1185         result SetTitleTextColor(EditStatus status, const Tizen::Graphics::Color& color);
1186
1187         /**
1188          * Enables or disables the keypad.
1189          *
1190          * @since               2.0
1191          *
1192          * @param[in]   enable  Set to @c true to enable the keypad,
1193          *                      else @c false
1194          */
1195         void SetKeypadEnabled(bool enable);
1196
1197         /**
1198          * Checks whether the keypad is enabled.
1199          *
1200          * @since        2.0
1201          *
1202          * @return       @c true if the keypad is enabled, @n
1203          *               else @c false
1204          */
1205         bool IsKeypadEnabled(void) const;
1206
1207         /**
1208         * Checks whether the text prediction is enabled.
1209         *
1210         * @since 2.0
1211         * @return                @c true if the text prediction is enabled, @n
1212         *                                 else @c false
1213         * @see                      SetTextPredictionEnabled()
1214         */
1215         bool IsTextPredictionEnabled(void) const;
1216
1217         /**
1218         * Enables or disables the text prediction.
1219         *
1220         * @since 2.0
1221         * @param[in]           enable                       Set to @c true to enable the text prediction, @n
1222         *                                                                    else @c false
1223         * @return                An error code
1224         * @exception           E_SUCCESS                The method is successful.
1225         * @exception            E_UNSUPPORTED_OPERATION     This operation is not supported.
1226         * @see                      IsTextPredictionEnabled()
1227         */
1228         result SetTextPredictionEnabled(bool enable);
1229
1230         /**
1231          * Displays the keypad. @n
1232          * The %ShowKeypad() method is supported only when the input style is ::INPUT_STYLE_OVERLAY.
1233          *
1234          * @since               2.0
1235          *
1236          * @return              An error code
1237          * @exception   E_SUCCESS       The method is successful.
1238          * @exception   E_INVALID_STATE This instance is in an invalid state.
1239          * @exception   E_SYSTEM                A system error has occurred.
1240          */
1241         result ShowKeypad(void);
1242
1243         /**
1244          * Gets the range of the current text block that is selected.
1245          *
1246          * @since               2.0
1247          *
1248          * @param[out]  start   The starting index of the current block
1249          * @param[out]  end     The end index of the current block
1250          */
1251         void GetBlockRange(int& start, int& end) const;
1252
1253         /**
1254          * Begins the text block from the current cursor position.
1255          *
1256          * @since               2.0
1257          *
1258          * @return              An error code
1259          * @exception   E_SUCCESS               The method is successful.
1260          * @exception   E_SYSTEM                A system error has occurred.
1261          * @remarks             Move the cursor position to the end of the text block.
1262          * @see         SetCursorPosition()
1263          * @see         ReleaseBlock()
1264          * @see                 IsBlocked()
1265          */
1266         result BeginBlock(void);
1267
1268         /**
1269          * Releases the selection of the current text block.
1270          *
1271          * @since               2.0
1272          *
1273          * @return              An error code
1274          * @exception   E_SUCCESS               The method is successful.
1275          * @exception   E_SYSTEM                A system error has occurred.
1276          * @see         BeginBlock()
1277          * @see                 IsBlocked()
1278          */
1279         result ReleaseBlock(void);
1280
1281         /**
1282          * Checks whether a portion of the text is blocked.
1283          *
1284          * @since       2.0
1285          *
1286          * @return      @c true if the text is blocked, @n
1287          *                      else @c false
1288          * @see     BeginBlock()
1289          * @see         ReleaseBlock()
1290          */
1291         bool IsBlocked(void) const;
1292
1293         /**
1294          * Copies the text block to the clipboard.
1295          *
1296          * @since               2.0
1297          *
1298          * @return              An error code
1299          * @exception   E_SUCCESS       The method is successful.
1300          * @exception   E_SYSTEM        A system error has occurred.
1301          * @see         Cut()
1302          * @see         Paste()
1303          * @see         Remove()
1304          */
1305         result Copy(void);
1306
1307         /**
1308          * Cuts the text block and copies it to the clipboard.
1309          *
1310          * @since               2.0
1311          *
1312          * @return              An error code
1313          * @exception   E_SUCCESS               The method is successful.
1314          * @exception   E_SYSTEM                A system error has occurred.
1315          * @see                 Copy()
1316          * @see                 Remove()
1317          * @see                 Paste()
1318          */
1319         result Cut(void);
1320
1321         /**
1322          * Pastes the copied text at the cursor position.
1323          *
1324          * @since               2.0
1325          *
1326          * @return              An error code
1327          * @exception   E_SUCCESS       The method is successful.
1328          * @exception   E_SYSTEM        A system error has occurred.
1329          * @see                 Copy()
1330          * @see                 Cut()
1331          * @see                 Remove()
1332          */
1333         result Paste(void);
1334
1335         /**
1336          * Removes the text that is marked by the text block.
1337          *
1338          * @since               2.0
1339          *
1340          * @return              An error code
1341          * @exception   E_SUCCESS               The method is successful.
1342          * @exception   E_SYSTEM                A system error has occurred.
1343          * @see                 Copy()
1344          * @see                 Cut()
1345          * @see                 Paste()
1346          */
1347         result Remove(void);
1348
1349         /**
1350          * Checks whether the text in the %EditField control is clipped.
1351          *
1352          * @since       2.0
1353          *
1354          * @return      @c true if the text is clipped, @n
1355          *                      else @c false
1356          * @remarks     'clipped' means that the text is copied to the clipboard.
1357          * @see         Copy()
1358          * @see         Cut()
1359          * @see         Paste()
1360          * @see         Remove()
1361          */
1362         bool IsClipped(void) const;
1363
1364         /**
1365          * Sets the title of the %EditField control.
1366          *
1367          * @since               2.0
1368          *
1369          * @return              An error code
1370          * @param[in]   title                   The title to set
1371          * @exception   E_SUCCESS               The method is successful.
1372          * @exception   E_SYSTEM                A system error has occurred.
1373          */
1374         result SetTitleText(const Tizen::Base::String& title);
1375
1376         /**
1377          * Gets the title text of the %EditField control.
1378          *
1379          * @since               2.0
1380          *
1381          * @return              The title text, @n
1382          *                              else an empty string if an error occurs
1383          */
1384         Tizen::Base::String GetTitleText(void) const;
1385
1386         /**
1387          * Sets the command button properties of the keypad. @n
1388          * The %SetOverlayKeypadCommandButton() method is supported only when the input style is ::INPUT_STYLE_OVERLAY.
1389          *
1390          * @since       2.0
1391          *
1392          * @return              An error code
1393          * @param[in]   position                        The position of the command button
1394          * @param[in]   text                            The label of the command button
1395          * @param[in]   actionId                        The action ID
1396          * @exception   E_SUCCESS           The method is successful.
1397          * @exception   E_SYSTEM            A system error has occurred.
1398          */
1399         result SetOverlayKeypadCommandButton(CommandButtonPosition position, const Tizen::Base::String& text, int actionId);
1400
1401         /**
1402          * Gets the text of the specified command button. @n
1403          * The %GetOverlayKeypadCommandButtonText() method is supported only when the input style is ::INPUT_STYLE_OVERLAY.
1404          *
1405          * @since               2.0
1406          *
1407          * @return              The text of the specified command button
1408          * @param[in]   position    The position of the command button
1409          */
1410         Tizen::Base::String GetOverlayKeypadCommandButtonText(CommandButtonPosition position) const;
1411
1412         /**
1413          * Gets the action ID of the specified command button. @n
1414          * The %GetOverlayKeypadCommandButtonActionId() method is supported only when the input style is ::INPUT_STYLE_OVERLAY.
1415          *
1416          * @since               2.0
1417          *
1418          * @return              The action ID of the specified command button
1419          * @param[in]   position    The position of the command button
1420          */
1421         int GetOverlayKeypadCommandButtonActionId(CommandButtonPosition position) const;
1422
1423         /**
1424           * Sets the input language.
1425           *
1426           * @since      2.0
1427           *
1428           * @brief <i> [Deprecated]  </i>
1429           * @deprecated We no longer provide a method to set the language of the current keypad. @n
1430           *                                This method is provided only for backward compatibility and will be deleted in the near future.
1431           * @return     An error code
1432           * @param[in]  languageCode                            The language to set
1433           * @exception  E_SUCCESS                               The method is successful.
1434           * @exception  E_OUT_OF_MEMORY                   The memory is insufficient.
1435           * @remarks
1436           *                     - The application can set the language of the current keypad that is associated with the current %EditField.
1437           *                     - This method only works if the language to set is supported by the current preloaded keypad.
1438           */
1439         result SetCurrentLanguage(Tizen::Locales::LanguageCode languageCode);
1440
1441         /**
1442           * Gets the current input language.
1443           *
1444           * @since      2.0
1445           *
1446           * @return     An error code
1447           * @param[out] language               The current input language
1448           * @exception  E_SUCCESS                               The method is successful.
1449           * @remarks     The application can get the current language of the keypad that is associated with the current %EditField.
1450           */
1451         result GetCurrentLanguage(Tizen::Locales::LanguageCode& language) const;
1452
1453         /**
1454          * Sets the text filter.
1455          *
1456          * @since               2.1
1457          *
1458          * @param[in]           pFilter The filter to set
1459          * @remarks             The %EditField control checks with the registered filter to decide whether the user-entered text should be replaced or not.
1460          */
1461         void  SetEditTextFilter(IEditTextFilter* pFilter);
1462
1463         /**
1464         * Sends opaque command to the input method.
1465         *
1466         * @since     2.1
1467         *
1468         * @param[in] command            The opaque command to send
1469         * @remarks
1470         *                       - This method can be used to provide domain-specific features that are only known between certain input methods and their clients.
1471         *                       - This method may not work, depending on the active Input Method.
1472         */
1473         void SendOpaqueCommand (const Tizen::Base::String& command);
1474
1475         /**
1476           * Sets the password text as visible when %EditField is in password-related styles.
1477           *
1478           * @since               2.2
1479           *
1480           * @return  An error code
1481           * @param[in] visible  Set to @c true to show password is visible as plain text, @n
1482           *                     else @c false
1483           * @exception E_SUCCESS        The method is successful.
1484           * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1485           *             This operation is supported when the EditFieldStyle is ::EDIT_FIELD_STYLE_PASSWORD, @n ::EDIT_FIELD_STYLE_PASSWORD_SMALL, ::EDIT_FIELD_STYLE_PASSWORD_NUMBER, or ::EDIT_FIELD_STYLE_PASSWORD_NUMBER_SMALL.
1486         */
1487         result SetPasswordVisible(bool visible);
1488
1489         /**
1490         * Checks whether the password text is visible when %EditField is in password-related styles
1491         *
1492         * @since 2.2
1493         *
1494         * @return  @c true if the password is visible as plain text, @n
1495         *        else @c false
1496         * @exception E_SUCCESS    The method is successful.
1497         * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1498           *             This operation is supported when the EditFieldStyle is ::EDIT_FIELD_STYLE_PASSWORD, @n ::EDIT_FIELD_STYLE_PASSWORD_SMALL, ::EDIT_FIELD_STYLE_PASSWORD_NUMBER, or ::EDIT_FIELD_STYLE_PASSWORD_NUMBER_SMALL.
1499         * @remarks The specific error code can be accessed using the GetLastResult() method.
1500         * @see   SetPasswordVisible()
1501         */
1502         bool IsPasswordVisible(void) const;
1503
1504 protected:
1505         friend class _EditFieldImpl;
1506
1507 private:
1508         EditField(const EditField&);
1509         EditField& operator =(const EditField&);
1510
1511 }; // EditField
1512
1513 }}} // Tizen::Ui::Controls
1514
1515 #endif // _FUI_CTRL_EDIT_FIELD_H_