Fixed to add the AllWindowList
[platform/framework/native/uifw.git] / inc / FUiCtrlFooter.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0/
10 //
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.
16 //
17
18 /**
19  * @file    FUiCtrlFooter.h
20  * @brief       This is the header file for the %Footer class.
21  *
22  * This header file contains the declarations of the %Footer class.
23  */
24
25 #ifndef _FUI_CTRL_FOOTER_H_
26 #define _FUI_CTRL_FOOTER_H_
27
28 #include <FBaseObject.h>
29 #include <FBaseTypes.h>
30 #include <FBaseString.h>
31 #include <FGrpBitmap.h>
32 #include <FGrpColor.h>
33 #include <FGrpRectangle.h>
34 #include <FUiControl.h>
35 #include <FUiIActionEventListener.h>
36 #include <FUiCtrlButtonItem.h>
37 #include <FUiCtrlFooterItem.h>
38 #include <FUiCtrlForm.h>
39
40
41 namespace Tizen { namespace Ui { namespace Controls
42 {
43 class _FooterImpl;
44 /**
45  * @enum        FooterStyle
46  *
47  * Defines the possible styles of a %Footer control.
48  *
49  * @since       2.0
50  */
51 enum FooterStyle
52 {
53         FOOTER_STYLE_BUTTON_TEXT,               /**< The text button style */
54         FOOTER_STYLE_BUTTON_ICON,               /**< The icon button style */
55         FOOTER_STYLE_BUTTON_ICON_TEXT,          /**< The icon and text button style */
56         FOOTER_STYLE_SEGMENTED_TEXT,            /**< The text segmented style */
57         FOOTER_STYLE_SEGMENTED_ICON,            /**< The icon segmented style */
58         FOOTER_STYLE_SEGMENTED_ICON_TEXT,       /**< The icon and text segmented style */
59         FOOTER_STYLE_TAB,                       /**< The tab style */
60         FOOTER_STYLE_TAB_LARGE                  /**< The large tab style @b Since: @b 2.2 */
61 };
62
63 /**
64  * @class   Footer
65  * @brief       This class is an implementation of a %Footer control.
66  *
67  * @since   2.0
68  *
69  * The %Footer class displays a multi-purpose area at the bottom of the screen. It is used to switch between different application
70  * "views", or to host buttons for performing user-defined actions.
71  *
72  *For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_footer.htm">Footer</a>.
73  *
74  *The following examples demonstrate how to use the %Footer class.
75  * - Constructing a footer
76  * When creating a %Form, specify the FORM_STYLE_FOOTER parameter in the Form::Construct() method.
77  *
78  * @code
79  * // Initializes
80  * bool
81  * TestForm::Initialize(void)
82  * {
83  *      Construct(FORM_STYLE_NORMAL | FORM_STYLE_PORTRAIT_INDICATOR | FORM_STYLE_FOOTER);
84  * }
85  * @endcode
86  *
87  * - Using the footer
88  * Gets the footer with the GetFooter() method, and sets the footer style
89  *
90  * @code
91  * bool
92  * TestForm::Initialize(void)
93  * {
94  *      Footer* pFooter = GetFooter();
95  *      pFooter->SetStyle(FOOTER_STYLE_SEGMENTED_TEXT);
96  * }
97  * @endcode
98  *
99  * - Adding items to the footer:
100  * Adds FooterItems or ButtonItems according to the footer style. The action ID registered in the Construct() method is notified
101  * when items are touched.
102  *
103  * @code
104  *  bool
105  * TestForm::Initialize(void)
106  * {
107  *      FooterItem footerItem;
108  *      footerItem.Construct(ID_FOOTER_ITEM);
109  *      footerItem.SetText("FooterItem");
110  *
111  *      pFooter->AddItem(footerItem);
112  *
113  *      ButtonItem buttonItem;
114  *      buttonItem.Construct(BUTTON_ITEM_STYLE_ICON, ID_HEADER_BUTTON);
115  *      buttonItem.SetIcon(BUTTON_ITEM_STATUS_NORMAL, __pBitmap);
116  *
117  *      pFooter->SetButton(BUTTON_POSITION_LEFT, buttonItem);
118  *
119  * }
120  * @endcode
121  *
122  */
123 class _OSP_EXPORT_ Footer
124         : public Tizen::Ui::Control
125 {
126 public:
127         /**
128          * Adds the specified footer item.
129          *
130          * @since               2.0
131          *
132          * @return      An error code
133          * @param[in]   item                The footer item to add
134          * @exception   E_SUCCESS           The method is successful.
135          * @exception   E_MAX_EXCEEDED      The number of items has exceeded the maximum limit.
136          * @exception   E_INVALID_ARG       A specified input parameter is invalid. @n
137          *                                                                      The specified item is not constructed.
138          * @exception   E_SYSTEM            A system error has occurred.
139          * @remarks
140          *                      - The %Footer control does not throw any exception even though the same action ID is assigned to multiple items. @n
141          *                      However, the content of the specified item is copied to the %Footer control.
142          *                      - Depending on the style of the %Footer control, several types of items can be added or inserted.
143          */
144         result AddItem(const FooterItem& item);
145
146
147         /**
148          * Inserts the footer item at the specified index.
149          *
150          * @since               2.0
151          *
152          * @return      An error code
153          * @param[in]   itemIndex           The index where the item must be inserted
154          * @param[in]   item                The footer item object to insert
155          * @exception   E_SUCCESS           The method is successful.
156          * @exception   E_MAX_EXCEEDED      The number of items has exceeded the maximum limit.
157          * @exception   E_OUT_OF_RANGE      The specified index is outside the bounds of the data structure. @n
158          *                                                                      The index is greater than or equal to the number of elements or less than @c 0.
159          * @exception   E_INVALID_ARG       A specified input parameter is invalid. @n
160          *                                                                      The specified item is not constructed.
161          * @exception   E_SYSTEM            A system error has occurred.
162          * @remarks
163          *                      - The %Footer control does not throw any exception even though the same action ID is assigned to multiple items. @n
164          *                      However, the content of the specified item is copied to the %Footer control.
165          *                      - Depending on the style of the %Footer control, several types of items can be added or inserted.
166          */
167         result InsertItemAt(int itemIndex, const FooterItem& item);
168
169
170         /**
171          * Checks whether a button item is set at the specified position.
172          *
173          * @since               2.0
174          *
175          * @return              @c true if the button item is set at the specified position, @n
176          *                              else @c false
177          * @param[in]   position            The position of the button item
178          * @exception   E_SUCCESS           The method is successful.
179          * @remarks     The specific error code can be accessed using the GetLastResult() method.
180          */
181         bool IsButtonSet(ButtonPosition position) const;
182
183
184         /**
185          * Checks whether the back button item is set.
186          *
187          * @brief       <i> [Deprecated] </i>
188          * @deprecated  This method is deprecated because hardware back key is mandatory for Tizen mobile devices. @n
189          *              This method is not guaranteed to work properly.
190          * @since               2.0
191          *
192          * @return              @c true if the back button item is set, @n
193          *                              else @c false
194          * @exception   E_SUCCESS           The method is successful.
195          * @remarks     The specific error code can be accessed using the GetLastResult() method.
196          */
197         bool IsBackButtonSet(void) const;
198
199
200         /**
201          * Checks whether the tab edit mode is enabled.
202          *
203          * @since               2.0
204          *
205          * @return      @c true if the tab edit mode is set, @n
206          *                              else @c false
207          * @exception   E_SUCCESS           The method is successful.
208          */
209         bool IsTabEditModeEnabled(void) const;
210
211
212         /**
213          * Gets the color of the button item for the specified state.
214          *
215          * @since               2.0
216          *
217          * @return      The color of the button item, @n
218          *                              else RGBA (0,0,0,0) if an error occurs
219          * @param[in]   status              The status of the button item
220          * @exception   E_SUCCESS           The method is successful.
221          * @remarks     The specific error code can be accessed using the GetLastResult() method.
222          * @see         SetButtonColor()
223          */
224         Tizen::Graphics::Color GetButtonColor(ButtonItemStatus status) const;
225
226
227         /**
228          * Gets the text color of the button item for the specified state.
229          *
230          * @since               2.0
231          *
232          * @return      The text color of the button item, @n
233          *                              else RGBA (0,0,0,0) if an error occurs
234          * @param[in]   status              The status of the button item
235          * @exception   E_SUCCESS           The method is successful.
236          * @remarks     The specific error code can be accessed using the GetLastResult() method.
237          * @see         SetButtonTextColor()
238          */
239         Tizen::Graphics::Color GetButtonTextColor(ButtonItemStatus status) const;
240
241
242         /**
243          * Gets the state of the specified button item.
244          *
245          * @since               2.0
246          *
247          * @return      The state of the button item at the specified position
248          * @param[in]   position                        The position of the button item
249          * @exception   E_SUCCESS                       The method is successful.
250          * @exception   E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
251          *                                                                      There is no button set at the specified position.
252          * @remarks     The specific error code can be accessed using the GetLastResult() method.
253          */
254         ButtonItemStatus GetButtonStatus(ButtonPosition position) const;
255
256
257         /**
258          * Gets the state of the back button.
259          *
260          * @brief       <i> [Deprecated] </i>
261          * @deprecated  This method is deprecated because hardware back key is mandatory for Tizen mobile devices. @n
262          *              This method is not guaranteed to work properly.
263          * @since       2.0
264          *
265          * @return      The state of the back button, @n
266          *                              else @c BUTTON_ITEM_STATUS_NORMAL if an error occurs.
267          * @exception   E_SUCCESS           The method is successful.
268          * @exception   E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
269          *                                                                      The back button is not set.
270          * @remarks     The specific error code can be accessed using the GetLastResult() method.
271          */
272         ButtonItemStatus GetBackButtonStatus(void) const;
273
274
275         /**
276          * Gets the color of the footer item for the specified item state.
277          *
278          * @since               2.0
279          *
280          * @return      The color of the item, @n
281          *                              else RGBA (0,0,0,0) if an error occurs
282          * @param[in]   status                          The item status
283          * @exception   E_SUCCESS           The method is successful.
284          * @remarks     The specific error code can be accessed using the GetLastResult() method.
285          * @see         SetItemColor()
286          */
287         Tizen::Graphics::Color GetItemColor(FooterItemStatus status) const;
288
289
290         /**
291          * Gets the number of footer items.
292          *
293          * @since               2.0
294          *
295          * @return      The number of footer items, @n
296          *              else @c -1 if an error occurs
297          * @exception   E_SUCCESS           The method is successful.
298          * @remarks     The specific error code can be accessed using the GetLastResult() method.
299          */
300         int GetItemCount(void) const;
301
302
303         /**
304          * Gets the state of the specified footer item.
305          *
306          * @since               2.0
307          *
308          * @return      An error code
309          * @param[in]   itemIndex               The index of the item
310          * @param[out]  status                  The state of the item at the specified index
311          * @exception   E_SUCCESS           The method is successful.
312          * @exception   E_OUT_OF_RANGE      The specified index is outside the bounds of the data structure. @n
313          *                                                                      The index is greater than or equal to the number of elements or less than zero.
314          */
315         result GetItemStatus(int itemIndex, FooterItemStatus& status) const;
316
317
318         /**
319          * Gets the text color of the footer item for the specified item state.
320          *
321          * @since               2.0
322          *
323          * @return      The text color of the item, @n
324          *                              else RGBA (0,0,0,0) if an error occurs
325          * @param[in]   status              The item status
326          * @exception   E_SUCCESS           The method is successful.
327          * @remarks     The specific error code can be accessed using the GetLastResult() method.
328          */
329         Tizen::Graphics::Color GetItemTextColor(FooterItemStatus status) const;
330
331
332         /**
333          * Gets the style of the %Footer control.
334          *
335          * @since               2.0
336          *
337          * @return      The footer style, @n
338          *                              else @c FOOTER_STYLE_BUTTON_TEXT if an error occurs
339          * @exception   E_SUCCESS           The method is successful.
340          * @remarks     The specific error code can be accessed using the GetLastResult() method.
341          */
342         FooterStyle GetStyle(void) const;
343
344
345         /**
346          * Gets the index of the currently selected item.
347          *
348          * @since               2.0
349          *
350          * @return      The selected item index,@n
351          *              else @c -1 if an error occurs
352          * @exception   E_SUCCESS               The method is successful.
353          * @exception   E_UNSUPPORTED_OPERATION The operation is not supported when the style of the %Footer control is
354          *                                                                              ::FOOTER_STYLE_BUTTON_TEXT, ::FOOTER_STYLE_BUTTON_ICON
355          *                                                                              or ::FOOTER_STYLE_BUTTON_ICON_TEXT.
356          * @remarks     The specific error code can be accessed using the GetLastResult() method.
357          */
358         int GetSelectedItemIndex(void) const;
359
360
361         /**
362          * Gets the color of the footer.
363          *
364          * @since               2.0
365          *
366          * @return      The color, @n
367          *                              else RGBA (0,0,0,0) if an error occurs
368          * @exception   E_SUCCESS           The method is successful.
369          * @remarks     The specific error code can be accessed using the GetLastResult() method.
370          */
371         Tizen::Graphics::Color GetColor(void) const;
372
373
374         /**
375          * Removes all the button items with the back button.
376          *
377          * @since               2.0
378          *
379          * @return      An error code
380          * @exception   E_SUCCESS       The method is successful.
381          * @exception   E_SYSTEM        A system error has occurred.
382          */
383         result RemoveAllButtons(void);
384
385
386         /**
387          * Removes the button item at the specified position.
388          *
389          * @since               2.0
390          *
391          * @return      An error code
392          * @param[in]   position        The position of the button item to remove
393          * @exception   E_SUCCESS       Either the method is successful or no button item is set at the specified position.
394          * @exception   E_SYSTEM        A system error has occurred.
395          */
396         result RemoveButtonAt(ButtonPosition position);
397
398
399         /**
400          * Removes the back button item.
401          *
402          * @brief       <i> [Deprecated] </i>
403          * @deprecated  This method is deprecated because hardware back key is mandatory for Tizen mobile devices. @n
404          *              This method is not guaranteed to work properly.
405          * @since               2.0
406          *
407          * @return      An error code
408          * @exception   E_SUCCESS          The method is successful.
409          * @exception   E_SYSTEM           This exception exists only for historical reason.
410          * @remarks     This method always returns E_SUCCESS.
411          */
412         result RemoveBackButton(void);
413
414
415         /**
416          * Removes all the footer items except for the left, right, and back button items.
417          *
418          * @since               2.0
419          *
420          * @return      An error code
421          * @exception   E_SUCCESS           The method is successful.
422          * @exception   E_SYSTEM            A system error has occurred.
423          */
424         result RemoveAllItems(void);
425
426
427         /**
428          * Removes the item at the specified index.
429          *
430          * @since               2.0
431          *
432          * @return      An error code
433          * @param[in]   itemIndex                       The index of the item to remove
434          * @exception   E_SUCCESS                       The method is successful.
435          * @exception   E_OUT_OF_RANGE          The specified index is outside the bounds of the data structure. @n
436          *                                                                      The index is greater than or equal to the number of elements or less than @c 0.
437          * @exception   E_SYSTEM                        A system error has occurred.
438          */
439         result RemoveItemAt(int itemIndex);
440
441
442         /**
443          * Sets the background bitmap image.
444          *
445          * @since               2.0
446          *
447          * @return      An error code
448          * @param[in]   pBitmap              The background image
449          * @exception   E_SUCCESS            The method is successful.
450          * @exception   E_SYSTEM             A system error has occurred.
451          */
452         result SetBackgroundBitmap(const Tizen::Graphics::Bitmap* pBitmap);
453
454
455         /**
456          * Sets the button item at the specified position.
457          *
458          * @since               2.0
459          *
460          * @return              An error code
461          * @param[in]   position                        The position at which to set the specified button item. @n
462          *                                                      If there is an existing button item at the specified position, it is replaced with the new item.
463          *                                                      However, the contents of the specified item are copied to the %Footer control.
464          * @param[in]   button                      The button item to set
465          * @exception   E_SUCCESS                   The method is successful.
466          * @exception   E_INVALID_ARG                   A specified input parameter is invalid. @n
467          *                                                                              The specified item is not constructed.
468          * @exception   E_INVALID_OPERATION                     The current state of the instance prohibits the execution of the specified operation.@n
469          *                                                                                      There are more than 2 footer items.
470          * @exception   E_UNSUPPORTED_OPERATION     The operation is not supported when the style of the %Footer control is ::FOOTER_STYLE_TAB or ::FOOTER_STYLE_TAB_LARGE.
471          * @exception   E_SYSTEM                    A system error has occurred.
472          */
473         result SetButton(ButtonPosition position, const ButtonItem& button);
474
475
476         /**
477          * Sets the button item color for the specified state.
478          *
479          * @since               2.0
480          *
481          * @return              An error code
482          * @param[in]   status          The status of the button item
483          * @param[in]   color           The button item color to set
484          * @exception   E_SUCCESS       The method is successful.
485          * @exception   E_SYSTEM            A system error has occurred.
486          * @see         GetButtonColor()
487          */
488         result SetButtonColor(ButtonItemStatus status, const Tizen::Graphics::Color& color);
489
490
491         /**
492          * Enables or disables the button item at the specified position.
493          *
494          * @since       2.0
495          *
496          * @return      An error code
497          * @param[in]   position                The button item position
498          * @param[in]   enable                  Set to @c true to enable the specified button item, @n
499          *                                                                              else @c false
500          * @exception   E_SUCCESS               The method is successful.
501          * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation. @n
502          *                                                                          There is no button set at the specified position.
503          * @exception   E_SYSTEM                A system error has occurred.
504          */
505         result SetButtonEnabled(ButtonPosition position, bool enable);
506
507
508         /**
509          * Enables or disables the back button.
510          *
511          * @brief       <i> [Deprecated] </i>
512          * @deprecated  This method is deprecated because hardware back key is mandatory for Tizen mobile devices. @n
513          *              This method is not guaranteed to work properly.
514          * @since               2.0
515          *
516          * @return      An error code
517          * @param[in]   enable                  Set to @c true to enable the back button, @n
518          *                                                                              else @c false
519          * @exception   E_SUCCESS               The method is successful.
520          * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation. @n
521          *                                                                          The back button item is not set.
522          */
523         result SetBackButtonEnabled(bool enable);
524
525
526         /**
527          * Sets the button item text color for the specified state.
528          *
529          * @since               2.0
530          *
531          * @return      An error code
532          * @param[in]   status          The status of the button item
533          * @param[in]   color           The button item text color to set
534          * @exception   E_SUCCESS       The method is successful.
535          * @exception   E_SYSTEM        A system error has occurred.
536          * @see         GetButtonTextColor()
537          */
538         result SetButtonTextColor(ButtonItemStatus status, const Tizen::Graphics::Color& color);
539
540         /**
541          * Sets the badge icon of the specified ButtonItem.
542          *
543          * @since       2.0
544          *
545          * @return      An error code
546          * @param[in]   position                                The button item position
547          * @param[in]   pBadgeIcon                      The bitmap for the icon
548          * @exception   E_SUCCESS                       The method is successful.
549          * @exception   E_UNSUPPORTED_OPERATION         This operation is not supported. @n
550          *                      The operation is not supported when the style of the %Footer control is ::FOOTER_STYLE_TAB or ::FOOTER_STYLE_TAB_LARGE.
551          */
552         result SetButtonBadgeIcon(ButtonPosition position, const Tizen::Graphics::Bitmap* pBadgeIcon);
553
554
555         /**
556          * Sets the numbered badge icon of the specified ButtonItem.
557          *
558          * @since       2.0
559          *
560          * @return      An error code
561          * @param[in]   position                                The button item position
562          * @param[in]   number                                  The number value that should be displayed as the badge icon @n
563          *                                                                      If it is set to @c 0, the numbered badge icon is removed from an item.
564          * @exception   E_SUCCESS                               The method is successful.
565          * @exception   E_INVALID_ARG                   The specified @c number must be in the range defined by @c 0 and @c 99999.
566          * @exception   E_UNSUPPORTED_OPERATION         This operation is not supported. @n
567          *              The operation is not supported when the style of the %Footer control is ::FOOTER_STYLE_TAB or ::FOOTER_STYLE_TAB_LARGE.
568          */
569         result SetButtonNumberedBadgeIcon(ButtonPosition position, int number);
570
571
572         /**
573          * Sets the back button.
574          *
575          * @brief       <i> [Deprecated] </i>
576          * @deprecated  This method is deprecated because hardware back key is mandatory for Tizen mobile devices. @n
577          *              This method is not guaranteed to work properly.
578          * @since       2.0
579          *
580          * @return      An error code
581          * @exception   E_SUCCESS                     The method is successful.
582          * @exception   E_UNSUPPORTED_OPERATION       This operation is not supported. @n
583          *                                                                              The operation is not supported when the style of the %Footer control is ::FOOTER_STYLE_TAB or ::FOOTER_STYLE_TAB_LARGE. @n
584          *                                            This device does not support the software back button.
585          * @exception   E_SYSTEM                      A system error has occurred.
586          * @remarks
587          *                      - When the back button is pressed, IFormBackEventListener::OnFormBackRequested() is called.
588          *                      - If the right button is already set, then the button is replaced with the back button.
589          * @see         Tizen::Ui::Controls::IFormBackEventListener
590          */
591         result SetBackButton(void);
592
593
594         /**
595          * Sets the content of the footer item at the specified index.
596          *
597          * @since               2.0
598          *
599          * @return      An error code
600          * @param[in]   itemIndex               The index at which to set the specified item
601          * @param[in]   item                    The item
602          * @exception   E_SUCCESS           The method is successful.
603          * @exception   E_OUT_OF_RANGE      The specified index is outside the bounds of the data structure. @n
604          *                                                                      The index is greater than or equal to the number of elements or less than @c 0.
605          * @exception   E_INVALID_ARG           A specified input parameter is invalid. @n
606          *                                                                  The specified item is not constructed.
607          * @exception   E_SYSTEM            A system error has occurred.
608          * @remarks     The %Footer control does not throw any exception even though the same action ID is assigned to multiple items. @n
609          *              However, the content of the specified item is copied to the %Footer control.
610          */
611         result SetItemAt(int itemIndex, const FooterItem& item);
612
613
614         /**
615          * Sets the item color for the specified state.
616          *
617          * @since               2.0
618          *
619          * @return              An error code
620          * @param[in]   status                  The item status
621          * @param[in]   color                   The item color to set
622          * @exception   E_SUCCESS               The method is successful.
623          * @exception   E_SYSTEM                    A system error has occurred.
624          * @see         GetItemColor()
625          */
626         result SetItemColor(FooterItemStatus status, const Tizen::Graphics::Color& color);
627
628
629         /**
630          * Sets the item state at the specified index in the footer.
631          *
632          * @since               2.0
633          *
634          * @return              An error code
635          * @param[in]   itemIndex                               The index of the item
636          * @param[in]   enable                                  Set to @c true to enable the item state, @n
637          *                                              else @c false
638          * @exception   E_SUCCESS                               The method is successful.
639          * @exception   E_OUT_OF_RANGE                  The specified index is outside the bounds of the data structure. @n
640          *                                                                              The index is greater than or equal to the number of elements or less than zero.
641          * @exception   E_INVALID_OPERATION             The current state of the instance prohibits the execution of the specified operation. @n
642          *                                                                              The specified item is currently selected.
643          * @exception   E_SYSTEM                A system error has occurred.
644          */
645         result SetItemEnabled(int itemIndex, bool enable);
646
647
648         /**
649          * Sets the badge icon of the specified tab style footer item.
650          *
651          * @since               2.0
652          *
653          * @return      An error code
654          * @param[in]   itemIndex               The index of the item to set the badge icon
655          * @param[in]   pBadgeIcon              The bitmap for the icon
656          * @exception   E_SUCCESS               The method is successful.
657          * @exception   E_OUT_OF_RANGE          The specified index is outside the bounds of the data structure. @n
658          *                                                                              The index is greater than or equal to the number of elements or less than @c 0.
659          * @exception   E_SYSTEM                A system error has occurred.
660          */
661         result SetItemBadgeIcon(int itemIndex, const Tizen::Graphics::Bitmap* pBadgeIcon);
662
663
664         /**
665          * Sets the numbered badge icon of the specified footer item.
666          *
667          * @since       2.0
668          *
669          * @return      An error code
670          * @param[in]   itemIndex               The item index
671          * @param[in]   number                  The number value that must be displayed as the badge icon @n
672          *                                                      If it is set to @c 0, the numbered badge icon is removed from an item.
673          * @exception   E_SUCCESS               The method is successful.
674          * @exception   E_INVALID_ARG           The specified @c number must be in the range defined by @c 0 and @c 99999.
675          * @exception   E_OUT_OF_RANGE          The specified index is outside the bounds of the data structure. @n
676          *                                                                              The index is greater than or equal to the number of elements or less than @c 0.
677          * @exception   E_SYSTEM                A system error has occurred.
678          */
679         result SetItemNumberedBadgeIcon(int itemIndex, int number);
680
681
682         /**
683          * Sets the item text color for the specified state.
684          *
685          * @since               2.0
686          *
687          * @return      An error code
688          * @param[in]   status              The item status
689          * @param[in]   color               The item text color to set
690          * @exception   E_SUCCESS           The method is successful.
691          * @exception   E_SYSTEM            A system error has occurred.
692          */
693         result SetItemTextColor(FooterItemStatus status, const Tizen::Graphics::Color& color);
694
695
696         /**
697          * Selects the item at the specified index.
698          *
699          * @since               2.0
700          *
701          * @return      An error code
702          * @param[in]   itemIndex               The index of the item to select
703          * @exception   E_SUCCESS               The method is successful.
704          * @exception   E_OUT_OF_RANGE          The specified index is out of the range of the data structure. @n
705          *                                                                              The specified index is either greater than or equal to the number of items or is less than zero.
706          * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation. @n
707          *                                      The item at the specified index is disabled.
708          * @exception   E_UNSUPPORTED_OPERATION The operation is not supported if the %Footer control style is ::FOOTER_STYLE_BUTTON_TEXT,
709          *                                      ::FOOTER_STYLE_BUTTON_ICON or ::FOOTER_STYLE_BUTTON_ICON_TEXT.
710          * @exception   E_SYSTEM                A system error has occurred.
711          */
712         result SetItemSelected(int itemIndex);
713
714
715         /**
716          * Sets the color of the footer.
717          *
718          * @since               2.0
719          *
720          * @return      An error code
721          * @param[in]   color                           The footer color to set
722          * @exception   E_SUCCESS                       The method is successful.
723          */
724         result SetColor(const Tizen::Graphics::Color& color);
725
726
727         /**
728          * Sets the style of the footer. @n
729          * All items and buttons will be removed if the style is changed.
730          *
731          * @since               2.0
732          *
733          * @return      An error code
734          * @param[in]   style                       The footer style to set
735          * @exception   E_SUCCESS                       The method is successful.
736          * @exception   E_SYSTEM                        A system error has occurred.
737          */
738         result SetStyle(FooterStyle style);
739
740
741         /**
742          * Enables or disables the tab edit mode.
743          *
744          * @since               2.0
745          *
746          * @return      An error code
747          * @param[in]   enable                  Set to @c true to enable the edit mode, @n
748          *                                      else @c false
749          * @exception   E_SUCCESS               The method is successful.
750          * @exception   E_UNSUPPORTED_OPERATION The operation is supported when the style of the %Footer control style is ::FOOTER_STYLE_TAB or ::FOOTER_STYLE_TAB_LARGE.
751          */
752         result SetTabEditModeEnabled(bool enable);
753
754
755         /**
756          * Adds an action event listener instance.
757          * OnActionPerformed() of the added listener is called when the user selects an item.
758          *
759          * @since               2.0
760          *
761          * @param[in]   listener        The event listener to add
762          * @remarks             When the user collapses the tab style %Footer control which is in the expanded mode by pressing the more button,
763          *                              OnActionPerformed() is called for the currently selected tab item.
764          */
765         void AddActionEventListener(Tizen::Ui::IActionEventListener& listener);
766
767
768         /**
769          * Removes an action event listener instance.
770          * The removed listener cannot listen to events when they are fired.
771          *
772          * @since               2.0
773          *
774          * @param[in]   listener        The event listener to remove
775          */
776         void RemoveActionEventListener(Tizen::Ui::IActionEventListener& listener);
777
778
779         /**
780         * Gets the position and size of the specified button item.
781         *
782         * @since                2.0
783         *
784         * @return       The position and size of the button item at the specified position.
785         * @param[in]    position                The position of the button item
786         * @exception    E_SUCCESS               The method is successful.
787         * @exception    E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation. @n
788         *                                       There is no button set at the specified position.
789         * @remarks      The specific error code can be accessed using the GetLastResult() method.
790         */
791         Tizen::Graphics::Rectangle GetButtonBounds(ButtonPosition position) const;
792
793
794         /**
795          * Gets the position and size of the specified button item.
796          *
797          * @since               2.1
798          *
799          * @return              The position and size of the button item at the specified position.
800          * @param[in]           position                The position of the button item
801          * @exception           E_SUCCESS               The method is successful.
802          * @exception           E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation. @n
803          *                                      There is no button set at the specified position.
804          * @remarks             The specific error code can be accessed using the GetLastResult() method.
805          */
806         Tizen::Graphics::FloatRectangle GetButtonBoundsF(ButtonPosition position) const;
807
808 protected:
809         //
810         //This method is for internal use only. Using this method can cause behavioral, security-related,
811         //and consistency-related issues in the application.
812         //
813         // This is the default constructor for this class.
814         // @since               2.0
815         //
816         Footer(void);
817
818
819         //
820         //This method is for internal use only. Using this method can cause behavioral, security-related,
821         //and consistency-related issues in the application.
822         //
823         // This is the destructor for this class.
824         // @since               2.0
825         //
826         virtual ~Footer(void);
827
828
829 private:
830         //
831         //This method is for internal use only. Using this method can cause behavioral, security-related,
832         //and consistency-related issues in the application.
833         //
834         // Initializes this instance of Footer with the specified parameter.
835         //
836         // @since       2.0
837         // @return              An error code
838         // @exception   E_SUCCESS                       The method is successful.
839         // @exception   E_SYSTEM                        A system error has occurred.
840         //
841         result Construct(void);
842
843         Footer(const Footer& rhs);
844         Footer& operator =(const Footer& rhs);
845
846 private:
847         friend class _FormImpl;
848         friend class _FooterImpl;
849
850 };
851
852 }}} // Tizen::Ui::Controls
853
854 #endif // _FUI_CTRL_FOOTER_H_