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.
17 #ifndef _FUI_CTRL_INTERNAL_GALLERY_IMPL_H_
18 #define _FUI_CTRL_INTERNAL_GALLERY_IMPL_H_
20 #include <FUiCtrlGalleryTypes.h>
21 #include "FUi_ControlImpl.h"
22 #include "FUiCtrl_Gallery.h"
24 namespace Tizen { namespace Ui { namespace Effects
29 namespace Tizen { namespace Ui { namespace Controls {
32 class IGalleryItemProvider;
33 class IGalleryEventListener;
34 class _GalleryImplEvent;
35 class _GalleryCoreEventListener;
36 class _GalleryItemProviderAdaptorImpl;
39 : public Tizen::Ui::_ControlImpl
42 virtual ~_GalleryImpl(void);
44 static _GalleryImpl* CreateGalleryImplN(Gallery* pGallery);
46 virtual const char* GetPublicClassName(void) const;
47 virtual const Gallery& GetPublic(void) const;
48 virtual Gallery& GetPublic(void);
49 virtual const _Gallery& GetCore(void) const;
50 virtual _Gallery& GetCore(void);
52 void AddGalleryEventListener(IGalleryEventListener& listener);
53 void RemoveGalleryEventListener(IGalleryEventListener& listener);
54 result SetItemProvider(IGalleryItemProvider& provider);
56 result SetCurrentItemIndex(int index);
57 int GetCurrentItemIndex(void) const;
58 result SetZoomingEnabled(bool enable);
59 bool IsZoomingEnabled(void) const;
61 result SetTextOfEmptyGallery(const Tizen::Base::String& text);
62 Tizen::Base::String GetTextOfEmptyGallery(void) const;
63 result SetBitmapOfEmptyGallery(const Tizen::Graphics::Bitmap* pBitmap);
65 result SetSlideShowAnimation(GalleryAnimation animation);
66 GalleryAnimation GetSlideShowAnimation(void) const;
67 result SetSlideShowAnimationDuration(int duration);
68 int GetSlideShowAnimationDuration(void) const;
69 result SetSlideShowViewDuration(int duration);
70 int GetSlideShowViewDuration(void) const;
72 result StartSlideShow(bool repeat = false);
73 result StopSlideShow(void) const;
74 bool IsSlideShowStarted(void) const;
76 int GetItemCount(void) const;
78 result RefreshGallery(int itemIndex, GalleryRefreshType type);
79 result UpdateGallery(void);
81 static _GalleryImpl* GetInstance(Gallery& gallery);
82 static const _GalleryImpl* GetInstance(const Gallery& gallery);
84 void SetEffect(Tizen::Ui::Effects::Effect* pEffect);
85 Tizen::Ui::Effects::Effect* GetEffect(void);
88 _GalleryImpl(Gallery* pGallery, _Gallery* pCore, _GalleryImplEvent* pImplEvent,
89 _GalleryCoreEventListener* pCoreEventListener, _GalleryItemProviderAdaptorImpl* pGalleryItemProviderAdaptor);
92 _GalleryImpl(const _GalleryImpl& rhs);
93 _GalleryImpl& operator=(const _GalleryImpl& rhs);
95 void RequestToUnloadAllItems(void);
98 _GalleryImplEvent* __pImplEvent;
99 _GalleryCoreEventListener* __pCoreEventListener;
100 _GalleryItemProviderAdaptorImpl* __pGalleryItemProviderAdaptor;
103 }}} //Tizen::Ui::Controls
105 #endif //_FUI_CTRL_INTERNAL_GALLERY_IMPL_H_