bump product version to 4.1.6.2
[LibreOffice.git] / include / svx / cube3d.hxx
blob5d65cc5ad8ea0a00c2ee1d46d4ee6e8a7e160633
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef _E3D_CUBE3D_HXX
21 #define _E3D_CUBE3D_HXX
23 #include <svx/obj3d.hxx>
24 #include "svx/svxdllapi.h"
26 /*************************************************************************
28 |* |
29 |* Create a 3D cuboid; aPos: Center oder left, bottom, behind |__
30 |* (depending on bPosIsCenter) /
31 |* nSideFlags indicates, if only some of the cuboid surfaces can
32 |* be created; the corresponding bits are defined in the enum.
33 |* The flag bDblSided indicates whether the created surfaces are
34 |* two-sided (which only makes sense if not all of the surfaces were
35 |* created).
37 \************************************************************************/
39 enum { CUBE_BOTTOM = 0x0001, CUBE_BACK = 0x0002, CUBE_LEFT = 0x0004,
40 CUBE_TOP = 0x0008, CUBE_RIGHT = 0x0010, CUBE_FRONT = 0x0020,
41 CUBE_FULL = 0x003F, CUBE_OPEN_TB = 0x0036, CUBE_OPEN_LR = 0x002B,
42 CUBE_OPEN_FB = 0x001D };
44 class SVX_DLLPUBLIC E3dCubeObj : public E3dCompoundObject
46 private:
47 // Parameter
48 basegfx::B3DPoint aCubePos;
49 basegfx::B3DVector aCubeSize;
50 sal_uInt16 nSideFlags;
52 // BOOLeans
53 unsigned bPosIsCenter : 1;
55 protected:
56 void SetDefaultAttributes(E3dDefaultAttributes& rDefault);
57 virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact();
59 public:
60 TYPEINFO();
61 E3dCubeObj(E3dDefaultAttributes& rDefault, basegfx::B3DPoint aPos, const basegfx::B3DVector& r3DSize);
62 E3dCubeObj();
64 virtual sal_uInt16 GetObjIdentifier() const;
65 virtual SdrObject* DoConvertToPolyObj(sal_Bool bBezier, bool bAddText) const;
67 virtual E3dCubeObj* Clone() const;
69 // Set local parameters with geometry recreation
70 void SetCubePos(const basegfx::B3DPoint& rNew);
71 const basegfx::B3DPoint& GetCubePos() { return aCubePos; }
73 void SetCubeSize(const basegfx::B3DVector& rNew);
74 const basegfx::B3DVector& GetCubeSize() { return aCubeSize; }
76 void SetPosIsCenter(sal_Bool bNew);
77 sal_Bool GetPosIsCenter() { return (sal_Bool)bPosIsCenter; }
79 sal_uInt16 GetSideFlags() { return nSideFlags; }
81 // TakeObjName...() is for the display in the UI, for example "3 frames selected".
82 virtual void TakeObjNameSingul(String& rName) const;
83 virtual void TakeObjNamePlural(String& rName) const;
86 #endif // _E3D_CUBE3D_HXX
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */