comparison dstep/appkit/NSProgressIndicator.d @ 16:19885b43130e

Huge update, the bridge actually works now
author Jacob Carlborg <doob@me.com>
date Sun, 03 Jan 2010 22:06:11 +0100
parents
children b9de51448c6b
comparison
equal deleted inserted replaced
15:7ff919f595d5 16:19885b43130e
1 /**
2 * Copyright: Copyright (c) 2009 Jacob Carlborg.
3 * Authors: Jacob Carlborg
4 * Version: Initial created: Sep 24, 2009
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
6 */
7 module dstep.appkit.NSProgressIndicator;
8
9 import dstep.appkit.NSCell;
10 import dstep.appkit.NSView;
11 import dstep.foundation.NSDate;
12 import dstep.foundation.NSObjCRuntime;
13 import dstep.objc.bridge.Bridge;
14 import dstep.objc.objc;
15
16 struct __NSProgressIndicatorThreadInfo;
17
18 alias __NSProgressIndicatorThreadInfo _NSProgressIndicatorThreadInfo;
19 typedef NSUInteger NSProgressIndicatorThickness;
20 typedef NSUInteger NSProgressIndicatorStyle;
21
22 enum
23 {
24 NSProgressIndicatorPreferredThickness = 14,
25 NSProgressIndicatorPreferredSmallThickness = 10,
26 NSProgressIndicatorPreferredLargeThickness = 18,
27 NSProgressIndicatorPreferredAquaThickness = 12
28 }
29
30 enum
31 {
32 NSProgressIndicatorBarStyle = 0,
33 NSProgressIndicatorSpinningStyle = 1
34 }
35
36 class NSProgressIndicator : NSView
37 {
38 mixin (ObjcWrap);
39
40 bool isIndeterminate ()
41 {
42 return invokeObjcSelf!(bool, "isIndeterminate");
43 }
44
45 void setIndeterminate (bool flag)
46 {
47 return invokeObjcSelf!(void, "setIndeterminate:", bool)(flag);
48 }
49
50 bool isBezeled ()
51 {
52 return invokeObjcSelf!(bool, "isBezeled");
53 }
54
55 void setBezeled (bool flag)
56 {
57 return invokeObjcSelf!(void, "setBezeled:", bool)(flag);
58 }
59
60 uint controlTint ()
61 {
62 return invokeObjcSelf!(uint, "controlTint");
63 }
64
65 void setControlTint (uint tint)
66 {
67 return invokeObjcSelf!(void, "setControlTint:", uint)(tint);
68 }
69
70 uint controlSize ()
71 {
72 return invokeObjcSelf!(uint, "controlSize");
73 }
74
75 void setControlSize (uint size)
76 {
77 return invokeObjcSelf!(void, "setControlSize:", uint)(size);
78 }
79
80 double doubleValue ()
81 {
82 return invokeObjcSelf!(double, "doubleValue");
83 }
84
85 void setDoubleValue (double doubleValue)
86 {
87 return invokeObjcSelf!(void, "setDoubleValue:", double)(doubleValue);
88 }
89
90 void incrementBy (double delta)
91 {
92 return invokeObjcSelf!(void, "incrementBy:", double)(delta);
93 }
94
95 double minValue ()
96 {
97 return invokeObjcSelf!(double, "minValue");
98 }
99
100 double maxValue ()
101 {
102 return invokeObjcSelf!(double, "maxValue");
103 }
104
105 void setMinValue (double newMinimum)
106 {
107 return invokeObjcSelf!(void, "setMinValue:", double)(newMinimum);
108 }
109
110 void setMaxValue (double newMaximum)
111 {
112 return invokeObjcSelf!(void, "setMaxValue:", double)(newMaximum);
113 }
114
115 double animationDelay ()
116 {
117 return invokeObjcSelf!(double, "animationDelay");
118 }
119
120 void setAnimationDelay (double delay)
121 {
122 return invokeObjcSelf!(void, "setAnimationDelay:", double)(delay);
123 }
124
125 bool usesThreadedAnimation ()
126 {
127 return invokeObjcSelf!(bool, "usesThreadedAnimation");
128 }
129
130 void setUsesThreadedAnimation (bool threadedAnimation)
131 {
132 return invokeObjcSelf!(void, "setUsesThreadedAnimation:", bool)(threadedAnimation);
133 }
134
135 void startAnimation (Object sender)
136 {
137 return invokeObjcSelf!(void, "startAnimation:", Object)(sender);
138 }
139
140 void stopAnimation (Object sender)
141 {
142 return invokeObjcSelf!(void, "stopAnimation:", Object)(sender);
143 }
144
145 void animate (Object sender)
146 {
147 return invokeObjcSelf!(void, "animate:", Object)(sender);
148 }
149
150 void setStyle (uint style)
151 {
152 return invokeObjcSelf!(void, "setStyle:", uint)(style);
153 }
154
155 uint style ()
156 {
157 return invokeObjcSelf!(uint, "style");
158 }
159
160 void sizeToFit ()
161 {
162 return invokeObjcSelf!(void, "sizeToFit");
163 }
164
165 bool isDisplayedWhenStopped ()
166 {
167 return invokeObjcSelf!(bool, "isDisplayedWhenStopped");
168 }
169
170 void setDisplayedWhenStopped (bool isDisplayed)
171 {
172 return invokeObjcSelf!(void, "setDisplayedWhenStopped:", bool)(isDisplayed);
173 }
174 }
175