Initialize Tizen 2.3
[apps/osp/Contacts.git] / src / CtSceneRegister.cpp
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Flora License, Version 1.1 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //     http://floralicense.org/license/
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an AS IS BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16
17 /**
18  * @file        CtSceneRegister.cpp
19  * @brief       This is the implementation file for the SceneRegister class.
20  */
21
22 #include <FUi.h>
23 #include "CtFormFactory.h"
24 #include "CtPanelFactory.h"
25 #include "CtSceneRegister.h"
26 #include "CtTypes.h"
27
28 using namespace Tizen::Ui::Scenes;
29
30 SceneRegister::SceneRegister()
31 {
32 }
33
34 SceneRegister::~SceneRegister()
35 {
36 }
37
38 result
39 SceneRegister::RegisterAllScenes(void)
40 {
41         result r = E_SUCCESS;
42
43         static const wchar_t* PANEL_BLANK = L"";
44         static FormFactory formFactory;
45         static PanelFactory panelFactory;
46
47         SceneManager* pSceneManager = SceneManager::GetInstance();
48         r |= pSceneManager->RegisterFormFactory(formFactory);
49         r |= pSceneManager->RegisterPanelFactory(panelFactory);
50         r |= pSceneManager->RegisterScene(IDSCN_CONTACT_LIST, IDC_FORM_MAIN, IDC_PANEL_CONTACT_LIST);
51         r |= pSceneManager->RegisterScene(IDSCN_CONTACT_LIST_EDITOR, IDC_FORM_MAIN, IDC_PANEL_CONTACT_LIST_EDITOR);
52         r |= pSceneManager->RegisterScene(IDSCN_CONTACT_DETAILS, IDC_FORM_CONTACT_DETAILS, PANEL_BLANK);
53         r |= pSceneManager->RegisterScene(IDSCN_CONTACT_EDITOR, IDC_FORM_CONTACT_EDITOR, PANEL_BLANK);
54         r |= pSceneManager->RegisterScene(IDSCN_CONTACT_SELECTOR, IDC_FORM_CONTACT_SELECTOR, PANEL_BLANK);
55         r |= pSceneManager->RegisterScene(IDSCN_GROUP_LIST, IDC_FORM_MAIN, IDC_PANEL_GROUP_LIST);
56         r |= pSceneManager->RegisterScene(IDSCN_GROUP_LIST_EDITOR, IDC_FORM_MAIN, IDC_PANEL_GROUP_LIST_EDITOR);
57         r |= pSceneManager->RegisterScene(IDSCN_GROUP_SELECTOR, IDC_FORM_GROUP_SELECTOR, PANEL_BLANK);
58         r |= pSceneManager->RegisterScene(IDSCN_GROUP_EDITOR, IDC_FORM_GROUP_EDITOR, PANEL_BLANK);
59         r |= pSceneManager->RegisterScene(IDSCN_GROUP_CONTACT_LIST, IDC_FORM_GROUP_CONTACT_LIST, PANEL_BLANK);
60         r |= pSceneManager->RegisterScene(IDSCN_GROUP_CONTACT_LIST_EDITOR, IDC_FORM_GROUP_CONTACT_LIST_EDITOR, PANEL_BLANK);
61         r |= pSceneManager->RegisterScene(IDSCN_SETTINGS, IDC_FORM_SETTINGS, PANEL_BLANK);
62         r |= pSceneManager->RegisterScene(IDSCN_FAVORITE_LIST, IDC_FORM_MAIN, IDC_PANEL_FAVORITE_LIST);
63         r |= pSceneManager->RegisterScene(IDSCN_FAVORITE_LIST_EDITOR, IDC_FORM_MAIN, IDC_PANEL_FAVORITE_LIST_EDITOR);
64
65         return r;
66 }
67
68
69
70
71
72