2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://floralicense.org/license/
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an AS IS BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
17 *@file: DropDownCustomItem
18 *@brief: This class defines common behaviour of Drop down custom Item.
22 #ifndef _GL_DROPDOWN_CUSTOM_ITEM_H_
23 #define _GL_DROPDOWN_CUSTOM_ITEM_H_
27 #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
41 * Initializes this instance of DropDownCustomItem.
43 result Construct(int width);
47 * @brief The Default constructor
49 DropDownCustomItem(void);
53 * @brief The Default Destructor
55 virtual ~DropDownCustomItem(void);
57 //getter and setter methods for Main Text
60 * @brief The method used to get the Title text of CustomItem
62 DropDownItemState GetCurState(void);
65 * @brief The method used to get the Title text of CustomItem
67 Tizen::Base::String GetMainText(void);
70 * @brief The method used to get the Sub text of CustomItem
72 Tizen::Base::String GetSubText(void);
75 * @brief Add all the required elements and create the Custom Item.
81 * @brief The method used to set the Title text of CustomItem
83 void SetCurState(DropDownItemState);
86 * @brief The method used to set the Title text of CustomItem
88 void SetMainText(const Tizen::Base::String& text);
91 * @brief The method used to set the Sub text of CustomItem
93 void SetSubText(const Tizen::Base::String& text);
96 static const int IDA_FORMAT_BITMAP;
97 static const int IDA_FORMAT_MAIN_STRING;
98 static const int IDA_FORMAT_SUB_STRING;
99 static const int IDA_FORMAT_DROPPER;
102 DropDownItemState __currentState;
103 int __height; ///Height of the SettingToggleCustomItem Instance
104 int __width; ///Width of the SettingToggleCustomItem Instance
106 Tizen::Base::String __mainText; ///The MainText for the Toggle Button
107 Tizen::Base::String __subText; ///The SubText for the Toggle Button
110 #endif /* _GL_DROPDOWN_CUSTOM_ITEM_H_ */