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);
100 SETTING_HOMEPAGE_TITLE = 0,
101 SETTING_CURRENT_PAGE, //1
102 SETTING_BLANK_PAGE, //2
103 SETTING_MOST_VISITED_SITE, //3
104 //SETTING_EMPTY_PAGE, //1
105 SETTING_FAVORITE_URL, //4
106 SETTING_DEFAULT_VIEW_TITLE, //5
107 SETTING_FIT_TO_WIDTH, //6
108 SETTING_READABLE, //7
109 SETTING_RUN_JAVASCRIPT, //8
110 SETTING_DISPLAY_IMAGES, //9
111 SETTING_BLOCK_POPUP, //10
112 SETTING_CLEAR_CACHE, //11
113 SETTING_CLEAR_HISTORY, //12
114 SETTING_SHOW_SECURITY_WARNINGS, //13
115 SETTING_ACCEPT_COOKIES, //14
116 SETTING_CLEAR_COOKIE_DATA, //15
117 SETTING_REMEMBER_FORM_DATA,
118 SETTING_CLEAR_FORM_DATA, //16
119 SETTING_REMEMBER_PASSWORD,
120 SETTING_CLEAR_PASSWORDS, //17
121 SETTING_SEARCH_ENGINE_TITLE, //20
122 SETTING_SEARCH_ENGINE_YAHOO, //21
123 SETTING_SEARCH_ENGINE_NAVER, //22
124 SETTING_SEARCH_ENGINE_GOOGLE, //23
125 SETTING_RESET_TO_DEFAULT, //24
130 enum SettingListItemType
132 ITEM_TYPE_NORMAL = 0,
138 class SettingItemInfo
142 * @brief The Default Constructor
144 SettingItemInfo(void);
147 * @brief The Default Destructor
149 virtual ~SettingItemInfo(void){};
152 int childCount; //only for ITEM_TYPE_DROPDOWN type items
153 bool isOpen; //true for opened and false for closed
154 bool isSelected; //only for ITEM_TYPE_RADIO && ITEM_TYPE_TOGGLE type of items
155 SettingListItemType itemType;
156 Tizen::Base::String titleText;
157 Tizen::Base::String subText;
161 int* pGroupItemCount;
162 SettingItemInfo settingInfo[SETTING_MAX];
165 * @brief Initializes this instance of settings default values.
167 void InitializeSettingValues(void);
170 * @brief Opens a popup to clear cache data.
172 void ClearCache(void);
175 * @brief Opens a popup to clear all the cookies.
177 void ClearCookie(void);
180 * @brief Opens a popup to clear all Saved Form Data.
182 void ClearFormData(void);
185 * @brief Opens a popup to clear all Saved Passwords.
187 void ClearPasswords(void);
190 * @brief Opens a popup to clear the browser history
192 void ClearHistory(void);
195 * @brief Opens a popup for resetting the default settings.
197 void ResetToDefault(void);
200 Tizen::Base::String __currentURL;
202 ConfirmationPopup* __pConfirmationPopup;
203 Tizen::Ui::Controls::GroupedListView* __pList;
204 NotificationPanel* __pNotification;
205 Tizen::Ui::Controls::Popup* __pResetPopup;
206 WindowInfo* __pWindowInfo; // Contains window information of current scene
207 bool __isCurrentPageDisable;
213 #endif /* _INT_SETTING_FORM_H_ */