Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 : #ifndef INCLUDED_SVX_SDR_CONTACT_VIEWCONTACTOFUNOCONTROL_HXX
21 : #define INCLUDED_SVX_SDR_CONTACT_VIEWCONTACTOFUNOCONTROL_HXX
22 :
23 : #include <com/sun/star/uno/Reference.hxx>
24 : #include <svx/sdr/contact/viewcontactofsdrmediaobj.hxx>
25 : #include <svx/svxdllapi.h>
26 :
27 : #include <memory>
28 :
29 : class OutputDevice;
30 : class Window;
31 : class SdrUnoObj;
32 : namespace com { namespace sun { namespace star {
33 : namespace awt {
34 : class XControl;
35 : class XControlContainer;
36 : }
37 : } } }
38 :
39 :
40 : namespace sdr { namespace contact {
41 :
42 :
43 :
44 : //= ViewContactOfUnoControl
45 :
46 : class ViewContactOfUnoControl_Impl;
47 : class SVX_DLLPRIVATE ViewContactOfUnoControl : public ViewContactOfSdrObj
48 : {
49 : private:
50 : ::std::auto_ptr< ViewContactOfUnoControl_Impl > m_pImpl;
51 :
52 : public:
53 : // access to SdrObject
54 0 : SdrUnoObj& GetSdrUnoObj() const
55 : {
56 0 : return ((SdrUnoObj&)GetSdrObject());
57 : }
58 :
59 : explicit ViewContactOfUnoControl( SdrUnoObj& _rUnoObject );
60 : virtual ~ViewContactOfUnoControl();
61 :
62 : /** access control to selected members
63 : */
64 : struct SdrUnoObjAccessControl { friend class ::SdrUnoObj; private: SdrUnoObjAccessControl() { } };
65 :
66 : /** retrieves a temporary XControl instance, whose parent is the given window
67 : @seealso SdrUnoObj::GetTemporaryControlForWindow
68 : */
69 : ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >
70 : getTemporaryControlForWindow( const Window& _rWindow, ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >& _inout_ControlContainer ) const;
71 :
72 : protected:
73 : virtual ViewObjectContact& CreateObjectSpecificViewObjectContact( ObjectContact& _rObjectContact ) SAL_OVERRIDE;
74 :
75 : private:
76 : ViewContactOfUnoControl(); // never implemented
77 : ViewContactOfUnoControl( const ViewContactOfUnoControl& ); // never implemented
78 : ViewContactOfUnoControl& operator=( const ViewContactOfUnoControl& ); // never implemented
79 :
80 : protected:
81 : // This method is responsible for creating the graphical visualisation data
82 : // ONLY based on model data
83 : virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const SAL_OVERRIDE;
84 : };
85 :
86 :
87 : } } // namespace sdr::contact
88 :
89 :
90 : #endif // INCLUDED_SVX_SDR_CONTACT_VIEWCONTACTOFUNOCONTROL_HXX
91 :
92 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|