46 typedef int32 SnapFlags;
47 typedef int32 SnapType;
48 const PMReal kInvalidSnapValue = 10000000.0;
57 kSnapNothing = 0x0000,
58 kSnapRulerGuides = 0x0001,
59 kSnapSmartGuides = 0x0002,
60 kSnapMarginGuides = 0x0004,
61 kSnapColumnGuides = 0x0008,
64 kSnapBaselineGrid = 0x0040,
65 kSnapRulerTickmarks = 0x0080,
66 kSnapSelection = 0x0100,
67 kSnapAllGuides = kSnapRulerGuides + kSnapMarginGuides + kSnapColumnGuides + kSnapSmartGuides,
68 kSnapAllGrids = kSnapGrid + kSnapBaselineGrid,
69 kSnapAllPageMarks = kSnapAllGuides + kSnapAllGrids + kSnapPage,
75 kSnapNone = 0x00000000,
78 kSnapXandY = kSnapX + kSnapY,
79 kSnapAnyX = 0x00000004,
80 kSnapAnyY = 0x00000008,
81 kSnapAllX = 0x00000004 + kSnapX,
82 kSnapAllY = 0x00000008 + kSnapY,
83 kSnapAllXandY = kSnapAllX + kSnapAllY,
84 kSnapInvalid = 0x00000010,
85 kSnapSkipCenters = 0x00000020
94 virtual const UIDList* GetItemList()
const = 0;
95 virtual void SetItemList(
const UIDList& itemList) = 0;
98 virtual const PMPoint& GetInitialPoint()
const = 0;
99 virtual void SetInitialPoint(
const PMPoint& initialPoint) = 0;
111 virtual bool16 GetSnappingEnabled()
const = 0;
112 virtual void SetSnappingEnabled(bool16 enabled) = 0;
115 virtual SnapFlags GetSnapFlags()
const = 0;
116 virtual void SetSnapFlags(
IControlView* theView, SnapFlags flags) = 0;
119 virtual SnapType GetSnapType()
const = 0;
120 virtual void SetSnapType(SnapType flags) = 0;
126 SnapType snapType = kSnapXandY) = 0;
134 SnapType snapType = kSnapXandY) = 0;
140 SnapType snapType = kSnapXandY) = 0;
143 virtual SnapType SnapToRulerTickmarks(
IControlView* theView,
PMPoint& thePoint, SnapType snapType = kSnapXandY) = 0;
144 virtual SnapType SnapToRulerGuides(
IControlView* theView,
PMPoint& thePoint, SnapType snapType = kSnapXandY) = 0;
145 virtual SnapType SnapToMarginGuides(
IControlView* theView,
PMPoint& thePoint, SnapType snapType = kSnapXandY) = 0;
146 virtual SnapType SnapToColumnGuides(
IControlView* theView,
PMPoint& thePoint, SnapType snapType = kSnapX) = 0;
147 virtual SnapType SnapToGrid(
IControlView* theView,
PMPoint& thePoint, SnapType snapType = kSnapXandY) = 0;
148 virtual SnapType SnapToBaselineGrid(
IControlView* theView,
PMPoint& thePoint, SnapType snapType = kSnapY) = 0;
149 virtual SnapType SnapToPage(
IControlView* theView,
PMPoint& thePoint, SnapType snapType = kSnapY) = 0;
163 kShouldSnapDrag_UseDefault = -1,
164 kShouldSnapDrag_No = 0,
165 kShouldSnapDrag_Yes = 1
169 virtual eShouldSnap ShouldSnapDragOverLayoutView(
IControlView* layoutView,
171 const PMPoint& theConstrainedPoint,
172 const PMPoint& thePreviousPoint,
174 const PMRect& theRect)
const = 0;