Applied latest source code
[apps/native/preloaded/Clock.git] / inc / ClkSceneFactory.h
1 //
2 // Tizen Native SDK
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
19 /**
20  * @file     ClkSceneFactory.h
21  * @brief        SceneFactory class helps in creating appropriate forms with a specified form ID.
22  *           It Should be derived from Tizen::Ui::Scenes::IFormFactory class
23  */
24
25
26 #ifndef _CLK_SCENE_FACTORY_H_
27 #define _CLK_SCENE_FACTORY_H_
28
29 #include <FUi.h>
30 #include <FUiScenes.h>
31
32 /// Use 'extern' to eliminate duplicate data allocation.
33 extern const wchar_t* IDL_FORM_ALARM_LIST;
34 extern const wchar_t* IDL_FORM_ALARM_DELETE_LIST;
35 extern const wchar_t* IDL_FORM_CREATE_ALARM;
36 extern const wchar_t* IDL_FORM_CITY_LIST;
37 extern const wchar_t* IDL_FORM_EDIT_SNOOZE;
38 extern const wchar_t* IDL_FORM_ALARM_RINGING;
39 extern const wchar_t* IDL_FORM_WORLD_CLOCK_LIST;
40 extern const wchar_t* IDL_FORM_WORLD_CLOCK_DELETE_LIST;
41 extern const wchar_t* IDL_FORM_STOP_WATCH;
42 extern const wchar_t* IDL_FORM_TIMER_VIEW;
43 extern const wchar_t* IDL_FORM_TIMER_RINGING;
44 extern const  wchar_t* IDL_FORM_WORLD_CLOCK_REORDER ;
45 extern const wchar_t* IDL_FORM_ALARM_RINGING_LOCK;
46 extern const wchar_t* IDL_FORM_TIMER_RINGING_LOCK;
47
48 /**
49  * @class SceneFactory
50  * @brief SceneFactory 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 SceneFactory
54         : public Tizen::Ui::Scenes::IFormFactory
55         , public Tizen::Ui::Scenes::ISceneEventListener
56 {
57 public:
58         /**
59          * Default constructor
60          */
61         SceneFactory(void);
62
63         /**
64          *      Default destructor
65          */
66         virtual ~SceneFactory(void);
67
68         /**
69          * Called with a form ID and scene ID when an instance of Form control is required.
70          *
71          * @return              Pointer to a form
72          * @param[in]   formId  The ID of the form
73          * @param[in]   sceneId The ID of the scene
74          * @remarks             To work properly, the existing formId and sceneId has to be passed.
75          */
76         virtual Tizen::Ui::Controls::Form* CreateFormN(const Tizen::Base::String& formId, const Tizen::Ui::Scenes::SceneId& sceneId);
77
78         void SetFontSize(Tizen::Ui::Container& container, int font);
79
80         virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
81                                                                            const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
82
83         virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
84                                                                                 const Tizen::Ui::Scenes::SceneId& nextSceneId){}
85 };
86
87 #endif // _CLK_SCENE_FACTORY_H_