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 _SDR_CONTACT_VIEWCONTACTOFSDROBJ_HXX
21 : #define _SDR_CONTACT_VIEWCONTACTOFSDROBJ_HXX
22 :
23 : #include <sal/types.h>
24 : #include <svx/sdr/contact/viewcontact.hxx>
25 : #include <svx/sdtakitm.hxx>
26 : #include "svx/svxdllapi.h"
27 :
28 : //////////////////////////////////////////////////////////////////////////////
29 : // predeclarations
30 :
31 : class SdrObject;
32 : class GeoStat;
33 : class Bitmap;
34 :
35 : //////////////////////////////////////////////////////////////////////////////
36 :
37 : namespace sdr
38 : {
39 : namespace contact
40 : {
41 : class SVX_DLLPUBLIC ViewContactOfSdrObj : public ViewContact
42 : {
43 : protected:
44 : // the owner of this ViewContact. Set from constructor and not
45 : // to be changed in any way.
46 : SdrObject& mrObject;
47 :
48 : // Remember AnimationKind of object. Used to find out if that kind
49 : // has changed in ActionChanged()
50 : SdrTextAniKind meRememberedAnimationKind;
51 :
52 : // Create a Object-Specific ViewObjectContact, set ViewContact and
53 : // ObjectContact. Always needs to return something.
54 : virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact);
55 :
56 : public:
57 : // access to SdrObject
58 152896 : SdrObject& GetSdrObject() const
59 : {
60 152896 : return mrObject;
61 : }
62 :
63 : // basic constructor, used from SdrObject.
64 : explicit ViewContactOfSdrObj(SdrObject& rObj);
65 : virtual ~ViewContactOfSdrObj();
66 :
67 : // Access to possible sub-hierarchy
68 : virtual sal_uInt32 GetObjectCount() const;
69 : virtual ViewContact& GetViewContact(sal_uInt32 nIndex) const;
70 : virtual ViewContact* GetParentContact() const;
71 :
72 : // React on changes of the object of this ViewContact
73 : virtual void ActionChanged();
74 :
75 : // overload for acessing the SdrObject
76 : virtual SdrObject* TryToGetSdrObject() const;
77 :
78 : //////////////////////////////////////////////////////////////////////////////
79 : // primitive stuff
80 :
81 : // add Gluepoints (if available)
82 : virtual drawinglayer::primitive2d::Primitive2DSequence createGluePointPrimitive2DSequence() const;
83 : };
84 : } // end of namespace contact
85 : } // end of namespace sdr
86 :
87 : //////////////////////////////////////////////////////////////////////////////
88 :
89 : #endif //_SDR_CONTACT_VIEWCONTACTOFSDROBJ_HXX
90 :
91 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|