summaryrefslogtreecommitdiff
path: root/fpcsrc/packages/cocoaint/src/appkit/NSSplitView.inc
blob: 864eeaf474c7e81d7cfc9ad4e6cd5373c7f63295 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
{ Parsed from Appkit.framework NSSplitView.h }

{$ifdef TYPES}
{$ifndef NSSPLITVIEW_PAS_T}
{$define NSSPLITVIEW_PAS_T}

{ Constants }

const
  NSSplitViewDividerStyleThick = 1;
  NSSplitViewDividerStyleThin = 2;
  NSSplitViewDividerStylePaneSplitter = 3;

{ Types }
type
  NSSplitViewDividerStyle = NSInteger;
  NSSplitViewDividerStylePtr = ^NSSplitViewDividerStyle;

{$endif}
{$endif}

{$ifdef RECORDS}
{$ifndef NSSPLITVIEW_PAS_R}
{$define NSSPLITVIEW_PAS_R}

{$endif}
{$endif}

{$ifdef FUNCTIONS}
{$ifndef NSSPLITVIEW_PAS_F}
{$define NSSPLITVIEW_PAS_F}

{$endif}
{$endif}

{$ifdef EXTERNAL_SYMBOLS}
{$ifndef NSSPLITVIEW_PAS_S}
{$define NSSPLITVIEW_PAS_S}

{ External string constants }
var
  NSSplitViewWillResizeSubviewsNotification: NSString; cvar; external;
  NSSplitViewDidResizeSubviewsNotification: NSString; cvar; external;

{$endif}
{$endif}

{$ifdef FORWARD}
  NSSplitViewDelegateProtocol = objcprotocol;
  NSSplitView = objcclass;
  NSSplitViewPointer = ^NSSplitView;
  NSSplitViewPtr = NSSplitViewPointer;

{$endif}

{$ifdef CLASSES}
{$ifndef NSSPLITVIEW_PAS_C}
{$define NSSPLITVIEW_PAS_C}

{ NSSplitView }
  NSSplitView = objcclass external (NSView)
  private
    _variables: id;
    
  public
    procedure setVertical(flag: Boolean); message 'setVertical:';
    function isVertical: Boolean; message 'isVertical';
    procedure setDividerStyle(dividerStyle_: NSSplitViewDividerStyle); message 'setDividerStyle:';
    function dividerStyle: NSSplitViewDividerStyle; message 'dividerStyle';
    procedure setAutosaveName(autosaveName_: NSString); message 'setAutosaveName:';
    function autosaveName: NSString; message 'autosaveName';
    procedure setDelegate(delegate_: NSSplitViewDelegateProtocol); message 'setDelegate:';
    function delegate: NSSplitViewDelegateProtocol; message 'delegate';
    procedure drawDividerInRect(rect: NSRect); message 'drawDividerInRect:';
    function dividerColor: NSColor; message 'dividerColor';
    function dividerThickness: CGFloat; message 'dividerThickness';
    procedure adjustSubviews; message 'adjustSubviews';
    function isSubviewCollapsed(subview: NSView): Boolean; message 'isSubviewCollapsed:';
    function minPossiblePositionOfDividerAtIndex(dividerIndex: NSInteger): CGFloat; message 'minPossiblePositionOfDividerAtIndex:';
    function maxPossiblePositionOfDividerAtIndex(dividerIndex: NSInteger): CGFloat; message 'maxPossiblePositionOfDividerAtIndex:';
    procedure setPosition_ofDividerAtIndex(position: CGFloat; dividerIndex: NSInteger); message 'setPosition:ofDividerAtIndex:';
  end;

{ NSDeprecated_NSSplitViewCategory }
  NSDeprecated_NSSplitViewCategory = objccategory external name 'NSDeprecated' (NSSplitView)
    procedure setIsPaneSplitter(flag: Boolean); message 'setIsPaneSplitter:'; deprecated 'in Mac OS X 10.6 and later';
    function isPaneSplitter: Boolean; message 'isPaneSplitter'; deprecated 'in Mac OS X 10.6 and later';
  end;

{$endif}
{$endif}
{$ifdef PROTOCOLS}
{$ifndef NSSPLITVIEW_PAS_P}
{$define NSSPLITVIEW_PAS_P}
  
{ NSSplitViewDelegate Protocol }
  NSSplitViewDelegateProtocol = objcprotocol external name 'NSSplitViewDelegate'
  optional
    function splitView_canCollapseSubview(splitView: NSSplitView; subview: NSView): Boolean; message 'splitView:canCollapseSubview:';
    function splitView_shouldCollapseSubview_forDoubleClickOnDividerAtIndex(splitView: NSSplitView; subview: NSView; dividerIndex: NSInteger): Boolean; message 'splitView:shouldCollapseSubview:forDoubleClickOnDividerAtIndex:';
    function splitView_constrainMinCoordinate_ofSubviewAt(splitView: NSSplitView; proposedMinimumPosition: CGFloat; dividerIndex: NSInteger): CGFloat; message 'splitView:constrainMinCoordinate:ofSubviewAt:';
    function splitView_constrainMaxCoordinate_ofSubviewAt(splitView: NSSplitView; proposedMaximumPosition: CGFloat; dividerIndex: NSInteger): CGFloat; message 'splitView:constrainMaxCoordinate:ofSubviewAt:';
    function splitView_constrainSplitPosition_ofSubviewAt(splitView: NSSplitView; proposedPosition: CGFloat; dividerIndex: NSInteger): CGFloat; message 'splitView:constrainSplitPosition:ofSubviewAt:';
    procedure splitView_resizeSubviewsWithOldSize(splitView: NSSplitView; oldSize: NSSize); message 'splitView:resizeSubviewsWithOldSize:';
    function splitView_shouldAdjustSizeOfSubview(splitView: NSSplitView; view: NSView): Boolean; message 'splitView:shouldAdjustSizeOfSubview:';
    function splitView_shouldHideDividerAtIndex(splitView: NSSplitView; dividerIndex: NSInteger): Boolean; message 'splitView:shouldHideDividerAtIndex:';
    function splitView_effectiveRect_forDrawnRect_ofDividerAtIndex(splitView: NSSplitView; proposedEffectiveRect: NSRect; drawnRect: NSRect; dividerIndex: NSInteger): NSRect; message 'splitView:effectiveRect:forDrawnRect:ofDividerAtIndex:';
    function splitView_additionalEffectiveRectOfDividerAtIndex(splitView: NSSplitView; dividerIndex: NSInteger): NSRect; message 'splitView:additionalEffectiveRectOfDividerAtIndex:';
    procedure splitViewWillResizeSubviews(notification: NSNotification); message 'splitViewWillResizeSubviews:';
    procedure splitViewDidResizeSubviews(notification: NSNotification); message 'splitViewDidResizeSubviews:';
  end;
{$endif}
{$endif}