2 // Copyright 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
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.SETTINGSCLEARPRIVATEDATAFORM_H_
16 //!Internet SettingsClearPrivateDataForm class
17 /*@file: IntSettingsClearPrivateDataForm.h
18 *@brief: The SettingsClearPrivateDataForm used to create private data scene
22 #ifndef _INT_SETTINGS_CLEAR_PRIVATE_DATA_FORM_H_
23 #define _INT_SETTINGS_CLEAR_PRIVATE_DATA_FORM_H_
28 using namespace Tizen::Ui;
30 class SettingsClearPrivateDataForm
31 : public Controls::Form
32 , public IActionEventListener
33 , public Controls::IFormBackEventListener
34 , public Tizen::Ui::Controls::IListViewItemProvider
35 , public Tizen::Ui::Controls::IListViewItemEventListener
36 , public Tizen::Ui::IOrientationEventListener
37 , public Tizen::Ui::Scenes::ISceneEventListener
43 SettingsClearPrivateDataForm(void);
48 virtual ~SettingsClearPrivateDataForm(void);
52 *@brief Constructing and Initializing ClearPrivateDataScene
53 *@param[in] no input parameters
54 *@retval TRUE Initialize success
55 *@retval FALSE Initialize failure
58 bool Initialize(void);
62 *@brief Used to create instances and set styles for the form content.
63 *@param[in] no input parameters
64 *@retval TRUE Initialize success
65 *@retval FALSE Initialize failure
67 virtual result OnInitializing(void);
71 *@brief Called on terminate of a form
72 *@param[in] no input parameters
73 *@retval TRUE Terminate success
74 *@retval FALSE Terminate failure
76 virtual result OnTerminating(void);
78 //IListViewItemProvider
81 *@brief Called when items need to be loaded.
82 *@param[in] index The index of the list
83 *@param[in] itemWidth The width of the element
84 *@retval no return value
86 virtual Tizen::Ui::Controls::ListItemBase* CreateItem(int index, int itemWidth);
90 *@brief Called when items need to be loaded.
91 *@param[in] index The index of the list
92 *@param[in] pItem The pointer to the item to be deleted
93 *@param[in] itemWidth The width of the element
94 *@retval no return value
96 virtual bool DeleteItem(int index, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth);
100 *@brief Called when the IconListView is about to be drawn and requests the listener to set the number of total items.
101 *@param[in] no input parameter
102 *@retval no return value
104 virtual int GetItemCount(void);
106 // IActionEventListener
108 *@name OnActionPerformed
109 *@brief Called when an action event occurs.
110 *@param[in] source The source of the event
111 *@param[in] actionId The information about the action event
112 *@retval no return value
114 virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
116 // IFormBackEventListener
118 *@name OnSceneDeactivated
119 *@brief Called when the current Form control needs to be closed to revert back to the previous Form control.
120 *@param[in] source The source of the event
121 *@retval no return value
123 virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
125 // IListViewItemEventListener
127 *@name OnListViewContextItemStateChanged
128 *@brief Called when the state of an element in the ListContextItem is changed.
129 *@param[in] listView The source of the event
130 *@param[in] index The index of the list
131 *@param[in] elementId The element ID
132 *@param[in] state The status of the element
133 *@retval no return value
135 virtual void OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListContextItemStatus state);
138 *@name OnListViewItemStateChanged
139 *@brief Called when the state of an element in the ListViewItem in the ListView or GroupedListView is changed.
140 *@param[in] listView The source of the event
141 *@param[in] index The index of the list
142 *@param[in] elementId The element ID
143 *@param[in] status The status of the element
144 *@retval no return value
146 virtual void OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListItemStatus status);
149 *@name OnListViewItemSwept
150 *@brief Called when the ListItem is swept.
151 *@param[in] listView The source of the event
152 *@param[in] index The index of the list
153 *@param[in] direction The sweep direction
154 *@retval no return value
156 virtual void OnListViewItemSwept(Tizen::Ui::Controls::ListView& listView, int index, Tizen::Ui::Controls::SweepDirection direction);
159 *@name OnListViewItemLongPressed
160 *@brief Called when the item or the element is long pressed.
161 *@param[in] listView The source of the event
162 *@param[in] index The index of the list
163 *@param[in] elementId The element ID
164 *@param[in] invokeListViewItemCallback Indicates whether to invoke ListView item callback after this method returns
165 *@retval no return value
167 virtual void OnListViewItemLongPressed(Tizen::Ui::Controls::ListView& listView, int index, int elementId, bool& invokeListViewItemCallback);
169 //IOrientationEventListener
171 *@name OnOrientationChanged
172 *@brief Called when an orientation event occurs.
173 *@param[in] source The source of the event
174 *@param[in] orientationStatus The information about the orientation event
175 *@remarks The orientation changed event is fired on %Control for which orientation mode change has been enabled by calling SetOrientation().
176 *@retval no return value
178 void OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus);
180 // ISceneEventListener
182 *@name OnSceneActivatedN
183 *@brief Called after setting as current scene.
184 *@param[in] previousSceneId The scene ID of the deactivated scene
185 *@param[in] currentSceneId The scene ID of the newly activated scene
186 *@param[in] IList A pointer to an argument list that is user-specified
187 *@retval no return value
189 virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
192 *@name OnSceneDeactivated
193 *@brief Called when the current scene is deactivated.
194 *@param[in] currentSceneId The scene ID of the scene being deactivated
195 *@param[in] nextSceneId The scene ID of the newly activated scene
196 *@param[in] IList A pointer to an argument list that is user-specified
197 *@retval no return value
199 virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId);
202 static const int IDA_FORMAT_TITLE_STRING;
203 static const int IDA_BUTTON_DELETE;
204 static const int IDA_BUTTON_CANCEL;
208 // __pList Pointer to ListView
209 Tizen::Ui::Controls::ListView* __pList;
212 #endif /* _INT_SETTINGS_CLEAR_PRIVATE_DATA_FORM_H_ */