Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / include / svx / deflt3d.hxx
blob5aaa0b8bdcdc96bcf198c0114d50e6713ff2eca0
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 INCLUDED_SVX_DEFLT3D_HXX
21 #define INCLUDED_SVX_DEFLT3D_HXX
23 #include <basegfx/point/b3dpoint.hxx>
24 #include <basegfx/vector/b3dvector.hxx>
25 #include <svx/svxdllapi.h>
26 #include <tools/color.hxx>
28 enum class CubeFaces;
30 /*************************************************************************
32 |* Class for managing the 3D default attributes
34 \************************************************************************/
36 class SAL_WARN_UNUSED SVX_DLLPUBLIC E3dDefaultAttributes
38 private:
39 // Compound object
40 Color aDefaultAmbientColor;
41 bool bDefaultCreateNormals;
42 bool bDefaultCreateTexture;
44 // Cube object
45 basegfx::B3DPoint aDefaultCubePos;
46 basegfx::B3DVector aDefaultCubeSize;
47 CubeFaces nDefaultCubeSideFlags;
48 bool bDefaultCubePosIsCenter;
50 // Sphere object
51 basegfx::B3DPoint aDefaultSphereCenter;
52 basegfx::B3DVector aDefaultSphereSize;
54 // Lathe object
55 long nDefaultLatheEndAngle;
56 bool bDefaultLatheSmoothed;
57 bool bDefaultLatheSmoothFrontBack;
58 bool bDefaultLatheCharacterMode;
59 bool bDefaultLatheCloseFront;
60 bool bDefaultLatheCloseBack;
62 // Extrude object
63 bool bDefaultExtrudeSmoothed;
64 bool bDefaultExtrudeSmoothFrontBack;
65 bool bDefaultExtrudeCharacterMode;
66 bool bDefaultExtrudeCloseFront;
67 bool bDefaultExtrudeCloseBack;
69 public:
70 // Constructor
71 E3dDefaultAttributes();
73 // Reset to defaults
74 void Reset();
76 // Getter/Setter for default values of all 3D objects
77 // Compound object
78 const Color& GetDefaultAmbientColor() { return aDefaultAmbientColor; }
80 bool GetDefaultCreateNormals() const { return bDefaultCreateNormals; }
81 bool GetDefaultCreateTexture() const { return bDefaultCreateTexture; }
83 // Cube object
84 const basegfx::B3DPoint& GetDefaultCubePos() { return aDefaultCubePos; }
85 const basegfx::B3DVector& GetDefaultCubeSize() { return aDefaultCubeSize; }
86 CubeFaces GetDefaultCubeSideFlags() const { return nDefaultCubeSideFlags; }
87 bool GetDefaultCubePosIsCenter() const { return bDefaultCubePosIsCenter; }
89 // Sphere object
90 const basegfx::B3DPoint& GetDefaultSphereCenter() { return aDefaultSphereCenter; }
91 const basegfx::B3DVector& GetDefaultSphereSize() { return aDefaultSphereSize; }
93 // Lathe object
94 bool GetDefaultLatheSmoothed() const { return bDefaultLatheSmoothed; }
95 bool GetDefaultLatheSmoothFrontBack() const { return bDefaultLatheSmoothFrontBack; }
96 bool GetDefaultLatheCharacterMode() const { return bDefaultLatheCharacterMode; }
97 void SetDefaultLatheCharacterMode(const bool bNew) { bDefaultLatheCharacterMode = bNew; }
98 bool GetDefaultLatheCloseFront() const { return bDefaultLatheCloseFront; }
99 bool GetDefaultLatheCloseBack() const { return bDefaultLatheCloseBack; }
101 // Extrude object
102 bool GetDefaultExtrudeSmoothed() const { return bDefaultExtrudeSmoothed; }
103 bool GetDefaultExtrudeSmoothFrontBack() const { return bDefaultExtrudeSmoothFrontBack; }
104 bool GetDefaultExtrudeCharacterMode() const { return bDefaultExtrudeCharacterMode; }
105 void SetDefaultExtrudeCharacterMode(const bool bNew) { bDefaultExtrudeCharacterMode = bNew; }
106 bool GetDefaultExtrudeCloseFront() const { return bDefaultExtrudeCloseFront; }
107 void SetDefaultExtrudeCloseFront(const bool bNew) { bDefaultExtrudeCloseFront = bNew; }
108 bool GetDefaultExtrudeCloseBack() const { return bDefaultExtrudeCloseBack; }
109 void SetDefaultExtrudeCloseBack(const bool bNew) { bDefaultExtrudeCloseBack = bNew; }
112 #endif // INCLUDED_SVX_DEFLT3D_HXX
114 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */