update credits
[LibreOffice.git] / include / svx / svdpoev.hxx
blobd89fdc1ac51d2aafc5d82f233ca9efa129ade4b0
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 _SVDPOEV_HXX
21 #define _SVDPOEV_HXX
23 #include "svx/svxdllapi.h"
24 #include <svx/svdedtv.hxx>
26 #include "svx/ipolypolygoneditorcontroller.hxx"
28 ////////////////////////////////////////////////////////////////////////////////////////////////////
29 ////////////////////////////////////////////////////////////////////////////////////////////////////
31 // @@@@@ @@@@ @@ @@ @@ @@@@@ @@@@@ @@ @@@@@@ @@ @@ @@ @@@@@ @@ @@
32 // @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
33 // @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@
34 // @@@@@ @@ @@ @@ @@@@ @@@@ @@ @@ @@ @@ @@@@@ @@ @@@@ @@@@@@@
35 // @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@@@@@
36 // @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@ @@@
37 // @@ @@@@ @@@@@ @@ @@@@@ @@@@@ @@ @@ @ @@ @@@@@ @@ @@
39 ////////////////////////////////////////////////////////////////////////////////////////////////////
40 ////////////////////////////////////////////////////////////////////////////////////////////////////
42 class SVX_DLLPUBLIC SdrPolyEditView: public SdrEditView, public IPolyPolygonEditorController
44 friend class SdrEditView;
46 protected:
47 sal_Bool bSetMarkedPointsSmoothPossible : 1;
48 sal_Bool bSetMarkedSegmentsKindPossible : 1;
50 SdrPathSmoothKind eMarkedPointsSmooth;
51 SdrPathSegmentKind eMarkedSegmentsKind;
53 private:
54 SVX_DLLPRIVATE void ImpClearVars();
55 SVX_DLLPRIVATE void ImpResetPolyPossibilityFlags();
56 SVX_DLLPRIVATE void ImpCheckPolyPossibilities();
58 typedef void (*PPolyTrFunc)(Point&, Point*, Point*, const void*, const void*, const void*, const void*, const void*);
59 SVX_DLLPRIVATE void ImpTransformMarkedPoints(PPolyTrFunc pTrFunc, const void* p1=NULL, const void* p2=NULL, const void* p3=NULL, const void* p4=NULL, const void* p5=NULL);
61 protected:
62 // #i71538# make constructors of SdrView sub-components protected to avoid incomplete incarnations which may get casted to SdrView
63 SdrPolyEditView(SdrModel* pModel1, OutputDevice* pOut = 0L);
64 virtual ~SdrPolyEditView();
66 public:
67 sal_Bool IsSetMarkedPointsSmoothPossible() const;
68 SdrPathSmoothKind GetMarkedPointsSmooth() const;
69 void SetMarkedPointsSmooth(SdrPathSmoothKind eKind);
71 // Ein PolySegment kann eine Strecke oder eine Bezierkurve sein.
72 sal_Bool IsSetMarkedSegmentsKindPossible() const;
73 SdrPathSegmentKind GetMarkedSegmentsKind() const;
74 void SetMarkedSegmentsKind(SdrPathSegmentKind eKind);
76 // Moeglicherweise ist das Obj hinterher geloescht:
77 void DeleteMarkedPoints();
78 sal_Bool IsDeleteMarkedPointsPossible() const;
80 void MoveMarkedPoints(const Size& rSiz, bool bCopy=false);
81 void ResizeMarkedPoints(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bCopy=false);
82 void RotateMarkedPoints(const Point& rRef, long nWink, bool bCopy=false);
84 // Hierbei entstehen eventuell beliebig viele neue Objekte:
85 void RipUpAtMarkedPoints();
86 bool IsRipUpAtMarkedPointsPossible() const;
88 // Alle markierten Polylines werden zu Polygonen, alle offenen
89 // Bezierkurven zu geschlossenen.
90 void CloseMarkedObjects(sal_Bool bToggle=sal_False, sal_Bool bOpen=sal_False); // , long nOpenDistance=0);
91 bool IsOpenCloseMarkedObjectsPossible() const;
92 SdrObjClosedKind GetMarkedObjectsClosedState() const;
94 void CheckPolyPossibilitiesHelper( SdrMark* pM, bool& b1stSmooth, bool& b1stSegm, bool& bCurve, bool& bSmoothFuz, bool& bSegmFuz, basegfx::B2VectorContinuity& eSmooth );
97 #endif //_SVDPOEV_HXX
99 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */