LibreOffice Module svx (master)  1
dragmt3d.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 #ifndef INCLUDED_SVX_INC_DRAGMT3D_HXX
21 #define INCLUDED_SVX_INC_DRAGMT3D_HXX
22 
23 #include <svx/def3d.hxx>
24 #include <svx/svddrgmt.hxx>
25 #include <svx/view3d.hxx>
28 
29 // Parameters for the interaction of a 3D object
31 {
32 public:
39  sal_Int32 mnStartAngle;
40  sal_Int32 mnLastAngle;
41 
43  : mr3DObj(r3DObj),
44  maWireframePoly(),
45  maDisplayTransform(),
46  maInvDisplayTransform(),
47  maInitTransform(),
48  maTransform(),
49  mnStartAngle(0),
50  mnLastAngle(0)
51  {
52  }
53 };
54 
55 // Derivative of SdrDragMethod for 3D objects
57 {
58 protected:
59  ::std::vector< E3dDragMethodUnit > maGrp;
63  bool mbMoveFull;
65 
66 public:
68  SdrDragView &rView,
69  const SdrMarkList& rMark,
70  E3dDragConstraint eConstr,
71  bool bFull);
72 
73  virtual OUString GetSdrDragComment() const override;
74  virtual bool BeginSdrDrag() override;
75  virtual void MoveSdrDrag(const Point& rPnt) override;
76  virtual void CancelSdrDrag() override;
77  virtual bool EndSdrDrag(bool bCopy) override;
78 
79  // for migration from XOR to overlay
80  virtual void CreateOverlayGeometry(
81  sdr::overlay::OverlayManager& rOverlayManager,
82  const sdr::contact::ObjectContact& rObjectContact) override;
83 };
84 
85 // Derivative of SdrDragMethod for spinning 3D objects
86 class E3dDragRotate final : public E3dDragMethod
87 {
89 
90 public:
92  SdrDragView &rView,
93  const SdrMarkList& rMark,
94  E3dDragConstraint eConstr,
95  bool bFull);
96 
97  virtual void MoveSdrDrag(const Point& rPnt) override;
98  virtual PointerStyle GetSdrDragPointer() const override;
99 };
100 
101 // Derivative of SdrDragMethod for moving 3D sub-objects
102 class E3dDragMove final : public E3dDragMethod
103 {
106 
107 public:
108  E3dDragMove(
109  SdrDragView &rView,
110  const SdrMarkList& rMark,
111  SdrHdlKind eDrgHdl,
112  E3dDragConstraint eConstr,
113  bool bFull);
114 
115  virtual void MoveSdrDrag(const Point& rPnt) override;
116  virtual PointerStyle GetSdrDragPointer() const override;
117 };
118 
119 
120 #endif // INCLUDED_SVX_INC_DRAGMT3D_HXX
121 
122 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
::std::vector< E3dDragMethodUnit > maGrp
Definition: dragmt3d.hxx:59
sal_Int32 mnStartAngle
Definition: dragmt3d.hxx:39
SdrHdlKind meWhatDragHdl
Definition: dragmt3d.hxx:104
basegfx::B3DPoint maGlobalCenter
Definition: dragmt3d.hxx:88
SdrHdlKind
Definition: svdhdl.hxx:52
basegfx::B3DHomMatrix maDisplayTransform
Definition: dragmt3d.hxx:35
E3dDragRotate(SdrDragView &rView, const SdrMarkList &rMark, E3dDragConstraint eConstr, bool bFull)
Definition: dragmt3d.cxx:272
Point maLastPos
Definition: dragmt3d.hxx:61
E3dDragConstraint meConstraint
Definition: dragmt3d.hxx:60
sal_Int32 mnLastAngle
Definition: dragmt3d.hxx:40
E3dDragMethod(SdrDragView &rView, const SdrMarkList &rMark, E3dDragConstraint eConstr, bool bFull)
Definition: dragmt3d.cxx:40
virtual PointerStyle GetSdrDragPointer() const override
Definition: dragmt3d.cxx:447
E3dDragMove(SdrDragView &rView, const SdrMarkList &rMark, SdrHdlKind eDrgHdl, E3dDragConstraint eConstr, bool bFull)
Definition: dragmt3d.cxx:457
basegfx::B3DHomMatrix maInitTransform
Definition: dragmt3d.hxx:37
basegfx::B3DPolyPolygon maWireframePoly
Definition: dragmt3d.hxx:34
virtual bool EndSdrDrag(bool bCopy) override
Definition: dragmt3d.cxx:141
virtual bool BeginSdrDrag() override
Definition: dragmt3d.cxx:114
basegfx::B3DHomMatrix maInvDisplayTransform
Definition: dragmt3d.hxx:36
virtual void MoveSdrDrag(const Point &rPnt) override
Definition: dragmt3d.cxx:506
bool mbMovedAtAll
Definition: dragmt3d.hxx:64
virtual void CreateOverlayGeometry(sdr::overlay::OverlayManager &rOverlayManager, const sdr::contact::ObjectContact &rObjectContact) override
Definition: dragmt3d.cxx:214
E3dDragConstraint
Definition: def3d.hxx:31
virtual void MoveSdrDrag(const Point &rPnt) override
Definition: dragmt3d.cxx:331
virtual PointerStyle GetSdrDragPointer() const override
Definition: dragmt3d.cxx:727
PointerStyle
E3dObject & mr3DObj
Definition: dragmt3d.hxx:33
virtual void MoveSdrDrag(const Point &rPnt) override
Definition: dragmt3d.cxx:206
basegfx::B3DHomMatrix maTransform
Definition: dragmt3d.hxx:38
E3dDragMethodUnit(E3dObject &r3DObj)
Definition: dragmt3d.hxx:42
virtual void CancelSdrDrag() override
Definition: dragmt3d.cxx:180
Point maScaleFixPos
Definition: dragmt3d.hxx:105
virtual OUString GetSdrDragComment() const override
Definition: dragmt3d.cxx:107
bool mbMoveFull
Definition: dragmt3d.hxx:63
tools::Rectangle maFullBound
Definition: dragmt3d.hxx:62