Tizen 2.0 Release
[apps/osp/Internet.git] / inc / IntRadioCustomItem.h
1 //
2
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
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
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 //!Internet RadioCustomItem class
19 /*@file:         IntRadioCustomItem.h
20  *@brief:        The %IntRadioCustomItem defines radio custom item.
21  *
22  */
23
24 #ifndef _INT_RADIO_CUSTOM_ITEM_H_
25 #define _INT_RADIO_CUSTOM_ITEM_H_
26
27 #include <FBase.h>
28 #include <FGraphics.h>
29 #include "IntTypes.h"
30
31 class RadioCustomItem
32         : public Tizen::Ui::Controls::CustomItem
33 {
34 public:
35         /**
36          * @brief               The Default Constructor
37          */
38         RadioCustomItem(void);
39
40         /**
41          * @brief               The Default Destructor
42          */
43         virtual ~RadioCustomItem(void);
44
45         /**
46          * @brief               Initializes this instance of %DropDownCustomItem.
47          *
48          * @return              An error code
49          * @param[in]   width                           The width of the Custom Item
50          * @param[in]   height                          The height of the Custom Item
51          * @exception   E_SUCCESS                       The method is successful.
52          * @exception   E_INVALID_STATE         This instance has already been constructed.
53          * @exception   E_INVALID_ARG       A specified input parameter is invalid.
54          * @exception   E_OUT_OF_MEMORY     The memory is insufficient.
55          * @exception   E_SYSTEM                        A system error has occurred.
56          *
57          */
58         result Construct(int width, int height);
59
60         //getter and setter methods for Text
61
62         /**
63          * @brief               The method used to get the text of CustomItem
64          * @return              An error code
65          */
66         Tizen::Base::String GetText(void);
67
68         /**
69          * @brief               The method used to get selection state of the Radio Button
70          * @return              True if selected or false if unselected
71          */
72         bool GetSelected(void);
73
74
75         /**
76          * @brief               Add all the required elements and create the Custom Item.
77          *
78          * @return              An error code
79          * @param[in]   void                            An instance of the Rectangle class @n
80          *                                                                      This instance represents the x and y coordinates of the top-left corner of the created window along with
81          *                                                                      the width and height of the window.
82          * @exception   E_SUCCESS                       The method is successful.
83          * @exception   E_INVALID_STATE         This instance has already been constructed.
84          * @exception   E_INVALID_ARG       A specified input parameter is invalid.
85          * @exception   E_OUT_OF_MEMORY     The memory is insufficient.
86          * @exception   E_SYSTEM                        A system error has occurred.
87          *
88          */
89         result Make(void);
90
91         /**
92          * @brief               The method used to set the text of CustomItem
93          * @return              An error code
94          */
95         void SetText(Tizen::Base::String& text);
96
97         /**
98          * @brief               The method used to set the selection state of the Radio Button
99          * @return              void
100          */
101         void SetSelected(bool selectedValue);
102
103 protected:
104         static const int IDA_FORMAT_STRING;
105         static const int IDA_FORMAT_RADIO_BUTTON;
106
107 private:
108         bool __isSelected;
109         int __height;               ///Height of the SettingToggleCustomItem Instance
110         Tizen::Base::String __text;   ///The Text for the Toggle Button
111         int __width;                ///Width of the SettingToggleCustomItem Instance
112 };
113
114 #endif /* _INT_RADIO_CUSTOM_ITEM_H_ */