fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / slideshow / source / engine / shapes / viewappletshape.hxx
blobc94b98ca1c41449271ac5a00177abf6b9dada371
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_SLIDESHOW_SOURCE_ENGINE_SHAPES_VIEWAPPLETSHAPE_HXX
21 #define INCLUDED_SLIDESHOW_SOURCE_ENGINE_SHAPES_VIEWAPPLETSHAPE_HXX
23 #include <basegfx/range/b2drectangle.hxx>
24 #include <com/sun/star/awt/Point.hpp>
26 #include <boost/utility.hpp>
27 #include <boost/shared_ptr.hpp>
29 #include "viewlayer.hxx"
31 namespace com { namespace sun { namespace star {
32 namespace frame {
33 class XSynchronousFrameLoader;
34 class XFrame2;
36 namespace uno {
37 class XComponentContext;
39 namespace drawing {
40 class XShape;
41 }}}}
43 namespace slideshow
45 namespace internal
47 /** This class is the viewable representation of a draw
48 document's applet object, associated to a specific View
50 The class is able to render the associated applet on View
51 implementations.
53 class ViewAppletShape : private boost::noncopyable
55 public:
56 /** Create a ViewAppletShape for the given View
58 @param rViewLayer
59 The associated View object.
61 @param rxShape
62 The associated Shape
64 @param rServiceName
65 The service name to use, when actually creating the
66 viewer component
68 @param pPropCopyTable
69 Table of plain ASCII property names, to copy from
70 xShape to applet.
72 @param nNumPropEntries
73 Number of property table entries (in pPropCopyTable)
75 ViewAppletShape( const ViewLayerSharedPtr& rViewLayer,
76 const ::com::sun::star::uno::Reference<
77 ::com::sun::star::drawing::XShape >& rxShape,
78 const OUString& rServiceName,
79 const char** pPropCopyTable,
80 sal_Size nNumPropEntries,
81 const ::com::sun::star::uno::Reference<
82 ::com::sun::star::uno::XComponentContext >& rxContext );
84 /** destroy the object
86 virtual ~ViewAppletShape();
88 /** Query the associated view layer of this shape
90 ViewLayerSharedPtr getViewLayer() const;
92 // animation methods
95 /** Notify the ViewShape that an animation starts now
97 This method enters animation mode on the associate
98 target view. The shape can be animated in parallel on
99 different views.
101 @param rBounds
102 The current applet shape bounds
104 @return whether the mode change finished successfully.
106 bool startApplet( const ::basegfx::B2DRectangle& rBounds );
108 /** Notify the ViewShape that it is no longer animated
110 This methods ends animation mode on the associate
111 target view
113 void endApplet();
115 // render methods
118 /** Render the ViewShape
120 This method renders the ViewAppletShape on the associated view.
122 @param rBounds
123 The current applet shape bounds
125 @return whether the rendering finished successfully.
127 bool render( const ::basegfx::B2DRectangle& rBounds ) const;
129 /** Resize the ViewShape
131 This method resizes the ViewAppletShape on the
132 associated view. It does not render.
134 @param rBounds
135 The current applet shape bounds
137 @return whether the resize finished successfully.
139 bool resize( const ::basegfx::B2DRectangle& rBounds ) const;
141 private:
143 ViewLayerSharedPtr mpViewLayer;
145 /// the actual viewer component for this applet
146 ::com::sun::star::uno::Reference<
147 ::com::sun::star::frame::XSynchronousFrameLoader> mxViewer;
149 /// the frame containing the applet
150 ::com::sun::star::uno::Reference<
151 ::com::sun::star::frame::XFrame2> mxFrame;
152 ::com::sun::star::uno::Reference<
153 ::com::sun::star::uno::XComponentContext> mxComponentContext;
156 typedef ::boost::shared_ptr< ViewAppletShape > ViewAppletShapeSharedPtr;
161 #endif // INCLUDED_SLIDESHOW_SOURCE_ENGINE_SHAPES_VIEWAPPLETSHAPE_HXX
163 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */