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