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 23 24 #ifndef __SVTOOLS_POPUPWINDOWCONTROLLER_HXX_ 25 #define __SVTOOLS_POPUPWINDOWCONTROLLER_HXX_ 26 27 #include "svtools/svtdllapi.h" 28 29 #include <com/sun/star/lang/XServiceInfo.hpp> 30 31 #include "svtools/toolboxcontroller.hxx" 32 #include "boost/scoped_ptr.hpp" 33 34 class Window; 35 36 namespace svt 37 { 38 class PopupWindowControllerImpl; 39 40 class SVT_DLLPUBLIC PopupWindowController : public svt::ToolboxController, public ::com::sun::star::lang::XServiceInfo 41 { 42 public: 43 PopupWindowController( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager, 44 const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame, 45 const rtl::OUString& aCommandURL ); 46 ~PopupWindowController(); 47 48 virtual ::Window* createPopupWindow( ::Window* pParent ) = 0; 49 50 // XInterface 51 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException); 52 virtual void SAL_CALL acquire() throw (); 53 virtual void SAL_CALL release() throw (); 54 55 // XServiceInfo 56 virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException ) = 0; 57 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw( ::com::sun::star::uno::RuntimeException ); 58 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException ) = 0; 59 60 // XInitialization 61 virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); 62 63 // XComponent 64 virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException); 65 66 // XStatusListener 67 virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException ); 68 69 // XToolbarController 70 virtual void SAL_CALL execute( sal_Int16 KeyModifier ) throw (::com::sun::star::uno::RuntimeException); 71 virtual void SAL_CALL click() throw (::com::sun::star::uno::RuntimeException); 72 virtual void SAL_CALL doubleClick() throw (::com::sun::star::uno::RuntimeException); 73 virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL createPopupWindow() throw (::com::sun::star::uno::RuntimeException); 74 virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL createItemWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& Parent ) throw (::com::sun::star::uno::RuntimeException); 75 private: 76 boost::scoped_ptr< PopupWindowControllerImpl > mpImpl; 77 }; 78 79 } // namespace svt 80 81 #endif // __SVTOOLS_POPUPWINDOWCONTROLLER_HXX_ 82