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