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_CustomElement.cpp
20 * @brief This is the implementation file for _CustomElement class.
22 * This file contains the implementation of _CustomElement class.
25 #include <FBaseSysLog.h>
26 #include <FUiCtrlICustomElement.h>
27 #include "FUiCtrl_CustomElement.h"
29 #ifdef MEMORY_LEAK_CHECK
30 #include "mem_leak_check.h"
33 using namespace Tizen::Graphics;
35 namespace Tizen { namespace Ui { namespace Controls
38 _CustomElement::_CustomElement(int elementId)
40 , __elementId(elementId)
44 _CustomElement::~_CustomElement(void)
49 _CustomElement::GetElementId(void) const
55 _CustomElement::DrawElement(Canvas* pCanvas, Rectangle& rect, ListViewItemDrawingStatus status)
60 case LISTVIEW_ITEM_STATUS_NORMAL:
61 result = __pElement->OnDraw(*pCanvas, rect, LIST_ITEM_DRAWING_STATUS_NORMAL);
64 case LISTVIEW_ITEM_STATUS_PRESSED:
65 result = __pElement->OnDraw(*pCanvas, rect, LIST_ITEM_DRAWING_STATUS_PRESSED);
68 case LISTVIEW_ITEM_STATUS_HIGHLIGHTED:
69 result = __pElement->OnDraw(*pCanvas, rect, LIST_ITEM_DRAWING_STATUS_HIGHLIGHTED);
73 result = __pElement->OnDraw(*pCanvas, rect, LIST_ITEM_DRAWING_STATUS_NORMAL);
81 _CustomElement::SetElement(const ICustomElement& element)
83 __pElement = const_cast <ICustomElement*>(&element);
86 }}} // Tizen::Ui::Controls