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 __com_sun_star_frame_XUIControllerRegistration_idl__
25#define __com_sun_star_frame_XUIControllerRegistration_idl__
26
27#ifndef __com_sun_star_uno_XInterface_idl__
28#include <com/sun/star/uno/XInterface.idl>
29#endif
30
31//=============================================================================
32
33module com { module sun { module star { module frame {
34
35//=============================================================================
36
37/** is used to query, register and unregister user interface controller.
38
39    <p>
40    A user interface controller can be registered for a command URL. A certain user
41    interface controller will be created when a user interface element contains a
42    registered command URL.
43
44    @see PopupMenuControllerFactory
45    </p>
46
47    @since OpenOffice 2.0
48 */
49
50published interface XUIControllerRegistration : com::sun::star::uno::XInterface
51{
52    /** function to check if an user interface controller is registered
53        for a command URL and optional module.
54
55        @returns
56            true if a controller was registered for the combination of command URL
57            and model name.
58
59        @param aCommandURL
60            a command URL which specifies an action.
61
62        @param aModelName
63            an optional name of an OpenOffice model service. This value can remain empty if
64            no model service name was specified.
65    */
66    boolean hasController( [in] string aCommandURL, [in] string aModelName );
67
68    /** function to create an association between a user interface controller implementation
69        and a command URL and optional module.
70
71        @param aCommandURL
72            a command URL which specifies an action which shoudl be associated with a user
73            interface controller.
74
75        @param aModelName
76            an optional name of an OpenOffice model service. This value can remain empty if
77            no model service name was specified.
78
79        @param aControllerImplementationName
80            a UNO implementation name that can be used to create a user interface controller
81            with the OpenOffice service manager.
82    */
83    void registerController( [in] string aCommandURL, [in] string aModelName, [in] string aControllerImplementationName );
84
85    /** function to remove a previously defined association between a user interface controller
86        implementation and a command URL and optional module.
87
88        @param aCommandURL
89            a command URL which specifies an action which shoudl be associated with a user
90            interface controller.
91
92        @param aModelName
93            an optional name of an OpenOffice model service. This value can remain empty if
94            no model service name was specified.
95    */
96    void deregisterController( [in] string aCommandURL, [in] string aModelName );
97};
98
99}; }; }; };
100
101//=============================================================================
102
103#endif
104