Merge "Fix Ime Rotation" 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 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 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     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 insert
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 The operation is not supported when the style of the %Footer control is @c FOOTER_STYLE_BUTTON_TEXT, @n
355          *                                      @c FOOTER_STYLE_BUTTON_ICON or @c FOOTER_STYLE_BUTTON_ICON_TEXT.
356          * @remarks     The specific error code can be accessed using the GetLastResult() method.
357          */
358         int GetSelectedItemIndex(void) const;
359
360
361         /**
362          * Gets the color of the footer.
363          *
364          * @since               2.0
365          *
366          * @return      The color, @n
367          *                              else RGBA (0,0,0,0) if an error occurs
368          * @exception   E_SUCCESS           The method is successful.
369          * @remarks     The specific error code can be accessed using the GetLastResult() method.
370          */
371         Tizen::Graphics::Color GetColor(void) const;
372
373
374         /**
375          * Removes all the button items.
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 remove
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 remove
434          * @exception   E_SUCCESS                       The method is successful.
435          * @exception   E_OUT_OF_RANGE          The specified index is outside the bounds of the data structure. @n
436          *                                                                      The index is greater than or equal to the number of elements or less than @c 0.
437          * @exception   E_SYSTEM                        A system error has occurred.
438          */
439         result RemoveItemAt(int itemIndex);
440
441
442         /**
443          * Sets the background bitmap image.
444          *
445          * @since               2.0
446          *
447          * @return      An error code
448          * @param[in]   pBitmap              The background image
449          * @exception   E_SUCCESS            The method is successful.
450          * @exception   E_SYSTEM             A system error has occurred.
451          */
452         result SetBackgroundBitmap(const Tizen::Graphics::Bitmap* pBitmap);
453
454
455         /**
456          * Sets the button item at the specified position.
457          *
458          * @since               2.0
459          *
460          * @return              An error code
461          * @param[in]   position                        The position at which to set the specified button item.
462          * @param[in]   button                      The button item to 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     The operation is not supported when the style of the %Footer control is @c FOOTER_STYLE_TAB.
469          * @exception   E_SYSTEM                    A system error has occurred.
470          * @remarks     If there is an existing button item at the specified position, it is replaced with the new item.@n
471          *              However, the contents of the specified item are copied to the %Footer control.
472          */
473         result SetButton(ButtonPosition position, const ButtonItem& button);
474
475
476         /**
477          * Sets the button item color for the specified state.
478          *
479          * @since               2.0
480          *
481          * @return              An error code
482          * @param[in]   status          The status of the button item
483          * @param[in]   color           The button item color to set
484          * @exception   E_SUCCESS       The method is successful.
485          * @exception   E_SYSTEM            A system error has occurred.
486          * @see         GetButtonColor()
487          */
488         result SetButtonColor(ButtonItemStatus status, const Tizen::Graphics::Color& color);
489
490
491         /**
492          * Enables or disables the button item at the specified position.
493          *
494          * @since       2.0
495          *
496          * @return      An error code
497          * @param[in]   position                The button item position
498          * @param[in]   enable                  Set to @c true to enable the specified button item, @n
499          *                                                                              else @c false
500          * @exception   E_SUCCESS               The method is successful.
501          * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation. @n
502          *                                                                          There is no button set at the specified position.
503          * @exception   E_SYSTEM                A system error has occurred.
504          */
505         result SetButtonEnabled(ButtonPosition position, bool enable);
506
507
508         /**
509          * Enables or disables the back button.
510          *
511          * @since               2.0
512          *
513          * @return      An error code
514          * @param[in]   enable                  Set to @c true to enable the back button, @n
515          *                                                                              else @c false
516          * @exception   E_SUCCESS               The method is successful.
517          * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation. @n
518          *                                                                          The back button item is not set.
519          * @exception   E_SYSTEM                A system error has occurred.
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 @c FOOTER_STYLE_TAB.
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
561          * @exception   E_SUCCESS                               The method is successful.
562          * @exception   E_INVALID_ARG                   The specified @c number must be in the range defined by @c 0 and @c 99999.
563          * @exception   E_UNSUPPORTED_OPERATION         This operation is not supported. @n
564          *              The operation is not supported when the style of the %Footer control is @c FOOTER_STYLE_TAB.
565          * @remarks     To remove the numbered badge icon from an item, pass @c 0 as the value of @c number.
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_INVALID_OPERATION           The current state of the instance prohibits the execution of the specified operation. @n
578          *                                            There are more than 2 footer items.
579          * @exception   E_UNSUPPORTED_OPERATION       This operation is not supported. @n
580          *                                                                                        The operation is not supported when the style of the %Footer control is @c FOOTER_STYLE_TAB. @n
581          *                                            This device does not support the software back button.
582          * @exception   E_SYSTEM                      A system error has occurred.
583          * @remarks     When the back button is pressed, OnFormBackRequested() of IFormBackEventListener is called. @n
584          *              If the right button is already set, then the button is replaced with the back button.
585          * @see         Tizen::Ui::Controls::IFormBackEventListener
586          */
587         result SetBackButton(void);
588
589
590         /**
591          * Sets the content of the footer item at the specified index.
592          *
593          * @since               2.0
594          *
595          * @return      An error code
596          * @param[in]   itemIndex               The index at which to set the specified item
597          * @param[in]   item                    The item
598          * @exception   E_SUCCESS           The method is successful.
599          * @exception   E_OUT_OF_RANGE      The specified index is outside the bounds of the data structure. @n
600          *                                                                      The index is greater than or equal to the number of elements or less than @c 0.
601          * @exception   E_INVALID_ARG           A specified input parameter is invalid. @n
602          *                                                                  The specified item is not constructed.
603          * @exception   E_SYSTEM            A system error has occurred.
604          * @remarks     The %Footer control does not throw any exception even though the same action ID is assigned to multiple items. @n
605          *              However, the content of the specified item is copied to the %Footer control.
606          */
607         result SetItemAt(int itemIndex, const FooterItem& item);
608
609
610         /**
611          * Sets the item color for the specified state.
612          *
613          * @since               2.0
614          *
615          * @return              An error code
616          * @param[in]   status                  The item status
617          * @param[in]   color                   The item color to set
618          * @exception   E_SUCCESS               The method is successful.
619          * @exception   E_SYSTEM                    A system error has occurred.
620          * @see         GetItemColor()
621          */
622         result SetItemColor(FooterItemStatus status, const Tizen::Graphics::Color& color);
623
624
625         /**
626          * Sets the item state at the specified index in the footer.
627          *
628          * @since               2.0
629          *
630          * @return              An error code
631          * @param[in]   itemIndex                               The index of the item
632          * @param[in]   enable                                  Set to @c true to enable the item state, @n
633          *                                              else @c false
634          * @exception   E_SUCCESS                               The method is successful.
635          * @exception   E_OUT_OF_RANGE                  The specified index is outside the bounds of the data structure. @n
636          *                                                                              The index is greater than or equal to the number of elements or less than zero.
637          * @exception   E_INVALID_OPERATION             The current state of the instance prohibits the execution of the specified operation. @n
638          *                                                                              The specified item is currently selected.
639          * @exception   E_SYSTEM                A system error has occurred.
640          */
641         result SetItemEnabled(int itemIndex, bool enable);
642
643
644         /**
645          * Sets the badge icon of the specified tab style footer item.
646          *
647          * @since               2.0
648          *
649          * @return      An error code
650          * @param[in]   itemIndex               The index of the item to set the badge icon
651          * @param[in]   pBadgeIcon              The bitmap for the icon
652          * @exception   E_SUCCESS               The method is successful.
653          * @exception   E_OUT_OF_RANGE          The specified index is outside the bounds of the data structure. @n
654          *                                                                              The index is greater than or equal to the number of elements or less than @c 0.
655          * @exception   E_SYSTEM                A system error has occurred.
656          */
657         result SetItemBadgeIcon(int itemIndex, const Tizen::Graphics::Bitmap* pBadgeIcon);
658
659
660         /**
661          * Sets the numbered badge icon of the specified footer item.
662          *
663          * @since       2.0
664          *
665          * @return      An error code
666          * @param[in]   itemIndex               The item index
667          * @param[in]   number                  The number value that must be displayed as the badge icon
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          * @remarks     To remove the numbered badge icon from an item, pass @c 0 as the value of @c number.
674          */
675         result SetItemNumberedBadgeIcon(int itemIndex, int number);
676
677
678         /**
679          * Sets the item text color for the specified state.
680          *
681          * @since               2.0
682          *
683          * @return      An error code
684          * @param[in]   status              The item status
685          * @param[in]   color               The item text color to set
686          * @exception   E_SUCCESS           The method is successful.
687          * @exception   E_SYSTEM            A system error has occurred.
688          */
689         result SetItemTextColor(FooterItemStatus status, const Tizen::Graphics::Color& color);
690
691
692         /**
693          * Selects the item at the specified index.
694          *
695          * @since               2.0
696          *
697          * @return      An error code
698          * @param[in]   itemIndex               The index of the item to select
699          * @exception   E_SUCCESS               The method is successful.
700          * @exception   E_OUT_OF_RANGE          The specified index is out of the range of the data structure. @n
701          *                                                                              The specified index is either greater than or equal to the number of items or is less than zero.
702          * @exception   E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation. @n
703          *                                      The item at the specified index is disabled.
704          * @exception   E_UNSUPPORTED_OPERATION The operation is not supported if the %Footer control style is @c FOOTER_STYLE_BUTTON_TEXT, @n
705          *                                      @c FOOTER_STYLE_BUTTON_ICON or @c FOOTER_STYLE_BUTTON_ICON_TEXT.
706          * @exception   E_SYSTEM                A system error has occurred.
707          */
708         result SetItemSelected(int itemIndex);
709
710
711         /**
712          * Sets the color of the footer.
713          *
714          * @since               2.0
715          *
716          * @return      An error code
717          * @param[in]   color                           The footer color to set
718          * @exception   E_SUCCESS                       The method is successful.
719          */
720         result SetColor(const Tizen::Graphics::Color& color);
721
722
723         /**
724          * Sets the style of the footer.
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          * @remarks             All items and buttons will be removed if the style is changed.
733          */
734         result SetStyle(FooterStyle style);
735
736
737         /**
738          * Enables or disables the tab edit mode.
739          *
740          * @since               2.0
741          *
742          * @return      An error code
743          * @param[in]   enable                  Set to @c true to enable the edit mode, @n
744          *                                      else @c false
745          * @exception   E_SUCCESS               The method is successful.
746          * @exception   E_UNSUPPORTED_OPERATION The operation is supported when the style of the %Footer control style is @c FOOTER_STYLE_TAB.
747          */
748         result SetTabEditModeEnabled(bool enable);
749
750
751         /**
752          * Adds an action event listener instance.
753          * OnActionPerformed() of the added listener is called when the user selects an item.
754          *
755          * @since               2.0
756          *
757          * @param[in]   listener        The event listener to add
758          * @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.
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          * Gets the position and size of the specified button item.
790          *
791          * @since               2.1
792          *
793          * @return              The position and size of the button item at the specified position.
794          * @param[in]           position                The position of the button item
795          * @exception           E_SUCCESS               The method is successful.
796          * @exception           E_INVALID_OPERATION     The current state of the instance prohibits the execution of the specified operation. @n
797          *                                      There is no button set at the specified position.
798          * @remarks             The specific error code can be accessed using the GetLastResult() method.
799          */
800         Tizen::Graphics::FloatRectangle GetButtonBoundsF(ButtonPosition position) const;
801
802
803 protected:
804         //
805         //This method is for internal use only. Using this method can cause behavioral, security-related,
806         //and consistency-related issues in the application.
807         //
808         // This is the default constructor for this class.
809         // @since               2.0
810         //
811         Footer(void);
812
813
814         //
815         //This method is for internal use only. Using this method can cause behavioral, security-related,
816         //and consistency-related issues in the application.
817         //
818         // This is the destructor for this class.
819         // @since               2.0
820         //
821         virtual ~Footer(void);
822
823
824 private:
825         //
826         //This method is for internal use only. Using this method can cause behavioral, security-related,
827         //and consistency-related issues in the application.
828         //
829         // Initializes this instance of Footer with the specified parameter.
830         //
831         // @since       2.0
832         // @return              An error code
833         // @exception   E_SUCCESS                       The method is successful.
834         // @exception   E_SYSTEM                        A system error has occurred.
835         //
836         result Construct(void);
837
838         Footer(const Footer& rhs);
839         Footer& operator =(const Footer& rhs);
840
841 private:
842         friend class _FormImpl;
843         friend class _FooterImpl;
844
845 };
846
847 }}} // Tizen::Ui::Controls
848
849 #endif // _FUI_CTRL_FOOTER_H_