xref: /aoo41x/main/slideshow/test/tests.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_TESTS_HXX
29 #define INCLUDED_TESTS_HXX
30 
31 #include "animatableshape.hxx"
32 #include "unoview.hxx"
33 #include <boost/shared_ptr.hpp>
34 
35 namespace basegfx{ class B1DRange; class B2DRange; class B2DVector; }
36 
37 class TestView : public slideshow::internal::UnoView
38 {
39 public:
40     /// true iff clear() has been called
41     virtual bool isClearCalled() const = 0;
42     virtual std::vector<std::pair<basegfx::B2DVector,double> > getCreatedSprites() const = 0;
43     virtual basegfx::B1DRange getPriority() const = 0;
44     /// true iff setClip was called (on and off)
45     virtual bool wasClipSet() const = 0;
46     virtual basegfx::B2DRange getBounds() const = 0;
47 
48     virtual std::vector<boost::shared_ptr<TestView> > getViewLayers() const = 0;
49 };
50 
51 typedef boost::shared_ptr<TestView> TestViewSharedPtr;
52 TestViewSharedPtr createTestView();
53 
54 
55 ///////////////////////////////////////////////////////////////////////////////////////
56 
57 
58 class TestShape : public slideshow::internal::AnimatableShape
59 {
60 public:
61     virtual std::vector<
62     std::pair<slideshow::internal::ViewLayerSharedPtr,bool> > getViewLayers() const = 0;
63     virtual sal_Int32 getNumUpdates() const = 0;
64     virtual sal_Int32 getNumRenders() const = 0;
65     virtual sal_Int32 getAnimationCount() const = 0;
66 };
67 
68 typedef boost::shared_ptr<TestShape> TestShapeSharedPtr;
69 TestShapeSharedPtr createTestShape(const basegfx::B2DRange& rRect,
70                                    double                   nPrio);
71 
72 #endif /* INCLUDED_TESTS_HXX */
73