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