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 _E3D_CUBE3D_HXX 25 #define _E3D_CUBE3D_HXX 26 27 #include <svx/obj3d.hxx> 28 #include "svx/svxdllapi.h" 29 30 /************************************************************************* 31 |* 32 |* | 33 |* 3D-Quader erzeugen; aPos: Zentrum oder links, unten, hinten |__ 34 |* (abhaengig von bPosIsCenter) / 35 |* Mit nSideFlags kann angegeben werden, ob nur ein Teil der 36 |* Quaderflaechen erzeugt werden kann; die entsprechenden Bits 37 |* sind in dem enum definiert. Das Flag bDblSided legt fest, 38 |* ob die erzeugten Flaechen doppelseitig sind (nur sinnvoll, 39 |* wenn nicht alle Flaechen erzeugt wurden). 40 |* 41 \************************************************************************/ 42 43 enum { CUBE_BOTTOM = 0x0001, CUBE_BACK = 0x0002, CUBE_LEFT = 0x0004, 44 CUBE_TOP = 0x0008, CUBE_RIGHT = 0x0010, CUBE_FRONT = 0x0020, 45 CUBE_FULL = 0x003F, CUBE_OPEN_TB = 0x0036, CUBE_OPEN_LR = 0x002B, 46 CUBE_OPEN_FB = 0x001D }; 47 48 class SVX_DLLPUBLIC E3dCubeObj : public E3dCompoundObject 49 { 50 private: 51 // Parameter 52 basegfx::B3DPoint aCubePos; 53 basegfx::B3DVector aCubeSize; 54 sal_uInt16 nSideFlags; 55 56 // BOOLeans 57 unsigned bPosIsCenter : 1; 58 59 protected: 60 void SetDefaultAttributes(E3dDefaultAttributes& rDefault); 61 virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact(); 62 63 public: 64 TYPEINFO(); 65 E3dCubeObj(E3dDefaultAttributes& rDefault, basegfx::B3DPoint aPos, const basegfx::B3DVector& r3DSize); 66 E3dCubeObj(); 67 68 virtual sal_uInt16 GetObjIdentifier() const; 69 virtual SdrObject* DoConvertToPolyObj(sal_Bool bBezier, bool bAddText) const; 70 71 virtual void operator=(const SdrObject&); 72 73 // Lokale Parameter setzen mit Geometrieneuerzeugung 74 void SetCubePos(const basegfx::B3DPoint& rNew); GetCubePos()75 const basegfx::B3DPoint& GetCubePos() { return aCubePos; } 76 77 void SetCubeSize(const basegfx::B3DVector& rNew); GetCubeSize()78 const basegfx::B3DVector& GetCubeSize() { return aCubeSize; } 79 80 void SetPosIsCenter(sal_Bool bNew); GetPosIsCenter()81 sal_Bool GetPosIsCenter() { return (sal_Bool)bPosIsCenter; } 82 83 void SetSideFlags(sal_uInt16 nNew); GetSideFlags()84 sal_uInt16 GetSideFlags() { return nSideFlags; } 85 86 // TakeObjName...() ist fuer die Anzeige in der UI, z.B. "3 Rahmen selektiert". 87 virtual void TakeObjNameSingul(String& rName) const; 88 virtual void TakeObjNamePlural(String& rName) const; 89 }; 90 91 #endif // _E3D_CUBE3D_HXX 92