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 _SDR_CONTACT_VIEWCONTACTOFSDROBJ_HXX 25 #define _SDR_CONTACT_VIEWCONTACTOFSDROBJ_HXX 26 27 #include <sal/types.h> 28 #include <svx/sdr/contact/viewcontact.hxx> 29 #include <svx/sdtakitm.hxx> 30 #include "svx/svxdllapi.h" 31 32 ////////////////////////////////////////////////////////////////////////////// 33 // predeclarations 34 35 class SdrObject; 36 class GeoStat; 37 class Bitmap; 38 39 ////////////////////////////////////////////////////////////////////////////// 40 41 namespace sdr 42 { 43 namespace contact 44 { 45 class SVX_DLLPUBLIC ViewContactOfSdrObj : public ViewContact 46 { 47 protected: 48 // the owner of this ViewContact. Set from constructor and not 49 // to be changed in any way. 50 SdrObject& mrObject; 51 52 // Remember AnimationKind of object. Used to find out if that kind 53 // has changed in ActionChanged() 54 SdrTextAniKind meRememberedAnimationKind; 55 56 // Create a Object-Specific ViewObjectContact, set ViewContact and 57 // ObjectContact. Always needs to return something. 58 virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact); 59 60 public: 61 // access to SdrObject GetSdrObject() const62 SdrObject& GetSdrObject() const 63 { 64 return mrObject; 65 } 66 67 // basic constructor, used from SdrObject. 68 ViewContactOfSdrObj(SdrObject& rObj); 69 virtual ~ViewContactOfSdrObj(); 70 71 // Access to possible sub-hierarchy 72 virtual sal_uInt32 GetObjectCount() const; 73 virtual ViewContact& GetViewContact(sal_uInt32 nIndex) const; 74 virtual ViewContact* GetParentContact() const; 75 76 // React on changes of the object of this ViewContact 77 virtual void ActionChanged(); 78 79 // overload for acessing the SdrObject 80 virtual SdrObject* TryToGetSdrObject() const; 81 82 ////////////////////////////////////////////////////////////////////////////// 83 // primitive stuff 84 85 // add Gluepoints (if available) 86 virtual drawinglayer::primitive2d::Primitive2DSequence createGluePointPrimitive2DSequence() const; 87 88 // allow embedding if needed (e.g. for SdrObjects, evtl. Name, Title and description get added). This 89 // is a helper normally used from getViewIndependentPrimitive2DSequence(), but there is one exception 90 // for 3D scenes 91 virtual drawinglayer::primitive2d::Primitive2DSequence embedToObjectSpecificInformation(const drawinglayer::primitive2d::Primitive2DSequence& rSource) const; 92 }; 93 } // end of namespace contact 94 } // end of namespace sdr 95 96 ////////////////////////////////////////////////////////////////////////////// 97 98 #endif //_SDR_CONTACT_VIEWCONTACTOFSDROBJ_HXX 99 100 // eof 101