Initialize Tizen 2.3
[apps/osp/Gallery.git] / inc / GlSettingToggleCustomItem.h
1 //
2
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 //     http://floralicense.org/license/
10 //
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.
16 //
17
18 /**
19  * @file          GlSettingToggleCustomItem.h
20  * @brief         The SettingToggleCustomItem used to toggle the item.
21  */
22
23 #ifndef _INT_SETTING_TOGGLE_CUSTOM_ITEM_H_
24 #define _INT_SETTING_TOGGLE_CUSTOM_ITEM_H_
25
26 #include "GlTypes.h"
27
28 class SettingToggleCustomItem
29         : public Tizen::Ui::Controls::CustomItem
30 {
31
32 public:
33         /**
34          * @brief The Default constructor
35          */
36         SettingToggleCustomItem(void);
37
38         /**
39          * @brief The Default destructor
40          */
41         virtual ~SettingToggleCustomItem(void);
42
43         /**
44          * @brief Initializes this instance of %DropDownCustomItem.
45          *
46          * @return              An error code
47          * @param[in]   void                            An instance of the Rectangle class @n
48          *                                                                      This instance represents the x and y coordinates of the top-left corner of the created window along with
49          *                                                                      the width and height of the window.
50          * @exception   E_SUCCESS                       The method is successful.
51          * @exception   E_INVALID_STATE         This instance has already been constructed.
52          * @exception   E_INVALID_ARG       A specified input parameter is invalid.
53          * @exception   E_OUT_OF_MEMORY     The memory is insufficient.
54          * @exception   E_SYSTEM                        A system error has occurred.
55          *
56          */
57         result Construct(int width, int height);
58
59         //getter and setter methods for text
60
61         /**
62          * @brief The method used to get the text of CustomItem
63          *
64          * @return              A String
65          */
66         Tizen::Base::String GetText(void) const;
67
68         /**
69          * @brief Add all the required elements and create the Custom Item.
70          *
71          * @return              An error code
72          * @param[in]   void                            An instance of the Rectangle class @n
73          *                                                                      This instance represents the x and y coordinates of the top-left corner of the created window along with
74          *                                                                      the width and height of the window.
75          * @exception   E_SUCCESS                       The method is successful.
76          * @exception   E_INVALID_STATE         This instance has already been constructed.
77          * @exception   E_INVALID_ARG       A specified input parameter is invalid.
78          * @exception   E_OUT_OF_MEMORY     The memory is insufficient.
79          * @exception   E_SYSTEM                        A system error has occurred.
80          *
81          */
82         result Make(int fontSize);
83
84         /**
85          * @brief The method used to set the text of CustomItem
86          */
87
88         void SetText(const Tizen::Base::String& text);
89
90 private:
91         int __width;                ///Width of the SettingToggleCustomItem Instance
92         int __height;               ///Height of the SettingToggleCustomItem Instance
93         Tizen::Base::String __text;   ///The Text for the Toggle Button
94 };
95
96 #endif /* _INT_SETTING_TOGGLE_CUSTOM_ITEM_H_ */