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_XPopupMenuController_idl__
25#define __com_sun_star_frame_XPopupMenuController_idl__
26
27#ifndef __com_sun_star_awt_XPopupMenu_idl__
28#include <com/sun/star/awt/XPopupMenu.idl>
29#endif
30
31//=============================================================================
32
33module com { module sun { module star { module frame {
34
35//=============================================================================
36
37/** provides data to a popup menu controller implementation to
38    fill and update a popup menu dynamically.
39
40    <p>
41    A popup menu controller gets a <type scope="com::sun::star::awt">XPopupMenu</type>
42    from its parent menu implementation. The controller has to fill this popup
43    menu with a set of menu items and/or sub menus. The parent menu implementation
44    briefs the controller whenever the popup menu gets activated by a user.
45    </p>
46
47    @since OpenOffice 2.0
48*/
49interface XPopupMenuController : com::sun::star::uno::XInterface
50{
51    /** provides a <type scope="com::sun::star::awt">XPopupMenu</type> to a
52        popup menu controller implementation. The controller must fill this
53        popup menu with its functions.
54
55        @param PopupMenu
56            An empty popup menu that must be filled by the popup menu controller.
57    */
58    void setPopupMenu( [in] com::sun::star::awt::XPopupMenu PopupMenu );
59
60    /** briefs the popup menu controller to update the contents of the provided
61        popup menu to reflect the current state.
62
63        <p>A controller should <b>never</b> update the popup menu structure on its
64        own to prevent performance problems. A better way would be that a controller
65        registers itself as status listener to for a command URL and immediately
66        deregister after that. Therefor status updates will not be send regularly
67        for a non visible popup menu.
68        </p>
69    */
70    void updatePopupMenu();
71};
72
73}; }; }; };
74
75//=============================================================================
76
77#endif
78