Tizen 2.1 base
[sdk/ide/native-sample.git] / samples / native / cpp / Sample / Tizen C++ / UiFrame / UiFrame / project / inc / UiFrameForm.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://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 #ifndef _UI_FRAME_FORM_H_
19 #define _UI_FRAME_FORM_H_
20
21 #include <FBase.h>
22 #include <FUi.h>
23
24 class LabelTouchEventListener;
25
26 class UiFrameForm
27         : public Osp::Ui::Controls::Form
28         , public Osp::Ui::IActionEventListener
29         , public Osp::Ui::IOrientationEventListener
30         , public Osp::Ui::Controls::IFormBackEventListener
31 {
32 public:
33         UiFrameForm(void);
34         virtual ~UiFrameForm(void);
35
36         bool Initialize(void);
37
38         virtual result OnInitializing(void);
39         virtual result OnTerminating(void);
40         virtual void OnFormBackRequested(Osp::Ui::Controls::Form& source);
41         virtual void OnActionPerformed(const Osp::Ui::Control& source, int actionId);
42         virtual void OnOrientationChanged(const Osp::Ui::Control &source, Osp::Ui::OrientationStatus orientationStatus);
43
44         void UpdateInfo(bool move = false);
45
46 private:
47         void Minimize(void);
48         void Restore(void);
49         void SetHeader(void);
50         void UpdateFrameBounds(void);
51
52 private:
53         Osp::Ui::Controls::Panel* __pPanel;
54         Osp::Ui::Controls::Label* __pLabelMode;
55         Osp::Ui::Controls::Label* __pLabelPos;
56         Osp::Ui::Controls::Label* __pLabelSize;
57         Osp::Ui::Controls::Label* __pLabelMoveFrame;
58         Osp::Ui::Controls::Button* __pButton;
59
60         LabelTouchEventListener* __pLabelTouchListener;
61 }; // UiFrameForm
62
63 #endif // _UI_FRAME_FORM_H_