tdf#130857 qt weld: Implement QtInstanceWidget::get_text_height
[LibreOffice.git] / include / svx / svx3ditems.hxx
blobc749b7eab112adbae56e3912712e2fd89893ee54
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 .
19 #ifndef INCLUDED_SVX_SVX3DITEMS_HXX
20 #define INCLUDED_SVX_SVX3DITEMS_HXX
22 #include <config_options.h>
23 #include <svl/intitem.hxx>
24 #include <svl/eitem.hxx>
27 #include <editeng/colritem.hxx>
28 #include <svx/e3ditem.hxx>
29 #include <svx/viewpt3d.hxx>
30 #include <svx/svddef.hxx>
31 #include <svx/svxdllapi.h>
33 // Svx3D _3DOBJ_ Items
34 inline SfxUInt16Item makeSvx3DPercentDiagonalItem(sal_uInt16 nVal) {
35 return SfxUInt16Item(SDRATTR_3DOBJ_PERCENT_DIAGONAL, nVal);
38 inline SfxUInt16Item makeSvx3DBackscaleItem(sal_uInt16 nVal) {
39 return SfxUInt16Item(SDRATTR_3DOBJ_BACKSCALE, nVal);
42 inline SfxUInt32Item makeSvx3DDepthItem(sal_uInt32 nVal) {
43 return SfxUInt32Item(SDRATTR_3DOBJ_DEPTH, nVal);
46 inline SfxUInt32Item makeSvx3DHorizontalSegmentsItem(sal_uInt32 nVal) {
47 return SfxUInt32Item(SDRATTR_3DOBJ_HORZ_SEGS, nVal);
50 inline SfxUInt32Item makeSvx3DVerticalSegmentsItem(sal_uInt32 nVal) {
51 return SfxUInt32Item(SDRATTR_3DOBJ_VERT_SEGS, nVal);
54 inline SfxUInt32Item makeSvx3DEndAngleItem(sal_uInt32 nVal) {
55 return SfxUInt32Item(SDRATTR_3DOBJ_END_ANGLE, nVal);
58 inline SfxBoolItem makeSvx3DDoubleSidedItem(bool bVal) {
59 return SfxBoolItem(SDRATTR_3DOBJ_DOUBLE_SIDED, bVal);
62 // #i28528#
63 // Added extra Item (Bool) for chart2 to be able to show reduced line geometry
64 class Svx3DReducedLineGeometryItem final : public SfxBoolItem {
65 public:
66 Svx3DReducedLineGeometryItem(bool bVal = false);
67 Svx3DReducedLineGeometryItem* Clone(SfxItemPool * = nullptr) const override;
70 class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DNormalsKindItem final : public SfxUInt16Item {
71 public:
72 Svx3DNormalsKindItem(sal_uInt16 nVal = 0);
74 // use drawing::NormalsKind
75 SVX_DLLPRIVATE virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
76 SVX_DLLPRIVATE virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
77 SVX_DLLPRIVATE virtual Svx3DNormalsKindItem* Clone(SfxItemPool* pPool = nullptr) const override;
80 inline SfxBoolItem makeSvx3DNormalsInvertItem(bool bVal) {
81 return SfxBoolItem(SDRATTR_3DOBJ_NORMALS_INVERT, bVal);
84 class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DTextureProjectionXItem final : public SfxUInt16Item {
85 public:
86 Svx3DTextureProjectionXItem(sal_uInt16 nVal = 0);
88 // use drawing::TextureProjectionMode
89 SVX_DLLPRIVATE virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
90 SVX_DLLPRIVATE virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
91 SVX_DLLPRIVATE virtual Svx3DTextureProjectionXItem* Clone(SfxItemPool* pPool = nullptr) const override;
94 class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DTextureProjectionYItem final : public SfxUInt16Item {
95 public:
96 Svx3DTextureProjectionYItem(sal_uInt16 nVal = 0);
98 // use drawing::TextureProjectionMode
99 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
100 virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
101 virtual Svx3DTextureProjectionYItem* Clone(SfxItemPool* pPool = nullptr) const override;
104 inline SfxBoolItem makeSvx3DShadow3DItem(bool bVal) {
105 return SfxBoolItem(SDRATTR_3DOBJ_SHADOW_3D, bVal);
108 inline SvxColorItem makeSvx3DMaterialEmissionItem(const Color& rCol) {
109 return SvxColorItem(rCol, SDRATTR_3DOBJ_MAT_EMISSION);
112 inline SvxColorItem makeSvx3DMaterialSpecularItem(const Color& rCol) {
113 return SvxColorItem(rCol, SDRATTR_3DOBJ_MAT_SPECULAR);
116 inline SfxUInt16Item makeSvx3DMaterialSpecularIntensityItem(sal_uInt16 nVal) {
117 return SfxUInt16Item(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY, nVal);
120 class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DTextureKindItem final : public SfxUInt16Item {
121 public:
122 Svx3DTextureKindItem(sal_uInt16 nVal = 2);
124 // use drawing::TextureKind2
125 SVX_DLLPRIVATE virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
126 SVX_DLLPRIVATE virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
127 SVX_DLLPRIVATE virtual Svx3DTextureKindItem* Clone(SfxItemPool* pPool = nullptr) const override;
130 class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DTextureModeItem final : public SfxUInt16Item {
131 public:
132 Svx3DTextureModeItem(sal_uInt16 nVal = 2);
134 // use drawing:TextureMode
135 SVX_DLLPRIVATE virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
136 SVX_DLLPRIVATE virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
137 SVX_DLLPRIVATE virtual Svx3DTextureModeItem* Clone(SfxItemPool* pPool = nullptr) const override;
140 inline SfxBoolItem makeSvx3DTextureFilterItem(bool bVal) {
141 return SfxBoolItem(SDRATTR_3DOBJ_TEXTURE_FILTER, bVal);
144 // Svx3D _3DSCENE_ Items
145 class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DPerspectiveItem final : public SfxUInt16Item {
146 public:
147 Svx3DPerspectiveItem(ProjectionType nVal = ProjectionType::Perspective);
149 // use drawing::ProjectionMode
150 SVX_DLLPRIVATE virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
151 SVX_DLLPRIVATE virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
152 SVX_DLLPRIVATE virtual Svx3DPerspectiveItem* Clone(SfxItemPool* pPool = nullptr) const override;
155 inline SfxUInt32Item makeSvx3DDistanceItem(sal_uInt32 nVal) {
156 return SfxUInt32Item(SDRATTR_3DSCENE_DISTANCE, nVal);
159 inline SfxUInt32Item makeSvx3DFocalLengthItem(sal_uInt32 nVal) {
160 return SfxUInt32Item(SDRATTR_3DSCENE_FOCAL_LENGTH, nVal);
163 inline SfxBoolItem makeSvx3DTwoSidedLightingItem(bool bVal) {
164 return SfxBoolItem(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING, bVal);
167 inline SvxColorItem makeSvx3DLightcolor1Item(const Color& rCol) {
168 return SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_1);
171 inline SvxColorItem makeSvx3DLightcolor2Item(const Color& rCol) {
172 return SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_2);
175 inline SvxColorItem makeSvx3DLightcolor3Item(const Color& rCol) {
176 return SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_3);
179 inline SvxColorItem makeSvx3DLightcolor4Item(const Color& rCol) {
180 return SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_4);
183 inline SvxColorItem makeSvx3DLightcolor5Item(const Color& rCol) {
184 return SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_5);
187 inline SvxColorItem makeSvx3DLightcolor6Item(const Color& rCol) {
188 return SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_6);
191 inline SvxColorItem makeSvx3DLightcolor7Item(const Color& rCol) {
192 return SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_7);
195 inline SvxColorItem makeSvx3DLightcolor8Item(const Color& rCol) {
196 return SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_8);
199 inline SvxColorItem makeSvx3DAmbientcolorItem(const Color& rCol) {
200 return SvxColorItem(rCol, SDRATTR_3DSCENE_AMBIENTCOLOR);
203 inline SfxBoolItem makeSvx3DLightOnOff1Item(bool bVal) {
204 return SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_1, bVal);
207 inline SfxBoolItem makeSvx3DLightOnOff2Item(bool bVal) {
208 return SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_2, bVal);
211 inline SfxBoolItem makeSvx3DLightOnOff3Item(bool bVal) {
212 return SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_3, bVal);
215 inline SfxBoolItem makeSvx3DLightOnOff4Item(bool bVal) {
216 return SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_4, bVal);
219 inline SfxBoolItem makeSvx3DLightOnOff5Item(bool bVal) {
220 return SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_5, bVal);
223 inline SfxBoolItem makeSvx3DLightOnOff6Item(bool bVal) {
224 return SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_6, bVal);
227 inline SfxBoolItem makeSvx3DLightOnOff7Item(bool bVal) {
228 return SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_7, bVal);
231 inline SfxBoolItem makeSvx3DLightOnOff8Item(bool bVal) {
232 return SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_8, bVal);
235 inline SvxB3DVectorItem makeSvx3DLightDirection1Item(const basegfx::B3DVector& rVec) {
236 return SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_1, rVec);
239 inline SvxB3DVectorItem makeSvx3DLightDirection2Item(const basegfx::B3DVector& rVec) {
240 return SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_2, rVec);
243 inline SvxB3DVectorItem makeSvx3DLightDirection3Item(const basegfx::B3DVector& rVec) {
244 return SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_3, rVec);
247 inline SvxB3DVectorItem makeSvx3DLightDirection4Item(const basegfx::B3DVector& rVec) {
248 return SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_4, rVec);
251 inline SvxB3DVectorItem makeSvx3DLightDirection5Item(const basegfx::B3DVector& rVec) {
252 return SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_5, rVec);
255 inline SvxB3DVectorItem makeSvx3DLightDirection6Item(const basegfx::B3DVector& rVec) {
256 return SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_6, rVec);
259 inline SvxB3DVectorItem makeSvx3DLightDirection7Item(const basegfx::B3DVector& rVec) {
260 return SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_7, rVec);
263 inline SvxB3DVectorItem makeSvx3DLightDirection8Item(const basegfx::B3DVector& rVec) {
264 return SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_8, rVec);
267 inline SfxUInt16Item makeSvx3DShadowSlantItem(sal_uInt16 nVal) {
268 return SfxUInt16Item(SDRATTR_3DSCENE_SHADOW_SLANT, nVal);
271 class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DShadeModeItem final : public SfxUInt16Item {
272 public:
273 Svx3DShadeModeItem(sal_uInt16 nVal = 2);
275 // use drawing::ShadeMode
276 SVX_DLLPRIVATE virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
277 SVX_DLLPRIVATE virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
278 SVX_DLLPRIVATE virtual Svx3DShadeModeItem* Clone(SfxItemPool* pPool = nullptr) const override;
282 // #107245# Item to replace bExtrudeSmoothed and bLatheSmoothed
283 class Svx3DSmoothNormalsItem final : public SfxBoolItem {
284 public:
285 Svx3DSmoothNormalsItem(bool bVal = true);
286 Svx3DSmoothNormalsItem* Clone(SfxItemPool * = nullptr) const override;
289 // #107245# Item to replace bExtrudeSmoothFrontBack and bLatheSmoothFrontBack
290 class Svx3DSmoothLidsItem final : public SfxBoolItem {
291 public:
292 Svx3DSmoothLidsItem(bool bVal = false);
293 Svx3DSmoothLidsItem* Clone(SfxItemPool * = nullptr) const override;
296 // #107245# Item to replace bExtrudeCharacterMode and bLatheCharacterMode
297 class Svx3DCharacterModeItem final : public SfxBoolItem {
298 public:
299 Svx3DCharacterModeItem(bool bVal = false);
300 Svx3DCharacterModeItem* Clone(SfxItemPool * = nullptr) const override;
303 // #107245# Item to replace bExtrudeCloseFront and bLatheCloseFront
304 class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DCloseFrontItem final : public SfxBoolItem {
305 public:
306 Svx3DCloseFrontItem(bool bVal = true);
307 Svx3DCloseFrontItem* Clone(SfxItemPool * = nullptr) const override;
310 // #107245# Item to replace bExtrudeCloseBack and bLatheCloseBack
311 class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) Svx3DCloseBackItem final : public SfxBoolItem {
312 public:
313 Svx3DCloseBackItem(bool bVal = true);
314 Svx3DCloseBackItem* Clone(SfxItemPool * = nullptr) const override;
317 #endif // INCLUDED_SVX_SVX3DITEMS_HXX
319 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */