Tizen 2.1 base
[sdk/ide/native-sample.git] / samples / native / partner / cpp / Sample / Tizen C++ / DictionaryDataControl / DictionaryDataControl / project / inc / BaseForm.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 _BASE_FORM_H_
19 #define _BASE_FORM_H_
20
21 #include <FBase.h>
22 #include <FApp.h>
23 #include <FIo.h>
24 #include <FGraphics.h>
25 #include <FUi.h>
26
27
28 class BaseForm
29         : public Osp::Ui::Controls::Form
30         , public Osp::Ui::Controls::IFormBackEventListener
31         , public Osp::Ui::Controls::IListViewItemEventListener
32 {
33 public:
34         BaseForm(void);
35         virtual ~BaseForm(void);
36         virtual result OnInitializing(void);
37         virtual void OnFormBackRequested(Osp::Ui::Controls::Form& source);
38         virtual void OnUserEventReceivedN(RequestId requestId, Osp::Base::Collection::IList* pArgs);
39
40         // IListViewItemEventListener
41         virtual void OnListViewContextItemStateChanged(Osp::Ui::Controls::ListView& listView, int index, int elementId, Osp::Ui::Controls::ListContextItemStatus state);
42         virtual void OnListViewItemStateChanged(Osp::Ui::Controls::ListView& listView, int index, int elementId, Osp::Ui::Controls::ListItemStatus status);
43         virtual void OnListViewItemSwept(Osp::Ui::Controls::ListView& listView, int index, Osp::Ui::Controls::SweepDirection direction);
44
45         void EnableSoftKey(Osp::Ui::Controls::Form* pForm, Osp::Ui::Controls::Form* pParentForm = null);
46
47         bool InitList(void);
48
49 protected:
50         Osp::Ui::Controls::Form* _pFormMgr;
51         Osp::Base::Collection::Queue _quData;
52         static const int ID_FORMAT_STRING = 500;
53
54 private:
55         Osp::Ui::Controls::Form* __pParentForm;
56 };
57
58 #endif // _BASE_FORM_H_