Mercurial > projects > dstep
comparison dstep/appkit/NSPathCell.d @ 16:19885b43130e
Huge update, the bridge actually works now
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Sun, 03 Jan 2010 22:06:11 +0100 |
parents | |
children | b9de51448c6b |
comparison
equal
deleted
inserted
replaced
15:7ff919f595d5 | 16:19885b43130e |
---|---|
1 /** | |
2 * Copyright: Copyright (c) 2009 Jacob Carlborg. | |
3 * Authors: Jacob Carlborg | |
4 * Version: Initial created: Sep 24, 2009 | |
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) | |
6 */ | |
7 module dstep.appkit.NSPathCell; | |
8 | |
9 import dstep.appkit.NSActionCell; | |
10 import dstep.appkit.NSAnimation; | |
11 import dstep.appkit.NSColor; | |
12 import dstep.appkit.NSEvent; | |
13 import dstep.appkit.NSMenu; | |
14 import dstep.appkit.NSView; | |
15 import dstep.foundation.NSArray; | |
16 import dstep.appkit.NSImage; | |
17 import dstep.appkit.NSOpenPanel; | |
18 import dstep.appkit.NSPathComponentCell; | |
19 import dstep.appkit.NSPopUpButtonCell; | |
20 import dstep.foundation.NSAttributedString; | |
21 import dstep.foundation.NSGeometry; | |
22 import dstep.foundation.NSObjCRuntime; | |
23 import dstep.foundation.NSObject; | |
24 import dstep.foundation.NSString; | |
25 import dstep.foundation.NSURL; | |
26 import dstep.objc.bridge.Bridge; | |
27 import dstep.objc.objc; | |
28 | |
29 typedef NSInteger NSPathStyle; | |
30 | |
31 enum | |
32 { | |
33 NSPathStyleStandard, | |
34 NSPathStyleNavigationBar, | |
35 NSPathStylePopUp | |
36 } | |
37 | |
38 class NSPathCell : NSActionCell | |
39 { | |
40 mixin (ObjcWrap); | |
41 | |
42 int pathStyle () | |
43 { | |
44 return invokeObjcSelf!(int, "pathStyle"); | |
45 } | |
46 | |
47 void setPathStyle (int style) | |
48 { | |
49 return invokeObjcSelf!(void, "setPathStyle:", int)(style); | |
50 } | |
51 | |
52 NSURL URL () | |
53 { | |
54 return invokeObjcSelf!(NSURL, "URL"); | |
55 } | |
56 | |
57 void setURL (NSURL url) | |
58 { | |
59 return invokeObjcSelf!(void, "setURL:", NSURL)(url); | |
60 } | |
61 | |
62 void setObjectValue (INSCopying obj) | |
63 { | |
64 return invokeObjcSelf!(void, "setObjectValue:", INSCopying)(obj); | |
65 } | |
66 | |
67 NSArray allowedTypes () | |
68 { | |
69 return invokeObjcSelf!(NSArray, "allowedTypes"); | |
70 } | |
71 | |
72 void setAllowedTypes (NSArray allowedTypes) | |
73 { | |
74 return invokeObjcSelf!(void, "setAllowedTypes:", NSArray)(allowedTypes); | |
75 } | |
76 | |
77 Object delegate_ () | |
78 { | |
79 return invokeObjcSelf!(Object, "delegate"); | |
80 } | |
81 | |
82 void setDelegate (Object value) | |
83 { | |
84 return invokeObjcSelf!(void, "setDelegate:", Object)(value); | |
85 } | |
86 | |
87 static Class pathComponentCellClass () | |
88 { | |
89 return invokeObjcSelfClass!(Class, "pathComponentCellClass"); | |
90 } | |
91 | |
92 NSArray pathComponentCells () | |
93 { | |
94 return invokeObjcSelf!(NSArray, "pathComponentCells"); | |
95 } | |
96 | |
97 void setPathComponentCells (NSArray cells) | |
98 { | |
99 return invokeObjcSelf!(void, "setPathComponentCells:", NSArray)(cells); | |
100 } | |
101 | |
102 NSRect rectOfPathComponentCell (NSPathComponentCell cell, NSRect frame, NSView view) | |
103 { | |
104 return invokeObjcSelf!(NSRect, "rectOfPathComponentCell:withFrame:inView:", NSPathComponentCell, NSRect, NSView)(cell, frame, view); | |
105 } | |
106 | |
107 NSPathComponentCell pathComponentCellAtPoint (NSPoint point, NSRect frame, NSView view) | |
108 { | |
109 return invokeObjcSelf!(NSPathComponentCell, "pathComponentCellAtPoint:withFrame:inView:", NSPoint, NSRect, NSView)(point, frame, view); | |
110 } | |
111 | |
112 NSPathComponentCell clickedPathComponentCell () | |
113 { | |
114 return invokeObjcSelf!(NSPathComponentCell, "clickedPathComponentCell"); | |
115 } | |
116 | |
117 void mouseEntered (NSEvent event, NSRect frame, NSView view) | |
118 { | |
119 return invokeObjcSelf!(void, "mouseEntered:withFrame:inView:", NSEvent, NSRect, NSView)(event, frame, view); | |
120 } | |
121 | |
122 void mouseExited (NSEvent event, NSRect frame, NSView view) | |
123 { | |
124 return invokeObjcSelf!(void, "mouseExited:withFrame:inView:", NSEvent, NSRect, NSView)(event, frame, view); | |
125 } | |
126 | |
127 SEL doubleAction () | |
128 { | |
129 return invokeObjcSelf!(SEL, "doubleAction"); | |
130 } | |
131 | |
132 void setDoubleAction (SEL action) | |
133 { | |
134 return invokeObjcSelf!(void, "setDoubleAction:", SEL)(action); | |
135 } | |
136 | |
137 void setBackgroundColor (NSColor color) | |
138 { | |
139 return invokeObjcSelf!(void, "setBackgroundColor:", NSColor)(color); | |
140 } | |
141 | |
142 NSColor backgroundColor () | |
143 { | |
144 return invokeObjcSelf!(NSColor, "backgroundColor"); | |
145 } | |
146 | |
147 void setPlaceholderString (NSString string) | |
148 { | |
149 return invokeObjcSelf!(void, "setPlaceholderString:", NSString)(string); | |
150 } | |
151 | |
152 NSString placeholderString () | |
153 { | |
154 return invokeObjcSelf!(NSString, "placeholderString"); | |
155 } | |
156 | |
157 void setPlaceholderAttributedString (NSAttributedString string) | |
158 { | |
159 return invokeObjcSelf!(void, "setPlaceholderAttributedString:", NSAttributedString)(string); | |
160 } | |
161 | |
162 NSAttributedString placeholderAttributedString () | |
163 { | |
164 return invokeObjcSelf!(NSAttributedString, "placeholderAttributedString"); | |
165 } | |
166 | |
167 void setControlSize (uint size) | |
168 { | |
169 return invokeObjcSelf!(void, "setControlSize:", uint)(size); | |
170 } | |
171 } | |
172 | |
173 interface INSPathCellDelegate : INSObject | |
174 { | |
175 void pathCell (NSPathCell pathCell, NSOpenPanel openPanel); | |
176 void pathCell (NSPathCell pathCell, NSMenu menu); | |
177 } | |
178 |