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 _SVT_HATCHWINDOW_HXX
25 #define _SVT_HATCHWINDOW_HXX
26 
27 #include <com/sun/star/embed/XHatchWindow.hpp>
28 
29 #include <toolkit/awt/vclxwindow.hxx>
30 #include <cppuhelper/typeprovider.hxx>
31 
32 class SvResizeWindow;
33 class VCLXHatchWindow : public ::com::sun::star::embed::XHatchWindow,
34                         public VCLXWindow
35 {
36 	::com::sun::star::uno::Reference< ::com::sun::star::embed::XHatchWindowController > m_xController;
37     ::com::sun::star::awt::Size aHatchBorderSize;
38     SvResizeWindow* pHatchWindow;
39 
40 public:
41 	VCLXHatchWindow();
42 	~VCLXHatchWindow();
43 
44 	void initializeWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& xParent,
45 				const ::com::sun::star::awt::Rectangle& aBounds,
46 				const ::com::sun::star::awt::Size& aSize );
47 
48 	void QueryObjAreaPixel( Rectangle & );
49 	void RequestObjAreaPixel( const Rectangle & );
50 	void InplaceDeactivate();
51     void Activated();
52     void Deactivated();
53 
54 	// XInterface
55 	::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& rType ) throw(::com::sun::star::uno::RuntimeException);
56 	void SAL_CALL acquire() throw();
57 	void SAL_CALL release() throw();
58 
59 	// XTypeProvider
60 	::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException);
61 	::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
62 
63 	// XHatchWindow
64 	virtual void SAL_CALL setController( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XHatchWindowController >& xController ) throw (::com::sun::star::uno::RuntimeException);
65     virtual ::com::sun::star::awt::Size SAL_CALL getHatchBorderSize() throw (::com::sun::star::uno::RuntimeException);
66     virtual void SAL_CALL setHatchBorderSize( const ::com::sun::star::awt::Size& _hatchbordersize ) throw (::com::sun::star::uno::RuntimeException);
67 
68 	// XComponent
69     virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException);
70     virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
71     virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
72 };
73 
74 #endif // _SVT_HATCHWINDOW_HXX
75 
76