ruby-iup 0.1.0-x86-mswin32-60
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +3 -0
- data/MANIFEST +8 -0
- data/MIT-LICENSE +18 -0
- data/README +12 -0
- data/Rakefile +85 -0
- data/doc/README +10 -0
- data/doc/build_install.txt +74 -0
- data/examples/README +16 -0
- data/examples/ctrl/cbox.rb +220 -0
- data/examples/ctrl/checkboard.rb +33 -0
- data/examples/ctrl/degrade.rb +76 -0
- data/examples/ctrl/example1.rb +53 -0
- data/examples/ctrl/example2.rb +39 -0
- data/examples/ctrl/iupcolorbar.rb +95 -0
- data/examples/ctrl/iupcolorbrowser.rb +45 -0
- data/examples/ctrl/iupdial.rb +117 -0
- data/examples/ctrl/iupgauge.rb +242 -0
- data/examples/ctrl/iupgetcolor.rb +8 -0
- data/examples/ctrl/iupgetparam.rb +62 -0
- data/examples/ctrl/iupglcanvas.rb +172 -0
- data/examples/ctrl/iupmask.rb +13 -0
- data/examples/ctrl/iupmatrix.rb +39 -0
- data/examples/ctrl/iupplot2.rb +601 -0
- data/examples/ctrl/iuptabs.rb +22 -0
- data/examples/ctrl/iuptree.rb +190 -0
- data/examples/ctrl/iupval.rb +71 -0
- data/examples/ctrl/numbering.rb +46 -0
- data/examples/ctrl/sample.rb +166 -0
- data/examples/dlg/iupalarm.rb +16 -0
- data/examples/dlg/iupfiledlg.rb +19 -0
- data/examples/dlg/iupgetfile.rb +19 -0
- data/examples/dlg/iuplistdialog.rb +26 -0
- data/examples/dlg/iupmessage.rb +5 -0
- data/examples/dlg/iupscanf.rb +17 -0
- data/examples/elem/iupbutton.rb +180 -0
- data/examples/elem/iupcanvas.rb +29 -0
- data/examples/elem/iupcanvas2.rb +114 -0
- data/examples/elem/iupcanvas3.rb +52 -0
- data/examples/elem/iupdialog.rb +67 -0
- data/examples/elem/iupdialog2.rb +25 -0
- data/examples/elem/iupfill.rb +51 -0
- data/examples/elem/iupframe.rb +25 -0
- data/examples/elem/iuphbox.rb +68 -0
- data/examples/elem/iupimage.rb +113 -0
- data/examples/elem/iupitem.rb +60 -0
- data/examples/elem/iuplabel.rb +57 -0
- data/examples/elem/iuplist.rb +41 -0
- data/examples/elem/iuplist2.rb +125 -0
- data/examples/elem/iupmenu.rb +32 -0
- data/examples/elem/iupmultiline.rb +24 -0
- data/examples/elem/iupmultiline2.rb +156 -0
- data/examples/elem/iupradio.rb +32 -0
- data/examples/elem/iupseparator.rb +81 -0
- data/examples/elem/iupsubmenu.rb +85 -0
- data/examples/elem/iuptimer.rb +36 -0
- data/examples/elem/iuptoggle.rb +110 -0
- data/examples/elem/iupvbox.rb +87 -0
- data/examples/elem/iupzbox.rb +60 -0
- data/examples/elem/mdisample.rb +377 -0
- data/examples/elem/progressbar.rb +280 -0
- data/examples/elem/scrollbar.rb +66 -0
- data/examples/elem/tray.rb +90 -0
- data/examples/func/iupgetattribute.rb +32 -0
- data/examples/func/iupidle.rb +48 -0
- data/lib/iup.so +0 -0
- data/ruby-iup.gemspec +26 -0
- data/test/test_ruby_iup.rb +25 -0
- metadata +132 -0
@@ -0,0 +1,48 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
|
3
|
+
require 'iup'
|
4
|
+
|
5
|
+
calc = {}
|
6
|
+
|
7
|
+
|
8
|
+
text = Iup.Text(:size=>"100x20")
|
9
|
+
|
10
|
+
calc_end = lambda do
|
11
|
+
Iup.SetIdle(nil)
|
12
|
+
Iup::DEFAULT
|
13
|
+
end
|
14
|
+
|
15
|
+
idle_function = lambda do
|
16
|
+
# Iup::TITLE value for IUP */
|
17
|
+
sleep 0.01
|
18
|
+
calc[:passo]+= 1 # next iteration step */
|
19
|
+
calc[:fatorial] *= calc[:passo] # executes one computation step */
|
20
|
+
|
21
|
+
# feedback to the user on the current step and the last computed value */
|
22
|
+
str = "%d -> %10.4g" % [calc[:passo],calc[:fatorial]]
|
23
|
+
text.value = str
|
24
|
+
|
25
|
+
if(calc[:passo] == 100) # computation ends when step = 100 */
|
26
|
+
calc_end.call
|
27
|
+
end
|
28
|
+
Iup::DEFAULT
|
29
|
+
end
|
30
|
+
|
31
|
+
calc_begin = lambda do |ih|
|
32
|
+
calc[:passo] = 0
|
33
|
+
calc[:fatorial] = 1.0
|
34
|
+
Iup.SetIdle(idle_function)
|
35
|
+
text.value = "Computing..."
|
36
|
+
Iup::DEFAULT
|
37
|
+
end
|
38
|
+
|
39
|
+
bt = Iup.Button(:title=>"Calcular",:action=>calc_begin)
|
40
|
+
|
41
|
+
dg = Iup.Dialog(Iup.Vbox([text, bt]))
|
42
|
+
|
43
|
+
dg.ShowXY(Iup::CENTER, Iup::CENTER)
|
44
|
+
|
45
|
+
Iup.MainLoop()
|
46
|
+
dg.Destroy()
|
47
|
+
|
48
|
+
|
data/lib/iup.so
ADDED
Binary file
|
data/ruby-iup.gemspec
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
|
3
|
+
Gem::Specification.new do |spec|
|
4
|
+
spec.name = 'ruby-iup'
|
5
|
+
spec.version = '0.1.0'
|
6
|
+
spec.authors = ['Park Heesob']
|
7
|
+
spec.email = 'phasis@gmail.com'
|
8
|
+
spec.homepage = 'http://rubyforge.org/projects/ruby-iup'
|
9
|
+
spec.platform = Gem::Platform::RUBY
|
10
|
+
spec.summary = 'An interface to the IUP GUI toolkit'
|
11
|
+
spec.has_rdoc = true
|
12
|
+
spec.test_files = Dir['test/test*']
|
13
|
+
spec.extensions = ['ext/extconf.rb']
|
14
|
+
spec.files = Dir['**/*'].reject{ |f| f.include?('git')||f.include?('CVS') }
|
15
|
+
|
16
|
+
spec.rubyforge_project = 'ruby-iup'
|
17
|
+
spec.required_ruby_version = '>= 1.8.2'
|
18
|
+
spec.extra_rdoc_files = ['README', 'CHANGES', 'MANIFEST']
|
19
|
+
|
20
|
+
spec.add_development_dependency('test-unit', '>= 2.0.6')
|
21
|
+
|
22
|
+
spec.description = <<-EOF
|
23
|
+
ruby-iup is an extension module for Ruby that provides an interface to the IUP GUI
|
24
|
+
toolkit. IUP is a portable toolkit for building graphical user interfaces.
|
25
|
+
EOF
|
26
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
############################################################################
|
2
|
+
# test_ruby_iup.rb
|
3
|
+
#
|
4
|
+
# Test case for the Iup class. You should run this as Rake task,
|
5
|
+
# i.e. 'rake test', instead of running it directly.
|
6
|
+
############################################################################
|
7
|
+
require 'rubygems'
|
8
|
+
gem 'test-unit'
|
9
|
+
|
10
|
+
require 'iup'
|
11
|
+
require 'test/unit'
|
12
|
+
include Iup
|
13
|
+
|
14
|
+
class TC_RUBY_IUP < Test::Unit::TestCase
|
15
|
+
def setup
|
16
|
+
end
|
17
|
+
|
18
|
+
def test_version
|
19
|
+
assert_equal('0.1.0', RUBY_IUP_VERSION)
|
20
|
+
end
|
21
|
+
|
22
|
+
|
23
|
+
def teardown
|
24
|
+
end
|
25
|
+
end
|
metadata
ADDED
@@ -0,0 +1,132 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ruby-iup
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: x86-mswin32-60
|
6
|
+
authors:
|
7
|
+
- Park Heesob
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2010-02-15 00:00:00 +09:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: test-unit
|
17
|
+
type: :development
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 2.0.6
|
24
|
+
version:
|
25
|
+
description: " ruby-iup is an extension module for Ruby that provides an interface to the IUP GUI \n toolkit. IUP is a portable toolkit for building graphical user interfaces.\n"
|
26
|
+
email: phasis@gmail.com
|
27
|
+
executables: []
|
28
|
+
|
29
|
+
extensions: []
|
30
|
+
|
31
|
+
extra_rdoc_files:
|
32
|
+
- README
|
33
|
+
- CHANGES
|
34
|
+
- MANIFEST
|
35
|
+
files:
|
36
|
+
- CHANGES
|
37
|
+
- doc/build_install.txt
|
38
|
+
- doc/README
|
39
|
+
- examples/ctrl/cbox.rb
|
40
|
+
- examples/ctrl/checkboard.rb
|
41
|
+
- examples/ctrl/degrade.rb
|
42
|
+
- examples/ctrl/example1.rb
|
43
|
+
- examples/ctrl/example2.rb
|
44
|
+
- examples/ctrl/iupcolorbar.rb
|
45
|
+
- examples/ctrl/iupcolorbrowser.rb
|
46
|
+
- examples/ctrl/iupdial.rb
|
47
|
+
- examples/ctrl/iupgauge.rb
|
48
|
+
- examples/ctrl/iupgetcolor.rb
|
49
|
+
- examples/ctrl/iupgetparam.rb
|
50
|
+
- examples/ctrl/iupglcanvas.rb
|
51
|
+
- examples/ctrl/iupmask.rb
|
52
|
+
- examples/ctrl/iupmatrix.rb
|
53
|
+
- examples/ctrl/iupplot2.rb
|
54
|
+
- examples/ctrl/iuptabs.rb
|
55
|
+
- examples/ctrl/iuptree.rb
|
56
|
+
- examples/ctrl/iupval.rb
|
57
|
+
- examples/ctrl/numbering.rb
|
58
|
+
- examples/ctrl/sample.rb
|
59
|
+
- examples/dlg/iupalarm.rb
|
60
|
+
- examples/dlg/iupfiledlg.rb
|
61
|
+
- examples/dlg/iupgetfile.rb
|
62
|
+
- examples/dlg/iuplistdialog.rb
|
63
|
+
- examples/dlg/iupmessage.rb
|
64
|
+
- examples/dlg/iupscanf.rb
|
65
|
+
- examples/elem/iupbutton.rb
|
66
|
+
- examples/elem/iupcanvas.rb
|
67
|
+
- examples/elem/iupcanvas2.rb
|
68
|
+
- examples/elem/iupcanvas3.rb
|
69
|
+
- examples/elem/iupdialog.rb
|
70
|
+
- examples/elem/iupdialog2.rb
|
71
|
+
- examples/elem/iupfill.rb
|
72
|
+
- examples/elem/iupframe.rb
|
73
|
+
- examples/elem/iuphbox.rb
|
74
|
+
- examples/elem/iupimage.rb
|
75
|
+
- examples/elem/iupitem.rb
|
76
|
+
- examples/elem/iuplabel.rb
|
77
|
+
- examples/elem/iuplist.rb
|
78
|
+
- examples/elem/iuplist2.rb
|
79
|
+
- examples/elem/iupmenu.rb
|
80
|
+
- examples/elem/iupmultiline.rb
|
81
|
+
- examples/elem/iupmultiline2.rb
|
82
|
+
- examples/elem/iupradio.rb
|
83
|
+
- examples/elem/iupseparator.rb
|
84
|
+
- examples/elem/iupsubmenu.rb
|
85
|
+
- examples/elem/iuptimer.rb
|
86
|
+
- examples/elem/iuptoggle.rb
|
87
|
+
- examples/elem/iupvbox.rb
|
88
|
+
- examples/elem/iupzbox.rb
|
89
|
+
- examples/elem/mdisample.rb
|
90
|
+
- examples/elem/progressbar.rb
|
91
|
+
- examples/elem/scrollbar.rb
|
92
|
+
- examples/elem/tray.rb
|
93
|
+
- examples/func/iupgetattribute.rb
|
94
|
+
- examples/func/iupidle.rb
|
95
|
+
- examples/README
|
96
|
+
- lib/iup.so
|
97
|
+
- MANIFEST
|
98
|
+
- MIT-LICENSE
|
99
|
+
- Rakefile
|
100
|
+
- README
|
101
|
+
- ruby-iup.gemspec
|
102
|
+
- test/test_ruby_iup.rb
|
103
|
+
has_rdoc: true
|
104
|
+
homepage: http://rubyforge.org/projects/ruby-iup
|
105
|
+
licenses: []
|
106
|
+
|
107
|
+
post_install_message:
|
108
|
+
rdoc_options: []
|
109
|
+
|
110
|
+
require_paths:
|
111
|
+
- lib
|
112
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - ">="
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: 1.8.2
|
117
|
+
version:
|
118
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
119
|
+
requirements:
|
120
|
+
- - ">="
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: "0"
|
123
|
+
version:
|
124
|
+
requirements: []
|
125
|
+
|
126
|
+
rubyforge_project: ruby-iup
|
127
|
+
rubygems_version: 1.3.5
|
128
|
+
signing_key:
|
129
|
+
specification_version: 3
|
130
|
+
summary: An interface to the IUP GUI toolkit
|
131
|
+
test_files:
|
132
|
+
- test/test_ruby_iup.rb
|