xref: /aoo4110/main/slideshow/source/inc/view.hxx (revision b1cdbd2c)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef INCLUDED_SLIDESHOW_VIEW_HXX
25 #define INCLUDED_SLIDESHOW_VIEW_HXX
26 
27 #include "viewlayer.hxx"
28 
29 #include <boost/shared_ptr.hpp>
30 #include <vector>
31 
32 
33 namespace basegfx { class B2DRange; class B2DVector; }
34 
35 
36 /* Definition of View interface */
37 
38 namespace slideshow
39 {
40     namespace internal
41     {
42         class View : public ViewLayer
43         {
44         public:
45             /** Create a new view layer for this view
46 
47                 @param rLayerBounds
48                 Specifies the bound rect of the layer relative to the
49                 user view coordinate system.
50 
51             	This method sets the bounds of the view layer in
52             	document coordinates (i.e. 'logical' coordinates). The
53             	resulting transformation is then concatenated with the
54             	underlying view transformation, returned by the
55             	getTransformation() method.
56              */
57             virtual ViewLayerSharedPtr createViewLayer( const basegfx::B2DRange& rLayerBounds ) const = 0;
58 
59             /** Update screen representation from backbuffer
60              */
61             virtual bool updateScreen() const = 0;
62 
63             /** Paint screen content unconditionally from backbuffer
64              */
65             virtual bool paintScreen() const = 0;
66 
67             /** Set the size of the user view coordinate system.
68 
69             	This method sets the width and height of the view in
70             	document coordinates (i.e. 'logical' coordinates). The
71             	resulting transformation is then concatenated with the
72             	underlying view transformation, returned by the
73             	getTransformation() method.
74             */
75             virtual void setViewSize( const ::basegfx::B2DVector& ) = 0;
76 
77             /** Change the view's mouse cursor.
78 
79             	@param nPointerShape
80                 One of the ::com::sun::star::awt::SystemPointer
81                 constant group members.
82              */
83             virtual void setCursorShape( sal_Int16 nPointerShape ) = 0;
84         };
85 
86         typedef ::boost::shared_ptr< View > 	ViewSharedPtr;
87         typedef ::std::vector< ViewSharedPtr >	ViewVector;
88     }
89 }
90 
91 #endif /* INCLUDED_SLIDESHOW_VIEW_HXX */
92