Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / inc / FUiCtrl_ContextMenuModel.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 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  * @file                FUiCtrl_ContextMenuModel.h
19  * @brief               This is the header file for the _ContextMenuModel class.
20  *
21  * This header file contains the declarations of the %_ContextMenuModel class.
22  */
23 #ifndef _FUI_CTRL_INTERNAL_CONTEXTMENU_MODEL_H_
24 #define _FUI_CTRL_INTERNAL_CONTEXTMENU_MODEL_H_
25
26 #include <FBaseObject.h>
27 #include <FBaseColArrayList.h>
28 #include "FUiCtrl_ContextMenuItem.h"
29
30 namespace Tizen { namespace Ui { namespace Controls
31 {
32 /**
33  * @class _ContextMenuModel
34  * @brief
35  * @since 2.0
36  *
37  *
38  *
39  *
40  */
41
42 class _ContextMenuModel
43         : public Tizen::Base::Object
44 {
45 // Lifecycle
46 public:
47         _ContextMenuModel(void);
48         virtual ~_ContextMenuModel(void);
49
50 // Operations
51 public:
52         result Construct(void);
53         int GetItemCount(void) const;
54         _ContextMenuItem* GetItem(int index) const;
55         result AddItem(_ContextMenuItem* pItem);
56         result InsertItem(_ContextMenuItem* pItem, int index);
57         result SetItem(_ContextMenuItem* pItem, int index);
58         result RemoveItem(int index);
59         result RemoveAllItem(void);
60         void ResetAllItem(void);
61
62 private:
63         bool IsValidItem(_ContextMenuItem *pItem);
64
65 private:
66         _ContextMenuModel(const _ContextMenuModel& rhs);
67         _ContextMenuModel& operator =(const _ContextMenuModel& rhs);
68
69 // Attribute
70 private:
71         Tizen::Base::Collection::ArrayList __items;
72 }; // _ContextMenuModel
73
74 }}} // Tizen::Ui::Controls
75
76 #endif  // _FUI_CTRL_INTERNAL_CONTEXTMENU_MODEL_H_