comparison dwt/internal/cocoa/NSTableColumn.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.NSTableColumn;
15
16 import dwt.internal.cocoa.id;
17 import dwt.internal.cocoa.NSCell;
18 import dwt.internal.cocoa.NSInteger;
19 import dwt.internal.cocoa.NSObject;
20 import dwt.internal.cocoa.NSSortDescriptor;
21 import dwt.internal.cocoa.NSString;
22 import dwt.internal.cocoa.NSTableHeaderCell;
23 import dwt.internal.cocoa.NSTableView;
24 import dwt.internal.cocoa.OS;
25 import objc = dwt.internal.objc.runtime;
26
27 public class NSTableColumn : NSObject
28 {
29
30 public this ()
31 {
32 super();
33 }
34
35 public this (objc.id id)
36 {
37 super(id);
38 }
39
40 public id dataCell ()
41 {
42 objc.id result = OS.objc_msgSend(this.id, OS.sel_dataCell);
43 return result !is null ? new id(result) : null;
44 }
45
46 public id dataCellForRow (NSInteger row)
47 {
48 objc.id result = OS.objc_msgSend(this.id, OS.sel_dataCellForRow_1, row);
49 return result !is null ? new id(result) : null;
50 }
51
52 public NSTableHeaderCell headerCell ()
53 {
54 objc.id result = OS.objc_msgSend(this.id, OS.sel_headerCell);
55 return result !is null ? new NSTableHeaderCell(result) : null;
56 }
57
58 public NSString headerToolTip ()
59 {
60 objc.id result = OS.objc_msgSend(this.id, OS.sel_headerToolTip);
61 return result !is null ? new NSString(result) : null;
62 }
63
64 public id identifier ()
65 {
66 objc.id result = OS.objc_msgSend(this.id, OS.sel_identifier);
67 return result !is null ? new id(result) : null;
68 }
69
70 public NSTableColumn initWithIdentifier (id identifier)
71 {
72 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithIdentifier_1, identifier !is null ? identifier.id : null);
73 return result !is null ? this : null;
74 }
75
76 public bool isEditable ()
77 {
78 return OS.objc_msgSend(this.id, OS.sel_isEditable) !is null;
79 }
80
81 public bool isHidden ()
82 {
83 return OS.objc_msgSend(this.id, OS.sel_isHidden) !is null;
84 }
85
86 public bool isResizable ()
87 {
88 return OS.objc_msgSend(this.id, OS.sel_isResizable) !is null;
89 }
90
91 public CGFloat maxWidth ()
92 {
93 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_maxWidth);
94 }
95
96 public CGFloat minWidth ()
97 {
98 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_minWidth);
99 }
100
101 public NSUInteger resizingMask ()
102 {
103 return cast(NSUInteger) OS.objc_msgSend(this.id, OS.sel_resizingMask);
104 }
105
106 public void setDataCell (NSCell cell)
107 {
108 OS.objc_msgSend(this.id, OS.sel_setDataCell_1, cell !is null ? cell.id : null);
109 }
110
111 public void setEditable (bool flag)
112 {
113 OS.objc_msgSend(this.id, OS.sel_setEditable_1, flag);
114 }
115
116 public void setHeaderCell (NSCell cell)
117 {
118 OS.objc_msgSend(this.id, OS.sel_setHeaderCell_1, cell !is null ? cell.id : null);
119 }
120
121 public void setHeaderToolTip (NSString string)
122 {
123 OS.objc_msgSend(this.id, OS.sel_setHeaderToolTip_1, string !is null ? string.id : null);
124 }
125
126 public void setHidden (bool hidden)
127 {
128 OS.objc_msgSend(this.id, OS.sel_setHidden_1, hidden);
129 }
130
131 public void setIdentifier (id identifier)
132 {
133 OS.objc_msgSend(this.id, OS.sel_setIdentifier_1, identifier !is null ? identifier.id : null);
134 }
135
136 public void setMaxWidth (CGFloat maxWidth)
137 {
138 OS.objc_msgSend(this.id, OS.sel_setMaxWidth_1, maxWidth);
139 }
140
141 public void setMinWidth (CGFloat minWidth)
142 {
143 OS.objc_msgSend(this.id, OS.sel_setMinWidth_1, minWidth);
144 }
145
146 public void setResizable (bool flag)
147 {
148 OS.objc_msgSend(this.id, OS.sel_setResizable_1, flag);
149 }
150
151 public void setResizingMask (NSUInteger resizingMask)
152 {
153 OS.objc_msgSend(this.id, OS.sel_setResizingMask_1, resizingMask);
154 }
155
156 public void setSortDescriptorPrototype (NSSortDescriptor sortDescriptor)
157 {
158 OS.objc_msgSend(this.id, OS.sel_setSortDescriptorPrototype_1, sortDescriptor !is null ? sortDescriptor.id : null);
159 }
160
161 public void setTableView (NSTableView tableView)
162 {
163 OS.objc_msgSend(this.id, OS.sel_setTableView_1, tableView !is null ? tableView.id : null);
164 }
165
166 public void setWidth (CGFloat width)
167 {
168 OS.objc_msgSend(this.id, OS.sel_setWidth_1, width);
169 }
170
171 public void sizeToFit ()
172 {
173 OS.objc_msgSend(this.id, OS.sel_sizeToFit);
174 }
175
176 public NSSortDescriptor sortDescriptorPrototype ()
177 {
178 objc.id result = OS.objc_msgSend(this.id, OS.sel_sortDescriptorPrototype);
179 return result !is null ? new NSSortDescriptor(result) : null;
180 }
181
182 public NSTableView tableView ()
183 {
184 objc.id result = OS.objc_msgSend(this.id, OS.sel_tableView);
185 return result !is null ? new NSTableView(result) : null;
186 }
187
188 public CGFloat width ()
189 {
190 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_width);
191 }
192
193 }