2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
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
9 // http://floralicense.org/license/
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_IconListData.cpp
20 * @brief This is the implementation file for _IconListData class
22 * This file contains the implementation of _IconListData class
25 #include "FUiCtrl_IconListData.h"
27 using namespace Tizen::Base;
28 using namespace Tizen::Ui;
29 using namespace Tizen::Graphics;
31 namespace Tizen { namespace Ui { namespace Controls
34 _IconListData::_IconListData(void)
35 : __pNormalBitmap(null)
36 , __pFocusedBitmap(null)
42 _IconListData::~_IconListData(void)
44 delete __pNormalBitmap;
45 __pNormalBitmap = null;
47 delete __pFocusedBitmap;
48 __pFocusedBitmap = null;
52 _IconListData::GetNormalBitmap(void)
54 return __pNormalBitmap;
58 _IconListData::GetFocusedBitmap(void)
60 return __pFocusedBitmap;
64 _IconListData::GetLabelText(void)
70 _IconListData::GetItemId(void)
76 _IconListData::SetNormalBitmap(const Bitmap* pNormalBitmap)
79 if (pNormalBitmap != null)
81 __pNormalBitmap = new (std::nothrow) Bitmap();
82 SysTryReturnVoidResult(NID_UI_CTRL, (__pNormalBitmap != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
84 result r = __pNormalBitmap->Construct(*pNormalBitmap, Rectangle(0, 0, pNormalBitmap->GetWidth(), pNormalBitmap->GetHeight()));
87 SysLogException(NID_UI_CTRL, r, "[E_SYSTEM]Bitmap construct failed");
94 _IconListData::SetFocusedBitmap(const Bitmap* pFocusedBitmap)
96 if (pFocusedBitmap != null)
98 __pFocusedBitmap = new (std::nothrow) Bitmap();
99 SysTryReturnVoidResult(NID_UI_CTRL, (__pFocusedBitmap != null), E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
101 result r = __pFocusedBitmap->Construct(*pFocusedBitmap, Rectangle(0, 0, pFocusedBitmap->GetWidth(), pFocusedBitmap->GetHeight()));
104 SysLogException(NID_UI_CTRL, r, "[E_SYSTEM]Bitmap construct failed");
110 _IconListData::SetLabelText(const String& labelText)
112 __labelText = labelText;
117 _IconListData::SetItemId(int itemId)
122 }}} // Tizen::Ui::Controls