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_SVDGLEV_HXX
21 #define INCLUDED_SVX_SVDGLEV_HXX
23 #include <svx/svxdllapi.h>
24 #include <svx/svdpoev.hxx>
29 // Edit GluePoints at the objects (GluePoints for connector)
32 class SVX_DLLPUBLIC SdrGlueEditView
: public SdrPolyEditView
34 // copy marked GluePoints and mark instead of the old ones
35 void ImpCopyMarkedGluePoints();
36 typedef void (*PGlueDoFunc
)(SdrGluePoint
&, const SdrObject
* pObj
, const void*, const void*, const void*, const void*);
37 typedef void (*PGlueTrFunc
)(Point
&, const void*, const void*, const void*, const void*);
38 void ImpDoMarkedGluePoints(PGlueDoFunc pDoFunc
, bool bConst
, const void* p1
, const void* p2
=nullptr, const void* p3
=nullptr, const void* p4
=nullptr);
39 void ImpTransformMarkedGluePoints(PGlueTrFunc pTrFunc
, const void* p1
, const void* p2
=nullptr, const void* p3
=nullptr, const void* p4
=nullptr);
42 // #i71538# make constructors of SdrView sub-components protected to avoid incomplete incarnations which may get casted to SdrView
43 SdrGlueEditView(SdrModel
* pModel1
, OutputDevice
* pOut
);
44 virtual ~SdrGlueEditView() override
;
47 // the parameter nThisEsc is used to hand over the direction,
48 // which one wished to check,set or delete
49 // possible values for nThisEsc are:
50 // SdrEscapeDirection::LEFT, SdrEscapeDirection::RIGHT, SdrEscapeDirection::TOP and SdrEscapeDirection::BOTTOM
51 SDR_TRISTATE
IsMarkedGluePointsEscDir(SdrEscapeDirection nThisEsc
) const;
52 void SetMarkedGluePointsEscDir(SdrEscapeDirection nThisEsc
, bool bOn
);
54 // check/set, if the GluePoints are relative to the
55 // object size (Percent=sal_True) or not (Percent=sal_False)
56 SDR_TRISTATE
IsMarkedGluePointsPercent() const;
57 void SetMarkedGluePointsPercent(bool bOn
);
59 // bVert=FALSE: check/set hotizontal alignment
60 // SdrAlign::HORZ_CENTER
61 // SdrAlign::HORZ_LEFT
62 // SdrAlign::HORZ_RIGHT
63 // SdrAlign::HORZ_DONTCARE (only at Get())
64 // bVert=TRUE: check/set vertical alignment
65 // SdrAlign::VERT_CENTER
67 // SdrAlign::VERT_BOTTOM
68 // SdrAlign::VERT_DONTCARE (only at Get())
69 SdrAlign
GetMarkedGluePointsAlign(bool bVert
) const;
70 void SetMarkedGluePointsAlign(bool bVert
, SdrAlign nAlign
);
72 // delete all marked GluePoints
73 void DeleteMarkedGluePoints();
75 void MoveMarkedGluePoints (const Size
& rSiz
, bool bCopy
);
76 void ResizeMarkedGluePoints(const Point
& rRef
, const Fraction
& xFact
, const Fraction
& yFact
, bool bCopy
);
77 void RotateMarkedGluePoints(const Point
& rRef
, long nAngle
, bool bCopy
);
80 #endif // INCLUDED_SVX_SVDGLEV_HXX
82 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */