1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef INCLUDED_SVX_SVDGLEV_HXX
#define INCLUDED_SVX_SVDGLEV_HXX
#include <svx/svxdllapi.h>
#include <svx/svdpoev.hxx>
class SdrGluePoint;
// Edit GluePoints at the objects (GluePoints for connector)
class SVX_DLLPUBLIC SdrGlueEditView: public SdrPolyEditView
{
// copy marked GluePoints and mark instead of the old ones
void ImpCopyMarkedGluePoints();
typedef void (*PGlueDoFunc)(SdrGluePoint&, const SdrObject* pObj, const void*, const void*, const void*, const void*, const void*);
typedef void (*PGlueTrFunc)(Point&, const void*, const void*, const void*, const void*, const void*);
void ImpDoMarkedGluePoints(PGlueDoFunc pDoFunc, bool bConst, const void* p1=nullptr, const void* p2=nullptr, const void* p3=nullptr, const void* p4=nullptr, const void* p5=nullptr);
void ImpTransformMarkedGluePoints(PGlueTrFunc pTrFunc, const void* p1=nullptr, const void* p2=nullptr, const void* p3=nullptr, const void* p4=nullptr, const void* p5=nullptr);
protected:
// #i71538# make constructors of SdrView sub-components protected to avoid incomplete incarnations which may get casted to SdrView
SdrGlueEditView(SdrModel* pModel1, OutputDevice* pOut = nullptr);
virtual ~SdrGlueEditView();
public:
// the parameter nThisEsc is used to hand over the direction,
// which one wished to check,set or delete
// possible values for nThisEsc are:
// SdrEscapeDirection::LEFT, SdrEscapeDirection::RIGHT, SdrEscapeDirection::TOP and SdrEscapeDirection::BOTTOM
SDR_TRISTATE IsMarkedGluePointsEscDir(SdrEscapeDirection nThisEsc) const;
void SetMarkedGluePointsEscDir(SdrEscapeDirection nThisEsc, bool bOn);
// check/set, if the GluePoints are relativ to the
// object size (Percent=sal_True) or not (Percent=sal_False)
SDR_TRISTATE IsMarkedGluePointsPercent() const;
void SetMarkedGluePointsPercent(bool bOn);
// bVert=FALSE: check/set hotizontal alignment
// SdrAlign::HORZ_CENTER
// SdrAlign::HORZ_LEFT
// SdrAlign::HORZ_RIGHT
// SdrAlign::HORZ_DONTCARE (only at Get())
// bVert=TRUE: check/set vertical alignment
// SdrAlign::VERT_CENTER
// SdrAlign::VERT_TOP
// SdrAlign::VERT_BOTTOM
// SdrAlign::VERT_DONTCARE (only at Get())
SdrAlign GetMarkedGluePointsAlign(bool bVert) const;
void SetMarkedGluePointsAlign(bool bVert, SdrAlign nAlign);
// delete all marked GluePoints
void DeleteMarkedGluePoints();
void MoveMarkedGluePoints (const Size& rSiz, bool bCopy=false);
void ResizeMarkedGluePoints(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bCopy=false);
void RotateMarkedGluePoints(const Point& rRef, long nAngle, bool bCopy=false);
};
#endif // INCLUDED_SVX_SVDGLEV_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|