comparison dwt/internal/cocoa/NSStepper.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.NSStepper;
15
16 import dwt.internal.cocoa.NSControl;
17 import dwt.internal.cocoa.OS;
18 import objc = dwt.internal.objc.runtime;
19
20 public class NSStepper : NSControl
21 {
22
23 public this ()
24 {
25 super();
26 }
27
28 public this (objc.id id)
29 {
30 super(id);
31 }
32
33 public bool autorepeat ()
34 {
35 return OS.objc_msgSend(this.id, OS.sel_autorepeat) !is null;
36 }
37
38 public double increment ()
39 {
40 return OS.objc_msgSend_fpret(this.id, OS.sel_increment);
41 }
42
43 public double maxValue ()
44 {
45 return OS.objc_msgSend_fpret(this.id, OS.sel_maxValue);
46 }
47
48 public double minValue ()
49 {
50 return OS.objc_msgSend_fpret(this.id, OS.sel_minValue);
51 }
52
53 public void setAutorepeat (bool autorepeat)
54 {
55 OS.objc_msgSend(this.id, OS.sel_setAutorepeat_1, autorepeat);
56 }
57
58 public void setIncrement (double increment)
59 {
60 OS.objc_msgSend(this.id, OS.sel_setIncrement_1, increment);
61 }
62
63 public void setMaxValue (double maxValue)
64 {
65 OS.objc_msgSend(this.id, OS.sel_setMaxValue_1, maxValue);
66 }
67
68 public void setMinValue (double minValue)
69 {
70 OS.objc_msgSend(this.id, OS.sel_setMinValue_1, minValue);
71 }
72
73 public void setValueWraps (bool valueWraps)
74 {
75 OS.objc_msgSend(this.id, OS.sel_setValueWraps_1, valueWraps);
76 }
77
78 public bool valueWraps ()
79 {
80 return OS.objc_msgSend(this.id, OS.sel_valueWraps) !is null;
81 }
82
83 }