merge with master
[apps/osp/Internet.git] / inc / IntSettingClearPrivateDataForm.h
1 \r
2 // Copyright   2012 Samsung Electronics Co., Ltd.\r
3 //\r
4 // Licensed under the Apache License, Version 2.0 (the License);\r
5 // you may not use this file except in compliance with the License.\r
6 // You may obtain a copy of the License at\r
7 //\r
8 //     http://www.apache.org/licenses/LICENSE-2.0\r
9 //\r
10 // Unless required by applicable law or agreed to in writing, software\r
11 // distributed under the License is distributed on an "AS IS" BASIS,\r
12 // WITHOUT  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
13 // See the License for the specific language governing permissions and\r
14 // limitations under the License.SETTINGSCLEARPRIVATEDATAFORM_H_\r
15 //\r
16 //!Internet SettingsClearPrivateDataForm class\r
17 /*@file:        IntSettingsClearPrivateDataForm.h\r
18  *@brief:       The SettingsClearPrivateDataForm used to create private data scene\r
19  *\r
20  */\r
21 \r
22 #ifndef _INT_SETTINGS_CLEAR_PRIVATE_DATA_FORM_H_\r
23 #define _INT_SETTINGS_CLEAR_PRIVATE_DATA_FORM_H_\r
24 \r
25 #include <FBase.h>\r
26 #include <FUi.h>\r
27 \r
28 using namespace Tizen::Ui;\r
29 \r
30 class SettingsClearPrivateDataForm\r
31         : public Controls::Form\r
32         , public IActionEventListener\r
33     , public Controls::IFormBackEventListener\r
34         , public Tizen::Ui::Controls::IListViewItemProvider\r
35         , public Tizen::Ui::Controls::IListViewItemEventListener\r
36         , public Tizen::Ui::IOrientationEventListener\r
37         , public Tizen::Ui::Scenes::ISceneEventListener\r
38 {\r
39 public:\r
40         /**\r
41         * Default constructor\r
42         */\r
43         SettingsClearPrivateDataForm(void);\r
44 \r
45         /**\r
46         * Default destructor\r
47         */\r
48         virtual ~SettingsClearPrivateDataForm(void);\r
49 \r
50         /**\r
51          *@name         Initialize\r
52          *@brief        Constructing and Initializing ClearPrivateDataScene\r
53          *@param[in]    no input parameters\r
54          *@retval               TRUE Initialize success\r
55          *@retval           FALSE Initialize failure\r
56          *\r
57          */\r
58         bool Initialize(void);\r
59 \r
60         /**\r
61          *@name         OnInitializing\r
62          *@brief        Used to create instances and set styles for the form content.\r
63          *@param[in]    no input parameters\r
64          *@retval               TRUE Initialize success\r
65          *@retval           FALSE Initialize failure\r
66          */\r
67         virtual result OnInitializing(void);\r
68 \r
69         /**\r
70          *@name         OnTerminating\r
71          *@brief        Called on terminate of a form\r
72          *@param[in]    no input parameters\r
73          *@retval               TRUE Terminate success\r
74          *@retval           FALSE Terminate failure\r
75          */\r
76         virtual result OnTerminating(void);\r
77 \r
78         //IListViewItemProvider\r
79         /**\r
80          *@name         CreateItem\r
81          *@brief        Called when items need to be loaded.\r
82          *@param[in]    index           The index of the list\r
83          *@param[in]    itemWidth       The width of the element\r
84          *@retval               no return value\r
85          */\r
86         virtual Tizen::Ui::Controls::ListItemBase* CreateItem(int index, int itemWidth);\r
87 \r
88         /**\r
89          *@name         DeleteItem\r
90          *@brief        Called when items need to be loaded.\r
91          *@param[in]    index           The index of the list\r
92          *@param[in]    pItem           The pointer to the item to be deleted\r
93          *@param[in]    itemWidth       The width of the element\r
94          *@retval               no return value\r
95          */\r
96         virtual bool DeleteItem(int index, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth);\r
97 \r
98         /**\r
99          *@name         GetItemCount\r
100          *@brief        Called when the IconListView is about to be drawn and requests the listener to set the number of total items.\r
101          *@param[in]    no input parameter\r
102          *@retval               no return value\r
103          */\r
104         virtual int GetItemCount(void);\r
105 \r
106         // IActionEventListener\r
107         /**\r
108          *@name         OnActionPerformed\r
109          *@brief        Called when an action event occurs.\r
110          *@param[in]    source      The source of the event\r
111          *@param[in]    actionId        The information about the action event\r
112          *@retval               no return value\r
113          */\r
114         virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);\r
115 \r
116         // IFormBackEventListener\r
117         /**\r
118          *@name         OnSceneDeactivated\r
119          *@brief        Called when the current Form control needs to be closed to revert back to the previous Form control.\r
120          *@param[in]    source  The source of the event\r
121          *@retval               no return value\r
122          */\r
123         virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);\r
124 \r
125         // IListViewItemEventListener\r
126         /**\r
127          *@name         OnListViewContextItemStateChanged\r
128          *@brief        Called when the state of an element in the ListContextItem is changed.\r
129          *@param[in]    listView    The source of the event\r
130          *@param[in]    index           The index of the list\r
131          *@param[in]    elementId       The element ID\r
132          *@param[in]    state           The status of the element\r
133          *@retval               no return value\r
134          */\r
135         virtual void OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListContextItemStatus state);\r
136 \r
137         /**\r
138          *@name         OnListViewItemStateChanged\r
139          *@brief        Called when the state of an element in the ListViewItem in the ListView or GroupedListView is changed.\r
140          *@param[in]    listView    The source of the event\r
141          *@param[in]    index           The index of the list\r
142          *@param[in]    elementId       The element ID\r
143          *@param[in]    status          The status of the element\r
144          *@retval               no return value\r
145          */\r
146         virtual void OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListItemStatus status);\r
147 \r
148         /**\r
149          *@name         OnListViewItemSwept\r
150          *@brief        Called when the ListItem is swept.\r
151          *@param[in]    listView    The source of the event\r
152          *@param[in]    index           The index of the list\r
153          *@param[in]    direction       The sweep direction\r
154          *@retval               no return value\r
155          */\r
156         virtual void OnListViewItemSwept(Tizen::Ui::Controls::ListView& listView, int index, Tizen::Ui::Controls::SweepDirection direction);\r
157 \r
158         /**\r
159          *@name         OnListViewItemLongPressed\r
160          *@brief        Called when the item or the element is long pressed.\r
161          *@param[in]    listView    The source of the event\r
162          *@param[in]    index           The index of the list\r
163          *@param[in]    elementId       The element ID\r
164          *@param[in]    invokeListViewItemCallback      Indicates whether to invoke ListView item callback after this method returns\r
165          *@retval               no return value\r
166          */\r
167         virtual void OnListViewItemLongPressed(Tizen::Ui::Controls::ListView& listView, int index, int elementId, bool& invokeListViewItemCallback);\r
168 \r
169         //IOrientationEventListener\r
170         /**\r
171          *@name         OnOrientationChanged\r
172          *@brief                Called when an orientation event occurs.\r
173          *@param[in]   source                           The source of the event\r
174          *@param[in]   orientationStatus        The information about the orientation event\r
175          *@remarks              The orientation changed event is fired on %Control for which orientation mode change has been enabled by calling SetOrientation().\r
176          *@retval               no return value\r
177          */\r
178         void OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus);\r
179 \r
180         // ISceneEventListener\r
181         /**\r
182          *@name         OnSceneActivatedN\r
183          *@brief        Called after setting as current scene.\r
184          *@param[in]    previousSceneId     The scene ID of the deactivated scene\r
185          *@param[in]    currentSceneId          The scene ID of the newly activated scene\r
186          *@param[in]    IList A pointer to an argument list that is user-specified\r
187          *@retval               no return value\r
188          */\r
189         virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);\r
190 \r
191         /**\r
192          *@name         OnSceneDeactivated\r
193          *@brief        Called when the current scene is deactivated.\r
194          *@param[in]    currentSceneId  The scene ID of the scene being deactivated\r
195          *@param[in]    nextSceneId             The scene ID of the newly activated scene\r
196          *@param[in]    IList A pointer to an argument list that is user-specified\r
197          *@retval               no return value\r
198          */\r
199         virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId);\r
200 \r
201 protected:\r
202         static const int IDA_FORMAT_TITLE_STRING;\r
203         static const int IDA_BUTTON_DELETE;\r
204         static const int IDA_BUTTON_CANCEL;\r
205 \r
206 private:\r
207         int __clearItem;\r
208         // __pList Pointer to ListView\r
209         Tizen::Ui::Controls::ListView* __pList;\r
210 };\r
211 \r
212 #endif /* _INT_SETTINGS_CLEAR_PRIVATE_DATA_FORM_H_ */\r