Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / inc / FUiCtrl_CustomItemImpl.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 /**
19  * @file        FUiCtrl_CustomItemImpl.h
20  * @brief       This is the header file for the _CustomItemImpl class.
21  *
22  * This header file contains the declarations of the _CustomItemImpl class.
23  */
24
25 #ifndef _FUI_CTRL_CUSTOM_ITEM_IMPL_H_
26 #define _FUI_CTRL_CUSTOM_ITEM_IMPL_H_
27
28 #include "FUiCtrl_ListItemBaseImpl.h"
29
30 namespace Tizen { namespace Ui { namespace Controls
31 {
32
33 class ICustomElement;
34 class CustomItem;
35
36 class _CustomItemImpl
37         : public _ListItemBaseImpl
38 {
39 public:
40         static _CustomItemImpl* CreateCustomItemImplN(CustomItem* pPublic, const Tizen::Graphics::Dimension& itemSize, ListAnnexStyle style);
41
42         virtual ~_CustomItemImpl(void);
43
44         virtual CustomItem& GetPublic(void);
45
46         virtual const char* GetPublicClassName(void) const;
47
48         virtual result Construct(const Tizen::Graphics::Dimension& itemSize, ListAnnexStyle style);
49
50         result AddElement(const Tizen::Graphics::Rectangle& rect, int elementId, const Tizen::Graphics::EnrichedText& text);
51
52         result AddElement(const Tizen::Graphics::Rectangle& rect, int elementId, const Tizen::Base::String& text, bool textSliding = true);
53
54         result AddElement(const Tizen::Graphics::Rectangle& rect, int elementId, const Tizen::Base::String& text, int textSize,
55                         const Tizen::Graphics::Color& normalTextColor, const Tizen::Graphics::Color& pressedTextColor,
56                         const Tizen::Graphics::Color& highlightedTextColor, bool textSliding = true);
57
58         result AddElement(const Tizen::Graphics::Rectangle& rect, int elementId, const Tizen::Graphics::Bitmap& normalBitmap,
59                         const Tizen::Graphics::Bitmap* pPressedBitmap = null, const Tizen::Graphics::Bitmap* pHighlightedBitmap = null);
60
61         result AddElement(const Tizen::Graphics::Rectangle& rect, int elementId, const Tizen::Ui::Controls::ICustomElement& element);
62
63         result RemoveAllElements(void);
64
65         result RemoveElement(int elementId);
66
67         result SetElementSelectionEnabled(int elementId, bool enable);
68
69         result SetElementTextHorizontalAlignment(int elementId, HorizontalAlignment alignment);
70
71         result SetElementTextVerticalAlignment(int elementId, VerticalAlignment alignment);
72
73         result SetElementAutoLinkMask(int elementId, unsigned long mask);
74
75 private:
76         _CustomItemImpl(CustomItem* pPublic);
77
78         _CustomItemImpl(const _CustomItemImpl& rhs);
79
80         _CustomItemImpl& operator =(const _CustomItemImpl& rhs);
81 }; // _CustomItemImpl
82
83 }}} // Tizen::Ui::Controls
84
85 #endif // _FUI_CTRL_CUSTOM_ITEM_IMPL_H_