comparison dstep/appkit/NSDictionaryController.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 f8a3b67adfcb
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.NSDictionaryController;
8
9 import dstep.appkit.NSArrayController;
10 import dstep.foundation.NSArray;
11 import dstep.foundation.NSDictionary;
12 import dstep.foundation.NSString;
13 import dstep.objc.bridge.Bridge;
14 import dstep.objc.objc;
15
16 class NSDictionaryController : NSArrayController
17 {
18 mixin (ObjcWrap);
19
20 Object newObject ()
21 {
22 return invokeObjcSelf!(Object, "newObject");
23 }
24
25 void setInitialKey (NSString key)
26 {
27 return invokeObjcSelf!(void, "setInitialKey:", NSString)(key);
28 }
29
30 NSDictionaryController initialKey ()
31 {
32 id result = invokeObjcSelf!(id, "initialKey");
33 return result is this.objcObject ? this : (result !is null ? new NSDictionaryController(result) : null);
34 }
35
36 this ()
37 {
38 super(NSDictionaryController.alloc.initialKey.objcObject);
39 }
40
41 void setInitialValue (Object value)
42 {
43 return invokeObjcSelf!(void, "setInitialValue:", Object)(value);
44 }
45
46 NSDictionaryController initialValue ()
47 {
48 id result = invokeObjcSelf!(id, "initialValue");
49 return result is this.objcObject ? this : (result !is null ? new NSDictionaryController(result) : null);
50 }
51
52 this ()
53 {
54 super(NSDictionaryController.alloc.initialValue.objcObject);
55 }
56
57 void setIncludedKeys (NSArray keys)
58 {
59 return invokeObjcSelf!(void, "setIncludedKeys:", NSArray)(keys);
60 }
61
62 NSArray includedKeys ()
63 {
64 return invokeObjcSelf!(NSArray, "includedKeys");
65 }
66
67 void setExcludedKeys (NSArray keys)
68 {
69 return invokeObjcSelf!(void, "setExcludedKeys:", NSArray)(keys);
70 }
71
72 NSArray excludedKeys ()
73 {
74 return invokeObjcSelf!(NSArray, "excludedKeys");
75 }
76
77 void setLocalizedKeyDictionary (NSDictionary dictionary)
78 {
79 return invokeObjcSelf!(void, "setLocalizedKeyDictionary:", NSDictionary)(dictionary);
80 }
81
82 NSDictionary localizedKeyDictionary ()
83 {
84 return invokeObjcSelf!(NSDictionary, "localizedKeyDictionary");
85 }
86
87 void setLocalizedKeyTable (NSString stringsFileName)
88 {
89 return invokeObjcSelf!(void, "setLocalizedKeyTable:", NSString)(stringsFileName);
90 }
91
92 NSString localizedKeyTable ()
93 {
94 return invokeObjcSelf!(NSString, "localizedKeyTable");
95 }
96 }
97
98 const TNSDictionaryControllerKeyValuePair = `
99
100 void setLocalizedKey (NSString localizedKey)
101 {
102 return invokeObjcSelf!(void, "setLocalizedKey:", NSString)(localizedKey);
103 }
104
105 NSString localizedKey ()
106 {
107 return invokeObjcSelf!(NSString, "localizedKey");
108 }
109
110 void setKey (NSString key)
111 {
112 return invokeObjcSelf!(void, "setKey:", NSString)(key);
113 }
114
115 NSString key ()
116 {
117 return invokeObjcSelf!(NSString, "key");
118 }
119
120 void setValue (Object value)
121 {
122 return invokeObjcSelf!(void, "setValue:", Object)(value);
123 }
124
125 Object value ()
126 {
127 return invokeObjcSelf!(Object, "value");
128 }
129
130 bool isExplicitlyIncluded ()
131 {
132 return invokeObjcSelf!(bool, "isExplicitlyIncluded");
133 }
134
135 //mixin ObjcBindMethod!(setLocalizedKey, "setLocalizedKey:");
136 //mixin ObjcBindMethod!(localizedKey, "localizedKey");
137 //mixin ObjcBindMethod!(setKey, "setKey:");
138 //mixin ObjcBindMethod!(key, "key");
139 //mixin ObjcBindMethod!(setValue, "setValue:");
140 //mixin ObjcBindMethod!(value, "value");
141 //mixin ObjcBindMethod!(isExplicitlyIncluded, "isExplicitlyIncluded");
142
143 `;
144