1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org.  If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
25 *
26 ************************************************************************/
27
28#ifndef __com_sun_star_frame_XUIControllerRegistration_idl__
29#define __com_sun_star_frame_XUIControllerRegistration_idl__
30
31#ifndef __com_sun_star_uno_XInterface_idl__
32#include <com/sun/star/uno/XInterface.idl>
33#endif
34
35//=============================================================================
36
37module com { module sun { module star { module frame {
38
39//=============================================================================
40
41/** is used to query, register and unregister user interface controller.
42
43    <p>
44    A user interface controller can be registered for a command URL. A certain user
45    interface controller will be created when a user interface element contains a
46    registered command URL.
47
48    @see PopupMenuControllerFactory
49    </p>
50
51    @since OOo 2.0
52 */
53
54published interface XUIControllerRegistration : com::sun::star::uno::XInterface
55{
56    /** function to check if an user interface controller is registered
57        for a command URL and optional module.
58
59        @returns
60            true if a controller was registered for the combination of command URL
61            and model name.
62
63        @param aCommandURL
64            a command URL which specifies an action.
65
66        @param aModelName
67            an optional name of an OpenOffice model service. This value can remain empty if
68            no model service name was specified.
69    */
70    boolean hasController( [in] string aCommandURL, [in] string aModelName );
71
72    /** function to create an association between a user interface controller implementation
73        and a command URL and optional module.
74
75        @param aCommandURL
76            a command URL which specifies an action which shoudl be associated with a user
77            interface controller.
78
79        @param aModelName
80            an optional name of an OpenOffice model service. This value can remain empty if
81            no model service name was specified.
82
83        @param aControllerImplementationName
84            a UNO implementation name that can be used to create a user interface controller
85            with the OpenOffice service manager.
86    */
87    void registerController( [in] string aCommandURL, [in] string aModelName, [in] string aControllerImplementationName );
88
89    /** function to remove a previously defined association between a user interface controller
90        implementation and a command URL and optional module.
91
92        @param aCommandURL
93            a command URL which specifies an action which shoudl be associated with a user
94            interface controller.
95
96        @param aModelName
97            an optional name of an OpenOffice model service. This value can remain empty if
98            no model service name was specified.
99    */
100    void deregisterController( [in] string aCommandURL, [in] string aModelName );
101};
102
103}; }; }; };
104
105//=============================================================================
106
107#endif
108