xref: /aoo41x/main/svx/inc/svx/svddrgv.hxx (revision 3334a7e6)
1*3334a7e6SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*3334a7e6SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*3334a7e6SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*3334a7e6SAndrew Rist  * distributed with this work for additional information
6*3334a7e6SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*3334a7e6SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*3334a7e6SAndrew Rist  * "License"); you may not use this file except in compliance
9*3334a7e6SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*3334a7e6SAndrew Rist  *
11*3334a7e6SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*3334a7e6SAndrew Rist  *
13*3334a7e6SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*3334a7e6SAndrew Rist  * software distributed under the License is distributed on an
15*3334a7e6SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*3334a7e6SAndrew Rist  * KIND, either express or implied.  See the License for the
17*3334a7e6SAndrew Rist  * specific language governing permissions and limitations
18*3334a7e6SAndrew Rist  * under the License.
19*3334a7e6SAndrew Rist  *
20*3334a7e6SAndrew Rist  *************************************************************/
21*3334a7e6SAndrew Rist 
22*3334a7e6SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef _SVDDRGV_HXX
25cdf0e10cSrcweir #define _SVDDRGV_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include "svx/svxdllapi.h"
28cdf0e10cSrcweir #include <svx/svdxcgv.hxx>
29cdf0e10cSrcweir 
30cdf0e10cSrcweir //************************************************************
31cdf0e10cSrcweir //   Vorausdeklarationen
32cdf0e10cSrcweir //************************************************************
33cdf0e10cSrcweir 
34cdf0e10cSrcweir class SdrUndoGeoObj;
35cdf0e10cSrcweir 
36cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////////////////////////////////////
37cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////////////////////////////////////
38cdf0e10cSrcweir //
39cdf0e10cSrcweir //  @@@@@  @@@@@   @@@@   @@@@   @@ @@ @@ @@@@@ @@   @@
40cdf0e10cSrcweir //  @@  @@ @@  @@ @@  @@ @@  @@  @@ @@ @@ @@    @@   @@
41cdf0e10cSrcweir //  @@  @@ @@  @@ @@  @@ @@      @@ @@ @@ @@    @@ @ @@
42cdf0e10cSrcweir //  @@  @@ @@@@@  @@@@@@ @@ @@@  @@@@@ @@ @@@@  @@@@@@@
43cdf0e10cSrcweir //  @@  @@ @@  @@ @@  @@ @@  @@   @@@  @@ @@    @@@@@@@
44cdf0e10cSrcweir //  @@  @@ @@  @@ @@  @@ @@  @@   @@@  @@ @@    @@@ @@@
45cdf0e10cSrcweir //  @@@@@  @@  @@ @@  @@  @@@@@    @   @@ @@@@@ @@   @@
46cdf0e10cSrcweir //
47cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////////////////////////////////////
48cdf0e10cSrcweir ////////////////////////////////////////////////////////////////////////////////////////////////////
49cdf0e10cSrcweir 
50cdf0e10cSrcweir class ImpSdrDragViewExtraData;
51cdf0e10cSrcweir 
52cdf0e10cSrcweir class SVX_DLLPUBLIC SdrDragView: public SdrExchangeView
53cdf0e10cSrcweir {
54cdf0e10cSrcweir 	friend class				SdrPageView;
55cdf0e10cSrcweir 	friend class				SdrDragMethod;
56cdf0e10cSrcweir 
57cdf0e10cSrcweir protected:
58cdf0e10cSrcweir 	SdrHdl*						pDragHdl;
59cdf0e10cSrcweir 	SdrDragMethod*				mpCurrentSdrDragMethod;
60cdf0e10cSrcweir 	SdrUndoGeoObj*				pInsPointUndo;
61cdf0e10cSrcweir 	Rectangle					aDragLimit;
62cdf0e10cSrcweir 	XubString					aInsPointUndoStr;
63cdf0e10cSrcweir 	SdrMarkList					aFollowingEdges; // Wenn Knoten gedraggd werden, sollen alle Kanten als Xor folgen
64cdf0e10cSrcweir 	SdrHdlKind					eDragHdl;
65cdf0e10cSrcweir 
66cdf0e10cSrcweir 	sal_uIntPtr						nDragXorPolyLimit;
67cdf0e10cSrcweir 	sal_uIntPtr						nDragXorPointLimit;
68cdf0e10cSrcweir 	sal_uInt16						nRubberEdgeDraggingLimit;
69cdf0e10cSrcweir 	sal_uInt16						nDetailedEdgeDraggingLimit;
70cdf0e10cSrcweir 
71cdf0e10cSrcweir 	unsigned					bFramDrag : 1;        // z.Zt. FrameDrag
72cdf0e10cSrcweir 	unsigned					bDragSpecial : 1;     // z.Zt. Special Obj-Dragging
73cdf0e10cSrcweir 	unsigned					bMarkedHitMovesAlways : 1; // Persistent
74cdf0e10cSrcweir 	unsigned					bDragLimit : 1;      // Limit auf SnapRect statt BoundRect
75cdf0e10cSrcweir 	unsigned					bDragHdl : 1;        // TRUE: RefPt wird verschoben
76cdf0e10cSrcweir 	unsigned					bDragStripes : 1;    // Persistent
77cdf0e10cSrcweir 	unsigned					bMirrRefDragObj : 1; // Persistent - Waehrend des Draggens der Spiegelachse die gespiegelten Objekte als Xor zeigen
78cdf0e10cSrcweir 	unsigned					mbSolidDragging : 1;  // allow solid create/drag of objects
79cdf0e10cSrcweir 	unsigned					bMouseHideWhileDraggingPoints : 1;
80cdf0e10cSrcweir 	unsigned					bResizeAtCenter : 1;
81cdf0e10cSrcweir 	unsigned					bCrookAtCenter : 1;
82cdf0e10cSrcweir 	unsigned					bDragWithCopy : 1;
83cdf0e10cSrcweir 	unsigned					bInsGluePoint : 1;
84cdf0e10cSrcweir 	unsigned					bInsObjPointMode : 1;
85cdf0e10cSrcweir 	unsigned					bInsGluePointMode : 1;
86cdf0e10cSrcweir 	unsigned					bNoDragXorPolys : 1;
87cdf0e10cSrcweir 	unsigned					bAutoVertexCon : 1;  // Automatische Konnektorgenerierung an den Scheitelpunkten
88cdf0e10cSrcweir 	unsigned					bAutoCornerCon : 1;  // Automatische Konnektorgenerierung an den Eckpunkten
89cdf0e10cSrcweir 	unsigned					bRubberEdgeDragging : 1;
90cdf0e10cSrcweir 	unsigned					bDetailedEdgeDragging : 1;
91cdf0e10cSrcweir 
92cdf0e10cSrcweir private:
93cdf0e10cSrcweir 	SVX_DLLPRIVATE void ImpClearVars();
94cdf0e10cSrcweir 	SVX_DLLPRIVATE void ImpMakeDragAttr();
95cdf0e10cSrcweir 	SVX_DLLPRIVATE void ImpDelDragAttr();
96cdf0e10cSrcweir 
97cdf0e10cSrcweir protected:
98cdf0e10cSrcweir 	virtual void SetMarkHandles();
99cdf0e10cSrcweir 	void ShowDragObj();
100cdf0e10cSrcweir 	void HideDragObj();
101cdf0e10cSrcweir 	sal_Bool ImpBegInsObjPoint(sal_Bool bIdxZwang, sal_uInt32 nIdx, const Point& rPnt, sal_Bool bNewObj, OutputDevice* pOut);
102cdf0e10cSrcweir 
103cdf0e10cSrcweir protected:
104cdf0e10cSrcweir 	// #i71538# make constructors of SdrView sub-components protected to avoid incomplete incarnations which may get casted to SdrView
105cdf0e10cSrcweir 	SdrDragView(SdrModel* pModel1, OutputDevice* pOut = 0L);
106cdf0e10cSrcweir 	virtual ~SdrDragView();
107cdf0e10cSrcweir 
108cdf0e10cSrcweir public:
109cdf0e10cSrcweir 	virtual sal_Bool IsAction() const;
110cdf0e10cSrcweir 	virtual void MovAction(const Point& rPnt);
111cdf0e10cSrcweir 	virtual void EndAction();
112cdf0e10cSrcweir 	virtual void BckAction();
113cdf0e10cSrcweir 	virtual void BrkAction();
114cdf0e10cSrcweir 	virtual void TakeActionRect(Rectangle& rRect) const;
115cdf0e10cSrcweir 
116cdf0e10cSrcweir 	// Spezialimplementation fuer den Writer:
117cdf0e10cSrcweir 	// TakeDragObjAnchorPos() liefert die Position an der ein Objekt
118cdf0e10cSrcweir 	// beim Draggen einer Einfachselektion ungefaehr landet wenn es
119cdf0e10cSrcweir 	// "losgelassen" wird (EndDrag).
120cdf0e10cSrcweir 	// In der Regel ist das die linke obere Ecke des zu erwartenden neuen
121cdf0e10cSrcweir 	// SnapRects. Ausnahme: CaptionObj. Dort ist es die Position des
122cdf0e10cSrcweir 	// "Schwanzendes".
123cdf0e10cSrcweir 	// Bei Returncode sal_False konnte ich die Position nicht bestimmen
124cdf0e10cSrcweir 	// (z.B. Punktverschiebung, Mehrfachselektion, Schieben der
125cdf0e10cSrcweir 	// Spiegelschse, ...)
126cdf0e10cSrcweir     sal_Bool TakeDragObjAnchorPos(Point& rPos, sal_Bool bTopRight = sal_False ) const;
127cdf0e10cSrcweir 
128cdf0e10cSrcweir 	// Wird pForcedMeth uebergeben, so wird pHdl, ... nicht ausgewerten, sondern diese
129cdf0e10cSrcweir 	// Drag-Methode verwendet. Die Instanz geht dabei ins Eigentum der View ueber und
130cdf0e10cSrcweir 	// wird zum Ende des Draggings destruiert.
131cdf0e10cSrcweir 	virtual sal_Bool BegDragObj(const Point& rPnt, OutputDevice* pOut=NULL, SdrHdl* pHdl=NULL, short nMinMov=-3, SdrDragMethod* pForcedMeth=NULL);
132cdf0e10cSrcweir 	void MovDragObj(const Point& rPnt);
133cdf0e10cSrcweir 	sal_Bool EndDragObj(sal_Bool bCopy=sal_False);
134cdf0e10cSrcweir 	void BrkDragObj();
IsDragObj() const135cdf0e10cSrcweir 	sal_Bool IsDragObj() const { return mpCurrentSdrDragMethod && !bInsPolyPoint && !bInsGluePoint; }
GetDragHdl() const136cdf0e10cSrcweir 	SdrHdl* GetDragHdl() const { return pDragHdl; }
GetDragMethod() const137cdf0e10cSrcweir 	SdrDragMethod* GetDragMethod() const { return mpCurrentSdrDragMethod; }
IsDraggingPoints() const138cdf0e10cSrcweir 	sal_Bool IsDraggingPoints() const { return eDragHdl==HDL_POLY; }
IsDraggingGluePoints() const139cdf0e10cSrcweir 	sal_Bool IsDraggingGluePoints() const { return eDragHdl==HDL_GLUE; }
140cdf0e10cSrcweir 
141cdf0e10cSrcweir 	// Wer das beim BegDrag oder mittendrin schon festlegen will.
142cdf0e10cSrcweir 	// (Wird bei jedem BegDrag auf sal_False zurueckgesetzt, also nach
143cdf0e10cSrcweir 	// BegDrag setzen.)
SetDragWithCopy(sal_Bool bOn)144cdf0e10cSrcweir 	void SetDragWithCopy(sal_Bool bOn) { bDragWithCopy = bOn; }
IsDragWithCopy() const145cdf0e10cSrcweir 	sal_Bool IsDragWithCopy() const { return bDragWithCopy; }
146cdf0e10cSrcweir 
SetInsertGluePoint(sal_Bool bOn)147cdf0e10cSrcweir 	void SetInsertGluePoint(sal_Bool bOn) { bInsGluePoint = bOn; }
IsInsertGluePoint() const148cdf0e10cSrcweir 	sal_Bool IsInsertGluePoint() const { return bInsGluePoint; }
149cdf0e10cSrcweir 
150cdf0e10cSrcweir 	// Interaktives einfuegen eines neuen Punktes. nIdx=0 => vor dem ersten Punkt.
151cdf0e10cSrcweir 	sal_Bool IsInsObjPointPossible() const;
IsInsPointPossible() const152cdf0e10cSrcweir 	sal_Bool IsInsPointPossible() const { return IsInsObjPointPossible(); }
BegInsObjPoint(const Point & rPnt,sal_Bool bNewObj)153cdf0e10cSrcweir 	sal_Bool BegInsObjPoint(const Point& rPnt, sal_Bool bNewObj) { return ImpBegInsObjPoint(sal_False, 0L, rPnt, bNewObj, 0L); }
MovInsObjPoint(const Point & rPnt)154cdf0e10cSrcweir 	void MovInsObjPoint(const Point& rPnt) { MovDragObj(rPnt); }
155cdf0e10cSrcweir 	sal_Bool EndInsObjPoint(SdrCreateCmd eCmd);
BrkInsObjPoint()156cdf0e10cSrcweir 	void BrkInsObjPoint() { BrkDragObj(); }
IsInsObjPoint() const157cdf0e10cSrcweir 	sal_Bool IsInsObjPoint() const { return mpCurrentSdrDragMethod && bInsPolyPoint; }
158cdf0e10cSrcweir 
159cdf0e10cSrcweir 	// Fuer die App zum Verwalten des Status. GetPreferedPointer() wird
160cdf0e10cSrcweir 	// spaeter vielleicht einen passenden Pointer dafuer liefern
SetInsObjPointMode(sal_Bool bOn)161cdf0e10cSrcweir 	void SetInsObjPointMode(sal_Bool bOn) { bInsObjPointMode = bOn; }
IsInsObjPointMode() const162cdf0e10cSrcweir 	sal_Bool IsInsObjPointMode() const { return bInsObjPointMode; }
163cdf0e10cSrcweir 
164cdf0e10cSrcweir 	sal_Bool IsInsGluePointPossible() const;
165cdf0e10cSrcweir 	sal_Bool BegInsGluePoint(const Point& rPnt);
MovInsGluePoint(const Point & rPnt)166cdf0e10cSrcweir 	void MovInsGluePoint(const Point& rPnt) { MovDragObj(rPnt); }
EndInsGluePoint()167cdf0e10cSrcweir 	sal_Bool EndInsGluePoint() { return EndDragObj(); }
BrkInsGluePoint()168cdf0e10cSrcweir 	void BrkInsGluePoint() { BrkDragObj(); }
IsInsGluePoint() const169cdf0e10cSrcweir 	sal_Bool IsInsGluePoint() const { return mpCurrentSdrDragMethod && bInsGluePoint; }
170cdf0e10cSrcweir 
171cdf0e10cSrcweir 	// Fuer die App zum Verwalten des Status. GetPreferedPointer() wird
172cdf0e10cSrcweir 	// spaeter vielleicht einen passenden Pointer dafuer liefern
SetInsGluePointMode(sal_Bool bOn)173cdf0e10cSrcweir 	void SetInsGluePointMode(sal_Bool bOn) { bInsGluePointMode = bOn; }
IsInsGluePointMode() const174cdf0e10cSrcweir 	sal_Bool IsInsGluePointMode() const { return bInsGluePointMode; }
175cdf0e10cSrcweir 
176cdf0e10cSrcweir 	// Begrenzungslinien ueber's gesamte Win waehrend des Draggens
177cdf0e10cSrcweir 	// Persistent. Default=FALSE.
178cdf0e10cSrcweir 	void SetDragStripes(sal_Bool bOn);
IsDragStripes() const179cdf0e10cSrcweir 	sal_Bool IsDragStripes() const { return bDragStripes; }
180cdf0e10cSrcweir 
181cdf0e10cSrcweir 	// Handles waehrend des Draggens verstecken
182cdf0e10cSrcweir 	//HMHvoid SetDragHdlHide(sal_Bool bOn);
183cdf0e10cSrcweir 	//HMHBOOL IsDragHdlHide() const { return bNoDragHdl; }
184cdf0e10cSrcweir 
185cdf0e10cSrcweir 	// Beim Draggen von Polygonpunkten und Klebepunkten
186cdf0e10cSrcweir 	// die Maus verstecken. Default=FALSE
SetMouseHideWhileDraggingPoints(sal_Bool bOn)187cdf0e10cSrcweir 	void SetMouseHideWhileDraggingPoints(sal_Bool bOn) { bMouseHideWhileDraggingPoints = bOn; }
IsMouseHideWhileDraggingPoints() const188cdf0e10cSrcweir 	sal_Bool IsMouseHideWhileDraggingPoints() const { return bMouseHideWhileDraggingPoints; }
189cdf0e10cSrcweir 
190cdf0e10cSrcweir 	// Beim Draggen werden i.d.R. die Konturen der markierten Objekte
191cdf0e10cSrcweir 	// als Xor-Polygone dargestellt. Wird dieses Flag hier gesetzt,
192cdf0e10cSrcweir 	// wird (z.B. bei Mehrfachselektion) nur ein Xor-Frame gezeichnet.
193cdf0e10cSrcweir 	// Bei objektspeziefischem Dragging (Polygonpunkte,Eckenradius,...
194cdf0e10cSrcweir 	// hat diese Einstellung keine Auswirkung.
195cdf0e10cSrcweir 	// Auch waerend des Draggens umschaltbar.
196cdf0e10cSrcweir 	// Default=Off
197cdf0e10cSrcweir 	void SetNoDragXorPolys(sal_Bool bOn);
IsNoDragXorPolys() const198cdf0e10cSrcweir 	sal_Bool IsNoDragXorPolys() const { return bNoDragXorPolys; }
199cdf0e10cSrcweir 
200cdf0e10cSrcweir 	// Uebersteigt die Anzahl der markierten Objekte den hier eingestellten
201cdf0e10cSrcweir 	// Wert, wird implizit (temporaer) auf NoDragPolys geschaltet.
202cdf0e10cSrcweir 	// PolyPolygone etc werden entsprechend als mehrere Objekte gewertet.
203cdf0e10cSrcweir 	// Default=100
SetDragXorPolyLimit(sal_uIntPtr nObjAnz)204cdf0e10cSrcweir 	void  SetDragXorPolyLimit(sal_uIntPtr nObjAnz) { nDragXorPolyLimit=nObjAnz; }
GetDragXorPolyLimit() const205cdf0e10cSrcweir 	sal_uIntPtr GetDragXorPolyLimit() const { return nDragXorPolyLimit; }
206cdf0e10cSrcweir 
207cdf0e10cSrcweir 	// Wie DragXorPolyLimit, jedoch bezogen auf die Gesamtpunktanzahl
208cdf0e10cSrcweir 	// aller Polygone. Default=500.
209cdf0e10cSrcweir 	// Auf NoDragPolys wird (temporaer) geschaltet, wenn eins der Limits
210cdf0e10cSrcweir 	// ueberstiegen wird.
SetDragXorPointLimit(sal_uIntPtr nPntAnz)211cdf0e10cSrcweir 	void  SetDragXorPointLimit(sal_uIntPtr nPntAnz) { nDragXorPointLimit=nPntAnz; }
GetDragXorPointLimit() const212cdf0e10cSrcweir 	sal_uIntPtr GetDragXorPointLimit() const { return nDragXorPointLimit; }
213cdf0e10cSrcweir 
214cdf0e10cSrcweir 	void SetSolidDragging(bool bOn);
215cdf0e10cSrcweir 	bool IsSolidDragging() const;
216cdf0e10cSrcweir 
217cdf0e10cSrcweir 	// Dragging/Creating von Verbindern:
218cdf0e10cSrcweir 	// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
219cdf0e10cSrcweir 	// Verbinder an Objektscheitelpunkte ankleben
220cdf0e10cSrcweir 	// Default=sal_True=Ja
SetAutoVertexConnectors(sal_Bool bOn)221cdf0e10cSrcweir 	void SetAutoVertexConnectors(sal_Bool bOn) { bAutoVertexCon = bOn; }
IsAutoVertexConnectors() const222cdf0e10cSrcweir 	sal_Bool IsAutoVertexConnectors() const { return bAutoVertexCon; }
223cdf0e10cSrcweir 
224cdf0e10cSrcweir 	// Verbinder an Objektecken ankleben
225cdf0e10cSrcweir 	// Default=sal_False=Nein
SetAutoCornerConnectors(sal_Bool bOn)226cdf0e10cSrcweir 	void SetAutoCornerConnectors(sal_Bool bOn) { bAutoCornerCon = bOn; }
IsAutoCornerConnectors() const227cdf0e10cSrcweir 	sal_Bool IsAutoCornerConnectors() const { return bAutoCornerCon; }
228cdf0e10cSrcweir 
229cdf0e10cSrcweir 	// Dragging von verbundenen Objekten (Nodes):
230cdf0e10cSrcweir 	// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
231cdf0e10cSrcweir 	// DetailedEdgeDraggingLimit: Wie RubberEdgeDraggingLimit, jedoch bezieht
232cdf0e10cSrcweir 	// sich dieses Limit auf die detalierte Darstellung, d.h. nicht nur
233cdf0e10cSrcweir 	// Gummibaender sondern komplette Neuberechnunen sind beim Draggen sichtbar.
234cdf0e10cSrcweir 	// Diese detalierte Darstellung ist eh nur beim MoveDrag moeglich.
235cdf0e10cSrcweir 	// Defaultwert ist 10
236cdf0e10cSrcweir 	void SetDetailedEdgeDragging(sal_Bool bOn); // Default an
IsDetailedEdgeDragging() const237cdf0e10cSrcweir 	sal_Bool IsDetailedEdgeDragging() const { return bDetailedEdgeDragging; }
238cdf0e10cSrcweir 
239cdf0e10cSrcweir 	void SetDetailedEdgeDraggingLimit(sal_uInt16 nEdgeObjAnz);
GetDetailedEdgeDraggingLimit() const240cdf0e10cSrcweir 	sal_uInt16 GetDetailedEdgeDraggingLimit() const { return nDetailedEdgeDraggingLimit; }
241cdf0e10cSrcweir 
242cdf0e10cSrcweir 	// EdgeDraggingLimit: Sind mehr als nEdgeObjAnz Kanten betroffen, werden
243cdf0e10cSrcweir 	// diese beim interaktiven Draggen nicht mit angezeigt.
244cdf0e10cSrcweir 	// Gemeint sind hier die "Gummibaender", die weniger Rechenzeit benoetigen
245cdf0e10cSrcweir 	// als die kompletten Neuberechnungen beim DetailedEdgeDragging.
246cdf0e10cSrcweir 	// Defaultwert ist 100
247cdf0e10cSrcweir 	void SetRubberEdgeDragging(sal_Bool bOn);  // Default an
IsRubberEdgeDragging() const248cdf0e10cSrcweir 	sal_Bool IsRubberEdgeDragging() const { return bRubberEdgeDragging; }
249cdf0e10cSrcweir 
250cdf0e10cSrcweir 	void SetRubberEdgeDraggingLimit(sal_uInt16 nEdgeObjAnz);
GetRubberEdgeDraggingLimit() const251cdf0e10cSrcweir 	sal_uInt16 GetRubberEdgeDraggingLimit() const { return nRubberEdgeDraggingLimit; }
252cdf0e10cSrcweir 
253cdf0e10cSrcweir 	// Verbinderhandling also zu deutsch wie folgt (bei Defaulteinstellungen):
254cdf0e10cSrcweir 	// - Sind bis max 10 Verbinder betroffen werden diese bei jedem
255cdf0e10cSrcweir 	//   MouseMove neu berechnet
256cdf0e10cSrcweir 	// - Sind zwischen 11 und 100 Verbinder betroffen werden die
257cdf0e10cSrcweir 	//   Verbindungen beim Draggen als gerade Linien dargestellt.
258cdf0e10cSrcweir 	// - Bei mehr als 100 betroffenen Verbindern wird beim Draggen nichts
259cdf0e10cSrcweir 	//   mehr gezeichnet was auf Verbinder hinweist.
260cdf0e10cSrcweir 
261cdf0e10cSrcweir 	// Ist ein spezieller Dragmode eingeschaltet, wie Rotate, Mirror oder Crook,
262cdf0e10cSrcweir 	// dann leitet ein Hit auf das markierte Objekt genau dieses Dragging ein.
263cdf0e10cSrcweir 	// Setzt man MarkedHitMovesAlways auf sal_True, so leitet ein Hit auf das
264cdf0e10cSrcweir 	// markierte Objekt immer ein Moven ein, unabhaengig vom gesetzten DragMode.
265cdf0e10cSrcweir 	// Dieses Flag ist persistent und sollte von der App fuer den Anwender
266cdf0e10cSrcweir 	// konfigurierbar sein!
SetMarkedHitMovesAlways(sal_Bool bOn)267cdf0e10cSrcweir 	void SetMarkedHitMovesAlways(sal_Bool bOn) { bMarkedHitMovesAlways = bOn; }
IsMarkedHitMovesAlways() const268cdf0e10cSrcweir 	sal_Bool IsMarkedHitMovesAlways() const { return bMarkedHitMovesAlways; }
269cdf0e10cSrcweir 
270cdf0e10cSrcweir 	// Beim Draggen der Spiegelachse das Spiegelbild der markierten Objekte
271cdf0e10cSrcweir 	// als Xor darstellen? Persistent. Noch nicht implementiert. Default TRUE.
SetMirrRefDragObj(sal_Bool bOn)272cdf0e10cSrcweir 	void SetMirrRefDragObj(sal_Bool bOn) { bMirrRefDragObj = bOn; }
IsMirrRefDragObj() const273cdf0e10cSrcweir 	sal_Bool IsMirrRefDragObj() const { return bMirrRefDragObj; }
274cdf0e10cSrcweir 
275cdf0e10cSrcweir 	sal_Bool IsOrthoDesired() const;
276cdf0e10cSrcweir 
277cdf0e10cSrcweir 	// Beim Resize die Mitte als Referenz
278cdf0e10cSrcweir 	// Default=FALSE.
IsResizeAtCenter() const279cdf0e10cSrcweir 	sal_Bool IsResizeAtCenter() const { return bResizeAtCenter; }
SetResizeAtCenter(sal_Bool bOn)280cdf0e10cSrcweir 	void SetResizeAtCenter(sal_Bool bOn) { bResizeAtCenter = bOn; }
281cdf0e10cSrcweir 
282cdf0e10cSrcweir 	// Symmetrisches Crook
283cdf0e10cSrcweir 	// Default=FALSE.
IsCrookAtCenter() const284cdf0e10cSrcweir 	sal_Bool IsCrookAtCenter() const { return bCrookAtCenter; }
SetCrookAtCenter(sal_Bool bOn)285cdf0e10cSrcweir 	void SetCrookAtCenter(sal_Bool bOn) { bCrookAtCenter = bOn; }
286cdf0e10cSrcweir 
287cdf0e10cSrcweir 	// Begrenzung des Arbeitsbereichs. Die Begrenzung bezieht sich auf die
288cdf0e10cSrcweir 	// View, nicht auf die einzelnen PageViews. Von der View wird diese
289cdf0e10cSrcweir 	// Begrenzung nur bei Interaktionen wie Dragging und Create ausgewertet.
290cdf0e10cSrcweir 	// Bei von der App algorithmisch oder UI-gesteuerte Aktionen (SetGeoAttr,
291cdf0e10cSrcweir 	// MoveMarkedObj, ...) muss die App dieses Limit selbst beruecksichtigen.
292cdf0e10cSrcweir 	// Ferner ist dieses Limit als Grob-Limit zu sehen. U.U. koennen Objekte
293cdf0e10cSrcweir 	// (z.B. beim Drehen) nicht exakt bis an dieses Limit herangedraggt werden,
294cdf0e10cSrcweir 	// koennen Objekte durch Rundungsfehler doch etwas ueberstehen, ... .
295cdf0e10cSrcweir 	// Default=EmptyRect=keine Begrenzung.
296cdf0e10cSrcweir 	// erst z.T. impl.
297cdf0e10cSrcweir 	// (besser in die DragView?)
SetWorkArea(const Rectangle & rRect)298cdf0e10cSrcweir 	void SetWorkArea(const Rectangle& rRect) { aMaxWorkArea=rRect; }
GetWorkArea() const299cdf0e10cSrcweir 	const Rectangle& GetWorkArea() const { return aMaxWorkArea; }
300cdf0e10cSrcweir 
301cdf0e10cSrcweir 
302cdf0e10cSrcweir 	// Das DragLimit ist bezogen auf die Page des Objekts.
303cdf0e10cSrcweir 	// (Oder auf die View??? Muss ich mal^^^^recherchieren. Joe.)
304cdf0e10cSrcweir 	// sal_False=Kein Limit.
305cdf0e10cSrcweir 	// Das Rueckgabe-Rect muss absolute Koordinaten enthalten. Der Maximale
306cdf0e10cSrcweir 	// Dragbereich wird von der View dann so gewaehlt, dass das SnapRect des
307cdf0e10cSrcweir 	// Objekts bis Maximal auf die Kante des LimitRects gemoved bzw. gesized
308cdf0e10cSrcweir 	// wird. Bei Objekten wie Bezierkurven, gedrehten Rechtecken ist zu beachten
309cdf0e10cSrcweir 	// das durch anschliessende Neuberechnung des SnapRects (bei Resize)
310cdf0e10cSrcweir 	// Rundungsfehler auftreten koennen, wodurch das LimitRect minnimal
311cdf0e10cSrcweir 	// ueberschritten werden koennte...
312cdf0e10cSrcweir 	// Implementiert fuer Move und Resize.
313cdf0e10cSrcweir 	virtual sal_Bool TakeDragLimit(SdrDragMode eMode, Rectangle& rRect) const;
314cdf0e10cSrcweir };
315cdf0e10cSrcweir 
316cdf0e10cSrcweir #endif //_SVDDRGV_HXX
317cdf0e10cSrcweir 
318