Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / inc / FUiCtrl_GalleryCanvasManager.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_CANVAS_MANAGER_H_
18 #define _FUI_CTRL_INTERNAL_GALLERY_CANVAS_MANAGER_H_
19
20 namespace Tizen { namespace Base { namespace Collection {
21
22 class ArrayList;
23
24 }}} // Tizen::Base::Collection
25
26 namespace Tizen { namespace Ui { namespace Controls {
27
28 class _GalleryRootCanvas;
29 class _GalleryCanvas;
30 class _GalleryAnimationProvider;
31
32 class _GalleryCanvasManager
33 {
34 public:
35         virtual ~_GalleryCanvasManager(void);
36
37         static _GalleryCanvasManager* CreateCanvasManagerN(Tizen::Ui::_Control& control, int initialCanvasCount,
38                                                                                                         Tizen::Graphics::Rectangle& initialCanvasBounds,
39                                                                                                         _GalleryAnimationProvider* pVEDelegator);
40
41         result ResetCanvasManager(int canvasCount, Tizen::Graphics::Rectangle& canvasBounds);
42         int GetCanvasCount(void) const;
43         _GalleryRootCanvas& GetRootCanvas(void) const;
44         _GalleryCanvas* GetCanvas(int canvasIndex) const;
45         result ReleaseAllCanvasResource(void);
46         result ResetAllCanvas(Tizen::Graphics::Rectangle& canvasBounds);
47         result LoadAllCanvasImage(void);
48
49 private:
50         _GalleryCanvasManager(_GalleryCanvasManager& rhs);
51         _GalleryCanvasManager& operator=(const _GalleryCanvasManager& rhs);
52
53         _GalleryCanvasManager(void);
54         result Construct(Tizen::Ui::_Control& control, int initialCanvasCount, Tizen::Graphics::Rectangle& initialCanvasBounds);
55
56         result RemoveAllCanvas(void);
57
58         void SetControl(Tizen::Ui::_Control& control);
59         Tizen::Ui::_Control& GetControl(void) const;
60
61         void SetRootCanvas(_GalleryRootCanvas& rootCanvas);
62
63         void SetCanvasCount(int canvasCount);
64         void SetAnimationDelegator(_GalleryAnimationProvider& pVEDelegator);
65         _GalleryAnimationProvider& GetAnimationDelegator(void) const;
66
67 private:
68         Tizen::Ui::_Control* __pControl;
69         _GalleryRootCanvas* __pRootCanvas;
70         Tizen::Base::Collection::ArrayList __canvasArray;
71         _GalleryAnimationProvider* __pVEDelegator;
72 }; // _GalleryCanvasManager
73
74 }}} // Tizen::Ui::Controls
75
76 #endif //_FUI_CTRL_INTERNAL_GALLERY_CANVAS_MANAGER_H_