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