Mercurial > projects > dstep
comparison dstep/appkit/NSSearchFieldCell.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.NSSearchFieldCell; | |
8 | |
9 import dstep.appkit.NSButtonCell; | |
10 import dstep.appkit.NSMenu; | |
11 import dstep.appkit.NSTextFieldCell; | |
12 import dstep.foundation.NSArray; | |
13 import dstep.foundation.NSGeometry; | |
14 import dstep.foundation.NSObjCRuntime; | |
15 import dstep.foundation.NSString; | |
16 import dstep.foundation.NSTimer; | |
17 import dstep.objc.bridge.Bridge; | |
18 import dstep.objc.objc; | |
19 | |
20 class NSSearchFieldCell : NSTextFieldCell | |
21 { | |
22 mixin (ObjcWrap); | |
23 | |
24 NSButtonCell searchButtonCell () | |
25 { | |
26 return invokeObjcSelf!(NSButtonCell, "searchButtonCell"); | |
27 } | |
28 | |
29 void setSearchButtonCell (NSButtonCell cell) | |
30 { | |
31 return invokeObjcSelf!(void, "setSearchButtonCell:", NSButtonCell)(cell); | |
32 } | |
33 | |
34 NSButtonCell cancelButtonCell () | |
35 { | |
36 return invokeObjcSelf!(NSButtonCell, "cancelButtonCell"); | |
37 } | |
38 | |
39 void setCancelButtonCell (NSButtonCell cell) | |
40 { | |
41 return invokeObjcSelf!(void, "setCancelButtonCell:", NSButtonCell)(cell); | |
42 } | |
43 | |
44 void resetSearchButtonCell () | |
45 { | |
46 return invokeObjcSelf!(void, "resetSearchButtonCell"); | |
47 } | |
48 | |
49 void resetCancelButtonCell () | |
50 { | |
51 return invokeObjcSelf!(void, "resetCancelButtonCell"); | |
52 } | |
53 | |
54 NSRect searchTextRectForBounds (NSRect rect) | |
55 { | |
56 return invokeObjcSelf!(NSRect, "searchTextRectForBounds:", NSRect)(rect); | |
57 } | |
58 | |
59 NSRect searchButtonRectForBounds (NSRect rect) | |
60 { | |
61 return invokeObjcSelf!(NSRect, "searchButtonRectForBounds:", NSRect)(rect); | |
62 } | |
63 | |
64 NSRect cancelButtonRectForBounds (NSRect rect) | |
65 { | |
66 return invokeObjcSelf!(NSRect, "cancelButtonRectForBounds:", NSRect)(rect); | |
67 } | |
68 | |
69 void setSearchMenuTemplate (NSMenu menu) | |
70 { | |
71 return invokeObjcSelf!(void, "setSearchMenuTemplate:", NSMenu)(menu); | |
72 } | |
73 | |
74 NSMenu searchMenuTemplate () | |
75 { | |
76 return invokeObjcSelf!(NSMenu, "searchMenuTemplate"); | |
77 } | |
78 | |
79 void setSendsWholeSearchString (bool flag) | |
80 { | |
81 return invokeObjcSelf!(void, "setSendsWholeSearchString:", bool)(flag); | |
82 } | |
83 | |
84 bool sendsWholeSearchString () | |
85 { | |
86 return invokeObjcSelf!(bool, "sendsWholeSearchString"); | |
87 } | |
88 | |
89 void setMaximumRecents (NSInteger maxRecents) | |
90 { | |
91 return invokeObjcSelf!(void, "setMaximumRecents:", NSInteger)(maxRecents); | |
92 } | |
93 | |
94 NSInteger maximumRecents () | |
95 { | |
96 return invokeObjcSelf!(NSInteger, "maximumRecents"); | |
97 } | |
98 | |
99 void setRecentSearches (NSArray searches) | |
100 { | |
101 return invokeObjcSelf!(void, "setRecentSearches:", NSArray)(searches); | |
102 } | |
103 | |
104 NSArray recentSearches () | |
105 { | |
106 return invokeObjcSelf!(NSArray, "recentSearches"); | |
107 } | |
108 | |
109 void setRecentsAutosaveName (NSString string) | |
110 { | |
111 return invokeObjcSelf!(void, "setRecentsAutosaveName:", NSString)(string); | |
112 } | |
113 | |
114 NSString recentsAutosaveName () | |
115 { | |
116 return invokeObjcSelf!(NSString, "recentsAutosaveName"); | |
117 } | |
118 | |
119 bool sendsSearchStringImmediately () | |
120 { | |
121 return invokeObjcSelf!(bool, "sendsSearchStringImmediately"); | |
122 } | |
123 | |
124 void setSendsSearchStringImmediately (bool flag) | |
125 { | |
126 return invokeObjcSelf!(void, "setSendsSearchStringImmediately:", bool)(flag); | |
127 } | |
128 } | |
129 |