Mercurial > projects > dwt-mac
comparison dwt/internal/cocoa/NSPredicateEditorRowTemplate.d @ 0:380af2bdd8e5
Upload of whole dwt tree
author | Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com> |
---|---|
date | Sat, 09 Aug 2008 17:00:02 +0200 |
parents | |
children | 8b48be5454ce |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:380af2bdd8e5 |
---|---|
1 /******************************************************************************* | |
2 * Copyright (c) 2007 IBM Corporation and others. | |
3 * All rights reserved. This program and the accompanying materials | |
4 * are made available under the terms of the Eclipse Public License v1.0 | |
5 * which accompanies this distribution, and is available at | |
6 * http://www.eclipse.org/legal/epl-v10.html | |
7 * | |
8 * Contributors: | |
9 * IBM Corporation - initial API and implementation | |
10 * | |
11 * Port to the D Programming language: | |
12 * Jacob Carlborg <jacob.carlborg@gmail.com> | |
13 *******************************************************************************/ | |
14 module dwt.internal.cocoa.NSPredicateEditorRowTemplate; | |
15 | |
16 import dwt.internal.cocoa.NSArray; | |
17 import dwt.internal.cocoa.NSAttributeType; | |
18 import dwt.internal.cocoa.NSComparisonPredicate : NSComparisonPredicateModifier; | |
19 import dwt.internal.cocoa.NSInteger; | |
20 import dwt.internal.cocoa.NSObject; | |
21 import dwt.internal.cocoa.NSPredicate; | |
22 import dwt.internal.cocoa.OS; | |
23 import objc = dwt.internal.objc.runtime; | |
24 | |
25 public class NSPredicateEditorRowTemplate : NSObject | |
26 { | |
27 | |
28 public this () | |
29 { | |
30 super(); | |
31 } | |
32 | |
33 public this (objc.id id) | |
34 { | |
35 super(id); | |
36 } | |
37 | |
38 public NSArray compoundTypes () | |
39 { | |
40 objc.id result = OS.objc_msgSend(this.id, OS.sel_compoundTypes); | |
41 return result !is null ? new NSArray(result) : null; | |
42 } | |
43 | |
44 public NSArray displayableSubpredicatesOfPredicate (NSPredicate predicate) | |
45 { | |
46 objc.id result = OS.objc_msgSend(this.id, OS.sel_displayableSubpredicatesOfPredicate_1, predicate !is null ? predicate.id : null); | |
47 return result !is null ? new NSArray(result) : null; | |
48 } | |
49 | |
50 public id initWithCompoundTypes (NSArray compoundTypes) | |
51 { | |
52 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithCompoundTypes_1, compoundTypes !is null ? compoundTypes.id : null); | |
53 return result !is null ? new id(result) : null; | |
54 } | |
55 | |
56 public id initWithLeftExpressions_rightExpressionAttributeType_modifier_operators_options_ (NSArray leftExpressions, | |
57 NSAttributeType attributeType, NSComparisonPredicateModifier modifier, NSArray operators, NSUInteger options) | |
58 { | |
59 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithLeftExpressions_1rightExpressionAttributeType_1modifier_1operators_1options_1, | |
60 leftExpressions !is null ? leftExpressions.id : null, attributeType, modifier, operators !is null ? operators.id : null, options); | |
61 return result !is null ? new id(result) : null; | |
62 } | |
63 | |
64 public id initWithLeftExpressions_rightExpressions_modifier_operators_options_ (NSArray leftExpressions, NSArray rightExpressions, NSComparisonPredicateModifier modifier, | |
65 NSArray operators, NSUInteger options) | |
66 { | |
67 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithLeftExpressions_1rightExpressions_1modifier_1operators_1options_1, | |
68 leftExpressions !is null ? leftExpressions.id : null, rightExpressions !is null ? rightExpressions.id : null, modifier, | |
69 operators !is null ? operators.id : null, options); | |
70 return result !is null ? new id(result) : null; | |
71 } | |
72 | |
73 public NSArray leftExpressions () | |
74 { | |
75 objc.id result = OS.objc_msgSend(this.id, OS.sel_leftExpressions); | |
76 return result !is null ? new NSArray(result) : null; | |
77 } | |
78 | |
79 public double matchForPredicate (NSPredicate predicate) | |
80 { | |
81 return OS.objc_msgSend_fpret(this.id, OS.sel_matchForPredicate_1, predicate !is null ? predicate.id : null); | |
82 } | |
83 | |
84 public NSComparisonPredicateModifier modifier () | |
85 { | |
86 return OS.objc_msgSend(this.id, OS.sel_modifier); | |
87 } | |
88 | |
89 public NSArray operators () | |
90 { | |
91 objc.id result = OS.objc_msgSend(this.id, OS.sel_operators); | |
92 return result !is null ? new NSArray(result) : null; | |
93 } | |
94 | |
95 public NSUInteger options () | |
96 { | |
97 return OS.objc_msgSend(this.id, OS.sel_options); | |
98 } | |
99 | |
100 public NSPredicate predicateWithSubpredicates (NSArray subpredicates) | |
101 { | |
102 objc.id result = OS.objc_msgSend(this.id, OS.sel_predicateWithSubpredicates_1, subpredicates !is null ? subpredicates.id : null); | |
103 return result !is null ? new NSPredicate(result) : null; | |
104 } | |
105 | |
106 public NSAttributeType rightExpressionAttributeType () | |
107 { | |
108 return OS.objc_msgSend(this.id, OS.sel_rightExpressionAttributeType); | |
109 } | |
110 | |
111 public NSArray rightExpressions () | |
112 { | |
113 objc.id result = OS.objc_msgSend(this.id, OS.sel_rightExpressions); | |
114 return result !is null ? new NSArray(result) : null; | |
115 } | |
116 | |
117 public void setPredicate (NSPredicate predicate) | |
118 { | |
119 OS.objc_msgSend(this.id, OS.sel_setPredicate_1, predicate !is null ? predicate.id : null); | |
120 } | |
121 | |
122 public NSArray templateViews () | |
123 { | |
124 objc.id result = OS.objc_msgSend(this.id, OS.sel_templateViews); | |
125 return result !is null ? new NSArray(result) : null; | |
126 } | |
127 | |
128 //public static NSArray templatesWithAttributeKeyPaths(NSArray keyPaths, NSEntityDescription entityDescription) { | |
129 // objc.id result = OS.objc_msgSend(OS.class_NSPredicateEditorRowTemplate, OS.sel_templatesWithAttributeKeyPaths_1inEntityDescription_1, keyPaths !is null ? keyPaths.id : null, entityDescription !is null ? entityDescription.id : null); | |
130 // return result !is null ? new NSArray(result) : null; | |
131 //} | |
132 | |
133 } |