Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / inc / FUiCtrl_CustomListItemFormatImpl.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_CustomListItemFormatImpl.h
19  * @brief       This is the header file for the _CustomListItemFormatImpl class.
20  *
21  * This header file contains the declarations of the _CustomListItemFormatImpl class and its helper classes.
22  */
23
24 #ifndef _FUI_CTRL_INTERNAL_CUSTOM_LIST_ITEM_FORMAT_IMPL_H_
25 #define _FUI_CTRL_INTERNAL_CUSTOM_LIST_ITEM_FORMAT_IMPL_H_
26
27 #include <FBaseObject.h>
28 #include <FGrpRectangle.h>
29 #include <FGrpColor.h>
30 #include <FBaseColLinkedList.h>
31
32 namespace Tizen { namespace Ui { namespace Controls
33 {
34
35 class _ElementFormatData
36         : public Tizen::Base::Object
37 {
38 public:
39         _ElementFormatData(void);
40         ~_ElementFormatData(void);
41
42 private:
43         _ElementFormatData(const _ElementFormatData& rhs);
44         _ElementFormatData& operator =(const _ElementFormatData& rhs);
45
46 public:
47         int elementId;
48         Tizen::Graphics::Rectangle rect;
49         int textSize;
50         Tizen::Graphics::Color normalTextColor;
51         Tizen::Graphics::Color focusedTextColor;
52         Tizen::Graphics::Color highlightedTextColor;
53         bool enable;
54 };  //_ElementFormatData
55
56
57 class _CustomListItemFormatImpl
58         : public Tizen::Base::Object
59 {
60 public:
61         virtual ~_CustomListItemFormatImpl(void);
62         static _CustomListItemFormatImpl* CreateInstanceN(void);
63
64         result AddElement(int elementId, const Tizen::Graphics::Rectangle& rect);
65         result AddElement(int elementId, const Tizen::Graphics::Rectangle& rect, int textSize);
66         result AddElement(int elementId, const Tizen::Graphics::Rectangle& rect, int textSize, const Tizen::Graphics::Color& normalTextColor, const Tizen::Graphics::Color& focusedTextColor);
67         result AddElement(int elementId, const Tizen::Graphics::Rectangle& rect, int textSize, const Tizen::Graphics::Color& normalTextColor, const Tizen::Graphics::Color& focusedTextColor, const Tizen::Graphics::Color& highlightedTextColor);
68
69         Tizen::Graphics::Rectangle GetElement(int elementId) const;
70         int GetFirstElementId(void);
71         int GetFirstEnabledElementId(void);
72         int GetNextElementId(int elementId);
73         int GetNextEnabledElementId(int elementId);
74         int GetPreviousEnabledElementId(int elementId);
75         bool IsElementEventEnabled(int elementId);
76         void SetElementEventEnabled(int elementId, bool enable);
77
78         _ElementFormatData* GetElementFormatById(int elementId);
79
80 private:
81         _CustomListItemFormatImpl(void);
82         _CustomListItemFormatImpl(const _CustomListItemFormatImpl& rhs);
83         _CustomListItemFormatImpl& operator =(const _CustomListItemFormatImpl& rhs);
84
85         _ElementFormatData* CreateElementN(int elementId);
86
87 public:
88         Tizen::Base::Collection::LinkedList elementFormatDataList;
89 }; //_CustomListItemFormatImpl
90
91 }}} //Tizen::Ui::Controls
92
93 #endif //_FUI_CTRL_INTERNAL_CUSTOM_LIST_ITEM_FORMAT_IMPL_H_