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.
20 * @brief This is the header file for the %Form class.
22 * This header file contains the declarations of the %Form class.
24 #ifndef _FUI_CTRL_FORM_H_
25 #define _FUI_CTRL_FORM_H_
27 #include <FBaseTypes.h>
28 #include <FBaseString.h>
29 #include <FBaseColLinkedListT.h>
30 #include <FUiIActionEventListener.h>
31 #include <FUiContainer.h>
32 #include <FUiIOrientationEventListener.h>
33 #include <FUiCtrlControlsTypes.h>
34 #include <FUiCtrlOverlayRegion.h>
36 namespace Tizen { namespace Ui
38 class DataBindingContext;
41 namespace Tizen { namespace Ui { namespace Controls
46 class IFormBackEventListener;
51 * Defines the %Form control style.
57 FORM_STYLE_NORMAL = 0x00000000, /**< The basic form style */
58 FORM_STYLE_TITLE = 0x00000001, /**<@if OSPDEPREC @deprecated This enum value is deprecated because the use of the Title control is no longer recommended.@endif */
59 FORM_STYLE_INDICATOR = 0x00000002, /**< The form with the indicator area */
60 FORM_STYLE_SOFTKEY_0 = 0x00000010, /**<@if OSPDEPREC @deprecated This enum value is deprecated because the use of the Softkey control is no longer recommended.@endif */
61 FORM_STYLE_SOFTKEY_1 = 0x00000020, /**<@if OSPDEPREC @deprecated This enum value is deprecated because the use of the Softkey control is no longer recommended.@endif */
62 FORM_STYLE_OPTIONKEY = 0x00000040, /**<@if OSPDEPREC @deprecated This enum value is deprecated because the use of the Optionkey control is no longer recommended.@endif */
63 FORM_STYLE_TEXT_TAB = 0x00000100, /**<@if OSPDEPREC @deprecated This enum value is deprecated because the use of the Tab control is no longer recommended. @endif */
64 FORM_STYLE_ICON_TAB = 0x00000200, /**<@if OSPDEPREC @deprecated This enum value is deprecated because the use of the Tab control is no longer recommended. @endif */
65 FORM_STYLE_HEADER = 0x00001000, /**< The form with a header */
66 FORM_STYLE_FOOTER = 0x00002000, /**< The form with a footer */
67 FORM_STYLE_INDICATOR_AUTO_HIDE = 0x00010000 /**< The form with a indicator which is hidden. @b Since: @b 2.1 */
75 * Defines the softkey.
77 * @brief <i> [Deprecated] </i>
78 * @deprecated This enum type is deprecated because the use of the Softkey control is no longer recommended.
84 SOFTKEY_0, /**< @if OSPDEPREC The left softkey @endif */
85 SOFTKEY_1, /**< @if OSPDEPREC The right softkey @endif */
86 SOFTKEY_COUNT // This enum value is for internal use only. Using this enum value can cause behavioral, security-related, and consistency-related issues in the application.
93 * Defines the action bars that can be attached to the %Form control.
99 FORM_ACTION_BAR_INDICATOR = 0x0001, /**< The indicator */
100 FORM_ACTION_BAR_HEADER = 0x0002, /**< The header */
101 FORM_ACTION_BAR_FOOTER = 0x0004, /**< The footer */
102 FORM_ACTION_BAR_TAB = 0x0008 /**< The tab */ // Ki-Dong,Hong.Temp
108 * @brief This class provides a container with general controls.
112 * The %Form class displays a full screen container. It can contain user-created controls and system UI components, such
113 * as an indicator area, header, and footer. The application can have multiple forms that are all added to a single Frame.
115 * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_form.htm">Form</a>.
117 * The following example demonstrates how to use the %Form class.
120 // Creates an instance of Form
121 Form* pForm = new Form();
122 pForm->Construct(FORM_STYLE_NORMAL| FORM_STYLE_HEADER| FORM_STYLE_FOOTER);
124 // Gets a pointer of the frame
125 Frame *pFrame = UiApp::GetInstance()->GetAppFrame()->GetFrame();
126 pFrame->AddControl(*pForm);
127 pFrame->SetCurrentForm(*pForm);
129 // Implements MyActionEventListener
130 IActionEventListener* pListener = new MyActionEventListener();
133 Header * pHeader = GetHeader();
134 pHeader->SetTitleText(L"FormSample");
137 Footer * pFooter = GetFooter();
138 pFooter->SetStyle(FOOTER_STYLE_TAB);
139 pFooter->AddActionEventListener(*this);
141 // Calls Invalidate() to display the form
142 pForm->Invalidate(true)
145 * This is a simple UI application that uses a %Form.
146 *@image html ui_controls_form.png
149 class _OSP_EXPORT_ Form
150 : public Tizen::Ui::Container
155 * This is the default constructor for this class.
161 * This is the destructor for this class.
167 * Initializes this instance of %Form with the specified parameters.
171 * @return An error code
172 * @param[in] formStyle The form style @n
173 * Multiple form styles can be combined using bitwise OR.
174 * @exception E_SUCCESS The method is successful.
175 * @exception E_INVALID_ARG The specified input parameter is invalid.
176 * - ::FORM_STYLE_HEADER and ::FORM_STYLE_TITLE are specified at the same time.
177 * - ::FORM_STYLE_FOOTER and ::FORM_STYLE_SOFTKEY_0 are specified at the same time.
178 * - @c FORM_STYLE_FOOTER and ::FORM_STYLE_SOFTKEY_1 are specified at the same time.
179 * - @c FORM_STYLE_FOOTER and ::FORM_STYLE_OPTIONKEY are specified at the same time.
180 * @exception E_MAX_EXCEEDED The total number of Frames and Forms exceeds the system limitation.
181 * @exception E_SYSTEM A system error has occurred.
182 * @remarks The maximum number of Forms that an application can construct is limited by available memory.
185 result Construct(unsigned long formStyle);
189 * Initializes this instance of %Form with the specified resource ID. @n
190 * This method first attempts to find the resource file in the folder that corresponds to the current screen resolution. If it fails to find the
191 * appropriate resource file, the method tries searching in other folders. When AutoScaling is enabled, the method first searches the folder that
192 * corresponds to the current screen size category and then searches the "res/screen-size-normal/" folder.
196 * @return An error code
197 * @param[in] resourceId The resource ID describing the %Form control
198 * @exception E_SUCCESS The method is successful.
199 * @exception E_FILE_NOT_FOUND The specified file cannot be found.
200 * @exception E_INVALID_FORMAT The specified XML format is invalid.
201 * @exception E_OPERATION_FAILED The operation has failed.
203 result Construct(const Tizen::Base::String& resourceId);
206 * Initializes this instance of %Form with the form style and layout.
210 * @return An error code
211 * @param[in] layout The layout for both the portrait and landscape mode
212 * @param[in] formStyle The form style @n
213 * Multiple form styles can be combined using bitwise OR.
214 * @exception E_SUCCESS The method is successful.
215 * @exception E_INVALID_ARG A specified input parameter is invalid, or
216 * the specified layout is already bound to another container.
217 * @exception E_MAX_EXCEEDED The total number of Frames and Forms exceeds the system limitation.
218 * @exception E_SYSTEM A system error has occurred.
220 * - The maximum number of Forms that an application can construct is limited by available memory.
221 * - The children are arranged within the client area bounds of the form area by @c layout.
224 result Construct(const Tizen::Ui::Layout& layout, unsigned long formStyle);
227 * Initializes this instance of %Form with the specified parameters.
231 * @return An error code
232 * @param[in] portraitLayout The layout for the portrait mode
233 * @param[in] landscapeLayout The layout for the landscape mode
234 * @param[in] formStyle The form style @n
235 * Multiple form styles can be combined using bitwise OR.
236 * @exception E_SUCCESS The method is successful.
237 * @exception E_INVALID_ARG A specified input parameter is invalid, or
238 * the specified layout is already bound to another container.
239 * @exception E_MAX_EXCEEDED The total number of Frames and Forms exceeds the system limitation.
240 * @exception E_SYSTEM A system error has occurred.
242 * - The maximum number of Forms that an application can construct is limited by available memory.
243 * - The children are arranged within the bounds of the form area by @c layout.
246 result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, unsigned long formStyle);
251 * Adds an IOrientationEventListener instance. @n
252 * The added listener can listen to the orientation changed events that are fired when the orientation mode of the screen is changed.
256 * @param[in] listener The listener to add
257 * @remarks The %Form control can only listen to those changes to the orientation mode that are enabled by calling SetOrientation().
258 * @see RemoveOrientationEventListener()
260 void AddOrientationEventListener(Tizen::Ui::IOrientationEventListener& listener);
265 * Adds an IActionEventListener instance. @n
266 * The added listener can listen to the action events that are fired when an option key is selected.
268 * @brief <i> [Deprecated] </i>
269 * @deprecated This method is deprecated because the use of the Optionkey control is no longer recommended.
272 * @param[in] listener The listener to add
273 * @see RemoveOptionkeyActionListener()
276 void AddOptionkeyActionListener(Tizen::Ui::IActionEventListener& listener);
281 * Adds an IActionEventListener instance. @n
282 * The added listener can listen to the action events that are fired when a softkey is selected.
284 * @brief <i> [Deprecated] </i>
285 * @deprecated This method is deprecated because the use of the Softkey control is no longer recommended.
288 * @param[in] softkey The style of the softkey
289 * @param[in] listener The listener to add
290 * @see RemoveSoftkeyActionListener()
293 void AddSoftkeyActionListener(Softkey softkey, Tizen::Ui::IActionEventListener& listener);
298 * Removes an IActionEventListener instance. @n
299 * The removed listener cannot listen to the events when they are fired.
301 * @brief <i> [Deprecated] </i>
302 * @deprecated This method is deprecated because the use of the Optionkey control is no longer recommended.
305 * @param[in] listener The listener to remove
306 * @see AddOptionkeyActionListener()
309 void RemoveOptionkeyActionListener(Tizen::Ui::IActionEventListener& listener);
313 * Removes an IOrientationEventListener instance. @n
314 * The removed listener cannot listen to the events when they are fired.
318 * @param[in] listener The listener to remove
320 * @see AddOrientationEventListener()
322 void RemoveOrientationEventListener(Tizen::Ui::IOrientationEventListener& listener);
327 * Removes an IActionEventListener instance. @n
328 * The removed listener cannot listen to the events when they are fired.
330 * @brief <i> [Deprecated] </i>
331 * @deprecated This method is deprecated because the use of the Softkey control is no longer recommended.
334 * @param[in] softkey The style of the softkey
335 * @param[in] listener The listener to remove
336 * @see AddSoftkeyActionListener()
339 void RemoveSoftkeyActionListener(Softkey softkey, Tizen::Ui::IActionEventListener& listener);
344 * Gets the background color of the %Form control.
348 * @return The background color of the %Form control
350 Tizen::Graphics::Color GetBackgroundColor(void) const;
354 * Gets the bounds of the client area.
358 * @return The bounds of the client area
359 * @remarks The client area of the %Form control does not include the title, indicator, header and footer areas.
360 * header and footer areas.
363 Tizen::Graphics::Rectangle GetClientAreaBounds(void) const;
366 * Gets the bounds of the client area.
370 * @return The bounds of the client area
371 * @remarks The client area of the %Form control does not include the title, indicator, header and footer areas.
372 * header and footer areas.
375 Tizen::Graphics::FloatRectangle GetClientAreaBoundsF(void) const;
378 * Gets the style of the %Form control.
382 * @return An @c unsigned @c long value representing the style of the %Form control
384 unsigned long GetFormStyle(void) const;
388 * Gets the orientation mode of the %Form control.
392 * @return The orientation of the %Form control
394 Tizen::Ui::Orientation GetOrientation(void) const;
398 * Gets the current orientation status of the %Form control.
402 * @return The orientation status of the %Form control, @n
403 * else @c ORIENTATION_NONE if the %Form control is not the current form of the Frame control
405 Tizen::Ui::OrientationStatus GetOrientationStatus(void) const;
410 * Gets the action ID of the specified softkey.
412 * @brief <i> [Deprecated] </i>
413 * @deprecated This method is deprecated because the use of the Softkey control is no longer recommended.
416 * @return An integer value representing the action ID
417 * @param[in] softkey The softkey
420 int GetSoftkeyActionId(Softkey softkey) const;
425 * Gets the text of the specified softkey.
427 * @brief <i> [Deprecated] </i>
428 * @deprecated This method is deprecated because the use of the Softkey control is no longer recommended.
431 * @return The text of the softkey
432 * @param[in] softkey The softkey
435 Tizen::Base::String GetSoftkeyText(Softkey softkey) const;
440 * Gets the pointer of the Tab control if it exists.
442 * @brief <i> [Deprecated] </i>
443 * @deprecated This method is deprecated because the use of the Tab control is no longer recommended.
446 * @return A pointer to the Tab control, @n
447 * else @c null if there is no tab
448 * @remarks The retrieved pointer may be temporary. Therefore, it should not be stored after immediate use.
451 Tab* GetTab(void) const;
456 * Gets the title of the %Form control.
458 * @brief <i> [Deprecated] </i>
459 * @deprecated This method is deprecated because the use of the Title control is no longer recommended. Instead of the %Title control,
460 * use the Header control.
463 * @return The title of the %Form control
466 Tizen::Base::String GetTitleText(void) const;
471 * Gets the horizontal alignment of the title text.
473 * @brief <i> [Deprecated] </i>
474 * @deprecated This method is deprecated because the use of the Title control is no longer recommended. Instead of the %Title control,
475 * use the Header control.
478 * @return The horizontal alignment of the title text
479 * @remarks By default, the horizontal alignment is center aligned.
482 HorizontalAlignment GetTitleTextHorizontalAlignment(void) const;
485 * Checks whether the %Form control has an Indicator.
489 * @return @c true if the %Form control has a title, @n
492 bool HasIndicator(void) const;
497 * Checks whether the %Form control has an optionkey.
499 * @brief <i> [Deprecated] </i>
500 * @deprecated This method is deprecated because the use of the Optionkey control is no longer recommended.
503 * @return @c true if the %Form control has an optionkey, @n
507 bool HasOptionkey(void) const;
512 * Checks whether the %Form control has the specified softkey.
514 * @brief <i> [Deprecated] </i>
515 * @deprecated This method is deprecated because the use of the Softkey control is no longer recommended.
518 * @return @c true if the %Form control has the specified softkey, @n
520 * @param[in] softkey The required softkey
523 bool HasSoftkey(Softkey softkey) const;
528 * Checks whether the %Form control has a tab.
530 * @brief <i> [Deprecated] </i>
531 * @deprecated This method is deprecated because the use of the Tab control is no longer recommended.
534 * @return @c true if the %Form control has a tab, @n
538 bool HasTab(void) const;
543 * Checks whether the %Form control has a title.
545 * @brief <i> [Deprecated] </i>
546 * @deprecated This method is deprecated because the use of the Title control is no longer recommended. Instead of the %Title control,
547 * use the Header control.
550 * @return @c true if the %Form control has a title, @n
554 bool HasTitle(void) const;
559 * Checks whether the softkey is enabled.
561 * @brief <i> [Deprecated] </i>
562 * @deprecated This method is deprecated because the use of the Softkey control is no longer recommended.
565 * @return @c true if the softkey is enabled, @n
567 * @param[in] softkey The softkey
570 bool IsSoftkeyEnabled(Softkey softkey) const;
574 * Sets the background color of the %Form control.
578 * @param[in] color The background color to set
580 void SetBackgroundColor(const Tizen::Graphics::Color& color);
584 * Sets the style of the %Form control.
588 * @param[in] formStyle The form style to set @n
589 * This parameter can be a combination of Tizen::Ui::Controls::FormStyle.
590 * @exception E_SUCCESS The method is successful @if OSPCOMPAT @b Since: @b 2.0 @endif.
591 * @exception E_INVALID_ARG A specified input parameter is invalid.
592 * - ::FORM_STYLE_HEADER and ::FORM_STYLE_TITLE are specified at the same time.
593 * - ::FORM_STYLE_FOOTER and ::FORM_STYLE_SOFTKEY_0 are specified at the same time.
594 * - @c FORM_STYLE_FOOTER and ::FORM_STYLE_SOFTKEY_1 are specified at the same time.
595 * - @c FORM_STYLE_FOOTER and ::FORM_STYLE_OPTIONKEY are specified at the same time.
597 * - The specific error code can be accessed using the GetLastResult() method.
598 * - Note that you must not change the style of %Form control that is constructed with ::FORM_STYLE_TEXT_TAB
599 * or ::FORM_STYLE_ICON_TAB style.
600 * - A Form which is added to a container except Frame cannot have the style of ::FORM_STYLE_INDICATOR.
602 void SetFormStyle(unsigned long formStyle);
607 * Sets an action ID of the optionkey.
609 * @brief <i> [Deprecated] </i>
610 * @deprecated This method is deprecated because the use of the Optionkey control is no longer recommended.
613 * @param[in] actionId The action ID of this button instance
616 void SetOptionkeyActionId(int actionId);
620 * Sets the orientation of the %Form control.
624 * @feature %http://tizen.org/setting/screen.auto_rotation for the @c ORIENTATION_AUTOMATIC_FOUR_DIRECTION or
625 * @c ORIENTATION_AUTOMATIC value of @c orientation
626 * @param[in] orientation The orientation of the %Form control
627 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @b Since: @b 2.1 @n
628 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
630 * - The specific error code can be accessed using the GetLastResult() method.
631 * - Before calling this method, check whether the feature is supported by
632 * Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&).
634 void SetOrientation(Orientation orientation);
639 * Sets an action ID of each softkey.
641 * @brief <i> [Deprecated] </i>
642 * @deprecated This method is deprecated because the use of the Softkey control is no longer recommended.
645 * @param[in] softkey The softkey
646 * @param[in] actionId The action ID to set
649 void SetSoftkeyActionId(Softkey softkey, int actionId);
654 * Enables or disables the specified softkey.
656 * @brief <i> [Deprecated] </i>
657 * @deprecated This method is deprecated because the use of the Softkey control is no longer recommended.
660 * @param[in] softkey The softkey
661 * @param[in] enable Set to @c true to enable this softkey @n
665 void SetSoftkeyEnabled(Softkey softkey, bool enable);
670 * Sets the title icon of the %Form control.
672 * @brief <i> [Deprecated] </i>
673 * @deprecated This method is deprecated because the use of the Title control is no longer recommended. Instead of the %Title control,
674 * use the %Header control.
677 * @return An error code
678 * @param[in] pTitleBitmap The title icon to set, @n
679 * else @c null if the title icon is removed
680 * @exception E_SUCCESS The method is successful.
681 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of a specified operation
682 * (that is, this control cannot be displayed).
683 * @exception E_SYSTEM A system error has occurred.
686 result SetTitleIcon(const Tizen::Graphics::Bitmap* pTitleBitmap);
691 * Sets the title of this %Form control.
693 * @brief <i> [Deprecated] </i>
694 * @deprecated This method is deprecated because the use of the Title control is no longer recommended. Instead of the %Title control,
695 * use the Header control.
698 * @return An error code
699 * @param[in] title The title to set
700 * @param[in] alignment The horizontal alignment
701 * @exception E_SUCCESS The method is successful.
702 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of a specified operation
703 * (that is, this control cannot be displayed).
704 * @exception E_SYSTEM A system error has occurred.
706 * - If the size of the text exceeds the displayable area, the text slides automatically.
707 * - Note that when the title icon is set along with the title text, the title retains the left alignment.
710 result SetTitleText(const Tizen::Base::String& title, HorizontalAlignment alignment = ALIGNMENT_CENTER);
715 * Sets the icon of the softkey.
717 * @brief <i> [Deprecated] </i>
718 * @deprecated This method is deprecated because the use of the Softkey control is no longer recommended.
721 * @param[in] softkey The softkey
722 * @param[in] normalBitmap The Bitmap of the normal icon
723 * @param[in] pPressedBitmap The Bitmap of the pressed icon
724 * @remarks If both the icon and text are set for a softkey at the same time, the text takes precedence over the icon.
727 void SetSoftkeyIcon(Softkey softkey, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap);
731 * Sets the text of the specified softkey.
733 * @brief <i> [Deprecated] </i>
734 * @deprecated This method is deprecated because the use of the Softkey control is no longer recommended.
737 * @param[in] softkey The softkey
738 * @param[in] text The text to set
740 * - If both the icon and text are set for a softkey at the same time, the text takes precedence over the icon.
741 * - To display text in multi-lines or to denote the end of line, use '\\n'.
744 void SetSoftkeyText(Softkey softkey, const Tizen::Base::String& text);
747 * Gets the pointer to the Footer control if it exists.
751 * @return A pointer to the Footer control, @n
752 * else @c null if there is no %Footer
753 * @remarks The retrieved pointer may be temporary. Therefore, it should not be stored after immediate use. @n
754 * The optimal size of the control is defined in
755 * <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
757 Footer* GetFooter(void) const;
761 * Gets the pointer to the Header control if it exists.
765 * @return A pointer to the Header control, @n
766 * else @c null if there is no %Header
767 * @remarks The retrieved pointer may be temporary. Therefore, it should not be
768 * stored after immediate use. @n
769 * The optimal size of the control is defined in
770 * <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
772 Header* GetHeader(void) const;
776 * Checks whether the %Form control has a Footer.
780 * @return @c true if the %Form control has a Footer, @n
783 bool HasFooter(void) const;
787 * Checks whether the %Form control has a Header.
791 * @return @c true if the %Form control has a Header, @n
794 bool HasHeader(void) const;
798 * Checks whether the Indicator control is visible.
802 * @return @c true if the Indicator control is visible, @n
805 bool IsIndicatorVisible(void) const;
809 * Checks whether the Header control is visible.
813 * @return @c true if the Header control is visible, @n
816 bool IsHeaderVisible(void) const;
820 * Checks whether the Footer control is visible.
824 * @return @c true if the Footer control is visible, @n
827 bool IsFooterVisible(void) const;
831 * Checks whether the Indicator control is translucent.
835 * @return @c true if the Indicator control is translucent, @n
838 bool IsIndicatorTranslucent(void) const;
842 * Checks whether the Header control is translucent.
846 * @return @c true if the Header control is translucent, @n
849 bool IsHeaderTranslucent(void) const;
853 * Checks whether the Footer control is translucent.
857 * @return @c true if the Footer control is translucent, @n
860 bool IsFooterTranslucent(void) const;
864 * Sets the translucency of the action bars.
868 * @return An error code
869 * @param[in] actionBars The action bars @n
870 * Multiple action bars can be combined using bitwise OR (see Tizen::Ui::Controls::FormActionBar).
871 * @param[in] translucent Set to @c to make the action bars translucent, @n
873 * @exception E_SUCCESS The method is successful.
874 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of a specified operation, or
875 * the specified action bars do not exist.
876 * @exception E_UNSUPPORTED_OPERATION This operation is not supported.
877 * @exception E_SYSTEM A system error has occurred.
879 * - Modifying the translucency of the action bars causes the client area of the %Form to change.
880 * - The translucency of multiple action bars can be modified at the same time by using logical OR for several values of FormActionBar.
881 * - The method is not supported in 16-bit devices.
883 result SetActionBarsTranslucent(unsigned long actionBars, bool translucent);
887 * Sets the visibility state of the action bars.
891 * @return An error code
892 * @param[in] actionBars The action bars @n
893 * Multiple action bars can be combined using bitwise OR.
894 * @param[in] visible Set to @c true to make the action bars visible, @n
896 * @exception E_SUCCESS The method is successful.
897 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation, or
898 * the specified action bars does not exist.
899 * @exception E_SYSTEM A system error has occurred.
901 * - Modifying the translucency of action bars causes the client area of the %Form to change.
902 * - The visibility of multiple action bars can be modified at the same time by using logical OR for several values of FormActionBar.
905 result SetActionBarsVisible(unsigned long actionBars, bool visible);
909 * Creates and returns an overlay region of the specified position and size. @n
910 * Due to the hardware accelerated rendering, there are limitations for an overlay region. @n
911 * The hardware capability for an overlay region is checked by using OverlayRegion::GetWidthUnit(), OverlayRegion::GetHeightUnit() and
912 * OverlayRegion::GetMaxCount().
913 * If the specified condition is not satisfied, @c E_INVALID_ARG exception is returned.
917 * @return An overlay region instance
918 * @param[in] rect The x and y coordinates relative to the top-left corner of the form along with the width and height
919 * @param[in] regionType The type of the overlay region
920 * @exception E_SUCCESS The method is successful.
921 * @exception E_INVALID_ARG A specified input parameter is invalid.
922 * @exception E_MAX_EXCEEDED The number of overlay regions has reached the maximum limit.
923 * @exception E_UNSUPPORTED_OPTION The specified option of the overlay region type is not supported.
924 * @exception E_SYSTEM A system error has occurred.
926 * - The specific error code can be accessed using the GetLastResult() method.
927 * - If the application runs on multi-screen resolutions, the specified bounds may not meet the hardware limitations
928 * of the overlay region. @n
929 * In such cases, it returns the @c E_INVALID_ARG exception. To prevent this problem,
930 * the application should use the OverlayRegion::EvaluateBounds() method to get the validated bounds that
931 * can be used as the input bounds of this method.
932 * - Do not use OverlayRegion with OverlayPanel. If used, the @c E_SYSTEM exception is thrown.
934 OverlayRegion* GetOverlayRegionN(const Tizen::Graphics::Rectangle& rect, OverlayRegionType regionType);
937 * Creates and returns an overlay region of the specified position and size. @n
938 * Due to the hardware accelerated rendering, there are limitations for an overlay region. @n
939 * The hardware capability for an overlay region is checked by using OverlayRegion::GetWidthUnit(), OverlayRegion::GetHeightUnit() and
940 * OverlayRegion::GetMaxCount().
941 * If the specified condition is not satisfied, @c E_INVALID_ARG exception is returned.
945 * @return An overlay region instance
946 * @param[in] rect The x and y coordinates relative to the top-left corner of the form along with the width and height
947 * @param[in] regionType The type of the overlay region
948 * @exception E_SUCCESS The method is successful.
949 * @exception E_INVALID_ARG A specified input parameter is invalid.
950 * @exception E_MAX_EXCEEDED The number of overlay regions has reached the maximum limit.
951 * @exception E_UNSUPPORTED_OPTION The specified option of the overlay region type is not supported.
952 * @exception E_SYSTEM A system error has occurred.
954 * - The specific error code can be accessed using the GetLastResult() method.
955 * - If the application runs on multi-screen resolutions, the specified bounds may
956 * not meet the hardware limitations of the overlay region. @n
957 * In such cases, it returns the @c E_INVALID_ARG exception. @n
958 * To prevent this problem, the application should use the OverlayRegion::EvaluateBoundsF() method to
959 * get the validated bounds that can be used as the input bounds of this method.
960 * - Do not use OverlayRegion with OverlayPanel. If used, the @c E_SYSTEM exception is thrown.
962 OverlayRegion* GetOverlayRegionN(const Tizen::Graphics::FloatRectangle& rect, OverlayRegionType regionType);
966 * Creates and returns a graphics canvas whose bounds (position and size) are equal to the bounds of the client area of the %Form.
970 * @return The graphic canvas of the %Form control, @n
971 * else @c null if an error occurs
972 * @exception E_SUCCESS The method is successful.
973 * @exception E_RESOURCE_UNAVAILABLE The required resource is currently unavailable.
975 * - The method allocates Tizen::Graphics::Canvas whose bounds are equal to that of the client area of the %Form.
976 * - It is the responsibility of the developers to deallocate the canvas after use.
977 * - The canvas is valid only if the properties of the parent control of the canvas remain unchanged. @n
978 * Therefore, delete the previously allocated canvas and create a new canvas using this method
979 * if the size or position of the control is changed.
980 * - The specific error code can be accessed using the GetLastResult() method.
981 * - The Frame and %Form instances share a single frame-buffer. @n
982 * Therefore, the custom drawing on the graphic canvas of the Frame and %Form controls appears on the
983 * screen regardless of whether the control is currently visible on the screen.
985 Tizen::Graphics::Canvas* GetClientAreaCanvasN(void) const;
988 * Translates the specified position to the client coordinate.
992 * @return The position relative to the top-left corner of the client area, @n
993 * else @c (-1,-1) if the instance is invalid
994 * @param[in] position The position relative to the top-left corner of the %Form control
995 * @see TranslateFromClientAreaPosition()
997 Tizen::Graphics::Point TranslateToClientAreaPosition(const Tizen::Graphics::Point& position) const;
1000 * Translates the specified position to the client coordinate.
1004 * @return The position relative to the top-left corner of the client area, @n
1005 * else @c (-1,-1) if the instance is invalid
1006 * @param[in] position The position relative to the top-left corner of the %Form control
1007 * @see TranslateFromClientAreaPosition()
1009 Tizen::Graphics::FloatPoint TranslateToClientAreaPosition(const Tizen::Graphics::FloatPoint& position) const;
1012 * Translates the specified client position to the control coordinate.
1016 * @return The position relative to the top-left corner of the %Form control, @n
1017 * else @c (-1,-1) if the instance is invalid
1018 * @param[in] clientPosition The position relative to the top-left corner of the client area
1019 * @see TranslateToClientAreaPosition()
1021 Tizen::Graphics::Point TranslateFromClientAreaPosition(const Tizen::Graphics::Point& clientPosition) const;
1024 * Translates the specified client position to the control coordinate.
1028 * @return The position relative to the top-left corner of the %Form control, @n
1029 * else @c (-1,-1) if the instance is invalid
1030 * @param[in] clientPosition The position relative to the top-left corner of the client area
1031 * @see TranslateToClientAreaPosition()
1033 Tizen::Graphics::FloatPoint TranslateFromClientAreaPosition(const Tizen::Graphics::FloatPoint& clientPosition) const;
1036 * Sets the %Form back event listener.
1040 * @param[in] pFormBackEventListener The %Form back event listener to set
1041 * @see Tizen::Ui::Controls::IFormBackEventListener.
1043 void SetFormBackEventListener(IFormBackEventListener* pFormBackEventListener);
1047 * Gets the data binding context.
1051 * @return DataBindingContext the data binding context
1052 * @exception E_SUCCESS The method is successful.
1053 * @exception E_SYSTEM A system error has occurred.
1054 * @remarks The specific error code can be accessed using the GetLastResult() method.
1056 DataBindingContext* GetDataBindingContextN(void) const;
1059 * Enables or disables the notification tray to remain open.
1063 * @return An error code
1064 * @param[in] enable Set to @c true to enable the notification tray to remain open, @n
1066 * @exception E_SUCCESS The method is successful.
1067 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of a specified operation. @n
1068 * If the style of %Form is not ::FORM_STYLE_INDICATOR or ::FORM_STYLE_INDICATOR_AUTO_HIDE,
1069 * the method returns @c E_INVALID_OPERATION.
1070 * @remarks If this method is not explicitly called, the notification tray is opened.
1071 * @see IsNotificationTrayOpenEnabled()
1073 result SetNotificationTrayOpenEnabled(bool enable);
1077 * Checks whether the notification tray is open or not.
1081 * @return @c true if the notification tray is open, @n
1083 * @exception E_SUCCESS The method is successful.
1084 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of a specified operation. @n
1085 * If the style of %Form is not ::FORM_STYLE_INDICATOR or ::FORM_STYLE_INDICATOR_AUTO_HIDE,
1086 * the method returns @c E_INVALID_OPERATION.
1087 * @remarks The specific error code can be accessed using the GetLastResult() method.
1088 * @see SetNotificationTrayOpenEnabled()
1090 bool IsNotificationTrayOpenEnabled(void) const;
1093 friend class _FormImpl;
1096 //This method is for internal use only. Using this method can cause behavioral, security-related,
1097 //and consistency-related issues in the application.
1099 // This method is reserved and may change its name at any time without
1104 virtual void Form_Reserved1(void) { }
1107 //This method is for internal use only. Using this method can cause behavioral, security-related,
1108 //and consistency-related issues in the application.
1110 // This method is reserved and may change its name at any time without
1115 virtual void Form_Reserved2(void) { }
1118 //This method is for internal use only. Using this method can cause behavioral, security-related,
1119 //and consistency-related issues in the application.
1121 // This method is reserved and may change its name at any time without
1126 virtual void Form_Reserved3(void) { }
1128 // Friend Class Declaration
1130 friend class UiBuilder;
1135 Form& operator =(const Form&);
1139 } } } // Tizen::Ui::Controls
1141 #endif // _FUI_CTRL_FORM_H_