1f8e07b45SAndrew Rist /************************************************************** 2dccf82beSAriel Constenla-Haile * 3f8e07b45SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4f8e07b45SAndrew Rist * or more contributor license agreements. See the NOTICE file 5f8e07b45SAndrew Rist * distributed with this work for additional information 6f8e07b45SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7f8e07b45SAndrew Rist * to you under the Apache License, Version 2.0 (the 8f8e07b45SAndrew Rist * "License"); you may not use this file except in compliance 9f8e07b45SAndrew Rist * with the License. You may obtain a copy of the License at 10dccf82beSAriel Constenla-Haile * 11f8e07b45SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12dccf82beSAriel Constenla-Haile * 13f8e07b45SAndrew Rist * Unless required by applicable law or agreed to in writing, 14f8e07b45SAndrew Rist * software distributed under the License is distributed on an 15f8e07b45SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16f8e07b45SAndrew Rist * KIND, either express or implied. See the License for the 17f8e07b45SAndrew Rist * specific language governing permissions and limitations 18f8e07b45SAndrew Rist * under the License. 19dccf82beSAriel Constenla-Haile * 20f8e07b45SAndrew Rist *************************************************************/ 21f8e07b45SAndrew Rist 22dccf82beSAriel Constenla-Haile #ifndef __FRAMEWORK_UICONTROLLERFACTORY_HXX_ 23dccf82beSAriel Constenla-Haile #define __FRAMEWORK_UICONTROLLERFACTORY_HXX_ 24cdf0e10cSrcweir 25cdf0e10cSrcweir #include <threadhelp/threadhelpbase.hxx> 26cdf0e10cSrcweir #include <macros/generic.hxx> 27cdf0e10cSrcweir #include <macros/xinterface.hxx> 28cdf0e10cSrcweir #include <macros/xtypeprovider.hxx> 29cdf0e10cSrcweir #include <macros/xserviceinfo.hxx> 30cdf0e10cSrcweir #include <stdtypes.h> 31cdf0e10cSrcweir 32cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp> 33cdf0e10cSrcweir #include <com/sun/star/lang/XTypeProvider.hpp> 34dccf82beSAriel Constenla-Haile #include <com/sun/star/frame/XUIControllerFactory.hpp> 35cdf0e10cSrcweir 36dccf82beSAriel Constenla-Haile #include <cppuhelper/implbase2.hxx> 37cdf0e10cSrcweir 38cdf0e10cSrcweir namespace framework 39cdf0e10cSrcweir { 40cdf0e10cSrcweir 41cdf0e10cSrcweir class ConfigurationAccess_ControllerFactory; 42*30acf5e8Spfg class UIControllerFactory : protected ThreadHelpBase, // Struct for right initialization of mutex member! Must be first of baseclasses. 43dccf82beSAriel Constenla-Haile public ::cppu::WeakImplHelper2< 44dccf82beSAriel Constenla-Haile com::sun::star::lang::XServiceInfo, 45dccf82beSAriel Constenla-Haile com::sun::star::frame::XUIControllerFactory > 46cdf0e10cSrcweir { 47dccf82beSAriel Constenla-Haile public: 48dccf82beSAriel Constenla-Haile virtual ~UIControllerFactory(); 49cdf0e10cSrcweir 50dccf82beSAriel Constenla-Haile // XServiceInfo 51dccf82beSAriel Constenla-Haile virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException) = 0; 52dccf82beSAriel Constenla-Haile virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException) = 0; 53dccf82beSAriel Constenla-Haile virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException) = 0; 54cdf0e10cSrcweir 55cdf0e10cSrcweir // XMultiComponentFactory 56cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstanceWithContext( const ::rtl::OUString& aServiceSpecifier, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& Context ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); 57cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstanceWithArgumentsAndContext( const ::rtl::OUString& ServiceSpecifier, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Arguments, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& Context ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); 58cdf0e10cSrcweir virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getAvailableServiceNames() throw (::com::sun::star::uno::RuntimeException); 59cdf0e10cSrcweir 60cdf0e10cSrcweir // XUIControllerRegistration 61cdf0e10cSrcweir virtual sal_Bool SAL_CALL hasController( const ::rtl::OUString& aCommandURL, const rtl::OUString& aModuleName ) throw (::com::sun::star::uno::RuntimeException); 62cdf0e10cSrcweir virtual void SAL_CALL registerController( const ::rtl::OUString& aCommandURL, const rtl::OUString& aModuleName, const ::rtl::OUString& aControllerImplementationName ) throw (::com::sun::star::uno::RuntimeException); 63cdf0e10cSrcweir virtual void SAL_CALL deregisterController( const ::rtl::OUString& aCommandURL, const rtl::OUString& aModuleName ) throw (::com::sun::star::uno::RuntimeException); 64cdf0e10cSrcweir 65cdf0e10cSrcweir protected: 66dccf82beSAriel Constenla-Haile UIControllerFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager, const rtl::OUString &rUINode ); 67cdf0e10cSrcweir sal_Bool m_bConfigRead; 68cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager; 69cdf0e10cSrcweir ConfigurationAccess_ControllerFactory* m_pConfigAccess; 70cdf0e10cSrcweir }; 71cdf0e10cSrcweir 72dccf82beSAriel Constenla-Haile class PopupMenuControllerFactory : public UIControllerFactory 73dccf82beSAriel Constenla-Haile { 74dccf82beSAriel Constenla-Haile public: 75dccf82beSAriel Constenla-Haile PopupMenuControllerFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ); 76dccf82beSAriel Constenla-Haile 77dccf82beSAriel Constenla-Haile // XInterface, XTypeProvider, XServiceInfo 78dccf82beSAriel Constenla-Haile DECLARE_XSERVICEINFO 79dccf82beSAriel Constenla-Haile }; 80dccf82beSAriel Constenla-Haile 81dccf82beSAriel Constenla-Haile class ToolbarControllerFactory : public UIControllerFactory 82dccf82beSAriel Constenla-Haile { 83dccf82beSAriel Constenla-Haile public: 84dccf82beSAriel Constenla-Haile ToolbarControllerFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ); 85dccf82beSAriel Constenla-Haile 86dccf82beSAriel Constenla-Haile // XInterface, XTypeProvider, XServiceInfo 87dccf82beSAriel Constenla-Haile DECLARE_XSERVICEINFO 88dccf82beSAriel Constenla-Haile }; 89dccf82beSAriel Constenla-Haile 90dccf82beSAriel Constenla-Haile class StatusbarControllerFactory : public UIControllerFactory 91dccf82beSAriel Constenla-Haile { 92dccf82beSAriel Constenla-Haile public: 93dccf82beSAriel Constenla-Haile StatusbarControllerFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ); 94dccf82beSAriel Constenla-Haile 95dccf82beSAriel Constenla-Haile // XInterface, XTypeProvider, XServiceInfo 96dccf82beSAriel Constenla-Haile DECLARE_XSERVICEINFO 97dccf82beSAriel Constenla-Haile }; 98dccf82beSAriel Constenla-Haile 99dccf82beSAriel Constenla-Haile } 100cdf0e10cSrcweir 101dccf82beSAriel Constenla-Haile #endif // __FRAMEWORK_UICONTROLLERFACTORY_HXX_ 102