2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
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
9 // http://floralicense.org/license/
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.
18 * @file FUiCtrl_OptionMenuImpl.h
19 * @brief This is the header file for the _OptionMenuImpl class.
22 #ifndef _FUI_CTRL_INTERNAL_OPTION_MENU_IMPL_H_
23 #define _FUI_CTRL_INTERNAL_OPTION_MENU_IMPL_H_
25 #include <FUiCtrlOptionMenu.h>
27 #include "FUiCtrl_OptionMenu.h"
28 #include "FUiCtrl_IActionEventListener.h"
29 #include "FUi_WindowImpl.h"
31 namespace Tizen { namespace Ui { namespace Controls
34 class _PublicActionEvent;
37 : public Tizen::Ui::_WindowImpl
38 , public _IActionEventListener
39 , virtual public Tizen::Base::Runtime::IEventListener
42 result AddActionEventListener(Tizen::Ui::IActionEventListener& listener);
44 result RemoveActionEventListener(Tizen::Ui::IActionEventListener& listener);
46 result AddItem(const Tizen::Base::String& text, int actionId);
48 result InsertItemAt(int mainIndex, const Tizen::Base::String& text, int actionId);
50 result SetItemAt(int mainIndex, const Tizen::Base::String& text, int actionId);
52 result RemoveItemAt(int mainIndex);
54 int GetItemCount(void) const;
56 int GetItemIndexFromActionId(int actionId) const;
58 int GetItemActionIdAt(int mainIndex) const;
60 result AddSubItem(int mainIndex, const Tizen::Base::String& text, int actionId);
62 result InsertSubItemAt(int mainIndex, int subIndex, const Tizen::Base::String& text, int actionId);
64 result SetSubItemAt(int mainIndex, int subIndex, const Tizen::Base::String& text, int actionId);
66 result RemoveSubItemAt(int mainIndex, int subIndex);
68 int GetSubItemCount(int mainIndex) const;
70 int GetSubItemIndexFromActionId(int actionId) const;
72 int GetSubItemActionIdAt(int mainIndex, int subIndex) const;
74 virtual const char* GetPublicClassName(void) const;
76 virtual const OptionMenu& GetPublic(void) const;
78 virtual OptionMenu& GetPublic(void);
80 virtual const _OptionMenu& GetCore(void) const;
82 virtual _OptionMenu& GetCore(void);
84 virtual void OnActionPerformed(const Tizen::Ui::_Control& source, int actionId);
86 virtual ~_OptionMenuImpl(void);
88 static _OptionMenuImpl* GetInstance(OptionMenu& optionMenu);
90 static const _OptionMenuImpl* GetInstance(const OptionMenu& optionMenu);
92 static _OptionMenuImpl* CreateOptionMenuImplN(OptionMenu& control);
94 virtual result OnAttachedToMainTree(void);
97 _OptionMenuImpl(OptionMenu* pPublic, _OptionMenu* pCore);
99 _OptionMenuImpl(const _OptionMenuImpl&);
101 _OptionMenuImpl& operator =(const _OptionMenuImpl&);
104 _PublicActionEvent* __pPublicActionEvent;
105 }; // _OptionMenuImpl
107 }}} // Tizen::Ui::Controls
109 #endif // _FUI_CTRL_INTERNAL_OPTION_MENU_IMPL_H_