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_FastScrollIndex.h
20 * @brief This is the header file for the _FastScrollIndex class.
22 * This header file contains the declarations of the %_FastScrollIndex class.
25 #ifndef _FUICTRL_INTERNAL_FASTSCROLL_INDEX_H_
26 #define _FUICTRL_INTERNAL_FASTSCROLL_INDEX_H_
28 #include "FBaseObject.h"
29 #include "FBaseString.h"
30 #include "FBaseColArrayList.h"
31 #include "FGrpBitmap.h"
33 namespace Tizen { namespace Ui { namespace Controls
35 class _FastScrollIndex;
37 enum _FastScrollIndexType
39 FAST_SCROLL_INDEX_TYPE_NORMAL = 0,
40 FAST_SCROLL_INDEX_TYPE_OMISSION,
43 class _IFastScrollIndexObserver
44 : public Tizen::Base::Object
47 virtual ~_IFastScrollIndexObserver(void){}
49 virtual void OnIndexDataUpdated(_FastScrollIndex& updatedIndex) = 0;
50 virtual void OnIndexDeleted(_FastScrollIndex& deletedIndex) = 0;
51 virtual void OnChildIndexAttached(_FastScrollIndex& parentIndex, int attachedOrder, _FastScrollIndex& attachedIndex) = 0;
52 virtual void OnChildIndexDetached(_FastScrollIndex& parentIndex, int detachedOrder, _FastScrollIndex& detachedIndex) = 0;
55 class _FastScrollIndex
56 : public Tizen::Base::Object
59 virtual ~_FastScrollIndex(void);
61 static _FastScrollIndex* CreateFastScrollIndexN(void);
63 result SetIndexText(Tizen::Base::String* pText);
64 Tizen::Base::String* GetIndexText(void) const;
66 result SetIndexImage(Tizen::Graphics::Bitmap* pImage);
67 Tizen::Graphics::Bitmap* GetIndexImage(void) const;
69 void SetIndexObserver(_IFastScrollIndexObserver* pIndexListener);
70 _IFastScrollIndexObserver* GetIndexObserver(void) const;
72 result SetOmissionIndex(int indexCountMax);
74 result AddChildIndex(Tizen::Base::String* pText, Tizen::Graphics::Bitmap* pImage, bool omitted = false);
75 result AddChildIndex(_FastScrollIndex* pChildIndex, bool omitted = false);
76 result AddChildIndex(int childOrder, Tizen::Base::String* pText, Tizen::Graphics::Bitmap* pImage, bool omitted = false);
77 result AddChildIndex(int childOrder, _FastScrollIndex* pChildIndex, bool omitted = false);
78 void AddOmissionChildIndex(_FastScrollIndex* pChildIndex);
79 result AddChildTextIndexArray(int childOrder, const wchar_t* pTextIndexArray, int textLenth, int indexCount);
81 result RemoveChildIndex(int childOrder, bool destroy);
82 result RemoveChildIndex(_FastScrollIndex* pChildIndex, bool destroy);
83 void RemoveChildren(bool destroy);
84 result RemoveOmissionChildren(bool destroy);
86 void SetParentIndex(_FastScrollIndex* pParent);
87 _FastScrollIndex* GetParentIndex(void) const;
89 _FastScrollIndex* GetChildIndex(int childOrder, bool omitted = false) const;
90 int GetChildOrder(const _FastScrollIndex* pChildIndex, bool omitted = false) const;
91 int GetChildCount(bool omitted = false) const;
92 int GetIndexOrder(bool omitted = false) const;
94 void SetIndexType(_FastScrollIndexType type);
95 _FastScrollIndexType GetIndexType(void) const;
97 void SetOmitted(bool omitted);
98 bool GetOmitted(void) const;
101 _FastScrollIndex(const _FastScrollIndex& rhs);
102 _FastScrollIndex& operator =(const _FastScrollIndex& rhs);
104 _FastScrollIndex(void);
105 result Construct(void);
108 Tizen::Graphics::Bitmap* __pImage;
109 Tizen::Base::String* __pText;
111 _FastScrollIndex* __pParentIndex;
112 Tizen::Base::Collection::ArrayList __childIndexList;
113 Tizen::Base::Collection::ArrayList __childOmittedIndexList;
115 _IFastScrollIndexObserver* __pIndexObserver;
118 _FastScrollIndexType __indexType;
122 } } } // Tizen::Ui::Controls
124 #endif //_FUICTRL_INTERNAL_FASTSCROLL_INDEX_H_