NSParagraphStyle.inc 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. { Parsed from AppKit.framework NSParagraphStyle.h }
  2. {$ifdef TYPES}
  3. type
  4. NSTextTabPtr = ^NSTextTab;
  5. NSParagraphStylePtr = ^NSParagraphStyle;
  6. NSMutableParagraphStylePtr = ^NSMutableParagraphStyle;
  7. {$endif}
  8. {$ifdef TYPES}
  9. type
  10. NSTextTabType = NSUInteger;
  11. NSTextTabTypePtr = ^NSTextTabType;
  12. const
  13. NSLeftTabStopType = 0;
  14. NSRightTabStopType = 1;
  15. NSCenterTabStopType = 2;
  16. NSDecimalTabStopType = 3;
  17. type
  18. NSLineBreakMode = NSUInteger;
  19. NSLineBreakModePtr = ^NSLineBreakMode;
  20. const
  21. NSLineBreakByWordWrapping = 0;
  22. NSLineBreakByCharWrapping = 1;
  23. NSLineBreakByClipping = 2;
  24. NSLineBreakByTruncatingHead = 3;
  25. NSLineBreakByTruncatingTail = 4;
  26. NSLineBreakByTruncatingMiddle = 5;
  27. {$endif}
  28. {$ifdef EXTERNAL_SYMBOLS}
  29. var
  30. NSTabColumnTerminatorsAttributeName: NSString; cvar; external;
  31. {$endif}
  32. {$ifdef CLASSES}
  33. type
  34. NSTextTab = objcclass external (NSObject, NSCopyingProtocol, NSCodingProtocol)
  35. private
  36. _flags: bitpacked record
  37. case byte of
  38. 0: (_anonBitField__flags0: cuint);
  39. 1: (
  40. alignment: 0..((1 shl 4)-1);
  41. refCount: 0..((1 shl 24)-1);
  42. unused: 0..((1 shl 4)-1);
  43. {$if defined(__LP64__)}
  44. int: 0..((1 shl 32)-1);
  45. {$endif}
  46. );
  47. end;
  48. _location: CGFloat;
  49. _reserved: id;
  50. public
  51. function initWithTextAlignment_location_options (alignment: NSTextAlignment; loc: CGFloat; options: NSDictionary): instancetype; message 'initWithTextAlignment:location:options:';
  52. function alignment: NSTextAlignment; message 'alignment';
  53. function options: NSDictionary; message 'options';
  54. function initWithType_location (type_: NSTextTabType; loc: CGFloat): instancetype; message 'initWithType:location:';
  55. function location: CGFloat; message 'location';
  56. function tabStopType: NSTextTabType; message 'tabStopType';
  57. { Adopted protocols }
  58. function copyWithZone (zone: NSZonePtr): id; message 'copyWithZone:';
  59. procedure encodeWithCoder (aCoder: NSCoder); message 'encodeWithCoder:';
  60. function initWithCoder (aDecoder: NSCoder): id; message 'initWithCoder:';
  61. end;
  62. type
  63. NSParagraphStyle = objcclass external (NSObject, NSCopyingProtocol, NSMutableCopyingProtocol, NSSecureCodingProtocol)
  64. private
  65. _lineSpacing: CGFloat;
  66. _paragraphSpacing: CGFloat;
  67. _headIndent: CGFloat;
  68. _tailIndent: CGFloat;
  69. _firstLineHeadIndent: CGFloat;
  70. _minimumLineHeight: CGFloat;
  71. _maximumLineHeight: CGFloat;
  72. _tabStops: NSArray;
  73. _flags: bitpacked record
  74. case byte of
  75. 0: (_anonBitField__flags0: cuint);
  76. 1: (
  77. alignment: 0..((1 shl 4)-1);
  78. lineBreakMode: 0..((1 shl 4)-1);
  79. tabStopsIsMutable: 0..1;
  80. isNaturalDirection: 0..1;
  81. rightToLeftDirection: 0..1;
  82. fixedMultiple: 0..((1 shl 2)-1);
  83. refCount: 0..((1 shl 19)-1);
  84. {$if defined(__LP64__)}
  85. int: 0..((1 shl 32)-1);
  86. {$endif}
  87. );
  88. end;
  89. _defaultTabInterval: CGFloat;
  90. _extraData: id;
  91. public
  92. class function defaultParagraphStyle: NSParagraphStyle; message 'defaultParagraphStyle';
  93. class function defaultWritingDirectionForLanguage (languageName: NSString): NSWritingDirection; message 'defaultWritingDirectionForLanguage:';
  94. function lineSpacing: CGFloat; message 'lineSpacing';
  95. function paragraphSpacing: CGFloat; message 'paragraphSpacing';
  96. function alignment: NSTextAlignment; message 'alignment';
  97. function headIndent: CGFloat; message 'headIndent';
  98. function tailIndent: CGFloat; message 'tailIndent';
  99. function firstLineHeadIndent: CGFloat; message 'firstLineHeadIndent';
  100. function tabStops: NSArray; message 'tabStops';
  101. function minimumLineHeight: CGFloat; message 'minimumLineHeight';
  102. function maximumLineHeight: CGFloat; message 'maximumLineHeight';
  103. function lineBreakMode: NSLineBreakMode; message 'lineBreakMode';
  104. function baseWritingDirection: NSWritingDirection; message 'baseWritingDirection';
  105. function lineHeightMultiple: CGFloat; message 'lineHeightMultiple';
  106. function paragraphSpacingBefore: CGFloat; message 'paragraphSpacingBefore';
  107. function defaultTabInterval: CGFloat; message 'defaultTabInterval';
  108. function textBlocks: NSArray; message 'textBlocks';
  109. function textLists: NSArray; message 'textLists';
  110. function hyphenationFactor: single; message 'hyphenationFactor';
  111. function tighteningFactorForTruncation: single; message 'tighteningFactorForTruncation';
  112. function headerLevel: NSInteger; message 'headerLevel';
  113. { Adopted protocols }
  114. function copyWithZone (zone: NSZonePtr): id; message 'copyWithZone:';
  115. procedure encodeWithCoder (aCoder: NSCoder); message 'encodeWithCoder:';
  116. function initWithCoder (aDecoder: NSCoder): id; message 'initWithCoder:';
  117. function mutableCopyWithZone (zone: NSZonePtr): id; message 'mutableCopyWithZone:';
  118. class function supportsSecureCoding: ObjCBOOL; message 'supportsSecureCoding';
  119. end;
  120. type
  121. NSMutableParagraphStyle = objcclass external (NSParagraphStyle)
  122. public
  123. procedure setLineSpacing(newValue: CGFloat); message 'setLineSpacing:';
  124. function lineSpacing: CGFloat; message 'lineSpacing';
  125. procedure setParagraphSpacing(newValue: CGFloat); message 'setParagraphSpacing:';
  126. function paragraphSpacing: CGFloat; message 'paragraphSpacing';
  127. procedure setAlignment(newValue: NSTextAlignment); message 'setAlignment:';
  128. function alignment: NSTextAlignment; message 'alignment';
  129. procedure setHeadIndent(newValue: CGFloat); message 'setHeadIndent:';
  130. function headIndent: CGFloat; message 'headIndent';
  131. procedure setTailIndent(newValue: CGFloat); message 'setTailIndent:';
  132. function tailIndent: CGFloat; message 'tailIndent';
  133. procedure setFirstLineHeadIndent(newValue: CGFloat); message 'setFirstLineHeadIndent:';
  134. function firstLineHeadIndent: CGFloat; message 'firstLineHeadIndent';
  135. procedure addTabStop (anObject: NSTextTab); message 'addTabStop:';
  136. procedure removeTabStop (anObject: NSTextTab); message 'removeTabStop:';
  137. procedure setTabStops(newValue: NSArray); message 'setTabStops:';
  138. function tabStops: NSArray; message 'tabStops';
  139. procedure setMinimumLineHeight(newValue: CGFloat); message 'setMinimumLineHeight:';
  140. function minimumLineHeight: CGFloat; message 'minimumLineHeight';
  141. procedure setMaximumLineHeight(newValue: CGFloat); message 'setMaximumLineHeight:';
  142. function maximumLineHeight: CGFloat; message 'maximumLineHeight';
  143. procedure setLineBreakMode(newValue: NSLineBreakMode); message 'setLineBreakMode:';
  144. function lineBreakMode: NSLineBreakMode; message 'lineBreakMode';
  145. procedure setParagraphStyle (obj: NSParagraphStyle); message 'setParagraphStyle:';
  146. procedure setBaseWritingDirection(newValue: NSWritingDirection); message 'setBaseWritingDirection:';
  147. function baseWritingDirection: NSWritingDirection; message 'baseWritingDirection';
  148. procedure setLineHeightMultiple(newValue: CGFloat); message 'setLineHeightMultiple:';
  149. function lineHeightMultiple: CGFloat; message 'lineHeightMultiple';
  150. procedure setParagraphSpacingBefore(newValue: CGFloat); message 'setParagraphSpacingBefore:';
  151. function paragraphSpacingBefore: CGFloat; message 'paragraphSpacingBefore';
  152. procedure setDefaultTabInterval(newValue: CGFloat); message 'setDefaultTabInterval:';
  153. function defaultTabInterval: CGFloat; message 'defaultTabInterval';
  154. procedure setTextBlocks(newValue: NSArray); message 'setTextBlocks:';
  155. function textBlocks: NSArray; message 'textBlocks';
  156. procedure setTextLists(newValue: NSArray); message 'setTextLists:';
  157. function textLists: NSArray; message 'textLists';
  158. procedure setHyphenationFactor(newValue: single); message 'setHyphenationFactor:';
  159. function hyphenationFactor: single; message 'hyphenationFactor';
  160. procedure setTighteningFactorForTruncation(newValue: single); message 'setTighteningFactorForTruncation:';
  161. function tighteningFactorForTruncation: single; message 'tighteningFactorForTruncation';
  162. procedure setHeaderLevel(newValue: NSInteger); message 'setHeaderLevel:';
  163. function headerLevel: NSInteger; message 'headerLevel';
  164. end;
  165. {$endif}