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