summaryrefslogtreecommitdiff
path: root/packages/cocoaint/src/appkit/NSPathCell.inc
blob: 2729d95ae7e70a57a61d6ca648b2a703e9ea2f72 (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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
{ Parsed from Appkit.framework NSPathCell.h }
{ Version: 2.1.2 - Wed Dec 8 10:06:07 CET 2010 }


{$ifdef TYPES}
{$ifndef NSPATHCELL_PAS_T}
{$define NSPATHCELL_PAS_T}

{ Constants }

const
  NSPathStyleStandard = 0;
  NSPathStyleNavigationBar = 1;
  NSPathStylePopUp = 2;

{ Types }
type
  NSPathStyle = NSInteger;
  NSPathStylePtr = ^NSPathStyle;

{$endif}
{$endif}

{$ifdef RECORDS}
{$ifndef NSPATHCELL_PAS_R}
{$define NSPATHCELL_PAS_R}

{$endif}
{$endif}

{$ifdef FUNCTIONS}
{$ifndef NSPATHCELL_PAS_F}
{$define NSPATHCELL_PAS_F}

{$endif}
{$endif}

{$ifdef EXTERNAL_SYMBOLS}
{$ifndef NSPATHCELL_PAS_S}
{$define NSPATHCELL_PAS_S}

{$endif}
{$endif}

{$ifdef FORWARD}
  NSPathCellDelegateProtocol = objcprotocol;
  NSPathCell = objcclass;
  NSPathCellPointer = ^NSPathCell;
  NSPathCellPtr = NSPathCellPointer;

{$endif}

{$ifdef CLASSES}
{$ifndef NSPATHCELL_PAS_C}
{$define NSPATHCELL_PAS_C}

{ NSPathCell }
  NSPathCell = objcclass(NSActionCell, NSOpenSavePanelDelegateProtocol)
  private
    _backgroundColor: NSColor;
    _borderColors: NSMutableArray;
    _cells: NSMutableArray;
    _clickedCell: NSPathComponentCell;
    _hoveredCell: NSPathComponentCell;
    _popUpButtonCell: NSPopUpButtonCell;
    _currentRect: NSRect;
    _animation: NSAnimation;
    _allowedTypes: NSArray;
    _doubleAction: SEL;
    _delegate: id;
    __piFlags: bitpacked record
      case byte of
       0: (_anonbitfield_NSPathCell0: cuint);
       1: (
        reserved: 0..((1 shl 32)-1);
      );
      end;
    _pathStyle: NSPathStyle;
    _aux: id;
    
  public
    class function alloc: NSPathCell; message 'alloc';

    function pathStyle: NSPathStyle; message 'pathStyle';
    procedure setPathStyle(style: NSPathStyle); message 'setPathStyle:';
    function URL: NSURL; message 'URL';
    procedure setURL(url_: NSURL); message 'setURL:';
    procedure setObjectValue(obj: id); message 'setObjectValue:';
    function allowedTypes: NSArray; message 'allowedTypes';
    procedure setAllowedTypes(allowedTypes_: NSArray); message 'setAllowedTypes:';
    function delegate: id; message 'delegate';
    procedure setDelegate(value: id); message 'setDelegate:';
    class function pathComponentCellClass: Pobjc_class; message 'pathComponentCellClass';
    function pathComponentCells: NSArray; message 'pathComponentCells';
    procedure setPathComponentCells(cells: NSArray); message 'setPathComponentCells:';
    function rectOfPathComponentCell_withFrame_inView(cell: NSPathComponentCell; frame: NSRect; view: NSView): NSRect; message 'rectOfPathComponentCell:withFrame:inView:';
    function pathComponentCellAtPoint_withFrame_inView(point: NSPoint; frame: NSRect; view: NSView): NSPathComponentCell; message 'pathComponentCellAtPoint:withFrame:inView:';
    function clickedPathComponentCell: NSPathComponentCell; message 'clickedPathComponentCell';
    procedure mouseEntered_withFrame_inView(event: NSEvent; frame: NSRect; view: NSView); message 'mouseEntered:withFrame:inView:';
    procedure mouseExited_withFrame_inView(event: NSEvent; frame: NSRect; view: NSView); message 'mouseExited:withFrame:inView:';
    function doubleAction: SEL; message 'doubleAction';
    procedure setDoubleAction(action_: SEL); message 'setDoubleAction:';
    procedure setBackgroundColor(color: NSColor); message 'setBackgroundColor:';
    function backgroundColor: NSColor; message 'backgroundColor';
    procedure setPlaceholderString(string_: NSString); message 'setPlaceholderString:';
    function placeholderString: NSString; message 'placeholderString';
    procedure setPlaceholderAttributedString(string_: NSAttributedString); message 'setPlaceholderAttributedString:';
    function placeholderAttributedString: NSAttributedString; message 'placeholderAttributedString';
    procedure setControlSize(size: NSControlSize); message 'setControlSize:';

    { Adopted Protocols }
    function panel_shouldEnableURL(sender: id; url: NSURL): Boolean;
    function panel_validateURL_error(sender: id; url: NSURL; outError: NSErrorPointer): Boolean;
    procedure panel_didChangeToDirectoryURL(sender: id; url: NSURL);
    function panel_userEnteredFilename_confirmed(sender: id; filename: NSString; okFlag: Boolean): NSString;
    procedure panel_willExpand(sender: id; expanding: Boolean);
    procedure panelSelectionDidChange(sender: id);
  end; external;

{$endif}
{$endif}
{$ifdef PROTOCOLS}
{$ifndef NSPATHCELL_PAS_P}
{$define NSPATHCELL_PAS_P}
  
{ NSPathCellDelegate Protocol }
  NSPathCellDelegateProtocol = objcprotocol
    procedure pathCell_willDisplayOpenPanel(pathCell: NSPathCell; openPanel: NSOpenPanel); message 'pathCell:willDisplayOpenPanel:';
    procedure pathCell_willPopUpMenu(pathCell: NSPathCell; menu: NSMenu); message 'pathCell:willPopUpMenu:';
  end; external name 'NSPathCellDelegate';
{$endif}
{$endif}