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.
18 /*@file: DropDownCustomItem
19 *@brief: This class defines common behaviour of Drop down custom Item.
23 #ifndef _INT_DROPDOWN_CUSTOM_ITEM_H_
24 #define _INT_DROPDOWN_CUSTOM_ITEM_H_
28 #include <FGraphics.h>
30 enum DropDownItemState
32 DROP_DOWN_ITEM_STATE_OPENED = 0,
33 DROP_DOWN__ITEM_STATE_CLOSED
36 class DropDownCustomItem
37 : public Tizen::Ui::Controls::CustomItem
42 * Initializes this instance of DropDownCustomItem.
44 result Construct(int width);
48 * @brief The Default constructor
50 DropDownCustomItem(void);
54 * @brief The Default Destructor
56 virtual ~DropDownCustomItem(void);
58 //getter and setter methods for Main Text
61 * @brief The method used to get the Title text of CustomItem
63 DropDownItemState GetCurState(void);
66 * @brief The method used to get the Title text of CustomItem
68 Tizen::Base::String GetMainText(void);
71 * @brief The method used to get the Sub text of CustomItem
73 Tizen::Base::String GetSubText(void);
76 * @brief Add all the required elements and create the Custom Item.
82 * @brief The method used to set the Title text of CustomItem
84 void SetCurState(DropDownItemState);
87 * @brief The method used to set the Title text of CustomItem
89 void SetMainText(const Tizen::Base::String& text);
92 * @brief The method used to set the Sub text of CustomItem
94 void SetSubText(const Tizen::Base::String& text);
97 static const int IDA_FORMAT_BITMAP;
98 static const int IDA_FORMAT_MAIN_STRING;
99 static const int IDA_FORMAT_SUB_STRING;
100 static const int IDA_FORMAT_DROPPER;
103 DropDownItemState __currentState;
104 int __height; ///Height of the SettingToggleCustomItem Instance
105 int __width; ///Width of the SettingToggleCustomItem Instance
107 Tizen::Base::String __mainText; ///The MainText for the Toggle Button
108 Tizen::Base::String __subText; ///The SubText for the Toggle Button
109 int __fontSize; ///fontsize from settings
112 #endif /* _INT_DROPDOWN_CUSTOM_ITEM_H_ */