comparison dwt/internal/cocoa/NSTypesetter.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
11 * Port to the D Programming language: 11 * Port to the D Programming language:
12 * Jacob Carlborg <jacob.carlborg@gmail.com> 12 * Jacob Carlborg <jacob.carlborg@gmail.com>
13 *******************************************************************************/ 13 *******************************************************************************/
14 module dwt.internal.cocoa.NSTypesetter; 14 module dwt.internal.cocoa.NSTypesetter;
15 15
16 import dwt.internal.cocoa.id;
16 import dwt.internal.cocoa.CGFloat; 17 import dwt.internal.cocoa.CGFloat;
17 import dwt.internal.cocoa.NSArray; 18 import dwt.internal.cocoa.NSArray;
18 import dwt.internal.cocoa.NSAttributedString; 19 import dwt.internal.cocoa.NSAttributedString;
19 import dwt.internal.cocoa.NSDictionary; 20 import dwt.internal.cocoa.NSDictionary;
20 import dwt.internal.cocoa.NSFont; 21 import dwt.internal.cocoa.NSFont;
62 super(id); 63 super(id);
63 } 64 }
64 65
65 public NSTypesetterControlCharacterAction actionForControlCharacterAtIndex (NSUInteger charIndex) 66 public NSTypesetterControlCharacterAction actionForControlCharacterAtIndex (NSUInteger charIndex)
66 { 67 {
67 return cast(NSTypesetterControlCharacterAction) OS.objc_msgSend(this.id, OS.sel_actionForControlCharacterAtIndex_1, charIndex); 68 return cast(NSTypesetterControlCharacterAction) OS.objc_msgSend(this.id_, OS.sel_actionForControlCharacterAtIndex_1, charIndex);
68 } 69 }
69 70
70 public NSAttributedString attributedString () 71 public NSAttributedString attributedString ()
71 { 72 {
72 objc.id result = OS.objc_msgSend(this.id, OS.sel_attributedString); 73 objc.id result = OS.objc_msgSend(this.id_, OS.sel_attributedString);
73 return result !is null ? new NSAttributedString(result) : null; 74 return result !is null ? new NSAttributedString(result) : null;
74 } 75 }
75 76
76 public NSDictionary attributesForExtraLineFragment () 77 public NSDictionary attributesForExtraLineFragment ()
77 { 78 {
78 objc.id result = OS.objc_msgSend(this.id, OS.sel_attributesForExtraLineFragment); 79 objc.id result = OS.objc_msgSend(this.id_, OS.sel_attributesForExtraLineFragment);
79 return result !is null ? new NSDictionary(result) : null; 80 return result !is null ? new NSDictionary(result) : null;
80 } 81 }
81 82
82 public CGFloat baselineOffsetInLayoutManager (NSLayoutManager layoutMgr, NSUInteger glyphIndex) 83 public CGFloat baselineOffsetInLayoutManager (NSLayoutManager layoutMgr, NSUInteger glyphIndex)
83 { 84 {
84 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_baselineOffsetInLayoutManager_1glyphIndex_1, 85 return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_baselineOffsetInLayoutManager_1glyphIndex_1,
85 layoutMgr !is null ? layoutMgr.id : null, glyphIndex); 86 layoutMgr !is null ? layoutMgr.id_ : null, glyphIndex);
86 } 87 }
87 88
88 public void beginLineWithGlyphAtIndex (NSUInteger glyphIndex) 89 public void beginLineWithGlyphAtIndex (NSUInteger glyphIndex)
89 { 90 {
90 OS.objc_msgSend(this.id, OS.sel_beginLineWithGlyphAtIndex_1, glyphIndex); 91 OS.objc_msgSend(this.id_, OS.sel_beginLineWithGlyphAtIndex_1, glyphIndex);
91 } 92 }
92 93
93 public void beginParagraph () 94 public void beginParagraph ()
94 { 95 {
95 OS.objc_msgSend(this.id, OS.sel_beginParagraph); 96 OS.objc_msgSend(this.id_, OS.sel_beginParagraph);
96 } 97 }
97 98
98 public bool bidiProcessingEnabled () 99 public bool bidiProcessingEnabled ()
99 { 100 {
100 return OS.objc_msgSend(this.id, OS.sel_bidiProcessingEnabled) !is null; 101 return OS.objc_msgSend(this.id_, OS.sel_bidiProcessingEnabled) !is null;
101 } 102 }
102 103
103 public NSRect boundingBoxForControlGlyphAtIndex (NSUInteger glyphIndex, NSTextContainer textContainer, NSRect proposedRect, 104 public NSRect boundingBoxForControlGlyphAtIndex (NSUInteger glyphIndex, NSTextContainer textContainer, NSRect proposedRect,
104 NSPoint glyphPosition, NSUInteger charIndex) 105 NSPoint glyphPosition, NSUInteger charIndex)
105 { 106 {
106 NSRect result; 107 NSRect result;
107 OS.objc_msgSend_stret(result, this.id, 108 OS.objc_msgSend_stret(&result, this.id_,
108 OS.sel_boundingBoxForControlGlyphAtIndex_1forTextContainer_1proposedLineFragment_1glyphPosition_1characterIndex_1, glyphIndex, 109 OS.sel_boundingBoxForControlGlyphAtIndex_1forTextContainer_1proposedLineFragment_1glyphPosition_1characterIndex_1, glyphIndex,
109 textContainer !is null ? textContainer.id : null, proposedRect, glyphPosition, charIndex); 110 textContainer !is null ? textContainer.id_ : null, proposedRect, glyphPosition, charIndex);
110 return result; 111 return result;
111 } 112 }
112 113
113 public NSRange characterRangeForGlyphRange (NSRange glyphRange, NSRangePointer actualGlyphRange) 114 public NSRange characterRangeForGlyphRange (NSRange glyphRange, NSRangePointer actualGlyphRange)
114 { 115 {
115 NSRange result; 116 NSRange result;
116 OS.objc_msgSend_stret(result, this.id, OS.sel_characterRangeForGlyphRange_1actualGlyphRange_1, glyphRange, actualGlyphRange); 117 OS.objc_msgSend_stret(&result, this.id_, OS.sel_characterRangeForGlyphRange_1actualGlyphRange_1, glyphRange, actualGlyphRange);
117 return result; 118 return result;
118 } 119 }
119 120
120 public NSParagraphStyle currentParagraphStyle () 121 public NSParagraphStyle currentParagraphStyle ()
121 { 122 {
122 objc.id result = OS.objc_msgSend(this.id, OS.sel_currentParagraphStyle); 123 objc.id result = OS.objc_msgSend(this.id_, OS.sel_currentParagraphStyle);
123 return result !is null ? new NSParagraphStyle(result) : null; 124 return result !is null ? new NSParagraphStyle(result) : null;
124 } 125 }
125 126
126 public NSTextContainer currentTextContainer () 127 public NSTextContainer currentTextContainer ()
127 { 128 {
128 objc.id result = OS.objc_msgSend(this.id, OS.sel_currentTextContainer); 129 objc.id result = OS.objc_msgSend(this.id_, OS.sel_currentTextContainer);
129 return result !is null ? new NSTextContainer(result) : null; 130 return result !is null ? new NSTextContainer(result) : null;
130 } 131 }
131 132
132 public static NSTypesetterBehavior defaultTypesetterBehavior () 133 public static NSTypesetterBehavior defaultTypesetterBehavior ()
133 { 134 {
134 return cast(NSTypesetterBehavior) OS.objc_msgSend(OS.class_NSTypesetter, OS.sel_defaultTypesetterBehavior); 135 return cast(NSTypesetterBehavior) OS.objc_msgSend(OS.class_NSTypesetter, OS.sel_defaultTypesetterBehavior);
135 } 136 }
136 137
137 public void deleteGlyphsInRange (NSRange glyphRange) 138 public void deleteGlyphsInRange (NSRange glyphRange)
138 { 139 {
139 OS.objc_msgSend(this.id, OS.sel_deleteGlyphsInRange_1, glyphRange); 140 OS.objc_msgSend(this.id_, OS.sel_deleteGlyphsInRange_1, glyphRange);
140 } 141 }
141 142
142 public void endLineWithGlyphRange (NSRange lineGlyphRange) 143 public void endLineWithGlyphRange (NSRange lineGlyphRange)
143 { 144 {
144 OS.objc_msgSend(this.id, OS.sel_endLineWithGlyphRange_1, lineGlyphRange); 145 OS.objc_msgSend(this.id_, OS.sel_endLineWithGlyphRange_1, lineGlyphRange);
145 } 146 }
146 147
147 public void endParagraph () 148 public void endParagraph ()
148 { 149 {
149 OS.objc_msgSend(this.id, OS.sel_endParagraph); 150 OS.objc_msgSend(this.id_, OS.sel_endParagraph);
150 } 151 }
151 152
152 public NSUInteger getGlyphsInRange (NSRange glyphsRange, NSGlyph* glyphBuffer, NSUInteger* charIndexBuffer, NSGlyphInscription* inscribeBuffer, 153 public NSUInteger getGlyphsInRange (NSRange glyphsRange, NSGlyph* glyphBuffer, NSUInteger* charIndexBuffer, NSGlyphInscription* inscribeBuffer,
153 bool* elasticBuffer, /*unsigned char* */ubyte* bidiLevelBuffer) 154 bool* elasticBuffer, /*unsigned char* */ubyte* bidiLevelBuffer)
154 { 155 {
155 return cast(NSUInteger) OS.objc_msgSend(this.id, 156 return cast(NSUInteger) OS.objc_msgSend(this.id_,
156 OS.sel_getGlyphsInRange_1glyphs_1characterIndexes_1glyphInscriptions_1elasticBits_1bidiLevels_1, glyphsRange, glyphBuffer, 157 OS.sel_getGlyphsInRange_1glyphs_1characterIndexes_1glyphInscriptions_1elasticBits_1bidiLevels_1, glyphsRange, glyphBuffer,
157 charIndexBuffer, inscribeBuffer, elasticBuffer, bidiLevelBuffer); 158 charIndexBuffer, inscribeBuffer, elasticBuffer, bidiLevelBuffer);
158 } 159 }
159 160
160 public void getLineFragmentRect_usedRect_forParagraphSeparatorGlyphRange_atProposedOrigin_ (NSRectPointer lineFragmentRect, 161 public void getLineFragmentRect_usedRect_forParagraphSeparatorGlyphRange_atProposedOrigin_ (NSRectPointer lineFragmentRect,
161 NSRectPointer lineFragmentUsedRect, NSRange paragraphSeparatorGlyphRange, NSPoint lineOrigin) 162 NSRectPointer lineFragmentUsedRect, NSRange paragraphSeparatorGlyphRange, NSPoint lineOrigin)
162 { 163 {
163 OS.objc_msgSend(this.id, OS.sel_getLineFragmentRect_1usedRect_1forParagraphSeparatorGlyphRange_1atProposedOrigin_1, lineFragmentRect, 164 OS.objc_msgSend(this.id_, OS.sel_getLineFragmentRect_1usedRect_1forParagraphSeparatorGlyphRange_1atProposedOrigin_1, lineFragmentRect,
164 lineFragmentUsedRect, paragraphSeparatorGlyphRange, lineOrigin); 165 lineFragmentUsedRect, paragraphSeparatorGlyphRange, lineOrigin);
165 } 166 }
166 167
167 public void getLineFragmentRect_usedRect_remainingRect_forStartingGlyphAtIndex_proposedRect_lineSpacing_paragraphSpacingBefore_paragraphSpacingAfter_ ( 168 public void getLineFragmentRect_usedRect_remainingRect_forStartingGlyphAtIndex_proposedRect_lineSpacing_paragraphSpacingBefore_paragraphSpacingAfter_ (
168 NSRectPointer lineFragmentRect, NSRectPointer lineFragmentUsedRect, NSRectPointer remainingRect, NSUInteger startingGlyphIndex, 169 NSRectPointer lineFragmentRect, NSRectPointer lineFragmentUsedRect, NSRectPointer remainingRect, NSUInteger startingGlyphIndex,
169 NSRect proposedRect, CGFloat lineSpacing, CGFloat paragraphSpacingBefore, CGFloat paragraphSpacingAfter) 170 NSRect proposedRect, CGFloat lineSpacing, CGFloat paragraphSpacingBefore, CGFloat paragraphSpacingAfter)
170 { 171 {
171 OS.objc_msgSend( 172 OS.objc_msgSend(
172 this.id, 173 this.id_,
173 OS.sel_getLineFragmentRect_1usedRect_1remainingRect_1forStartingGlyphAtIndex_1proposedRect_1lineSpacing_1paragraphSpacingBefore_1paragraphSpacingAfter_1, 174 OS.sel_getLineFragmentRect_1usedRect_1remainingRect_1forStartingGlyphAtIndex_1proposedRect_1lineSpacing_1paragraphSpacingBefore_1paragraphSpacingAfter_1,
174 lineFragmentRect, lineFragmentUsedRect, remainingRect, startingGlyphIndex, proposedRect, lineSpacing, paragraphSpacingBefore, 175 lineFragmentRect, lineFragmentUsedRect, remainingRect, startingGlyphIndex, proposedRect, lineSpacing, paragraphSpacingBefore,
175 paragraphSpacingAfter); 176 paragraphSpacingAfter);
176 } 177 }
177 178
178 public NSRange glyphRangeForCharacterRange (NSRange charRange, NSRangePointer actualCharRange) 179 public NSRange glyphRangeForCharacterRange (NSRange charRange, NSRangePointer actualCharRange)
179 { 180 {
180 NSRange result; 181 NSRange result;
181 OS.objc_msgSend_stret(result, this.id, OS.sel_glyphRangeForCharacterRange_1actualCharacterRange_1, charRange, actualCharRange); 182 OS.objc_msgSend_stret(&result, this.id_, OS.sel_glyphRangeForCharacterRange_1actualCharacterRange_1, charRange, actualCharRange);
182 return result; 183 return result;
183 } 184 }
184 185
185 public /*UTF32Char*/dchar hyphenCharacterForGlyphAtIndex (NSUInteger glyphIndex) 186 public /*UTF32Char*/dchar hyphenCharacterForGlyphAtIndex (NSUInteger glyphIndex)
186 { 187 {
187 return cast(/*UTF32Char*/dchar) OS.objc_msgSend(this.id, OS.sel_hyphenCharacterForGlyphAtIndex_1, glyphIndex); 188 return cast(/*UTF32Char*/dchar) OS.objc_msgSend(this.id_, OS.sel_hyphenCharacterForGlyphAtIndex_1, glyphIndex);
188 } 189 }
189 190
190 public float hyphenationFactor () 191 public float hyphenationFactor ()
191 { 192 {
192 return cast(float) OS.objc_msgSend_fpret(this.id, OS.sel_hyphenationFactor); 193 return cast(float) OS.objc_msgSend_fpret(this.id_, OS.sel_hyphenationFactor);
193 } 194 }
194 195
195 public float hyphenationFactorForGlyphAtIndex (NSUInteger glyphIndex) 196 public float hyphenationFactorForGlyphAtIndex (NSUInteger glyphIndex)
196 { 197 {
197 return cast(float) OS.objc_msgSend_fpret(this.id, OS.sel_hyphenationFactorForGlyphAtIndex_1, glyphIndex); 198 return cast(float) OS.objc_msgSend_fpret(this.id_, OS.sel_hyphenationFactorForGlyphAtIndex_1, glyphIndex);
198 } 199 }
199 200
200 public void insertGlyph (NSGlyph glyph, NSUInteger glyphIndex, NSUInteger characterIndex) 201 public void insertGlyph (NSGlyph glyph, NSUInteger glyphIndex, NSUInteger characterIndex)
201 { 202 {
202 OS.objc_msgSend(this.id, OS.sel_insertGlyph_1atGlyphIndex_1characterIndex_1, glyph, glyphIndex, characterIndex); 203 OS.objc_msgSend(this.id_, OS.sel_insertGlyph_1atGlyphIndex_1characterIndex_1, glyph, glyphIndex, characterIndex);
203 } 204 }
204 205
205 public NSRange layoutCharactersInRange (NSRange characterRange, NSLayoutManager layoutManager, NSUInteger maxNumLines) 206 public NSRange layoutCharactersInRange (NSRange characterRange, NSLayoutManager layoutManager, NSUInteger maxNumLines)
206 { 207 {
207 NSRange result; 208 NSRange result;
208 OS.objc_msgSend_stret(result, this.id, OS.sel_layoutCharactersInRange_1forLayoutManager_1maximumNumberOfLineFragments_1, characterRange, 209 OS.objc_msgSend_stret(&result, this.id_, OS.sel_layoutCharactersInRange_1forLayoutManager_1maximumNumberOfLineFragments_1, characterRange,
209 layoutManager !is null ? layoutManager.id : null, maxNumLines); 210 layoutManager !is null ? layoutManager.id_ : null, maxNumLines);
210 return result; 211 return result;
211 } 212 }
212 213
213 public void layoutGlyphsInLayoutManager (NSLayoutManager layoutManager, NSUInteger startGlyphIndex, NSUInteger maxNumLines, NSUInteger* nextGlyph) 214 public void layoutGlyphsInLayoutManager (NSLayoutManager layoutManager, NSUInteger startGlyphIndex, NSUInteger maxNumLines, NSUInteger* nextGlyph)
214 { 215 {
215 OS.objc_msgSend(this.id, OS.sel_layoutGlyphsInLayoutManager_1startingAtGlyphIndex_1maxNumberOfLineFragments_1nextGlyphIndex_1, 216 OS.objc_msgSend(this.id_, OS.sel_layoutGlyphsInLayoutManager_1startingAtGlyphIndex_1maxNumberOfLineFragments_1nextGlyphIndex_1,
216 layoutManager !is null ? layoutManager.id : null, startGlyphIndex, maxNumLines, nextGlyph); 217 layoutManager !is null ? layoutManager.id_ : null, startGlyphIndex, maxNumLines, nextGlyph);
217 } 218 }
218 219
219 public NSLayoutManager layoutManager () 220 public NSLayoutManager layoutManager ()
220 { 221 {
221 objc.id result = OS.objc_msgSend(this.id, OS.sel_layoutManager); 222 objc.id result = OS.objc_msgSend(this.id_, OS.sel_layoutManager);
222 return result !is null ? new NSLayoutManager(result) : null; 223 return result !is null ? new NSLayoutManager(result) : null;
223 } 224 }
224 225
225 public NSUInteger layoutParagraphAtPoint (NSPointPointer lineFragmentOrigin) 226 public NSUInteger layoutParagraphAtPoint (NSPointPointer lineFragmentOrigin)
226 { 227 {
227 return cast(NSUInteger) OS.objc_msgSend(this.id, OS.sel_layoutParagraphAtPoint_1, lineFragmentOrigin); 228 return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_layoutParagraphAtPoint_1, lineFragmentOrigin);
228 } 229 }
229 230
230 public CGFloat lineFragmentPadding () 231 public CGFloat lineFragmentPadding ()
231 { 232 {
232 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_lineFragmentPadding); 233 return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_lineFragmentPadding);
233 } 234 }
234 235
235 public CGFloat lineSpacingAfterGlyphAtIndex (NSUInteger glyphIndex, NSRect rect) 236 public CGFloat lineSpacingAfterGlyphAtIndex (NSUInteger glyphIndex, NSRect rect)
236 { 237 {
237 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_lineSpacingAfterGlyphAtIndex_1withProposedLineFragmentRect_1, glyphIndex, rect); 238 return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_lineSpacingAfterGlyphAtIndex_1withProposedLineFragmentRect_1, glyphIndex, rect);
238 } 239 }
239 240
240 public NSRange paragraphCharacterRange () 241 public NSRange paragraphCharacterRange ()
241 { 242 {
242 NSRange result; 243 NSRange result;
243 OS.objc_msgSend_stret(result, this.id, OS.sel_paragraphCharacterRange); 244 OS.objc_msgSend_stret(&result, this.id_, OS.sel_paragraphCharacterRange);
244 return result; 245 return result;
245 } 246 }
246 247
247 public NSRange paragraphGlyphRange () 248 public NSRange paragraphGlyphRange ()
248 { 249 {
249 NSRange result; 250 NSRange result;
250 OS.objc_msgSend_stret(result, this.id, OS.sel_paragraphGlyphRange); 251 OS.objc_msgSend_stret(&result, this.id_, OS.sel_paragraphGlyphRange);
251 return result; 252 return result;
252 } 253 }
253 254
254 public NSRange paragraphSeparatorCharacterRange () 255 public NSRange paragraphSeparatorCharacterRange ()
255 { 256 {
256 NSRange result; 257 NSRange result;
257 OS.objc_msgSend_stret(result, this.id, OS.sel_paragraphSeparatorCharacterRange); 258 OS.objc_msgSend_stret(&result, this.id_, OS.sel_paragraphSeparatorCharacterRange);
258 return result; 259 return result;
259 } 260 }
260 261
261 public NSRange paragraphSeparatorGlyphRange () 262 public NSRange paragraphSeparatorGlyphRange ()
262 { 263 {
263 NSRange result; 264 NSRange result;
264 OS.objc_msgSend_stret(result, this.id, OS.sel_paragraphSeparatorGlyphRange); 265 OS.objc_msgSend_stret(&result, this.id_, OS.sel_paragraphSeparatorGlyphRange);
265 return result; 266 return result;
266 } 267 }
267 268
268 public CGFloat paragraphSpacingAfterGlyphAtIndex (NSUInteger glyphIndex, NSRect rect) 269 public CGFloat paragraphSpacingAfterGlyphAtIndex (NSUInteger glyphIndex, NSRect rect)
269 { 270 {
270 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_paragraphSpacingAfterGlyphAtIndex_1withProposedLineFragmentRect_1, glyphIndex, rect); 271 return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_paragraphSpacingAfterGlyphAtIndex_1withProposedLineFragmentRect_1, glyphIndex, rect);
271 } 272 }
272 273
273 public CGFloat paragraphSpacingBeforeGlyphAtIndex (NSUInteger glyphIndex, NSRect rect) 274 public CGFloat paragraphSpacingBeforeGlyphAtIndex (NSUInteger glyphIndex, NSRect rect)
274 { 275 {
275 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_paragraphSpacingBeforeGlyphAtIndex_1withProposedLineFragmentRect_1, glyphIndex, rect); 276 return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_paragraphSpacingBeforeGlyphAtIndex_1withProposedLineFragmentRect_1, glyphIndex, rect);
276 } 277 }
277 278
278 public static NSSize printingAdjustmentInLayoutManager (NSLayoutManager layoutMgr, NSRange nominallySpacedGlyphsRange, 279 public static NSSize printingAdjustmentInLayoutManager (NSLayoutManager layoutMgr, NSRange nominallySpacedGlyphsRange,
279 /*const unsigned char* */ubyte* packedGlyphs, NSUInteger packedGlyphsCount) 280 /*const unsigned char* */ubyte* packedGlyphs, NSUInteger packedGlyphsCount)
280 { 281 {
281 NSSize result; 282 NSSize result;
282 OS.objc_msgSend_stret(result, OS.class_NSTypesetter, 283 OS.objc_msgSend_stret(&result, OS.class_NSTypesetter,
283 OS.sel_printingAdjustmentInLayoutManager_1forNominallySpacedGlyphRange_1packedGlyphs_1count_1, 284 OS.sel_printingAdjustmentInLayoutManager_1forNominallySpacedGlyphRange_1packedGlyphs_1count_1,
284 layoutMgr !is null ? layoutMgr.id : null, nominallySpacedGlyphsRange, packedGlyphs, packedGlyphsCount); 285 layoutMgr !is null ? layoutMgr.id_ : null, nominallySpacedGlyphsRange, packedGlyphs, packedGlyphsCount);
285 return result; 286 return result;
286 } 287 }
287 288
288 public void setAttachmentSize (NSSize attachmentSize, NSRange glyphRange) 289 public void setAttachmentSize (NSSize attachmentSize, NSRange glyphRange)
289 { 290 {
290 OS.objc_msgSend(this.id, OS.sel_setAttachmentSize_1forGlyphRange_1, attachmentSize, glyphRange); 291 OS.objc_msgSend(this.id_, OS.sel_setAttachmentSize_1forGlyphRange_1, attachmentSize, glyphRange);
291 } 292 }
292 293
293 public void setAttributedString (NSAttributedString attrString) 294 public void setAttributedString (NSAttributedString attrString)
294 { 295 {
295 OS.objc_msgSend(this.id, OS.sel_setAttributedString_1, attrString !is null ? attrString.id : null); 296 OS.objc_msgSend(this.id_, OS.sel_setAttributedString_1, attrString !is null ? attrString.id_ : null);
296 } 297 }
297 298
298 public void setBidiLevels (/*const uint8_t* */ubyte* levels, NSRange glyphRange) 299 public void setBidiLevels (/*const uint8_t* */ubyte* levels, NSRange glyphRange)
299 { 300 {
300 OS.objc_msgSend(this.id, OS.sel_setBidiLevels_1forGlyphRange_1, levels, glyphRange); 301 OS.objc_msgSend(this.id_, OS.sel_setBidiLevels_1forGlyphRange_1, levels, glyphRange);
301 } 302 }
302 303
303 public void setBidiProcessingEnabled (bool flag) 304 public void setBidiProcessingEnabled (bool flag)
304 { 305 {
305 OS.objc_msgSend(this.id, OS.sel_setBidiProcessingEnabled_1, flag); 306 OS.objc_msgSend(this.id_, OS.sel_setBidiProcessingEnabled_1, flag);
306 } 307 }
307 308
308 public void setDrawsOutsideLineFragment (bool flag, NSRange glyphRange) 309 public void setDrawsOutsideLineFragment (bool flag, NSRange glyphRange)
309 { 310 {
310 OS.objc_msgSend(this.id, OS.sel_setDrawsOutsideLineFragment_1forGlyphRange_1, flag, glyphRange); 311 OS.objc_msgSend(this.id_, OS.sel_setDrawsOutsideLineFragment_1forGlyphRange_1, flag, glyphRange);
311 } 312 }
312 313
313 public void setHardInvalidation (bool flag, NSRange glyphRange) 314 public void setHardInvalidation (bool flag, NSRange glyphRange)
314 { 315 {
315 OS.objc_msgSend(this.id, OS.sel_setHardInvalidation_1forGlyphRange_1, flag, glyphRange); 316 OS.objc_msgSend(this.id_, OS.sel_setHardInvalidation_1forGlyphRange_1, flag, glyphRange);
316 } 317 }
317 318
318 public void setHyphenationFactor (float factor) 319 public void setHyphenationFactor (float factor)
319 { 320 {
320 OS.objc_msgSend(this.id, OS.sel_setHyphenationFactor_1, factor); 321 OS.objc_msgSend(this.id_, OS.sel_setHyphenationFactor_1, factor);
321 } 322 }
322 323
323 public void setLineFragmentPadding (CGFloat padding) 324 public void setLineFragmentPadding (CGFloat padding)
324 { 325 {
325 OS.objc_msgSend(this.id, OS.sel_setLineFragmentPadding_1, padding); 326 OS.objc_msgSend(this.id_, OS.sel_setLineFragmentPadding_1, padding);
326 } 327 }
327 328
328 public void setLineFragmentRect (NSRect fragmentRect, NSRange glyphRange, NSRect usedRect, CGFloat baselineOffset) 329 public void setLineFragmentRect (NSRect fragmentRect, NSRange glyphRange, NSRect usedRect, CGFloat baselineOffset)
329 { 330 {
330 OS.objc_msgSend(this.id, OS.sel_setLineFragmentRect_1forGlyphRange_1usedRect_1baselineOffset_1, fragmentRect, glyphRange, usedRect, 331 OS.objc_msgSend(this.id_, OS.sel_setLineFragmentRect_1forGlyphRange_1usedRect_1baselineOffset_1, fragmentRect, glyphRange, usedRect,
331 baselineOffset); 332 baselineOffset);
332 } 333 }
333 334
334 public void setLocation (NSPoint location, /*const CGFloat* */CGFloat* advancements, NSRange glyphRange) 335 public void setLocation (NSPoint location, /*const CGFloat* */CGFloat* advancements, NSRange glyphRange)
335 { 336 {
336 OS.objc_msgSend(this.id, OS.sel_setLocation_1withAdvancements_1forStartOfGlyphRange_1, location, advancements, glyphRange); 337 OS.objc_msgSend(this.id_, OS.sel_setLocation_1withAdvancements_1forStartOfGlyphRange_1, location, advancements, glyphRange);
337 } 338 }
338 339
339 public void setNotShownAttribute (bool flag, NSRange glyphRange) 340 public void setNotShownAttribute (bool flag, NSRange glyphRange)
340 { 341 {
341 OS.objc_msgSend(this.id, OS.sel_setNotShownAttribute_1forGlyphRange_1, flag, glyphRange); 342 OS.objc_msgSend(this.id_, OS.sel_setNotShownAttribute_1forGlyphRange_1, flag, glyphRange);
342 } 343 }
343 344
344 public void setParagraphGlyphRange (NSRange paragraphRange, NSRange paragraphSeparatorRange) 345 public void setParagraphGlyphRange (NSRange paragraphRange, NSRange paragraphSeparatorRange)
345 { 346 {
346 OS.objc_msgSend(this.id, OS.sel_setParagraphGlyphRange_1separatorGlyphRange_1, paragraphRange, paragraphSeparatorRange); 347 OS.objc_msgSend(this.id_, OS.sel_setParagraphGlyphRange_1separatorGlyphRange_1, paragraphRange, paragraphSeparatorRange);
347 } 348 }
348 349
349 public void setTypesetterBehavior (NSTypesetterBehavior behavior) 350 public void setTypesetterBehavior (NSTypesetterBehavior behavior)
350 { 351 {
351 OS.objc_msgSend(this.id, OS.sel_setTypesetterBehavior_1, behavior); 352 OS.objc_msgSend(this.id_, OS.sel_setTypesetterBehavior_1, behavior);
352 } 353 }
353 354
354 public void setUsesFontLeading (bool flag) 355 public void setUsesFontLeading (bool flag)
355 { 356 {
356 OS.objc_msgSend(this.id, OS.sel_setUsesFontLeading_1, flag); 357 OS.objc_msgSend(this.id_, OS.sel_setUsesFontLeading_1, flag);
357 } 358 }
358 359
359 public static id sharedSystemTypesetter () 360 public static id sharedSystemTypesetter ()
360 { 361 {
361 objc.id result = OS.objc_msgSend(OS.class_NSTypesetter, OS.sel_sharedSystemTypesetter); 362 objc.id result = OS.objc_msgSend(OS.class_NSTypesetter, OS.sel_sharedSystemTypesetter);
368 return result !is null ? new id(result) : null; 369 return result !is null ? new id(result) : null;
369 } 370 }
370 371
371 public bool shouldBreakLineByHyphenatingBeforeCharacterAtIndex (NSUInteger charIndex) 372 public bool shouldBreakLineByHyphenatingBeforeCharacterAtIndex (NSUInteger charIndex)
372 { 373 {
373 return OS.objc_msgSend(this.id, OS.sel_shouldBreakLineByHyphenatingBeforeCharacterAtIndex_1, charIndex) !is null; 374 return OS.objc_msgSend(this.id_, OS.sel_shouldBreakLineByHyphenatingBeforeCharacterAtIndex_1, charIndex) !is null;
374 } 375 }
375 376
376 public bool shouldBreakLineByWordBeforeCharacterAtIndex (NSUInteger charIndex) 377 public bool shouldBreakLineByWordBeforeCharacterAtIndex (NSUInteger charIndex)
377 { 378 {
378 return OS.objc_msgSend(this.id, OS.sel_shouldBreakLineByWordBeforeCharacterAtIndex_1, charIndex) !is null; 379 return OS.objc_msgSend(this.id_, OS.sel_shouldBreakLineByWordBeforeCharacterAtIndex_1, charIndex) !is null;
379 } 380 }
380 381
381 public NSFont substituteFontForFont (NSFont originalFont) 382 public NSFont substituteFontForFont (NSFont originalFont)
382 { 383 {
383 objc.id result = OS.objc_msgSend(this.id, OS.sel_substituteFontForFont_1, originalFont !is null ? originalFont.id : null); 384 objc.id result = OS.objc_msgSend(this.id_, OS.sel_substituteFontForFont_1, originalFont !is null ? originalFont.id_ : null);
384 return result !is null ? new NSFont(result) : null; 385 return result !is null ? new NSFont(result) : null;
385 } 386 }
386 387
387 public void substituteGlyphsInRange (NSRange glyphRange, NSGlyph* glyphs) 388 public void substituteGlyphsInRange (NSRange glyphRange, NSGlyph* glyphs)
388 { 389 {
389 OS.objc_msgSend(this.id, OS.sel_substituteGlyphsInRange_1withGlyphs_1, glyphRange, glyphs); 390 OS.objc_msgSend(this.id_, OS.sel_substituteGlyphsInRange_1withGlyphs_1, glyphRange, glyphs);
390 } 391 }
391 392
392 public NSArray textContainers () 393 public NSArray textContainers ()
393 { 394 {
394 objc.id result = OS.objc_msgSend(this.id, OS.sel_textContainers); 395 objc.id result = OS.objc_msgSend(this.id_, OS.sel_textContainers);
395 return result !is null ? new NSArray(result) : null; 396 return result !is null ? new NSArray(result) : null;
396 } 397 }
397 398
398 public NSTextTab textTabForGlyphLocation (CGFloat glyphLocation, NSWritingDirection direction, CGFloat maxLocation) 399 public NSTextTab textTabForGlyphLocation (CGFloat glyphLocation, NSWritingDirection direction, CGFloat maxLocation)
399 { 400 {
400 objc.id result = OS.objc_msgSend(this.id, OS.sel_textTabForGlyphLocation_1writingDirection_1maxLocation_1, glyphLocation, direction, 401 objc.id result = OS.objc_msgSend(this.id_, OS.sel_textTabForGlyphLocation_1writingDirection_1maxLocation_1, glyphLocation, direction,
401 maxLocation); 402 maxLocation);
402 return result !is null ? new NSTextTab(result) : null; 403 return result !is null ? new NSTextTab(result) : null;
403 } 404 }
404 405
405 public NSTypesetterBehavior typesetterBehavior () 406 public NSTypesetterBehavior typesetterBehavior ()
406 { 407 {
407 return cast(NSTypesetterBehavior) OS.objc_msgSend(this.id, OS.sel_typesetterBehavior); 408 return cast(NSTypesetterBehavior) OS.objc_msgSend(this.id_, OS.sel_typesetterBehavior);
408 } 409 }
409 410
410 public bool usesFontLeading () 411 public bool usesFontLeading ()
411 { 412 {
412 return OS.objc_msgSend(this.id, OS.sel_usesFontLeading) !is null; 413 return OS.objc_msgSend(this.id_, OS.sel_usesFontLeading) !is null;
413 } 414 }
414 415
415 public void willSetLineFragmentRect (NSRectPointer lineRect, NSRange glyphRange, NSRectPointer usedRect, CGFloat* baselineOffset) 416 public void willSetLineFragmentRect (NSRectPointer lineRect, NSRange glyphRange, NSRectPointer usedRect, CGFloat* baselineOffset)
416 { 417 {
417 OS.objc_msgSend(this.id, OS.sel_willSetLineFragmentRect_1forGlyphRange_1usedRect_1baselineOffset_1, lineRect, glyphRange, usedRect, 418 OS.objc_msgSend(this.id_, OS.sel_willSetLineFragmentRect_1forGlyphRange_1usedRect_1baselineOffset_1, lineRect, glyphRange, usedRect,
418 baselineOffset); 419 baselineOffset);
419 } 420 }
420 421
421 } 422 }