Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / inc / FUiCtrl_GalleryItem.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 #ifndef _FUI_CTRL_INTERNAL_GALLERY_ITEM_H_
18 #define _FUI_CTRL_INTERNAL_GALLERY_ITEM_H_
19
20 #include <FBaseString.h>
21 #include <FGrpDimension.h>
22 #include <FGrpBitmap.h>
23 #include "FUiCtrl_ListItemCommon.h"
24 #include "FUiCtrl_GalleryTypes.h"
25
26
27 namespace Tizen { namespace Ui { namespace Controls {
28
29 class _GalleryBitmap;
30
31 class _GalleryItem
32         : public _ListItemCommon
33 {
34 public:
35         _GalleryItem(_GalleryBitmap* pImage = null, Tizen::Base::String imageFilePath = L"",
36                                         _GalleryImageRotation rotation = GALLERY_INTERNAL_IMAGE_ROTATION_0);
37         virtual ~_GalleryItem(void);
38
39         void SetGalleryItemImage(_GalleryBitmap* pImage);
40         _GalleryBitmap* GetGalleryItemImage(void) const;
41         void SetOriginGalleryItemImage(_GalleryBitmap* pImage);
42         _GalleryBitmap* GetOriginItemImage(void) const;
43         void SetGalleryItemFilePath(Tizen::Base::String& filePath);
44         Tizen::Base::String GetGalleryItemFilePath(void) const;
45         void SetGalleryRotation(_GalleryImageRotation rotation);
46         _GalleryImageRotation GetGalleryRotation(void) const;
47
48         virtual bool DrawItem(Tizen::Graphics::Rectangle &rcItem, ListItemState isFocused, bool itemDivider = false)
49         {
50                 return true;
51         }
52
53         virtual void SetItemIndex(int groupIndex, int itemIndex);
54         virtual void GetItemIndex(int& groupIndex, int& itemIndex) const;
55
56 private:
57         _GalleryItem(const _GalleryItem& rhs);
58         _GalleryItem& operator=(const _GalleryItem& rhs);
59
60 private:
61         _GalleryBitmap* __pOriginImage;
62         _GalleryBitmap* __pImage;
63         Tizen::Base::String __imageFilePath;
64         _GalleryImageRotation __rotation;
65         int __itemIndex;
66 }; // _GalleryItem
67
68 }}} // Tizen::Ui::Controls
69
70 #endif //_FUI_CTRL_INTERNAL_GALLERY_ITEM_H_