1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 INCLUDED_SVX_SVDPOEV_HXX
21 #define INCLUDED_SVX_SVDPOEV_HXX
23 #include <svx/svxdllapi.h>
24 #include <svx/svdedtv.hxx>
26 #include <svx/ipolypolygoneditorcontroller.hxx>
28 class SVX_DLLPUBLIC SdrPolyEditView
: public SdrEditView
, public IPolyPolygonEditorController
30 friend class SdrEditView
;
33 bool bSetMarkedPointsSmoothPossible
: 1;
34 bool bSetMarkedSegmentsKindPossible
: 1;
36 SdrPathSmoothKind eMarkedPointsSmooth
;
37 SdrPathSegmentKind eMarkedSegmentsKind
;
40 SVX_DLLPRIVATE
void ImpClearVars();
41 SVX_DLLPRIVATE
void ImpResetPolyPossibilityFlags();
42 SVX_DLLPRIVATE
void ImpCheckPolyPossibilities();
44 typedef void (*PPolyTrFunc
)(Point
&, Point
*, Point
*, const void*, const void*, const void*, const void*, const void*);
45 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
);
48 // #i71538# make constructors of SdrView sub-components protected to avoid incomplete incarnations which may get casted to SdrView
49 SdrPolyEditView(SdrModel
* pModel1
, OutputDevice
* pOut
= 0L);
50 virtual ~SdrPolyEditView();
53 bool IsSetMarkedPointsSmoothPossible() const SAL_OVERRIDE
;
54 SdrPathSmoothKind
GetMarkedPointsSmooth() const SAL_OVERRIDE
;
55 void SetMarkedPointsSmooth(SdrPathSmoothKind eKind
) SAL_OVERRIDE
;
57 // Ein PolySegment kann eine Strecke oder eine Bezierkurve sein.
58 bool IsSetMarkedSegmentsKindPossible() const SAL_OVERRIDE
;
59 SdrPathSegmentKind
GetMarkedSegmentsKind() const SAL_OVERRIDE
;
60 void SetMarkedSegmentsKind(SdrPathSegmentKind eKind
) SAL_OVERRIDE
;
62 // Moeglicherweise ist das Obj hinterher geloescht:
63 void DeleteMarkedPoints() SAL_OVERRIDE
;
64 bool IsDeleteMarkedPointsPossible() const SAL_OVERRIDE
;
66 void MoveMarkedPoints(const Size
& rSiz
);
67 void ResizeMarkedPoints(const Point
& rRef
, const Fraction
& xFact
, const Fraction
& yFact
);
68 void RotateMarkedPoints(const Point
& rRef
, long nAngle
);
70 // Hierbei entstehen eventuell beliebig viele neue Objekte:
71 void RipUpAtMarkedPoints() SAL_OVERRIDE
;
72 bool IsRipUpAtMarkedPointsPossible() const SAL_OVERRIDE
;
74 // Alle markierten Polylines werden zu Polygonen, alle offenen
75 // Bezierkurven zu geschlossenen.
76 void CloseMarkedObjects(bool bToggle
=false, bool bOpen
=false) SAL_OVERRIDE
; // , long nOpenDistance=0);
77 bool IsOpenCloseMarkedObjectsPossible() const SAL_OVERRIDE
;
78 SdrObjClosedKind
GetMarkedObjectsClosedState() const SAL_OVERRIDE
;
80 void CheckPolyPossibilitiesHelper( SdrMark
* pM
, bool& b1stSmooth
, bool& b1stSegm
, bool& bCurve
, bool& bSmoothFuz
, bool& bSegmFuz
, basegfx::B2VectorContinuity
& eSmooth
);
83 #endif // INCLUDED_SVX_SVDPOEV_HXX
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */