NSTextTable.inc 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. { Parsed from AppKit.framework NSTextTable.h }
  2. {$ifdef TYPES}
  3. type
  4. NSTextBlockPtr = ^NSTextBlock;
  5. NSTextTableBlockPtr = ^NSTextTableBlock;
  6. NSTextTablePtr = ^NSTextTable;
  7. {$endif}
  8. {$ifdef TYPES}
  9. type
  10. NSTextBlockValueType = NSUInteger;
  11. NSTextBlockValueTypePtr = ^NSTextBlockValueType;
  12. const
  13. NSTextBlockAbsoluteValueType = 0;
  14. NSTextBlockPercentageValueType = 1;
  15. type
  16. NSTextBlockDimension = NSUInteger;
  17. NSTextBlockDimensionPtr = ^NSTextBlockDimension;
  18. const
  19. NSTextBlockWidth = 0;
  20. NSTextBlockMinimumWidth = 1;
  21. NSTextBlockMaximumWidth = 2;
  22. NSTextBlockHeight = 4;
  23. NSTextBlockMinimumHeight = 5;
  24. NSTextBlockMaximumHeight = 6;
  25. type
  26. NSTextBlockLayer = NSInteger;
  27. NSTextBlockLayerPtr = ^NSTextBlockLayer;
  28. const
  29. NSTextBlockPadding = -1;
  30. NSTextBlockBorder = 0;
  31. NSTextBlockMargin = 1;
  32. type
  33. NSTextBlockVerticalAlignment = NSUInteger;
  34. NSTextBlockVerticalAlignmentPtr = ^NSTextBlockVerticalAlignment;
  35. const
  36. NSTextBlockTopAlignment = 0;
  37. NSTextBlockMiddleAlignment = 1;
  38. NSTextBlockBottomAlignment = 2;
  39. NSTextBlockBaselineAlignment = 3;
  40. type
  41. NSTextTableLayoutAlgorithm = NSUInteger;
  42. NSTextTableLayoutAlgorithmPtr = ^NSTextTableLayoutAlgorithm;
  43. const
  44. NSTextTableAutomaticLayoutAlgorithm = 0;
  45. NSTextTableFixedLayoutAlgorithm = 1;
  46. {$endif}
  47. {$ifdef CLASSES}
  48. type
  49. NSTextBlock = objcclass external (NSObject, NSCodingProtocol, NSCopyingProtocol)
  50. private
  51. _propVals: pointer;
  52. _propMask: NSUInteger;
  53. _typeMask: NSUInteger;
  54. _primParamVal: id;
  55. _otherParamVals: id;
  56. _blockPrimary: pointer;
  57. _blockSecondary: pointer;
  58. public
  59. function init: instancetype; message 'init';
  60. procedure setValue_type_forDimension (val: CGFloat; type_: NSTextBlockValueType; dimension: NSTextBlockDimension); message 'setValue:type:forDimension:';
  61. function valueForDimension (dimension: NSTextBlockDimension): CGFloat; message 'valueForDimension:';
  62. function valueTypeForDimension (dimension: NSTextBlockDimension): NSTextBlockValueType; message 'valueTypeForDimension:';
  63. procedure setContentWidth_type (val: CGFloat; type_: NSTextBlockValueType); message 'setContentWidth:type:';
  64. function contentWidth: CGFloat; message 'contentWidth';
  65. function contentWidthValueType: NSTextBlockValueType; message 'contentWidthValueType';
  66. procedure setWidth_type_forLayer_edge (val: CGFloat; type_: NSTextBlockValueType; layer: NSTextBlockLayer; edge: NSRectEdge); message 'setWidth:type:forLayer:edge:';
  67. procedure setWidth_type_forLayer (val: CGFloat; type_: NSTextBlockValueType; layer: NSTextBlockLayer); message 'setWidth:type:forLayer:';
  68. function widthForLayer_edge (layer: NSTextBlockLayer; edge: NSRectEdge): CGFloat; message 'widthForLayer:edge:';
  69. function widthValueTypeForLayer_edge (layer: NSTextBlockLayer; edge: NSRectEdge): NSTextBlockValueType; message 'widthValueTypeForLayer:edge:';
  70. procedure setVerticalAlignment(newValue: NSTextBlockVerticalAlignment); message 'setVerticalAlignment:';
  71. function verticalAlignment: NSTextBlockVerticalAlignment; message 'verticalAlignment';
  72. procedure setBackgroundColor(newValue: NSColor); message 'setBackgroundColor:';
  73. function backgroundColor: NSColor; message 'backgroundColor';
  74. procedure setBorderColor_forEdge (color: NSColor; edge: NSRectEdge); message 'setBorderColor:forEdge:';
  75. procedure setBorderColor (color: NSColor); message 'setBorderColor:';
  76. function borderColorForEdge (edge: NSRectEdge): NSColor; message 'borderColorForEdge:';
  77. function rectForLayoutAtPoint_inRect_textContainer_characterRange (startingPoint: NSPoint; rect: NSRect; textContainer: NSTextContainer; charRange: NSRange): NSRect; message 'rectForLayoutAtPoint:inRect:textContainer:characterRange:';
  78. function boundsRectForContentRect_inRect_textContainer_characterRange (contentRect: NSRect; rect: NSRect; textContainer: NSTextContainer; charRange: NSRange): NSRect; message 'boundsRectForContentRect:inRect:textContainer:characterRange:';
  79. procedure drawBackgroundWithFrame_inView_characterRange_layoutManager (frameRect: NSRect; controlView: NSView; charRange: NSRange; layoutManager: NSLayoutManager); message 'drawBackgroundWithFrame:inView:characterRange:layoutManager:';
  80. { Adopted protocols }
  81. function copyWithZone (zone: NSZonePtr): id; message 'copyWithZone:';
  82. procedure encodeWithCoder (aCoder: NSCoder); message 'encodeWithCoder:';
  83. function initWithCoder (aDecoder: NSCoder): id; message 'initWithCoder:';
  84. end;
  85. type
  86. NSTextTableBlock = objcclass external (NSTextBlock)
  87. private
  88. _table: NSTextTable;
  89. _rowNum: NSInteger;
  90. _colNum: NSInteger;
  91. _rowSpan: NSInteger;
  92. _colSpan: NSInteger;
  93. _tableBlockPrimary: pointer;
  94. _tableBlockSecondary: pointer;
  95. public
  96. function initWithTable_startingRow_rowSpan_startingColumn_columnSpan (table: NSTextTable; row: NSInteger; rowSpan: NSInteger; col: NSInteger; colSpan: NSInteger): instancetype; message 'initWithTable:startingRow:rowSpan:startingColumn:columnSpan:';
  97. function table: NSTextTable; message 'table';
  98. function startingRow: NSInteger; message 'startingRow';
  99. function rowSpan: NSInteger; message 'rowSpan';
  100. function startingColumn: NSInteger; message 'startingColumn';
  101. function columnSpan: NSInteger; message 'columnSpan';
  102. end;
  103. type
  104. NSTextTable = objcclass external (NSTextBlock)
  105. private
  106. _numCols: NSUInteger;
  107. _tableFlags: NSUInteger;
  108. _lcache: id;
  109. _tablePrimary: pointer;
  110. _tableSecondary: pointer;
  111. public
  112. procedure setNumberOfColumns(newValue: NSUInteger); message 'setNumberOfColumns:';
  113. function numberOfColumns: NSUInteger; message 'numberOfColumns';
  114. procedure setLayoutAlgorithm(newValue: NSTextTableLayoutAlgorithm); message 'setLayoutAlgorithm:';
  115. function layoutAlgorithm: NSTextTableLayoutAlgorithm; message 'layoutAlgorithm';
  116. procedure setCollapsesBorders(newValue: ObjCBOOL); message 'setCollapsesBorders:';
  117. function collapsesBorders: ObjCBOOL; message 'collapsesBorders';
  118. procedure setHidesEmptyCells(newValue: ObjCBOOL); message 'setHidesEmptyCells:';
  119. function hidesEmptyCells: ObjCBOOL; message 'hidesEmptyCells';
  120. function rectForBlock_layoutAtPoint_inRect_textContainer_characterRange (block: NSTextTableBlock; startingPoint: NSPoint; rect: NSRect; textContainer: NSTextContainer; charRange: NSRange): NSRect; message 'rectForBlock:layoutAtPoint:inRect:textContainer:characterRange:';
  121. function boundsRectForBlock_contentRect_inRect_textContainer_characterRange (block: NSTextTableBlock; contentRect: NSRect; rect: NSRect; textContainer: NSTextContainer; charRange: NSRange): NSRect; message 'boundsRectForBlock:contentRect:inRect:textContainer:characterRange:';
  122. procedure drawBackgroundForBlock_withFrame_inView_characterRange_layoutManager (block: NSTextTableBlock; frameRect: NSRect; controlView: NSView; charRange: NSRange; layoutManager: NSLayoutManager); message 'drawBackgroundForBlock:withFrame:inView:characterRange:layoutManager:';
  123. end;
  124. {$endif}