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#ifndef __com_sun_star_awt_XDockableWindow_idl__
24#define __com_sun_star_awt_XDockableWindow_idl__
25
26#ifndef __com_sun_star_uno_XInterface_idl__
27#include <com/sun/star/uno/XInterface.idl>
28#endif
29
30#ifndef __com_sun_star_awt_XDockableWindowListener_idl__
31#include <com/sun/star/awt/XDockableWindowListener.idl>
32#endif
33
34#ifndef __com_sun_star_awt_Rectangle_idl__
35#include <com/sun/star/awt/Rectangle.idl>
36#endif
37
38//=============================================================================
39
40module com {  module sun {  module star {  module awt {
41
42//=============================================================================
43
44/** specifies the docking interface for a window component.
45
46	<p>A window can either be docked where it resides as a child window in
47        an application frame window or it can be floating where it will
48        reside in its own decorated top level window.
49    </p>
50 */
51interface XDockableWindow : com::sun::star::uno::XInterface
52{
53
54	/** adds a docking listener to the object.
55        only a single listener may be registered at any time.
56	 */
57    void addDockableWindowListener( [in] com::sun::star::awt::XDockableWindowListener xListener );
58
59	//-------------------------------------------------------------------------
60
61	/** removes the specified docking listener from the object.
62	 */
63    void removeDockableWindowListener( [in] com::sun::star::awt::XDockableWindowListener xListener );
64
65	//-------------------------------------------------------------------------
66
67    /** enable or disable docking, docking is disabled by default
68
69        @param bEnable
70            <TRUE/> specifies that docking is enabled
71            <FALSE/> specifies that docking is disabled and no
72                <type scope="com::sun::star::awt">XDockableWindowListener</type> will be called
73	 */
74    void enableDocking( [in] boolean bEnable );
75
76	//-------------------------------------------------------------------------
77
78    /** queries the current window state
79        @returns
80            <TRUE/> if the window is floating
81            <FALSE/> if the window is docked
82	 */
83    boolean isFloating();
84
85	//-------------------------------------------------------------------------
86
87    /** toggle between floating and docked state
88        @param bFloating
89            specifies the new floating mode:
90            <TRUE/> means floating, <FALSE/> means docked
91	 */
92    void setFloatingMode( [in] boolean bFloating );
93
94	//-------------------------------------------------------------------------
95
96    /** prevents the window from being undocked
97        this has no effect if the window is floating
98	 */
99    void lock();
100
101	//-------------------------------------------------------------------------
102
103    /** enables undocking
104        this has no effect if the window is floating
105	 */
106    void unlock();
107
108	//-------------------------------------------------------------------------
109
110    /** queries the current locking state
111        @returns
112            <TRUE/> if the window is locked
113            <FALSE/> if the window is not locked
114	 */
115    boolean isLocked();
116
117	//-------------------------------------------------------------------------
118
119    /** shows the window in a menu like style, i.e. without decoration
120        a special indicator will allow for tearing off the window
121        see <type scope="com::sun::star::awt">XDockableWindowListener</type> for
122        the corresponding events
123        @param WindowRect
124            specifies the position and size of the popup window in frame coordinates
125	 */
126    void startPopupMode( [in] com::sun::star::awt::Rectangle WindowRect );
127
128	//-------------------------------------------------------------------------
129
130    /** queries the current popup mode
131        @returns
132            <TRUE/> if the window is in popup mode
133            <FALSE/> if the window is not in popup mode
134	 */
135    boolean isInPopupMode();
136};
137
138//=============================================================================
139
140}; }; }; };
141
142#endif
143