sync with master
[apps/native/sample/BasicApp.git] / project / inc / MainForm.h
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://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 #ifndef _MAIN_FORM_H_
19 #define _MAIN_FORM_H_
20
21 #include <FUi.h>
22
23 class MainForm 
24         : public Tizen::Ui::Controls::Form
25         , public Tizen::Ui::IActionEventListener
26         , public Tizen::Ui::Controls::IFormBackEventListener
27 {
28 public:
29         MainForm(void);
30         virtual ~MainForm(void);
31
32         result Initialize(int panelId);
33         result CreateImagePanel(void);
34
35         virtual result OnInitializing(void);
36         virtual result OnTerminating(void);
37         virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
38         virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
39
40 private:
41         static const int ID_HEADER_ITEM1 = 101;
42         static const int ID_HEADER_ITEM2 = 102;
43         static const int ID_HEADER_ITEM3 = 103;
44         static const int ID_ORIENTATION = 200;
45
46         Tizen::Ui::Controls::Panel* __pPanel[3];
47         Tizen::Ui::Controls::Button* __pButtonOrientation;
48         Tizen::Ui::Orientation __status;
49
50         int __panelId;
51 };
52
53 #endif