1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 #ifndef CHART2_DRAGMETHOD_ROTATEDIAGRAM_HXX 24 #define CHART2_DRAGMETHOD_ROTATEDIAGRAM_HXX 25 26 #include "DragMethod_Base.hxx" 27 28 // header for class ::basegfx::B3DPolyPolygon 29 #include <basegfx/polygon/b3dpolypolygon.hxx> 30 31 namespace chart 32 { 33 34 class DragMethod_RotateDiagram : public DragMethod_Base 35 { 36 public: 37 enum RotationDirection 38 { 39 ROTATIONDIRECTION_FREE, 40 ROTATIONDIRECTION_X, 41 ROTATIONDIRECTION_Y, 42 ROTATIONDIRECTION_Z 43 }; 44 45 DragMethod_RotateDiagram( DrawViewWrapper& rDrawViewWrapper 46 , const rtl::OUString& rObjectCID 47 , const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel 48 , RotationDirection eRotationDirection 49 ); 50 virtual ~DragMethod_RotateDiagram(); 51 52 virtual void TakeSdrDragComment(String& rStr) const; 53 54 virtual bool BeginSdrDrag(); 55 virtual void MoveSdrDrag(const Point& rPnt); 56 virtual bool EndSdrDrag(bool bCopy); 57 58 virtual void CreateOverlayGeometry(sdr::overlay::OverlayManager& rOverlayManager); 59 60 private: 61 E3dScene* m_pScene; 62 63 Rectangle m_aReferenceRect; 64 Point m_aStartPos; 65 basegfx::B3DPolyPolygon m_aWireframePolyPolygon; 66 67 double m_fInitialXAngleRad; 68 double m_fInitialYAngleRad; 69 double m_fInitialZAngleRad; 70 71 double m_fAdditionalXAngleRad; 72 double m_fAdditionalYAngleRad; 73 double m_fAdditionalZAngleRad; 74 75 sal_Int32 m_nInitialHorizontalAngleDegree; 76 sal_Int32 m_nInitialVerticalAngleDegree; 77 78 sal_Int32 m_nAdditionalHorizontalAngleDegree; 79 sal_Int32 m_nAdditionalVerticalAngleDegree; 80 81 RotationDirection m_eRotationDirection; 82 sal_Bool m_bRightAngledAxes; 83 }; 84 85 } // namespace chart 86 87 // CHART2_DRAGMETHOD_ROTATEDIAGRAM_HXX 88 #endif 89