Tizen 2.1 base
[apps/native/sample/FaceTracker.git] / project / src / FaceTrackerFrame.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 "FaceTrackerFrame.h"
19 #include "FaceTrackerForm.h"
20
21 using namespace Tizen::Base;
22 using namespace Tizen::Ui;
23 using namespace Tizen::Ui::Controls;
24
25 FaceTrackerFrame::FaceTrackerFrame(void)
26 {
27 }
28
29 FaceTrackerFrame::~FaceTrackerFrame(void)
30 {
31 }
32
33 result
34 FaceTrackerFrame::OnInitializing(void)
35 {
36         result r = E_SUCCESS;
37
38         // Create a form
39         FaceTrackerForm* pFaceTrackerForm = new (std::nothrow) FaceTrackerForm();
40         TryReturn(pFaceTrackerForm != null, E_FAILURE, "Failed to create FaceTrackerForm");
41         pFaceTrackerForm->Initialize();
42
43         // Add the form to the frame
44         AddControl(*pFaceTrackerForm);
45
46         // Set the current form
47         SetCurrentForm(*pFaceTrackerForm);
48
49         // Draw the form
50         pFaceTrackerForm->Invalidate(true);
51
52         return r;
53 }
54
55 result
56 FaceTrackerFrame::OnTerminating(void)
57 {
58         return E_SUCCESS;
59 }
60
61