NSAttributedString.inc 4.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. { Parsed from Foundation.framework NSAttributedString.h }
  2. { Types from NSExtendedAttributedString }
  3. {$ifdef TYPES}
  4. type
  5. NSAttributedStringEnumerationOptions = NSUInteger;
  6. type
  7. NSAttributedStringEnumerationOptionsPtr = ^NSAttributedStringEnumerationOptions;
  8. const
  9. NSAttributedStringEnumerationReverse = 1 shl 1;
  10. NSAttributedStringEnumerationLongestEffectiveRangeNotRequired = 1 shl 20;
  11. {$endif}
  12. {$ifdef TYPES}
  13. type
  14. NSAttributedStringPtr = ^NSAttributedString;
  15. NSMutableAttributedStringPtr = ^NSMutableAttributedString;
  16. {$endif}
  17. {$ifdef CLASSES}
  18. type
  19. NSAttributedString = objcclass external (NSObject, NSCopyingProtocol, NSMutableCopyingProtocol, NSSecureCodingProtocol)
  20. public
  21. function string_: NSString; message 'string';
  22. function attributesAtIndex_effectiveRange (location: NSUInteger; range: NSRangePointer): NSDictionary; message 'attributesAtIndex:effectiveRange:';
  23. { Adopted protocols }
  24. function copyWithZone (zone: NSZonePtr): id; message 'copyWithZone:';
  25. procedure encodeWithCoder (aCoder: NSCoder); message 'encodeWithCoder:';
  26. function initWithCoder (aDecoder: NSCoder): id; message 'initWithCoder:';
  27. function mutableCopyWithZone (zone: NSZonePtr): id; message 'mutableCopyWithZone:';
  28. class function supportsSecureCoding: ObjCBOOL; message 'supportsSecureCoding';
  29. end;
  30. type
  31. NSExtendedAttributedString = objccategory external (NSAttributedString)
  32. function length: NSUInteger; message 'length';
  33. function attribute_atIndex_effectiveRange (attrName: NSString; location: NSUInteger; range: NSRangePointer): id; message 'attribute:atIndex:effectiveRange:';
  34. function attributedSubstringFromRange (range: NSRange): NSAttributedString; message 'attributedSubstringFromRange:';
  35. function attributesAtIndex_longestEffectiveRange_inRange (location: NSUInteger; range: NSRangePointer; rangeLimit: NSRange): NSDictionary; message 'attributesAtIndex:longestEffectiveRange:inRange:';
  36. function attribute_atIndex_longestEffectiveRange_inRange (attrName: NSString; location: NSUInteger; range: NSRangePointer; rangeLimit: NSRange): id; message 'attribute:atIndex:longestEffectiveRange:inRange:';
  37. function isEqualToAttributedString (other: NSAttributedString): ObjCBOOL; message 'isEqualToAttributedString:';
  38. function initWithString (str: NSString): instancetype; message 'initWithString:';
  39. function initWithString_attributes (str: NSString; attrs: NSDictionary): instancetype; message 'initWithString:attributes:';
  40. function initWithAttributedString (attrStr: NSAttributedString): instancetype; message 'initWithAttributedString:';
  41. procedure enumerateAttributesInRange_options_usingBlock (enumerationRange: NSRange; opts: NSAttributedStringEnumerationOptions; block: OpaqueCBlock); message 'enumerateAttributesInRange:options:usingBlock:'; { available in 10_6, 4_0 }
  42. procedure enumerateAttribute_inRange_options_usingBlock (attrName: NSString; enumerationRange: NSRange; opts: NSAttributedStringEnumerationOptions; block: OpaqueCBlock); message 'enumerateAttribute:inRange:options:usingBlock:'; { available in 10_6, 4_0 }
  43. end;
  44. type
  45. NSMutableAttributedString = objcclass external (NSAttributedString)
  46. public
  47. procedure replaceCharactersInRange_withString (range: NSRange; str: NSString); message 'replaceCharactersInRange:withString:';
  48. procedure setAttributes_range (attrs: NSDictionary; range: NSRange); message 'setAttributes:range:';
  49. end;
  50. type
  51. NSExtendedMutableAttributedString = objccategory external (NSMutableAttributedString)
  52. function mutableString: NSMutableString; message 'mutableString';
  53. procedure addAttribute_value_range (name: NSString; value: id; range: NSRange); message 'addAttribute:value:range:';
  54. procedure addAttributes_range (attrs: NSDictionary; range: NSRange); message 'addAttributes:range:';
  55. procedure removeAttribute_range (name: NSString; range: NSRange); message 'removeAttribute:range:';
  56. procedure replaceCharactersInRange_withAttributedString (range: NSRange; attrString: NSAttributedString); message 'replaceCharactersInRange:withAttributedString:';
  57. procedure insertAttributedString_atIndex (attrString: NSAttributedString; loc: NSUInteger); message 'insertAttributedString:atIndex:';
  58. procedure appendAttributedString (attrString: NSAttributedString); message 'appendAttributedString:';
  59. procedure deleteCharactersInRange (range: NSRange); message 'deleteCharactersInRange:';
  60. procedure setAttributedString (attrString: NSAttributedString); message 'setAttributedString:';
  61. procedure beginEditing; message 'beginEditing';
  62. procedure endEditing; message 'endEditing';
  63. end;
  64. {$endif}