ruby-iup 0.0.1-i386-mswin32 → 0.0.2-i386-mswin32
Sign up to get free protection for your applications and to get access to all the features.
- data/examples/ctrl/degrade.rb +5 -2
- data/examples/ctrl/iupgauge.rb +5 -5
- data/examples/ctrl/iupplot2.rb +2 -5
- data/examples/dlg/iupalarm.rb +3 -1
- data/examples/elem/iupbutton.rb +42 -59
- data/examples/elem/iupcanvas.rb +4 -2
- data/examples/elem/iupcanvas2.rb +9 -8
- data/examples/elem/iupcanvas3.rb +19 -29
- data/examples/elem/iupdialog.rb +3 -7
- data/examples/elem/progressbar.rb +104 -118
- data/ext/iup-win32/cd.dll +0 -0
- data/ext/iup-win32/cd.lib +0 -0
- data/ext/iup-win32/cdcontextplus.dll +0 -0
- data/ext/iup-win32/cdcontextplus.lib +0 -0
- data/ext/iup-win32/cdpdf.dll +0 -0
- data/ext/iup-win32/cdpdf.lib +0 -0
- data/ext/iup-win32/freetype6.dll +0 -0
- data/ext/iup-win32/freetype6.lib +0 -0
- data/ext/iup-win32/im.dll +0 -0
- data/ext/iup-win32/im.lib +0 -0
- data/ext/iup-win32/im_avi.dll +0 -0
- data/ext/iup-win32/im_avi.lib +0 -0
- data/ext/iup-win32/im_capture.dll +0 -0
- data/ext/iup-win32/im_capture.lib +0 -0
- data/ext/iup-win32/im_fftw.dll +0 -0
- data/ext/iup-win32/im_fftw.lib +0 -0
- data/ext/iup-win32/im_jp2.dll +0 -0
- data/ext/iup-win32/im_jp2.lib +0 -0
- data/ext/iup-win32/im_process.dll +0 -0
- data/ext/iup-win32/im_process.lib +0 -0
- data/ext/iup-win32/im_wmv.dll +0 -0
- data/ext/iup-win32/im_wmv.lib +0 -0
- data/ext/iup-win32/imlua_capture51.dll +0 -0
- data/ext/iup-win32/imlua_capture51.lib +0 -0
- data/ext/iup-win32/imlua_wmv51.dll +0 -0
- data/ext/iup-win32/imlua_wmv51.lib +0 -0
- data/ext/iup-win32/iup.dll +0 -0
- data/ext/iup-win32/iup.lib +0 -0
- data/ext/iup-win32/iup_pplot.dll +0 -0
- data/ext/iup-win32/iup_pplot.lib +0 -0
- data/ext/iup-win32/iupcd.dll +0 -0
- data/ext/iup-win32/iupcd.lib +0 -0
- data/ext/iup-win32/iupcontrols.dll +0 -0
- data/ext/iup-win32/iupcontrols.lib +0 -0
- data/ext/iup-win32/iupgl.dll +0 -0
- data/ext/iup-win32/iupgl.lib +0 -0
- data/ext/iup-win32/iupgtk.dll +0 -0
- data/ext/iup-win32/iupgtk.lib +0 -0
- data/ext/iup-win32/iupim.dll +0 -0
- data/ext/iup-win32/iupim.lib +0 -0
- data/ext/iup-win32/iupimglib.dll +0 -0
- data/ext/iup-win32/iupimglib.lib +0 -0
- data/ext/iup-win32/iupole.dll +0 -0
- data/ext/iup-win32/iupole.lib +0 -0
- data/ext/iup-win32/iupstub.lib +0 -0
- data/ext/iup-win32/pdflib.dll +0 -0
- data/ext/iup-win32/pdflib.lib +0 -0
- data/ext/iup.c +3 -351
- data/ext/rb_iup.h +48 -15
- data/ext/rb_iupcb.h +1 -0
- data/ext/rb_iupcells.h +1 -0
- data/ext/rb_iupcolorbar.h +1 -4
- data/ext/rb_iupcontrols.h +0 -5
- data/ext/rb_iupdial.h +1 -0
- data/ext/rb_iupgauge.h +1 -0
- data/ext/rb_iupgc.h +0 -1
- data/ext/rb_iupmatrix.h +1 -0
- data/ext/rb_iupsbox.h +0 -1
- data/ext/rb_iuptabs.h +1 -0
- data/ext/rb_iuptree.h +1 -0
- data/ext/rb_iupval.h +1 -0
- data/lib/iup.so +0 -0
- metadata +15 -16
- data/ext/iup-win32/cdlua51.lib +0 -0
- data/ext/iup-win32/cdluacontextplus51.lib +0 -0
- data/ext/iup-win32/cdluaim51.lib +0 -0
- data/ext/iup-win32/cdluapdf51.lib +0 -0
- data/ext/iup-win32/iuplua51.lib +0 -0
- data/ext/iup-win32/iuplua_pplot51.lib +0 -0
- data/ext/iup-win32/iupluacd51.lib +0 -0
- data/ext/iup-win32/iupluacontrols51.lib +0 -0
- data/ext/iup-win32/iupluagl51.lib +0 -0
- data/ext/iup-win32/iupluaim51.lib +0 -0
- data/ext/iup-win32/iupluaimglib51.lib +0 -0
- data/ext/iup-win32/iupluaole51.lib +0 -0
- data/ext/rb_iupcbox.h +0 -40
- data/ext/rb_iupspeech.h +0 -25
@@ -1,11 +1,9 @@
|
|
1
1
|
require 'rubygems'
|
2
|
-
require '
|
2
|
+
require 'iup'
|
3
3
|
|
4
|
-
|
4
|
+
@increment = 0.01
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
$pixmap_play = [
|
6
|
+
@pixmap_play = [
|
9
7
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
10
8
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
11
9
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
@@ -29,7 +27,7 @@ $pixmap_play = [
|
|
29
27
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
30
28
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2]
|
31
29
|
|
32
|
-
|
30
|
+
@pixmap_restart = [
|
33
31
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
34
32
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
35
33
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
@@ -53,7 +51,7 @@ $pixmap_restart = [
|
|
53
51
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
54
52
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2]
|
55
53
|
|
56
|
-
|
54
|
+
@pixmap_rewind = [
|
57
55
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
58
56
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
59
57
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
@@ -77,7 +75,7 @@ $pixmap_rewind = [
|
|
77
75
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
78
76
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2]
|
79
77
|
|
80
|
-
|
78
|
+
@pixmap_forward = [
|
81
79
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
82
80
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
83
81
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
@@ -101,7 +99,7 @@ $pixmap_forward = [
|
|
101
99
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
102
100
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2]
|
103
101
|
|
104
|
-
|
102
|
+
@pixmap_pause = [
|
105
103
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
106
104
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
107
105
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
@@ -126,169 +124,157 @@ $pixmap_pause = [
|
|
126
124
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2]
|
127
125
|
|
128
126
|
def createimg_s()
|
129
|
-
img_restart = Iup.Image(22,22,
|
130
|
-
img_play = Iup.Image(22,22,
|
131
|
-
img_forward = Iup.Image(22,22,
|
132
|
-
img_rewind = Iup.Image(22,22,
|
133
|
-
img_pause = Iup.Image(22,22,
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
Iup.SetAttribute(img_forward, "1", "0 0 0")
|
146
|
-
Iup.SetAttribute(img_forward, "2", "BGCOLOR")
|
147
|
-
Iup.SetAttribute(img_rewind, "1", "0 0 0")
|
148
|
-
Iup.SetAttribute(img_rewind, "2", "BGCOLOR")
|
149
|
-
Iup.SetAttribute(img_pause, "1", "0 0 0")
|
150
|
-
Iup.SetAttribute(img_pause, "2", "BGCOLOR")
|
127
|
+
@img_restart = Iup.Image(22,22, @pixmap_restart)
|
128
|
+
@img_play = Iup.Image(22,22, @pixmap_play)
|
129
|
+
@img_forward = Iup.Image(22,22, @pixmap_forward)
|
130
|
+
@img_rewind = Iup.Image(22,22, @pixmap_rewind)
|
131
|
+
@img_pause = Iup.Image(22,22, @pixmap_pause)
|
132
|
+
|
133
|
+
@img_restart["1"]= "0 0 0"
|
134
|
+
@img_restart["2"]= "BGCOLOR"
|
135
|
+
@img_play["1"]= "0 0 0"
|
136
|
+
@img_play["2"]= "BGCOLOR"
|
137
|
+
@img_forward["1"]= "0 0 0"
|
138
|
+
@img_forward["2"]= "BGCOLOR"
|
139
|
+
@img_rewind["1"]= "0 0 0"
|
140
|
+
@img_rewind["2"]= "BGCOLOR"
|
141
|
+
@img_pause["1"]= "0 0 0"
|
142
|
+
@img_pause["2"]= "BGCOLOR"
|
151
143
|
end
|
152
144
|
|
153
|
-
|
154
|
-
value =
|
155
|
-
value +=
|
145
|
+
@time_cb = lambda do |ih|
|
146
|
+
value = @progressbar1.value.to_f
|
147
|
+
value += @increment
|
156
148
|
if(value > 1)
|
157
149
|
value = 0 # start over */
|
158
150
|
end
|
159
|
-
|
151
|
+
@progressbar1.value = value
|
160
152
|
|
161
|
-
value =
|
162
|
-
value +=
|
153
|
+
value = @progressbar2.value.to_f
|
154
|
+
value += @increment*50
|
163
155
|
if(value > 50)
|
164
156
|
value = 0 # start over */
|
165
157
|
end
|
166
|
-
|
158
|
+
@progressbar2.value = value
|
167
159
|
return Iup::DEFAULT
|
168
160
|
end
|
169
161
|
|
170
|
-
|
171
|
-
if(
|
172
|
-
|
173
|
-
|
162
|
+
@btn_pause_cb = lambda do |ih|
|
163
|
+
if(@timer.run == "NO")
|
164
|
+
@timer.run = "YES"
|
165
|
+
@btn_pause.image = @img_pause
|
174
166
|
else
|
175
|
-
|
176
|
-
|
167
|
+
@timer.run = "NO"
|
168
|
+
@btn_pause.image = @img_play
|
177
169
|
end
|
178
170
|
|
179
171
|
return Iup::DEFAULT
|
180
172
|
end
|
181
173
|
|
182
|
-
|
183
|
-
|
184
|
-
|
174
|
+
@btn_restart_cb = lambda do |ih|
|
175
|
+
@progressbar1.value = 0
|
176
|
+
@progressbar2.value = 0
|
185
177
|
return Iup::DEFAULT
|
186
178
|
end
|
187
179
|
|
188
|
-
|
189
|
-
|
180
|
+
@btn_accelerate_cb = lambda do |ih|
|
181
|
+
@increment *= 2
|
190
182
|
return Iup::DEFAULT
|
191
183
|
end
|
192
184
|
|
193
|
-
|
194
|
-
|
185
|
+
@btn_decelerate_cb = lambda do |ih|
|
186
|
+
@increment /= 2
|
195
187
|
return Iup::DEFAULT
|
196
188
|
end
|
197
189
|
|
198
|
-
|
199
|
-
if(
|
200
|
-
|
190
|
+
@btn_show1_cb = lambda do |ih|
|
191
|
+
if(@progressbar1.dashed=="NO")
|
192
|
+
@progressbar1.dashed = "YES"
|
201
193
|
else
|
202
|
-
|
194
|
+
@progressbar1.dashed = "NO"
|
203
195
|
end
|
204
196
|
return Iup::DEFAULT
|
205
197
|
end
|
206
198
|
|
207
|
-
|
208
|
-
if(
|
209
|
-
|
199
|
+
@btn_show2_cb = lambda do |ih|
|
200
|
+
if(@progressbar1.marquee=="NO")
|
201
|
+
@progressbar1.marquee = "YES"
|
210
202
|
else
|
211
|
-
|
203
|
+
@progressbar1.marquee = "NO"
|
212
204
|
end
|
213
205
|
return Iup::DEFAULT
|
214
206
|
end
|
215
207
|
|
216
|
-
Iup.Open # IUP initialization */
|
217
208
|
|
218
|
-
|
219
|
-
|
220
|
-
|
209
|
+
@timer = Iup.Timer()
|
210
|
+
@timer.action_cb = @time_cb
|
211
|
+
@timer.time = 100
|
221
212
|
|
222
|
-
|
223
|
-
|
213
|
+
@progressbar1 = Iup.ProgressBar()
|
214
|
+
@progressbar2 = Iup.ProgressBar()
|
224
215
|
|
225
|
-
|
226
|
-
|
216
|
+
@progressbar1.expand = "YES"
|
217
|
+
@progressbar1.dashed = "YES"
|
218
|
+
|
219
|
+
@progressbar2.orientation = "VERTICAL"
|
220
|
+
@progressbar2.bgcolor = "255 0 128"
|
221
|
+
@progressbar2.fgcolor = "0 128 0"
|
222
|
+
@progressbar2.rastersize = "30x100"
|
223
|
+
@progressbar2.max = 50
|
224
|
+
@progressbar2.value = 25
|
227
225
|
|
228
|
-
Iup.
|
229
|
-
Iup.
|
230
|
-
Iup.
|
231
|
-
Iup.
|
232
|
-
Iup.
|
233
|
-
Iup.
|
234
|
-
|
235
|
-
btn_restart = Iup.Button(NULL, NULL)
|
236
|
-
$btn_pause = Iup.Button(NULL, NULL)
|
237
|
-
btn_accelerate = Iup.Button(NULL, NULL)
|
238
|
-
btn_decelerate = Iup.Button(NULL, NULL)
|
239
|
-
btn_show1 = Iup.Button("Dashed", NULL)
|
240
|
-
btn_show2 = Iup.Button("Marquee", NULL)
|
226
|
+
@btn_restart = Iup.Button('')
|
227
|
+
@btn_pause = Iup.Button('')
|
228
|
+
@btn_accelerate = Iup.Button('')
|
229
|
+
@btn_decelerate = Iup.Button('')
|
230
|
+
@btn_show1 = Iup.Button("Dashed")
|
231
|
+
@btn_show2 = Iup.Button("Marquee")
|
241
232
|
|
242
233
|
createimg_s()
|
243
234
|
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
235
|
+
@btn_restart.image = @img_restart
|
236
|
+
@btn_restart.tip = "Restart"
|
237
|
+
@btn_pause.image = @img_pause
|
238
|
+
@btn_pause.tip = "Play/Pause"
|
239
|
+
@btn_accelerate.image = @img_forward
|
240
|
+
@btn_accelerate.tip = "Accelerate"
|
241
|
+
@btn_decelerate.image = @img_rewind
|
242
|
+
@btn_decelerate.tip = "Decelerate"
|
243
|
+
@btn_show1.tip = "Dashed or Continuous"
|
244
|
+
@btn_show2.tip = "Marquee or Defined"
|
245
|
+
|
246
|
+
@progressbar1.dashed = "NO"
|
254
247
|
|
255
|
-
hbox = Iup.Hbox([
|
248
|
+
@hbox = Iup.Hbox([
|
256
249
|
Iup.Fill(),
|
257
|
-
|
258
|
-
btn_restart,
|
259
|
-
btn_decelerate,
|
260
|
-
btn_accelerate,
|
261
|
-
btn_show1,
|
262
|
-
btn_show2,
|
250
|
+
@btn_pause,
|
251
|
+
@btn_restart,
|
252
|
+
@btn_decelerate,
|
253
|
+
@btn_accelerate,
|
254
|
+
@btn_show1,
|
255
|
+
@btn_show2,
|
263
256
|
Iup.Fill()])
|
264
257
|
|
265
|
-
vbox = Iup.Hbox([Iup.Vbox([
|
266
|
-
|
267
|
-
|
258
|
+
vbox = Iup.Hbox([Iup.Vbox([@progressbar1, @hbox]), @progressbar2])
|
259
|
+
vbox.margin = "10x10"
|
260
|
+
vbox.gap = "5"
|
268
261
|
|
269
262
|
dlg = Iup.Dialog(vbox)
|
270
263
|
|
271
|
-
|
264
|
+
dlg.title = "IupProgressBar Test"
|
272
265
|
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
266
|
+
@btn_pause.action = @btn_pause_cb
|
267
|
+
@btn_restart.action = @btn_restart_cb
|
268
|
+
@btn_accelerate.action = @btn_accelerate_cb
|
269
|
+
@btn_decelerate.action = @btn_decelerate_cb
|
270
|
+
@btn_show1.action = @btn_show1_cb
|
271
|
+
@btn_show2.action = @btn_show2_cb
|
279
272
|
|
280
|
-
|
273
|
+
dlg.ShowXY(Iup::CENTER, Iup::CENTER)
|
281
274
|
|
282
|
-
|
275
|
+
@timer.run = "YES"
|
283
276
|
|
284
|
-
Iup.MainLoop
|
277
|
+
Iup.MainLoop
|
285
278
|
|
286
|
-
|
287
|
-
Iup.Destroy(Iup.GetHandle("img_restart"))
|
288
|
-
Iup.Destroy(Iup.GetHandle("img_play"))
|
289
|
-
Iup.Destroy(Iup.GetHandle("img_forward"))
|
290
|
-
Iup.Destroy(Iup.GetHandle("img_rewind"))
|
291
|
-
Iup.Destroy(Iup.GetHandle("img_pause"))
|
292
|
-
|
293
|
-
Iup.Close()
|
279
|
+
dlg.Destroy
|
294
280
|
|
data/ext/iup-win32/cd.dll
CHANGED
Binary file
|
data/ext/iup-win32/cd.lib
CHANGED
Binary file
|
Binary file
|
Binary file
|
data/ext/iup-win32/cdpdf.dll
CHANGED
Binary file
|
data/ext/iup-win32/cdpdf.lib
CHANGED
Binary file
|
data/ext/iup-win32/freetype6.dll
CHANGED
Binary file
|
data/ext/iup-win32/freetype6.lib
CHANGED
Binary file
|
data/ext/iup-win32/im.dll
CHANGED
Binary file
|
Binary file
|
data/ext/iup-win32/im_avi.dll
CHANGED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/ext/iup-win32/im_fftw.dll
CHANGED
Binary file
|
Binary file
|
data/ext/iup-win32/im_jp2.dll
CHANGED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/ext/iup-win32/im_wmv.dll
CHANGED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/ext/iup-win32/iup.dll
CHANGED
Binary file
|
data/ext/iup-win32/iup.lib
CHANGED
Binary file
|
data/ext/iup-win32/iup_pplot.dll
CHANGED
Binary file
|
data/ext/iup-win32/iup_pplot.lib
CHANGED
Binary file
|
data/ext/iup-win32/iupcd.dll
CHANGED
Binary file
|
data/ext/iup-win32/iupcd.lib
CHANGED
Binary file
|
Binary file
|
Binary file
|
data/ext/iup-win32/iupgl.dll
CHANGED
Binary file
|
data/ext/iup-win32/iupgl.lib
CHANGED
Binary file
|
Binary file
|
Binary file
|
data/ext/iup-win32/iupim.dll
CHANGED
Binary file
|
data/ext/iup-win32/iupim.lib
CHANGED
Binary file
|
data/ext/iup-win32/iupimglib.dll
CHANGED
Binary file
|
data/ext/iup-win32/iupimglib.lib
CHANGED
Binary file
|
data/ext/iup-win32/iupole.dll
CHANGED
Binary file
|
data/ext/iup-win32/iupole.lib
CHANGED
Binary file
|
data/ext/iup-win32/iupstub.lib
CHANGED
Binary file
|
data/ext/iup-win32/pdflib.dll
CHANGED
Binary file
|
data/ext/iup-win32/pdflib.lib
CHANGED
Binary file
|