/packages/cocoaint/src/appkit/NSClipView.inc

https://github.com/slibre/freepascal · Pascal · 103 lines · 58 code · 15 blank · 30 comment · 0 complexity · 1571f99b4b1c78a8ffab7177674685d8 MD5 · raw file

  1. { Parsed from Appkit.framework NSClipView.h }
  2. {$ifdef TYPES}
  3. {$ifndef NSCLIPVIEW_PAS_T}
  4. {$define NSCLIPVIEW_PAS_T}
  5. {$endif}
  6. {$endif}
  7. {$ifdef RECORDS}
  8. {$ifndef NSCLIPVIEW_PAS_R}
  9. {$define NSCLIPVIEW_PAS_R}
  10. {$endif}
  11. {$endif}
  12. {$ifdef FUNCTIONS}
  13. {$ifndef NSCLIPVIEW_PAS_F}
  14. {$define NSCLIPVIEW_PAS_F}
  15. {$endif}
  16. {$endif}
  17. {$ifdef EXTERNAL_SYMBOLS}
  18. {$ifndef NSCLIPVIEW_PAS_S}
  19. {$define NSCLIPVIEW_PAS_S}
  20. {$endif}
  21. {$endif}
  22. {$ifdef FORWARD}
  23. NSClipView = objcclass;
  24. NSClipViewPointer = ^NSClipView;
  25. NSClipViewPtr = NSClipViewPointer;
  26. {$endif}
  27. {$ifdef CLASSES}
  28. {$ifndef NSCLIPVIEW_PAS_C}
  29. {$define NSCLIPVIEW_PAS_C}
  30. { NSClipView }
  31. NSClipView = objcclass external (NSView)
  32. private
  33. _backgroundColor: NSColor;
  34. _docView: NSView;
  35. _docRect: NSRect;
  36. _oldDocFrame: NSRect;
  37. _cursor: NSCursor;
  38. _scrollAnimationHelper: id;
  39. __cvFlags: record
  40. case byte of
  41. 0: (_anonbitfield_NSClipView0: cuint);
  42. 1: (data: bitpacked record
  43. _isFlipped: 0..1;
  44. onlyUncovered: 0..1;
  45. reflectScroll: 0..1;
  46. usedByCell: 0..1;
  47. scrollClipTo: 0..1;
  48. noCopyOnScroll: 0..1;
  49. _drawsBackground: 0..1;
  50. scrollInProgress: 0..1;
  51. skipRemoveSuperviewCheck: 0..1;
  52. animateCurrentScroll: 0..1;
  53. canAnimateScrolls: 0..1;
  54. nextScrollRelativeToCurrentPosition: 0..1;
  55. viewBoundsChangedOverridden: 0..1;
  56. viewFrameChangedOverridden: 0..1;
  57. documentViewAlignment: 0..((1 shl 4)-1);
  58. redrawnWhileScrolling: 0..1;
  59. RESERVED: 0..((1 shl 13)-1);
  60. end;
  61. );
  62. end;
  63. public
  64. procedure setBackgroundColor(color: NSColor); message 'setBackgroundColor:';
  65. function backgroundColor: NSColor; message 'backgroundColor';
  66. procedure setDrawsBackground(flag: Boolean); message 'setDrawsBackground:';
  67. function drawsBackground: Boolean; message 'drawsBackground';
  68. procedure setDocumentView(aView: NSView); message 'setDocumentView:';
  69. function documentView: id; message 'documentView';
  70. function documentRect: NSRect; message 'documentRect';
  71. procedure setDocumentCursor(anObj: NSCursor); message 'setDocumentCursor:';
  72. function documentCursor: NSCursor; message 'documentCursor';
  73. function documentVisibleRect: NSRect; message 'documentVisibleRect';
  74. procedure viewFrameChanged(notification: NSNotification); message 'viewFrameChanged:';
  75. procedure viewBoundsChanged(notification: NSNotification); message 'viewBoundsChanged:';
  76. procedure setCopiesOnScroll(flag: Boolean); message 'setCopiesOnScroll:';
  77. function copiesOnScroll: Boolean; message 'copiesOnScroll';
  78. function autoscroll(theEvent: NSEvent): Boolean; message 'autoscroll:';
  79. function constrainScrollPoint(newOrigin: NSPoint): NSPoint; message 'constrainScrollPoint:';
  80. procedure scrollToPoint(newOrigin: NSPoint); message 'scrollToPoint:';
  81. end;
  82. { NSClipViewSuperviewCategory }
  83. NSClipViewSuperviewCategory = objccategory external (NSView)
  84. procedure reflectScrolledClipView(aClipView: NSClipView); message 'reflectScrolledClipView:';
  85. procedure scrollClipView_toPoint(aClipView: NSClipView; aPoint: NSPoint); message 'scrollClipView:toPoint:';
  86. end;
  87. {$endif}
  88. {$endif}