3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.1 (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: IntDefaultCustomItem
24 #include <FUiControls.h>
25 #include "IntCommonLib.h"
26 #include "IntDefaultCustomItem.h"
29 using namespace Tizen::Base;
30 using namespace Tizen::Graphics;
31 using namespace Tizen::Ui::Controls;
33 const int DefaultCustomItem::IDA_FORMAT_STRING = 101;
35 DefaultCustomItem::DefaultCustomItem(void)
42 DefaultCustomItem::~DefaultCustomItem(void)
48 DefaultCustomItem::Construct(int width, int height)
51 __fontSize = CommonUtil::GetFontSize();
54 const Dimension dim(width, height);
55 r = CustomItem::Construct(dim, LIST_ANNEX_STYLE_NORMAL);
61 DefaultCustomItem::SetText(String& text)
67 DefaultCustomItem::GetText(void)
74 DefaultCustomItem::Make(void)
77 const Color pressedTextColor = Color(249, 249, 249);
78 const int textSize = 40;
79 const int x_Margin_Element = 26;
80 const int y_Margin_Element = 26;
81 const int width_Element = __width - 60;
83 r = AddElement(Rectangle(x_Margin_Element, y_Margin_Element, width_Element,60 + (__fontSize - 44)), IDA_FORMAT_STRING, __text, __fontSize , CUSTOM_COLOR_TRANSPARENT,CUSTOM_COLOR_TRANSPARENT,CUSTOM_COLOR_TRANSPARENT,true);
84 TryCatch( !IsFailed(r),,"DefaultCustomItem::Make %s",GetErrorMessage(r));
86 // SetElementSelectionEnabled(IDA_FORMAT_STRING, true);