NSParagraphStyle.inc 7.3 KB

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