2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
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
9 // http://www.apache.org/licenses/LICENSE-2.0/
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.
19 * @file FUiCtrlExpandableEditArea.h
20 * @brief This is the header file for the %ExpandableEditArea class.
22 * This header file contains the declarations of the %ExpandableEditArea class.
25 #ifndef _FUI_CTRL_EXPANDABLE_EDIT_AREA_H_
26 #define _FUI_CTRL_EXPANDABLE_EDIT_AREA_H_
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>
40 // Forward declaration
41 namespace Tizen { namespace Graphics
46 namespace Tizen { namespace Ui { namespace Controls
49 class IExpandableEditAreaEventListener;
52 * @enum ExpandableEditAreaStyle
54 * Defines the possible styles of the expandable edit area.
58 enum ExpandableEditAreaStyle
60 EXPANDABLE_EDIT_AREA_STYLE_NORMAL, /**< The normal expandable edit area */
61 EXPANDABLE_EDIT_AREA_STYLE_TOKEN /**< The token expandable edit area */
66 * @enum ExpandableEditAreaTitleStyle
68 * Defines the possible styles of the expandable edit area title.
72 enum ExpandableEditAreaTitleStyle
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 */
81 * @enum ExpandableEditAreaTokenStatus
83 * Defines the possible status of the expandable edit area tokens.
87 enum ExpandableEditAreaTokenStatus
89 EXPANDABLE_EDIT_AREA_TOKEN_STATUS_NORMAL = 0, /**< The normal status */
90 EXPANDABLE_EDIT_AREA_TOKEN_STATUS_SELECTED /**< The selected status */
95 * @class ExpandableEditArea
96 * @brief This class is an implementation of %ExpandableEditArea.
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.
102 * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_exp_editarea.htm">ExpandableEditArea</a>.
104 * The following sample code demonstrates how to use the %ExpandableEditArea class.
107 // Sample code for ExpandableEditAreaSample.h
110 class ExpandableEditAreaSample
111 : public Tizen::Ui::Controls::Form
112 , public Tizen::Ui::IKeypadEventListener
113 , public Tizen::Ui::Controls::IExpandableEditAreaEventListener
116 ExpandableEditAreaSample(void)
117 : __pExpandableEdit(null){}
119 bool Initialize(void);
120 virtual result OnInitializing(void);
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);
128 //IExpandableEditAreaEventListener
129 virtual void OnExpandableEditAreaLineAdded(Tizen::Ui::Controls::ExpandableEditArea& source, int newLineCount);
130 virtual void OnExpandableEditAreaLineRemoved(Tizen::Ui::Controls::ExpandableEditArea& source, int newLineCount);
133 Tizen::Ui::Controls::ExpandableEditArea* __pExpandableEdit;
139 // Sample code for ExpandableEditAreaSample.cpp
140 #include <FGraphics.h>
142 #include "ExpandableEditAreaSample.h"
144 using namespace Tizen::Graphics;;
145 using namespace Tizen::Ui;
146 using namespace Tizen::Ui::Controls;
149 ExpandableEditAreaSample::Initialize(void)
151 Construct(FORM_STYLE_NORMAL);
156 ExpandableEditAreaSample::OnInitializing(void)
158 result r = E_SUCCESS;
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);
164 // Adds an instance of IKeypadEventListenerevent and an instance of IExpandableEditAreaEventListener
165 __pExpandableEdit->AddKeypadEventListener(*this);
166 __pExpandableEdit->AddExpandableEditAreaEventListener(*this);
168 AddControl(__pExpandableEdit);
170 // Sets a focus to the expandable edit area
171 __pExpandableEdit->SetFocus();
176 // IKeypadEventListener implementation
178 ExpandableEditAreaSample::OnKeypadActionPerformed(Tizen::Ui::Control& source, Tizen::Ui::KeypadAction keypadAction)
184 ExpandableEditAreaSample::OnKeypadClosed(Tizen::Ui::Control& source)
190 ExpandableEditAreaSample::OnKeypadOpened(Tizen::Ui::Control& source)
196 ExpandableEditAreaSample::OnKeypadWillOpen(Tizen::Ui::Control& source)
201 // IExpandableEditAreaEventListener implementation
203 ExpandableEditAreaSample::OnExpandableEditAreaLineAdded(Tizen::Ui::Controls::ExpandableEditArea& source, int newLineCount)
209 ExpandableEditAreaSample::OnExpandableEditAreaLineRemoved(Tizen::Ui::Controls::ExpandableEditArea& source, int newLineCount)
215 class _OSP_EXPORT_ ExpandableEditArea
216 : public Tizen::Ui::Control
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.
225 ExpandableEditArea(void);
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.
233 virtual ~ExpandableEditArea(void);
236 * Initializes this instance of %ExpandableEditArea with the specified parameters.
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.
258 result Construct(const Tizen::Graphics::Rectangle& rect, ExpandableEditAreaStyle style, ExpandableEditAreaTitleStyle titleStyle, int maxExpandableLines = 10);
261 * Initializes this instance of %ExpandableEditArea with the specified parameters.
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.
283 result Construct(const Tizen::Graphics::FloatRectangle& rect, ExpandableEditAreaStyle style, ExpandableEditAreaTitleStyle titleStyle, int maxExpandableLines = 10);
287 * Appends the specified character at the end of the existing text.
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.
299 result AppendCharacter(const Tizen::Base::Character& character);
302 * Appends the specified text at the end of the existing text.
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.
314 result AppendText(const Tizen::Base::String& text);
317 * Appends the text that will be displayed by bitmap at the end of the existing text.
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.
331 result AppendText(const Tizen::Base::String& text, const Tizen::Graphics::Bitmap& textImage);
334 * Deletes the character present at the current cursor position.
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.
348 result DeleteCharacterAt(int index);
351 * Inserts a character at the specified index.
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.
365 result InsertCharacterAt(int index, const Tizen::Base::Character& character);
368 * Inserts the text at the specified index.
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.
381 result InsertTextAt(int index, const Tizen::Base::String& text);
384 * Inserts the text that will be displayed by bitmap at the specified text position.
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.
401 result InsertTextAt(int position, const Tizen::Base::String& text, const Tizen::Graphics::Bitmap& textImage);
404 * Gets the portion of the text that is displayed by the %ExpandableEditArea control.
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.
420 Tizen::Base::String GetText(int start, int end) const;
423 * Gets the text of the %ExpandableEditArea control.
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.
433 Tizen::Base::String GetText(void) const;
436 * Gets the text length.
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.
446 int GetTextLength(void) const;
449 * Sets the text to be displayed by the %ExpandableEditArea control.
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.
461 result SetText(const Tizen::Base::String& text);
464 * Clears the text that is displayed by the %ExpandableEditArea control.
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.
476 * Sets the title of the %ExpandableEditArea control.
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.
487 result SetTitleText(const Tizen::Base::String& title);
490 * Gets the title of the %ExpandableEditArea control.
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.
500 Tizen::Base::String GetTitleText(void) const;
504 * Gets the guide text.
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()
515 Tizen::Base::String GetGuideText(void) const;
518 * Sets the guide text to be displayed, when there is no data in the search field.
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()
528 result SetGuideText(const Tizen::Base::String& guideText);
532 * Gets the maximum line count supported by the flexible text edit.
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.
542 int GetMaxLineCount(void) const;
545 * Gets the line spacing.
548 * @return The line spacing, @n
549 * else @c -1 if an error occurs
550 * @see SetLineSpacing ()
552 int GetLineSpacing(void) const;
555 * Gets the line spacing.
558 * @return The line spacing, @n
559 * else @c -1.0f if an error occurs
560 * @see SetLineSpacing ()
563 float GetLineSpacingF(void) const;
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.
570 * The line spacing = (default line spacing) * multiplier + extra
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 ()
581 result SetLineSpacing(int multiplier, int extra);
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.
588 * The line spacing = (default line spacing) * multiplier + extra
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 ()
599 result SetLineSpacing(int multiplier, float extra);
602 * Gets the current line count.
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.
611 int GetTextLineCount(void) const;
615 * Gets the text size.
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.
626 int GetTextSize(void) const;
629 * Gets the text size.
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.
640 float GetTextSizeF(void) const;
643 * Sets the text size.
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.
656 result SetTextSize(int size);
659 * Sets the text size.
663 * @return An error code
664 * @param[in] size The text size @n
665 * The size should be greater than or equal to minimum font size which is 4.0f.
666 * @exception E_SUCCESS The method is successful.
667 * @exception E_INVALID_ARG The specified @c size is invalid, @n
668 * or the specified @c size is a negative integer.
669 * @exception E_SYSTEM A system error has occurred.
670 * @see GetTextSizeF()
672 result SetTextSize(float size);
676 * Gets the margin of the specified margin type.
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.
688 int GetMargin(EditMarginType marginType) const;
691 * Gets the margin of the specified margin type.
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.
703 float GetMarginF(EditMarginType marginType) const;
706 * Sets the margin for the specified margin type.
709 * @brief <i> [Compatibility] </i>
713 * @compatibility This method has compatibility issues with OSP compatible applications. @n
714 * For more information, see @ref CompSetMarginPage "here".
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.
725 result SetMargin(EditMarginType marginType, int margin);
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
734 * @section CompSetMarginPageSolutionSection Resolutions
735 * This issue has been resolved in Tizen. @n
740 * Sets the margin for the specified margin type.
743 * @brief <i> [Compatibility] </i>
747 * @compatibility This method has compatibility issues with OSP compatible applications. @n
748 * For more information, see @ref CompSetMarginPage "here".
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.
759 result SetMargin(EditMarginType marginType, float margin);
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
768 * @section CompSetMarginPageSolutionSection Resolutions
769 * This issue has been resolved in Tizen. @n
775 * Enables or disables the lowercase mode. @n
776 * When the lowercase mode is enabled, the text input starts with a lowercase character.
779 * @return An error code
780 * @param[in] enable Set to @c true to enable the lowercase mode, @n
782 * @exception E_SUCCESS The method is successful.
783 * @exception E_SYSTEM A system error has occurred.
784 * @see IsLowerCaseModeEnabled()
786 result SetLowerCaseModeEnabled(bool enable);
789 * Checks whether the lowercase mode is enabled.
793 * @return @c true if the lowercase mode is enabled, @n
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()
800 bool IsLowerCaseModeEnabled(void) const;
804 * Gets the cursor position.
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.
814 int GetCursorPosition(void) const;
817 * Sets the cursor at the specified position.
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.
827 result SetCursorPosition(int position);
831 * Gets the start and end indexes of the currently selected text block.
835 * @return An error code
836 * @param[out] start The start index of the text block @n
837 * The value is @c 0 if no text block is selected.
838 * @param[out] end The end index of the text block @n
839 * The value is @c 0 if no text block is selected.
840 * @exception E_SUCCESS The method is successful.
841 * @exception E_SYSTEM A system error has occurred.
842 * @see ReleaseBlock()
843 * @see SetBlockRange()
845 result GetBlockRange(int& start, int& end) const;
848 * Releases the selection of the current text block.
852 * @return An error code
853 * @exception E_SUCCESS The method is successful.
854 * @exception E_SYSTEM A system error has occurred.
855 * @see GetBlockRange()
856 * @see SetBlockRange()
858 result ReleaseBlock(void);
861 * Removes the text content of the current text block.
865 * @return An error code
866 * @exception E_SUCCESS The method is successful.
867 * @exception E_OBJ_NOT_FOUND The specified instance is not found, @n
868 * or the text block is not selected.
869 * @exception E_SYSTEM A system error has occurred.
871 result RemoveTextBlock(void);
874 * Sets the block range for the text.
878 * @return An error code
879 * @param[in] start The start index of the text block
880 * @param[in] end The end index of the text block
881 * @exception E_SUCCESS The method is successful.
882 * @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure. @n
883 * Either the index is greater than the number of elements or less than @c 0.
884 * @exception E_SYSTEM A system error has occurred.
885 * @see ReleaseBlock()
886 * @see GetBlockRange()
888 result SetBlockRange(int start, int end);
892 * Gets the keypad action type.
896 * @return The keypad action
897 * @exception E_SUCCESS The method is successful.
898 * @exception E_SYSTEM A system error has occurred.
899 * @remarks The specific error code can be accessed using the GetLastResult() method.
900 * @see SetKeypadAction()
902 Tizen::Ui::KeypadAction GetKeypadAction(void) const;
905 * Gets the keypad style.
909 * @return The keypad style
910 * @exception E_SUCCESS The method is successful.
911 * @exception E_SYSTEM A system error has occurred.
912 * @remarks The specific error code can be accessed using the GetLastResult() method.
913 * @see SetKeypadStyle()
915 KeypadStyle GetKeypadStyle(void) const;
918 * Hides the keypad associated with the %ExpandableEditArea control.
922 * @return An error code
923 * @exception E_SUCCESS The method is successful.
924 * @exception E_SYSTEM A system error has occurred.
927 result HideKeypad(void);
930 * Checks whether the keypad is enabled.
934 * @return @c true if the keypad is enabled, @n
936 * @exception E_SUCCESS The method is successful.
937 * @exception E_SYSTEM A system error has occurred.
938 * @remarks The specific error code can be accessed using the GetLastResult() method.
939 * @see SetKeypadEnabled()
941 bool IsKeypadEnabled(void) const;
944 * Sets the keypad action type.
948 * @return An error code
949 * @param[in] keypadAction The keypad action
950 * @exception E_SUCCESS The method is successful.
951 * @exception E_SYSTEM A system error has occurred.
952 * @remarks Depending on the value of input param, the enter key label of the keypad will change accordingly.
953 * @see GetKeypadAction()
955 result SetKeypadAction(Tizen::Ui::KeypadAction keypadAction);
958 * Sets the keypad style.
962 * @return An error code
963 * @param[in] keypadStyle The keypad style
964 * @exception E_SUCCESS The method is successful.
965 * @exception E_INVALID_ARG The specified input parameter is invalid. @n
966 * The specified @c keypadStyle is @c KEYPAD_STYLE_PASSWORD.
967 * @exception E_SYSTEM A system error has occurred.
968 * @remarks Depending on the value of input param, the layout of the keypad will change accordingly.
969 * @see GetKeypadStyle()
971 result SetKeypadStyle(KeypadStyle keypadStyle);
974 * Checks whether the text prediction is enabled.
977 * @return @c true if the text prediction is enabled, @n
979 * @see SetTextPredictionEnabled()
981 bool IsTextPredictionEnabled(void) const;
984 * Enables or disables the text prediction.
987 * @param[in] enable Set to @c true to enable the text prediction, @n
989 * @return An error code
990 * @exception E_SUCCESS The method is successful.
991 * @exception E_UNSUPPORTED_OPERATION This operation is not supported.
992 * @see IsTextPredictionEnabled()
994 result SetTextPredictionEnabled(bool enable);
997 * Enables or disables the keypad.
1001 * @return An error code
1002 * @param[in] enable Set to @c true to enable the virtual keypad, @n
1004 * @exception E_SUCCESS The method is successful.
1005 * @exception E_SYSTEM A system error has occurred.
1006 * @see IsKeypadEnabled()
1008 result SetKeypadEnabled(bool enable);
1015 * @return An error code
1016 * @exception E_SUCCESS The method is successful.
1017 * @exception E_SYSTEM A system error has occurred.
1020 result ShowKeypad(void);
1024 * Sets the text token filter.
1028 * @return An error code
1029 * @param[in] pFilter The filter
1030 * @exception E_SUCCESS The method is successful.
1031 * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1032 * The operation is not supported if the style is not ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1033 * @exception E_SYSTEM A system error has occurred.
1034 * @remarks The %ExpandableEditArea control checks with the registered filter to decide whether the user-entered text should be replaced.
1036 result SetTokenFilter(const ITokenFilter* pFilter);
1039 * Gets the text token filter.
1043 * @return The filter, @n
1044 * else @c null if an error occurs
1045 * @exception E_SUCCESS The method is successful.
1046 * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1047 * The operation is not supported if the style is not ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1048 * @exception E_SYSTEM A system error has occurred.
1049 * @remarks The specific error code can be accessed using the GetLastResult() method.
1051 ITokenFilter* GetTokenFilter(void) const;
1054 * Appends the specified token.
1058 * @return An error code
1059 * @param[in] token The token to append
1060 * @exception E_SUCCESS The method is successful.
1061 * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1062 * The operation is not supported if the style is not ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1063 * @exception E_INVALID_ARG The specified input parameter is invalid. @n
1064 * The length of the specified @c token is @c 0.
1065 * @exception E_SYSTEM A system error has occurred.
1067 result AppendToken(const Tizen::Base::String& token);
1070 * Inserts the token at the specified index.
1074 * @return An error code
1075 * @param[in] index The position to insert the token
1076 * @param[in] token The token to add
1077 * @exception E_SUCCESS The method is successful.
1078 * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1079 * The operation is not supported if the style is not ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1080 * @exception E_INVALID_ARG A specified input parameter is invalid. @n
1081 * The length of the specified @c token is @c 0.
1082 * @exception E_SYSTEM A system error has occurred.
1084 result InsertTokenAt(int index, const Tizen::Base::String& token);
1087 * Gets the token text at the specified index.
1091 * @return The token text at the specified index, @n
1092 * else an empty string if an error occurs
1093 * @param[in] index The position to get the token
1094 * @exception E_SUCCESS The method is successful.
1095 * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1096 * The operation is not supported if the style is not ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1097 * @exception E_OUT_OF_RANGE The specified index parameter is outside the bounds of the data structure. @n
1098 * Either the index is greater than the number of elements or less than @c 0.
1099 * @exception E_SYSTEM A system error has occurred.
1100 * @remarks The specific error code can be accessed using the GetLastResult() method.
1102 Tizen::Base::String GetTokenAt(int index) const;
1105 * Gets the total token count.
1109 * @return The total token count, @n
1110 * else @c -1 if an error occurs
1111 * @exception E_SUCCESS The method is successful.
1112 * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1113 * The operation is not supported if the style is not ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1114 * @exception E_SYSTEM A system error has occurred.
1115 * @remarks The specific error code can be accessed using the GetLastResult() method.
1117 int GetTokenCount(void) const;
1120 * Gets the index of the token that is selected.
1124 * @return The index of the selected token, @n
1125 * else @c -1 if no token is selected or if an error occurs
1126 * @exception E_SUCCESS The method is successful.
1127 * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1128 * The operation is not supported if the style is not ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1129 * @exception E_SYSTEM A system error has occurred.
1130 * @remarks The specific error code can be accessed using the GetLastResult() method.
1132 int GetSelectedTokenIndex(void) const;
1135 * Checks whether the token editing mode is enabled.
1139 * @return @c true if the editing mode is enabled, @n
1141 * @exception E_SUCCESS The method is successful.
1142 * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1143 * The operation is not supported if the style is not ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1144 * @exception E_SYSTEM A system error has occurred.
1145 * @remarks The specific error code can be accessed using the GetLastResult() method.
1147 bool IsTokenEditModeEnabled(void) const;
1150 * Removes the token at the specified index.
1154 * @return An error code
1155 * @param[in] index The index of the token to remove
1156 * @exception E_SUCCESS The method is successful.
1157 * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1158 * The operation is not supported if the style is not ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1159 * @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure. @n
1160 * Either the index is greater than the number of elements or less than @c 0.
1161 * @exception E_SYSTEM A system error has occurred.
1163 result RemoveTokenAt(int index);
1166 * Sets the selected state of the specified token.
1170 * @return An error code
1171 * @param[in] index The index of the token to select
1172 * @param[in] selected Set to @c true to select the specified token, @n
1173 * else @c false to unselect
1174 * @exception E_SUCCESS The method is successful.
1175 * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1176 * The operation is not supported if the style is not ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1177 * @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure. @n
1178 * Either the index is greater than the number of elements or less than @c 0.
1179 * @exception E_SYSTEM A system error has occurred.
1180 * @remarks The currently selected token gets unselected automatically.
1182 result SetTokenSelected(int index, bool selected);
1185 * Enables or disables the token edit mode.
1189 * @return An error code
1190 * @param[in] enable Set to @c true to enable the token editing mode, @n
1192 * @exception E_SUCCESS The method is successful.
1193 * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1194 * The operation is not supported if the style is not ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1195 * @exception E_SYSTEM A system error has occurred.
1197 result SetTokenEditModeEnabled(bool enable);
1201 * Gets the limit length.
1205 * @return The limit length, @n
1206 * else @c -1 if an error occurs @n
1207 * The default limit length is @c 2048.
1208 * @exception E_SUCCESS The method is successful.
1209 * @exception E_SYSTEM A system error has occurred.
1210 * @remarks The specific error code can be accessed using the GetLastResult() method.
1211 * @see SetLimitLength()
1213 int GetLimitLength(void) const;
1216 * Sets the limit length.
1220 * @return An error code
1221 * @param[in] limitLength The limit text length to set
1222 * @exception E_SUCCESS The method is successful.
1223 * @exception E_INVALID_ARG The specified input parameter is invalid, @n
1224 * or the specified limit length is @c 0 or negative.
1225 * @exception E_SYSTEM A system error has occurred.
1226 * @remarks The method modifies the text buffer that is managed by the %ExpandableEditArea control. To display the changes, the control must be drawn again.
1227 * @see GetLimitLength()
1229 result SetLimitLength(int limitLength);
1233 * Gets the color of the %ExpandableEditArea control for the specified status.
1237 * @return The color, @n
1238 * else RGBA (0,0,0,0) if an error occurs
1239 * @param[in] status The status
1240 * @exception E_SUCCESS The method is successful.
1241 * @exception E_SYSTEM A system error has occurred.
1242 * @remarks The specific error code can be accessed using the GetLastResult() method.
1244 Tizen::Graphics::Color GetColor(EditStatus status) const;
1247 * Gets the text color of the specified text type.
1251 * @return The text color, @n
1252 * else RGBA (0,0,0,0) if an error occurs
1253 * @param[in] type The text type
1254 * @exception E_SUCCESS The method is successful.
1255 * @exception E_INVALID_ARG The specified type is not supported, or @n
1256 * the specified @c type is @c EDIT_TEXT_COLOR_LINK.
1257 * @exception E_SYSTEM A system error has occurred.
1258 * @remarks The specific error code can be accessed using the GetLastResult() method.
1259 * @see SetTextColor()
1261 Tizen::Graphics::Color GetTextColor(EditTextColor type) const;
1264 * Gets the text color of the guide text.
1268 * @return The guide text color, @n
1269 * else RGBA (0,0,0,0) if an error occurs
1270 * @exception E_SUCCESS The method is successful.
1271 * @exception E_SYSTEM A system error has occurred.
1272 * @remarks The specific error code can be accessed using the GetLastResult() method.
1273 * @see SetGuideTextColor()
1275 Tizen::Graphics::Color GetGuideTextColor(void) const;
1278 * Gets the text color of the title for the specified status.
1282 * @return The title text color, @n
1283 * else RGBA (0,0,0,0) if an error occurs
1284 * @param[in] status The state of the %ExpandableEditArea control
1285 * @exception E_SUCCESS The method is successful.
1286 * @exception E_SYSTEM A system error has occurred.
1287 * @remarks The specific error code can be accessed using the GetLastResult() method.
1288 * @see SetTitleTextColor()
1290 Tizen::Graphics::Color GetTitleTextColor(EditStatus status) const;
1293 * Gets the color of the tokens for the specified status.
1297 * @return The token color, @n
1298 * else RGBA (0,0,0,0) if an error occurs
1299 * @param[in] status The status
1300 * @exception E_SUCCESS The method is successful.
1301 * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1302 * The operation is not supported if the style is not ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1303 * @exception E_SYSTEM A system error has occurred.
1304 * @remarks The specific error code can be accessed using the GetLastResult() method.
1305 * @see SetTokenColor
1307 Tizen::Graphics::Color GetTokenColor(ExpandableEditAreaTokenStatus status) const;
1310 * Gets the text color of tokens.
1314 * @return The text color, @n
1315 * else RGBA (0,0,0,0) if an error occurs
1316 * @exception E_SUCCESS The method is successful.
1317 * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1318 * The operation is not supported if the style is not ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1319 * @exception E_SYSTEM A system error has occurred.
1320 * @remarks The specific error code can be accessed using the GetLastResult() method.
1321 * @see SetTokenTextColor()
1323 Tizen::Graphics::Color GetTokenTextColor(void) const;
1326 * Gets the text color of tokens at the specified index.
1330 * @return The text color, @n
1331 * else RGBA (0,0,0,0) if an error occurs
1332 * @exception E_SUCCESS The method is successful.
1333 * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1334 * The operation is not supported if the style is not ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1335 * @exception E_SYSTEM A system error has occurred.
1336 * @remarks The specific error code can be accessed using the GetLastResult() method.
1337 * @see SetSelectedTokenTextColor()
1339 Tizen::Graphics::Color GetSelectedTokenTextColor(void) const;
1342 * Sets the background bitmap of the %ExpandableEditArea control.
1346 * @return An error code
1347 * @param[in] status The status
1348 * @param[in] bitmap The background bitmap
1349 * @exception E_SUCCESS The method is successful.
1350 * @exception E_SYSTEM A system error has occurred.
1352 result SetBackgroundBitmap(EditStatus status, const Tizen::Graphics::Bitmap& bitmap);
1355 * Sets the color of the %ExpandableEditArea control.
1359 * @return An error code
1360 * @param[in] status The status of the %ExpandableEditArea control
1361 * @param[in] color The color
1362 * @exception E_SUCCESS The method is successful.
1363 * @exception E_SYSTEM A system error has occurred.
1366 result SetColor(EditStatus status, const Tizen::Graphics::Color& color);
1369 * Sets the text color of the guide text.
1373 * @return An error code
1374 * @param[in] color The guide text color
1375 * @exception E_SUCCESS The method is successful.
1376 * @exception E_SYSTEM A system error has occurred.
1377 * @see GetGuideTextColor()
1379 result SetGuideTextColor(const Tizen::Graphics::Color& color);
1382 * Sets the text color of the title for the specified status.
1386 * @return An error code
1387 * @param[in] status The status of the %ExpandableEditArea control
1388 * @param[in] color The title text color
1389 * @exception E_SUCCESS The method is successful.
1390 * @exception E_SYSTEM A system error has occurred.
1391 * @see GetTitleTextColor()
1393 result SetTitleTextColor(EditStatus status, const Tizen::Graphics::Color& color);
1396 * Sets the text color of the %ExpandableEditArea control.
1400 * @return An error code
1401 * @param[in] type The text type
1402 * @param[in] color The text color
1403 * @exception E_SUCCESS The method is successful.
1404 * @exception E_SYSTEM A system error has occurred.
1405 * @see GetTextColor()
1407 result SetTextColor(EditTextColor type, const Tizen::Graphics::Color& color);
1410 * Sets the text color of the tokens at the specified index.
1414 * @return An error code
1415 * @param[in] color The token text color
1416 * @exception E_SUCCESS The method is successful.
1417 * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1418 * The operation is not supported if the style is not ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1419 * @exception E_SYSTEM A system error has occurred.
1420 * @see GetSelectedTokenTextColor()
1422 result SetSelectedTokenTextColor(const Tizen::Graphics::Color& color);
1425 * Sets the color of the tokens for the specified status.
1429 * @return An error code
1430 * @param[in] status The status
1431 * @param[in] color The token color
1432 * @exception E_SUCCESS The method is successful.
1433 * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1434 * The operation is not supported if the style is not ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1435 * @exception E_SYSTEM A system error has occurred.
1436 * @see GetTokenColor()
1438 result SetTokenColor(ExpandableEditAreaTokenStatus status, const Tizen::Graphics::Color& color);
1441 * Sets the text color of the tokens.
1445 * @return An error code
1446 * @param[in] color The token text color
1447 * @exception E_SUCCESS The method is successful.
1448 * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1449 * The operation is not supported if the style is not ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1450 * @exception E_SYSTEM A system error has occurred.
1451 * @see GetTokenTextColor()
1453 result SetTokenTextColor(const Tizen::Graphics::Color& color);
1457 * Enables or disables the auto resizing if the candidate word list appears.
1459 * @brief <i> [Deprecated] </i>
1460 * @deprecated This method is deprecated because it is no longer necessary to handle the resizing of expandable edit area.
1463 * @return An error code
1464 * @param[in] enable Set to @c true to enable the auto resizing, @n
1466 * @exception E_SUCCESS The method is successful.
1467 * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1468 * The current style of the %ExpandableEditArea does not support the operation.
1469 * @remarks Note that when this option is enabled, the normal style %ExpandableEditArea is auto resized and the line added and removed events are
1470 * generated if the candidate word list pop-up appears during the predictive texting. @n
1471 * The operation is not supported by the token style %ExpandableEditArea.
1472 * @see IsAutoResizingEnabled()
1473 * @see Tizen::Ui::Controls::IExpandableEditAreaEventListener
1476 result SetAutoResizingEnabled(bool enable);
1480 * Checks whether the auto-resizing is enabled.
1482 * @brief <i> [Deprecated] </i>
1483 * @deprecated This method is deprecated because it is no longer necessary to handle the resizing of expandable edit area.
1486 * @return @c true if the auto-resizing is enabled, @n
1488 * @exception E_SUCCESS The method is successful.
1489 * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1490 * The current style of the %ExpandableEditArea control does not support the operation.
1491 * @remarks The specific error code can be accessed using the GetLastResult() method.
1492 * @see SetAutoResizingEnabled()
1495 bool IsAutoResizingEnabled(void) const;
1498 * Sets the input language. @n
1499 * The %SetCurrentLanguage() method only works if the language to set is supported by the current preloaded keypad.
1503 * @brief <i> [Deprecated] </i>
1504 * @deprecated We no longer provide a method to set the language of the current keypad. @n
1505 * This method is provided only for backward compatibility and will be deleted in the near future.
1506 * @return An error code
1507 * @param[in] languageCode The language to set
1508 * @exception E_SUCCESS The method is successful.
1509 * @exception E_OUT_OF_MEMORY The memory is insufficient.
1510 * @remarks The application can set the language of the current keypad that is associated with the current %ExpandableEditArea.
1512 result SetCurrentLanguage(Tizen::Locales::LanguageCode languageCode);
1515 * Gets the current input language.
1519 * @return An error code
1520 * @param[out] language The current input language
1521 * @exception E_SUCCESS The method is successful.
1522 * @remarks The application can get the current language of the keypad that is associated with the current %ExpandableEditArea.
1524 result GetCurrentLanguage(Tizen::Locales::LanguageCode& language) const;
1526 // EVENT LISTENER MANAGEMENT
1528 * Adds the specified IExpandableEditAreaEventListener instance. @n
1529 * The added listener can listen to events when a line is added or removed or when a button is pressed.
1533 * @param[in] listener The event listener to add
1534 * @see RemoveExpandableEditAreaEventListener()
1536 void AddExpandableEditAreaEventListener(IExpandableEditAreaEventListener& listener);
1539 * Adds the specified IKeypadEventListener instance. @n
1540 * The added listener is notified if the keypad associated with the edit area is opened or closed.
1544 * @param[in] listener The event listener to add
1545 * @see RemoveKeypadEventListener()
1547 void AddKeypadEventListener(Tizen::Ui::IKeypadEventListener& listener);
1550 * Adds the specified ITextBlockEventListener instance.
1554 * @param[in] listener The event listener to add
1555 * @remarks Programmatically modifying the text block does not cause the text block selection event to fire.
1556 * @see RemoveTextBlockEventListener()
1558 void AddTextBlockEventListener(Tizen::Ui::ITextBlockEventListener& listener);
1561 * Adds the specified ITextEventListener instance. @n
1562 * The added listener can listen to the text-changed event.
1566 * @param[in] listener The listener to add
1567 * @see RemoveTextEventListener()
1569 void AddTextEventListener(Tizen::Ui::ITextEventListener& listener);
1572 * Removes the specified IExpandableEditAreaEventListener instance. @n
1573 * The removed listener cannot listen to events when they are fired.
1577 * @param[in] listener The event listener to remove
1578 * @see AddActionEventListener()
1580 void RemoveExpandableEditAreaEventListener(IExpandableEditAreaEventListener& listener);
1583 * Removes the specified IKeypadEventListener listener. @n
1584 * The removed listener cannot listen to events when they are fired.
1588 * @param[in] listener The event listener to remove
1589 * @see AddKeypadEventListener()
1591 void RemoveKeypadEventListener(Tizen::Ui::IKeypadEventListener& listener);
1594 * Removes the specified ITextBlockEventListener listener. @n
1595 * The removed listener cannot listen to events when they are fired.
1599 * @param[in] listener The event listener to remove
1600 * @see AddTextBlockEventListener()
1602 void RemoveTextBlockEventListener(Tizen::Ui::ITextBlockEventListener& listener);
1605 * Removes the specified ITextEventListener instance. @n
1606 * The removed listener cannot listen to events when they are fired.
1610 * @param[in] listener The listener to remove
1611 * @see AddTextEventListener()
1613 void RemoveTextEventListener(Tizen::Ui::ITextEventListener& listener);
1616 * Adds a listener instance for language events. @n
1617 * The added listener is notified when the input language is changed.
1621 * @param[in] listener The listener to add
1622 * @remarks The application can recognize when the language is changed from the keypad by adding Tizen::Ui::ILanguageEventListener.
1623 * @see RemoveLanguageEventListener()
1626 void AddLanguageEventListener(Tizen::Ui::ILanguageEventListener& listener);
1629 * Removes the specified listener instance. @n
1630 * The removed listener cannot listen to events when they are fired.
1634 * @param[in] listener The listener to remove
1635 * @see AddLanguageEventListener()
1638 void RemoveLanguageEventListener(Tizen::Ui::ILanguageEventListener& listener);
1641 * Enables or disables the auto shrinking if the focus is lost. @n
1642 * Note that when this option is enabled, the %ExpandableEditArea is auto shrinked if the %ExpandableEditArea lost its focus.
1646 * @param[in] enable Set to @c true to enable the auto shrinking, @n
1648 * @see IsAutoShrinkModeEnabled()
1650 void SetAutoShrinkModeEnabled(bool enable);
1653 * Checks whether the auto-shrinking is enabled.
1657 * @return @c true if the auto-shrinking is enabled, @n
1659 * @see SetAutoShrinkModeEnabled()
1661 bool IsAutoShrinkModeEnabled(void) const;
1664 * Sets the text filter.
1668 * @param[in] pFilter The filter to set
1669 * @remarks The %ExpandableEditArea control checks with the registered filter to decide whether the user-entered text should be replaced or not.
1671 void SetEditTextFilter(IEditTextFilter* pFilter);
1674 * Sends opaque command to the input method.
1678 * @param[in] command The opaque command to send
1680 * - This method can be used to provide domain-specific features that are only known between certain input methods and their clients.
1681 * - This method may not work, depending on the active Input Method.
1683 void SendOpaqueCommand (const Tizen::Base::String& command);
1686 friend class _ExpandableEditAreaImpl;
1690 // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
1692 ExpandableEditArea(const ExpandableEditArea& rhs);
1695 // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
1697 ExpandableEditArea& operator =(const ExpandableEditArea& rhs);
1698 }; // ExpandableEditArea
1700 }}} // Tizen::Ui::Controls
1702 #endif // _FUI_CTRL_EXPANDABLE_EDIT_AREA_H_