3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
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
9 // http://floralicense.org/license/
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.
18 //!Internet SettingForm class
19 /*@file: IntSettingForm.h
20 *@brief: The %IntSettingForm defines settings.
24 #ifndef _INT_SETTING_FORM_H_
25 #define _INT_SETTING_FORM_H_
30 #include "IntMultipleWindowPresentationModel.h"
31 #include "IntConfirmationPopup.h"
32 #include "IntNotificationPanel.h"
35 : public Tizen::Ui::Controls::Form
36 , public Tizen::Ui::Controls::IFormBackEventListener
37 , public Tizen::Ui::Controls::IGroupedListViewItemEventListener
38 , public Tizen::Ui::Controls::IGroupedListViewItemProvider
39 , public Tizen::Ui::IActionEventListener
40 , public Tizen::Ui::IOrientationEventListener
41 , public Tizen::Ui::Scenes::ISceneEventListener
45 * @brief The Default Constructor
50 * @brief The Default Destructor
52 virtual ~SettingForm(void);
55 * @brief Initializes this SettingForm Form.
57 bool Initialize(void);
60 * @brief Initializes the controls of the UI for SettingForm.
62 result OnInitializing(void);
64 //IActionEventListener
65 void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
67 //IGroupedListViewItemProvider
68 Tizen::Ui::Controls::GroupItem* CreateGroupItem(int groupIndex, int itemWidth);
70 Tizen::Ui::Controls::ListItemBase* CreateItem(int groupIndex, int itemIndex, int itemWidth);
72 bool DeleteGroupItem(int groupIndex, Tizen::Ui::Controls::GroupItem* pItem, int itemWidth);
74 bool DeleteItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth);
76 int GetGroupCount(void);
78 int GetItemCount(int groupIndex);
80 //IGroupedListViewItemEventListener
81 void OnGroupedListViewContextItemStateChanged(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex, int itemIndex, int elementId, Tizen::Ui::Controls::ListContextItemStatus status);
83 void OnGroupedListViewItemStateChanged(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex, int itemIndex, int elementId, Tizen::Ui::Controls::ListItemStatus status);
85 void OnGroupedListViewItemSwept(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex, int itemIndex, Tizen::Ui::Controls::SweepDirection direction);
87 //IFormBackEventListener
88 void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
90 //IOrientationEventListener
91 void OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus);
94 virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
96 virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId);
98 void OnUserEventReceivedN (RequestId requestId, Tizen::Base::Collection::IList *pArgs);
101 SETTING_INVALID = -1,
102 SETTING_HOMEPAGE_TITLE = 0,
103 SETTING_CURRENT_PAGE, //1
104 SETTING_BLANK_PAGE, //2
105 SETTING_MOST_VISITED_SITE, //3
106 //SETTING_EMPTY_PAGE, //1
107 SETTING_FAVORITE_URL, //4
108 SETTING_DEFAULT_VIEW_TITLE, //5
109 SETTING_FIT_TO_WIDTH, //6
110 SETTING_READABLE, //7
111 SETTING_RUN_JAVASCRIPT, //8
112 SETTING_DISPLAY_IMAGES, //9
113 SETTING_BLOCK_POPUP, //10
114 SETTING_CLEAR_CACHE, //11
115 SETTING_CLEAR_HISTORY, //12
116 SETTING_SHOW_SECURITY_WARNINGS, //13
117 SETTING_ACCEPT_COOKIES, //14
118 SETTING_CLEAR_COOKIE_DATA, //15
119 SETTING_REMEMBER_FORM_DATA,
120 SETTING_CLEAR_FORM_DATA, //16
121 SETTING_REMEMBER_PASSWORD,
122 SETTING_CLEAR_PASSWORDS, //17
123 SETTING_SEARCH_ENGINE_TITLE, //20
124 SETTING_SEARCH_ENGINE_YAHOO, //21
125 SETTING_SEARCH_ENGINE_NAVER, //22
126 SETTING_SEARCH_ENGINE_GOOGLE, //23
127 SETTING_RESET_TO_DEFAULT, //24
132 enum SettingListItemType
134 ITEM_TYPE_NORMAL = 0,
140 class SettingItemInfo
144 * @brief The Default Constructor
146 SettingItemInfo(void);
149 * @brief The Default Destructor
151 virtual ~SettingItemInfo(void){};
154 int childCount; //only for ITEM_TYPE_DROPDOWN type items
155 bool isOpen; //true for opened and false for closed
156 bool isSelected; //only for ITEM_TYPE_RADIO && ITEM_TYPE_TOGGLE type of items
157 SettingListItemType itemType;
158 Tizen::Base::String titleText;
159 Tizen::Base::String subText;
163 int* pGroupItemCount;
164 SettingItemInfo settingInfo[SETTING_MAX];
167 * @brief Initializes this instance of settings default values.
169 void InitializeSettingValues(void);
172 * @brief Opens a popup to clear cache data.
174 void ClearCache(void);
177 * @brief Opens a popup to clear all the cookies.
179 void ClearCookie(void);
182 * @brief Opens a popup to clear all Saved Form Data.
184 void ClearFormData(void);
187 * @brief Opens a popup to clear all Saved Passwords.
189 void ClearPasswords(void);
192 * @brief Opens a popup to clear the browser history
194 void ClearHistory(void);
197 * @brief Opens a popup for resetting the default settings.
199 void ResetToDefault(void);
202 Tizen::Base::String __currentURL;
204 ConfirmationPopup* __pConfirmationPopup;
205 Tizen::Ui::Controls::GroupedListView* __pList;
206 NotificationPanel* __pNotification;
207 Tizen::Ui::Controls::Popup* __pResetPopup;
208 WindowInfo* __pWindowInfo; // Contains window information of current scene
209 bool __isCurrentPageDisable;
215 #endif /* _INT_SETTING_FORM_H_ */