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.
19 * @file FUiCtrl_ListViewContextItem.h
20 * @brief This is the header file for the FUiCtrl_ListViewContextItem class.
22 * This header file contains the declarations of the FUiCtrl_ListViewContextItem class.
25 #ifndef _FUI_CTRL_INTERNAL_LIST_VIEW_CONTEXT_ITEM_H_
26 #define _FUI_CTRL_INTERNAL_LIST_VIEW_CONTEXT_ITEM_H_
28 #include "FUi_Control.h"
29 #include "FUiCtrl_Button.h"
30 #include "FUiCtrl_IActionEventListener.h"
31 #include "FUiCtrl_LinkedList.h"
32 #include "FUiCtrl_TableViewItem.h"
34 namespace Tizen { namespace Ui { namespace Controls
37 struct _ListViewContextItemElement
40 Tizen::Ui::Controls::_Button* pButton;
43 class _ListViewContextItem
44 : public Tizen::Ui::Controls::_TableViewItem
47 _ListViewContextItem(int itemHeight);
49 virtual ~_ListViewContextItem(void);
51 static _ListViewContextItem* CreateListViewContextItemN(int itemHeight);
53 bool AddElement(int elementId, const Tizen::Base::String& text, bool enable = true);
55 bool AddElement(int elementId, const Tizen::Graphics::Bitmap* pNormalBitmap, const Tizen::Graphics::Bitmap* pPressedBitmap,
56 const Tizen::Graphics::Bitmap* pHighlightedBitmap, bool enable = true);
58 bool AddElement(int elementId, const Tizen::Base::String& text, const Tizen::Graphics::Bitmap* pNormalBitmap,
59 const Tizen::Graphics::Bitmap* pPressedBitmap, const Tizen::Graphics::Bitmap* pHighlightedBitmap, bool enable = true);
61 int GetElementIdFromPosition(const Tizen::Graphics::Point& position) const;
63 void AddContextItemEventListener(Tizen::Ui::Controls::_IActionEventListener& listener);
65 void RemoveContextItemEventListener(Tizen::Ui::Controls::_IActionEventListener& listener);
67 void AdjustItemBounds(Tizen::Graphics::Rectangle& bounds);
69 virtual void OnFontChanged(Tizen::Graphics::Font* pFont);
72 _ListViewContextItem(const _ListViewContextItem& rhs);
74 _ListViewContextItem& operator =(const _ListViewContextItem& rhs);
76 _ListViewContextItemElement* GetElement(int elementId) const;
78 bool HasElement(int elementId);
80 void AdjustElementLayout(void);
83 _LinkedList <_ListViewContextItemElement> __elements;
89 }; // _ListContextItem
91 }}} // Tizen::Ui::Controls
93 #endif // _FUI_CTRL_INTERNAL_LIST_VIEW_CONTEXT_ITEM_H_