xref: /aoo42x/main/slideshow/source/inc/view.hxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef INCLUDED_SLIDESHOW_VIEW_HXX
29 #define INCLUDED_SLIDESHOW_VIEW_HXX
30 
31 #include "viewlayer.hxx"
32 
33 #include <boost/shared_ptr.hpp>
34 #include <vector>
35 
36 
37 namespace basegfx { class B2DRange; class B2DVector; }
38 
39 
40 /* Definition of View interface */
41 
42 namespace slideshow
43 {
44     namespace internal
45     {
46         class View : public ViewLayer
47         {
48         public:
49             /** Create a new view layer for this view
50 
51                 @param rLayerBounds
52                 Specifies the bound rect of the layer relative to the
53                 user view coordinate system.
54 
55             	This method sets the bounds of the view layer in
56             	document coordinates (i.e. 'logical' coordinates). The
57             	resulting transformation is then concatenated with the
58             	underlying view transformation, returned by the
59             	getTransformation() method.
60              */
61             virtual ViewLayerSharedPtr createViewLayer( const basegfx::B2DRange& rLayerBounds ) const = 0;
62 
63             /** Update screen representation from backbuffer
64              */
65             virtual bool updateScreen() const = 0;
66 
67             /** Paint screen content unconditionally from backbuffer
68              */
69             virtual bool paintScreen() const = 0;
70 
71             /** Set the size of the user view coordinate system.
72 
73             	This method sets the width and height of the view in
74             	document coordinates (i.e. 'logical' coordinates). The
75             	resulting transformation is then concatenated with the
76             	underlying view transformation, returned by the
77             	getTransformation() method.
78             */
79             virtual void setViewSize( const ::basegfx::B2DVector& ) = 0;
80 
81             /** Change the view's mouse cursor.
82 
83             	@param nPointerShape
84                 One of the ::com::sun::star::awt::SystemPointer
85                 constant group members.
86              */
87             virtual void setCursorShape( sal_Int16 nPointerShape ) = 0;
88         };
89 
90         typedef ::boost::shared_ptr< View > 	ViewSharedPtr;
91         typedef ::std::vector< ViewSharedPtr >	ViewVector;
92     }
93 }
94 
95 #endif /* INCLUDED_SLIDESHOW_VIEW_HXX */
96