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 <com/sun/star/ui/XSidebarPanel.hpp> 26 27 #include <boost/noncopyable.hpp> 28 #include <cppuhelper/compbase1.hxx> 29 #include <cppuhelper/basemutex.hxx> 30 31 namespace css = ::com::sun::star; 32 namespace cssu = ::com::sun::star::uno; 33 34 namespace 35 { 36 typedef ::cppu::WeakComponentImplHelper1 < 37 css::ui::XSidebarPanel 38 > SidebarPanelInterfaceBase; 39 } 40 41 42 class DockingWindow; 43 44 namespace sfx2 { namespace sidebar { 45 46 class Panel; 47 48 class SidebarPanel 49 : private ::boost::noncopyable, 50 private ::cppu::BaseMutex, 51 public SidebarPanelInterfaceBase 52 { 53 public: 54 static cssu::Reference<css::ui::XSidebarPanel> Create (Panel* pPanel); 55 56 protected: 57 SidebarPanel( 58 Panel* pPanel); 59 virtual ~SidebarPanel (void); 60 61 virtual void SAL_CALL disposing (const css::lang::EventObject& rEventObject) 62 throw(cssu::RuntimeException); 63 64 virtual void SAL_CALL disposing (void); 65 66 // XSidebarPanel 67 virtual cssu::Reference<css::rendering::XCanvas> SAL_CALL getCanvas (void) 68 throw (cssu::RuntimeException); 69 virtual css::awt::Point SAL_CALL getPositionOnScreen (void) 70 throw (cssu::RuntimeException); 71 virtual cssu::Reference<css::beans::XPropertySet> SAL_CALL getThemeProperties (void) 72 throw (cssu::RuntimeException); 73 74 private: 75 Panel* mpPanel; 76 cssu::Reference<css::rendering::XCanvas> mxCanvas; 77 78 DECL_LINK(HandleWindowEvent, VclWindowEvent*); 79 }; 80 81 82 } } // end of namespace sfx2::sidebar 83 84 #endif 85