blob: fd30be6b12d4166482af6284044cf4664bbc3623 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
{ Parsed from Appkit.framework NSRulerView.h }
{ Version: 2.1.4 - Sun Jan 2 15:08:19 CET 2011 }
{$ifdef TYPES}
{$ifndef NSRULERVIEW_PAS_T}
{$define NSRULERVIEW_PAS_T}
{ Constants }
const
NSHorizontalRuler = 0;
NSVerticalRuler = 1;
{ Types }
type
NSRulerOrientation = NSUInteger;
NSRulerOrientationPtr = ^NSRulerOrientation;
{$endif}
{$endif}
{$ifdef RECORDS}
{$ifndef NSRULERVIEW_PAS_R}
{$define NSRULERVIEW_PAS_R}
{$endif}
{$endif}
{$ifdef FUNCTIONS}
{$ifndef NSRULERVIEW_PAS_F}
{$define NSRULERVIEW_PAS_F}
{$endif}
{$endif}
{$ifdef EXTERNAL_SYMBOLS}
{$ifndef NSRULERVIEW_PAS_S}
{$define NSRULERVIEW_PAS_S}
{$endif}
{$endif}
{$ifdef FORWARD}
NSRulerView = objcclass;
NSRulerViewPointer = ^NSRulerView;
NSRulerViewPtr = NSRulerViewPointer;
{$endif}
{$ifdef CLASSES}
{$ifndef NSRULERVIEW_PAS_C}
{$define NSRULERVIEW_PAS_C}
{ NSRulerView }
NSRulerView = objcclass external (NSView)
private
_scrollView: NSScrollView;
_orientation: NSRulerOrientation;
_units: NSString;
_originOffset: CGFloat;
_ruleThickness: CGFloat;
_thicknessForMarkers: CGFloat;
_thicknessForAccessoryView: CGFloat;
_clientView: NSView;
_markers: NSMutableArray;
_accessoryView: NSView;
_cachedHashDict: NSDictionary;
_cachedDocViewToRulerConversion: CGFloat;
_cachedContentBoundsOrigin: NSPoint;
_draggingMarker: NSRulerMarker;
_reservedRulerView1: id;
public
class procedure registerUnitWithName_abbreviation_unitToPointsConversionFactor_stepUpCycle_stepDownCycle(unitName: NSString; abbreviation: NSString; conversionFactor: CGFloat; stepUpCycle: NSArray; stepDownCycle: NSArray); message 'registerUnitWithName:abbreviation:unitToPointsConversionFactor:stepUpCycle:stepDownCycle:';
function initWithScrollView_orientation(scrollView_: NSScrollView; orientation_: NSRulerOrientation): id; message 'initWithScrollView:orientation:';
procedure setScrollView(scrollView_: NSScrollView); message 'setScrollView:';
function scrollView: NSScrollView; message 'scrollView';
procedure setOrientation(orientation_: NSRulerOrientation); message 'setOrientation:';
function orientation: NSRulerOrientation; message 'orientation';
function baselineLocation: CGFloat; message 'baselineLocation';
function requiredThickness: CGFloat; message 'requiredThickness';
procedure setRuleThickness(thickness: CGFloat); message 'setRuleThickness:';
function ruleThickness: CGFloat; message 'ruleThickness';
procedure setReservedThicknessForMarkers(thickness: CGFloat); message 'setReservedThicknessForMarkers:';
function reservedThicknessForMarkers: CGFloat; message 'reservedThicknessForMarkers';
procedure setReservedThicknessForAccessoryView(thickness: CGFloat); message 'setReservedThicknessForAccessoryView:';
function reservedThicknessForAccessoryView: CGFloat; message 'reservedThicknessForAccessoryView';
procedure setMeasurementUnits(unitName: NSString); message 'setMeasurementUnits:';
function measurementUnits: NSString; message 'measurementUnits';
procedure setOriginOffset(offset: CGFloat); message 'setOriginOffset:';
function originOffset: CGFloat; message 'originOffset';
procedure setClientView(client: NSView); message 'setClientView:';
function clientView: NSView; message 'clientView';
procedure setMarkers(markers_: NSArray); message 'setMarkers:';
procedure addMarker(marker: NSRulerMarker); message 'addMarker:';
procedure removeMarker(marker: NSRulerMarker); message 'removeMarker:';
function markers: NSArray; message 'markers';
function trackMarker_withMouseEvent(marker: NSRulerMarker; event: NSEvent): Boolean; message 'trackMarker:withMouseEvent:';
procedure setAccessoryView(accessory: NSView); message 'setAccessoryView:';
function accessoryView: NSView; message 'accessoryView';
procedure moveRulerlineFromLocation_toLocation(oldLocation: CGFloat; newLocation: CGFloat); message 'moveRulerlineFromLocation:toLocation:';
procedure invalidateHashMarks; message 'invalidateHashMarks';
procedure drawHashMarksAndLabelsInRect(rect: NSRect); message 'drawHashMarksAndLabelsInRect:';
procedure drawMarkersInRect(rect: NSRect); message 'drawMarkersInRect:';
function isFlipped: Boolean; message 'isFlipped';
end;
{ NSRulerMarkerClientViewDelegationCategory }
NSRulerMarkerClientViewDelegationCategory = objccategory external (NSView)
function rulerView_shouldMoveMarker(ruler: NSRulerView; marker: NSRulerMarker): Boolean; message 'rulerView:shouldMoveMarker:';
function rulerView_willMoveMarker_toLocation(ruler: NSRulerView; marker: NSRulerMarker; location: CGFloat): CGFloat; message 'rulerView:willMoveMarker:toLocation:';
procedure rulerView_didMoveMarker(ruler: NSRulerView; marker: NSRulerMarker); message 'rulerView:didMoveMarker:';
function rulerView_shouldRemoveMarker(ruler: NSRulerView; marker: NSRulerMarker): Boolean; message 'rulerView:shouldRemoveMarker:';
procedure rulerView_didRemoveMarker(ruler: NSRulerView; marker: NSRulerMarker); message 'rulerView:didRemoveMarker:';
function rulerView_shouldAddMarker(ruler: NSRulerView; marker: NSRulerMarker): Boolean; message 'rulerView:shouldAddMarker:';
function rulerView_willAddMarker_atLocation(ruler: NSRulerView; marker: NSRulerMarker; location: CGFloat): CGFloat; message 'rulerView:willAddMarker:atLocation:';
procedure rulerView_didAddMarker(ruler: NSRulerView; marker: NSRulerMarker); message 'rulerView:didAddMarker:';
procedure rulerView_handleMouseDown(ruler: NSRulerView; event: NSEvent); message 'rulerView:handleMouseDown:';
procedure rulerView_willSetClientView(ruler: NSRulerView; newClient: NSView); message 'rulerView:willSetClientView:';
end;
{$endif}
{$endif}
|