Tizen 2.1 base
[framework/osp/uifw.git] / inc / FUiCtrlFooter.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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 be added
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     The %Footer control does not throw any exception even though the same action ID is assigned to multiple items. @n
149          *              However, the content of the specified item is copied to the %Footer control. @n
150          *              Depending on the style of the %Footer control, several types of items can be added or inserted.
151          */
152         result AddItem(const FooterItem& item);
153
154
155         /**
156          * Inserts the footer item at the specified index.
157          *
158          * @since               2.0
159          *
160          * @return      An error code
161          * @param[in]   itemIndex           The index where the item must be inserted
162          * @param[in]   item                The footer item object to be inserted
163          * @exception   E_SUCCESS           The method is successful.
164          * @exception   E_MAX_EXCEEDED      The number of items has exceeded the maximum limit.
165          * @exception   E_OUT_OF_RANGE      The specified index is outside the bounds of the data structure. @n
166          *                                                                      The index is greater than or equal to the number of elements or less than @c 0.
167          * @exception   E_INVALID_ARG       A specified input parameter is invalid. @n
168          *                                                                      The specified item is not constructed.
169          * @exception   E_SYSTEM            A system error has occurred.
170          * @remarks     The %Footer control does not throw any exception even though the same action ID is assigned to multiple items. @n
171          *              However, the content of the specified item is copied to the %Footer control. @n
172          *              Depending on the style of the %Footer control, several types of items can be added or inserted.
173          */
174         result InsertItemAt(int itemIndex, const FooterItem& item);
175
176
177         /**
178          * Checks whether a button item is set at the specified position.
179          *
180          * @since               2.0
181          *
182          * @return              @c true if the button item is set at the specified position, @n
183          *                              else @c false
184          * @param[in]   position            The position of the button item
185          * @exception   E_SUCCESS           The method is successful.
186          * @remarks     The specific error code can be accessed using the GetLastResult() method.
187          */
188         bool IsButtonSet(ButtonPosition position) const;
189
190
191         /**
192          * Checks whether the back button item is set.
193          *
194          * @since               2.0
195          *
196          * @return              @c true if the back button item is set, @n
197          *                              else @c false
198          * @exception   E_SUCCESS           The method is successful.
199          * @remarks     The specific error code can be accessed using the GetLastResult() method.
200          */
201         bool IsBackButtonSet(void) const;
202
203
204         /**
205          * Checks whether the tab edit mode is enabled.
206          *
207          * @since               2.0
208          *
209          * @return      @c true if the tab edit mode is set, @n
210          *                              else @c false
211          * @exception   E_SUCCESS           The method is successful.
212          */
213         bool IsTabEditModeEnabled(void) const;
214
215
216         /**
217          * Gets the color of the button item for the specified state.
218          *
219          * @since               2.0
220          *
221          * @return      The color of the button item, @n
222          *                              else RGBA (0,0,0,0) if an error occurs
223          * @param[in]   status              The status of the button item
224          * @exception   E_SUCCESS           The method is successful.
225          * @remarks     The specific error code can be accessed using the GetLastResult() method.
226          * @see         SetButtonColor()
227          */
228         Tizen::Graphics::Color GetButtonColor(ButtonItemStatus status) const;
229
230
231         /**
232          * Gets the text color of the button item for the specified state.
233          *
234          * @since               2.0
235          *
236          * @return      The text color of the button item, @n
237          *                              else RGBA (0,0,0,0) if an error occurs
238          * @param[in]   status              The status of the button item
239          * @exception   E_SUCCESS           The method is successful.
240          * @remarks     The specific error code can be accessed using the GetLastResult() method.
241          * @see         SetButtonTextColor()
242          */
243         Tizen::Graphics::Color GetButtonTextColor(ButtonItemStatus status) const;
244
245
246         /**
247          * Gets the state of the specified button item.
248          *
249          * @since               2.0
250          *
251          * @return      The state of the button item at the specified position
252          * @param[in]   position                        The position of the button item
253          * @exception   E_SUCCESS                       The method is successful.
254          * @exception   E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
255          *                                                                      There is no button set at the specified position.
256          * @remarks     The specific error code can be accessed using the GetLastResult() method.
257          */
258         ButtonItemStatus GetButtonStatus(ButtonPosition position) const;
259
260
261         /**
262          * Gets the state of the back button.
263          *
264          * @since       2.0
265          *
266          * @return      The state of the back button, @n
267          *                              else @c BUTTON_ITEM_STATUS_NORMAL if an error occurs.
268          * @exception   E_SUCCESS           The method is successful.
269          * @exception   E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
270          *                                                                      The back button is not set.
271          * @remarks     The specific error code can be accessed using the GetLastResult() method.
272          */
273         ButtonItemStatus GetBackButtonStatus(void) const;
274
275
276         /**
277          * Gets the color of the footer item for the specified item state.
278          *
279          * @since               2.0
280          *
281          * @return      The color of the item, @n
282          *                              else RGBA (0,0,0,0) if an error occurs
283          * @param[in]   status                          The item status
284          * @exception   E_SUCCESS           The method is successful.
285          * @remarks     The specific error code can be accessed using the GetLastResult() method.
286          * @see         SetItemColor()
287          */
288         Tizen::Graphics::Color GetItemColor(FooterItemStatus status) const;
289
290
291         /**
292          * Gets the number of footer items.
293          *
294          * @since               2.0
295          *
296          * @return      The number of footer items, @n
297          *              else @c -1 if an error occurs
298          * @exception   E_SUCCESS           The method is successful.
299          * @remarks     The specific error code can be accessed using the GetLastResult() method.
300          */
301         int GetItemCount(void) const;
302
303
304         /**
305          * Gets the state of the specified footer item.
306          *
307          * @since               2.0
308          *
309          * @return      An error code
310          * @param[in]   itemIndex               The index of the item
311          * @param[out]  status                  The state of the item at the specified index
312          * @exception   E_SUCCESS           The method is successful.
313          * @exception   E_OUT_OF_RANGE      The specified index is outside the bounds of the data structure. @n
314          *                                                                      The index is greater than or equal to the number of elements or less than zero.
315          */
316         result GetItemStatus(int itemIndex, FooterItemStatus& status) const;
317
318
319         /**
320          * Gets the text color of the footer item for the specified item state.
321          *
322          * @since               2.0
323          *
324          * @return      The text color of the item, @n
325          *                              else RGBA (0,0,0,0) if an error occurs
326          * @param[in]   status              The item status
327          * @exception   E_SUCCESS           The method is successful.
328          * @remarks     The specific error code can be accessed using the GetLastResult() method.
329          */
330         Tizen::Graphics::Color GetItemTextColor(FooterItemStatus status) const;
331
332
333         /**
334          * Gets the style of the %Footer control.
335          *
336          * @since               2.0
337          *
338          * @return      The footer style, @n
339          *                              else @c FOOTER_STYLE_BUTTON_TEXT if an error occurs
340          * @exception   E_SUCCESS           The method is successful.
341          * @remarks     The specific error code can be accessed using the GetLastResult() method.
342          */
343         FooterStyle GetStyle(void) const;
344
345
346         /**
347          * Gets the index of the currently selected item.
348          *
349          * @since               2.0
350          *
351          * @return      The selected item index,@n
352          *              else @c -1 if an error occurs
353          * @exception   E_SUCCESS               The method is successful.
354          * @exception   E_UNSUPPORTED_OPERATION This operation is not supported. @n
355          *                                                                              The operation is supported only when the style of the %Footer control is either segmented or tab.
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.
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          * @remarks             The back button will be also removed.
383          */
384         result RemoveAllButtons(void);
385
386
387         /**
388          * Removes the button item at the specified position.
389          *
390          * @since               2.0
391          *
392          * @return      An error code
393          * @param[in]   position        The position of the button item to be removed
394          * @exception   E_SUCCESS       The method is successful.
395          * @exception   E_SYSTEM        A system error has occurred.
396          * @remarks     If no button item is set at the specified position, the method will return @c E_SUCCESS.
397          */
398         result RemoveButtonAt(ButtonPosition position);
399
400
401         /**
402          * Removes the back button item.
403          *
404          * @since               2.0
405          *
406          * @return      An error code
407          * @exception   E_SUCCESS           The method is successful.
408          * @exception   E_SYSTEM            A system error has occurred.
409          * @remarks     If the back button item is not set, the method will return @c E_SUCCESS.
410          */
411         result RemoveBackButton(void);
412
413
414         /**
415          * Removes all the footer items.
416          *
417          * @since               2.0
418          *
419          * @return      An error code
420          * @exception   E_SUCCESS           The method is successful.
421          * @exception   E_SYSTEM            A system error has occurred.
422          * @remarks     The left, right, and back button items are not removed.
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 be removed
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.
462          * @param[in]   button                      The button item to be set
463          * @exception   E_SUCCESS                   The method is successful.
464          * @exception   E_INVALID_ARG                   A specified input parameter is invalid. @n
465          *                                                                              The specified item is not constructed.
466          * @exception   E_INVALID_OPERATION                     The current state of the instance prohibits the execution of the specified operation.@n
467          *                                                                                      There are more than 2 footer items.
468          * @exception   E_UNSUPPORTED_OPERATION         This operation is not supported. @n
469          *                                                                                      The operation is supported when the style of the %Footer control is either
470          *                                                                                      @c FOOTER_STYLE_SEGMENTED_TEXT or @c FOOTER_STYLE_SEGMENTED_ICON.
471          * @exception   E_SYSTEM                    A system error has occurred.
472          * @remarks     If there is an existing button item at the specified position, it is replaced with the new item.@n
473          *              However, the contents of the specified item are copied to the %Footer control.
474          */
475         result SetButton(ButtonPosition position, const ButtonItem& button);
476
477
478         /**
479          * Sets the button item color for the specified state.
480          *
481          * @since               2.0
482          *
483          * @return              An error code
484          * @param[in]   status          The status of the button item
485          * @param[in]   color           The button item color to be set
486          * @exception   E_SUCCESS       The method is successful.
487          * @exception   E_SYSTEM            A system error has occurred.
488          * @see         GetButtonColor()
489          */
490         result SetButtonColor(ButtonItemStatus status, const Tizen::Graphics::Color& color);
491
492
493         /**
494          * Enables or disables the button item at the specified position.
495          *
496          * @since       2.0
497          *
498          * @return      An error code
499          * @param[in]   position                The button item position
500          * @param[in]   enable                  Set to @c true to enable the specified button item, @n
501          *                                                                              else @c false
502          * @exception   E_SUCCESS               The method is successful.
503          * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation. @n
504          *                                                                          There is no button set at the specified position.
505          * @exception   E_SYSTEM                A system error has occurred.
506          */
507         result SetButtonEnabled(ButtonPosition position, bool enable);
508
509
510         /**
511          * Enables or disables the back button.
512          *
513          * @since               2.0
514          *
515          * @return      An error code
516          * @param[in]   enable                  Set to @c true to enable the back button, @n
517          *                                                                              else @c false
518          * @exception   E_SUCCESS               The method is successful.
519          * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation. @n
520          *                                                                          The back button item is not set.
521          * @exception   E_SYSTEM                A system error has occurred.
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 be 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 @c FOOTER_STYLE_TAB.
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
563          * @exception   E_SUCCESS                               The method is successful.
564          * @exception   E_INVALID_ARG                   The specified @c number must be in the range defined by @c 0 and @c 99999.
565          * @exception   E_UNSUPPORTED_OPERATION         This operation is not supported. @n
566          *              The operation is not supported when the style of the %Footer control is @c FOOTER_STYLE_TAB.
567          * @remarks     To remove the numbered badge icon from an item, pass @c 0 as the value of @c number.
568          */
569         result SetButtonNumberedBadgeIcon(ButtonPosition position, int number);
570
571
572         /**
573          * Sets the back button.
574          *
575          * @since       2.0
576          *
577          * @return      An error code
578          * @exception   E_SUCCESS                     The method is successful.
579          * @exception   E_INVALID_OPERATION           The current state of the instance prohibits the execution of the specified operation. @n
580          *                                            There are more than 2 footer items.
581          * @exception   E_UNSUPPORTED_OPERATION       This operation is not supported. @n
582          *                                                                                        The operation is not supported when the style of the %Footer control is @c FOOTER_STYLE_TAB. @n
583          *                                            This device does not support the software back button.
584          * @exception   E_SYSTEM                      A system error has occurred.
585          * @remarks     When the back button is pressed, OnFormBackRequested() of IFormBackEventListener is called. @n
586          *              If the right button is already set, then the button is replaced with the back button.
587          * @see         Tizen::Ui::Controls::IFormBackEventListener
588          */
589         result SetBackButton(void);
590
591
592         /**
593          * Sets the content of the footer item at the specified index.
594          *
595          * @since               2.0
596          *
597          * @return      An error code
598          * @param[in]   itemIndex               The index at which to set the specified item
599          * @param[in]   item                    The item
600          * @exception   E_SUCCESS           The method is successful.
601          * @exception   E_OUT_OF_RANGE      The specified index is outside the bounds of the data structure. @n
602          *                                                                      The index is greater than or equal to the number of elements or less than @c 0.
603          * @exception   E_INVALID_ARG           A specified input parameter is invalid. @n
604          *                                                                  The specified item is not constructed.
605          * @exception   E_SYSTEM            A system error has occurred.
606          * @remarks     The %Footer control does not throw any exception even though the same action ID is assigned to multiple items. @n
607          *              However, the content of the specified item is copied to the %Footer control.
608          */
609         result SetItemAt(int itemIndex, const FooterItem& item);
610
611
612         /**
613          * Sets the item color for the specified state.
614          *
615          * @since               2.0
616          *
617          * @return              An error code
618          * @param[in]   status                  The item status
619          * @param[in]   color                   The item color to be set
620          * @exception   E_SUCCESS               The method is successful.
621          * @exception   E_UNSUPPORTED_OPERATION This operation is not supported. @n
622          *                                      The current style of the %Footer control does not support the operation.
623          * @exception   E_SYSTEM                    A system error has occurred.
624          * @remarks     It is not possible to set the item colors for the normal and disabled status of the @c FOOTER_STYLE_TAB style %Footer control. @n
625                         Furthermore, @c FOOTER_STYLE_BUTTON_ICON style %Footer control does not support this operation.
626          * @see         GetItemColor()
627          */
628         result SetItemColor(FooterItemStatus status, const Tizen::Graphics::Color& color);
629
630
631         /**
632          * Sets the item state at the specified index in the footer.
633          *
634          * @since               2.0
635          *
636          * @return              An error code
637          * @param[in]   itemIndex                               The index of the item
638          * @param[in]   enable                                  Set to @c true to enable the item state, @n
639          *                                              else @c false
640          * @exception   E_SUCCESS                               The method is successful.
641          * @exception   E_OUT_OF_RANGE                  The specified index is outside the bounds of the data structure. @n
642          *                                                                              The index is greater than or equal to the number of elements or less than zero.
643          * @exception   E_INVALID_OPERATION             The current state of the instance prohibits the execution of the specified operation. @n
644          *                                                                              The specified item is currently selected.
645          * @exception   E_SYSTEM                A system error has occurred.
646          */
647         result SetItemEnabled(int itemIndex, bool enable);
648
649
650         /**
651          * Sets the badge icon of the specified tab style footer item.
652          *
653          * @since               2.0
654          *
655          * @return      An error code
656          * @param[in]   itemIndex               The index of the item to set the badge icon
657          * @param[in]   pBadgeIcon              The bitmap for the icon
658          * @exception   E_SUCCESS               The method is successful.
659          * @exception   E_OUT_OF_RANGE          The specified index is outside the bounds of the data structure. @n
660          *                                                                              The index is greater than or equal to the number of elements or less than @c 0.
661          * @exception   E_UNSUPPORTED_OPERATION This operation is not supported. @n
662          *                                                                              The operation is not supported when the style of the %Footer control is @c FOOTER_STYLE_BUTTON_ICON.
663          * @exception   E_SYSTEM                A system error has occurred.
664          */
665         result SetItemBadgeIcon(int itemIndex, const Tizen::Graphics::Bitmap* pBadgeIcon);
666
667
668         /**
669          * Sets the numbered badge icon of the specified footer item.
670          *
671          * @since       2.0
672          *
673          * @return      An error code
674          * @param[in]   itemIndex               The item index
675          * @param[in]   number                  The number value that must be displayed as the badge icon
676          * @exception   E_SUCCESS               The method is successful.
677          * @exception   E_INVALID_ARG           The specified @c number must be in the range defined by @c 0 and @c 99999.
678          * @exception   E_OUT_OF_RANGE          The specified index is outside the bounds of the data structure. @n
679          *                                                                              The index is greater than or equal to the number of elements or less than @c 0.
680          * @exception   E_UNSUPPORTED_OPERATION This operation is not supported. @n
681          *                                      The operation is not supported when the style of the %Footer control is @c FOOTER_STYLE_BUTTON_ICON.
682          * @exception   E_SYSTEM                A system error has occurred.
683          * @remarks     To remove the numbered badge icon from an item, pass @c 0 as the value of @c number.
684          */
685         result SetItemNumberedBadgeIcon(int itemIndex, int number);
686
687
688         /**
689          * Sets the item text color for the specified state.
690          *
691          * @since               2.0
692          *
693          * @return      An error code
694          * @param[in]   status              The item status
695          * @param[in]   color               The item text color to be set
696          * @exception   E_SUCCESS           The method is successful.
697          * @exception   E_SYSTEM            A system error has occurred.
698          */
699         result SetItemTextColor(FooterItemStatus status, const Tizen::Graphics::Color& color);
700
701
702         /**
703          * Selects the item at the specified index.
704          *
705          * @since               2.0
706          *
707          * @return      An error code
708          * @param[in]   itemIndex               The index of the item to be selected
709          * @exception   E_SUCCESS               The method is successful.
710          * @exception   E_OUT_OF_RANGE          The specified index is out of the range of the data structure. @n
711          *                                                                              The specified index is either greater than or equal to the number of items or is less than zero.
712          * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation. @n
713          *                                      The item at the specified index is disabled.
714          * @exception   E_UNSUPPORTED_OPERATION This operation is not supported. @n
715          *                                                                              The operation is not supported if the %Footer control style is either @c FOOTER_STYLE_BUTTON_TEXT or @c FOOTER_STYLE_BUTTON_ICON.
716          * @exception   E_SYSTEM                A system error has occurred.
717          */
718         result SetItemSelected(int itemIndex);
719
720
721         /**
722          * Sets the color of the footer.
723          *
724          * @since               2.0
725          *
726          * @return      An error code
727          * @param[in]   color                           The footer color to be set
728          * @exception   E_SUCCESS                       The method is successful.
729          */
730         result SetColor(const Tizen::Graphics::Color& color);
731
732
733         /**
734          * Sets the style of the footer.
735          *
736          * @since               2.0
737          *
738          * @return      An error code
739          * @param[in]   style                       The footer style to set
740          * @exception   E_SUCCESS                       The method is successful.
741          * @exception   E_SYSTEM                        A system error has occurred.
742          * @remarks             All items and buttons will be removed if the style is changed.
743          */
744         result SetStyle(FooterStyle style);
745
746
747         /**
748          * Enables or disables the tab edit mode.
749          *
750          * @since               2.0
751          *
752          * @return      An error code
753          * @param[in]   enable                  Set to @c true to enable the edit mode, @n
754          *                                      else @c false
755          * @exception   E_SUCCESS               The method is successful.
756          * @exception   E_UNSUPPORTED_OPERATION This operation is not supported. @n
757          *                                                                              The operation is not supported when the style of the %Footer control style is not @c FOOTER_STYLE_TAB.
758          */
759         result SetTabEditModeEnabled(bool enable);
760
761
762         /**
763          * Adds an action event listener instance.
764          * OnActionPerformed() of the added listener is called when the user selects an item.
765          *
766          * @since               2.0
767          *
768          * @param[in]   listener        The event listener to be added
769          * @remarks             When the user collapses the tab style %Footer control which is in the expanded mode by pressing the more button, OnActionPerformed() is called for the currently selected tab item.
770          */
771         void AddActionEventListener(Tizen::Ui::IActionEventListener& listener);
772
773
774         /**
775          * Removes an action event listener instance.
776          * The removed listener cannot listen to events when they are fired.
777          *
778          * @since               2.0
779          *
780          * @param[in]   listener        The event listener to be removed
781          */
782         void RemoveActionEventListener(Tizen::Ui::IActionEventListener& listener);
783
784
785         /**
786          * Gets the position and size of the specified button item.
787          *
788          * @since               2.0
789          *
790          * @return              The position and size of the button item at the specified position.
791          * @param[in]           position                The position of the button item
792          * @exception           E_SUCCESS               The method is successful.
793          * @exception           E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation. @n
794          *                                      There is no button set at the specified position.
795          * @remarks             The specific error code can be accessed using the GetLastResult() method.
796          */
797         Tizen::Graphics::Rectangle GetButtonBounds(ButtonPosition position) const;
798
799
800 protected:
801         //
802         //This method is for internal use only. Using this method can cause behavioral, security-related,
803         //and consistency-related issues in the application.
804         //
805         // This is the default constructor for this class.
806         // @since               2.0
807         //
808         Footer(void);
809
810
811         //
812         //This method is for internal use only. Using this method can cause behavioral, security-related,
813         //and consistency-related issues in the application.
814         //
815         // This is the destructor for this class.
816         // @since               2.0
817         //
818         virtual ~Footer(void);
819
820
821 private:
822         //
823         //This method is for internal use only. Using this method can cause behavioral, security-related,
824         //and consistency-related issues in the application.
825         //
826         // Initializes this instance of Footer with the specified parameter.
827         //
828         // @since       2.0
829         // @return              An error code
830         // @exception   E_SUCCESS                       The method is successful.
831         // @exception   E_SYSTEM                        A system error has occurred.
832         //
833         result Construct(void);
834
835         Footer(const Footer& rhs);
836         Footer& operator =(const Footer& rhs);
837
838 private:
839         friend class _FormImpl;
840         friend class _FooterImpl;
841
842 };
843
844 }}} // Tizen::Ui::Controls
845
846 #endif // _FUI_CTRL_FOOTER_H_