3 // Copyright (c) 2012 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.
18 //!Internet SettingToggleCustomItem class
19 /*@file: SettingToggleCustomItem.cpp
20 *@brief: The SettingToggleCustomItem
24 #include <FUiControls.h>
26 #include "IntSettingToggleCustomItem.h"
28 using namespace Tizen::App;
29 using namespace Tizen::Base;
30 using namespace Tizen::Graphics;
31 using namespace Tizen::Ui::Controls;
33 static const int IDA_FORMAT_STRING = 101;
35 SettingToggleCustomItem::SettingToggleCustomItem(void)
42 SettingToggleCustomItem::~SettingToggleCustomItem(void)
48 SettingToggleCustomItem::Construct(int width, int height)
54 const Dimension dim(width, height);
55 r = CustomItem::Construct(dim, LIST_ANNEX_STYLE_ONOFF_SLIDING);
61 SettingToggleCustomItem::SetText(Tizen::Base::String& text)
67 SettingToggleCustomItem::GetText(void)
73 SettingToggleCustomItem::Make(void)
75 const Color textColor = CUSTOM_COLOR_TRANSPARENT;
76 const Color pressedTextColor = CUSTOM_COLOR_TRANSPARENT;
77 const int X_Margin = 26;
78 const int Y_Margin = 26;
79 const int textSize = 40;
81 AddElement(Rectangle(X_Margin, Y_Margin, __width - 60, 60), IDA_FORMAT_STRING, __text, textSize, textColor, pressedTextColor, pressedTextColor, true);
82 SetElementSelectionEnabled(IDA_FORMAT_STRING, false);