3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
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
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"
34 : public Tizen::Ui::Controls::Form
35 , public Tizen::Ui::Controls::IFormBackEventListener
36 , public Tizen::Ui::Controls::IGroupedListViewItemEventListener
37 , public Tizen::Ui::Controls::IGroupedListViewItemProvider
38 , public Tizen::Ui::IActionEventListener
39 , public Tizen::Ui::IOrientationEventListener
40 , public Tizen::Ui::Scenes::ISceneEventListener
44 * @brief The Default Constructor
49 * @brief The Default Destructor
51 virtual ~SettingForm(void);
54 * @brief Initializes this SettingForm Form.
56 bool Initialize(void);
59 * @brief Initializes the controls of the UI for SettingForm.
61 result OnInitializing(void);
63 //IActionEventListener
64 void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
66 //IGroupedListViewItemProvider
67 Tizen::Ui::Controls::GroupItem* CreateGroupItem(int groupIndex, int itemWidth);
69 Tizen::Ui::Controls::ListItemBase* CreateItem(int groupIndex, int itemIndex, int itemWidth);
71 bool DeleteGroupItem(int groupIndex, Tizen::Ui::Controls::GroupItem* pItem, int itemWidth);
73 bool DeleteItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth);
75 int GetGroupCount(void);
77 int GetItemCount(int groupIndex);
79 //IGroupedListViewItemEventListener
80 void OnGroupedListViewContextItemStateChanged(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex, int itemIndex, int elementId, Tizen::Ui::Controls::ListContextItemStatus status);
82 void OnGroupedListViewItemStateChanged(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex, int itemIndex, int elementId, Tizen::Ui::Controls::ListItemStatus status);
84 void OnGroupedListViewItemSwept(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex, int itemIndex, Tizen::Ui::Controls::SweepDirection direction);
86 //IFormBackEventListener
87 void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
89 //IOrientationEventListener
90 void OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus);
93 virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
95 virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId);
99 SETTING_HOMEPAGE_TITLE = 0,
100 SETTING_CURRENT_PAGE, //1
101 SETTING_BLANK_PAGE, //2
102 SETTING_MOST_VISITED_SITE, //3
103 //SETTING_EMPTY_PAGE, //1
104 SETTING_FAVORITE_URL, //4
105 SETTING_DEFAULT_VIEW_TITLE, //5
106 SETTING_FIT_TO_WIDTH, //6
107 SETTING_READABLE, //7
108 SETTING_RUN_JAVASCRIPT, //8
109 SETTING_DISPLAY_IMAGES, //9
110 SETTING_BLOCK_POPUP, //10
111 SETTING_CLEAR_CACHE, //11
112 SETTING_CLEAR_HISTORY, //12
113 SETTING_SHOW_SECURITY_WARNINGS, //13
114 SETTING_ACCEPT_COOKIES, //14
115 SETTING_CLEAR_COOKIE_DATA, //15
116 SETTING_CLEAR_FORM_DATA, //16
117 SETTING_CLEAR_PASSWORDS, //17
118 SETTING_SEARCH_ENGINE_TITLE, //20
119 SETTING_SEARCH_ENGINE_YAHOO, //21
120 SETTING_SEARCH_ENGINE_NAVER, //22
121 SETTING_SEARCH_ENGINE_GOOGLE, //23
122 SETTING_RESET_TO_DEFAULT, //24
127 enum SettingListItemType
129 ITEM_TYPE_NORMAL = 0,
135 class SettingItemInfo
139 * @brief The Default Constructor
141 SettingItemInfo(void);
144 * @brief The Default Destructor
146 virtual ~SettingItemInfo(void){};
149 int childCount; //only for ITEM_TYPE_DROPDOWN type items
150 bool isOpen; //true for opened and false for closed
151 bool isSelected; //only for ITEM_TYPE_RADIO && ITEM_TYPE_TOGGLE type of items
152 SettingListItemType itemType;
153 Tizen::Base::String titleText;
154 Tizen::Base::String subText;
158 int* pGroupItemCount;
159 SettingItemInfo settingInfo[SETTING_MAX];
162 * @brief Initializes this instance of settings default values.
164 void InitializeSettingValues(void);
167 * @brief Opens a popup to clear cache data.
169 void ClearCache(void);
172 * @brief Opens a popup to clear all the cookies.
174 void ClearCookie(void);
177 * @brief Opens a popup to clear all Saved Form Data.
179 void ClearFormData(void);
182 * @brief Opens a popup to clear all Saved Passwords.
184 void ClearPasswords(void);
187 * @brief Opens a popup to clear the browser history
189 void ClearHistory(void);
192 * @brief Opens a popup for resetting the default settings.
194 void ResetToDefault(void);
197 Tizen::Base::String __currentURL;
199 ConfirmationPopup* __pConfirmationPopup;
200 Tizen::Ui::Controls::GroupedListView* __pList;
201 Tizen::Ui::Controls::Popup* __pResetPopup;
202 WindowInfo* __pWindowInfo; // Contains window information of current scene
203 bool __isCurrentPageDisable;
208 #endif /* _INT_SETTING_FORM_H_ */