Mercurial > projects > dwt-mac
comparison dwt/internal/cocoa/NSLevelIndicatorCell.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.NSLevelIndicatorCell; | |
15 | |
16 import dwt.internal.cocoa.id; | |
17 import dwt.internal.cocoa.NSActionCell; | |
18 import dwt.internal.cocoa.NSImage; | |
19 import dwt.internal.cocoa.NSInteger; | |
20 import dwt.internal.cocoa.NSRect; | |
21 import dwt.internal.cocoa.NSSliderCell : NSTickMarkPosition; | |
22 import dwt.internal.cocoa.OS; | |
23 import objc = dwt.internal.objc.runtime; | |
24 | |
25 alias NSUInteger NSLevelIndicatorStyle;; | |
26 | |
27 public class NSLevelIndicatorCell : NSActionCell | |
28 { | |
29 | |
30 public this () | |
31 { | |
32 super(); | |
33 } | |
34 | |
35 public this (objc.id id) | |
36 { | |
37 super(id); | |
38 } | |
39 | |
40 public double criticalValue () | |
41 { | |
42 return OS.objc_msgSend_fpret(this.id, OS.sel_criticalValue); | |
43 } | |
44 | |
45 public id initWithLevelIndicatorStyle (NSLevelIndicatorStyle levelIndicatorStyle) | |
46 { | |
47 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithLevelIndicatorStyle_1, levelIndicatorStyle); | |
48 return result !is null ? new id(result) : null; | |
49 } | |
50 | |
51 public NSLevelIndicatorStyle levelIndicatorStyle () | |
52 { | |
53 return OS.objc_msgSend(this.id, OS.sel_levelIndicatorStyle); | |
54 } | |
55 | |
56 public double maxValue () | |
57 { | |
58 return OS.objc_msgSend_fpret(this.id, OS.sel_maxValue); | |
59 } | |
60 | |
61 public double minValue () | |
62 { | |
63 return OS.objc_msgSend_fpret(this.id, OS.sel_minValue); | |
64 } | |
65 | |
66 public NSInteger numberOfMajorTickMarks () | |
67 { | |
68 return OS.objc_msgSend(this.id, OS.sel_numberOfMajorTickMarks); | |
69 } | |
70 | |
71 public NSInteger numberOfTickMarks () | |
72 { | |
73 return OS.objc_msgSend(this.id, OS.sel_numberOfTickMarks); | |
74 } | |
75 | |
76 public NSRect rectOfTickMarkAtIndex (NSInteger index) | |
77 { | |
78 NSRect result; | |
79 OS.objc_msgSend_stret(result, this.id, OS.sel_rectOfTickMarkAtIndex_1, index); | |
80 return result; | |
81 } | |
82 | |
83 public void setCriticalValue (double criticalValue) | |
84 { | |
85 OS.objc_msgSend(this.id, OS.sel_setCriticalValue_1, criticalValue); | |
86 } | |
87 | |
88 public void setImage (NSImage image) | |
89 { | |
90 OS.objc_msgSend(this.id, OS.sel_setImage_1, image !is null ? image.id : null); | |
91 } | |
92 | |
93 public void setLevelIndicatorStyle (NSLevelIndicatorStyle levelIndicatorStyle) | |
94 { | |
95 OS.objc_msgSend(this.id, OS.sel_setLevelIndicatorStyle_1, levelIndicatorStyle); | |
96 } | |
97 | |
98 public void setMaxValue (double maxValue) | |
99 { | |
100 OS.objc_msgSend(this.id, OS.sel_setMaxValue_1, maxValue); | |
101 } | |
102 | |
103 public void setMinValue (double minValue) | |
104 { | |
105 OS.objc_msgSend(this.id, OS.sel_setMinValue_1, minValue); | |
106 } | |
107 | |
108 public void setNumberOfMajorTickMarks (NSInteger count) | |
109 { | |
110 OS.objc_msgSend(this.id, OS.sel_setNumberOfMajorTickMarks_1, count); | |
111 } | |
112 | |
113 public void setNumberOfTickMarks (NSInteger count) | |
114 { | |
115 OS.objc_msgSend(this.id, OS.sel_setNumberOfTickMarks_1, count); | |
116 } | |
117 | |
118 public void setTickMarkPosition (NSTickMarkPosition position) | |
119 { | |
120 OS.objc_msgSend(this.id, OS.sel_setTickMarkPosition_1, position); | |
121 } | |
122 | |
123 public void setWarningValue (double warningValue) | |
124 { | |
125 OS.objc_msgSend(this.id, OS.sel_setWarningValue_1, warningValue); | |
126 } | |
127 | |
128 public NSTickMarkPosition tickMarkPosition () | |
129 { | |
130 return OS.objc_msgSend(this.id, OS.sel_tickMarkPosition); | |
131 } | |
132 | |
133 public double tickMarkValueAtIndex (NSInteger index) | |
134 { | |
135 return OS.objc_msgSend_fpret(this.id, OS.sel_tickMarkValueAtIndex_1, index); | |
136 } | |
137 | |
138 public double warningValue () | |
139 { | |
140 return OS.objc_msgSend_fpret(this.id, OS.sel_warningValue); | |
141 } | |
142 | |
143 } |