Mercurial > projects > dstep
annotate dstep/appkit/NSToolbar.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 |
rev | line source |
---|---|
16
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
1 /** |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
2 * Copyright: Copyright (c) 2009 Jacob Carlborg. |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
3 * Authors: Jacob Carlborg |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
4 * Version: Initial created: Sep 24, 2009 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
6 */ |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
7 module dstep.appkit.NSToolbar; |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
8 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
9 import dstep.appkit.AppKitDefines; |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
10 import dstep.appkit.NSToolbarItem; |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
11 import dstep.appkit.NSWindow; |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
12 import dstep.foundation.NSArray; |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
13 import dstep.foundation.NSDictionary; |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
14 import dstep.foundation.NSNotification; |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
15 import dstep.foundation.NSObjCRuntime; |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
16 import dstep.foundation.NSObject; |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
17 import dstep.foundation.NSString; |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
18 import dstep.objc.bridge.Bridge; |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
19 import dstep.objc.objc; |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
20 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
21 import bindings = dstep.appkit.NSToolbar_bindings; |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
22 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
23 typedef NSUInteger NSToolbarDisplayMode; |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
24 typedef NSUInteger NSToolbarSizeMode; |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
25 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
26 private |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
27 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
28 NSString NSToolbarWillAddItemNotification_; |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
29 NSString NSToolbarDidRemoveItemNotification_; |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
30 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
31 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
32 NSString NSToolbarWillAddItemNotification () |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
33 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
34 if (NSToolbarWillAddItemNotification_) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
35 return NSToolbarWillAddItemNotification_; |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
36 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
37 return NSToolbarWillAddItemNotification_ = new NSString(bindings.NSToolbarWillAddItemNotification); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
38 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
39 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
40 NSString NSToolbarDidRemoveItemNotification () |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
41 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
42 if (NSToolbarDidRemoveItemNotification_) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
43 return NSToolbarDidRemoveItemNotification_; |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
44 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
45 return NSToolbarDidRemoveItemNotification_ = new NSString(bindings.NSToolbarDidRemoveItemNotification); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
46 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
47 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
48 enum : NSUInteger |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
49 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
50 NSToolbarDisplayModeDefault, |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
51 NSToolbarDisplayModeIconAndLabel, |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
52 NSToolbarDisplayModeIconOnly, |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
53 NSToolbarDisplayModeLabelOnly |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
54 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
55 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
56 enum : NSUInteger |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
57 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
58 NSToolbarSizeModeDefault, |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
59 NSToolbarSizeModeRegular, |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
60 NSToolbarSizeModeSmall |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
61 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
62 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
63 class NSToolbar : NSObject |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
64 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
65 mixin (ObjcWrap); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
66 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
67 NSToolbar initWithIdentifier (NSString identifier) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
68 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
69 id result = invokeObjcSelf!(id, "initWithIdentifier:", NSString)(identifier); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
70 return result is this.objcObject ? this : (result !is null ? new NSToolbar(result) : null); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
71 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
72 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
73 this (NSString identifier) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
74 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
75 super(NSToolbar.alloc.initWithIdentifier(identifier).objcObject); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
76 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
77 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
78 void insertItemWithItemIdentifier (NSString itemIdentifier, NSInteger index) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
79 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
80 return invokeObjcSelf!(void, "insertItemWithItemIdentifier:atIndex:", NSString, NSInteger)(itemIdentifier, index); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
81 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
82 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
83 void removeItemAtIndex (NSInteger index) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
84 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
85 return invokeObjcSelf!(void, "removeItemAtIndex:", NSInteger)(index); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
86 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
87 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
88 void setDelegate (Object delegate_) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
89 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
90 return invokeObjcSelf!(void, "setDelegate:", Object)(delegate_); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
91 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
92 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
93 Object delegate_ () |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
94 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
95 return invokeObjcSelf!(Object, "delegate"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
96 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
97 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
98 void setVisible (bool shown) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
99 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
100 return invokeObjcSelf!(void, "setVisible:", bool)(shown); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
101 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
102 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
103 bool isVisible () |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
104 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
105 return invokeObjcSelf!(bool, "isVisible"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
106 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
107 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
108 void runCustomizationPalette (Object sender) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
109 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
110 return invokeObjcSelf!(void, "runCustomizationPalette:", Object)(sender); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
111 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
112 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
113 bool customizationPaletteIsRunning () |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
114 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
115 return invokeObjcSelf!(bool, "customizationPaletteIsRunning"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
116 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
117 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
118 void setDisplayMode (uint displayMode) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
119 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
120 return invokeObjcSelf!(void, "setDisplayMode:", uint)(displayMode); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
121 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
122 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
123 uint displayMode () |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
124 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
125 return invokeObjcSelf!(uint, "displayMode"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
126 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
127 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
128 void setSelectedItemIdentifier (NSString itemIdentifier) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
129 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
130 return invokeObjcSelf!(void, "setSelectedItemIdentifier:", NSString)(itemIdentifier); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
131 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
132 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
133 NSString selectedItemIdentifier () |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
134 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
135 return invokeObjcSelf!(NSString, "selectedItemIdentifier"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
136 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
137 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
138 void setSizeMode (uint sizeMode) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
139 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
140 return invokeObjcSelf!(void, "setSizeMode:", uint)(sizeMode); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
141 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
142 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
143 uint sizeMode () |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
144 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
145 return invokeObjcSelf!(uint, "sizeMode"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
146 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
147 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
148 void setShowsBaselineSeparator (bool flag) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
149 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
150 return invokeObjcSelf!(void, "setShowsBaselineSeparator:", bool)(flag); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
151 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
152 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
153 bool showsBaselineSeparator () |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
154 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
155 return invokeObjcSelf!(bool, "showsBaselineSeparator"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
156 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
157 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
158 void setAllowsUserCustomization (bool allowCustomization) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
159 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
160 return invokeObjcSelf!(void, "setAllowsUserCustomization:", bool)(allowCustomization); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
161 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
162 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
163 bool allowsUserCustomization () |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
164 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
165 return invokeObjcSelf!(bool, "allowsUserCustomization"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
166 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
167 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
168 NSString identifier () |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
169 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
170 return invokeObjcSelf!(NSString, "identifier"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
171 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
172 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
173 NSArray items () |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
174 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
175 return invokeObjcSelf!(NSArray, "items"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
176 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
177 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
178 NSArray visibleItems () |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
179 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
180 return invokeObjcSelf!(NSArray, "visibleItems"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
181 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
182 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
183 void setAutosavesConfiguration (bool flag) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
184 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
185 return invokeObjcSelf!(void, "setAutosavesConfiguration:", bool)(flag); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
186 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
187 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
188 bool autosavesConfiguration () |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
189 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
190 return invokeObjcSelf!(bool, "autosavesConfiguration"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
191 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
192 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
193 void setConfigurationFromDictionary (NSDictionary configDict) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
194 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
195 return invokeObjcSelf!(void, "setConfigurationFromDictionary:", NSDictionary)(configDict); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
196 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
197 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
198 NSDictionary configurationDictionary () |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
199 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
200 return invokeObjcSelf!(NSDictionary, "configurationDictionary"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
201 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
202 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
203 void validateVisibleItems () |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
204 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
205 return invokeObjcSelf!(void, "validateVisibleItems"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
206 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
207 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
208 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
209 const TNSToolbarDelegate = ` |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
210 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
211 NSToolbarItem toolbar (NSToolbar toolbar, NSString itemIdentifier, bool flag) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
212 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
213 return invokeObjcSelf!(NSToolbarItem, "toolbar:itemForItemIdentifier:willBeInsertedIntoToolbar:", NSToolbar, NSString, bool)(toolbar, itemIdentifier, flag); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
214 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
215 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
216 NSArray toolbarDefaultItemIdentifiers (NSToolbar toolbar) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
217 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
218 return invokeObjcSelf!(NSArray, "toolbarDefaultItemIdentifiers:", NSToolbar)(toolbar); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
219 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
220 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
221 NSArray toolbarAllowedItemIdentifiers (NSToolbar toolbar) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
222 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
223 return invokeObjcSelf!(NSArray, "toolbarAllowedItemIdentifiers:", NSToolbar)(toolbar); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
224 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
225 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
226 NSArray toolbarSelectableItemIdentifiers (NSToolbar toolbar) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
227 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
228 return invokeObjcSelf!(NSArray, "toolbarSelectableItemIdentifiers:", NSToolbar)(toolbar); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
229 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
230 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
231 //mixin ObjcBindMethod!(toolbar, "toolbar:itemForItemIdentifier:willBeInsertedIntoToolbar:"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
232 //mixin ObjcBindMethod!(toolbarDefaultItemIdentifiers, "toolbarDefaultItemIdentifiers:"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
233 //mixin ObjcBindMethod!(toolbarAllowedItemIdentifiers, "toolbarAllowedItemIdentifiers:"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
234 //mixin ObjcBindMethod!(toolbarSelectableItemIdentifiers, "toolbarSelectableItemIdentifiers:"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
235 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
236 `; |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
237 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
238 const TNSToolbarNotifications = ` |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
239 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
240 void toolbarWillAddItem (NSNotification notification) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
241 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
242 return invokeObjcSelf!(void, "toolbarWillAddItem:", NSNotification)(notification); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
243 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
244 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
245 void toolbarDidRemoveItem (NSNotification notification) |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
246 { |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
247 return invokeObjcSelf!(void, "toolbarDidRemoveItem:", NSNotification)(notification); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
248 } |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
249 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
250 //mixin ObjcBindMethod!(toolbarWillAddItem, "toolbarWillAddItem:"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
251 //mixin ObjcBindMethod!(toolbarDidRemoveItem, "toolbarDidRemoveItem:"); |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
252 |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
253 `; |
19885b43130e
Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
254 |