1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: PresenterPane.hxx,v $
13 * This file is part of OpenOffice.org.
15 * OpenOffice.org is free software: you can redistribute it and/or modify
16 * it under the terms of the GNU Lesser General Public License version 3
17 * only, as published by the Free Software Foundation.
19 * OpenOffice.org is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU Lesser General Public License version 3 for more details
23 * (a copy is included in the LICENSE file that accompanied this code).
25 * You should have received a copy of the GNU Lesser General Public License
26 * version 3 along with OpenOffice.org. If not, see
27 * <http://www.openoffice.org/license.html>
28 * for a copy of the LGPLv3 License.
30 ************************************************************************/
32 #ifndef SD_PRESENTER_PRESENTER_PANE_HXX
33 #define SD_PRESENTER_PRESENTER_PANE_HXX
35 #include "PresenterPaneBase.hxx"
36 #include <com/sun/star/awt/XMouseListener.hpp>
37 #include <com/sun/star/awt/XMouseMotionListener.hpp>
38 #include <com/sun/star/awt/XWindowListener.hpp>
39 #include <com/sun/star/container/XChild.hpp>
40 #include <com/sun/star/drawing/XPresenterHelper.hpp>
41 #include <com/sun/star/drawing/framework/XPane.hpp>
42 #include <com/sun/star/drawing/framework/XPaneBorderPainter.hpp>
43 #include <com/sun/star/lang/XInitialization.hpp>
44 #include <com/sun/star/uno/XComponentContext.hpp>
45 #include <com/sun/star/rendering/XCanvas.hpp>
46 #include <rtl/ref.hxx>
47 #include <boost/noncopyable.hpp>
49 namespace css
= ::com::sun::star
;
52 namespace sdext
{ namespace presenter
{
54 /** Pane used by the presenter screen. Pane objects are stored in the
55 PresenterPaneContainer. Sizes and positions are controlled
56 by the PresenterWindowManager. Interactive positioning and resizing is
57 managed by the PresenterPaneBorderManager. Borders around panes are
58 painted by the PresenterPaneBorderPainter.
60 class PresenterPane
: public PresenterPaneBase
64 const css::uno::Reference
<css::uno::XComponentContext
>& rxContext
,
65 const ::rtl::Reference
<PresenterController
>& rpPresenterController
);
66 virtual ~PresenterPane (void);
68 static ::rtl::OUString
getImplementationName_static (void);
69 static css::uno::Sequence
< ::rtl::OUString
> getSupportedServiceNames_static (void);
70 static css::uno::Reference
<css::uno::XInterface
> Create(
71 const css::uno::Reference
<css::uno::XComponentContext
>& rxContext
)
72 SAL_THROW((css::uno::Exception
));
77 css::uno::Reference
<css::awt::XWindow
> SAL_CALL
getWindow (void)
78 throw (css::uno::RuntimeException
);
80 css::uno::Reference
<css::rendering::XCanvas
> SAL_CALL
getCanvas (void)
81 throw (css::uno::RuntimeException
);
86 virtual void SAL_CALL
windowResized (const css::awt::WindowEvent
& rEvent
)
87 throw (css::uno::RuntimeException
);
89 virtual void SAL_CALL
windowMoved (const css::awt::WindowEvent
& rEvent
)
90 throw (css::uno::RuntimeException
);
92 virtual void SAL_CALL
windowShown (const css::lang::EventObject
& rEvent
)
93 throw (css::uno::RuntimeException
);
95 virtual void SAL_CALL
windowHidden (const css::lang::EventObject
& rEvent
)
96 throw (css::uno::RuntimeException
);
101 virtual void SAL_CALL
windowPaint (const css::awt::PaintEvent
& rEvent
)
102 throw (css::uno::RuntimeException
);
106 /** Store the bounding box so that when the window is resized or moved
107 we still know the old position and size.
109 css::awt::Rectangle maBoundingBox
;
111 virtual void CreateCanvases (
112 const css::uno::Reference
<css::awt::XWindow
>& rxParentWindow
,
113 const css::uno::Reference
<css::rendering::XSpriteCanvas
>& rxParentCanvas
);
116 const css::awt::Rectangle
& rRepaintBox
);
117 void UpdateBoundingBox (void);
120 } } // end of namespace ::sd::presenter