Mercurial > projects > dwt-mac
comparison dwt/internal/cocoa/NSLevelIndicator.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.NSLevelIndicator; | |
15 | |
16 import dwt.internal.cocoa.NSControl; | |
17 import dwt.internal.cocoa.NSInteger; | |
18 import dwt.internal.cocoa.NSRect; | |
19 import dwt.internal.cocoa.NSSliderCell : NSTickMarkPosition; | |
20 import dwt.internal.cocoa.OS; | |
21 import objc = dwt.internal.objc.runtime; | |
22 | |
23 public class NSLevelIndicator : NSControl | |
24 { | |
25 | |
26 public this () | |
27 { | |
28 super(); | |
29 } | |
30 | |
31 public this (objc.id id) | |
32 { | |
33 super(id); | |
34 } | |
35 | |
36 public double criticalValue () | |
37 { | |
38 return OS.objc_msgSend_fpret(this.id, OS.sel_criticalValue); | |
39 } | |
40 | |
41 public double maxValue () | |
42 { | |
43 return OS.objc_msgSend_fpret(this.id, OS.sel_maxValue); | |
44 } | |
45 | |
46 public double minValue () | |
47 { | |
48 return OS.objc_msgSend_fpret(this.id, OS.sel_minValue); | |
49 } | |
50 | |
51 public NSInteger numberOfMajorTickMarks () | |
52 { | |
53 return OS.objc_msgSend(this.id, OS.sel_numberOfMajorTickMarks); | |
54 } | |
55 | |
56 public NSInteger numberOfTickMarks () | |
57 { | |
58 return OS.objc_msgSend(this.id, OS.sel_numberOfTickMarks); | |
59 } | |
60 | |
61 public NSRect rectOfTickMarkAtIndex (NSInteger index) | |
62 { | |
63 NSRect result; | |
64 OS.objc_msgSend_stret(result, this.id, OS.sel_rectOfTickMarkAtIndex_1, index); | |
65 return result; | |
66 } | |
67 | |
68 public void setCriticalValue (double criticalValue) | |
69 { | |
70 OS.objc_msgSend(this.id, OS.sel_setCriticalValue_1, criticalValue); | |
71 } | |
72 | |
73 public void setMaxValue (double maxValue) | |
74 { | |
75 OS.objc_msgSend(this.id, OS.sel_setMaxValue_1, maxValue); | |
76 } | |
77 | |
78 public void setMinValue (double minValue) | |
79 { | |
80 OS.objc_msgSend(this.id, OS.sel_setMinValue_1, minValue); | |
81 } | |
82 | |
83 public void setNumberOfMajorTickMarks (NSInteger count) | |
84 { | |
85 OS.objc_msgSend(this.id, OS.sel_setNumberOfMajorTickMarks_1, count); | |
86 } | |
87 | |
88 public void setNumberOfTickMarks (NSInteger count) | |
89 { | |
90 OS.objc_msgSend(this.id, OS.sel_setNumberOfTickMarks_1, count); | |
91 } | |
92 | |
93 public void setTickMarkPosition (NSTickMarkPosition position) | |
94 { | |
95 OS.objc_msgSend(this.id, OS.sel_setTickMarkPosition_1, position); | |
96 } | |
97 | |
98 public void setWarningValue (double warningValue) | |
99 { | |
100 OS.objc_msgSend(this.id, OS.sel_setWarningValue_1, warningValue); | |
101 } | |
102 | |
103 public NSTickMarkPosition tickMarkPosition () | |
104 { | |
105 return OS.objc_msgSend(this.id, OS.sel_tickMarkPosition); | |
106 } | |
107 | |
108 public double tickMarkValueAtIndex (NSInteger index) | |
109 { | |
110 return OS.objc_msgSend_fpret(this.id, OS.sel_tickMarkValueAtIndex_1, index); | |
111 } | |
112 | |
113 public double warningValue () | |
114 { | |
115 return OS.objc_msgSend_fpret(this.id, OS.sel_warningValue); | |
116 } | |
117 | |
118 } |