Mercurial > projects > dwt-mac
comparison dwt/internal/cocoa/NSRulerMarker.d @ 1:8b48be5454ce
The internal cocoa classes compile now
author | Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com> |
---|---|
date | Tue, 19 Aug 2008 17:35:17 +0200 |
parents | 380af2bdd8e5 |
children | f565d3a95c0a |
comparison
equal
deleted
inserted
replaced
0:380af2bdd8e5 | 1:8b48be5454ce |
---|---|
37 super(id); | 37 super(id); |
38 } | 38 } |
39 | 39 |
40 public void drawRect (NSRect rect) | 40 public void drawRect (NSRect rect) |
41 { | 41 { |
42 OS.objc_msgSend(this.id, OS.sel_drawRect_1, rect); | 42 OS.objc_msgSend(this.id_, OS.sel_drawRect_1, rect); |
43 } | 43 } |
44 | 44 |
45 public NSImage image () | 45 public NSImage image () |
46 { | 46 { |
47 objc.id result = OS.objc_msgSend(this.id, OS.sel_image); | 47 objc.id result = OS.objc_msgSend(this.id_, OS.sel_image); |
48 return result !is null ? new NSImage(result) : null; | 48 return result !is null ? new NSImage(result) : null; |
49 } | 49 } |
50 | 50 |
51 public NSPoint imageOrigin () | 51 public NSPoint imageOrigin () |
52 { | 52 { |
53 NSPoint result; | 53 NSPoint result; |
54 OS.objc_msgSend_stret(result, this.id, OS.sel_imageOrigin); | 54 OS.objc_msgSend_stret(&result, this.id_, OS.sel_imageOrigin); |
55 return result; | 55 return result; |
56 } | 56 } |
57 | 57 |
58 public NSRect imageRectInRuler () | 58 public NSRect imageRectInRuler () |
59 { | 59 { |
60 NSRect result; | 60 NSRect result; |
61 OS.objc_msgSend_stret(result, this.id, OS.sel_imageRectInRuler); | 61 OS.objc_msgSend_stret(&result, this.id_, OS.sel_imageRectInRuler); |
62 return result; | 62 return result; |
63 } | 63 } |
64 | 64 |
65 public id initWithRulerView (NSRulerView ruler, CGFloat location, NSImage image, NSPoint imageOrigin) | 65 public id initWithRulerView (NSRulerView ruler, CGFloat location, NSImage image, NSPoint imageOrigin) |
66 { | 66 { |
67 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithRulerView_1markerLocation_1image_1imageOrigin_1, ruler !is null ? ruler.id : null, | 67 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithRulerView_1markerLocation_1image_1imageOrigin_1, ruler !is null ? ruler.id_ : null, |
68 location, image !is null ? image.id : null, imageOrigin); | 68 location, image !is null ? image.id_ : null, imageOrigin); |
69 return result !is null ? new id(result) : null; | 69 return result !is null ? new id(result) : null; |
70 } | 70 } |
71 | 71 |
72 public bool isDragging () | 72 public bool isDragging () |
73 { | 73 { |
74 return OS.objc_msgSend(this.id, OS.sel_isDragging) !is null; | 74 return OS.objc_msgSend(this.id_, OS.sel_isDragging) !is null; |
75 } | 75 } |
76 | 76 |
77 public bool isMovable () | 77 public bool isMovable () |
78 { | 78 { |
79 return OS.objc_msgSend(this.id, OS.sel_isMovable) !is null; | 79 return OS.objc_msgSend(this.id_, OS.sel_isMovable) !is null; |
80 } | 80 } |
81 | 81 |
82 public bool isRemovable () | 82 public bool isRemovable () |
83 { | 83 { |
84 return OS.objc_msgSend(this.id, OS.sel_isRemovable) !is null; | 84 return OS.objc_msgSend(this.id_, OS.sel_isRemovable) !is null; |
85 } | 85 } |
86 | 86 |
87 public CGFloat markerLocation () | 87 public CGFloat markerLocation () |
88 { | 88 { |
89 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_markerLocation); | 89 return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_markerLocation); |
90 } | 90 } |
91 | 91 |
92 public id representedObject () | 92 public id representedObject () |
93 { | 93 { |
94 objc.id result = OS.objc_msgSend(this.id, OS.sel_representedObject); | 94 objc.id result = OS.objc_msgSend(this.id_, OS.sel_representedObject); |
95 return result !is null ? new id(result) : null; | 95 return result !is null ? new id(result) : null; |
96 } | 96 } |
97 | 97 |
98 public NSRulerView ruler () | 98 public NSRulerView ruler () |
99 { | 99 { |
100 objc.id result = OS.objc_msgSend(this.id, OS.sel_ruler); | 100 objc.id result = OS.objc_msgSend(this.id_, OS.sel_ruler); |
101 return result !is null ? new NSRulerView(result) : null; | 101 return result !is null ? new NSRulerView(result) : null; |
102 } | 102 } |
103 | 103 |
104 public void setImage (NSImage image) | 104 public void setImage (NSImage image) |
105 { | 105 { |
106 OS.objc_msgSend(this.id, OS.sel_setImage_1, image !is null ? image.id : null); | 106 OS.objc_msgSend(this.id_, OS.sel_setImage_1, image !is null ? image.id_ : null); |
107 } | 107 } |
108 | 108 |
109 public void setImageOrigin (NSPoint imageOrigin) | 109 public void setImageOrigin (NSPoint imageOrigin) |
110 { | 110 { |
111 OS.objc_msgSend(this.id, OS.sel_setImageOrigin_1, imageOrigin); | 111 OS.objc_msgSend(this.id_, OS.sel_setImageOrigin_1, imageOrigin); |
112 } | 112 } |
113 | 113 |
114 public void setMarkerLocation (CGFloat location) | 114 public void setMarkerLocation (CGFloat location) |
115 { | 115 { |
116 OS.objc_msgSend(this.id, OS.sel_setMarkerLocation_1, location); | 116 OS.objc_msgSend(this.id_, OS.sel_setMarkerLocation_1, location); |
117 } | 117 } |
118 | 118 |
119 public void setMovable (bool flag) | 119 public void setMovable (bool flag) |
120 { | 120 { |
121 OS.objc_msgSend(this.id, OS.sel_setMovable_1, flag); | 121 OS.objc_msgSend(this.id_, OS.sel_setMovable_1, flag); |
122 } | 122 } |
123 | 123 |
124 public void setRemovable (bool flag) | 124 public void setRemovable (bool flag) |
125 { | 125 { |
126 OS.objc_msgSend(this.id, OS.sel_setRemovable_1, flag); | 126 OS.objc_msgSend(this.id_, OS.sel_setRemovable_1, flag); |
127 } | 127 } |
128 | 128 |
129 public void setRepresentedObject (id representedObject) | 129 public void setRepresentedObject (id representedObject) |
130 { | 130 { |
131 OS.objc_msgSend(this.id, OS.sel_setRepresentedObject_1, representedObject !is null ? representedObject.id : null); | 131 OS.objc_msgSend(this.id_, OS.sel_setRepresentedObject_1, representedObject !is null ? representedObject.id_ : null); |
132 } | 132 } |
133 | 133 |
134 public CGFloat thicknessRequiredInRuler () | 134 public CGFloat thicknessRequiredInRuler () |
135 { | 135 { |
136 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_thicknessRequiredInRuler); | 136 return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_thicknessRequiredInRuler); |
137 } | 137 } |
138 | 138 |
139 public bool trackMouse (NSEvent mouseDownEvent, bool isAdding) | 139 public bool trackMouse (NSEvent mouseDownEvent, bool isAdding) |
140 { | 140 { |
141 return OS.objc_msgSend(this.id, OS.sel_trackMouse_1adding_1, mouseDownEvent !is null ? mouseDownEvent.id : null, isAdding) !is null; | 141 return OS.objc_msgSend(this.id_, OS.sel_trackMouse_1adding_1, mouseDownEvent !is null ? mouseDownEvent.id_ : null, isAdding) !is null; |
142 } | 142 } |
143 | 143 |
144 } | 144 } |