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 .
23 #include "svx/svxdllapi.h"
24 #include <svx/svdpoev.hxx>
26 //************************************************************
27 // Vorausdeklarationen
28 //************************************************************
32 ////////////////////////////////////////////////////////////////////////////////////////////////////
33 ////////////////////////////////////////////////////////////////////////////////////////////////////
35 // @@@@ @@ @@ @@ @@@@@ @@@@@ @@@@@ @@ @@@@@@ @@ @@ @@ @@@@@ @@ @@
36 // @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@
37 // @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@
38 // @@ @@@ @@ @@ @@ @@@@ @@@@ @@ @@ @@ @@ @@@@@ @@ @@@@ @@@@@@@
39 // @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@@@@@
40 // @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@ @@@
41 // @@@@@ @@@@@ @@@@ @@@@@ @@@@@ @@@@@ @@ @@ @ @@ @@@@@ @@ @@
43 // Editieren von Klebepunkten an den Objekten (Klebepunkte fuer Verbinder)
45 ////////////////////////////////////////////////////////////////////////////////////////////////////
46 ////////////////////////////////////////////////////////////////////////////////////////////////////
48 class SVX_DLLPUBLIC SdrGlueEditView
: public SdrPolyEditView
52 // Markierte Klebepunkte kopieren und anstelle der alten markieren
53 void ImpCopyMarkedGluePoints();
54 typedef void (*PGlueDoFunc
)(SdrGluePoint
&, const SdrObject
* pObj
, const void*, const void*, const void*, const void*, const void*);
55 typedef void (*PGlueTrFunc
)(Point
&, const void*, const void*, const void*, const void*, const void*);
56 void ImpDoMarkedGluePoints(PGlueDoFunc pDoFunc
, sal_Bool bConst
, const void* p1
=NULL
, const void* p2
=NULL
, const void* p3
=NULL
, const void* p4
=NULL
, const void* p5
=NULL
);
57 void ImpTransformMarkedGluePoints(PGlueTrFunc pTrFunc
, const void* p1
=NULL
, const void* p2
=NULL
, const void* p3
=NULL
, const void* p4
=NULL
, const void* p5
=NULL
);
60 // #i71538# make constructors of SdrView sub-components protected to avoid incomplete incarnations which may get casted to SdrView
61 SdrGlueEditView(SdrModel
* pModel1
, OutputDevice
* pOut
= 0L);
62 virtual ~SdrGlueEditView();
65 // Durch den Parameter nThisEsc uebergibt man die Richtung, die man
66 // checken bzw. setzen/loeschen will.
67 // Moegliche Werte fuer nThisEsc sind z.Zt.
68 // SDRESC_LEFT, SDRESC_RIGHT, SDRESC_TOP und SDRESC_BOTTOM
69 TRISTATE
IsMarkedGluePointsEscDir(sal_uInt16 nThisEsc
) const;
70 void SetMarkedGluePointsEscDir(sal_uInt16 nThisEsc
, sal_Bool bOn
);
71 sal_Bool
IsSetMarkedGluePointsEscDirPossible() const { return !IsReadOnly() && HasMarkedGluePoints(); }
73 // Checken/setzen, ob die Klebepunktpositionen relativ zur
74 // Objektgroesse sind (Percent=sal_True) oder nicht (Percent=sal_False)
75 TRISTATE
IsMarkedGluePointsPercent() const;
76 void SetMarkedGluePointsPercent(sal_Bool bOn
);
77 sal_Bool
IsSetMarkedGluePointsPercentPossible() const { return !IsReadOnly() && HasMarkedGluePoints(); }
79 // bVert=FALSE: Horizontales Alignment checken/setzen
80 // SDRHORZALIGN_CENTER
83 // SDRHORZALIGN_DONTCARE (nur bei Get())
84 // bVert=TRUE: Vertikales Alignment checken/setzen
85 // SDRVERTALIGN_CENTER
87 // SDRVERTALIGN_BOTTOM
88 // SDRVERTALIGN_DONTCARE (nur bei Get())
89 sal_uInt16
GetMarkedGluePointsAlign(sal_Bool bVert
) const;
90 void SetMarkedGluePointsAlign(sal_Bool bVert
, sal_uInt16 nAlign
);
91 sal_Bool
IsSetMarkedGluePointsAlignPossible() const { return !IsReadOnly() && HasMarkedGluePoints(); }
93 // Alle merkierten Klebepunkte entfernen
94 void DeleteMarkedGluePoints();
96 void MoveMarkedGluePoints (const Size
& rSiz
, bool bCopy
=false);
97 void ResizeMarkedGluePoints(const Point
& rRef
, const Fraction
& xFact
, const Fraction
& yFact
, bool bCopy
=false);
98 void RotateMarkedGluePoints(const Point
& rRef
, long nWink
, bool bCopy
=false);
99 void MirrorMarkedGluePoints(const Point
& rRef1
, const Point
& rRef2
, sal_Bool bCopy
=sal_False
);
100 void MirrorMarkedGluePointsHorizontal(sal_Bool bCopy
=sal_False
);
101 void MirrorMarkedGluePointsVertical(sal_Bool bCopy
=sal_False
);
102 void ShearMarkedGluePoints(const Point
& rRef
, long nWink
, sal_Bool bVShear
=sal_False
, sal_Bool bCopy
=sal_False
);
103 void CrookMarkedGluePoints(const Point
& rRef
, const Point
& rRad
, SdrCrookMode eMode
, sal_Bool bVertical
=sal_False
, sal_Bool bNoContortion
=sal_False
, sal_Bool bCopy
=sal_False
);
104 void DistortMarkedGluePoints(const Rectangle
& rRef
, const XPolygon
& rDistortedRect
, sal_Bool bNoContortion
=sal_False
, sal_Bool bCopy
=sal_False
);
106 void AlignMarkedGluePoints(SdrHorAlign eHor
, SdrVertAlign eVert
);
109 #endif //_SVDGLEV_HXX
111 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */