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 __FRAMEWORK_HELPER_DOCKINGAREADEFAULTACCEPTOR_HXX_ 29 #define __FRAMEWORK_HELPER_DOCKINGAREADEFAULTACCEPTOR_HXX_ 30 31 //_________________________________________________________________________________________________________________ 32 // my own includes 33 //_________________________________________________________________________________________________________________ 34 35 #include <classes/framecontainer.hxx> 36 #include <threadhelp/threadhelpbase.hxx> 37 #include <macros/generic.hxx> 38 #include <macros/xinterface.hxx> 39 #include <macros/xtypeprovider.hxx> 40 #include <macros/debug.hxx> 41 42 //_________________________________________________________________________________________________________________ 43 // interface includes 44 //_________________________________________________________________________________________________________________ 45 #include <com/sun/star/ui/XDockingAreaAcceptor.hpp> 46 #include <com/sun/star/frame/XFrame.hpp> 47 48 //_________________________________________________________________________________________________________________ 49 // other includes 50 //_________________________________________________________________________________________________________________ 51 #include <cppuhelper/implbase1.hxx> 52 #include <cppuhelper/weakref.hxx> 53 54 //_________________________________________________________________________________________________________________ 55 // namespace 56 //_________________________________________________________________________________________________________________ 57 58 namespace framework{ 59 60 //_________________________________________________________________________________________________________________ 61 62 63 class DockingAreaDefaultAcceptor : private ThreadHelpBase , 64 public ::cppu::WeakImplHelper1< ::com::sun::star::ui::XDockingAreaAcceptor > 65 { 66 public: 67 68 //--------------------------------------------------------------------------------------------------------- 69 // constructor / destructor 70 //--------------------------------------------------------------------------------------------------------- 71 72 /*-****************************************************************************************************//** 73 @short constructor to initialize this instance 74 @descr A docking area acceptor 75 But we need a instance to create more then one enumerations to the same tasklist! 76 77 @seealso class Desktop 78 @seealso class OTasksEnumeration 79 80 @param "xOwner" is a reference to ouer owner and must be the desktop! 81 @param "pTasks" is a pointer to the taskcontainer of the desktop. We need it to create a new enumeration. 82 @return - 83 84 @onerror Do nothing and reset this object to default with an empty list. 85 *//*-*****************************************************************************************************/ 86 87 DockingAreaDefaultAcceptor( const css::uno::Reference< css::frame::XFrame >& xOwner ); 88 virtual ~DockingAreaDefaultAcceptor(); 89 90 //--------------------------------------------------------------------------------------------------------- 91 // XDockingAreaAcceptor 92 //--------------------------------------------------------------------------------------------------------- 93 94 virtual css::uno::Reference< css::awt::XWindow > SAL_CALL getContainerWindow() throw (css::uno::RuntimeException); 95 virtual sal_Bool SAL_CALL requestDockingAreaSpace( const css::awt::Rectangle& RequestedSpace ) throw (css::uno::RuntimeException); 96 virtual void SAL_CALL setDockingAreaSpace( const css::awt::Rectangle& BorderSpace ) throw (css::uno::RuntimeException); 97 98 99 //------------------------------------------------------------------------------------------------------------- 100 // variables 101 // (should be private everyway!) 102 //------------------------------------------------------------------------------------------------------------- 103 104 private: 105 106 css::uno::WeakReference< css::frame::XFrame > m_xOwner ; /// weak reference to our frame object! 107 }; 108 109 } // namespace framework 110 111 #endif // __FRAMEWORK_HELPER_DOCKINGAREADEFAULTACCEPTOR_HXX_ 112