Tizen 2.1 base
[sdk/ide/native-sample.git] / samples / native / partner / cpp / Sample / Tizen C++ / UiVisualElement / UiVisualElement / project / src / UiVisualElement.cpp
1 //
2 // Tizen C++ SDK
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 //     http://www.tizenopensource.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 #include "UiVisualElement.h"
19 #include "UiVisualElementFrame.h"
20
21 using namespace Osp::App;
22 using namespace Osp::Base;
23 using namespace Osp::System;
24 using namespace Osp::Ui;
25 using namespace Osp::Ui::Controls;
26
27 UiVisualElement::UiVisualElement(void)
28 {
29 }
30
31 UiVisualElement::~UiVisualElement(void)
32 {
33 }
34
35 UiApp*
36 UiVisualElement::CreateInstance(void)
37 {
38         return new (std::nothrow) UiVisualElement();
39 }
40
41 bool
42 UiVisualElement::OnAppInitializing(AppRegistry& appRegistry)
43 {
44         UiVisualElementFrame *pUiVisualElementFrame = new (std::nothrow) UiVisualElementFrame();
45
46         pUiVisualElementFrame->Construct();
47         pUiVisualElementFrame->SetName(L"UiVisualElement");
48
49         AddFrame(*pUiVisualElementFrame);
50
51         return true;
52 }
53
54 bool
55 UiVisualElement::OnAppInitialized(void)
56 {
57         return true;
58 }
59
60 bool
61 UiVisualElement::OnAppWillTerminate(void)
62 {
63         return true;
64 }
65
66
67 bool
68 UiVisualElement::OnAppTerminating(AppRegistry& appRegistry, bool forcedTermination)
69 {
70         return true;
71 }
72
73 void
74 UiVisualElement::OnForeground(void)
75 {
76         UiVisualElementFrame* pFrame = static_cast<UiVisualElementFrame*>(GetFrame(L"UiVisualElement"));
77         pFrame->OnForeground();
78 }
79
80 void
81 UiVisualElement::OnBackground(void)
82 {
83         UiVisualElementFrame* pFrame = static_cast<UiVisualElementFrame*>(GetFrame(L"UiVisualElement"));
84         pFrame->OnBackground();
85 }
86
87 void
88 UiVisualElement::OnLowMemory(void)
89 {
90 }
91
92 void
93 UiVisualElement::OnBatteryLevelChanged(BatteryLevel batteryLevel)
94 {
95 }
96
97 void
98 UiVisualElement::OnScreenOn (void)
99 {
100 }
101
102 void
103 UiVisualElement::OnScreenOff (void)
104 {
105 }