Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / include / svx / svdmrkv.hxx
blob2a049fc5288eac04ee3f24575ea0f7f6bfc3e92c
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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_SVDMRKV_HXX
21 #define INCLUDED_SVX_SVDMRKV_HXX
23 #include <svx/svdmark.hxx>
24 #include <svx/svdhdl.hxx>
25 #include <svx/svdsnpv.hxx>
26 #include <svx/svdtypes.hxx>
27 #include <svx/svxdllapi.h>
28 #include <o3tl/typed_flags_set.hxx>
30 class SfxViewShell;
32 // The following is not yet implemented, or just partially:
33 enum class SdrSearchOptions
35 NONE = 0x0000,
36 DEEP = 0x0001, /* recursive into group objects */
37 ALSOONMASTER = 0x0002, /* MasterPages are also scanned */
38 WHOLEPAGE = 0x0004, /* Not just the ObjList of PageView */
39 TESTMARKABLE = 0x0008, /* just markable objects/points/handles/... */
40 TESTMACRO = 0x0010, /* Just objects with macro */
41 TESTTEXTEDIT = 0x0020, /* Just TextEdit-enabled objects */
42 WITHTEXT = 0x0040, /* Just objects with text */
43 TESTTEXTAREA = 0x0080, /* The textarea of objects with text (TextEditHit) */
44 BACKWARD = 0x0100, /* Backwards search */
45 NEXT = 0x0200, /* Search starts behind the transferred object/point/... */
46 MARKED = 0x0400, /* Just marked objects/points/... */
47 PASS2BOUND = 0x0800, /* In case of empty search results, then 2nd. try with BoundRectHit */
48 PASS3NEAREST = 0x1000, /* In case of empty search results, then new 3rd. Try with NearestBoundRectHit */
49 BEFOREMARK = 0x2000, /* if one marked one found, ignore all behind that */
51 IMPISMASTER = 0x8000, /* MasterPage is being searched right now */
52 PICKMARKABLE = TESTMARKABLE,
53 PICKTEXTEDIT = DEEP | TESTMARKABLE | TESTTEXTEDIT,
54 PICKMACRO = DEEP | ALSOONMASTER | WHOLEPAGE | TESTMACRO,
56 namespace o3tl
58 template<> struct typed_flags<SdrSearchOptions> : is_typed_flags<SdrSearchOptions, 0xbfff> {};
61 enum class SdrHitKind
63 NONE, // No hit
64 Object, // Hit
65 Handle, // Marking handle
66 HelpLine, // Reference line
67 Gluepoint, // Glue point
68 TextEdit, // Open OutlinerView was hit
69 TextEditObj, // Object for SdrBeginTextEdit (Textbereich)
70 UrlField, // Field in TextObj was hit (while it is currently not edited)
71 Macro, // Object for BegMacroObj
72 MarkedObject, // Marked object (e.g. for dragging)
73 UnmarkedObject, // non-marked Object (e.g. for marking)
74 Cell // hit on a cell inside a table shape (outside of the cells text area)
77 enum class SdrViewEditMode {
78 Edit, // Also known as arrow or pointer mode
79 Create, // Tool for object creation
80 GluePointEdit // Glue point editing mode
83 /** options for ImpTakeDescriptionStr() */
84 enum class ImpTakeDescriptionOptions
86 NONE = 0,
87 POINTS = 1,
88 GLUEPOINTS = 2,
91 class ImplMarkingOverlay;
93 class SVX_DLLPUBLIC SdrMarkView : public SdrSnapView
95 friend class SdrPageView;
97 // #114409#-3 Migrate selections
98 ImplMarkingOverlay* mpMarkObjOverlay;
99 ImplMarkingOverlay* mpMarkPointsOverlay;
100 ImplMarkingOverlay* mpMarkGluePointsOverlay;
102 protected:
103 SdrObject* mpMarkedObj; // If not just one object ( i.e. More than one object ) is marked.
104 SdrPageView* mpMarkedPV; // If all marked obects are situated on the same PageView.
106 Point maRef1; // Persistent - Rotation center / axis of reflection
107 Point maRef2; // Persistent
108 Point maLastCrookCenter; // Persistent
109 SdrHdlList maHdlList;
110 sdr::ViewSelection maSdrViewSelection;
112 tools::Rectangle maMarkedObjRect;
113 tools::Rectangle maMarkedObjRectNoOffset;
114 tools::Rectangle maMarkedPointsRect;
115 tools::Rectangle maMarkedGluePointsRect;
117 sal_uInt16 mnFrameHandlesLimit;
118 sal_uIntPtr mnInsPointNum; // Number of the InsPoint
120 SdrDragMode meDragMode; // Persistent
121 SdrViewEditMode meEditMode; // Persistent
122 SdrViewEditMode meEditMode0; // Persistent
124 bool mbDesignMode : 1; // DesignMode for SdrUnoObj
125 bool mbForceFrameHandles : 1; // Persistent - FrameDrag also for single objects
126 bool mbPlusHdlAlways : 1; // Persistent
127 bool mbMarkHdlWhenTextEdit : 1; // Persistent, default=FALSE
128 bool mbInsPolyPoint : 1; // at this time InsPolyPointDragging
129 bool mbMarkedObjRectDirty : 1;
130 bool mbMrkPntDirty : 1;
131 bool mbMarkedPointsRectsDirty : 1;
133 // flag to completely disable handles at the view
134 bool mbMarkHandlesHidden : 1;
136 private:
137 SVX_DLLPRIVATE void ImpClearVars();
138 SVX_DLLPRIVATE void ImpSetPointsRects() const;
139 void UndirtyMrkPnt() const;
141 protected:
142 virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override;
143 virtual void ModelHasChanged() override; // Is called by the PaintView
144 virtual void SetMarkHandles(SfxViewShell* pOtherShell); // maHdlList - fill (List of handles)
145 void SetMarkRects(); // Rects at the PageViews
146 void CheckMarked(); // Scan MarkList after Del and Lock Layer ...
147 void AddDragModeHdl(SdrDragMode eMode);
148 virtual bool MouseMove(const MouseEvent& rMEvt, vcl::Window* pWin) override;
150 // add custom handles (used by other apps, e.g. AnchorPos)
151 virtual void AddCustomHdl();
153 void ForceRefToMarked();
154 void ForceUndirtyMrkPnt() const { if (mbMrkPntDirty) UndirtyMrkPnt(); }
156 virtual SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObject* pObj, SdrPageView* pPV, SdrSearchOptions nOptions, const SdrLayerIDSet* pMVisLay) const;
157 SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObjList* pOL, SdrPageView* pPV, SdrSearchOptions nOptions, const SdrLayerIDSet* pMVisLay, SdrObject*& rpRootObj) const;
158 SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObjList* pOL, SdrPageView* pPV, SdrSearchOptions nOptions, const SdrLayerIDSet* pMVisLay, SdrObject*& rpRootObj,const SdrMarkList * pMarkList) const;
159 bool ImpIsFrameHandles() const;
160 void ImpTakeDescriptionStr(sal_uInt16 nStrCacheID, OUString& rStr, ImpTakeDescriptionOptions nOpt=ImpTakeDescriptionOptions::NONE) const;
162 // Generates a string including degrees symbol, from an angel specification in 1/100deg
163 bool ImpMarkPoint(SdrHdl* pHdl, SdrMark* pMark, bool bUnmark);
164 virtual bool MarkPoints(const tools::Rectangle* pRect, bool bUnmark);
165 bool MarkGluePoints(const tools::Rectangle* pRect, bool bUnmark);
167 void SetMoveOutside(bool bOn);
169 protected:
170 // #i71538# make constructors of SdrView sub-components protected to avoid incomplete incarnations which may get casted to SdrView
171 SdrMarkView(SdrModel* pModel1, OutputDevice* pOut);
172 virtual ~SdrMarkView() override;
174 public:
175 virtual bool IsAction() const override;
176 virtual void MovAction(const Point& rPnt) override;
177 virtual void EndAction() override;
178 virtual void BckAction() override;
179 virtual void BrkAction() override;
180 virtual void TakeActionRect(tools::Rectangle& rRect) const override;
182 virtual void ClearPageView() override;
183 virtual void HideSdrPage() override;
184 bool IsObjMarkable(SdrObject* pObj, SdrPageView* pPV) const;
186 // Returns sal_True if objects, points or glue points are selected by drawing a frame
187 // (as long as the frame is drawn).
188 bool IsMarking() const { return IsMarkObj() || IsMarkPoints() || IsMarkGluePoints(); }
190 // Marking objects by drawing of a selection frame
191 bool BegMarkObj(const Point& rPnt, bool bUnmark = false);
192 void MovMarkObj(const Point& rPnt);
193 bool EndMarkObj();
194 void BrkMarkObj();
195 bool IsMarkObj() const { return (nullptr != mpMarkObjOverlay); }
197 // DragModes: SDRDRAG_CREATE,SdrDragMode::Move,SdrDragMode::Resize,SdrDragMode::Rotate,SdrDragMode::Mirror,SdrDragMode::Shear,SdrDragMode::Crook
198 // Move==Resize
199 // The interface might maybe be changed in the future because of Ortho-Drag
200 void SetDragMode(SdrDragMode eMode);
201 SdrDragMode GetDragMode() const { return meDragMode; }
202 void SetFrameHandles(bool bOn);
203 bool IsFrameHandles() const { return mbForceFrameHandles; }
205 sal_uIntPtr GetMarkableObjCount() const;
207 void SetEditMode(SdrViewEditMode eMode);
208 SdrViewEditMode GetEditMode() const { return meEditMode; }
210 void SetEditMode(bool bOn) { SetEditMode(bOn?SdrViewEditMode::Edit:SdrViewEditMode::Create); }
211 bool IsEditMode() const { return meEditMode==SdrViewEditMode::Edit; }
212 void SetCreateMode(bool bOn) { SetEditMode(bOn?SdrViewEditMode::Create:SdrViewEditMode::Edit); }
213 bool IsCreateMode() const { return meEditMode==SdrViewEditMode::Create; }
214 void SetGluePointEditMode(bool bOn) { SetEditMode(bOn?SdrViewEditMode::GluePointEdit:meEditMode0); }
215 bool IsGluePointEditMode() const { return meEditMode==SdrViewEditMode::GluePointEdit; }
217 void SetDesignMode(bool bOn = true);
218 bool IsDesignMode() const { return mbDesignMode; }
220 void SetFrameDragSingles(bool bOn=true) { SetFrameHandles(bOn); }
221 bool IsFrameDragSingles() const { return IsFrameHandles(); }
223 bool HasMarkableObj() const;
226 // migrate selections
228 protected:
229 // all available changing methods
230 SdrMarkList& GetMarkedObjectListWriteAccess() { return maSdrViewSelection.GetMarkedObjectListWriteAccess(); }
232 public:
233 // all available const methods for read access to selection
234 const SdrMarkList& GetMarkedObjectList() const { return maSdrViewSelection.GetMarkedObjectList(); }
235 // returns SAL_MAX_SIZE if not found
236 size_t TryToFindMarkedObject(const SdrObject* pObj) const { return GetMarkedObjectList().FindObject(pObj); }
237 SdrPageView* GetSdrPageViewOfMarkedByIndex(size_t nNum) const { return GetMarkedObjectList().GetMark(nNum)->GetPageView(); }
238 SdrMark* GetSdrMarkByIndex(size_t nNum) const { return GetMarkedObjectList().GetMark(nNum); }
239 SdrObject* GetMarkedObjectByIndex(size_t nNum) const { return (GetMarkedObjectList().GetMark(nNum))->GetMarkedSdrObj(); }
240 size_t GetMarkedObjectCount() const { return GetMarkedObjectList().GetMarkCount(); }
241 void SortMarkedObjects() const { GetMarkedObjectList().ForceSort(); }
242 bool AreObjectsMarked() const { return 0 != GetMarkedObjectList().GetMarkCount(); }
243 OUString GetDescriptionOfMarkedObjects() const { return GetMarkedObjectList().GetMarkDescription(); }
244 OUString GetDescriptionOfMarkedPoints() const { return GetMarkedObjectList().GetPointMarkDescription(); }
245 OUString GetDescriptionOfMarkedGluePoints() const { return GetMarkedObjectList().GetGluePointMarkDescription(); }
247 // Get a list of all those links which are connected to marked nodes,
248 // but which are not marked themselves.
249 const SdrMarkList& GetEdgesOfMarkedNodes() const { return maSdrViewSelection.GetEdgesOfMarkedNodes(); }
250 const SdrMarkList& GetMarkedEdgesOfMarkedNodes() const { return maSdrViewSelection.GetMarkedEdgesOfMarkedNodes(); }
251 const std::vector<SdrObject*>& GetTransitiveHullOfMarkedObjects() const { return maSdrViewSelection.GetAllMarkedObjects(); }
254 // mechanism to complete disable handles at the view. Handles will be hidden and deleted
255 // when set, no new ones created, no interaction allowed. Handles will be recreated and shown
256 // when reset. Default is false.
257 void hideMarkHandles();
258 void showMarkHandles();
259 bool areMarkHandlesHidden() const { return mbMarkHandlesHidden; }
261 bool IsMarkedHit(const Point& rPnt, short nTol=-2) const { return IsMarkedObjHit(rPnt,nTol); }
262 bool IsMarkedObjHit(const Point& rPnt, short nTol=-2) const;
264 SdrHdl* PickHandle(const Point& rPnt) const;
266 // Pick: Supported options for nOptions are:
267 // SdrSearchOptions::DEEP SdrSearchOptions::ALSOONMASTER SdrSearchOptions::TESTMARKABLE SdrSearchOptions::TESTTEXTEDIT
268 // SdrSearchOptions::WITHTEXT SdrSearchOptions::TESTTEXTAREA SdrSearchOptions::BACKWARD SdrSearchOptions::MARKED
269 // SdrSearchOptions::WHOLEPAGE
270 SdrObject* PickObj(const Point& rPnt, short nTol, SdrPageView*& rpPV, SdrSearchOptions nOptions, SdrObject** ppRootObj, bool* pbHitPassDirect=nullptr) const;
271 SdrObject* PickObj(const Point& rPnt, short nTol, SdrPageView*& rpPV, SdrSearchOptions nOptions=SdrSearchOptions::NONE) const;
272 bool MarkObj(const Point& rPnt, short nTol=-2, bool bToggle=false, bool bDeep=false);
274 // Pick: Supported options for nOptions are SdrSearchOptions::PASS2BOUND and SdrSearchOptions::PASS3NEAREST
275 bool PickMarkedObj(const Point& rPnt, SdrObject*& rpObj, SdrPageView*& rpPV, SdrSearchOptions nOptions) const;
277 // Selects the most upper of the marked objects (O1) and scans from there
278 // towards bottom direction, selecting the first non-marked object (O2).
279 // In case of success the marking of O1 is deleted, a marking is created at
280 // O2 and TRUE is returned. With the parameter bPrev=sal_True the scan
281 // direction is turned to the other direction.
282 bool MarkNextObj(bool bPrev=false);
284 // Selects the most upper of the marked objects which is hit by rPnt/nTol
285 // and scans from there to bottom direction, selecting the first non-marked
286 // object (O2). In case of success the marking of O1 is deleted, a marking
287 // is created at O2 and sal_True is returned. With the parameter
288 // bPrev=sal_True the scan direction is turned to the other direction.
289 bool MarkNextObj(const Point& rPnt, short nTol, bool bPrev);
291 // Mark all objects within a rectangular area
292 // Just objects are marked which are inclosed completely
293 void MarkObj(const tools::Rectangle& rRect, bool bUnmark);
294 void MarkObj(SdrObject* pObj, SdrPageView* pPV, bool bUnmark=false, bool bImpNoSetMarkHdl=false);
295 void MarkAllObj(SdrPageView* pPV=nullptr); // pPage=NULL => all displayed pages
296 void UnmarkAllObj(SdrPageView* pPV=nullptr); // pPage=NULL => all displayed pages
298 // This function is time-consuming intensive, as the MarkList has to be scanned.
299 bool IsObjMarked(SdrObject* pObj) const;
300 // void MarkAll(SdrPageView* pPV=NULL) { MarkAllObj(pPV); } -> replace with inline
301 void UnMarkAll(SdrPageView* pPV=nullptr) { UnmarkAllObj(pPV); }
303 // Request/set the size of the marking handles. Declaration in Pixel.
304 // The value is meant to be the edge length ( link length ).
305 // Pair values are round up to impair values: 3->3, 4->5, 5->5, 6->7, 7->7, ...
306 // Default value is 7, minimum value is 3 Pixels.
307 sal_uInt16 GetMarkHdlSizePixel() const;
308 void SetMarkHdlSizePixel(sal_uInt16 nSiz);
310 virtual bool HasMarkablePoints() const;
311 virtual sal_uIntPtr GetMarkablePointCount() const;
312 virtual bool HasMarkedPoints() const;
313 virtual sal_uIntPtr GetMarkedPointCount() const;
315 // There might be points which can't be marked:
316 virtual bool IsPointMarkable(const SdrHdl& rHdl) const;
317 virtual bool MarkPoint(SdrHdl& rHdl, bool bUnmark=false);
319 /** should only be used from outside svx for special ui elements */
320 bool MarkPointHelper(SdrHdl* pHdl, SdrMark* pMark, bool bUnmark);
322 bool UnmarkPoint(SdrHdl& rHdl) { return MarkPoint(rHdl,true); }
323 bool IsPointMarked(const SdrHdl& rHdl) const { ForceUndirtyMrkPnt(); return rHdl.IsSelected(); }
324 bool MarkAllPoints() { return MarkPoints(nullptr,false); }
325 bool UnmarkAllPoints() { return MarkPoints(nullptr,true); }
327 // Selects the first marked point (P1) which is hit by rPnt
328 // and from there it searches the first non-marked point(P2).
329 // In case of success the marking of
330 // P1 is deleted, a mark is set at P2 and true is returned.
331 bool MarkNextPoint();
333 // Search for the number of the suitable handle. In case of empty search result,
334 // SAL_MAX_SIZE is returned.
335 size_t GetHdlNum(SdrHdl* pHdl) const { return maHdlList.GetHdlNum(pHdl); }
336 SdrHdl* GetHdl(size_t nHdlNum) const { return maHdlList.GetHdl(nHdlNum); }
337 const SdrHdlList& GetHdlList() const { return maHdlList; }
339 // Draw a selection frame for marking of points.
340 // This routine will just be started in case that HasMarkablePoints() returns sal_True.
341 bool BegMarkPoints(const Point& rPnt, bool bUnmark = false);
342 void MovMarkPoints(const Point& rPnt);
343 bool EndMarkPoints();
344 void BrkMarkPoints();
345 bool IsMarkPoints() const { return (nullptr != mpMarkPointsOverlay); }
347 // Select that additional handles are displayed permanently.
348 void SetPlusHandlesAlwaysVisible(bool bOn);
349 bool IsPlusHandlesAlwaysVisible() const { return mbPlusHdlAlways; }
351 // Are Handles visible during TextEdit (in double size)?
352 // Persistent, default=FALSE
353 void SetMarkHdlWhenTextEdit(bool bOn) { mbMarkHdlWhenTextEdit=bOn; }
355 bool HasMarkableGluePoints() const;
356 bool HasMarkedGluePoints() const;
358 // A gluepoint is clearly identified by the SdrObject
359 // (to which it belongs) as well as by a sal_uInt16 nId (as each SdrObject may consist of
360 // several glue points. Here at the View there is an additional
361 // SdrPageView, which should be defined correctly always.
362 // Alternatively a gluepoint may be characterized by a SdrHdl.
363 // In this case the SdrHdl instance consists of all required information.
364 // And in this case, the glue point are always is marked by enforcement
365 // (Handlers are just situated at marked gluepoints )
366 // Attention: With each change of the glue point status the handle list is re-calculated.
367 // All previously saved SdrHdl* became invalid by this, the same with the point IDs!
368 bool PickGluePoint(const Point& rPnt, SdrObject*& rpObj, sal_uInt16& rnId, SdrPageView*& rpPV) const;
369 bool MarkGluePoint(const SdrObject* pObj, sal_uInt16 nId, bool bUnmark=false);
370 void UnmarkGluePoint(const SdrObject* pObj, sal_uInt16 nId) { MarkGluePoint(pObj,nId,true); }
371 bool IsGluePointMarked(const SdrObject* pObj, sal_uInt16 nId) const;
373 // Get the Hdl (handle) of a marked GluePoint. Non-marked
374 // GluePoints don`t have handles
375 SdrHdl* GetGluePointHdl(const SdrObject* pObj, sal_uInt16 nId) const;
377 // Mark all points within this rectangular (View coordinates)
378 bool MarkAllGluePoints() { return MarkGluePoints(nullptr,false); }
379 bool UnmarkAllGluePoints() { return MarkGluePoints(nullptr,true); }
381 // Selects the first marked point (P1) which is hit by rPnt
382 // and from there it searches the first non-marked point(P2).
383 // In case of success the marking of
384 // P1 is deleted, a mark is set at P2 and true is returned.
385 bool MarkNextGluePoint();
387 // Draw a selection frame for glue point marking.
388 // This routine will just be started in case that HasMarkablePoints() returns sal_True.
389 // The GlueEditMode sal_True is disregarded.
390 // bool BegMarkGluePoints(const Point& rPnt, OutputDevice* pOut);
391 bool BegMarkGluePoints(const Point& rPnt, bool bUnmark = false);
392 void MovMarkGluePoints(const Point& rPnt);
393 void EndMarkGluePoints();
394 void BrkMarkGluePoints();
395 bool IsMarkGluePoints() const { return (nullptr != mpMarkGluePointsOverlay); }
397 // bRestraintPaint=sal_False causes the handles not to be drawn immediately.
398 // AdjustMarkHdl is just called in case of changes; usually this causes an Invalidate
399 // At the end of a redraw the handles are drawn automatically.
400 // The purpose is to avoid unnecessary flickering. -> This does not yet work, that's why sal_True!
401 void AdjustMarkHdl(SfxViewShell* pOtherShell = nullptr); //HMHBOOL bRestraintPaint=sal_True);
403 const tools::Rectangle& GetMarkedObjRect() const; // SnapRects of Objects, without line width
404 tools::Rectangle GetMarkedObjBoundRect() const; // incl. line width, overlapping rags, ...
405 const tools::Rectangle& GetMarkedPointsRect() const; // Enclosing rectangle of all marked points
406 const tools::Rectangle& GetMarkedGluePointsRect() const; // Enclosing rectangle of all marked glue points
407 const tools::Rectangle& GetAllMarkedRect() const { return GetMarkedObjRect(); }
408 tools::Rectangle GetAllMarkedBoundRect() const { return GetMarkedObjBoundRect(); }
409 Point GetGridOffset() const;
411 // Will be always called, if the list of marked objects might be changed.
412 // If you override this method, be sure that you call the
413 // methods of the base class!
414 virtual void MarkListHasChanged();
416 // Entering (Editing) of a maybe marked object group. If there are several
417 // object groups marked, the most upper group is selected. After that
418 // all member objects of the group are directly accessible. All other
419 // objects may not be processed in the meantime (until the next
420 // LeaveGroup()). With markings which overlaps pages, every page is processed
421 // separately. The method returns sal_True, if at least one group was entered.
422 void EnterMarkedGroup();
424 // Is set by DragView automatically when finishing a Crook-Drag.
425 void SetLastCrookCenter(const Point& rPt) { maLastCrookCenter=rPt; }
427 // Rotation center point and start point of the axis of reflextion, respectively
428 const Point& GetRef1() const { return maRef1; }
429 void SetRef1(const Point& rPt);
431 // End point of the axis of reflextion
432 const Point& GetRef2() const { return maRef1; }
433 void SetRef2(const Point& rPt);
434 /// Get access to the view shell owning this draw view, if any.
435 virtual SfxViewShell* GetSfxViewShell() const;
439 // - Hit tolarances:
440 // It has to be declared in logical coordinates. So please translate the
441 // wanted pixel value with PixelToLogic in Logical values.
442 // Taking as example a logical value of 100:
443 // - For a horizontal hairline (Object with height 0), the generated data is +/-100, i.e.
444 // a vertical area of 200 logical units is sensitive.
445 // - For a polygon, a rectangular of the size (200,200) is generated and a
446 // touch test between Poly and this Rect is processed.
447 // - Obects which respond SdrObject::HasEdit()==TRUE ( e.g. a text frame ),
448 // are specially treated: An additional sensitive area with a width of
449 // 2*Tol (200 units for this example) is created around the object.
450 // When an object is directly hit, the Edit method is called.
451 // In opposite, a hit in the surrounding sensitive area enables Dragging.
454 #endif // INCLUDED_SVX_SVDMRKV_HXX
456 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */