LibreOffice Module svx (master) 1
svdpoev.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
22#include <svx/svxdllapi.h>
23#include <svx/svdedtv.hxx>
24
26
27class SVXCORE_DLLPUBLIC SdrPolyEditView : public SdrEditView, public IPolyPolygonEditorController
28{
29 friend class SdrEditView;
30
33
36
37private:
38 SVX_DLLPRIVATE void ImpResetPolyPossibilityFlags();
39 SVX_DLLPRIVATE void ImpCheckPolyPossibilities();
40
41 typedef void (*PPolyTrFunc)(Point&, Point*, Point*, const void*, const void*, const void*, const void*);
42 SVX_DLLPRIVATE void ImpTransformMarkedPoints(PPolyTrFunc pTrFunc, const void* p1, const void* p2=nullptr, const void* p3=nullptr, const void* p4=nullptr);
43
44protected:
45 // #i71538# make constructors of SdrView sub-components protected to avoid incomplete incarnations which may get casted to SdrView
47 SdrModel& rSdrModel,
48 OutputDevice* pOut);
49
50 virtual ~SdrPolyEditView() override;
51
52public:
53 bool IsSetMarkedPointsSmoothPossible() const override;
54 SdrPathSmoothKind GetMarkedPointsSmooth() const override;
55 void SetMarkedPointsSmooth(SdrPathSmoothKind eKind) override;
56
57 // A PolySegment can either be a segment or a Bézier curve
58 bool IsSetMarkedSegmentsKindPossible() const override;
59 SdrPathSegmentKind GetMarkedSegmentsKind() const override;
60 void SetMarkedSegmentsKind(SdrPathSegmentKind eKind) override;
61
62 // Probably Obj has been deleted afterwards
63 void DeleteMarkedPoints() override;
64 bool IsDeleteMarkedPointsPossible() const override;
65
66 void MoveMarkedPoints(const Size& rSiz);
67 void ResizeMarkedPoints(const Point& rRef, const Fraction& xFact, const Fraction& yFact);
68 void RotateMarkedPoints(const Point& rRef, Degree100 nAngle);
69
70 // This probably creates an arbitrary amount of new objects
71 void RipUpAtMarkedPoints() override;
72 bool IsRipUpAtMarkedPointsPossible() const override;
73
74 // All marked Polylines are turned into polygons
75 // All open Bézier curves are turned into closed ones
76 bool IsOpenCloseMarkedObjectsPossible() const override;
77 SdrObjClosedKind GetMarkedObjectsClosedState() const override;
78
79 void CheckPolyPossibilitiesHelper( SdrMark* pM, bool& b1stSmooth, bool& b1stSegm, bool& bCurve, bool& bSmoothFuz, bool& bSegmFuz, basegfx::B2VectorContinuity& eSmooth );
80};
81
82/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Everything a View needs to know about a selected object.
Definition: svdmark.hxx:45
bool bSetMarkedSegmentsKindPossible
Definition: svdpoev.hxx:32
bool bSetMarkedPointsSmoothPossible
Definition: svdpoev.hxx:31
SdrPathSegmentKind eMarkedSegmentsKind
Definition: svdpoev.hxx:35
SdrPathSmoothKind eMarkedPointsSmooth
Definition: svdpoev.hxx:34
B2VectorContinuity
#define SVX_DLLPRIVATE
Definition: svxdllapi.h:30
#define SVXCORE_DLLPUBLIC
Definition: svxdllapi.h:35