1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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_SDEXT_SOURCE_PRESENTER_PRESENTERPANE_HXX
21 #define INCLUDED_SDEXT_SOURCE_PRESENTER_PRESENTERPANE_HXX
23 #include "PresenterPaneBase.hxx"
24 #include <com/sun/star/awt/XMouseListener.hpp>
25 #include <com/sun/star/awt/XMouseMotionListener.hpp>
26 #include <com/sun/star/awt/XWindowListener.hpp>
27 #include <com/sun/star/container/XChild.hpp>
28 #include <com/sun/star/drawing/XPresenterHelper.hpp>
29 #include <com/sun/star/drawing/framework/XPane.hpp>
30 #include <com/sun/star/drawing/framework/XPaneBorderPainter.hpp>
31 #include <com/sun/star/lang/XInitialization.hpp>
32 #include <com/sun/star/uno/XComponentContext.hpp>
33 #include <com/sun/star/rendering/XCanvas.hpp>
34 #include <rtl/ref.hxx>
36 namespace sdext
{ namespace presenter
{
38 /** Pane used by the presenter screen. Pane objects are stored in the
39 PresenterPaneContainer. Sizes and positions are controlled
40 by the PresenterWindowManager. Interactive positioning and resizing is
41 managed by the PresenterPaneBorderManager. Borders around panes are
42 painted by the PresenterPaneBorderPainter.
44 class PresenterPane
: public PresenterPaneBase
48 const css::uno::Reference
<css::uno::XComponentContext
>& rxContext
,
49 const ::rtl::Reference
<PresenterController
>& rpPresenterController
);
50 virtual ~PresenterPane();
52 static OUString
getImplementationName_static();
53 static css::uno::Sequence
< OUString
> getSupportedServiceNames_static();
54 static css::uno::Reference
<css::uno::XInterface
> Create(
55 const css::uno::Reference
<css::uno::XComponentContext
>& rxContext
);
59 css::uno::Reference
<css::awt::XWindow
> SAL_CALL
getWindow()
60 throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
62 css::uno::Reference
<css::rendering::XCanvas
> SAL_CALL
getCanvas()
63 throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
67 virtual void SAL_CALL
windowResized (const css::awt::WindowEvent
& rEvent
)
68 throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
70 virtual void SAL_CALL
windowMoved (const css::awt::WindowEvent
& rEvent
)
71 throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
73 virtual void SAL_CALL
windowShown (const css::lang::EventObject
& rEvent
)
74 throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
76 virtual void SAL_CALL
windowHidden (const css::lang::EventObject
& rEvent
)
77 throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
81 virtual void SAL_CALL
windowPaint (const css::awt::PaintEvent
& rEvent
)
82 throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
85 /** Store the bounding box so that when the window is resized or moved
86 we still know the old position and size.
88 css::awt::Rectangle maBoundingBox
;
90 virtual void CreateCanvases (
91 const css::uno::Reference
<css::awt::XWindow
>& rxParentWindow
,
92 const css::uno::Reference
<css::rendering::XSpriteCanvas
>& rxParentCanvas
) SAL_OVERRIDE
;
95 const css::awt::Rectangle
& rRepaintBox
);
96 void UpdateBoundingBox();
99 } } // end of namespace ::sd::presenter
103 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */