Merge "Fix bug[N_SE-37282]" into tizen_2.1
[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 };
61
62 /**
63  * @class   Footer
64  * @brief       This class is an implementation of a %Footer control.
65  *
66  * @since   2.0
67  *
68  * The %Footer class displays a multi-purpose area at the bottom of the screen. It is used to switch between different application
69  * "views", or to host buttons for performing user-defined actions.
70  *
71  *For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_footer.htm">Footer</a>.
72  *
73  *The following examples demonstrate how to use the %Footer class.
74  * - Constructing a footer
75  * When creating a %Form, specify the FORM_STYLE_FOOTER parameter in the Form::Construct() method.
76  *
77  * @code
78  * // Initializes
79  * bool
80  * TestForm::Initialize(void)
81  * {
82  *      Construct(FORM_STYLE_NORMAL | FORM_STYLE_INDICATOR | FORM_STYLE_FOOTER);
83  * }
84  * @endcode
85  *
86  * - Using the footer
87  * Gets the footer with the GetFooter() method, and sets the footer style
88  *
89  * @code
90  * bool
91  * TestForm::Initialize(void)
92  * {
93  *      Footer* pFooter = GetFooter();
94  *      pFooter->SetStyle(FOOTER_STYLE_SEGMENTED_TEXT);
95  * }
96  * @endcode
97  *
98  * - Adding items to the footer:
99  * Adds FooterItems or ButtonItems according to the footer style. The action ID registered in the Construct() method is notified
100  * when items are touched.
101  *
102  * @code
103  *  bool
104  * TestForm::Initialize(void)
105  * {
106  *      FooterItem footerItem;
107  *      footerItem.Construct(ID_FOOTER_ITEM);
108  *      footerItem.SetText("FooterItem");
109  *
110  *      pFooter->AddItem(footerItem);
111  *
112  *      ButtonItem buttonItem;
113  *      buttonItem.Construct(BUTTON_ITEM_STYLE_ICON, ID_HEADER_BUTTON);
114  *      buttonItem.SetIcon(BUTTON_ITEM_STATUS_NORMAL, __pBitmap);
115  *
116  *      pFooter->SetButton(BUTTON_POSITION_LEFT, buttonItem);
117  *
118  * }
119  * @endcode
120  *
121  * -Using the back button
122  * The image of back button is internally set by UI framework.
123  *
124  * @code
125  * bool
126  * TestForm::Initialize(void)
127  * {
128  *      pFooter->SetBackButton();
129  * }
130  * @endcode
131  */
132 class _OSP_EXPORT_ Footer
133         : public Tizen::Ui::Control
134 {
135 public:
136         /**
137          * Adds the specified footer item.
138          *
139          * @since               2.0
140          *
141          * @return      An error code
142          * @param[in]   item                The footer item to add
143          * @exception   E_SUCCESS           The method is successful.
144          * @exception   E_MAX_EXCEEDED      The number of items has exceeded the maximum limit.
145          * @exception   E_INVALID_ARG       A specified input parameter is invalid. @n
146          *                                                                      The specified item is not constructed.
147          * @exception   E_SYSTEM            A system error has occurred.
148          * @remarks
149          *                      - The %Footer control does not throw any exception even though the same action ID is assigned to multiple items. @n
150          *                      However, the content of the specified item is copied to the %Footer control.
151          *                      - Depending on the style of the %Footer control, several types of items can be added or inserted.
152          */
153         result AddItem(const FooterItem& item);
154
155
156         /**
157          * Inserts the footer item at the specified index.
158          *
159          * @since               2.0
160          *
161          * @return      An error code
162          * @param[in]   itemIndex           The index where the item must be inserted
163          * @param[in]   item                The footer item object to insert
164          * @exception   E_SUCCESS           The method is successful.
165          * @exception   E_MAX_EXCEEDED      The number of items has exceeded the maximum limit.
166          * @exception   E_OUT_OF_RANGE      The specified index is outside the bounds of the data structure. @n
167          *                                                                      The index is greater than or equal to the number of elements or less than @c 0.
168          * @exception   E_INVALID_ARG       A specified input parameter is invalid. @n
169          *                                                                      The specified item is not constructed.
170          * @exception   E_SYSTEM            A system error has occurred.
171          * @remarks
172          *                      - The %Footer control does not throw any exception even though the same action ID is assigned to multiple items. @n
173          *                      However, the content of the specified item is copied to the %Footer control.
174          *                      - Depending on the style of the %Footer control, several types of items can be added or inserted.
175          */
176         result InsertItemAt(int itemIndex, const FooterItem& item);
177
178
179         /**
180          * Checks whether a button item is set at the specified position.
181          *
182          * @since               2.0
183          *
184          * @return              @c true if the button item is set at the specified position, @n
185          *                              else @c false
186          * @param[in]   position            The position of the button item
187          * @exception   E_SUCCESS           The method is successful.
188          * @remarks     The specific error code can be accessed using the GetLastResult() method.
189          */
190         bool IsButtonSet(ButtonPosition position) const;
191
192
193         /**
194          * Checks whether the back button item is set.
195          *
196          * @since               2.0
197          *
198          * @return              @c true if the back button item is set, @n
199          *                              else @c false
200          * @exception   E_SUCCESS           The method is successful.
201          * @remarks     The specific error code can be accessed using the GetLastResult() method.
202          */
203         bool IsBackButtonSet(void) const;
204
205
206         /**
207          * Checks whether the tab edit mode is enabled.
208          *
209          * @since               2.0
210          *
211          * @return      @c true if the tab edit mode is set, @n
212          *                              else @c false
213          * @exception   E_SUCCESS           The method is successful.
214          */
215         bool IsTabEditModeEnabled(void) const;
216
217
218         /**
219          * Gets the color of the button item for the specified state.
220          *
221          * @since               2.0
222          *
223          * @return      The color of the button item, @n
224          *                              else RGBA (0,0,0,0) if an error occurs
225          * @param[in]   status              The status of the button item
226          * @exception   E_SUCCESS           The method is successful.
227          * @remarks     The specific error code can be accessed using the GetLastResult() method.
228          * @see         SetButtonColor()
229          */
230         Tizen::Graphics::Color GetButtonColor(ButtonItemStatus status) const;
231
232
233         /**
234          * Gets the text color of the button item for the specified state.
235          *
236          * @since               2.0
237          *
238          * @return      The text color of the button item, @n
239          *                              else RGBA (0,0,0,0) if an error occurs
240          * @param[in]   status              The status of the button item
241          * @exception   E_SUCCESS           The method is successful.
242          * @remarks     The specific error code can be accessed using the GetLastResult() method.
243          * @see         SetButtonTextColor()
244          */
245         Tizen::Graphics::Color GetButtonTextColor(ButtonItemStatus status) const;
246
247
248         /**
249          * Gets the state of the specified button item.
250          *
251          * @since               2.0
252          *
253          * @return      The state of the button item at the specified position
254          * @param[in]   position                        The position of the button item
255          * @exception   E_SUCCESS                       The method is successful.
256          * @exception   E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
257          *                                                                      There is no button set at the specified position.
258          * @remarks     The specific error code can be accessed using the GetLastResult() method.
259          */
260         ButtonItemStatus GetButtonStatus(ButtonPosition position) const;
261
262
263         /**
264          * Gets the state of the back button.
265          *
266          * @since       2.0
267          *
268          * @return      The state of the back button, @n
269          *                              else @c BUTTON_ITEM_STATUS_NORMAL if an error occurs.
270          * @exception   E_SUCCESS           The method is successful.
271          * @exception   E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
272          *                                                                      The back button is not set.
273          * @remarks     The specific error code can be accessed using the GetLastResult() method.
274          */
275         ButtonItemStatus GetBackButtonStatus(void) const;
276
277
278         /**
279          * Gets the color of the footer item for the specified item state.
280          *
281          * @since               2.0
282          *
283          * @return      The color of the item, @n
284          *                              else RGBA (0,0,0,0) if an error occurs
285          * @param[in]   status                          The item status
286          * @exception   E_SUCCESS           The method is successful.
287          * @remarks     The specific error code can be accessed using the GetLastResult() method.
288          * @see         SetItemColor()
289          */
290         Tizen::Graphics::Color GetItemColor(FooterItemStatus status) const;
291
292
293         /**
294          * Gets the number of footer items.
295          *
296          * @since               2.0
297          *
298          * @return      The number of footer items, @n
299          *              else @c -1 if an error occurs
300          * @exception   E_SUCCESS           The method is successful.
301          * @remarks     The specific error code can be accessed using the GetLastResult() method.
302          */
303         int GetItemCount(void) const;
304
305
306         /**
307          * Gets the state of the specified footer item.
308          *
309          * @since               2.0
310          *
311          * @return      An error code
312          * @param[in]   itemIndex               The index of the item
313          * @param[out]  status                  The state of the item at the specified index
314          * @exception   E_SUCCESS           The method is successful.
315          * @exception   E_OUT_OF_RANGE      The specified index is outside the bounds of the data structure. @n
316          *                                                                      The index is greater than or equal to the number of elements or less than zero.
317          */
318         result GetItemStatus(int itemIndex, FooterItemStatus& status) const;
319
320
321         /**
322          * Gets the text color of the footer item for the specified item state.
323          *
324          * @since               2.0
325          *
326          * @return      The text color of the item, @n
327          *                              else RGBA (0,0,0,0) if an error occurs
328          * @param[in]   status              The item status
329          * @exception   E_SUCCESS           The method is successful.
330          * @remarks     The specific error code can be accessed using the GetLastResult() method.
331          */
332         Tizen::Graphics::Color GetItemTextColor(FooterItemStatus status) const;
333
334
335         /**
336          * Gets the style of the %Footer control.
337          *
338          * @since               2.0
339          *
340          * @return      The footer style, @n
341          *                              else @c FOOTER_STYLE_BUTTON_TEXT if an error occurs
342          * @exception   E_SUCCESS           The method is successful.
343          * @remarks     The specific error code can be accessed using the GetLastResult() method.
344          */
345         FooterStyle GetStyle(void) const;
346
347
348         /**
349          * Gets the index of the currently selected item.
350          *
351          * @since               2.0
352          *
353          * @return      The selected item index,@n
354          *              else @c -1 if an error occurs
355          * @exception   E_SUCCESS               The method is successful.
356          * @exception   E_UNSUPPORTED_OPERATION The operation is not supported when the style of the %Footer control is
357          *                                                                              ::FOOTER_STYLE_BUTTON_TEXT, ::FOOTER_STYLE_BUTTON_ICON
358          *                                                                              or ::FOOTER_STYLE_BUTTON_ICON_TEXT.
359          * @remarks     The specific error code can be accessed using the GetLastResult() method.
360          */
361         int GetSelectedItemIndex(void) const;
362
363
364         /**
365          * Gets the color of the footer.
366          *
367          * @since               2.0
368          *
369          * @return      The color, @n
370          *                              else RGBA (0,0,0,0) if an error occurs
371          * @exception   E_SUCCESS           The method is successful.
372          * @remarks     The specific error code can be accessed using the GetLastResult() method.
373          */
374         Tizen::Graphics::Color GetColor(void) const;
375
376
377         /**
378          * Removes all the button items.
379          *
380          * @since               2.0
381          *
382          * @return      An error code
383          * @exception   E_SUCCESS       The method is successful.
384          * @exception   E_SYSTEM        A system error has occurred.
385          * @remarks             The back button will be also removed.
386          */
387         result RemoveAllButtons(void);
388
389
390         /**
391          * Removes the button item at the specified position.
392          *
393          * @since               2.0
394          *
395          * @return      An error code
396          * @param[in]   position        The position of the button item to remove
397          * @exception   E_SUCCESS       The method is successful.
398          * @exception   E_SYSTEM        A system error has occurred.
399          * @remarks     If no button item is set at the specified position, the method will return @c E_SUCCESS.
400          */
401         result RemoveButtonAt(ButtonPosition position);
402
403
404         /**
405          * Removes the back button item.
406          *
407          * @since               2.0
408          *
409          * @return      An error code
410          * @exception   E_SUCCESS           The method is successful.
411          * @exception   E_SYSTEM            A system error has occurred.
412          * @remarks     If the back button item is not set, the method will return @c E_SUCCESS.
413          */
414         result RemoveBackButton(void);
415
416
417         /**
418          * Removes all the footer items.
419          *
420          * @since               2.0
421          *
422          * @return      An error code
423          * @exception   E_SUCCESS           The method is successful.
424          * @exception   E_SYSTEM            A system error has occurred.
425          * @remarks     The left, right, and back button items are not removed.
426          */
427         result RemoveAllItems(void);
428
429
430         /**
431          * Removes the item at the specified index.
432          *
433          * @since               2.0
434          *
435          * @return      An error code
436          * @param[in]   itemIndex                       The index of the item to remove
437          * @exception   E_SUCCESS                       The method is successful.
438          * @exception   E_OUT_OF_RANGE          The specified index is outside the bounds of the data structure. @n
439          *                                                                      The index is greater than or equal to the number of elements or less than @c 0.
440          * @exception   E_SYSTEM                        A system error has occurred.
441          */
442         result RemoveItemAt(int itemIndex);
443
444
445         /**
446          * Sets the background bitmap image.
447          *
448          * @since               2.0
449          *
450          * @return      An error code
451          * @param[in]   pBitmap              The background image
452          * @exception   E_SUCCESS            The method is successful.
453          * @exception   E_SYSTEM             A system error has occurred.
454          */
455         result SetBackgroundBitmap(const Tizen::Graphics::Bitmap* pBitmap);
456
457
458         /**
459          * Sets the button item at the specified position.
460          *
461          * @since               2.0
462          *
463          * @return              An error code
464          * @param[in]   position                        The position at which to set the specified button item.
465          * @param[in]   button                      The button item to set
466          * @exception   E_SUCCESS                   The method is successful.
467          * @exception   E_INVALID_ARG                   A specified input parameter is invalid. @n
468          *                                                                              The specified item is not constructed.
469          * @exception   E_INVALID_OPERATION                     The current state of the instance prohibits the execution of the specified operation.@n
470          *                                                                                      There are more than 2 footer items.
471          * @exception   E_UNSUPPORTED_OPERATION     The operation is not supported when the style of the %Footer control is ::FOOTER_STYLE_TAB.
472          * @exception   E_SYSTEM                    A system error has occurred.
473          * @remarks     If there is an existing button item at the specified position, it is replaced with the new item.
474          *              However, the contents of the specified item are copied to the %Footer control.
475          */
476         result SetButton(ButtonPosition position, const ButtonItem& button);
477
478
479         /**
480          * Sets the button item color for the specified state.
481          *
482          * @since               2.0
483          *
484          * @return              An error code
485          * @param[in]   status          The status of the button item
486          * @param[in]   color           The button item color to set
487          * @exception   E_SUCCESS       The method is successful.
488          * @exception   E_SYSTEM            A system error has occurred.
489          * @see         GetButtonColor()
490          */
491         result SetButtonColor(ButtonItemStatus status, const Tizen::Graphics::Color& color);
492
493
494         /**
495          * Enables or disables the button item at the specified position.
496          *
497          * @since       2.0
498          *
499          * @return      An error code
500          * @param[in]   position                The button item position
501          * @param[in]   enable                  Set to @c true to enable the specified button item, @n
502          *                                                                              else @c false
503          * @exception   E_SUCCESS               The method is successful.
504          * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation. @n
505          *                                                                          There is no button set at the specified position.
506          * @exception   E_SYSTEM                A system error has occurred.
507          */
508         result SetButtonEnabled(ButtonPosition position, bool enable);
509
510
511         /**
512          * Enables or disables the back button.
513          *
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          * @exception   E_SYSTEM                A system error has occurred.
523          */
524         result SetBackButtonEnabled(bool enable);
525
526
527         /**
528          * Sets the button item text color for the specified state.
529          *
530          * @since               2.0
531          *
532          * @return      An error code
533          * @param[in]   status          The status of the button item
534          * @param[in]   color           The button item text color to set
535          * @exception   E_SUCCESS       The method is successful.
536          * @exception   E_SYSTEM        A system error has occurred.
537          * @see         GetButtonTextColor()
538          */
539         result SetButtonTextColor(ButtonItemStatus status, const Tizen::Graphics::Color& color);
540
541         /**
542          * Sets the badge icon of the specified ButtonItem.
543          *
544          * @since       2.0
545          *
546          * @return      An error code
547          * @param[in]   position                                The button item position
548          * @param[in]   pBadgeIcon                      The bitmap for the icon
549          * @exception   E_SUCCESS                       The method is successful.
550          * @exception   E_UNSUPPORTED_OPERATION         This operation is not supported. @n
551          *                      The operation is not supported when the style of the %Footer control is ::FOOTER_STYLE_TAB.
552          */
553         result SetButtonBadgeIcon(ButtonPosition position, const Tizen::Graphics::Bitmap* pBadgeIcon);
554
555
556         /**
557          * Sets the numbered badge icon of the specified ButtonItem.
558          *
559          * @since       2.0
560          *
561          * @return      An error code
562          * @param[in]   position                                The button item position
563          * @param[in]   number                                  The number value that should be displayed as the badge icon
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.
568          * @remarks     To remove the numbered badge icon from an item, pass @c 0 as the value of @c number.
569          */
570         result SetButtonNumberedBadgeIcon(ButtonPosition position, int number);
571
572
573         /**
574          * Sets the back button.
575          *
576          * @since       2.0
577          *
578          * @return      An error code
579          * @exception   E_SUCCESS                     The method is successful.
580          * @exception   E_INVALID_OPERATION           The current state of the instance prohibits the execution of the specified operation. @n
581          *                                            There are more than 2 footer items.
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. @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, OnFormBackRequested() of IFormBackEventListener 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
672          * @exception   E_SUCCESS               The method is successful.
673          * @exception   E_INVALID_ARG           The specified @c number must be in the range defined by @c 0 and @c 99999.
674          * @exception   E_OUT_OF_RANGE          The specified index is outside the bounds of the data structure. @n
675          *                                                                              The index is greater than or equal to the number of elements or less than @c 0.
676          * @exception   E_SYSTEM                A system error has occurred.
677          * @remarks     To remove the numbered badge icon from an item, pass @c 0 as the value of @c number.
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.
729          *
730          * @since               2.0
731          *
732          * @return      An error code
733          * @param[in]   style                       The footer style to set
734          * @exception   E_SUCCESS                       The method is successful.
735          * @exception   E_SYSTEM                        A system error has occurred.
736          * @remarks             All items and buttons will be removed if the style is changed.
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.
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          * Gets the position and size of the specified button item.
795          *
796          * @since               2.1
797          *
798          * @return              The position and size of the button item at the specified position.
799          * @param[in]           position                The position of the button item
800          * @exception           E_SUCCESS               The method is successful.
801          * @exception           E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation. @n
802          *                                      There is no button set at the specified position.
803          * @remarks             The specific error code can be accessed using the GetLastResult() method.
804          */
805         Tizen::Graphics::FloatRectangle GetButtonBoundsF(ButtonPosition position) const;
806
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_