/packages/cocoaint/src/appkit/NSLayoutManager.inc

https://github.com/slibre/freepascal · Pascal · 317 lines · 256 code · 22 blank · 39 comment · 0 complexity · 1e05192dbf5ba91006960c2591365756 MD5 · raw file

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