LibreOffice Module slideshow (master) 1
viewappletshape.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#ifndef INCLUDED_SLIDESHOW_SOURCE_ENGINE_SHAPES_VIEWAPPLETSHAPE_HXX
21#define INCLUDED_SLIDESHOW_SOURCE_ENGINE_SHAPES_VIEWAPPLETSHAPE_HXX
22
24#include <com/sun/star/frame/XSynchronousFrameLoader.hpp>
25
26#include <memory>
27
28#include <viewlayer.hxx>
29
30namespace com::sun::star {
31 namespace frame {
32 class XSynchronousFrameLoader;
33 class XFrame2;
34 }
35 namespace uno {
36 class XComponentContext;
37 }
38 namespace drawing {
39 class XShape;
40 }
41}
42
43namespace slideshow
44{
45 namespace internal
46 {
53 class ViewAppletShape final
54 {
55 public:
76 const css::uno::Reference< css::drawing::XShape >& rxShape,
77 const OUString& rServiceName,
78 const char** pPropCopyTable,
79 std::size_t nNumPropEntries,
80 css::uno::Reference< css::uno::XComponentContext > xContext );
81
85
90
93 const ViewLayerSharedPtr& getViewLayer() const;
94
95 // animation methods
96
97
107 void startApplet( const ::basegfx::B2DRectangle& rBounds );
108
114 void endApplet();
115
116 // render methods
117
118
128 bool render( const ::basegfx::B2DRectangle& rBounds ) const;
129
140 bool resize( const ::basegfx::B2DRectangle& rBounds ) const;
141
142 private:
143
145
147 css::uno::Reference<
148 css::frame::XSynchronousFrameLoader> mxViewer;
149
151 css::uno::Reference<
152 css::frame::XFrame2> mxFrame;
153 css::uno::Reference<
154 css::uno::XComponentContext> mxComponentContext;
155 };
156
157 typedef ::std::shared_ptr< ViewAppletShape > ViewAppletShapeSharedPtr;
158
159 }
160}
161
162#endif // INCLUDED_SLIDESHOW_SOURCE_ENGINE_SHAPES_VIEWAPPLETSHAPE_HXX
163
164/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
This class is the viewable representation of a draw document's applet object, associated to a specifi...
ViewAppletShape & operator=(const ViewAppletShape &)=delete
Forbid copy assignment.
bool render(const ::basegfx::B2DRectangle &rBounds) const
Render the ViewShape.
void startApplet(const ::basegfx::B2DRectangle &rBounds)
Notify the ViewShape that an animation starts now.
const ViewLayerSharedPtr & getViewLayer() const
Query the associated view layer of this shape.
css::uno::Reference< css::frame::XFrame2 > mxFrame
the frame containing the applet
css::uno::Reference< css::uno::XComponentContext > mxComponentContext
css::uno::Reference< css::frame::XSynchronousFrameLoader > mxViewer
the actual viewer component for this applet
void endApplet()
Notify the ViewShape that it is no longer animated.
ViewAppletShape(ViewLayerSharedPtr xViewLayer, const css::uno::Reference< css::drawing::XShape > &rxShape, const OUString &rServiceName, const char **pPropCopyTable, std::size_t nNumPropEntries, css::uno::Reference< css::uno::XComponentContext > xContext)
Create a ViewAppletShape for the given View.
bool resize(const ::basegfx::B2DRectangle &rBounds) const
Resize the ViewShape.
ViewAppletShape(const ViewAppletShape &)=delete
Forbid copy construction.
::std::shared_ptr< ViewAppletShape > ViewAppletShapeSharedPtr
std::shared_ptr< ViewLayer > ViewLayerSharedPtr
Definition: viewlayer.hxx:168