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