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
665 * @exception E_SUCCESS The method is successful.
666 * @exception E_INVALID_ARG The specified @c size is invalid, @n
667 * or the specified @c size is a negative integer.
668 * @exception E_SYSTEM A system error has occurred.
669 * @remarks The specified @c size should be greater than or equal to minimum font size which is 4.0f.
670 * @see GetTextSizeF()
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
837 * @param[out] end The end index of the text block
838 * @exception E_SUCCESS The method is successful.
839 * @exception E_SYSTEM A system error has occurred.
840 * @remarks The method returns the start and end indexes as @c 0 if no text block is selected.
841 * @see ReleaseBlock()
842 * @see SetBlockRange()
844 result GetBlockRange(int& start, int& end) const;
847 * Releases the selection of the current text block.
851 * @return An error code
852 * @exception E_SUCCESS The method is successful.
853 * @exception E_SYSTEM A system error has occurred.
854 * @see GetBlockRange()
855 * @see SetBlockRange()
857 result ReleaseBlock(void);
860 * Removes the text content of the current text block.
864 * @return An error code
865 * @exception E_SUCCESS The method is successful.
866 * @exception E_OBJ_NOT_FOUND The specified instance is not found, @n
867 * or the text block is not selected.
868 * @exception E_SYSTEM A system error has occurred.
870 result RemoveTextBlock(void);
873 * Sets the block range for the text.
877 * @return An error code
878 * @param[in] start The start index of the text block
879 * @param[in] end The end index of the text block
880 * @exception E_SUCCESS The method is successful.
881 * @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure. @n
882 * Either the index is greater than the number of elements or less than @c 0.
883 * @exception E_SYSTEM A system error has occurred.
884 * @see ReleaseBlock()
885 * @see GetBlockRange()
887 result SetBlockRange(int start, int end);
891 * Gets the keypad action type.
895 * @return The keypad action
896 * @exception E_SUCCESS The method is successful.
897 * @exception E_SYSTEM A system error has occurred.
898 * @remarks The specific error code can be accessed using the GetLastResult() method.
899 * @see SetKeypadAction()
901 Tizen::Ui::KeypadAction GetKeypadAction(void) const;
904 * Gets the keypad style.
908 * @return The keypad style
909 * @exception E_SUCCESS The method is successful.
910 * @exception E_SYSTEM A system error has occurred.
911 * @remarks The specific error code can be accessed using the GetLastResult() method.
912 * @see SetKeypadStyle()
914 KeypadStyle GetKeypadStyle(void) const;
917 * Hides the keypad associated with the %ExpandableEditArea control.
921 * @return An error code
922 * @exception E_SUCCESS The method is successful.
923 * @exception E_SYSTEM A system error has occurred.
926 result HideKeypad(void);
929 * Checks whether the keypad is enabled.
933 * @return @c true if the keypad is enabled, @n
935 * @exception E_SUCCESS The method is successful.
936 * @exception E_SYSTEM A system error has occurred.
937 * @remarks The specific error code can be accessed using the GetLastResult() method.
938 * @see SetKeypadEnabled()
940 bool IsKeypadEnabled(void) const;
943 * Sets the keypad action type.
947 * @return An error code
948 * @param[in] keypadAction The keypad action
949 * @exception E_SUCCESS The method is successful.
950 * @exception E_SYSTEM A system error has occurred.
951 * @remarks Depending on the value of input param, the enter key label of the keypad will change accordingly.
952 * @see GetKeypadAction()
954 result SetKeypadAction(Tizen::Ui::KeypadAction keypadAction);
957 * Sets the keypad style.
961 * @return An error code
962 * @param[in] keypadStyle The keypad style
963 * @exception E_SUCCESS The method is successful.
964 * @exception E_INVALID_ARG The specified input parameter is invalid. @n
965 * The specified @c keypadStyle is @c KEYPAD_STYLE_PASSWORD.
966 * @exception E_SYSTEM A system error has occurred.
967 * @remarks Depending on the value of input param, the layout of the keypad will change accordingly.
968 * @see GetKeypadStyle()
970 result SetKeypadStyle(KeypadStyle keypadStyle);
973 * Checks whether the text prediction is enabled.
976 * @return @c true if the text prediction is enabled, @n
978 * @see SetTextPredictionEnabled()
980 bool IsTextPredictionEnabled(void) const;
983 * Enables or disables the text prediction.
986 * @param[in] enable Set to @c true to enable the text prediction, @n
988 * @return An error code
989 * @exception E_SUCCESS The method is successful.
990 * @exception E_UNSUPPORTED_OPERATION This operation is not supported.
991 * @see IsTextPredictionEnabled()
993 result SetTextPredictionEnabled(bool enable);
996 * Enables or disables the keypad.
1000 * @return An error code
1001 * @param[in] enable Set to @c true to enable the virtual keypad, @n
1003 * @exception E_SUCCESS The method is successful.
1004 * @exception E_SYSTEM A system error has occurred.
1005 * @see IsKeypadEnabled()
1007 result SetKeypadEnabled(bool enable);
1014 * @return An error code
1015 * @exception E_SUCCESS The method is successful.
1016 * @exception E_SYSTEM A system error has occurred.
1019 result ShowKeypad(void);
1023 * Sets the text token filter.
1027 * @return An error code
1028 * @param[in] pFilter The filter
1029 * @exception E_SUCCESS The method is successful.
1030 * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1031 * The operation is not supported if the style is not ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1032 * @exception E_SYSTEM A system error has occurred.
1033 * @remarks The %ExpandableEditArea control checks with the registered filter to decide whether the user-entered text should be replaced.
1035 result SetTokenFilter(const ITokenFilter* pFilter);
1038 * Gets the text token filter.
1042 * @return The filter, @n
1043 * else @c null if an error occurs
1044 * @exception E_SUCCESS The method is successful.
1045 * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1046 * The operation is not supported if the style is not ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1047 * @exception E_SYSTEM A system error has occurred.
1048 * @remarks The specific error code can be accessed using the GetLastResult() method.
1050 ITokenFilter* GetTokenFilter(void) const;
1053 * Appends the specified token.
1057 * @return An error code
1058 * @param[in] token The token to append
1059 * @exception E_SUCCESS The method is successful.
1060 * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1061 * The operation is not supported if the style is not ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1062 * @exception E_INVALID_ARG The specified input parameter is invalid. @n
1063 * The length of the specified @c token is @c 0.
1064 * @exception E_SYSTEM A system error has occurred.
1066 result AppendToken(const Tizen::Base::String& token);
1069 * Inserts the token at the specified index.
1073 * @return An error code
1074 * @param[in] index The position to insert the token
1075 * @param[in] token The token to add
1076 * @exception E_SUCCESS The method is successful.
1077 * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1078 * The operation is not supported if the style is not ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1079 * @exception E_INVALID_ARG A specified input parameter is invalid. @n
1080 * The length of the specified @c token is @c 0.
1081 * @exception E_SYSTEM A system error has occurred.
1083 result InsertTokenAt(int index, const Tizen::Base::String& token);
1086 * Gets the token text at the specified index.
1090 * @return The token text at the specified index, @n
1091 * else an empty string if an error occurs
1092 * @param[in] index The position to get the token
1093 * @exception E_SUCCESS The method is successful.
1094 * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1095 * The operation is not supported if the style is not ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1096 * @exception E_OUT_OF_RANGE The specified index parameter is outside the bounds of the data structure. @n
1097 * Either the index is greater than the number of elements or less than @c 0.
1098 * @exception E_SYSTEM A system error has occurred.
1099 * @remarks The specific error code can be accessed using the GetLastResult() method.
1101 Tizen::Base::String GetTokenAt(int index) const;
1104 * Gets the total token count.
1108 * @return The total token count, @n
1109 * else @c -1 if an error occurs
1110 * @exception E_SUCCESS The method is successful.
1111 * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1112 * The operation is not supported if the style is not ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1113 * @exception E_SYSTEM A system error has occurred.
1114 * @remarks The specific error code can be accessed using the GetLastResult() method.
1116 int GetTokenCount(void) const;
1119 * Gets the index of the token that is selected.
1123 * @return The index of the selected token, @n
1124 * else @c -1 if no token is selected or if an error occurs
1125 * @exception E_SUCCESS The method is successful.
1126 * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1127 * The operation is not supported if the style is not ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1128 * @exception E_SYSTEM A system error has occurred.
1129 * @remarks The specific error code can be accessed using the GetLastResult() method.
1131 int GetSelectedTokenIndex(void) const;
1134 * Checks whether the token editing mode is enabled.
1138 * @return @c true if the editing mode is enabled, @n
1140 * @exception E_SUCCESS The method is successful.
1141 * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1142 * The operation is not supported if the style is not ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1143 * @exception E_SYSTEM A system error has occurred.
1144 * @remarks The specific error code can be accessed using the GetLastResult() method.
1146 bool IsTokenEditModeEnabled(void) const;
1149 * Removes the token at the specified index.
1153 * @return An error code
1154 * @param[in] index The index of the token to remove
1155 * @exception E_SUCCESS The method is successful.
1156 * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1157 * The operation is not supported if the style is not ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1158 * @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure. @n
1159 * Either the index is greater than the number of elements or less than @c 0.
1160 * @exception E_SYSTEM A system error has occurred.
1162 result RemoveTokenAt(int index);
1165 * Sets the selected state of the specified token.
1169 * @return An error code
1170 * @param[in] index The index of the token to select
1171 * @param[in] selected Set to @c true to select the specified token, @n
1172 * else @c false to unselect
1173 * @exception E_SUCCESS The method is successful.
1174 * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1175 * The operation is not supported if the style is not ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1176 * @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure. @n
1177 * Either the index is greater than the number of elements or less than @c 0.
1178 * @exception E_SYSTEM A system error has occurred.
1179 * @remarks The currently selected token gets unselected automatically.
1181 result SetTokenSelected(int index, bool selected);
1184 * Enables or disables the token edit mode.
1188 * @return An error code
1189 * @param[in] enable Set to @c true to enable the token editing mode, @n
1191 * @exception E_SUCCESS The method is successful.
1192 * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1193 * The operation is not supported if the style is not ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1194 * @exception E_SYSTEM A system error has occurred.
1196 result SetTokenEditModeEnabled(bool enable);
1200 * Gets the limit length.
1204 * @return The limit length, @n
1205 * else @c -1 if an error occurs @n
1206 * The default limit length is @c 2048.
1207 * @exception E_SUCCESS The method is successful.
1208 * @exception E_SYSTEM A system error has occurred.
1209 * @remarks The specific error code can be accessed using the GetLastResult() method.
1210 * @see SetLimitLength()
1212 int GetLimitLength(void) const;
1215 * Sets the limit length.
1219 * @return An error code
1220 * @param[in] limitLength The limit text length to set
1221 * @exception E_SUCCESS The method is successful.
1222 * @exception E_INVALID_ARG The specified input parameter is invalid, @n
1223 * or the specified limit length is @c 0 or negative.
1224 * @exception E_SYSTEM A system error has occurred.
1225 * @remarks The method modifies the text buffer that is managed by the %ExpandableEditArea control. To display the changes, the control must be drawn again.
1226 * @see GetLimitLength()
1228 result SetLimitLength(int limitLength);
1232 * Gets the color of the %ExpandableEditArea control for the specified status.
1236 * @return The color, @n
1237 * else RGBA (0,0,0,0) if an error occurs
1238 * @param[in] status The status
1239 * @exception E_SUCCESS The method is successful.
1240 * @exception E_SYSTEM A system error has occurred.
1241 * @remarks The specific error code can be accessed using the GetLastResult() method.
1243 Tizen::Graphics::Color GetColor(EditStatus status) const;
1246 * Gets the text color of the specified text type.
1250 * @return The text color, @n
1251 * else RGBA (0,0,0,0) if an error occurs
1252 * @param[in] type The text type
1253 * @exception E_SUCCESS The method is successful.
1254 * @exception E_INVALID_ARG The specified type is not supported, or @n
1255 * the specified @c type is @c EDIT_TEXT_COLOR_LINK.
1256 * @exception E_SYSTEM A system error has occurred.
1257 * @remarks The specific error code can be accessed using the GetLastResult() method.
1258 * @see SetTextColor()
1260 Tizen::Graphics::Color GetTextColor(EditTextColor type) const;
1263 * Gets the text color of the guide text.
1267 * @return The guide text color, @n
1268 * else RGBA (0,0,0,0) if an error occurs
1269 * @exception E_SUCCESS The method is successful.
1270 * @exception E_SYSTEM A system error has occurred.
1271 * @remarks The specific error code can be accessed using the GetLastResult() method.
1272 * @see SetGuideTextColor()
1274 Tizen::Graphics::Color GetGuideTextColor(void) const;
1277 * Gets the text color of the title for the specified status.
1281 * @return The title text color, @n
1282 * else RGBA (0,0,0,0) if an error occurs
1283 * @param[in] status The state of the %ExpandableEditArea control
1284 * @exception E_SUCCESS The method is successful.
1285 * @exception E_SYSTEM A system error has occurred.
1286 * @remarks The specific error code can be accessed using the GetLastResult() method.
1287 * @see SetTitleTextColor()
1289 Tizen::Graphics::Color GetTitleTextColor(EditStatus status) const;
1292 * Gets the color of the tokens for the specified status.
1296 * @return The token color, @n
1297 * else RGBA (0,0,0,0) if an error occurs
1298 * @param[in] status The status
1299 * @exception E_SUCCESS The method is successful.
1300 * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1301 * The operation is not supported if the style is not ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1302 * @exception E_SYSTEM A system error has occurred.
1303 * @remarks The specific error code can be accessed using the GetLastResult() method.
1304 * @see SetTokenColor
1306 Tizen::Graphics::Color GetTokenColor(ExpandableEditAreaTokenStatus status) const;
1309 * Gets the text color of tokens.
1313 * @return The text color, @n
1314 * else RGBA (0,0,0,0) if an error occurs
1315 * @exception E_SUCCESS The method is successful.
1316 * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1317 * The operation is not supported if the style is not ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1318 * @exception E_SYSTEM A system error has occurred.
1319 * @remarks The specific error code can be accessed using the GetLastResult() method.
1320 * @see SetTokenTextColor()
1322 Tizen::Graphics::Color GetTokenTextColor(void) const;
1325 * Gets the text color of tokens at the specified index.
1329 * @return The text color, @n
1330 * else RGBA (0,0,0,0) if an error occurs
1331 * @exception E_SUCCESS The method is successful.
1332 * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1333 * The operation is not supported if the style is not ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1334 * @exception E_SYSTEM A system error has occurred.
1335 * @remarks The specific error code can be accessed using the GetLastResult() method.
1336 * @see SetSelectedTokenTextColor()
1338 Tizen::Graphics::Color GetSelectedTokenTextColor(void) const;
1341 * Sets the background bitmap of the %ExpandableEditArea control.
1345 * @return An error code
1346 * @param[in] status The status
1347 * @param[in] bitmap The background bitmap
1348 * @exception E_SUCCESS The method is successful.
1349 * @exception E_SYSTEM A system error has occurred.
1351 result SetBackgroundBitmap(EditStatus status, const Tizen::Graphics::Bitmap& bitmap);
1354 * Sets the color of the %ExpandableEditArea control.
1358 * @return An error code
1359 * @param[in] status The status of the %ExpandableEditArea control
1360 * @param[in] color The color
1361 * @exception E_SUCCESS The method is successful.
1362 * @exception E_SYSTEM A system error has occurred.
1365 result SetColor(EditStatus status, const Tizen::Graphics::Color& color);
1368 * Sets the text color of the guide text.
1372 * @return An error code
1373 * @param[in] color The guide text color
1374 * @exception E_SUCCESS The method is successful.
1375 * @exception E_SYSTEM A system error has occurred.
1376 * @see GetGuideTextColor()
1378 result SetGuideTextColor(const Tizen::Graphics::Color& color);
1381 * Sets the text color of the title for the specified status.
1385 * @return An error code
1386 * @param[in] status The status of the %ExpandableEditArea control
1387 * @param[in] color The title text color
1388 * @exception E_SUCCESS The method is successful.
1389 * @exception E_SYSTEM A system error has occurred.
1390 * @see GetTitleTextColor()
1392 result SetTitleTextColor(EditStatus status, const Tizen::Graphics::Color& color);
1395 * Sets the text color of the %ExpandableEditArea control.
1399 * @return An error code
1400 * @param[in] type The text type
1401 * @param[in] color The text color
1402 * @exception E_SUCCESS The method is successful.
1403 * @exception E_SYSTEM A system error has occurred.
1404 * @see GetTextColor()
1406 result SetTextColor(EditTextColor type, const Tizen::Graphics::Color& color);
1409 * Sets the text color of the tokens at the specified index.
1413 * @return An error code
1414 * @param[in] color The token text color
1415 * @exception E_SUCCESS The method is successful.
1416 * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1417 * The operation is not supported if the style is not ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1418 * @exception E_SYSTEM A system error has occurred.
1419 * @see GetSelectedTokenTextColor()
1421 result SetSelectedTokenTextColor(const Tizen::Graphics::Color& color);
1424 * Sets the color of the tokens for the specified status.
1428 * @return An error code
1429 * @param[in] status The status
1430 * @param[in] color The token color
1431 * @exception E_SUCCESS The method is successful.
1432 * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1433 * The operation is not supported if the style is not ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1434 * @exception E_SYSTEM A system error has occurred.
1435 * @see GetTokenColor()
1437 result SetTokenColor(ExpandableEditAreaTokenStatus status, const Tizen::Graphics::Color& color);
1440 * Sets the text color of the tokens.
1444 * @return An error code
1445 * @param[in] color The token text color
1446 * @exception E_SUCCESS The method is successful.
1447 * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1448 * The operation is not supported if the style is not ::EXPANDABLE_EDIT_AREA_STYLE_TOKEN.
1449 * @exception E_SYSTEM A system error has occurred.
1450 * @see GetTokenTextColor()
1452 result SetTokenTextColor(const Tizen::Graphics::Color& color);
1456 * Enables or disables the auto resizing if the candidate word list appears.
1458 * @brief <i> [Deprecated] </i>
1459 * @deprecated This method is deprecated because it is no longer necessary to handle the resizing of expandable edit area.
1462 * @return An error code
1463 * @param[in] enable Set to @c true to enable the auto resizing, @n
1465 * @exception E_SUCCESS The method is successful.
1466 * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1467 * The current style of the %ExpandableEditArea does not support the operation.
1468 * @remarks Note that when this option is enabled, the normal style %ExpandableEditArea is auto resized and the line added and removed events are
1469 * generated if the candidate word list pop-up appears during the predictive texting. @n
1470 * The operation is not supported by the token style %ExpandableEditArea.
1471 * @see IsAutoResizingEnabled()
1472 * @see Tizen::Ui::Controls::IExpandableEditAreaEventListener
1475 result SetAutoResizingEnabled(bool enable);
1479 * Checks whether the auto-resizing is enabled.
1481 * @brief <i> [Deprecated] </i>
1482 * @deprecated This method is deprecated because it is no longer necessary to handle the resizing of expandable edit area.
1485 * @return @c true if the auto-resizing is enabled, @n
1487 * @exception E_SUCCESS The method is successful.
1488 * @exception E_UNSUPPORTED_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1489 * The current style of the %ExpandableEditArea control does not support the operation.
1490 * @remarks The specific error code can be accessed using the GetLastResult() method.
1491 * @see SetAutoResizingEnabled()
1494 bool IsAutoResizingEnabled(void) const;
1497 * Sets the input language. @n
1498 * The %SetCurrentLanguage() method only works if the language to set is supported by the current preloaded keypad.
1502 * @brief <i> [Deprecated] </i>
1503 * @deprecated We no longer provide a method to set the language of the current keypad. @n
1504 * This method is provided only for backward compatibility and will be deleted in the near future.
1505 * @return An error code
1506 * @param[in] languageCode The language to set
1507 * @exception E_SUCCESS The method is successful.
1508 * @exception E_OUT_OF_MEMORY The memory is insufficient.
1509 * @remarks The application can set the language of the current keypad that is associated with the current %ExpandableEditArea.
1511 result SetCurrentLanguage(Tizen::Locales::LanguageCode languageCode);
1514 * Gets the current input language.
1518 * @return An error code
1519 * @param[out] language The current input language
1520 * @exception E_SUCCESS The method is successful.
1521 * @remarks The application can get the current language of the keypad that is associated with the current %ExpandableEditArea.
1523 result GetCurrentLanguage(Tizen::Locales::LanguageCode& language) const;
1525 // EVENT LISTENER MANAGEMENT
1527 * Adds the specified IExpandableEditAreaEventListener instance. @n
1528 * The added listener can listen to events when a line is added or removed or when a button is pressed.
1532 * @param[in] listener The event listener to add
1533 * @see RemoveExpandableEditAreaEventListener()
1535 void AddExpandableEditAreaEventListener(IExpandableEditAreaEventListener& listener);
1538 * Adds the specified IKeypadEventListener instance. @n
1539 * The added listener is notified if the keypad associated with the edit area is opened or closed.
1543 * @param[in] listener The event listener to add
1544 * @see RemoveKeypadEventListener()
1546 void AddKeypadEventListener(Tizen::Ui::IKeypadEventListener& listener);
1549 * Adds the specified ITextBlockEventListener instance.
1553 * @param[in] listener The event listener to add
1554 * @remarks Programmatically modifying the text block does not cause the text block selection event to fire.
1555 * @see RemoveTextBlockEventListener()
1557 void AddTextBlockEventListener(Tizen::Ui::ITextBlockEventListener& listener);
1560 * Adds the specified ITextEventListener instance. @n
1561 * The added listener can listen to the text-changed event.
1565 * @param[in] listener The listener to add
1566 * @see RemoveTextEventListener()
1568 void AddTextEventListener(Tizen::Ui::ITextEventListener& listener);
1571 * Removes the specified IExpandableEditAreaEventListener instance. @n
1572 * The removed listener cannot listen to events when they are fired.
1576 * @param[in] listener The event listener to remove
1577 * @see AddActionEventListener()
1579 void RemoveExpandableEditAreaEventListener(IExpandableEditAreaEventListener& listener);
1582 * Removes the specified IKeypadEventListener listener. @n
1583 * The removed listener cannot listen to events when they are fired.
1587 * @param[in] listener The event listener to remove
1588 * @see AddKeypadEventListener()
1590 void RemoveKeypadEventListener(Tizen::Ui::IKeypadEventListener& listener);
1593 * Removes the specified ITextBlockEventListener listener. @n
1594 * The removed listener cannot listen to events when they are fired.
1598 * @param[in] listener The event listener to remove
1599 * @see AddTextBlockEventListener()
1601 void RemoveTextBlockEventListener(Tizen::Ui::ITextBlockEventListener& listener);
1604 * Removes the specified ITextEventListener instance. @n
1605 * The removed listener cannot listen to events when they are fired.
1609 * @param[in] listener The listener to remove
1610 * @see AddTextEventListener()
1612 void RemoveTextEventListener(Tizen::Ui::ITextEventListener& listener);
1615 * Adds a listener instance for language events. @n
1616 * The added listener is notified when the input language is changed.
1620 * @param[in] listener The listener to add
1621 * @remarks The application can recognize when the language is changed from the keypad by adding Tizen::Ui::ILanguageEventListener.
1622 * @see RemoveLanguageEventListener()
1625 void AddLanguageEventListener(Tizen::Ui::ILanguageEventListener& listener);
1628 * Removes the specified listener instance. @n
1629 * The removed listener cannot listen to events when they are fired.
1633 * @param[in] listener The listener to remove
1634 * @see AddLanguageEventListener()
1637 void RemoveLanguageEventListener(Tizen::Ui::ILanguageEventListener& listener);
1640 * Enables or disables the auto shrinking if the focus is lost. @n
1641 * Note that when this option is enabled, the %ExpandableEditArea is auto shrinked if the %ExpandableEditArea lost its focus.
1645 * @param[in] enable Set to @c true to enable the auto shrinking, @n
1647 * @see IsAutoShrinkModeEnabled()
1649 void SetAutoShrinkModeEnabled(bool enable);
1652 * Checks whether the auto-shrinking is enabled.
1656 * @return @c true if the auto-shrinking is enabled, @n
1658 * @see SetAutoShrinkModeEnabled()
1660 bool IsAutoShrinkModeEnabled(void) const;
1663 * Sets the text filter.
1667 * @param[in] pFilter The filter to set
1668 * @remarks The %ExpandableEditArea control checks with the registered filter to decide whether the user-entered text should be replaced or not.
1670 void SetEditTextFilter(IEditTextFilter* pFilter);
1673 * Sends opaque command to the input method.
1677 * @param[in] command The opaque command to send
1679 * - This method can be used to provide domain-specific features that are only known between certain input methods and their clients.
1680 * - This method may not work, depending on the active Input Method.
1682 void SendOpaqueCommand (const Tizen::Base::String& command);
1685 friend class _ExpandableEditAreaImpl;
1689 // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
1691 ExpandableEditArea(const ExpandableEditArea& rhs);
1694 // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
1696 ExpandableEditArea& operator =(const ExpandableEditArea& rhs);
1697 }; // ExpandableEditArea
1699 }}} // Tizen::Ui::Controls
1701 #endif // _FUI_CTRL_EXPANDABLE_EDIT_AREA_H_