3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
\r
5 // Licensed under the Flora License, Version 1.0 (the License);
\r
6 // you may not use this file except in compliance with the License.
\r
7 // You may obtain a copy of the License at
\r
9 // http://floralicense.org/license/
\r
11 // Unless required by applicable law or agreed to in writing, software
\r
12 // distributed under the License is distributed on an AS IS BASIS,
\r
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
14 // See the License for the specific language governing permissions and
\r
15 // limitations under the License.
\r
18 //!Internet SettingToggleCustomItem class
\r
19 /*@file: SettingToggleCustomItem.cpp
\r
20 *@brief: The SettingToggleCustomItem
\r
24 #include <FUiControls.h>
\r
26 #include "IntSettingToggleCustomItem.h"
\r
28 using namespace Tizen::App;
\r
29 using namespace Tizen::Base;
\r
30 using namespace Tizen::Graphics;
\r
31 using namespace Tizen::Ui::Controls;
\r
33 static const int IDA_FORMAT_STRING = 101;
\r
35 SettingToggleCustomItem::SettingToggleCustomItem(void)
\r
42 SettingToggleCustomItem::~SettingToggleCustomItem(void)
\r
48 SettingToggleCustomItem::Construct(int width, int height)
\r
50 result r = E_FAILURE;
\r
54 const Dimension dim(width, height);
\r
55 r = CustomItem::Construct(dim, LIST_ANNEX_STYLE_ONOFF_SLIDING);
\r
61 SettingToggleCustomItem::SetText(Tizen::Base::String& text)
\r
67 SettingToggleCustomItem::GetText(void)
\r
73 SettingToggleCustomItem::Make(void)
\r
75 const Color textColor = CUSTOM_COLOR_TRANSPARENT;
\r
76 const Color pressedTextColor = CUSTOM_COLOR_TRANSPARENT;
\r
77 const int X_Margin = 26;
\r
78 const int Y_Margin = 26;
\r
79 const int textSize = 40;
\r
81 AddElement(Rectangle(X_Margin, Y_Margin, __width - 180, 60), IDA_FORMAT_STRING, __text, textSize, textColor, pressedTextColor, pressedTextColor, true);
\r
82 SetElementSelectionEnabled(IDA_FORMAT_STRING, false);
\r