/packages/cocoaint/src/appkit/NSTextContainer.inc

https://github.com/slibre/freepascal · Pascal · 108 lines · 57 code · 19 blank · 32 comment · 0 complexity · 875dc7b90311d6dba362642bf755eea5 MD5 · raw file

  1. { Parsed from Appkit.framework NSTextContainer.h }
  2. {$ifdef TYPES}
  3. {$ifndef NSTEXTCONTAINER_PAS_T}
  4. {$define NSTEXTCONTAINER_PAS_T}
  5. { Constants }
  6. const
  7. NSLineSweepLeft = 0;
  8. NSLineSweepRight = 1;
  9. NSLineSweepDown = 2;
  10. NSLineSweepUp = 3;
  11. const
  12. NSLineDoesntMove = 0;
  13. NSLineMovesLeft = 1;
  14. NSLineMovesRight = 2;
  15. NSLineMovesDown = 3;
  16. NSLineMovesUp = 4;
  17. { Types }
  18. type
  19. NSLineSweepDirection = NSUInteger;
  20. NSLineSweepDirectionPtr = ^NSLineSweepDirection;
  21. NSLineMovementDirection = NSUInteger;
  22. NSLineMovementDirectionPtr = ^NSLineMovementDirection;
  23. {$endif}
  24. {$endif}
  25. {$ifdef RECORDS}
  26. {$ifndef NSTEXTCONTAINER_PAS_R}
  27. {$define NSTEXTCONTAINER_PAS_R}
  28. {$endif}
  29. {$endif}
  30. {$ifdef FUNCTIONS}
  31. {$ifndef NSTEXTCONTAINER_PAS_F}
  32. {$define NSTEXTCONTAINER_PAS_F}
  33. {$endif}
  34. {$endif}
  35. {$ifdef EXTERNAL_SYMBOLS}
  36. {$ifndef NSTEXTCONTAINER_PAS_S}
  37. {$define NSTEXTCONTAINER_PAS_S}
  38. {$endif}
  39. {$endif}
  40. {$ifdef FORWARD}
  41. NSTextContainer = objcclass;
  42. NSTextContainerPointer = ^NSTextContainer;
  43. NSTextContainerPtr = NSTextContainerPointer;
  44. {$endif}
  45. {$ifdef CLASSES}
  46. {$ifndef NSTEXTCONTAINER_PAS_C}
  47. {$define NSTEXTCONTAINER_PAS_C}
  48. { NSTextContainer }
  49. NSTextContainer = objcclass external (NSObject, NSCodingProtocol)
  50. private
  51. _layoutManager: NSLayoutManager;
  52. _textView: NSTextView;
  53. _size: NSSize;
  54. _lineFragmentPadding: CGFloat;
  55. __tcFlags: record
  56. case byte of
  57. 0: (_anonbitfield_NSTextContainer0: cushort);
  58. 1: (data: bitpacked record
  59. _widthTracksTextView: 0..1;
  60. _heightTracksTextView: 0..1;
  61. observingFrameChanges: 0..1;
  62. _reserved: 0..((1 shl 13)-1);
  63. end;
  64. );
  65. end;
  66. public
  67. function initWithContainerSize(size: NSSize): id; message 'initWithContainerSize:';
  68. function layoutManager: NSLayoutManager; message 'layoutManager';
  69. procedure setLayoutManager(layoutManager_: NSLayoutManager); message 'setLayoutManager:';
  70. procedure replaceLayoutManager(newLayoutManager: NSLayoutManager); message 'replaceLayoutManager:';
  71. function textView: NSTextView; message 'textView';
  72. procedure setTextView(textView_: NSTextView); message 'setTextView:';
  73. procedure setWidthTracksTextView(flag: Boolean); message 'setWidthTracksTextView:';
  74. function widthTracksTextView: Boolean; message 'widthTracksTextView';
  75. procedure setHeightTracksTextView(flag: Boolean); message 'setHeightTracksTextView:';
  76. function heightTracksTextView: Boolean; message 'heightTracksTextView';
  77. procedure setContainerSize(size: NSSize); message 'setContainerSize:';
  78. function containerSize: NSSize; message 'containerSize';
  79. procedure setLineFragmentPadding(pad: CGFloat); message 'setLineFragmentPadding:';
  80. function lineFragmentPadding: CGFloat; message 'lineFragmentPadding';
  81. function lineFragmentRectForProposedRect_sweepDirection_movementDirection_remainingRect(proposedRect: NSRect; sweepDirection: NSLineSweepDirection; movementDirection: NSLineMovementDirection; remainingRect: NSRectPointer): NSRect; message 'lineFragmentRectForProposedRect:sweepDirection:movementDirection:remainingRect:';
  82. function isSimpleRectangularTextContainer: Boolean; message 'isSimpleRectangularTextContainer';
  83. function containsPoint(point: NSPoint): Boolean; message 'containsPoint:';
  84. { Adopted Protocols }
  85. procedure encodeWithCoder(aCoder: NSCoder);
  86. function initWithCoder(aDecoder: NSCoder): id;
  87. end;
  88. {$endif}
  89. {$endif}