Tizen 2.1 base
[sdk/ide/native-sample.git] / samples / native / cpp / Template / Tizen C++ / Form-based Application / formapp / project / src / AppFrame.cpp
1 #include "$(projectName)Frame.h"
2 #include "$(projectName)Form.h"
3
4 using namespace Osp::Base;
5 using namespace Osp::Ui;
6 using namespace Osp::Ui::Controls;
7
8 $(projectName)Frame::$(projectName)Frame(void)
9 {
10 }
11
12 $(projectName)Frame::~$(projectName)Frame(void)
13 {
14 }
15
16 result
17 $(projectName)Frame::OnInitializing(void)
18 {
19         result r = E_SUCCESS;
20
21         // Create a form
22         $(projectName)Form* p$(projectName)Form = new $(projectName)Form();
23         p$(projectName)Form->Initialize();
24
25         // Add the form to the frame
26         AddControl(*p$(projectName)Form);
27
28         // Set the current form
29         SetCurrentForm(*p$(projectName)Form);
30
31         // Draw the form
32         p$(projectName)Form->Invalidate(true);
33
34         // TODO: Add your initialization code here
35
36         return r;
37 }
38
39 result
40 $(projectName)Frame::OnTerminating(void)
41 {
42         result r = E_SUCCESS;
43
44         // TODO: Add your termination code here
45
46         return r;
47 }
48
49