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;
47 class IFormMenuEventListener;
52 * Defines the %Form control style.
58 FORM_STYLE_NORMAL = 0x00000000, /**< The basic form style */
59 FORM_STYLE_TITLE = 0x00000001, /**<@if OSPDEPREC @deprecated This enum value is deprecated because the use of the Title control is no longer recommended.@endif */
60 FORM_STYLE_INDICATOR = 0x00000002, /**<@if OSPDEPREC @deprecated This enum value is deprecated because the indicator styles for portrait and landscape mode are added.@endif */
61 FORM_STYLE_PORTRAIT_INDICATOR = FORM_STYLE_INDICATOR, /**< The form with the indicator area when form is in portrait mode. @b Since: @b 2.2 */
62 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 */
63 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 */
64 FORM_STYLE_OPTIONKEY = 0x00000040, /**<@if OSPDEPREC @deprecated This enum value is deprecated because the use of the Optionkey control is no longer recommended.@endif */
65 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 */
66 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 */
67 FORM_STYLE_HEADER = 0x00001000, /**< The form with a header */
68 FORM_STYLE_FOOTER = 0x00002000, /**< The form with a footer */
69 FORM_STYLE_INDICATOR_AUTO_HIDE = 0x00010000, /**<@if OSPDEPREC @deprecated This enum value is deprecated because the indicator styles for portrait and landscape mode are added.@endif */
70 FORM_STYLE_PORTRAIT_INDICATOR_AUTO_HIDE = FORM_STYLE_INDICATOR_AUTO_HIDE, /**< The form with the indicator which is hidden when form is in portrait mode. @b Since: @b 2.2 */
71 FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE = 0x00020000 /**< The form with the indicator which is hidden when form is in landscape mode. @b Since: @b 2.2 */
79 * Defines the softkey.
81 * @brief <i> [Deprecated] </i>
82 * @deprecated This enum type is deprecated because the use of the Softkey control is no longer recommended.
88 SOFTKEY_0, /**< @if OSPDEPREC The left softkey @endif */
89 SOFTKEY_1, /**< @if OSPDEPREC The right softkey @endif */
90 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.
97 * Defines the action bars that can be attached to the %Form control.
103 FORM_ACTION_BAR_INDICATOR = 0x0001, /**< The indicator */
104 FORM_ACTION_BAR_HEADER = 0x0002, /**< The header */
105 FORM_ACTION_BAR_FOOTER = 0x0004, /**< The footer */
106 FORM_ACTION_BAR_TAB = 0x0008 /**< The tab */ // Ki-Dong,Hong.Temp
112 * @brief This class provides a container with general controls.
116 * The %Form class displays a full screen container. It can contain user-created controls and system UI components, such
117 * as an indicator area, header, and footer. The application can have multiple forms that are all added to a single Frame.
119 * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_form.htm">Form</a>.
121 * The following example demonstrates how to use the %Form class.
124 // Creates an instance of Form
125 Form* pForm = new Form();
126 pForm->Construct(FORM_STYLE_NORMAL| FORM_STYLE_HEADER| FORM_STYLE_FOOTER);
128 // Gets a pointer of the frame
129 Frame *pFrame = UiApp::GetInstance()->GetAppFrame()->GetFrame();
130 pFrame->AddControl(pForm);
131 pFrame->SetCurrentForm(pForm);
133 // Implements MyActionEventListener
134 IActionEventListener* pListener = new MyActionEventListener();
137 Header * pHeader = GetHeader();
138 pHeader->SetTitleText(L"FormSample");
141 Footer * pFooter = GetFooter();
142 pFooter->SetStyle(FOOTER_STYLE_TAB);
143 pFooter->AddActionEventListener(*this);
145 // Calls Invalidate() to display the form
146 pForm->Invalidate(true)
149 * This is a simple UI application that uses a %Form.
150 *@image html ui_controls_form.png
153 class _OSP_EXPORT_ Form
154 : public Tizen::Ui::Container
159 * This is the default constructor for this class.
165 * This is the destructor for this class.
171 * Initializes this instance of %Form with the specified parameters.
175 * @return An error code
176 * @param[in] formStyle The form style @n
177 * Multiple form styles can be combined using bitwise OR.
178 * @exception E_SUCCESS The method is successful.
179 * @exception E_INVALID_ARG The specified input parameter is invalid.
180 * @if OSPDEPREC - ::FORM_STYLE_HEADER and ::FORM_STYLE_TITLE are specified at the same time.
181 * - ::FORM_STYLE_FOOTER and ::FORM_STYLE_SOFTKEY_0 are specified at the same time.
182 * - @c FORM_STYLE_FOOTER and ::FORM_STYLE_SOFTKEY_1 are specified at the same time.
183 * - @c FORM_STYLE_FOOTER and ::FORM_STYLE_OPTIONKEY are specified at the same time. @endif
184 * @exception E_MAX_EXCEEDED The total number of Frames and Forms exceeds the system limitation.
185 * @exception E_SYSTEM A system error has occurred.
186 * @remarks The maximum number of Forms that an application can construct is limited by available memory.
189 result Construct(unsigned long formStyle);
193 * Initializes this instance of %Form with the specified resource ID. @n
194 * 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
195 * appropriate resource file, the method tries searching in other folders. When AutoScaling is enabled, the method first searches the folder that
196 * corresponds to the current screen size category and then searches the "res/screen-size-normal/" folder.
200 * @return An error code
201 * @param[in] resourceId The resource ID describing the %Form control
202 * @exception E_SUCCESS The method is successful.
203 * @exception E_FILE_NOT_FOUND The specified file cannot be found.
204 * @exception E_INVALID_FORMAT The specified XML format is invalid.
205 * @exception E_OPERATION_FAILED The operation has failed.
207 result Construct(const Tizen::Base::String& resourceId);
210 * Initializes this instance of %Form with the form style and layout.
214 * @return An error code
215 * @param[in] layout The layout for both the portrait and landscape mode
216 * @param[in] formStyle The form style @n
217 * Multiple form styles can be combined using bitwise OR.
218 * @exception E_SUCCESS The method is successful.
219 * @exception E_INVALID_ARG A specified input parameter is invalid, or
220 * the specified layout is already bound to another container.
221 * @exception E_MAX_EXCEEDED The total number of Frames and Forms exceeds the system limitation.
222 * @exception E_SYSTEM A system error has occurred.
224 * - The maximum number of Forms that an application can construct is limited by available memory.
225 * - The children are arranged within the client area bounds of the form area by @c layout.
228 result Construct(const Tizen::Ui::Layout& layout, unsigned long formStyle);
231 * Initializes this instance of %Form with the specified parameters.
235 * @return An error code
236 * @param[in] portraitLayout The layout for the portrait mode
237 * @param[in] landscapeLayout The layout for the landscape mode
238 * @param[in] formStyle The form style @n
239 * Multiple form styles can be combined using bitwise OR.
240 * @exception E_SUCCESS The method is successful.
241 * @exception E_INVALID_ARG A specified input parameter is invalid, or
242 * the specified layout is already bound to another container.
243 * @exception E_MAX_EXCEEDED The total number of Frames and Forms exceeds the system limitation.
244 * @exception E_SYSTEM A system error has occurred.
246 * - The maximum number of Forms that an application can construct is limited by available memory.
247 * - The children are arranged within the bounds of the form area by @c layout.
250 result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, unsigned long formStyle);
255 * Adds an IOrientationEventListener instance. @n
256 * The added listener can listen to the orientation changed events that are fired when the orientation mode of the screen is changed.
260 * @param[in] listener The listener to add
261 * @remarks The %Form control can only listen to those changes to the orientation mode that are enabled by calling SetOrientation().
262 * @see RemoveOrientationEventListener()
264 void AddOrientationEventListener(Tizen::Ui::IOrientationEventListener& listener);
269 * Adds an IActionEventListener instance. @n
270 * The added listener can listen to the action events that are fired when an option key is selected.
272 * @brief <i> [Deprecated] </i>
273 * @deprecated This method is deprecated because the use of the Optionkey control is no longer recommended.
276 * @param[in] listener The listener to add
277 * @see RemoveOptionkeyActionListener()
280 void AddOptionkeyActionListener(Tizen::Ui::IActionEventListener& listener);
285 * Adds an IActionEventListener instance. @n
286 * The added listener can listen to the action events that are fired when a softkey is selected.
288 * @brief <i> [Deprecated] </i>
289 * @deprecated This method is deprecated because the use of the Softkey control is no longer recommended.
292 * @param[in] softkey The style of the softkey
293 * @param[in] listener The listener to add
294 * @see RemoveSoftkeyActionListener()
297 void AddSoftkeyActionListener(Softkey softkey, Tizen::Ui::IActionEventListener& listener);
302 * Removes an IActionEventListener instance. @n
303 * The removed listener cannot listen to the events when they are fired.
305 * @brief <i> [Deprecated] </i>
306 * @deprecated This method is deprecated because the use of the Optionkey control is no longer recommended.
309 * @param[in] listener The listener to remove
310 * @see AddOptionkeyActionListener()
313 void RemoveOptionkeyActionListener(Tizen::Ui::IActionEventListener& listener);
317 * Removes an IOrientationEventListener instance. @n
318 * The removed listener cannot listen to the events when they are fired.
322 * @param[in] listener The listener to remove
324 * @see AddOrientationEventListener()
326 void RemoveOrientationEventListener(Tizen::Ui::IOrientationEventListener& listener);
331 * Removes an IActionEventListener instance. @n
332 * The removed listener cannot listen to the events when they are fired.
334 * @brief <i> [Deprecated] </i>
335 * @deprecated This method is deprecated because the use of the Softkey control is no longer recommended.
338 * @param[in] softkey The style of the softkey
339 * @param[in] listener The listener to remove
340 * @see AddSoftkeyActionListener()
343 void RemoveSoftkeyActionListener(Softkey softkey, Tizen::Ui::IActionEventListener& listener);
348 * Gets the background color of the %Form control.
352 * @return The background color of the %Form control
354 Tizen::Graphics::Color GetBackgroundColor(void) const;
358 * Gets the bounds of the client area.
362 * @return The bounds of the client area
363 * @remarks The client area of the %Form control does not include the title, indicator, header and footer areas.
364 * header and footer areas.
367 Tizen::Graphics::Rectangle GetClientAreaBounds(void) const;
370 * Gets the bounds of the client area.
374 * @return The bounds of the client area
375 * @remarks The client area of the %Form control does not include the title, indicator, header and footer areas.
376 * header and footer areas.
379 Tizen::Graphics::FloatRectangle GetClientAreaBoundsF(void) const;
382 * Gets the style of the %Form control.
386 * @return An @c unsigned @c long value representing the style of the %Form control
388 unsigned long GetFormStyle(void) const;
392 * Gets the orientation mode of the %Form control.
396 * @return The orientation of the %Form control
398 Tizen::Ui::Orientation GetOrientation(void) const;
402 * Gets the current orientation status of the %Form control.
406 * @return The orientation status of the %Form control, @n
407 * else @c ORIENTATION_NONE if the %Form control is not the current form of the Frame control
409 Tizen::Ui::OrientationStatus GetOrientationStatus(void) const;
414 * Gets the action ID of the specified softkey.
416 * @brief <i> [Deprecated] </i>
417 * @deprecated This method is deprecated because the use of the Softkey control is no longer recommended.
420 * @return An integer value representing the action ID
421 * @param[in] softkey The softkey
424 int GetSoftkeyActionId(Softkey softkey) const;
429 * Gets the text of the specified softkey.
431 * @brief <i> [Deprecated] </i>
432 * @deprecated This method is deprecated because the use of the Softkey control is no longer recommended.
435 * @return The text of the softkey
436 * @param[in] softkey The softkey
439 Tizen::Base::String GetSoftkeyText(Softkey softkey) const;
444 * Gets the pointer of the Tab control if it exists.
446 * @brief <i> [Deprecated] </i>
447 * @deprecated This method is deprecated because the use of the Tab control is no longer recommended.
450 * @return A pointer to the Tab control, @n
451 * else @c null if there is no tab
452 * @remarks The retrieved pointer may be temporary. Therefore, it should not be stored after immediate use.
455 Tab* GetTab(void) const;
460 * Gets the title of the %Form control.
462 * @brief <i> [Deprecated] </i>
463 * @deprecated This method is deprecated because the use of the Title control is no longer recommended. Instead of the %Title control,
464 * use the Header control.
467 * @return The title of the %Form control
470 Tizen::Base::String GetTitleText(void) const;
475 * Gets the horizontal alignment of the title text.
477 * @brief <i> [Deprecated] </i>
478 * @deprecated This method is deprecated because the use of the Title control is no longer recommended. Instead of the %Title control,
479 * use the Header control.
482 * @return The horizontal alignment of the title text
483 * @remarks By default, the horizontal alignment is center aligned.
486 HorizontalAlignment GetTitleTextHorizontalAlignment(void) const;
489 * Checks whether the %Form control has an Indicator.
493 * @return @c true if the %Form control has a title, @n
496 bool HasIndicator(void) const;
501 * Checks whether the %Form control has an optionkey.
503 * @brief <i> [Deprecated] </i>
504 * @deprecated This method is deprecated because the use of the Optionkey control is no longer recommended.
507 * @return @c true if the %Form control has an optionkey, @n
511 bool HasOptionkey(void) const;
516 * Checks whether the %Form control has the specified softkey.
518 * @brief <i> [Deprecated] </i>
519 * @deprecated This method is deprecated because the use of the Softkey control is no longer recommended.
522 * @return @c true if the %Form control has the specified softkey, @n
524 * @param[in] softkey The required softkey
527 bool HasSoftkey(Softkey softkey) const;
532 * Checks whether the %Form control has a tab.
534 * @brief <i> [Deprecated] </i>
535 * @deprecated This method is deprecated because the use of the Tab control is no longer recommended.
538 * @return @c true if the %Form control has a tab, @n
542 bool HasTab(void) const;
547 * Checks whether the %Form control has a title.
549 * @brief <i> [Deprecated] </i>
550 * @deprecated This method is deprecated because the use of the Title control is no longer recommended. Instead of the %Title control,
551 * use the Header control.
554 * @return @c true if the %Form control has a title, @n
558 bool HasTitle(void) const;
563 * Checks whether the softkey is enabled.
565 * @brief <i> [Deprecated] </i>
566 * @deprecated This method is deprecated because the use of the Softkey control is no longer recommended.
569 * @return @c true if the softkey is enabled, @n
571 * @param[in] softkey The softkey
574 bool IsSoftkeyEnabled(Softkey softkey) const;
578 * Sets the background color of the %Form control.
582 * @param[in] color The background color to set
584 void SetBackgroundColor(const Tizen::Graphics::Color& color);
588 * Sets the style of the %Form control.
592 * @param[in] formStyle The form style to set @n
593 * This parameter can be a combination of Tizen::Ui::Controls::FormStyle.
594 * @exception E_SUCCESS The method is successful @if OSPCOMPAT @b Since: @b 2.0 @endif.
595 * @exception E_INVALID_ARG A specified input parameter is invalid.
596 * @if OSPDEPREC - ::FORM_STYLE_HEADER and ::FORM_STYLE_TITLE are specified at the same time.
597 * - ::FORM_STYLE_FOOTER and ::FORM_STYLE_SOFTKEY_0 are specified at the same time.
598 * - @c FORM_STYLE_FOOTER and ::FORM_STYLE_SOFTKEY_1 are specified at the same time.
599 * - @c FORM_STYLE_FOOTER and ::FORM_STYLE_OPTIONKEY are specified at the same time. @endif
601 * - The specific error code can be accessed using the GetLastResult() method.
602 * @if OSPDEPREC - Note that you must not change the style of %Form control that is constructed with ::FORM_STYLE_TEXT_TAB
603 * or ::FORM_STYLE_ICON_TAB style. @endif
604 * - A Form which is added to a container except Frame cannot have the style of ::FORM_STYLE_PORTRAIT_INDICATOR.
606 void SetFormStyle(unsigned long formStyle);
611 * Sets an action ID of the optionkey.
613 * @brief <i> [Deprecated] </i>
614 * @deprecated This method is deprecated because the use of the Optionkey control is no longer recommended.
617 * @param[in] actionId The action ID of this button instance
620 void SetOptionkeyActionId(int actionId);
624 * Sets the orientation of the %Form control.
628 * @feature %http://tizen.org/feature/screen.auto_rotation for the @c ORIENTATION_AUTOMATIC_FOUR_DIRECTION or
629 * @c ORIENTATION_AUTOMATIC value of @c orientation
630 * @param[in] orientation The orientation of the %Form control
631 * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @b Since: @b 2.1 @n
632 * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
634 * - The specific error code can be accessed using the GetLastResult() method.
635 * - Before calling this method, check whether the feature is supported by
636 * Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&).
638 void SetOrientation(Orientation orientation);
643 * Sets an action ID of each softkey.
645 * @brief <i> [Deprecated] </i>
646 * @deprecated This method is deprecated because the use of the Softkey control is no longer recommended.
649 * @param[in] softkey The softkey
650 * @param[in] actionId The action ID to set
653 void SetSoftkeyActionId(Softkey softkey, int actionId);
658 * Enables or disables the specified softkey.
660 * @brief <i> [Deprecated] </i>
661 * @deprecated This method is deprecated because the use of the Softkey control is no longer recommended.
664 * @param[in] softkey The softkey
665 * @param[in] enable Set to @c true to enable this softkey @n
669 void SetSoftkeyEnabled(Softkey softkey, bool enable);
674 * Sets the title icon of the %Form control.
676 * @brief <i> [Deprecated] </i>
677 * @deprecated This method is deprecated because the use of the Title control is no longer recommended. Instead of the %Title control,
678 * use the %Header control.
681 * @return An error code
682 * @param[in] pTitleBitmap The title icon to set, @n
683 * else @c null if the title icon is removed
684 * @exception E_SUCCESS The method is successful.
685 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of a specified operation
686 * (that is, this control cannot be displayed).
687 * @exception E_SYSTEM A system error has occurred.
690 result SetTitleIcon(const Tizen::Graphics::Bitmap* pTitleBitmap);
695 * Sets the title of this %Form control.
697 * @brief <i> [Deprecated] </i>
698 * @deprecated This method is deprecated because the use of the Title control is no longer recommended. Instead of the %Title control,
699 * use the Header control.
702 * @return An error code
703 * @param[in] title The title to set
704 * @param[in] alignment The horizontal alignment
705 * @exception E_SUCCESS The method is successful.
706 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of a specified operation
707 * (that is, this control cannot be displayed).
708 * @exception E_SYSTEM A system error has occurred.
710 * - If the size of the text exceeds the displayable area, the text slides automatically.
711 * - Note that when the title icon is set along with the title text, the title retains the left alignment.
714 result SetTitleText(const Tizen::Base::String& title, HorizontalAlignment alignment = ALIGNMENT_CENTER);
719 * Sets the icon of the softkey.
721 * @brief <i> [Deprecated] </i>
722 * @deprecated This method is deprecated because the use of the Softkey control is no longer recommended.
725 * @param[in] softkey The softkey
726 * @param[in] normalBitmap The Bitmap of the normal icon
727 * @param[in] pPressedBitmap The Bitmap of the pressed icon
728 * @remarks If both the icon and text are set for a softkey at the same time, the text takes precedence over the icon.
731 void SetSoftkeyIcon(Softkey softkey, const Tizen::Graphics::Bitmap& normalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap);
735 * Sets the text of the specified softkey.
737 * @brief <i> [Deprecated] </i>
738 * @deprecated This method is deprecated because the use of the Softkey control is no longer recommended.
741 * @param[in] softkey The softkey
742 * @param[in] text The text to set
744 * - If both the icon and text are set for a softkey at the same time, the text takes precedence over the icon.
745 * - To display text in multi-lines or to denote the end of line, use '\\n'.
748 void SetSoftkeyText(Softkey softkey, const Tizen::Base::String& text);
751 * Gets the pointer to the Footer control if it exists.
755 * @return A pointer to the Footer control, @n
756 * else @c null if there is no %Footer
757 * @remarks The retrieved pointer may be temporary. Therefore, it should not be stored after immediate use. @n
758 * The optimal size of the control is defined in
759 * <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
761 Footer* GetFooter(void) const;
765 * Gets the pointer to the Header control if it exists.
769 * @return A pointer to the Header control, @n
770 * else @c null if there is no %Header
771 * @remarks The retrieved pointer may be temporary. Therefore, it should not be
772 * stored after immediate use. @n
773 * The optimal size of the control is defined in
774 * <a href="../org.tizen.native.appprogramming/html/guide/ui/control_optimalsize.htm">Optimal Size of UI Controls</a>.
776 Header* GetHeader(void) const;
780 * Checks whether the %Form control has a Footer.
784 * @return @c true if the %Form control has a Footer, @n
787 bool HasFooter(void) const;
791 * Checks whether the %Form control has a Header.
795 * @return @c true if the %Form control has a Header, @n
798 bool HasHeader(void) const;
802 * Checks whether the Indicator control is visible.
806 * @return @c true if the Indicator control is visible, @n
809 bool IsIndicatorVisible(void) const;
813 * Checks whether the Header control is visible.
817 * @return @c true if the Header control is visible, @n
820 bool IsHeaderVisible(void) const;
824 * Checks whether the Footer control is visible.
828 * @return @c true if the Footer control is visible, @n
831 bool IsFooterVisible(void) const;
835 * Checks whether the Indicator control is translucent.
839 * @return @c true if the Indicator control is translucent, @n
842 bool IsIndicatorTranslucent(void) const;
846 * Checks whether the Header control is translucent.
850 * @return @c true if the Header control is translucent, @n
853 bool IsHeaderTranslucent(void) const;
857 * Checks whether the Footer control is translucent.
861 * @return @c true if the Footer control is translucent, @n
864 bool IsFooterTranslucent(void) const;
868 * Sets the translucency of the action bars.
872 * @return An error code
873 * @param[in] actionBars The action bars @n
874 * Multiple action bars can be combined using bitwise OR (see Tizen::Ui::Controls::FormActionBar).
875 * @param[in] translucent Set to @c to make the action bars translucent, @n
877 * @exception E_SUCCESS The method is successful.
878 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of a specified operation, or
879 * the specified action bars do not exist.
880 * @exception E_UNSUPPORTED_OPERATION This operation is not supported.
881 * @exception E_SYSTEM A system error has occurred.
883 * - Modifying the translucency of the action bars causes the client area of the %Form to change.
884 * - The translucency of multiple action bars can be modified at the same time by using logical OR for several values of FormActionBar.
885 * - The method is not supported in 16-bit devices.
887 result SetActionBarsTranslucent(unsigned long actionBars, bool translucent);
891 * Sets the visibility state of the action bars.
895 * @return An error code
896 * @param[in] actionBars The action bars @n
897 * Multiple action bars can be combined using bitwise OR.
898 * @param[in] visible Set to @c true to make the action bars visible, @n
900 * @exception E_SUCCESS The method is successful.
901 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation, or
902 * the specified action bars does not exist.
903 * @exception E_SYSTEM A system error has occurred.
905 * - Modifying the translucency of action bars causes the client area of the %Form to change.
906 * - The visibility of multiple action bars can be modified at the same time by using logical OR for several values of FormActionBar.
909 result SetActionBarsVisible(unsigned long actionBars, bool visible);
913 * Creates and returns an overlay region of the specified position and size. @n
914 * Due to the hardware accelerated rendering, there are limitations for an overlay region. @n
915 * The hardware capability for an overlay region is checked by using OverlayRegion::GetWidthUnit(), OverlayRegion::GetHeightUnit() and
916 * OverlayRegion::GetMaxCount().
917 * If the specified condition is not satisfied, @c E_INVALID_ARG exception is returned.
921 * @return An overlay region instance
922 * @param[in] rect The x and y coordinates relative to the top-left corner of the form along with the width and height
923 * @param[in] regionType The type of the overlay region
924 * @exception E_SUCCESS The method is successful.
925 * @exception E_INVALID_ARG A specified input parameter is invalid.
926 * @exception E_MAX_EXCEEDED The number of overlay regions has reached the maximum limit.
927 * @exception E_UNSUPPORTED_OPTION The specified option of the overlay region type is not supported.
928 * @exception E_SYSTEM A system error has occurred.
930 * - The specific error code can be accessed using the GetLastResult() method.
931 * - If the application runs on multi-screen resolutions, the specified bounds may not meet the hardware limitations
932 * of the overlay region. @n
933 * In such cases, it returns the @c E_INVALID_ARG exception. To prevent this problem,
934 * the application should use the OverlayRegion::EvaluateBounds() method to get the validated bounds that
935 * can be used as the input bounds of this method.
936 * - Do not use OverlayRegion with OverlayPanel. If used, the @c E_SYSTEM exception is thrown.
938 OverlayRegion* GetOverlayRegionN(const Tizen::Graphics::Rectangle& rect, OverlayRegionType regionType);
941 * Creates and returns an overlay region of the specified position and size. @n
942 * Due to the hardware accelerated rendering, there are limitations for an overlay region. @n
943 * The hardware capability for an overlay region is checked by using OverlayRegion::GetWidthUnit(), OverlayRegion::GetHeightUnit() and
944 * OverlayRegion::GetMaxCount().
945 * If the specified condition is not satisfied, @c E_INVALID_ARG exception is returned.
949 * @return An overlay region instance
950 * @param[in] rect The x and y coordinates relative to the top-left corner of the form along with the width and height
951 * @param[in] regionType The type of the overlay region
952 * @exception E_SUCCESS The method is successful.
953 * @exception E_INVALID_ARG A specified input parameter is invalid.
954 * @exception E_MAX_EXCEEDED The number of overlay regions has reached the maximum limit.
955 * @exception E_UNSUPPORTED_OPTION The specified option of the overlay region type is not supported.
956 * @exception E_SYSTEM A system error has occurred.
958 * - The specific error code can be accessed using the GetLastResult() method.
959 * - If the application runs on multi-screen resolutions, the specified bounds may
960 * not meet the hardware limitations of the overlay region. @n
961 * In such cases, it returns the @c E_INVALID_ARG exception. @n
962 * To prevent this problem, the application should use the OverlayRegion::EvaluateBoundsF() method to
963 * get the validated bounds that can be used as the input bounds of this method.
964 * - Do not use OverlayRegion with OverlayPanel. If used, the @c E_SYSTEM exception is thrown.
966 OverlayRegion* GetOverlayRegionN(const Tizen::Graphics::FloatRectangle& rect, OverlayRegionType regionType);
970 * Creates and returns a graphics canvas whose bounds (position and size) are equal to the bounds of the client area of the %Form.
974 * @return The graphic canvas of the %Form control, @n
975 * else @c null if an error occurs
976 * @exception E_SUCCESS The method is successful.
977 * @exception E_RESOURCE_UNAVAILABLE The required resource is currently unavailable.
979 * - The method allocates Tizen::Graphics::Canvas whose bounds are equal to that of the client area of the %Form.
980 * - It is the responsibility of the developers to deallocate the canvas after use.
981 * - The canvas is valid only if the properties of the parent control of the canvas remain unchanged. @n
982 * Therefore, delete the previously allocated canvas and create a new canvas using this method
983 * if the size or position of the control is changed.
984 * - The specific error code can be accessed using the GetLastResult() method.
985 * - The Frame and %Form instances share a single frame-buffer. @n
986 * Therefore, the custom drawing on the graphic canvas of the Frame and %Form controls appears on the
987 * screen regardless of whether the control is currently visible on the screen.
989 Tizen::Graphics::Canvas* GetClientAreaCanvasN(void) const;
992 * Translates the specified position to the client coordinate.
996 * @return The position relative to the top-left corner of the client area, @n
997 * else @c (-1,-1) if the instance is invalid
998 * @param[in] position The position relative to the top-left corner of the %Form control
999 * @see TranslateFromClientAreaPosition()
1001 Tizen::Graphics::Point TranslateToClientAreaPosition(const Tizen::Graphics::Point& position) const;
1004 * Translates the specified position to the client coordinate.
1008 * @return The position relative to the top-left corner of the client area, @n
1009 * else @c (-1,-1) if the instance is invalid
1010 * @param[in] position The position relative to the top-left corner of the %Form control
1011 * @see TranslateFromClientAreaPosition()
1013 Tizen::Graphics::FloatPoint TranslateToClientAreaPosition(const Tizen::Graphics::FloatPoint& position) const;
1016 * Translates the specified client position to the control coordinate.
1020 * @return The position relative to the top-left corner of the %Form control, @n
1021 * else @c (-1,-1) if the instance is invalid
1022 * @param[in] clientPosition The position relative to the top-left corner of the client area
1023 * @see TranslateToClientAreaPosition()
1025 Tizen::Graphics::Point TranslateFromClientAreaPosition(const Tizen::Graphics::Point& clientPosition) const;
1028 * Translates the specified client position to the control coordinate.
1032 * @return The position relative to the top-left corner of the %Form control, @n
1033 * else @c (-1,-1) if the instance is invalid
1034 * @param[in] clientPosition The position relative to the top-left corner of the client area
1035 * @see TranslateToClientAreaPosition()
1037 Tizen::Graphics::FloatPoint TranslateFromClientAreaPosition(const Tizen::Graphics::FloatPoint& clientPosition) const;
1040 * Sets the %Form back event listener.
1044 * @param[in] pFormBackEventListener The %Form back event listener to set
1045 * @see Tizen::Ui::Controls::IFormBackEventListener.
1047 void SetFormBackEventListener(IFormBackEventListener* pFormBackEventListener);
1051 * Sets the %Form menu event listener.
1055 * @param[in] pFormMenuEventListener The %Form menu event listener to set
1056 * @see Tizen::Ui::Controls::IFormMenuEventListener.
1058 void SetFormMenuEventListener(IFormMenuEventListener* pFormMenuEventListener);
1062 * Gets the data binding context.
1066 * @return DataBindingContext the data binding context
1067 * @exception E_SUCCESS The method is successful.
1068 * @exception E_SYSTEM A system error has occurred.
1069 * @remarks The specific error code can be accessed using the GetLastResult() method.
1071 DataBindingContext* GetDataBindingContextN(void) const;
1074 * Enables or disables the notification tray to remain open.
1078 * @return An error code
1079 * @param[in] enable Set to @c true to enable the notification tray to remain open, @n
1081 * @exception E_SUCCESS The method is successful.
1082 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of a specified operation. @n
1083 * If the style of %Form is not ::FORM_STYLE_PORTRAIT_INDICATOR_AUTO_HIDE,
1084 * the method returns @c E_INVALID_OPERATION.
1085 * @remarks If this method is not explicitly called, the notification tray is opened.
1086 * @see IsNotificationTrayOpenEnabled()
1088 result SetNotificationTrayOpenEnabled(bool enable);
1092 * Checks whether the notification tray is open or not.
1096 * @return @c true if the notification tray is open, @n
1098 * @exception E_SUCCESS The method is successful.
1099 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of a specified operation. @n
1100 * If the style of %Form is not ::FORM_STYLE_PORTRAIT_INDICATOR_AUTO_HIDE,
1101 * the method returns @c E_INVALID_OPERATION.
1102 * @remarks The specific error code can be accessed using the GetLastResult() method.
1103 * @see SetNotificationTrayOpenEnabled()
1105 bool IsNotificationTrayOpenEnabled(void) const;
1108 friend class _FormImpl;
1111 //This method is for internal use only. Using this method can cause behavioral, security-related,
1112 //and consistency-related issues in the application.
1114 // This method is reserved and may change its name at any time without
1119 virtual void Form_Reserved1(void) { }
1122 //This method is for internal use only. Using this method can cause behavioral, security-related,
1123 //and consistency-related issues in the application.
1125 // This method is reserved and may change its name at any time without
1130 virtual void Form_Reserved2(void) { }
1133 //This method is for internal use only. Using this method can cause behavioral, security-related,
1134 //and consistency-related issues in the application.
1136 // This method is reserved and may change its name at any time without
1141 virtual void Form_Reserved3(void) { }
1143 // Friend Class Declaration
1145 friend class UiBuilder;
1150 Form& operator =(const Form&);
1154 } } } // Tizen::Ui::Controls
1156 #endif // _FUI_CTRL_FORM_H_