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>
27 #include <vcl/timer.hxx>
29 
30 // Parameters for the interaction of a 3D object
32 {
33 public:
40  sal_Int32 mnStartAngle;
41  sal_Int32 mnLastAngle;
42 
44  : mr3DObj(r3DObj),
45  maWireframePoly(),
46  maDisplayTransform(),
47  maInvDisplayTransform(),
48  maInitTransform(),
49  maTransform(),
50  mnStartAngle(0),
51  mnLastAngle(0)
52  {
53  }
54 };
55 
56 // Derivative of SdrDragMethod for 3D objects
58 {
59 protected:
60  ::std::vector< E3dDragMethodUnit > maGrp;
64  bool mbMoveFull;
66 
67 public:
69  SdrDragView &rView,
70  const SdrMarkList& rMark,
71  E3dDragConstraint eConstr,
72  bool bFull);
73 
74  virtual OUString GetSdrDragComment() const override;
75  virtual bool BeginSdrDrag() override;
76  virtual void MoveSdrDrag(const Point& rPnt) override;
77  virtual void CancelSdrDrag() override;
78  virtual bool EndSdrDrag(bool bCopy) override;
79 
80  // for migration from XOR to overlay
81  virtual void CreateOverlayGeometry(
82  sdr::overlay::OverlayManager& rOverlayManager,
83  const sdr::contact::ObjectContact& rObjectContact) override;
84 };
85 
86 // Derivative of SdrDragMethod for spinning 3D objects
88 {
90 
91 public:
93  SdrDragView &rView,
94  const SdrMarkList& rMark,
95  E3dDragConstraint eConstr,
96  bool bFull);
97 
98  virtual void MoveSdrDrag(const Point& rPnt) override;
99  virtual PointerStyle GetSdrDragPointer() const override;
100 };
101 
102 // Derivative of SdrDragMethod for moving 3D sub-objects
104 {
107 
108 public:
109  E3dDragMove(
110  SdrDragView &rView,
111  const SdrMarkList& rMark,
112  SdrHdlKind eDrgHdl,
113  E3dDragConstraint eConstr,
114  bool bFull);
115 
116  virtual void MoveSdrDrag(const Point& rPnt) override;
117  virtual PointerStyle GetSdrDragPointer() const override;
118 };
119 
120 
121 #endif // INCLUDED_SVX_INC_DRAGMT3D_HXX
122 
123 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
::std::vector< E3dDragMethodUnit > maGrp
Definition: dragmt3d.hxx:60
sal_Int32 mnStartAngle
Definition: dragmt3d.hxx:40
SdrHdlKind meWhatDragHdl
Definition: dragmt3d.hxx:105
basegfx::B3DPoint maGlobalCenter
Definition: dragmt3d.hxx:89
SdrHdlKind
Definition: svdhdl.hxx:52
basegfx::B3DHomMatrix maDisplayTransform
Definition: dragmt3d.hxx:36
E3dDragRotate(SdrDragView &rView, const SdrMarkList &rMark, E3dDragConstraint eConstr, bool bFull)
Definition: dragmt3d.cxx:267
Point maLastPos
Definition: dragmt3d.hxx:62
sal_Int32 mnLastAngle
Definition: dragmt3d.hxx:41
E3dDragMethod(SdrDragView &rView, const SdrMarkList &rMark, E3dDragConstraint eConstr, bool bFull)
Definition: dragmt3d.cxx:39
virtual PointerStyle GetSdrDragPointer() const override
Definition: dragmt3d.cxx:442
E3dDragMove(SdrDragView &rView, const SdrMarkList &rMark, SdrHdlKind eDrgHdl, E3dDragConstraint eConstr, bool bFull)
Definition: dragmt3d.cxx:452
basegfx::B3DHomMatrix maInitTransform
Definition: dragmt3d.hxx:38
basegfx::B3DPolyPolygon maWireframePoly
Definition: dragmt3d.hxx:35
E3dDragConstraint const meConstraint
Definition: dragmt3d.hxx:61
virtual bool EndSdrDrag(bool bCopy) override
Definition: dragmt3d.cxx:140
virtual bool BeginSdrDrag() override
Definition: dragmt3d.cxx:113
basegfx::B3DHomMatrix maInvDisplayTransform
Definition: dragmt3d.hxx:37
virtual void MoveSdrDrag(const Point &rPnt) override
Definition: dragmt3d.cxx:501
bool mbMovedAtAll
Definition: dragmt3d.hxx:65
virtual void CreateOverlayGeometry(sdr::overlay::OverlayManager &rOverlayManager, const sdr::contact::ObjectContact &rObjectContact) override
Definition: dragmt3d.cxx:213
E3dDragConstraint
Definition: def3d.hxx:32
virtual void MoveSdrDrag(const Point &rPnt) override
Definition: dragmt3d.cxx:326
virtual PointerStyle GetSdrDragPointer() const override
Definition: dragmt3d.cxx:722
PointerStyle
E3dObject & mr3DObj
Definition: dragmt3d.hxx:34
virtual void MoveSdrDrag(const Point &rPnt) override
Definition: dragmt3d.cxx:205
basegfx::B3DHomMatrix maTransform
Definition: dragmt3d.hxx:39
E3dDragMethodUnit(E3dObject &r3DObj)
Definition: dragmt3d.hxx:43
virtual void CancelSdrDrag() override
Definition: dragmt3d.cxx:179
Point maScaleFixPos
Definition: dragmt3d.hxx:106
virtual OUString GetSdrDragComment() const override
Definition: dragmt3d.cxx:106
bool mbMoveFull
Definition: dragmt3d.hxx:64
tools::Rectangle maFullBound
Definition: dragmt3d.hxx:63