1*b9e67834SAndre Fischer /**************************************************************
2*b9e67834SAndre Fischer  *
3*b9e67834SAndre Fischer  * Licensed to the Apache Software Foundation (ASF) under one
4*b9e67834SAndre Fischer  * or more contributor license agreements.  See the NOTICE file
5*b9e67834SAndre Fischer  * distributed with this work for additional information
6*b9e67834SAndre Fischer  * regarding copyright ownership.  The ASF licenses this file
7*b9e67834SAndre Fischer  * to you under the Apache License, Version 2.0 (the
8*b9e67834SAndre Fischer  * "License"); you may not use this file except in compliance
9*b9e67834SAndre Fischer  * with the License.  You may obtain a copy of the License at
10*b9e67834SAndre Fischer  *
11*b9e67834SAndre Fischer  *   http://www.apache.org/licenses/LICENSE-2.0
12*b9e67834SAndre Fischer  *
13*b9e67834SAndre Fischer  * Unless required by applicable law or agreed to in writing,
14*b9e67834SAndre Fischer  * software distributed under the License is distributed on an
15*b9e67834SAndre Fischer  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*b9e67834SAndre Fischer  * KIND, either express or implied.  See the License for the
17*b9e67834SAndre Fischer  * specific language governing permissions and limitations
18*b9e67834SAndre Fischer  * under the License.
19*b9e67834SAndre Fischer  *
20*b9e67834SAndre Fischer  *************************************************************/
21*b9e67834SAndre Fischer 
22*b9e67834SAndre Fischer #ifndef SFX_SIDEBAR_SIDEBAR_PANEL_HXX
23*b9e67834SAndre Fischer #define SFX_SIDEBAR_SIDEBAR_PANEL_HXX
24*b9e67834SAndre Fischer 
25*b9e67834SAndre Fischer #include <com/sun/star/ui/XSidebarPanel.hpp>
26*b9e67834SAndre Fischer 
27*b9e67834SAndre Fischer #include <boost/noncopyable.hpp>
28*b9e67834SAndre Fischer #include <cppuhelper/compbase1.hxx>
29*b9e67834SAndre Fischer #include <cppuhelper/basemutex.hxx>
30*b9e67834SAndre Fischer 
31*b9e67834SAndre Fischer namespace css = ::com::sun::star;
32*b9e67834SAndre Fischer namespace cssu = ::com::sun::star::uno;
33*b9e67834SAndre Fischer 
34*b9e67834SAndre Fischer namespace
35*b9e67834SAndre Fischer {
36*b9e67834SAndre Fischer     typedef ::cppu::WeakComponentImplHelper1 <
37*b9e67834SAndre Fischer         css::ui::XSidebarPanel
38*b9e67834SAndre Fischer         > SidebarPanelInterfaceBase;
39*b9e67834SAndre Fischer }
40*b9e67834SAndre Fischer 
41*b9e67834SAndre Fischer 
42*b9e67834SAndre Fischer class DockingWindow;
43*b9e67834SAndre Fischer 
44*b9e67834SAndre Fischer namespace sfx2 { namespace sidebar {
45*b9e67834SAndre Fischer 
46*b9e67834SAndre Fischer class Panel;
47*b9e67834SAndre Fischer 
48*b9e67834SAndre Fischer class SidebarPanel
49*b9e67834SAndre Fischer     : private ::boost::noncopyable,
50*b9e67834SAndre Fischer       private ::cppu::BaseMutex,
51*b9e67834SAndre Fischer       public SidebarPanelInterfaceBase
52*b9e67834SAndre Fischer {
53*b9e67834SAndre Fischer public:
54*b9e67834SAndre Fischer     static cssu::Reference<css::ui::XSidebarPanel> Create (Panel* pPanel);
55*b9e67834SAndre Fischer 
56*b9e67834SAndre Fischer protected:
57*b9e67834SAndre Fischer     SidebarPanel(
58*b9e67834SAndre Fischer         Panel* pPanel);
59*b9e67834SAndre Fischer     virtual ~SidebarPanel (void);
60*b9e67834SAndre Fischer 
61*b9e67834SAndre Fischer     virtual void SAL_CALL disposing (const css::lang::EventObject& rEventObject)
62*b9e67834SAndre Fischer         throw(cssu::RuntimeException);
63*b9e67834SAndre Fischer 
64*b9e67834SAndre Fischer     virtual void SAL_CALL disposing (void);
65*b9e67834SAndre Fischer 
66*b9e67834SAndre Fischer     // XSidebarPanel
67*b9e67834SAndre Fischer     virtual cssu::Reference<css::rendering::XCanvas> SAL_CALL getCanvas (void)
68*b9e67834SAndre Fischer         throw (cssu::RuntimeException);
69*b9e67834SAndre Fischer     virtual css::awt::Point SAL_CALL getPositionOnScreen (void)
70*b9e67834SAndre Fischer         throw (cssu::RuntimeException);
71*b9e67834SAndre Fischer     virtual cssu::Reference<css::beans::XPropertySet> SAL_CALL getThemeProperties (void)
72*b9e67834SAndre Fischer         throw (cssu::RuntimeException);
73*b9e67834SAndre Fischer 
74*b9e67834SAndre Fischer private:
75*b9e67834SAndre Fischer     Panel* mpPanel;
76*b9e67834SAndre Fischer     cssu::Reference<css::rendering::XCanvas> mxCanvas;
77*b9e67834SAndre Fischer 
78*b9e67834SAndre Fischer     DECL_LINK(HandleWindowEvent, VclWindowEvent*);
79*b9e67834SAndre Fischer };
80*b9e67834SAndre Fischer 
81*b9e67834SAndre Fischer 
82*b9e67834SAndre Fischer } } // end of namespace sfx2::sidebar
83*b9e67834SAndre Fischer 
84*b9e67834SAndre Fischer #endif
85