2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
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
9 // http://www.apache.org/licenses/LICENSE-2.0/
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.
18 * @file FUiCtrlTabBarItem.h
19 * @brief This is the header file for the %TabBarItem class.
21 * This header file contains the declarations of the %TabBarItem class.
23 #ifndef _FUI_CTRL_TAB_BAR_ITEM_H_
24 #define _FUI_CTRL_TAB_BAR_ITEM_H_
26 #include <FBaseObject.h>
28 namespace Tizen { namespace Ui { namespace Controls
30 class _TabBarItemImpl;
36 namespace Tizen { namespace Ui { namespace Controls
40 * @brief This class is an implementation of %TabBarItem.
44 * The %TabBarItem class is a helper class that specifies the contents of a tab bar item.
46 * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_tab_bar.htm">TabBar</a>.
48 class _OSP_EXPORT_ TabBarItem
49 : public Tizen::Base::Object
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.
63 * This destructor overrides Tizen::Base::Object::~Object().
67 virtual ~TabBarItem(void);
71 * Initializes this instance of %TabBarItem with the specified parameters.
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.
82 result Construct(const Tizen::Base::String& text, int actionId);
88 * Sets the action ID of the item.
92 * @return An error code
93 * @param[in] actionId The action ID for this item
94 * @exception E_SUCCESS The method is successful.
95 * @exception E_INVALID_ARG The specified input parameter is invalid. @n
96 * The @c actionId of the specified item must be a positive integer.
97 * @exception E_INVALID_STATE This instance is in an invalid state.
99 result SetActionId(int actionId);
103 * Gets the action ID of the item.
107 * @return The action ID, @n
108 * else @c -1 if an error occurs
109 * @exception E_SUCCESS The method is successful.
110 * @exception E_INVALID_STATE This instance is in an invalid state.
111 * @remarks The specific error code can be accessed using the GetLastResult() method.
113 int GetActionId(void) const;
117 * Gets the text of the item.
121 * @return The item text, @n
122 * else an empty string if an error occurs
123 * @exception E_SUCCESS The method is successful.
124 * @exception E_INVALID_STATE This instance is in an invalid state.
125 * @remarks The specific error code can be accessed using the GetLastResult() method.
127 Tizen::Base::String GetText(void) const;
131 * Sets the text of the item.
135 * @return An error code
136 * @param[in] text The text to set
137 * @exception E_SUCCESS The method is successful.
138 * @exception E_INVALID_STATE This instance is in an invalid state.
139 * @remarks If the size of the text exceeds the displayable area, the font size of the text is decreased automatically.
141 result SetText(const Tizen::Base::String& text);
148 //This method is for internal use only. Using this method can cause behavioral, security-related,
149 //and consistency-related issues in the application.
151 _TabBarItemImpl* __pTabBarItemImpl;
154 // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
156 TabBarItem(const TabBarItem& rhs);
159 // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
161 TabBarItem& operator =(const TabBarItem& rhs);
165 }}} // Tizen::Ui: Control
167 #endif //_FUI_CTRL_TAB_BAR_ITEM_H_