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