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.
19 * @file FUiCtrl_TabItem.cpp
20 * @brief This is the header file for the _TabItem class.
24 #include <FGrp_BitmapImpl.h>
25 #include "FUi_Control.h"
26 #include "FUi_ResourceManager.h"
27 #include "FUiCtrl_TabItem.h"
30 using namespace Tizen::Graphics;
32 namespace Tizen { namespace Ui { namespace Controls {
34 _TabItem::_TabItem(void)
37 , __style(_TABITEM_STYLE_TEXT)
41 , __status(_TABITEM_STATUS_NORMAL)
45 __bounds.width = 10.0f;
46 __bounds.height = 10.0f;
50 _TabItem::~_TabItem(void)
67 _TabItem::SetActionId(int actionId)
69 __actionId = actionId;
74 _TabItem::GetActionId(void) const
81 _TabItem::SetUpdateState(bool bUpdate)
88 _TabItem::GetUpdateState(void) const
95 _TabItem::SetText(const Tizen::Base::String& text)
102 _TabItem::GetText(void) const
109 _TabItem::SetIcon(const Bitmap& icon)
112 Tizen::Graphics::Bitmap* __pBitmap = _BitmapImpl::CloneN(icon);
113 result r = GetLastResult();
114 SysTryReturnVoidResult(NID_UI_CTRL, (__pBitmap), r, "[%s] Propagating.", GetErrorMessage(r));
116 __pbmIcon = __pBitmap;
123 _TabItem::GetIcon(void) const
130 _TabItem::SetBadgeIcon(const Bitmap& icon)
132 Tizen::Graphics::Bitmap* __pBitmap = _BitmapImpl::CloneN(icon);
133 result r = GetLastResult();
134 SysTryReturnVoidResult(NID_UI_CTRL, (__pBitmap), r, "[%s] Propagating.", GetErrorMessage(r));
136 __pbmBadge = __pBitmap;
143 _TabItem::GetBadgeIcon(void) const
150 _TabItem::SetItemBounds(FloatRectangle bounds)
157 _TabItem::GetItemBounds(void) const
164 _TabItem::SetStatus(_TabItemStatus status)
171 _TabItem::GetStatus(void) const
178 _TabItem::SetStyle(int style)
185 _TabItem::GetStyle(void) const
187 return _TabItemStyle(__style);
191 }}} // Tizen::Ui::Controls