Fixed Nabi Issues 49466,55718,55225,52332
[apps/osp/Internet.git] / inc / IntFormFactory.h
1 //
2
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 //     http://floralicense.org/license/
10 //
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.
16 //
17
18 //!Internet
19 /*@file:    IntFormFactory.h
20  *@brief: FormFactory class helps in creating appropriate forms with a specified form ID.
21  *        It Should be derived from Tizen::Ui::Scenes::IFormFactory class
22  */
23
24
25 #ifndef _INT_SCENE_FACTORY_H_
26 #define _INT_SCENE_FACTORY_H_
27
28 #include <FUi.h>
29
30 /// Use 'extern' to eliminate duplicate data allocation.
31 extern const wchar_t* IDL_FORM_MAIN_VIEW_SCENE;
32 extern const wchar_t* IDL_FORM_HISTORY_LIST_SCENE;
33 extern const wchar_t* IDL_FORM_FIND_WORD_SCENE;
34 extern const wchar_t* IDL_FORM_EDIT_HISTORY_LIST_SCENE;
35 extern const wchar_t* IDL_FORM_SETTINGS_CLEAR_PRIVATE_DATA_SCENE;
36 extern const wchar_t* IDL_FORM_MULTIPLE_WINDOW_SCENE;
37 extern const wchar_t* IDL_FORM_MULTIPLE_WINDOW_GRID_SCENE;
38 extern const wchar_t* IDL_FORM_SETTINGS_SCENE;
39 extern const wchar_t* IDL_FORM_ADD_BOOKMARK_SCENE;
40 extern const wchar_t* IDL_FORM_BOOKMARK_LIST_SCENE;
41 extern const wchar_t* IDL_FORM_ARTICLE_READER_SCENE;
42 extern const wchar_t* IDL_FORM_EDIT_BOOKMARK_LIST_SCENE;
43 extern const wchar_t* IDL_FORM_CREATE_BOOKMARK_FOLDER_SCENE;
44 extern const wchar_t* IDL_FORM_FONT_SIZE_SCENE;
45 extern const wchar_t* IDL_FORM_EDIT_HOME_PAGE_SCENE;
46 extern const wchar_t* IDL_FORM_BRIGHTNESS_SCENE;
47
48 /**
49  * @class FormFactory
50  * @brief FormFactory class helps in creating appropriate forms with a specified form ID.
51  *        It Should be derived from Tizen::Ui::Scenes::IFormFactory class
52  */
53 class FormFactory
54         : public Tizen::Ui::Scenes::IFormFactory
55         , public Tizen::Ui::Scenes::ISceneEventListener
56 {
57 public:
58         /**
59          * Default constructor
60          */
61         FormFactory(void);
62         /**
63          *      Default destructor
64          */
65         virtual ~FormFactory(void);
66
67         /**
68          * Called with a form ID and scene ID when an instance of Form control is required.
69          *
70          * @return              Pointer to a form
71          * @param[in]   formId  The ID of the form
72          * @param[in]   sceneId The ID of the scene
73          * @remarks             To work properly, the existing formId and sceneId has to be passed.
74          */
75         virtual Tizen::Ui::Controls::Form* CreateFormN(const Tizen::Base::String& formId, const Tizen::Ui::Scenes::SceneId& sceneId);
76         void SetFontSize(Tizen::Ui::Container& container, int font);
77
78         virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
79                         const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
80
81         virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
82                         const Tizen::Ui::Scenes::SceneId& nextSceneId){}
83 };
84
85 #endif // _INT_SCENE_FACTORY_H_