apply tizen_2.2 gui
[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_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  * -Using the back button
123  * The image of back button is internally set by UI framework.
124  *
125  * @code
126  * bool
127  * TestForm::Initialize(void)
128  * {
129  *      pFooter->SetBackButton();
130  * }
131  * @endcode
132  */
133 class _OSP_EXPORT_ Footer
134         : public Tizen::Ui::Control
135 {
136 public:
137         /**
138          * Adds the specified footer item.
139          *
140          * @since               2.0
141          *
142          * @return      An error code
143          * @param[in]   item                The footer item to add
144          * @exception   E_SUCCESS           The method is successful.
145          * @exception   E_MAX_EXCEEDED      The number of items has exceeded the maximum limit.
146          * @exception   E_INVALID_ARG       A specified input parameter is invalid. @n
147          *                                                                      The specified item is not constructed.
148          * @exception   E_SYSTEM            A system error has occurred.
149          * @remarks
150          *                      - The %Footer control does not throw any exception even though the same action ID is assigned to multiple items. @n
151          *                      However, the content of the specified item is copied to the %Footer control.
152          *                      - Depending on the style of the %Footer control, several types of items can be added or inserted.
153          */
154         result AddItem(const FooterItem& item);
155
156
157         /**
158          * Inserts the footer item at the specified index.
159          *
160          * @since               2.0
161          *
162          * @return      An error code
163          * @param[in]   itemIndex           The index where the item must be inserted
164          * @param[in]   item                The footer item object to insert
165          * @exception   E_SUCCESS           The method is successful.
166          * @exception   E_MAX_EXCEEDED      The number of items has exceeded the maximum limit.
167          * @exception   E_OUT_OF_RANGE      The specified index is outside the bounds of the data structure. @n
168          *                                                                      The index is greater than or equal to the number of elements or less than @c 0.
169          * @exception   E_INVALID_ARG       A specified input parameter is invalid. @n
170          *                                                                      The specified item is not constructed.
171          * @exception   E_SYSTEM            A system error has occurred.
172          * @remarks
173          *                      - The %Footer control does not throw any exception even though the same action ID is assigned to multiple items. @n
174          *                      However, the content of the specified item is copied to the %Footer control.
175          *                      - Depending on the style of the %Footer control, several types of items can be added or inserted.
176          */
177         result InsertItemAt(int itemIndex, const FooterItem& item);
178
179
180         /**
181          * Checks whether a button item is set at the specified position.
182          *
183          * @since               2.0
184          *
185          * @return              @c true if the button item is set at the specified position, @n
186          *                              else @c false
187          * @param[in]   position            The position of the button item
188          * @exception   E_SUCCESS           The method is successful.
189          * @remarks     The specific error code can be accessed using the GetLastResult() method.
190          */
191         bool IsButtonSet(ButtonPosition position) const;
192
193
194         /**
195          * Checks whether the back button item is set.
196          *
197          * @since               2.0
198          *
199          * @return              @c true if the back button item is set, @n
200          *                              else @c false
201          * @exception   E_SUCCESS           The method is successful.
202          * @remarks     The specific error code can be accessed using the GetLastResult() method.
203          */
204         bool IsBackButtonSet(void) const;
205
206
207         /**
208          * Checks whether the tab edit mode is enabled.
209          *
210          * @since               2.0
211          *
212          * @return      @c true if the tab edit mode is set, @n
213          *                              else @c false
214          * @exception   E_SUCCESS           The method is successful.
215          */
216         bool IsTabEditModeEnabled(void) const;
217
218
219         /**
220          * Gets the color of the button item for the specified state.
221          *
222          * @since               2.0
223          *
224          * @return      The color of the button item, @n
225          *                              else RGBA (0,0,0,0) if an error occurs
226          * @param[in]   status              The status of the button item
227          * @exception   E_SUCCESS           The method is successful.
228          * @remarks     The specific error code can be accessed using the GetLastResult() method.
229          * @see         SetButtonColor()
230          */
231         Tizen::Graphics::Color GetButtonColor(ButtonItemStatus status) const;
232
233
234         /**
235          * Gets the text color of the button item for the specified state.
236          *
237          * @since               2.0
238          *
239          * @return      The text color of the button item, @n
240          *                              else RGBA (0,0,0,0) if an error occurs
241          * @param[in]   status              The status of the button item
242          * @exception   E_SUCCESS           The method is successful.
243          * @remarks     The specific error code can be accessed using the GetLastResult() method.
244          * @see         SetButtonTextColor()
245          */
246         Tizen::Graphics::Color GetButtonTextColor(ButtonItemStatus status) const;
247
248
249         /**
250          * Gets the state of the specified button item.
251          *
252          * @since               2.0
253          *
254          * @return      The state of the button item at the specified position
255          * @param[in]   position                        The position of the button item
256          * @exception   E_SUCCESS                       The method is successful.
257          * @exception   E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
258          *                                                                      There is no button set at the specified position.
259          * @remarks     The specific error code can be accessed using the GetLastResult() method.
260          */
261         ButtonItemStatus GetButtonStatus(ButtonPosition position) const;
262
263
264         /**
265          * Gets the state of the back button.
266          *
267          * @since       2.0
268          *
269          * @return      The state of the back button, @n
270          *                              else @c BUTTON_ITEM_STATUS_NORMAL if an error occurs.
271          * @exception   E_SUCCESS           The method is successful.
272          * @exception   E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
273          *                                                                      The back button is not set.
274          * @remarks     The specific error code can be accessed using the GetLastResult() method.
275          */
276         ButtonItemStatus GetBackButtonStatus(void) const;
277
278
279         /**
280          * Gets the color of the footer item for the specified item state.
281          *
282          * @since               2.0
283          *
284          * @return      The color of the item, @n
285          *                              else RGBA (0,0,0,0) if an error occurs
286          * @param[in]   status                          The item status
287          * @exception   E_SUCCESS           The method is successful.
288          * @remarks     The specific error code can be accessed using the GetLastResult() method.
289          * @see         SetItemColor()
290          */
291         Tizen::Graphics::Color GetItemColor(FooterItemStatus status) const;
292
293
294         /**
295          * Gets the number of footer items.
296          *
297          * @since               2.0
298          *
299          * @return      The number of footer items, @n
300          *              else @c -1 if an error occurs
301          * @exception   E_SUCCESS           The method is successful.
302          * @remarks     The specific error code can be accessed using the GetLastResult() method.
303          */
304         int GetItemCount(void) const;
305
306
307         /**
308          * Gets the state of the specified footer item.
309          *
310          * @since               2.0
311          *
312          * @return      An error code
313          * @param[in]   itemIndex               The index of the item
314          * @param[out]  status                  The state of the item at the specified index
315          * @exception   E_SUCCESS           The method is successful.
316          * @exception   E_OUT_OF_RANGE      The specified index is outside the bounds of the data structure. @n
317          *                                                                      The index is greater than or equal to the number of elements or less than zero.
318          */
319         result GetItemStatus(int itemIndex, FooterItemStatus& status) const;
320
321
322         /**
323          * Gets the text color of the footer item for the specified item state.
324          *
325          * @since               2.0
326          *
327          * @return      The text color of the item, @n
328          *                              else RGBA (0,0,0,0) if an error occurs
329          * @param[in]   status              The item status
330          * @exception   E_SUCCESS           The method is successful.
331          * @remarks     The specific error code can be accessed using the GetLastResult() method.
332          */
333         Tizen::Graphics::Color GetItemTextColor(FooterItemStatus status) const;
334
335
336         /**
337          * Gets the style of the %Footer control.
338          *
339          * @since               2.0
340          *
341          * @return      The footer style, @n
342          *                              else @c FOOTER_STYLE_BUTTON_TEXT if an error occurs
343          * @exception   E_SUCCESS           The method is successful.
344          * @remarks     The specific error code can be accessed using the GetLastResult() method.
345          */
346         FooterStyle GetStyle(void) const;
347
348
349         /**
350          * Gets the index of the currently selected item.
351          *
352          * @since               2.0
353          *
354          * @return      The selected item index,@n
355          *              else @c -1 if an error occurs
356          * @exception   E_SUCCESS               The method is successful.
357          * @exception   E_UNSUPPORTED_OPERATION The operation is not supported when the style of the %Footer control is
358          *                                                                              ::FOOTER_STYLE_BUTTON_TEXT, ::FOOTER_STYLE_BUTTON_ICON
359          *                                                                              or ::FOOTER_STYLE_BUTTON_ICON_TEXT.
360          * @remarks     The specific error code can be accessed using the GetLastResult() method.
361          */
362         int GetSelectedItemIndex(void) const;
363
364
365         /**
366          * Gets the color of the footer.
367          *
368          * @since               2.0
369          *
370          * @return      The color, @n
371          *                              else RGBA (0,0,0,0) if an error occurs
372          * @exception   E_SUCCESS           The method is successful.
373          * @remarks     The specific error code can be accessed using the GetLastResult() method.
374          */
375         Tizen::Graphics::Color GetColor(void) const;
376
377
378         /**
379          * Removes all the button items with the back button.
380          *
381          * @since               2.0
382          *
383          * @return      An error code
384          * @exception   E_SUCCESS       The method is successful.
385          * @exception   E_SYSTEM        A system error has occurred.
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       Either the method is successful or no button item is set at the specified position.
398          * @exception   E_SYSTEM        A system error has occurred.
399          */
400         result RemoveButtonAt(ButtonPosition position);
401
402
403         /**
404          * Removes the back button item.
405          *
406          * @since               2.0
407          *
408          * @return      An error code
409          * @exception   E_SUCCESS          The method is successful.
410          * @exception   E_SYSTEM           This exception exists only for historical reason.
411          * @remarks     This method always returns E_SUCCESS.
412          */
413         result RemoveBackButton(void);
414
415
416         /**
417          * Removes all the footer items except for the left, right, and back button items.
418          *
419          * @since               2.0
420          *
421          * @return      An error code
422          * @exception   E_SUCCESS           The method is successful.
423          * @exception   E_SYSTEM            A system error has occurred.
424          */
425         result RemoveAllItems(void);
426
427
428         /**
429          * Removes the item at the specified index.
430          *
431          * @since               2.0
432          *
433          * @return      An error code
434          * @param[in]   itemIndex                       The index of the item to remove
435          * @exception   E_SUCCESS                       The method is successful.
436          * @exception   E_OUT_OF_RANGE          The specified index is outside the bounds of the data structure. @n
437          *                                                                      The index is greater than or equal to the number of elements or less than @c 0.
438          * @exception   E_SYSTEM                        A system error has occurred.
439          */
440         result RemoveItemAt(int itemIndex);
441
442
443         /**
444          * Sets the background bitmap image.
445          *
446          * @since               2.0
447          *
448          * @return      An error code
449          * @param[in]   pBitmap              The background image
450          * @exception   E_SUCCESS            The method is successful.
451          * @exception   E_SYSTEM             A system error has occurred.
452          */
453         result SetBackgroundBitmap(const Tizen::Graphics::Bitmap* pBitmap);
454
455
456         /**
457          * Sets the button item at the specified position.
458          *
459          * @since               2.0
460          *
461          * @return              An error code
462          * @param[in]   position                        The position at which to set the specified button item. @n
463          *                                                      If there is an existing button item at the specified position, it is replaced with the new item.
464          *                                                      However, the contents of the specified item are copied to the %Footer control.
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 or ::FOOTER_STYLE_TAB_LARGE.
472          * @exception   E_SYSTEM                    A system error has occurred.
473          */
474         result SetButton(ButtonPosition position, const ButtonItem& button);
475
476
477         /**
478          * Sets the button item color for the specified state.
479          *
480          * @since               2.0
481          *
482          * @return              An error code
483          * @param[in]   status          The status of the button item
484          * @param[in]   color           The button item color to set
485          * @exception   E_SUCCESS       The method is successful.
486          * @exception   E_SYSTEM            A system error has occurred.
487          * @see         GetButtonColor()
488          */
489         result SetButtonColor(ButtonItemStatus status, const Tizen::Graphics::Color& color);
490
491
492         /**
493          * Enables or disables the button item at the specified position.
494          *
495          * @since       2.0
496          *
497          * @return      An error code
498          * @param[in]   position                The button item position
499          * @param[in]   enable                  Set to @c true to enable the specified button item, @n
500          *                                                                              else @c false
501          * @exception   E_SUCCESS               The method is successful.
502          * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation. @n
503          *                                                                          There is no button set at the specified position.
504          * @exception   E_SYSTEM                A system error has occurred.
505          */
506         result SetButtonEnabled(ButtonPosition position, bool enable);
507
508
509         /**
510          * Enables or disables the back button.
511          *
512          * @since               2.0
513          *
514          * @return      An error code
515          * @param[in]   enable                  Set to @c true to enable the back button, @n
516          *                                                                              else @c false
517          * @exception   E_SUCCESS               The method is successful.
518          * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation. @n
519          *                                                                          The back button item is not set.
520          */
521         result SetBackButtonEnabled(bool enable);
522
523
524         /**
525          * Sets the button item text color for the specified state.
526          *
527          * @since               2.0
528          *
529          * @return      An error code
530          * @param[in]   status          The status of the button item
531          * @param[in]   color           The button item text color to set
532          * @exception   E_SUCCESS       The method is successful.
533          * @exception   E_SYSTEM        A system error has occurred.
534          * @see         GetButtonTextColor()
535          */
536         result SetButtonTextColor(ButtonItemStatus status, const Tizen::Graphics::Color& color);
537
538         /**
539          * Sets the badge icon of the specified ButtonItem.
540          *
541          * @since       2.0
542          *
543          * @return      An error code
544          * @param[in]   position                                The button item position
545          * @param[in]   pBadgeIcon                      The bitmap for the icon
546          * @exception   E_SUCCESS                       The method is successful.
547          * @exception   E_UNSUPPORTED_OPERATION         This operation is not supported. @n
548          *                      The operation is not supported when the style of the %Footer control is ::FOOTER_STYLE_TAB or ::FOOTER_STYLE_TAB_LARGE.
549          */
550         result SetButtonBadgeIcon(ButtonPosition position, const Tizen::Graphics::Bitmap* pBadgeIcon);
551
552
553         /**
554          * Sets the numbered badge icon of the specified ButtonItem.
555          *
556          * @since       2.0
557          *
558          * @return      An error code
559          * @param[in]   position                                The button item position
560          * @param[in]   number                                  The number value that should be displayed as the badge icon @n
561          *                                                                      If it is set to @c 0, the numbered badge icon is removed from an item.
562          * @exception   E_SUCCESS                               The method is successful.
563          * @exception   E_INVALID_ARG                   The specified @c number must be in the range defined by @c 0 and @c 99999.
564          * @exception   E_UNSUPPORTED_OPERATION         This operation is not supported. @n
565          *              The operation is not supported when the style of the %Footer control is ::FOOTER_STYLE_TAB or ::FOOTER_STYLE_TAB_LARGE.
566          */
567         result SetButtonNumberedBadgeIcon(ButtonPosition position, int number);
568
569
570         /**
571          * Sets the back button.
572          *
573          * @since       2.0
574          *
575          * @return      An error code
576          * @exception   E_SUCCESS                     The method is successful.
577          * @exception   E_UNSUPPORTED_OPERATION       This operation is not supported. @n
578          *                                                                              The operation is not supported when the style of the %Footer control is ::FOOTER_STYLE_TAB or ::FOOTER_STYLE_TAB_LARGE. @n
579          *                                            This device does not support the software back button.
580          * @exception   E_SYSTEM                      A system error has occurred.
581          * @remarks
582          *                      - When the back button is pressed, IFormBackEventListener::OnFormBackRequested() is called.
583          *                      - If the right button is already set, then the button is replaced with the back button.
584          * @see         Tizen::Ui::Controls::IFormBackEventListener
585          */
586         result SetBackButton(void);
587
588
589         /**
590          * Sets the content of the footer item at the specified index.
591          *
592          * @since               2.0
593          *
594          * @return      An error code
595          * @param[in]   itemIndex               The index at which to set the specified item
596          * @param[in]   item                    The item
597          * @exception   E_SUCCESS           The method is successful.
598          * @exception   E_OUT_OF_RANGE      The specified index is outside the bounds of the data structure. @n
599          *                                                                      The index is greater than or equal to the number of elements or less than @c 0.
600          * @exception   E_INVALID_ARG           A specified input parameter is invalid. @n
601          *                                                                  The specified item is not constructed.
602          * @exception   E_SYSTEM            A system error has occurred.
603          * @remarks     The %Footer control does not throw any exception even though the same action ID is assigned to multiple items. @n
604          *              However, the content of the specified item is copied to the %Footer control.
605          */
606         result SetItemAt(int itemIndex, const FooterItem& item);
607
608
609         /**
610          * Sets the item color for the specified state.
611          *
612          * @since               2.0
613          *
614          * @return              An error code
615          * @param[in]   status                  The item status
616          * @param[in]   color                   The item color to set
617          * @exception   E_SUCCESS               The method is successful.
618          * @exception   E_SYSTEM                    A system error has occurred.
619          * @see         GetItemColor()
620          */
621         result SetItemColor(FooterItemStatus status, const Tizen::Graphics::Color& color);
622
623
624         /**
625          * Sets the item state at the specified index in the footer.
626          *
627          * @since               2.0
628          *
629          * @return              An error code
630          * @param[in]   itemIndex                               The index of the item
631          * @param[in]   enable                                  Set to @c true to enable the item state, @n
632          *                                              else @c false
633          * @exception   E_SUCCESS                               The method is successful.
634          * @exception   E_OUT_OF_RANGE                  The specified index is outside the bounds of the data structure. @n
635          *                                                                              The index is greater than or equal to the number of elements or less than zero.
636          * @exception   E_INVALID_OPERATION             The current state of the instance prohibits the execution of the specified operation. @n
637          *                                                                              The specified item is currently selected.
638          * @exception   E_SYSTEM                A system error has occurred.
639          */
640         result SetItemEnabled(int itemIndex, bool enable);
641
642
643         /**
644          * Sets the badge icon of the specified tab style footer item.
645          *
646          * @since               2.0
647          *
648          * @return      An error code
649          * @param[in]   itemIndex               The index of the item to set the badge icon
650          * @param[in]   pBadgeIcon              The bitmap for the icon
651          * @exception   E_SUCCESS               The method is successful.
652          * @exception   E_OUT_OF_RANGE          The specified index is outside the bounds of the data structure. @n
653          *                                                                              The index is greater than or equal to the number of elements or less than @c 0.
654          * @exception   E_SYSTEM                A system error has occurred.
655          */
656         result SetItemBadgeIcon(int itemIndex, const Tizen::Graphics::Bitmap* pBadgeIcon);
657
658
659         /**
660          * Sets the numbered badge icon of the specified footer item.
661          *
662          * @since       2.0
663          *
664          * @return      An error code
665          * @param[in]   itemIndex               The item index
666          * @param[in]   number                  The number value that must be displayed as the badge icon @n
667          *                                                      If it is set to @c 0, the numbered badge icon is removed from an item.
668          * @exception   E_SUCCESS               The method is successful.
669          * @exception   E_INVALID_ARG           The specified @c number must be in the range defined by @c 0 and @c 99999.
670          * @exception   E_OUT_OF_RANGE          The specified index is outside the bounds of the data structure. @n
671          *                                                                              The index is greater than or equal to the number of elements or less than @c 0.
672          * @exception   E_SYSTEM                A system error has occurred.
673          */
674         result SetItemNumberedBadgeIcon(int itemIndex, int number);
675
676
677         /**
678          * Sets the item text color for the specified state.
679          *
680          * @since               2.0
681          *
682          * @return      An error code
683          * @param[in]   status              The item status
684          * @param[in]   color               The item text color to set
685          * @exception   E_SUCCESS           The method is successful.
686          * @exception   E_SYSTEM            A system error has occurred.
687          */
688         result SetItemTextColor(FooterItemStatus status, const Tizen::Graphics::Color& color);
689
690
691         /**
692          * Selects the item at the specified index.
693          *
694          * @since               2.0
695          *
696          * @return      An error code
697          * @param[in]   itemIndex               The index of the item to select
698          * @exception   E_SUCCESS               The method is successful.
699          * @exception   E_OUT_OF_RANGE          The specified index is out of the range of the data structure. @n
700          *                                                                              The specified index is either greater than or equal to the number of items or is less than zero.
701          * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation. @n
702          *                                      The item at the specified index is disabled.
703          * @exception   E_UNSUPPORTED_OPERATION The operation is not supported if the %Footer control style is ::FOOTER_STYLE_BUTTON_TEXT,
704          *                                      ::FOOTER_STYLE_BUTTON_ICON or ::FOOTER_STYLE_BUTTON_ICON_TEXT.
705          * @exception   E_SYSTEM                A system error has occurred.
706          */
707         result SetItemSelected(int itemIndex);
708
709
710         /**
711          * Sets the color of the footer.
712          *
713          * @since               2.0
714          *
715          * @return      An error code
716          * @param[in]   color                           The footer color to set
717          * @exception   E_SUCCESS                       The method is successful.
718          */
719         result SetColor(const Tizen::Graphics::Color& color);
720
721
722         /**
723          * Sets the style of the footer. @n
724          * All items and buttons will be removed if the style is changed.
725          *
726          * @since               2.0
727          *
728          * @return      An error code
729          * @param[in]   style                       The footer style to set
730          * @exception   E_SUCCESS                       The method is successful.
731          * @exception   E_SYSTEM                        A system error has occurred.
732          */
733         result SetStyle(FooterStyle style);
734
735
736         /**
737          * Enables or disables the tab edit mode.
738          *
739          * @since               2.0
740          *
741          * @return      An error code
742          * @param[in]   enable                  Set to @c true to enable the edit mode, @n
743          *                                      else @c false
744          * @exception   E_SUCCESS               The method is successful.
745          * @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.
746          */
747         result SetTabEditModeEnabled(bool enable);
748
749
750         /**
751          * Adds an action event listener instance.
752          * OnActionPerformed() of the added listener is called when the user selects an item.
753          *
754          * @since               2.0
755          *
756          * @param[in]   listener        The event listener to add
757          * @remarks             When the user collapses the tab style %Footer control which is in the expanded mode by pressing the more button,
758          *                              OnActionPerformed() is called for the currently selected tab item.
759          */
760         void AddActionEventListener(Tizen::Ui::IActionEventListener& listener);
761
762
763         /**
764          * Removes an action event listener instance.
765          * The removed listener cannot listen to events when they are fired.
766          *
767          * @since               2.0
768          *
769          * @param[in]   listener        The event listener to remove
770          */
771         void RemoveActionEventListener(Tizen::Ui::IActionEventListener& listener);
772
773
774         /**
775         * Gets the position and size of the specified button item.
776         *
777         * @since                2.0
778         *
779         * @return       The position and size of the button item at the specified position.
780         * @param[in]    position                The position of the button item
781         * @exception    E_SUCCESS               The method is successful.
782         * @exception    E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation. @n
783         *                                       There is no button set at the specified position.
784         * @remarks      The specific error code can be accessed using the GetLastResult() method.
785         */
786         Tizen::Graphics::Rectangle GetButtonBounds(ButtonPosition position) const;
787
788
789         /**
790          * Gets the position and size of the specified button item.
791          *
792          * @since               2.1
793          *
794          * @return              The position and size of the button item at the specified position.
795          * @param[in]           position                The position of the button item
796          * @exception           E_SUCCESS               The method is successful.
797          * @exception           E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation. @n
798          *                                      There is no button set at the specified position.
799          * @remarks             The specific error code can be accessed using the GetLastResult() method.
800          */
801         Tizen::Graphics::FloatRectangle GetButtonBoundsF(ButtonPosition position) const;
802
803
804         /**
805          * Checks whether the Menu button item is set.
806          *
807          * @since               2.2
808          *
809          * @return      @c true if the Menu button item is set, @n
810          *              else @c false
811          */
812         bool IsMenuButtonSet(void) const;
813
814
815         /**
816          * Gets the state of the Menu button.
817          *
818          * @since       2.2
819          *
820          * @return      The state of the Menu button, @n
821          *              else @c BUTTON_ITEM_STATUS_NORMAL if an error occurs
822          * @exception   E_SUCCESS           The method is successful.
823          * @exception   E_INVALID_OPERATION The current state of the instance prohibits the execution of the specified operation. @n
824          *                                                      The Menu button is not set.
825          * @remarks     The specific error code can be accessed using the GetLastResult() method.
826          */
827         ButtonItemStatus GetMenuButtonStatus(void) const;
828
829
830         /**
831          * Removes the Menu button item.
832          *
833          * @since        2.2
834          *
835          * @return       An error code
836          * @exception    E_SUCCESS              The method is successful.
837          * @exception    E_SYSTEM               This exception exists only for historical reason.
838          * @remarks      This method always returns E_SUCCESS.
839          */
840         result RemoveMenuButton(void);
841
842
843         /**
844          * Enables or disables the Menu button.
845          *
846          * @since       2.2
847          *
848          * @return      An error code
849          * @param[in]   enable                   Set to @c true to enable the Menu button, @n
850          *                                       else @c false
851          * @exception   E_SUCCESS                The method is successful.
852          * @exception   E_INVALID_OPERATION  The current state of the instance prohibits the execution of the specified operation. @n
853          *                                       The Menu button item is not set.
854          */
855         result SetMenuButtonEnabled(bool enable);
856
857
858         /**
859          * Sets the Menu button.
860          *
861          * @since       2.2
862          *
863          * @return      An error code
864          * @exception   E_SUCCESS                       The method is successful.
865          * @exception   E_INVALID_OPERATION             This exception is returned when there are more than 3 footer items.
866          * @exception   E_UNSUPPORTED_OPERATION         This operation is not supported. @n
867          *                                              The operation is not supported when the style of the %Footer control is ::FOOTER_STYLE_TAB or ::FOOTER_STYLE_TAB_LARGE.
868          * @exception   E_SYSTEM                                A System error has occurred.
869          * @remarks     If the left button is already set, then the button is replaced with the Menu button.
870          */
871         result SetMenuButton(void);
872
873
874 protected:
875         //
876         //This method is for internal use only. Using this method can cause behavioral, security-related,
877         //and consistency-related issues in the application.
878         //
879         // This is the default constructor for this class.
880         // @since               2.0
881         //
882         Footer(void);
883
884
885         //
886         //This method is for internal use only. Using this method can cause behavioral, security-related,
887         //and consistency-related issues in the application.
888         //
889         // This is the destructor for this class.
890         // @since               2.0
891         //
892         virtual ~Footer(void);
893
894
895 private:
896         //
897         //This method is for internal use only. Using this method can cause behavioral, security-related,
898         //and consistency-related issues in the application.
899         //
900         // Initializes this instance of Footer with the specified parameter.
901         //
902         // @since       2.0
903         // @return              An error code
904         // @exception   E_SUCCESS                       The method is successful.
905         // @exception   E_SYSTEM                        A system error has occurred.
906         //
907         result Construct(void);
908
909         Footer(const Footer& rhs);
910         Footer& operator =(const Footer& rhs);
911
912 private:
913         friend class _FormImpl;
914         friend class _FooterImpl;
915
916 };
917
918 }}} // Tizen::Ui::Controls
919
920 #endif // _FUI_CTRL_FOOTER_H_