1*06bcd5d2SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*06bcd5d2SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*06bcd5d2SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*06bcd5d2SAndrew Rist  * distributed with this work for additional information
6*06bcd5d2SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*06bcd5d2SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*06bcd5d2SAndrew Rist  * "License"); you may not use this file except in compliance
9*06bcd5d2SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*06bcd5d2SAndrew Rist  *
11*06bcd5d2SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*06bcd5d2SAndrew Rist  *
13*06bcd5d2SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*06bcd5d2SAndrew Rist  * software distributed under the License is distributed on an
15*06bcd5d2SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*06bcd5d2SAndrew Rist  * KIND, either express or implied.  See the License for the
17*06bcd5d2SAndrew Rist  * specific language governing permissions and limitations
18*06bcd5d2SAndrew Rist  * under the License.
19*06bcd5d2SAndrew Rist  *
20*06bcd5d2SAndrew Rist  *************************************************************/
21*06bcd5d2SAndrew Rist 
22*06bcd5d2SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef SD_PRESENTER_PRESENTER_PANE_HXX
25cdf0e10cSrcweir #define SD_PRESENTER_PRESENTER_PANE_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include "PresenterPaneBase.hxx"
28cdf0e10cSrcweir #include <com/sun/star/awt/XMouseListener.hpp>
29cdf0e10cSrcweir #include <com/sun/star/awt/XMouseMotionListener.hpp>
30cdf0e10cSrcweir #include <com/sun/star/awt/XWindowListener.hpp>
31cdf0e10cSrcweir #include <com/sun/star/container/XChild.hpp>
32cdf0e10cSrcweir #include <com/sun/star/drawing/XPresenterHelper.hpp>
33cdf0e10cSrcweir #include <com/sun/star/drawing/framework/XPane.hpp>
34cdf0e10cSrcweir #include <com/sun/star/drawing/framework/XPaneBorderPainter.hpp>
35cdf0e10cSrcweir #include <com/sun/star/lang/XInitialization.hpp>
36cdf0e10cSrcweir #include <com/sun/star/uno/XComponentContext.hpp>
37cdf0e10cSrcweir #include <com/sun/star/rendering/XCanvas.hpp>
38cdf0e10cSrcweir #include <rtl/ref.hxx>
39cdf0e10cSrcweir #include <boost/noncopyable.hpp>
40cdf0e10cSrcweir 
41cdf0e10cSrcweir namespace css = ::com::sun::star;
42cdf0e10cSrcweir 
43cdf0e10cSrcweir 
44cdf0e10cSrcweir namespace sdext { namespace presenter {
45cdf0e10cSrcweir 
46cdf0e10cSrcweir /** Pane used by the presenter screen.  Pane objects are stored in the
47cdf0e10cSrcweir     PresenterPaneContainer.  Sizes and positions are controlled
48cdf0e10cSrcweir     by the PresenterWindowManager.  Interactive positioning and resizing is
49cdf0e10cSrcweir     managed by the PresenterPaneBorderManager.  Borders around panes are
50cdf0e10cSrcweir     painted by the PresenterPaneBorderPainter.
51cdf0e10cSrcweir */
52cdf0e10cSrcweir class PresenterPane : public PresenterPaneBase
53cdf0e10cSrcweir {
54cdf0e10cSrcweir public:
55cdf0e10cSrcweir     PresenterPane (
56cdf0e10cSrcweir         const css::uno::Reference<css::uno::XComponentContext>& rxContext,
57cdf0e10cSrcweir         const ::rtl::Reference<PresenterController>& rpPresenterController);
58cdf0e10cSrcweir     virtual ~PresenterPane (void);
59cdf0e10cSrcweir 
60cdf0e10cSrcweir     static ::rtl::OUString getImplementationName_static (void);
61cdf0e10cSrcweir     static css::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_static (void);
62cdf0e10cSrcweir     static css::uno::Reference<css::uno::XInterface> Create(
63cdf0e10cSrcweir         const css::uno::Reference<css::uno::XComponentContext>& rxContext)
64cdf0e10cSrcweir         SAL_THROW((css::uno::Exception));
65cdf0e10cSrcweir 
66cdf0e10cSrcweir 
67cdf0e10cSrcweir     // XPane
68cdf0e10cSrcweir 
69cdf0e10cSrcweir     css::uno::Reference<css::awt::XWindow> SAL_CALL getWindow (void)
70cdf0e10cSrcweir         throw (css::uno::RuntimeException);
71cdf0e10cSrcweir 
72cdf0e10cSrcweir     css::uno::Reference<css::rendering::XCanvas> SAL_CALL getCanvas (void)
73cdf0e10cSrcweir         throw (css::uno::RuntimeException);
74cdf0e10cSrcweir 
75cdf0e10cSrcweir 
76cdf0e10cSrcweir     // XWindowListener
77cdf0e10cSrcweir 
78cdf0e10cSrcweir     virtual void SAL_CALL windowResized (const css::awt::WindowEvent& rEvent)
79cdf0e10cSrcweir         throw (css::uno::RuntimeException);
80cdf0e10cSrcweir 
81cdf0e10cSrcweir     virtual void SAL_CALL windowMoved (const css::awt::WindowEvent& rEvent)
82cdf0e10cSrcweir         throw (css::uno::RuntimeException);
83cdf0e10cSrcweir 
84cdf0e10cSrcweir     virtual void SAL_CALL windowShown (const css::lang::EventObject& rEvent)
85cdf0e10cSrcweir         throw (css::uno::RuntimeException);
86cdf0e10cSrcweir 
87cdf0e10cSrcweir     virtual void SAL_CALL windowHidden (const css::lang::EventObject& rEvent)
88cdf0e10cSrcweir         throw (css::uno::RuntimeException);
89cdf0e10cSrcweir 
90cdf0e10cSrcweir 
91cdf0e10cSrcweir     // XPaintListener
92cdf0e10cSrcweir 
93cdf0e10cSrcweir     virtual void SAL_CALL windowPaint (const css::awt::PaintEvent& rEvent)
94cdf0e10cSrcweir         throw (css::uno::RuntimeException);
95cdf0e10cSrcweir 
96cdf0e10cSrcweir 
97cdf0e10cSrcweir private:
98cdf0e10cSrcweir     /** Store the bounding box so that when the window is resized or moved
99cdf0e10cSrcweir         we still know the old position and size.
100cdf0e10cSrcweir     */
101cdf0e10cSrcweir     css::awt::Rectangle maBoundingBox;
102cdf0e10cSrcweir 
103cdf0e10cSrcweir     virtual void CreateCanvases (
104cdf0e10cSrcweir         const css::uno::Reference<css::awt::XWindow>& rxParentWindow,
105cdf0e10cSrcweir         const css::uno::Reference<css::rendering::XSpriteCanvas>& rxParentCanvas);
106cdf0e10cSrcweir 
107cdf0e10cSrcweir     void Invalidate (
108cdf0e10cSrcweir         const css::awt::Rectangle& rRepaintBox);
109cdf0e10cSrcweir     void UpdateBoundingBox (void);
110cdf0e10cSrcweir };
111cdf0e10cSrcweir 
112cdf0e10cSrcweir } } // end of namespace ::sd::presenter
113cdf0e10cSrcweir 
114cdf0e10cSrcweir #endif
115