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 SVX_SDR_CONTACT_VIEWCONTACTOFUNOCONTROL_HXX
29 #define SVX_SDR_CONTACT_VIEWCONTACTOFUNOCONTROL_HXX
30 
31 /** === begin UNO includes === **/
32 #include <com/sun/star/uno/Reference.hxx>
33 /** === end UNO includes === **/
34 #include <svx/sdr/contact/viewcontactofsdrmediaobj.hxx>
35 #include <svx/svxdllapi.h>
36 
37 #include <memory>
38 
39 class OutputDevice;
40 class Window;
41 class SdrUnoObj;
42 namespace com { namespace sun { namespace star {
43     namespace awt {
44         class XControl;
45         class XControlContainer;
46     }
47 } } }
48 
49 //........................................................................
50 namespace sdr { namespace contact {
51 //........................................................................
52 
53 	//====================================================================
54 	//= ViewContactOfUnoControl
55 	//====================================================================
56     class ViewContactOfUnoControl_Impl;
57     class SVX_DLLPRIVATE ViewContactOfUnoControl : public ViewContactOfSdrObj
58 	{
59     private:
60         ::std::auto_ptr< ViewContactOfUnoControl_Impl >   m_pImpl;
61 
62     public:
63 		// access to SdrObject
64 		SdrUnoObj& GetSdrUnoObj() const
65 		{
66 			return ((SdrUnoObj&)GetSdrObject());
67 		}
68 
69 		ViewContactOfUnoControl( SdrUnoObj& _rUnoObject );
70         virtual ~ViewContactOfUnoControl();
71 
72         /** access control to selected members
73         */
74 		struct SdrUnoObjAccessControl { friend class ::SdrUnoObj; private: SdrUnoObjAccessControl() { } };
75 
76         /** retrieves a temporary XControl instance, whose parent is the given window
77             @seealso SdrUnoObj::GetTemporaryControlForWindow
78         */
79         ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >
80             getTemporaryControlForWindow( const Window& _rWindow, ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >& _inout_ControlContainer ) const;
81 
82     protected:
83 		virtual ViewObjectContact& CreateObjectSpecificViewObjectContact( ObjectContact& _rObjectContact );
84 
85     private:
86         ViewContactOfUnoControl();                                            // never implemented
87         ViewContactOfUnoControl( const ViewContactOfUnoControl& );              // never implemented
88         ViewContactOfUnoControl& operator=( const ViewContactOfUnoControl& );   // never implemented
89 
90 	protected:
91 		// This method is responsible for creating the graphical visualisation data
92         // ONLY based on model data
93 		virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const;
94 	};
95 
96 //........................................................................
97 } } // namespace sdr::contact
98 //........................................................................
99 
100 #endif // SVX_SDR_CONTACT_VIEWCONTACTOFUNOCONTROL_HXX
101 // eof
102