/packages/cocoaint/src/appkit/NSLayoutManager.inc
Pascal | 317 lines | 256 code | 22 blank | 39 comment | 0 complexity | 1e05192dbf5ba91006960c2591365756 MD5 | raw file
Possible License(s): LGPL-2.0, LGPL-2.1, LGPL-3.0
1{ Parsed from Appkit.framework NSLayoutManager.h } 2 3{$ifdef TYPES} 4{$ifndef NSLAYOUTMANAGER_PAS_T} 5{$define NSLAYOUTMANAGER_PAS_T} 6 7{ Constants } 8 9const 10 NSGlyphAttributeSoft = 0; 11 NSGlyphAttributeElastic = 1; 12 NSGlyphAttributeBidiLevel = 2; 13 NSGlyphAttributeInscribe = 5; 14 15const 16 NSGlyphInscribeBase = 0; 17 NSGlyphInscribeBelow = 1; 18 NSGlyphInscribeAbove = 2; 19 NSGlyphInscribeOverstrike = 3; 20 NSGlyphInscribeOverBelow = 4; 21 22const 23 NSTypesetterLatestBehavior = -1; 24 NSTypesetterOriginalBehavior = 0; 25 NSTypesetterBehavior_10_2_WithCompatibility = 1; 26 NSTypesetterBehavior_10_2 = 2; 27 NSTypesetterBehavior_10_3 = 3; 28 NSTypesetterBehavior_10_4 = 4; 29 30{ Types } 31type 32 NSGlyphInscription = NSUInteger; 33 NSGlyphInscriptionPtr = ^NSGlyphInscription; 34 NSTypesetterBehavior = NSInteger; 35 NSTypesetterBehaviorPtr = ^NSTypesetterBehavior; 36 37{$endif} 38{$endif} 39 40{$ifdef RECORDS} 41{$ifndef NSLAYOUTMANAGER_PAS_R} 42{$define NSLAYOUTMANAGER_PAS_R} 43 44{$endif} 45{$endif} 46 47{$ifdef FUNCTIONS} 48{$ifndef NSLAYOUTMANAGER_PAS_F} 49{$define NSLAYOUTMANAGER_PAS_F} 50 51{$endif} 52{$endif} 53 54{$ifdef EXTERNAL_SYMBOLS} 55{$ifndef NSLAYOUTMANAGER_PAS_S} 56{$define NSLAYOUTMANAGER_PAS_S} 57 58{$endif} 59{$endif} 60 61{$ifdef FORWARD} 62 NSLayoutManagerDelegateProtocol = objcprotocol; 63 NSLayoutManager = objcclass; 64 NSLayoutManagerPointer = ^NSLayoutManager; 65 NSLayoutManagerPtr = NSLayoutManagerPointer; 66 67{$endif} 68 69{$ifdef CLASSES} 70{$ifndef NSLAYOUTMANAGER_PAS_C} 71{$define NSLAYOUTMANAGER_PAS_C} 72 73{ NSLayoutManager } 74 NSLayoutManager = objcclass external (NSObject, NSCodingProtocol) 75 private 76 _textStorage: NSTextStorage; 77 _glyphGenerator: NSGlyphGenerator; 78 _typesetter: NSTypesetter; 79 _textContainers: NSMutableArray; 80 _containerUsedRects: NSStorage; 81 _glyphs: NSStorage; 82 _containerRuns: NSRunStorage; 83 _fragmentRuns: NSRunStorage; 84 _glyphLocations: NSRunStorage; 85 _glyphRotationRuns: NSRunStorage; 86 _extraLineFragmentRect: NSRect; 87 _extraLineFragmentUsedRect: NSRect; 88 _extraLineFragmentContainer: NSTextContainer; 89 _glyphHoles: NSSortedArray; 90 _layoutHoles: NSSortedArray; 91 __lmFlags: record 92 case byte of 93 0: (_anonbitfield_NSLayoutManager0: cuint); 94 1: (data: bitpacked record 95 containersAreFull: 0..1; 96 glyphsMightDrawOutsideLines: 0..1; 97 _backgroundLayoutEnabled: 0..1; 98 resizingInProgress: 0..1; 99 allowScreenFonts: 0..1; 100 cachedRectArrayInUse: 0..1; 101 displayInvalidationInProgress: 0..1; 102 insertionPointNeedsUpdate: 0..1; 103 layoutManagerInDirtyList: 0..1; 104 usingGlyphCache: 0..1; 105 showInvisibleCharacters: 0..1; 106 showControlCharacters: 0..1; 107 delegateRespondsToDidInvalidate: 0..1; 108 delegateRespondsToDidComplete: 0..1; 109 glyphFormat: 0..((1 shl 2)-1); 110 textStorageRespondsToIsEditing: 0..1; 111 notifyEditedInProgress: 0..1; 112 containersChanged: 0..1; 113 isGeneratingGlyphs: 0..1; 114 hasNonGeneratedGlyphData: 0..1; 115 loggedBGLayoutException: 0..1; 116 isLayoutRequestedFromSubthread: 0..1; 117 _defaultAttachmentScaling: 0..((1 shl 2)-1); 118 isInUILayoutMode: 0..1; 119 seenRightToLeft: 0..1; 120 ignoresViewTransformations: 0..1; 121 needToFlushGlyph: 0..1; 122 flipsIfNeeded: 0..1; 123 allowNonContig: 0..1; 124 useNonContig: 0..1; 125 end; 126 ); 127 end; 128 _delegate: id; 129 _textViewResizeDisableStack: cushort; 130 _displayInvalidationDisableStack: cushort; 131 _deferredDisplayCharRange: NSRange; 132 _firstTextView: NSTextView; 133 _cachedRectArray: NSRectPtr; {garbage collector: __strong } 134 _cachedRectArrayCapacity: NSUInteger; 135 _glyphBuffer: PChar; {garbage collector: __strong } 136 _glyphBufferSize: NSUInteger; 137 _cachedLocationNominalGlyphRange: NSRange; 138 _cachedLocationGlyphIndex: NSUInteger; 139 _cachedLocation: NSPoint; 140 _cachedFontCharRange: NSRange; 141 _cachedFont: NSFont; 142 _firstUnlaidGlyphIndex: NSUInteger; 143 _firstUnlaidCharIndex: NSUInteger; 144 _rulerAccView: NSBox; 145 _rulerAccViewAlignmentButtons: id; 146 _rulerAccViewSpacing: id; 147 _rulerAccViewLeftTabWell: NSTabWell; 148 _rulerAccViewRightTabWell: NSTabWell; 149 _rulerAccViewCenterTabWell: NSTabWell; 150 _rulerAccViewDecimalTabWell: NSTabWell; 151 _rulerAccViewStyles: id; 152 _rulerAccViewLists: id; 153 _newlyFilledGlyphRange: NSRange; 154 _extraData: id; 155 156 public 157 function init: id; message 'init'; 158 function textStorage: NSTextStorage; message 'textStorage'; 159 procedure setTextStorage(textStorage_: NSTextStorage); message 'setTextStorage:'; 160 function attributedString: NSAttributedString; message 'attributedString'; 161 procedure replaceTextStorage(newTextStorage: NSTextStorage); message 'replaceTextStorage:'; 162 function glyphGenerator: NSGlyphGenerator; message 'glyphGenerator'; 163 procedure setGlyphGenerator(glyphGenerator_: NSGlyphGenerator); message 'setGlyphGenerator:'; 164 function typesetter: NSTypesetter; message 'typesetter'; 165 procedure setTypesetter(typesetter_: NSTypesetter); message 'setTypesetter:'; 166 function delegate: NSLayoutManagerDelegateProtocol; message 'delegate'; 167 procedure setDelegate(delegate_: NSLayoutManagerDelegateProtocol); message 'setDelegate:'; 168 function textContainers: NSArray; message 'textContainers'; 169 procedure addTextContainer(container: NSTextContainer); message 'addTextContainer:'; 170 procedure insertTextContainer_atIndex(container: NSTextContainer; index: NSUInteger); message 'insertTextContainer:atIndex:'; 171 procedure removeTextContainerAtIndex(index: NSUInteger); message 'removeTextContainerAtIndex:'; 172 procedure textContainerChangedGeometry(container: NSTextContainer); message 'textContainerChangedGeometry:'; 173 procedure textContainerChangedTextView(container: NSTextContainer); message 'textContainerChangedTextView:'; 174 procedure setBackgroundLayoutEnabled(flag: Boolean); message 'setBackgroundLayoutEnabled:'; 175 function backgroundLayoutEnabled: Boolean; message 'backgroundLayoutEnabled'; 176 procedure setUsesScreenFonts(flag: Boolean); message 'setUsesScreenFonts:'; 177 function usesScreenFonts: Boolean; message 'usesScreenFonts'; 178 procedure setShowsInvisibleCharacters(flag: Boolean); message 'setShowsInvisibleCharacters:'; 179 function showsInvisibleCharacters: Boolean; message 'showsInvisibleCharacters'; 180 procedure setShowsControlCharacters(flag: Boolean); message 'setShowsControlCharacters:'; 181 function showsControlCharacters: Boolean; message 'showsControlCharacters'; 182 procedure setHyphenationFactor(factor: single); message 'setHyphenationFactor:'; 183 function hyphenationFactor: single; message 'hyphenationFactor'; 184 procedure setDefaultAttachmentScaling(scaling: NSImageScaling); message 'setDefaultAttachmentScaling:'; 185 function defaultAttachmentScaling: NSImageScaling; message 'defaultAttachmentScaling'; 186 procedure setTypesetterBehavior(theBehavior: NSTypesetterBehavior); message 'setTypesetterBehavior:'; 187 function typesetterBehavior: NSTypesetterBehavior; message 'typesetterBehavior'; 188 function layoutOptions: NSUInteger; message 'layoutOptions'; 189 procedure setAllowsNonContiguousLayout(flag: Boolean); message 'setAllowsNonContiguousLayout:'; 190 function allowsNonContiguousLayout: Boolean; message 'allowsNonContiguousLayout'; 191 function hasNonContiguousLayout: Boolean; message 'hasNonContiguousLayout'; 192 procedure invalidateGlyphsForCharacterRange_changeInLength_actualCharacterRange(charRange: NSRange; delta: NSInteger; actualCharRange: NSRangePointer); message 'invalidateGlyphsForCharacterRange:changeInLength:actualCharacterRange:'; 193 procedure invalidateLayoutForCharacterRange_actualCharacterRange(charRange: NSRange; actualCharRange: NSRangePointer); message 'invalidateLayoutForCharacterRange:actualCharacterRange:'; 194 procedure invalidateLayoutForCharacterRange_isSoft_actualCharacterRange(charRange: NSRange; flag: Boolean; actualCharRange: NSRangePointer); message 'invalidateLayoutForCharacterRange:isSoft:actualCharacterRange:'; 195 procedure invalidateDisplayForCharacterRange(charRange: NSRange); message 'invalidateDisplayForCharacterRange:'; 196 procedure invalidateDisplayForGlyphRange(glyphRange: NSRange); message 'invalidateDisplayForGlyphRange:'; 197 procedure textStorage_edited_range_changeInLength_invalidatedRange(str: NSTextStorage; editedMask: NSUInteger; newCharRange: NSRange; delta: NSInteger; invalidatedCharRange: NSRange); message 'textStorage:edited:range:changeInLength:invalidatedRange:'; 198 procedure ensureGlyphsForCharacterRange(charRange: NSRange); message 'ensureGlyphsForCharacterRange:'; 199 procedure ensureGlyphsForGlyphRange(glyphRange: NSRange); message 'ensureGlyphsForGlyphRange:'; 200 procedure ensureLayoutForCharacterRange(charRange: NSRange); message 'ensureLayoutForCharacterRange:'; 201 procedure ensureLayoutForGlyphRange(glyphRange: NSRange); message 'ensureLayoutForGlyphRange:'; 202 procedure ensureLayoutForTextContainer(container: NSTextContainer); message 'ensureLayoutForTextContainer:'; 203 procedure ensureLayoutForBoundingRect_inTextContainer(bounds: NSRect; container: NSTextContainer); message 'ensureLayoutForBoundingRect:inTextContainer:'; 204 procedure insertGlyphs_length_forStartingGlyphAtIndex_characterIndex(glyphs: NSGlyphPtr; length: NSUInteger; glyphIndex: NSUInteger; charIndex: NSUInteger); message 'insertGlyphs:length:forStartingGlyphAtIndex:characterIndex:'; 205 procedure insertGlyph_atGlyphIndex_characterIndex(glyph: NSGlyph; glyphIndex: NSUInteger; charIndex: NSUInteger); message 'insertGlyph:atGlyphIndex:characterIndex:'; 206 procedure replaceGlyphAtIndex_withGlyph(glyphIndex: NSUInteger; newGlyph: NSGlyph); message 'replaceGlyphAtIndex:withGlyph:'; 207 procedure deleteGlyphsInRange(glyphRange: NSRange); message 'deleteGlyphsInRange:'; 208 procedure setCharacterIndex_forGlyphAtIndex(charIndex: NSUInteger; glyphIndex: NSUInteger); message 'setCharacterIndex:forGlyphAtIndex:'; 209 procedure setIntAttribute_value_forGlyphAtIndex(attributeTag: NSInteger; val: NSInteger; glyphIndex: NSUInteger); message 'setIntAttribute:value:forGlyphAtIndex:'; 210 procedure invalidateGlyphsOnLayoutInvalidationForGlyphRange(glyphRange: NSRange); message 'invalidateGlyphsOnLayoutInvalidationForGlyphRange:'; 211 function numberOfGlyphs: NSUInteger; message 'numberOfGlyphs'; 212 function glyphAtIndex_isValidIndex(glyphIndex: NSUInteger; isValidIndex: pboolean): NSGlyph; message 'glyphAtIndex:isValidIndex:'; 213 function glyphAtIndex(glyphIndex: NSUInteger): NSGlyph; message 'glyphAtIndex:'; 214 function isValidGlyphIndex(glyphIndex: NSUInteger): Boolean; message 'isValidGlyphIndex:'; 215 function characterIndexForGlyphAtIndex(glyphIndex: NSUInteger): NSUInteger; message 'characterIndexForGlyphAtIndex:'; 216 function glyphIndexForCharacterAtIndex(charIndex: NSUInteger): NSUInteger; message 'glyphIndexForCharacterAtIndex:'; 217 function intAttribute_forGlyphAtIndex(attributeTag: NSInteger; glyphIndex: NSUInteger): NSInteger; message 'intAttribute:forGlyphAtIndex:'; 218 function getGlyphsInRange_glyphs_characterIndexes_glyphInscriptions_elasticBits(glyphRange: NSRange; glyphBuffer: NSGlyphPtr; charIndexBuffer: NSUIntegerPtr; inscribeBuffer: NSGlyphInscriptionPtr; elasticBuffer: pboolean): NSUInteger; message 'getGlyphsInRange:glyphs:characterIndexes:glyphInscriptions:elasticBits:'; 219 function getGlyphsInRange_glyphs_characterIndexes_glyphInscriptions_elasticBits_bidiLevels(glyphRange: NSRange; glyphBuffer: NSGlyphPtr; charIndexBuffer: NSUIntegerPtr; inscribeBuffer: NSGlyphInscriptionPtr; elasticBuffer: pboolean; bidiLevelBuffer: PByte): NSUInteger; message 'getGlyphsInRange:glyphs:characterIndexes:glyphInscriptions:elasticBits:bidiLevels:'; 220 function getGlyphs_range(glyphArray: NSGlyphPtr; glyphRange: NSRange): NSUInteger; message 'getGlyphs:range:'; 221 procedure setTextContainer_forGlyphRange(container: NSTextContainer; glyphRange: NSRange); message 'setTextContainer:forGlyphRange:'; 222 procedure setLineFragmentRect_forGlyphRange_usedRect(fragmentRect: NSRect; glyphRange: NSRange; usedRect: NSRect); message 'setLineFragmentRect:forGlyphRange:usedRect:'; 223 procedure setExtraLineFragmentRect_usedRect_textContainer(fragmentRect: NSRect; usedRect: NSRect; container: NSTextContainer); message 'setExtraLineFragmentRect:usedRect:textContainer:'; 224 procedure setLocation_forStartOfGlyphRange(location: NSPoint; glyphRange: NSRange); message 'setLocation:forStartOfGlyphRange:'; 225 procedure setLocations_startingGlyphIndexes_count_forGlyphRange(locations: NSPointArray; glyphIndexes: NSUIntegerPtr; count: NSUInteger; glyphRange: NSRange); message 'setLocations:startingGlyphIndexes:count:forGlyphRange:'; 226 procedure setNotShownAttribute_forGlyphAtIndex(flag: Boolean; glyphIndex: NSUInteger); message 'setNotShownAttribute:forGlyphAtIndex:'; 227 procedure setDrawsOutsideLineFragment_forGlyphAtIndex(flag: Boolean; glyphIndex: NSUInteger); message 'setDrawsOutsideLineFragment:forGlyphAtIndex:'; 228 procedure setAttachmentSize_forGlyphRange(attachmentSize: NSSize; glyphRange: NSRange); message 'setAttachmentSize:forGlyphRange:'; 229 procedure getFirstUnlaidCharacterIndex_glyphIndex(charIndex: NSUIntegerPtr; glyphIndex: NSUIntegerPtr); message 'getFirstUnlaidCharacterIndex:glyphIndex:'; 230 function firstUnlaidCharacterIndex: NSUInteger; message 'firstUnlaidCharacterIndex'; 231 function firstUnlaidGlyphIndex: NSUInteger; message 'firstUnlaidGlyphIndex'; 232 function textContainerForGlyphAtIndex_effectiveRange(glyphIndex: NSUInteger; effectiveGlyphRange: NSRangePointer): NSTextContainer; message 'textContainerForGlyphAtIndex:effectiveRange:'; 233 function usedRectForTextContainer(container: NSTextContainer): NSRect; message 'usedRectForTextContainer:'; 234 function lineFragmentRectForGlyphAtIndex_effectiveRange(glyphIndex: NSUInteger; effectiveGlyphRange: NSRangePointer): NSRect; message 'lineFragmentRectForGlyphAtIndex:effectiveRange:'; 235 function lineFragmentUsedRectForGlyphAtIndex_effectiveRange(glyphIndex: NSUInteger; effectiveGlyphRange: NSRangePointer): NSRect; message 'lineFragmentUsedRectForGlyphAtIndex:effectiveRange:'; 236 function lineFragmentRectForGlyphAtIndex_effectiveRange_withoutAdditionalLayout(glyphIndex: NSUInteger; effectiveGlyphRange: NSRangePointer; flag: Boolean): NSRect; message 'lineFragmentRectForGlyphAtIndex:effectiveRange:withoutAdditionalLayout:'; 237 function lineFragmentUsedRectForGlyphAtIndex_effectiveRange_withoutAdditionalLayout(glyphIndex: NSUInteger; effectiveGlyphRange: NSRangePointer; flag: Boolean): NSRect; message 'lineFragmentUsedRectForGlyphAtIndex:effectiveRange:withoutAdditionalLayout:'; 238 function textContainerForGlyphAtIndex_effectiveRange_withoutAdditionalLayout(glyphIndex: NSUInteger; effectiveGlyphRange: NSRangePointer; flag: Boolean): NSTextContainer; message 'textContainerForGlyphAtIndex:effectiveRange:withoutAdditionalLayout:'; 239 function extraLineFragmentRect: NSRect; message 'extraLineFragmentRect'; 240 function extraLineFragmentUsedRect: NSRect; message 'extraLineFragmentUsedRect'; 241 function extraLineFragmentTextContainer: NSTextContainer; message 'extraLineFragmentTextContainer'; 242 function locationForGlyphAtIndex(glyphIndex: NSUInteger): NSPoint; message 'locationForGlyphAtIndex:'; 243 function notShownAttributeForGlyphAtIndex(glyphIndex: NSUInteger): Boolean; message 'notShownAttributeForGlyphAtIndex:'; 244 function drawsOutsideLineFragmentForGlyphAtIndex(glyphIndex: NSUInteger): Boolean; message 'drawsOutsideLineFragmentForGlyphAtIndex:'; 245 function attachmentSizeForGlyphAtIndex(glyphIndex: NSUInteger): NSSize; message 'attachmentSizeForGlyphAtIndex:'; 246 procedure setLayoutRect_forTextBlock_glyphRange(rect: NSRect; block: NSTextBlock; glyphRange: NSRange); message 'setLayoutRect:forTextBlock:glyphRange:'; 247 procedure setBoundsRect_forTextBlock_glyphRange(rect: NSRect; block: NSTextBlock; glyphRange: NSRange); message 'setBoundsRect:forTextBlock:glyphRange:'; 248 function layoutRectForTextBlock_glyphRange(block: NSTextBlock; glyphRange: NSRange): NSRect; message 'layoutRectForTextBlock:glyphRange:'; 249 function boundsRectForTextBlock_glyphRange(block: NSTextBlock; glyphRange: NSRange): NSRect; message 'boundsRectForTextBlock:glyphRange:'; 250 function layoutRectForTextBlock_atIndex_effectiveRange(block: NSTextBlock; glyphIndex: NSUInteger; effectiveGlyphRange: NSRangePointer): NSRect; message 'layoutRectForTextBlock:atIndex:effectiveRange:'; 251 function boundsRectForTextBlock_atIndex_effectiveRange(block: NSTextBlock; glyphIndex: NSUInteger; effectiveGlyphRange: NSRangePointer): NSRect; message 'boundsRectForTextBlock:atIndex:effectiveRange:'; 252 function glyphRangeForCharacterRange_actualCharacterRange(charRange: NSRange; actualCharRange: NSRangePointer): NSRange; message 'glyphRangeForCharacterRange:actualCharacterRange:'; 253 function characterRangeForGlyphRange_actualGlyphRange(glyphRange: NSRange; actualGlyphRange: NSRangePointer): NSRange; message 'characterRangeForGlyphRange:actualGlyphRange:'; 254 function glyphRangeForTextContainer(container: NSTextContainer): NSRange; message 'glyphRangeForTextContainer:'; 255 function rangeOfNominallySpacedGlyphsContainingIndex(glyphIndex: NSUInteger): NSRange; message 'rangeOfNominallySpacedGlyphsContainingIndex:'; 256 function rectArrayForCharacterRange_withinSelectedCharacterRange_inTextContainer_rectCount(charRange: NSRange; selCharRange: NSRange; container: NSTextContainer; rectCount: NSUIntegerPtr): NSRectArray; message 'rectArrayForCharacterRange:withinSelectedCharacterRange:inTextContainer:rectCount:'; 257 function rectArrayForGlyphRange_withinSelectedGlyphRange_inTextContainer_rectCount(glyphRange: NSRange; selGlyphRange: NSRange; container: NSTextContainer; rectCount: NSUIntegerPtr): NSRectArray; message 'rectArrayForGlyphRange:withinSelectedGlyphRange:inTextContainer:rectCount:'; 258 function boundingRectForGlyphRange_inTextContainer(glyphRange: NSRange; container: NSTextContainer): NSRect; message 'boundingRectForGlyphRange:inTextContainer:'; 259 function glyphRangeForBoundingRect_inTextContainer(bounds: NSRect; container: NSTextContainer): NSRange; message 'glyphRangeForBoundingRect:inTextContainer:'; 260 function glyphRangeForBoundingRectWithoutAdditionalLayout_inTextContainer(bounds: NSRect; container: NSTextContainer): NSRange; message 'glyphRangeForBoundingRectWithoutAdditionalLayout:inTextContainer:'; 261 function glyphIndexForPoint_inTextContainer_fractionOfDistanceThroughGlyph(point: NSPoint; container: NSTextContainer; partialFraction: CGFloatPtr): NSUInteger; message 'glyphIndexForPoint:inTextContainer:fractionOfDistanceThroughGlyph:'; 262 function glyphIndexForPoint_inTextContainer(point: NSPoint; container: NSTextContainer): NSUInteger; message 'glyphIndexForPoint:inTextContainer:'; 263 function fractionOfDistanceThroughGlyphForPoint_inTextContainer(point: NSPoint; container: NSTextContainer): CGFloat; message 'fractionOfDistanceThroughGlyphForPoint:inTextContainer:'; 264 function characterIndexForPoint_inTextContainer_fractionOfDistanceBetweenInsertionPoints(point: NSPoint; container: NSTextContainer; partialFraction: CGFloatPtr): NSUInteger; message 'characterIndexForPoint:inTextContainer:fractionOfDistanceBetweenInsertionPoints:'; 265 function getLineFragmentInsertionPointsForCharacterAtIndex_alternatePositions_inDisplayOrder_positions_characterIndexes(charIndex: NSUInteger; aFlag: Boolean; dFlag: Boolean; positions: CGFloatPtr; charIndexes: NSUIntegerPtr): NSUInteger; message 'getLineFragmentInsertionPointsForCharacterAtIndex:alternatePositions:inDisplayOrder:positions:characterIndexes:'; 266 function temporaryAttributesAtCharacterIndex_effectiveRange(charIndex: NSUInteger; effectiveCharRange: NSRangePointer): NSDictionary; message 'temporaryAttributesAtCharacterIndex:effectiveRange:'; 267 procedure setTemporaryAttributes_forCharacterRange(attrs: NSDictionary; charRange: NSRange); message 'setTemporaryAttributes:forCharacterRange:'; 268 procedure addTemporaryAttributes_forCharacterRange(attrs: NSDictionary; charRange: NSRange); message 'addTemporaryAttributes:forCharacterRange:'; 269 procedure removeTemporaryAttribute_forCharacterRange(attrName: NSString; charRange: NSRange); message 'removeTemporaryAttribute:forCharacterRange:'; 270 function temporaryAttribute_atCharacterIndex_effectiveRange(attrName: NSString; location: NSUInteger; range: NSRangePointer): id; message 'temporaryAttribute:atCharacterIndex:effectiveRange:'; 271 function temporaryAttribute_atCharacterIndex_longestEffectiveRange_inRange(attrName: NSString; location: NSUInteger; range: NSRangePointer; rangeLimit: NSRange): id; message 'temporaryAttribute:atCharacterIndex:longestEffectiveRange:inRange:'; 272 function temporaryAttributesAtCharacterIndex_longestEffectiveRange_inRange(location: NSUInteger; range: NSRangePointer; rangeLimit: NSRange): NSDictionary; message 'temporaryAttributesAtCharacterIndex:longestEffectiveRange:inRange:'; 273 procedure addTemporaryAttribute_value_forCharacterRange(attrName: NSString; value: id; charRange: NSRange); message 'addTemporaryAttribute:value:forCharacterRange:'; 274 function substituteFontForFont(originalFont: NSFont): NSFont; message 'substituteFontForFont:'; 275 function defaultLineHeightForFont(theFont: NSFont): CGFloat; message 'defaultLineHeightForFont:'; 276 function defaultBaselineOffsetForFont(theFont: NSFont): CGFloat; message 'defaultBaselineOffsetForFont:'; 277 function usesFontLeading: Boolean; message 'usesFontLeading'; 278 procedure setUsesFontLeading(flag: Boolean); message 'setUsesFontLeading:'; 279 280 { Adopted Protocols } 281 procedure encodeWithCoder(aCoder: NSCoder); 282 function initWithCoder(aDecoder: NSCoder): id; 283 end; 284 285{ NSTextViewSupportCategory } 286 NSTextViewSupportCategory = objccategory external (NSLayoutManager) 287 function rulerMarkersForTextView_paragraphStyle_ruler(view: NSTextView; style: NSParagraphStyle; ruler: NSRulerView): NSArray; message 'rulerMarkersForTextView:paragraphStyle:ruler:'; 288 function rulerAccessoryViewForTextView_paragraphStyle_ruler_enabled(view: NSTextView; style: NSParagraphStyle; ruler: NSRulerView; isEnabled: Boolean): NSView; message 'rulerAccessoryViewForTextView:paragraphStyle:ruler:enabled:'; 289 function layoutManagerOwnsFirstResponderInWindow(window: NSWindow): Boolean; message 'layoutManagerOwnsFirstResponderInWindow:'; 290 function firstTextView: NSTextView; message 'firstTextView'; 291 function textViewForBeginningOfSelection: NSTextView; message 'textViewForBeginningOfSelection'; 292 procedure drawBackgroundForGlyphRange_atPoint(glyphsToShow: NSRange; origin: NSPoint); message 'drawBackgroundForGlyphRange:atPoint:'; 293 procedure drawGlyphsForGlyphRange_atPoint(glyphsToShow: NSRange; origin: NSPoint); message 'drawGlyphsForGlyphRange:atPoint:'; 294 procedure showPackedGlyphs_length_glyphRange_atPoint_font_color_printingAdjustment(glyphs: PChar; glyphLen: NSUInteger; glyphRange: NSRange; point: NSPoint; font: NSFont; color: NSColor; printingAdjustment: NSSize); message 'showPackedGlyphs:length:glyphRange:atPoint:font:color:printingAdjustment:'; 295 procedure showAttachmentCell_inRect_characterIndex(cell: NSCell; rect: NSRect; attachmentIndex: NSUInteger); message 'showAttachmentCell:inRect:characterIndex:'; 296 procedure fillBackgroundRectArray_count_forCharacterRange_color(rectArray: NSRectArray; rectCount: NSUInteger; charRange: NSRange; color: NSColor); message 'fillBackgroundRectArray:count:forCharacterRange:color:'; 297 procedure drawUnderlineForGlyphRange_underlineType_baselineOffset_lineFragmentRect_lineFragmentGlyphRange_containerOrigin(glyphRange: NSRange; underlineVal: NSInteger; baselineOffset: CGFloat; lineRect: NSRect; lineGlyphRange: NSRange; containerOrigin: NSPoint); message 'drawUnderlineForGlyphRange:underlineType:baselineOffset:lineFragmentRect:lineFragmentGlyphRange:containerOrigin:'; 298 procedure underlineGlyphRange_underlineType_lineFragmentRect_lineFragmentGlyphRange_containerOrigin(glyphRange: NSRange; underlineVal: NSInteger; lineRect: NSRect; lineGlyphRange: NSRange; containerOrigin: NSPoint); message 'underlineGlyphRange:underlineType:lineFragmentRect:lineFragmentGlyphRange:containerOrigin:'; 299 procedure drawStrikethroughForGlyphRange_strikethroughType_baselineOffset_lineFragmentRect_lineFragmentGlyphRange_containerOrigin(glyphRange: NSRange; strikethroughVal: NSInteger; baselineOffset: CGFloat; lineRect: NSRect; lineGlyphRange: NSRange; containerOrigin: NSPoint); message 'drawStrikethroughForGlyphRange:strikethroughType:baselineOffset:lineFragmentRect:lineFragmentGlyphRange:containerOrigin:'; 300 procedure strikethroughGlyphRange_strikethroughType_lineFragmentRect_lineFragmentGlyphRange_containerOrigin(glyphRange: NSRange; strikethroughVal: NSInteger; lineRect: NSRect; lineGlyphRange: NSRange; containerOrigin: NSPoint); message 'strikethroughGlyphRange:strikethroughType:lineFragmentRect:lineFragmentGlyphRange:containerOrigin:'; 301 end; 302 303{$endif} 304{$endif} 305{$ifdef PROTOCOLS} 306{$ifndef NSLAYOUTMANAGER_PAS_P} 307{$define NSLAYOUTMANAGER_PAS_P} 308 309{ NSLayoutManagerDelegate Protocol } 310 NSLayoutManagerDelegateProtocol = objcprotocol external name 'NSLayoutManagerDelegate' 311 optional 312 procedure layoutManagerDidInvalidateLayout(sender: NSLayoutManager); message 'layoutManagerDidInvalidateLayout:'; 313 procedure layoutManager_didCompleteLayoutForTextContainer_atEnd(layoutManager: NSLayoutManager; textContainer: NSTextContainer; layoutFinishedFlag: Boolean); message 'layoutManager:didCompleteLayoutForTextContainer:atEnd:'; 314 function layoutManager_shouldUseTemporaryAttributes_forDrawingToScreen_atCharacterIndex_effectiveRange(layoutManager: NSLayoutManager; attrs: NSDictionary; toScreen: Boolean; charIndex: NSUInteger; effectiveCharRange: NSRangePointer): NSDictionary; message 'layoutManager:shouldUseTemporaryAttributes:forDrawingToScreen:atCharacterIndex:effectiveRange:'; 315 end; 316{$endif} 317{$endif}