xref: /aoo4110/main/offapi/com/sun/star/ui/XUIElement.idl (revision b1cdbd2c)
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_ui_XUIElement_idl__
25#define __com_sun_star_ui_XUIElement_idl__
26
27#ifndef __com_sun_star_uno_XInterface_idl__
28#include <com/sun/star/uno/XInterface.idl>
29#endif
30
31#ifndef __com_sun_star_beans_XPropertySet_idl__
32#include <com/sun/star/beans/XPropertySet.idl>
33#endif
34
35#ifndef __com_sun_star_frame_XFrame_idl__
36#include <com/sun/star/frame/XFrame.idl>
37#endif
38
39//=============================================================================
40
41module com { module sun { module star { module ui {
42
43//=============================================================================
44
45/** provides a function to retrieve a special purpose interface dependent
46    on the user interface element type.
47
48    <p>
49    The type of the interface depends on the real type of the user interface
50    element. A menubar user interface element provides access to its
51    <type scope="com::sun::star::awt">XSystemDependentMenuBarPeer</type>
52    which supports to retrieve the system dependent menu handle.
53    A floating window or a toolbar user interface element return a
54    <type scope=com::sun::star::awt>XWindow</type>
55    interface.
56    </p>
57*/
58
59published interface XUIElement : com::sun::star::uno::XInterface
60{
61    /** returns an interface to get access to user interface type specific functions.
62
63        @return
64            a special purpose interface which depends on the type of the user
65            interface element.
66    */
67    ::com::sun::star::uno::XInterface getRealInterface();
68
69    /** determines the document frame to which this element is bound to.
70
71        <p>The life time of a user interface element does not explicitly depend on the
72        frame itself but on the visible component attached to the frame. It is possible
73        to exchange the visible component of a frame and that will lead to the end of
74        life of all user interface elements.</p>
75    */
76    [readonly, attribute] ::com::sun::star::frame::XFrame Frame;
77
78    /** a resource URL which is a unique identifier of a user interface element.
79    */
80    [readonly, attribute] string ResourceURL;
81
82    /** determines the type of the user interface element.
83
84        @see UIElementType
85    */
86    [readonly, attribute] short  Type;
87};
88
89}; }; }; };
90
91//=============================================================================
92
93#endif
94