Fixed to add the AllWindowList
[platform/framework/native/uifw.git] / inc / FUiCtrlTabBarItem.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  * @file    FUiCtrlTabBarItem.h
19  * @brief   This is the header file for the %TabBarItem class.
20  *
21  * This header file contains the declarations of the %TabBarItem class.
22  */
23 #ifndef _FUI_CTRL_TAB_BAR_ITEM_H_
24 #define _FUI_CTRL_TAB_BAR_ITEM_H_
25
26 #include <FBaseObject.h>
27
28 namespace Tizen { namespace Ui { namespace Controls
29 {
30 class _TabBarItemImpl;
31 };
32 };
33 };
34
35
36 namespace Tizen { namespace Ui { namespace Controls
37 {
38 /**
39  * @class       TabBarItem
40  * @brief       This class is an implementation of %TabBarItem.
41  *
42  * @since       2.0
43  *
44  * The %TabBarItem class is a helper class that specifies the contents of a tab bar item.
45  *
46  * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_tab_bar.htm">TabBar</a>.
47  */
48 class _OSP_EXPORT_ TabBarItem
49         : public Tizen::Base::Object
50 {
51 // Lifecycle
52 public:
53         /**
54          * The object is not fully constructed after this constructor is called. @n
55          * For full construction, the TabBarItem::Construct() method must be called right after calling this constructor.
56          *
57          * @since 2.0
58          */
59         TabBarItem(void);
60
61
62         /**
63          * This destructor overrides Tizen::Base::Object::~Object().
64          *
65          * @since 2.0
66          */
67         virtual ~TabBarItem(void);
68
69
70         /**
71          * Initializes this instance of %TabBarItem with the specified parameters.
72          *
73          * @since               2.0
74          *
75          * @return      An error code
76          * @param[in]   text                The item text
77          * @param[in]   actionId                The action ID of this item
78          * @exception   E_SUCCESS           The method is successful.
79          * @exception   E_INVALID_ARG       A specified input parameter is invalid. @n
80          *                                                                      The @c actionId of the specified item must be greater than or equal to @c 0.
81          * @exception   E_INVALID_STATE     This instance is in an invalid state.
82          */
83         result Construct(const Tizen::Base::String& text, int actionId);
84
85
86 // Operation
87 public:
88         /**
89          * Sets the action ID of the item.
90          *
91          * @since               2.0
92          *
93          * @return      An error code
94          * @param[in]   actionId                    The action ID for this item
95          * @exception   E_SUCCESS           The method is successful.
96          * @exception   E_INVALID_ARG       The specified input parameter is invalid. @n
97          *                                                                      The @c actionId of the specified item must be a positive integer.
98          * @exception   E_INVALID_STATE     This instance is in an invalid state.
99          */
100         result SetActionId(int actionId);
101
102
103         /**
104          * Gets the action ID of the item.
105          *
106          * @since               2.0
107          *
108          * @return      The action ID, @n
109          *                              else @c -1 if an error occurs
110          * @exception   E_SUCCESS                       The method is successful.
111          * @exception   E_INVALID_STATE         This instance is in an invalid state.
112          * @remarks     The specific error code can be accessed using the GetLastResult() method.
113          */
114         int GetActionId(void) const;
115
116
117         /**
118          * Gets the text of the item.
119          *
120          * @since               2.0
121          *
122          * @return              The item text, @n
123          *                              else an empty string if an error occurs
124          * @exception   E_SUCCESS           The method is successful.
125          * @exception   E_INVALID_STATE     This instance is in an invalid state.
126          * @remarks     The specific error code can be accessed using the GetLastResult() method.
127          */
128         Tizen::Base::String GetText(void) const;
129
130
131         /**
132          * Sets the text of the item.
133          *
134          * @since       2.0
135          *
136          * @return              An error code
137          * @param[in]   text                    The text to set
138          * @exception   E_SUCCESS           The method is successful.
139          * @exception   E_INVALID_STATE     This instance is in an invalid state.
140          * @remarks             If the size of the text exceeds the displayable area, the font size of the text is decreased automatically.
141          */
142         result SetText(const Tizen::Base::String& text);
143
144
145 private:
146         friend class TabBar;
147
148         //
149         //This method is for internal use only. Using this method can cause behavioral, security-related,
150         //and consistency-related issues in the application.
151         //
152         _TabBarItemImpl* __pTabBarItemImpl;
153
154         //
155         // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
156         //
157         TabBarItem(const TabBarItem& rhs);
158
159         //
160         // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
161         //
162         TabBarItem& operator =(const TabBarItem& rhs);
163
164 }; // TabBarItem
165
166 }}} // Tizen::Ui: Control
167
168 #endif //_FUI_CTRL_TAB_BAR_ITEM_H_