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 FUiCtrlHeader.h
20 * @brief This is the header file for the %Header class.
22 * This header file contains the declarations of the %Header class.
24 #ifndef _FUI_CTRL_HEADER_H_
25 #define _FUI_CTRL_HEADER_H_
27 #include <FBaseObject.h>
28 #include <FBaseTypes.h>
29 #include <FBaseString.h>
30 #include <FGrpBitmap.h>
31 #include <FGrpColor.h>
32 #include <FGrpRectangle.h>
33 #include <FUiControl.h>
34 #include <FUiIActionEventListener.h>
35 #include <FUiCtrlAnimation.h>
36 #include <FUiCtrlButtonItem.h>
37 #include <FUiCtrlHeaderItem.h>
38 #include <FUiCtrlForm.h>
40 namespace Tizen { namespace Ui { namespace Controls
47 * Defines the possible styles of a %Header control.
53 HEADER_STYLE_TITLE, /**< The title style */
54 HEADER_STYLE_TITLE_BUTTON, /**< The title button style */
55 HEADER_STYLE_SEGMENTED, /**< The segmented style */
56 HEADER_STYLE_SEGMENTED_WITH_TITLE, /**< The segmented style with title */
57 HEADER_STYLE_TAB, /**< The tab style */
58 HEADER_STYLE_TAB_WITH_TITLE, /**< The tab with title style */
59 HEADER_STYLE_BUTTON, /**< The button style */
60 HEADER_STYLE_TAB_LARGE /**< The large tab style @b Since: @b 2.2 */
64 * @enum HeaderAnimationPosition
66 * Defines the possible positions of the waiting animation of a header.
70 enum HeaderAnimationPosition
72 HEADER_ANIMATION_POSITION_TITLE, /**< The title animation */
73 HEADER_ANIMATION_POSITION_BUTTON_LEFT, /**< The left button animation */
74 HEADER_ANIMATION_POSITION_BUTTON_RIGHT /**< The right button animation */
79 * @brief This class is an implementation of a %Header control.
83 * The %Header class displays a multi-purpose area at the top of the screen that usually acts as a placeholder for descriptive
84 * contents, such as a title of the current screen. It can also contain buttons for performing various user-defined tasks.
86 * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_header.htm">Header</a>.
88 * The following examples demonstrate how to use the %Header class.
90 * - Constructing a header: @n
91 * When creating a Form, specify the FORM_STYLE_HEADER parameter in the Form::Construct() method.
96 * TestForm::Initialize(void)
98 * Construct(FORM_STYLE_NORMAL | FORM_STYLE_PORTRAIT_INDICATOR | FORM_STYLE_HEADER );
102 * - Using the header: @n
103 * Gets the header with the GetHeader() method, and sets the header style.
107 * TestForm::Initialize(void)
109 * Header* pHeader = GetHeader();
110 * pHeader->SetStyle(HEADER_STYLE_SEGMENTED);
114 * - Adding items to the header: @n
115 * Adds HeaderItems or ButtonItems according to the header style. The action ID registered in the Construct() method is notified
116 * when items are touched.
120 * TestForm::Initialize(void)
122 * HeaderItem headerItem;
123 * headerItem.Construct(ID_HEADER_ITEM);
124 * headerItem.SetText("HeaderItem");
126 * pHeader->AddItem(headerItem);
128 * ButtonItem buttonItem;
129 * buttonItem.Construct(BUTTON_ITEM_STYLE_ICON, ID_HEADER_BUTTON);
130 * buttonItem.SetIcon(BUTTON_ITEM_STATUS_NORMAL, __pBitmap);
132 * pHeader->SetButton(BUTTON_POSITION_LEFT, buttonItem);
137 * - Setting the header title and description:
141 * TestForm::Initialize(void)
143 * pHeader->SetTitleText(L"Header Title");
144 * pHeader->SetDescriptionText(L"Description Text");
148 class _OSP_EXPORT_ Header
149 : public Tizen::Ui::Control
154 * Adds the specified header item.
158 * @return An error code
159 * @param[in] item The HeaderItem object to add
160 * @exception E_SUCCESS The method is successful.
161 * @exception E_MAX_EXCEEDED The number of items has exceeded the maximum limit.
162 * @exception E_INVALID_ARG A specified input parameter is invalid. @n
163 * The specified item is not constructed.
164 * @exception E_SYSTEM A system error has occurred.
165 * @remarks The %Header control does not throw any exception even though the same action ID is assigned to multiple items. @n
166 * However, the content of the specified item is copied to the %Header control.
168 result AddItem(const HeaderItem& item);
172 * Inserts the header item at the specified index.
176 * @return An error code
177 * @param[in] itemIndex The index where the item should be inserted
178 * @param[in] item The HeaderItem object to insert
179 * @exception E_SUCCESS The method is successful.
180 * @exception E_MAX_EXCEEDED The number of items has exceeded the maximum limit.
181 * @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure, or the index is greater than or equal to
182 * the number of elements or less than @c 0.
183 * @exception E_INVALID_ARG A specified input parameter is invalid. @n
184 * The specified @c item is not constructed.
185 * @exception E_SYSTEM A system error has occurred.
186 * @remarks The %Header control does not throw any exception even though the same action ID is assigned to multiple items. @n
187 * However, the content of the specified item is copied to the %Header control.
189 result InsertItemAt(int itemIndex, const HeaderItem& item);
193 * Checks whether a button item is set at the specified position.
197 * @return @c true if the button item is set at the specified position, @n
199 * @param[in] position The position of the button item
200 * @exception E_SUCCESS The method is successful.
201 * @remarks The specific error code can be accessed using the GetLastResult() method.
203 bool IsButtonSet(ButtonPosition position) const;
207 * Gets the state of the specified button item.
211 * @return The state of the button item at the specified position, @n
212 * else @c BUTTON_ITEM_STATUS_NORMAL if an error occurs
213 * @param[in] position The position of the button item
214 * @exception E_SUCCESS The method is successful.
215 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
216 * There is no button set at the specified position.
217 * @remarks The specific error code can be accessed using the GetLastResult() method.
219 ButtonItemStatus GetButtonStatus(ButtonPosition position) const;
223 * Gets the color of the button item for the specified state.
227 * @return The color of the button item, @n
228 * else RGBA (0,0,0,0) if an error occurs
229 * @param[in] status The status of the button item
230 * @exception E_SUCCESS The method is successful.
231 * @remarks The specific error code can be accessed using the GetLastResult() method.
232 * @see SetButtonColor()
234 Tizen::Graphics::Color GetButtonColor(ButtonItemStatus status) const;
238 * Gets the text color of the button item for the specified state.
242 * @return The text color of the button item, @n
243 * else RGBA (0,0,0,0) if an error occurs
244 * @param[in] status The status of the button item
245 * @exception E_SUCCESS The method is successful.
246 * @remarks The specific error code can be accessed using the GetLastResult() method.
248 Tizen::Graphics::Color GetButtonTextColor(ButtonItemStatus status) const;
252 * Gets the description text of the %Header control that has the title style.
256 * @return The description text, @n
257 * else an empty string if an error occurs
258 * @exception E_SUCCESS The method is successful.
259 * @remarks The specific error code can be accessed using the GetLastResult() method.
261 Tizen::Base::String GetDescriptionText(void) const;
265 * Gets the description text color of the %Header control that has the title style.
269 * @return The description text color, @n
270 * else RGBA (0,0,0,0) if an error occurs
271 * @exception E_SUCCESS The method is successful.
272 * @remarks The specific error code can be accessed using the GetLastResult() method.
274 Tizen::Graphics::Color GetDescriptionTextColor(void) const;
278 * Gets the color of the header item for the specified item state.
282 * @return The color of the item, @n
283 * else RGBA (0,0,0,0) if an error occurs
284 * @param[in] status The item status
285 * @exception E_SUCCESS The method is successful.
286 * @remarks The specific error code can be accessed using the GetLastResult() method.
287 * @see SetItemColor()
289 Tizen::Graphics::Color GetItemColor(HeaderItemStatus status) const;
293 * Gets the total number of header items.
297 * @return The total number of header items, @n
298 * else @c -1 if an error occurs
299 * @exception E_SUCCESS The method is successful.
300 * @remarks The specific error code can be accessed using the GetLastResult() method.
302 int GetItemCount(void) const;
306 * Gets the state of the specified header item.
310 * @return The item status
311 * @param[in] itemIndex The index of the item
312 * @param[out] status The item status
313 * @exception E_SUCCESS The method is successful.
314 * @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure. @n
315 * The index is greater than or equal to the number of elements or less than @c 0.
317 result GetItemStatus(int itemIndex, HeaderItemStatus& status) const;
321 * Gets the text color of the header item for the specified item state.
325 * @return The item's text color, @n
326 * else RGBA (0,0,0,0) if an error occurs
327 * @param[in] status The item status
328 * @exception E_SUCCESS The method is successful.
329 * @remarks The specific error code can be accessed using the GetLastResult() method.
331 Tizen::Graphics::Color GetItemTextColor(HeaderItemStatus status) const;
335 * Gets the style of the %Header control.
339 * @return The %Header control style, @n
340 * else @c HEADER_STYLE_TITLE if an error occurs
341 * @exception E_SUCCESS The method is successful.
342 * @remarks The specific error code can be accessed using the GetLastResult() method.
344 HeaderStyle GetStyle(void) const;
348 * Gets the index of the currently selected item.
352 * @return The selected item index, @n
353 * else @c -1 if an error occurs
354 * @exception E_SUCCESS The method is successful.
355 * @exception E_UNSUPPORTED_OPERATION This operation is supported when the style of the %Header control is ::HEADER_STYLE_SEGMENTED, @n
356 * ::HEADER_STYLE_SEGMENTED_WITH_TITLE, ::HEADER_STYLE_TAB, ::HEADER_STYLE_TAB_WITH_TITLE or ::HEADER_STYLE_TAB_LARGE.
357 * @remarks The specific error code can be accessed using the GetLastResult() method.
359 int GetSelectedItemIndex(void) const;
363 * Gets the title text of the %Header control that has the title style.
367 * @return The title text, @n
368 * else an empty string if an error occurs
369 * @exception E_SUCCESS The method is successful.
370 * @remarks The specific error code can be accessed using the GetLastResult() method.
372 Tizen::Base::String GetTitleText(void) const;
376 * Gets the title text color of the %Header control that has the title style.
380 * @return The title text color, @n
381 * else RGBA (0,0,0,0) if an error occurs
382 * @exception E_SUCCESS The method is successful.
383 * @remarks The specific error code can be accessed using the GetLastResult() method.
385 Tizen::Graphics::Color GetTitleTextColor(void) const;
389 * Gets the color of the %Header control.
393 * @return The header color, @n
394 * else RGBA (0,0,0,0) if an error occurs
395 * @exception E_SUCCESS The method is successful.
396 * @remarks The specific error code can be accessed using the GetLastResult() method.
398 Tizen::Graphics::Color GetColor(void) const;
402 * Gets the status of the waiting animation at the specified position.
406 * @return The animation status
407 * @param[in] animationPos The waiting animation position
408 * @exception E_SUCCESS The method is successful.
409 * @remarks The specific error code can be accessed using the GetLastResult() method. @n
410 * This method returns @c ANIMATION_STOPPED, if no animation is in progress at the specified position.
411 * @see PauseWaitingAnimation()
412 * @see PlayWaitingAnimation()
413 * @see StopWaitingAnimation()
415 AnimationStatus GetWaitingAnimationStatus(HeaderAnimationPosition animationPos) const;
419 * Pauses the waiting animation at the specified position.
423 * @return An error code
424 * @param[in] animationPos The waiting animation position
425 * @exception E_SUCCESS The method is successful.
426 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
427 * No waiting animation is in progress at the specified position.
428 * @exception E_SYSTEM A system error has occurred.
429 * @see PlayWaitingAnimation()
430 * @see StopWaitingAnimation()
432 result PauseWaitingAnimation(HeaderAnimationPosition animationPos);
436 * Starts the waiting animation at the specified position.
440 * @return An error code
441 * @param[in] animationPos The waiting animation position
442 * @exception E_SUCCESS The method is successful.
443 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
444 * There is no button set at the specified position (except for @c HEADER_ANIMATION_POSITION_TITLE).
445 * @exception E_SYSTEM A system error has occurred.
448 * @see GetWaitingAnimationStatus()
449 * @see PauseWaitingAnimation()
450 * @see StopWaitingAnimation()
452 result PlayWaitingAnimation(HeaderAnimationPosition animationPos);
456 * Removes all the button items.
460 * @return An error code
461 * @exception E_SUCCESS The method is successful.
462 * @exception E_SYSTEM A system error has occurred.
464 result RemoveAllButtons(void);
468 * Removes all the %Header control items.
472 * @return An error code
473 * @exception E_SUCCESS The method is successful.
474 * @exception E_SYSTEM A system error has occurred.
475 * @remarks The left button, right button, and back button items are not removed.
477 result RemoveAllItems(void);
481 * Removes the item at the specified index.
485 * @return An error code
486 * @param[in] itemIndex The index of the item to remove
487 * @exception E_SUCCESS The method is successful.
488 * @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure. @n
489 * The index is greater than or equal to the number of elements or less than @c 0.
490 * @exception E_SYSTEM A system error has occurred.
492 result RemoveItemAt(int itemIndex);
496 * Removes the button item at the specified position.
500 * @return An error code
501 * @param[in] position The position of the button item to remove
502 * @exception E_SUCCESS The method is successful.
503 * @exception E_SYSTEM A system error has occurred.
504 * @remarks If no button item is set at the specified position, the method returns @c E_SUCCESS.
506 result RemoveButtonAt(ButtonPosition position);
510 * Sets the background bitmap image.
514 * @return An error code
515 * @param[in] pBitmap The background image
516 * @exception E_SUCCESS The method is successful.
517 * @exception E_SYSTEM A system error has occurred.
519 result SetBackgroundBitmap(const Tizen::Graphics::Bitmap* pBitmap);
523 * Sets the button item at the specified position.
527 * @return An error code
528 * @param[in] position The position at which to set the specified button item
529 * @param[in] button The button item to set
530 * @exception E_SUCCESS The method is successful.
531 * @exception E_INVALID_ARG A specified input parameter is invalid. @n
532 * The specified item is not constructed.
533 * @exception E_SYSTEM A system error has occurred.
534 * @remarks If there is an existing button item at the specified position, it is replaced with a new item. @n
535 * The contents of the specified item are copied.
537 result SetButton(ButtonPosition position, const ButtonItem& button);
541 * Sets the button item color for the specified state.
545 * @return An error code
546 * @param[in] status The status of the button item
547 * @param[in] color The button item color to set
548 * @exception E_SUCCESS The method is successful.
549 * @exception E_SYSTEM A system error has occurred.
550 * @see GetButtonColor()
552 result SetButtonColor(ButtonItemStatus status, const Tizen::Graphics::Color& color);
556 * Enables or disables the button item at the specified position.
560 * @return An error code
561 * @param[in] position The button item position
562 * @param[in] enable Set to @c true to enable the specified button item, @n
563 * else @c false to disable
564 * @exception E_SUCCESS The method is successful.
565 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
566 * There is no button set at the specified position.
567 * @exception E_SYSTEM A system error has occurred.
569 result SetButtonEnabled(ButtonPosition position, bool enable);
573 * Sets the text color of the button item for the specified state.
577 * @return An error code
578 * @param[in] status The status of the button item
579 * @param[in] color The button item text color to set
580 * @exception E_SUCCESS The method is successful.
581 * @exception E_SYSTEM A system error has occurred.
583 result SetButtonTextColor(ButtonItemStatus status, const Tizen::Graphics::Color& color);
587 * Sets the badge icon of the specified ButtonItem.
591 * @return An error code
592 * @param[in] position The button item position
593 * @param[in] pBadgeIcon The bitmap for the icon
594 * @exception E_SUCCESS The method is successful.
595 * @exception E_UNSUPPORTED_OPERATION This operation is not supported. @n
596 * The operation is not supported when the style of the %Header control is ::HEADER_STYLE_TAB @n
597 * or ::HEADER_STYLE_TAB_LARGE.
599 result SetButtonBadgeIcon(ButtonPosition position, const Tizen::Graphics::Bitmap* pBadgeIcon);
603 * Sets the numbered badge icon of the specified ButtonItem.
607 * @return An error code
608 * @param[in] position The button item position
609 * @param[in] number The number value that should be displayed as the badge icon
610 * @exception E_SUCCESS The method is successful.
611 * @exception E_INVALID_ARG The specified @c number must be in the range defined by @c 0 and @c 99999.
612 * @exception E_UNSUPPORTED_OPERATION This operation is not supported. @n
613 * The operation is not supported when the style of the %Header control is ::HEADER_STYLE_TAB @n
614 * or ::HEADER_STYLE_TAB_LARGE.
615 * @remarks To remove the numbered badge icon from an item, pass @c 0 as the value of @c number.
617 result SetButtonNumberedBadgeIcon(ButtonPosition position, int number);
621 * Sets the contents of the %Header control item at the specified index.
625 * @return An error code
626 * @param[in] itemIndex The index at which to set the specified item
627 * @param[in] item The item to set
628 * @exception E_SUCCESS The method is successful.
629 * @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure. @n
630 * The index is greater than or equal to the number of elements or less than @c 0.
631 * @exception E_INVALID_ARG A specified input parameter is invalid.
632 * @exception E_SYSTEM A system error has occurred.
633 * @remarks The contents of the specified item are copied.
635 result SetItemAt(int itemIndex, const HeaderItem& item);
639 * Sets the badge icon of the specified segmented style header item.
643 * @return An error code
644 * @param[in] itemIndex The item index
645 * @param[in] pBadgeIcon The bitmap for the icon
646 * @exception E_SUCCESS The method is successful.
647 * @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure. @n
648 * The index is greater than or equal to the number of elements or less than @c 0.
649 * @exception E_UNSUPPORTED_OPERATION The operation is not supported when the style of the %Header control is ::HEADER_STYLE_TITLE.
650 * @exception E_SYSTEM A system error has occurred.
652 result SetItemBadgeIcon(int itemIndex, const Tizen::Graphics::Bitmap* pBadgeIcon);
656 * Sets the numbered badge icon of the specified segmented style header item.
660 * @return An error code
661 * @param[in] itemIndex The item index
662 * @param[in] number The number value that should be displayed as the badge icon
663 * @exception E_SUCCESS The method is successful.
664 * @exception E_INVALID_ARG The specified @c number must be in the range defined by @c 0 and @c 99999.
665 * @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure. @n
666 * The index is greater than or equal to the number of elements or less than @c 0.
667 * @exception E_UNSUPPORTED_OPERATION The operation is not supported when the style of the %Header control is ::HEADER_STYLE_TITLE.
668 * @exception E_SYSTEM A system error has occurred.
669 * @remarks To remove the numbered badge icon from an item, pass @c 0 as the value of @c number.
671 result SetItemNumberedBadgeIcon(int itemIndex, int number);
675 * Sets the item color for the specified state.
679 * @return An error code
680 * @param[in] status The item status
681 * @param[in] color The item color to set
682 * @exception E_SUCCESS The method is successful.
683 * @exception E_SYSTEM A system error has occurred.
684 * @see GetItemColor()
686 result SetItemColor(HeaderItemStatus status, const Tizen::Graphics::Color& color);
690 * Sets the item state at the specified index in the %Header control.
694 * @return An error code
695 * @param[in] itemIndex The index of the item to set
696 * @param[in] enable Set to @c true to enable the item state, @n
698 * @exception E_SUCCESS The method is successful.
699 * @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure. @n
700 * The index is greater than or equal to the number of elements or less than @c 0.
701 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
702 * The specified item is currently selected.
703 * @exception E_SYSTEM A system error has occurred.
705 result SetItemEnabled(int itemIndex, bool enable);
709 * Sets the item text color for the specified state.
713 * @return An error code
714 * @param[in] status The item status
715 * @param[in] color The item text color to set
716 * @exception E_SUCCESS The method is successful.
717 * @exception E_SYSTEM A system error has occurred.
719 result SetItemTextColor(HeaderItemStatus status, const Tizen::Graphics::Color& color);
723 * Sets the selected item at the specified index.
727 * @return An error code
728 * @param[in] itemIndex The index of the item to select
729 * @exception E_SUCCESS The method is successful.
730 * @exception E_OUT_OF_RANGE The specified index is outside the bounds of the data structure. @n
731 * The index is greater than or equal to the number of elements or less than @c 0.
732 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
733 * The item at the specified index is disabled.
734 * @exception E_UNSUPPORTED_OPERATION The operation is not supported when the %Header control style is ::HEADER_STYLE_TITLE, @n
735 * ::HEADER_STYLE_TITLE_BUTTON or ::HEADER_STYLE_BUTTON.
736 * @exception E_SYSTEM A system error has occurred.
738 result SetItemSelected(int itemIndex);
742 * Sets the color of the %Header control.
746 * @return An error code
747 * @param[in] color The header color
748 * @exception E_SUCCESS The method is successful.
750 result SetColor(const Tizen::Graphics::Color& color);
754 * Sets the style of the %Header control.
758 * @return An error code
759 * @param[in] style The header style to set
760 * @exception E_SUCCESS The method is successful.
761 * @exception E_SYSTEM A system error has occurred.
762 * @remarks All items and buttons will be removed if the style is changed.
764 result SetStyle(HeaderStyle style);
768 * Sets the title icon of the %Header control that has the title style.
772 * @return An error code
773 * @param[in] pIcon The title icon to set @n
774 * Set to @c null to remove the title icon.
775 * @exception E_SUCCESS The method is successful.
776 * @exception E_UNSUPPORTED_OPERATION The operation is supported when the %Header control style is ::HEADER_STYLE_TITLE, @n
777 * ::HEADER_STYLE_SEGMENTED_WITH_TITLE or ::HEADER_STYLE_TAB_WITH_TITLE.
778 * @exception E_SYSTEM A system error has occurred.
780 result SetTitleIcon(const Tizen::Graphics::Bitmap* pIcon);
784 * Sets the title text of the %Header control.
788 * @return An error code
789 * @param[in] text The text to set
790 * @exception E_SUCCESS The method is successful.
791 * @exception E_UNSUPPORTED_OPERATION The operation is supported when the %Header control style is ::HEADER_STYLE_TITLE, @n
792 * ::HEADER_STYLE_SEGMENTED_WITH_TITLE or ::HEADER_STYLE_TAB_WITH_TITLE.
793 * @exception E_SYSTEM A system error has occurred.
794 * @remarks If the text cannot be displayed in a line, then the ellipsis is applied at the end. @n
795 * When the title icon is set along with the title text, the title retains the left alignment.
797 result SetTitleText(const Tizen::Base::String& text);
801 * Sets the title text color.
805 * @return An error code
806 * @param[in] color The title text color to set
807 * @exception E_SUCCESS The method is successful.
808 * @exception E_UNSUPPORTED_OPERATION The operation is supported when the %Header control style is ::HEADER_STYLE_TITLE, @n
809 * ::HEADER_STYLE_SEGMENTED_WITH_TITLE or ::HEADER_STYLE_TAB_WITH_TITLE.
810 * @exception E_SYSTEM A system error has occurred.
812 result SetTitleTextColor(const Tizen::Graphics::Color& color);
816 * Sets the description text.
820 * @return An error code
821 * @param[in] text The text to set
822 * @exception E_SUCCESS The method is successful.
823 * @exception E_UNSUPPORTED_OPERATION The current state of the instance does not support the execution of the specified operation. @n
824 * The style of the %Header control is not ::HEADER_STYLE_TITLE.
825 * @exception E_SYSTEM A system error has occurred.
826 * @remarks If the text cannot be displayed in a line, then the ellipsis is applied at the end. @n
827 * When the title icon is set along with the title text, the title retains the left alignment.
829 result SetDescriptionText(const Tizen::Base::String& text);
833 * Sets the description text color.
837 * @return An error code
838 * @param[in] color The description text color to set
839 * @exception E_SUCCESS The method is successful.
840 * @exception E_UNSUPPORTED_OPERATION The current state of the instance does not support the execution of the specified operation. @n
841 * The style of the %Header control is not ::HEADER_STYLE_TITLE.
842 * @exception E_SYSTEM A system error has occurred.
844 result SetDescriptionTextColor(const Tizen::Graphics::Color& color);
848 * Stops the waiting animation in progress at the specified position.
852 * @return An error code
853 * @param[in] animationPos The waiting animation position
854 * @exception E_SUCCESS The method is successful.
855 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation.
856 * @exception E_SYSTEM A system error has occurred.
857 * @remarks This method returns @c E_INVALID_OPERATION if no waiting animation is in progress at the specified position.
858 * @see GetWaitingAnimationStatus()
859 * @see PauseWaitingAnimation()
860 * @see PlayWaitingAnimation()
862 result StopWaitingAnimation(HeaderAnimationPosition animationPos);
866 * Adds an IActionEventListener instance. @n
867 * OnActionPerformed() of the added listener is called when the user selects an item.
871 * @param[in] listener The event listener to add
873 void AddActionEventListener(Tizen::Ui::IActionEventListener& listener);
877 * Removes an IActionEventListener instance. @n
878 * The removed listener cannot listen to events when they are fired.
882 * @param[in] listener The event listener to remove
884 void RemoveActionEventListener(Tizen::Ui::IActionEventListener& listener);
888 * Checks whether the tab edit mode is enabled.
892 * @return @c true if the tab edit mode is set, @n
895 bool IsTabEditModeEnabled(void) const;
899 * Enables or disables the tab edit mode.
903 * @return An error code
904 * @param[in] enable Set to @c true to enable the edit mode, @n
906 * @exception E_SUCCESS The method is successful.
907 * @exception E_UNSUPPORTED_OPERATION The operation is supported when the style of the %Header control style is ::HEADER_STYLE_TAB, @n
908 * ::HEADER_STYLE_TAB_WITH_TITLE or ::HEADER_STYLE_TAB_LARGE.
910 result SetTabEditModeEnabled(bool enable);
914 * Sets the back button.
916 * @brief <i> [Deprecated] </i>
917 * @deprecated This method is deprecated because hardware back key is mandatory for Tizen mobile devices. @n
918 * This method is not guaranteed to work properly.
921 * @return An error code
922 * @exception E_SUCCESS The method is successful.
923 * @exception E_UNSUPPORTED_OPERATION This device does not support the software back button.
924 * @remarks When the back button is pressed, OnFormBackRequested() of IFormBackEventListener is called.
926 result SetBackButton(void);
930 * Checks whether the back button item is set.
932 * @brief <i> [Deprecated] </i>
933 * @deprecated This method is deprecated because hardware back key is mandatory for Tizen mobile devices. @n
934 * This method is not guaranteed to work properly.
937 * @return @c true if the back button item is set, @n
940 bool IsBackButtonSet(void) const;
944 * Removes the back button item.
946 * @brief <i> [Deprecated] </i>
947 * @deprecated This method is deprecated because hardware back key is mandatory for Tizen mobile devices. @n
948 * This method is not guaranteed to work properly.
952 void RemoveBackButton(void);
956 * Enables or disables the back button.
958 * @brief <i> [Deprecated] </i>
959 * @deprecated This method is deprecated because hardware back key is mandatory for Tizen mobile devices. @n
960 * This method is not guaranteed to work properly.
963 * @return An error code
964 * @param[in] enable Set to @c true to enable the back button, @n
966 * @exception E_SUCCESS The method is successful.
967 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
968 * The back button item is not set.
970 result SetBackButtonEnabled(bool enable);
974 * Gets the state of the back button.
976 * @brief <i> [Deprecated] </i>
977 * @deprecated This method is deprecated because hardware back key is mandatory for Tizen mobile devices. @n
978 * This method is not guaranteed to work properly.
981 * @return The state of the back button, @n
982 * else @c BUTTON_ITEM_STATUS_NORMAL if an error occurs.
983 * @exception E_SUCCESS The method is successful.
984 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
985 * The back button is not set.
986 * @remarks The specific error code can be accessed using the GetLastResult() method.
988 ButtonItemStatus GetBackButtonStatus(void) const;
992 * Gets the position and size of the specified button item.
996 * @return The position and size of the button item at the specified position.
997 * @param[in] position The position of the button item
998 * @exception E_SUCCESS The method is successful.
999 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1000 * There is no button set at the specified position.
1001 * @remarks The specific error code can be accessed using the GetLastResult() method.
1003 Tizen::Graphics::Rectangle GetButtonBounds(ButtonPosition position) const;
1006 * Gets the position and size of the specified button item.
1010 * @return The position and size of the button item at the specified position.
1011 * @param[in] position The position of the button item
1012 * @exception E_SUCCESS The method is successful.
1013 * @exception E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
1014 * There is no button set at the specified position.
1015 * @remarks The specific error code can be accessed using the GetLastResult() method.
1017 Tizen::Graphics::FloatRectangle GetButtonBoundsF(ButtonPosition position) const;
1020 * Sets the badge icon.
1024 * @return An error code
1025 * @param[in] pBadgeIcon The bitmap for the badge icon
1026 * @exception E_SUCCESS The method is successful.
1027 * @exception E_INVALID_OPERATION This operation is invalid. @n
1028 * The operation is invalid when the style of the %Header control is not ::HEADER_STYLE_TITLE
1029 * or ::HEADER_STYLE_SEGMENTED_WITH_TITLE or ::HEADER_STYLE_TAB_WITH_TITLE.
1030 * @remarks For icon size details, see <a href="../org.tizen.native.appprogramming/html/guide/ui/control_iconsize.htm">here</a>.
1032 result SetTitleBadgeIcon(const Tizen::Graphics::Bitmap* pBadgeIcon);
1035 * Sets the numbered badge icon.
1039 * @return An error code
1040 * @param[in] number The number value that should be displayed as the badge icon
1041 * @exception E_SUCCESS The method is successful.
1042 * @exception E_INVALID_ARG The specified @c number must be in the range defined by @c 0 and @c 99999.
1043 * @exception E_INVALID_OPERATION This operation is invalid. @n
1044 * The operation is invalid when the style of the %Header control is not ::HEADER_STYLE_TITLE
1045 * or ::HEADER_STYLE_SEGMENTED_WITH_TITLE TITLE or ::HEADER_STYLE_TAB_WITH_TITLE.
1046 * @remarks To remove the numbered badge icon from an item, pass @c 0 as the value of @c number.
1048 result SetTitleNumberedBadgeIcon(int number);
1053 //This method is for internal use only. Using this method can cause behavioral, security-related,
1054 //and consistency-related issues in the application.
1056 // This is the default constructor for this class.
1064 //This method is for internal use only. Using this method can cause behavioral, security-related,
1065 //and consistency-related issues in the application.
1067 // This is the destructor for this class.
1071 virtual ~Header(void);
1076 //This method is for internal use only. Using this method can cause behavioral, security-related,
1077 //and consistency-related issues in the application.
1079 // Initializes this instance of %Header with the specified parameter.
1082 // @return An error code
1083 // @exception E_SUCCESS The method is successful.
1084 // @exception E_SYSTEM A system error has occurred.
1086 result Construct(void);
1088 Header(const Header& rhs);
1089 Header& operator =(const Header& rhs);
1092 friend class _FormImpl;
1093 friend class _HeaderImpl;
1097 }}} // Tizen::Ui::Controls
1099 #endif // _FUI_CTRL_HEADER_H_