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.
Files changed (68) hide show
  1. data/CHANGES +3 -0
  2. data/MANIFEST +8 -0
  3. data/MIT-LICENSE +18 -0
  4. data/README +12 -0
  5. data/Rakefile +85 -0
  6. data/doc/README +10 -0
  7. data/doc/build_install.txt +74 -0
  8. data/examples/README +16 -0
  9. data/examples/ctrl/cbox.rb +220 -0
  10. data/examples/ctrl/checkboard.rb +33 -0
  11. data/examples/ctrl/degrade.rb +76 -0
  12. data/examples/ctrl/example1.rb +53 -0
  13. data/examples/ctrl/example2.rb +39 -0
  14. data/examples/ctrl/iupcolorbar.rb +95 -0
  15. data/examples/ctrl/iupcolorbrowser.rb +45 -0
  16. data/examples/ctrl/iupdial.rb +117 -0
  17. data/examples/ctrl/iupgauge.rb +242 -0
  18. data/examples/ctrl/iupgetcolor.rb +8 -0
  19. data/examples/ctrl/iupgetparam.rb +62 -0
  20. data/examples/ctrl/iupglcanvas.rb +172 -0
  21. data/examples/ctrl/iupmask.rb +13 -0
  22. data/examples/ctrl/iupmatrix.rb +39 -0
  23. data/examples/ctrl/iupplot2.rb +601 -0
  24. data/examples/ctrl/iuptabs.rb +22 -0
  25. data/examples/ctrl/iuptree.rb +190 -0
  26. data/examples/ctrl/iupval.rb +71 -0
  27. data/examples/ctrl/numbering.rb +46 -0
  28. data/examples/ctrl/sample.rb +166 -0
  29. data/examples/dlg/iupalarm.rb +16 -0
  30. data/examples/dlg/iupfiledlg.rb +19 -0
  31. data/examples/dlg/iupgetfile.rb +19 -0
  32. data/examples/dlg/iuplistdialog.rb +26 -0
  33. data/examples/dlg/iupmessage.rb +5 -0
  34. data/examples/dlg/iupscanf.rb +17 -0
  35. data/examples/elem/iupbutton.rb +180 -0
  36. data/examples/elem/iupcanvas.rb +29 -0
  37. data/examples/elem/iupcanvas2.rb +114 -0
  38. data/examples/elem/iupcanvas3.rb +52 -0
  39. data/examples/elem/iupdialog.rb +67 -0
  40. data/examples/elem/iupdialog2.rb +25 -0
  41. data/examples/elem/iupfill.rb +51 -0
  42. data/examples/elem/iupframe.rb +25 -0
  43. data/examples/elem/iuphbox.rb +68 -0
  44. data/examples/elem/iupimage.rb +113 -0
  45. data/examples/elem/iupitem.rb +60 -0
  46. data/examples/elem/iuplabel.rb +57 -0
  47. data/examples/elem/iuplist.rb +41 -0
  48. data/examples/elem/iuplist2.rb +125 -0
  49. data/examples/elem/iupmenu.rb +32 -0
  50. data/examples/elem/iupmultiline.rb +24 -0
  51. data/examples/elem/iupmultiline2.rb +156 -0
  52. data/examples/elem/iupradio.rb +32 -0
  53. data/examples/elem/iupseparator.rb +81 -0
  54. data/examples/elem/iupsubmenu.rb +85 -0
  55. data/examples/elem/iuptimer.rb +36 -0
  56. data/examples/elem/iuptoggle.rb +110 -0
  57. data/examples/elem/iupvbox.rb +87 -0
  58. data/examples/elem/iupzbox.rb +60 -0
  59. data/examples/elem/mdisample.rb +377 -0
  60. data/examples/elem/progressbar.rb +280 -0
  61. data/examples/elem/scrollbar.rb +66 -0
  62. data/examples/elem/tray.rb +90 -0
  63. data/examples/func/iupgetattribute.rb +32 -0
  64. data/examples/func/iupidle.rb +48 -0
  65. data/lib/iup.so +0 -0
  66. data/ruby-iup.gemspec +26 -0
  67. data/test/test_ruby_iup.rb +25 -0
  68. metadata +132 -0
data/CHANGES ADDED
@@ -0,0 +1,3 @@
1
+ == 0.1.0 - 14-Feb-2010
2
+ * Initial release
3
+
data/MANIFEST ADDED
@@ -0,0 +1,8 @@
1
+ * CHANGES
2
+ * MANIFEST
3
+ * README
4
+ * Rakefile
5
+ * ruby-iup.gemspec
6
+ * ext/extconf.rb
7
+ * ext/iup.c
8
+ * test/test_ruby_iup.rb
data/MIT-LICENSE ADDED
@@ -0,0 +1,18 @@
1
+
2
+ Permission is hereby granted, free of charge, to any person obtaining a
3
+ copy of this software and associated documentation files (the "Software"),
4
+ to deal in the Software without restriction, including without limitation
5
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
6
+ and/or sell copies of the Software, and to permit persons to whom the
7
+ Software is furnished to do so, subject to the following conditions:
8
+
9
+ The above copyright notice and this permission notice shall be included in
10
+ all copies or substantial portions of the Software.
11
+
12
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
17
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
18
+ DEALINGS IN THE SOFTWARE.
data/README ADDED
@@ -0,0 +1,12 @@
1
+ README for IUP
2
+
3
+ IUP is a portable toolkit for building graphical user interfaces. It offers a configuration API in three basic languages: C, Lua and LED. IUP's purpose is to allow a program to be executed in different systems without any modification, therefore it is highly portable. Its main advantages are:
4
+ * high performance, due to the fact that it uses native interface elements.
5
+ * fast learning by the user, due to the simplicity of its API.
6
+
7
+ Build instructions and usage are available in the IUP documentation.
8
+
9
+ For complete information, visit IUP's web site at http://www.tecgraf.puc-rio.br/iup
10
+ or access its documentation in the HTML folder.
11
+
12
+ (end of README)
data/Rakefile ADDED
@@ -0,0 +1,85 @@
1
+ require 'rake'
2
+ require 'rake/clean'
3
+ require 'rake/testtask'
4
+ require 'rbconfig'
5
+ include Config
6
+
7
+ make = CONFIG['host_os'] =~ /mswin/i ? 'nmake' : 'make'
8
+
9
+ desc 'Build the ruby.exe.manifest if it does not already exist'
10
+ task :build_manifest do
11
+ version = CONFIG['host_os'].split('_')[1]
12
+
13
+ if version && version.to_i >= 80
14
+ unless File.exist?(File.join(CONFIG['bindir'], 'ruby.exe.manifest'))
15
+ Dir.chdir(CONFIG['bindir']) do
16
+ sh "mt -inputresource:ruby.exe;2 -out:ruby.exe.manifest"
17
+ end
18
+ end
19
+ end
20
+ end
21
+
22
+ desc 'Install the ruby-iup library (non-gem)'
23
+ task :install => [:build] do
24
+ Dir.chdir('ext'){
25
+ sh "#{make} install"
26
+ }
27
+ end
28
+
29
+ desc 'Clean any build files for ruby-iup'
30
+ task :clean do
31
+ Dir.chdir('ext') do
32
+ if File.exists?('iup.so') || File.exists?('Makefile')
33
+ then
34
+ sh "#{make} distclean"
35
+ end
36
+ end
37
+
38
+ # Cleanup any files generated by the build_binary_gem task
39
+ rm_rf('lib') if File.exists?('lib')
40
+ Dir["*.gem"].each{ |f| File.delete(f) }
41
+ end
42
+
43
+ desc "Build ruby-iup (but don't install it)"
44
+ task :build => [:clean, :build_manifest] do
45
+ Dir.chdir('ext') do
46
+ ruby "extconf.rb"
47
+ sh make
48
+ end
49
+ end
50
+
51
+ namespace 'gem' do
52
+ desc 'Build a standard gem'
53
+ task :create => [:clean] do
54
+ spec = eval(IO.read('ruby-iup.gemspec'))
55
+ Gem::Builder.new(spec).build
56
+ end
57
+
58
+ desc 'Build a binary gem'
59
+ task :binary => [:build] do
60
+ mkdir_p 'lib'
61
+ cp 'ext/iup.so', 'lib'
62
+
63
+ spec = eval(IO.read('ruby-iup.gemspec'))
64
+ spec.platform = Gem::Platform::CURRENT
65
+ spec.extensions = nil
66
+ spec.files = spec.files.reject{ |f| f.include?('ext') }
67
+
68
+ Gem::Builder.new(spec).build
69
+ end
70
+
71
+ desc 'Install the gem'
72
+ task :install => [:create] do
73
+ file = Dir["*.gem"].first
74
+ sh "gem install #{file}"
75
+ end
76
+ end
77
+
78
+ namespace 'test' do
79
+ Rake::TestTask.new(:all) do |test|
80
+ task :all => [:build]
81
+ test.libs << 'ext'
82
+ test.warning = true
83
+ test.verbose = true
84
+ end
85
+ end
data/doc/README ADDED
@@ -0,0 +1,10 @@
1
+ ruby-opengl tests
2
+ =================
3
+
4
+ This directory contains the unit tests for ruby-opengl. You should be able
5
+ to run the test by calling 'rake test' from installation root directory.
6
+
7
+ Note that the tests are meant for purposes of internal development, and depending on
8
+ your system configuration may not run at all - the purpose is to test the
9
+ bindings, not the underlying OpenGL implementation.
10
+
@@ -0,0 +1,74 @@
1
+ Building ruby-iup
2
+ ====================
3
+
4
+ Pre-requisites
5
+ --------------
6
+
7
+ General
8
+ --------------
9
+ * C compiler (not needed for binary install on Windows)
10
+ * ruby 1.8.5+ or ruby 1.9.0+
11
+ * rake
12
+ * rubygems 0.9.1+
13
+ * IUP 3.0+ header and library (not needed for binary install on Windows)
14
+ * CD 5.3+ header and library (not needed for binary install on Windows)
15
+ * IM 3.6+ header and library (not needed for binary install on Windows)
16
+
17
+
18
+ Linux
19
+ --------------
20
+ On Ubuntu or Debian systems, aside from Ruby you'll need ruby and
21
+ some extra ruby related packages:
22
+
23
+ * `ruby rdoc ri ruby1.8-dev`
24
+
25
+ On older Gentoo, Debian and Ubuntu, rubygems 0.9.0 will be installed by default
26
+ in the packages. This version of rubygems is INCOMPATIBLE with ruby-iup.
27
+ You'll need to install rubygems 0.9.1+ from source.
28
+
29
+ On some distributions you may need 'xorg-dev' developer package.
30
+
31
+
32
+
33
+ Build and installation
34
+ --------------
35
+
36
+ Installing from rubygems
37
+ -------------------
38
+
39
+ Runnig 'gem install -y ruby-iup' and it should pull down the gem
40
+ and try to build the bindings for you automatically.
41
+
42
+ For windows there is also pre-built binary windows gem available
43
+ (i386-mswin32) which is compatible with the ruby one-click installer and does not need
44
+ compiler or other mentioned tools installed.
45
+
46
+ Manual Build instructions for all platforms (see above for platform-specific notes)
47
+ ------------------
48
+ 1. Make sure you have working ruby with rubygems installed
49
+ and (if needed) appropriate developer packages (ruby-dev,ruby1.8-dev,...).
50
+ 2. Make sure you have working C compiler
51
+ 3. Install rake either from package or by running 'gem install rake'
52
+ 4. Run 'rake' at the top level of the project
53
+
54
+ Installing manually built extensions
55
+ ------------------
56
+ 1. Run 'rake clean' to clean out the project
57
+ 2. Run 'rake gem:create' to create source gem from project
58
+ 3. Run 'gem install ruby-iup-(version).gem' to compile and install the gem
59
+ 4. Done.
60
+
61
+ Building binary gem (useful only for binary distribution of the project)
62
+ ------------------
63
+ 1. Run 'rake clean' to clean out the project
64
+ 2. Run 'rake gem:binary' to build source gem
65
+ 3. Run 'gem install ruby-iup-(version).gem' to compile the binary gem
66
+
67
+
68
+
69
+ Running programs and examples
70
+ -----------------
71
+ To run a sample file, make sure the ruby-iup gem is installed then:
72
+
73
+ $ cd examples
74
+ $ ruby sample.rb
data/examples/README ADDED
@@ -0,0 +1,16 @@
1
+ Examples
2
+ ========
3
+
4
+ This directory contains OpenGL examples converted to ruby from various sources.
5
+ As such, they are distributed under various terms - see each file for licensing info.
6
+
7
+ RedBook/
8
+ Examples from OpenGL Red Book and SGI's example code in general, licensed under
9
+ SGI open-source license.
10
+ OrangeBook/
11
+ Examples from OpenGL Orange Book (GLSL), distributed under BSD license
12
+ NeHe/
13
+ NeHe's opengl tutorials (http://nehe.gamedev.net), licensed under free license.
14
+ Misc/
15
+ Other examples. If license is not given, MIT is assumed.
16
+
@@ -0,0 +1,220 @@
1
+ require 'rubygems'
2
+ require 'iup'
3
+
4
+ class IupCboxTest
5
+ def create_mat()
6
+ mat = Iup.Matrix()
7
+
8
+ mat.numcol = 1
9
+ mat.numlin = 3
10
+ mat.numcol_visible = 1
11
+ mat.numlin_visible = 3
12
+ mat.expand = "NO"
13
+ mat.scrollbar = "NO"
14
+
15
+ mat["0:0"] = "Inflation"
16
+ mat["1:0"] = "Medicine "
17
+ mat["2:0"] = "Food"
18
+ mat["3:0"] = "Energy"
19
+ mat["0:1"] = "January 2000"
20
+ mat["1:1"] = 5.6
21
+ mat["2:1"] = 2.2
22
+ mat["3:1"] = 7.2
23
+
24
+ mat.bgcolor = "255 255 255"
25
+ mat["bgcolor1:0"] = "255 128 0"
26
+ mat["bgcolor2:1"] = "255 128 0"
27
+ mat["fgcolor2:0"] = "255 0 128"
28
+ mat["fgcolor1:1"] = "255 0 128"
29
+
30
+ mat.cx = 600
31
+ mat.cy = 250
32
+ return mat
33
+ end
34
+
35
+ def createtree()
36
+ tree = Iup.Tree(:attr=>"FONT=COURIER_NORMAL_10, "+
37
+ "NAME=Figures, "+
38
+ "ADDBRANCH=3D, "+
39
+ "ADDBRANCH=2D, "+
40
+ "ADDLEAF1=trapeze, "+
41
+ "ADDBRANCH1=parallelogram, "+
42
+ "ADDLEAF2=diamond, "+
43
+ "ADDLEAF2=square, "+
44
+ "ADDBRANCH4=triangle, "+
45
+ "ADDLEAF5=scalenus, "+
46
+ "ADDLEAF5=isoceles, "+
47
+ "ADDLEAF5=equilateral, "+
48
+ "RASTERSIZE=180x180, "+
49
+ "VALUE=6, "+
50
+ "CTRL=ON, "+
51
+ "SHIFT=ON, "+
52
+ "CX=600, "+
53
+ "CY=10, "+
54
+ "ADDEXPANDED=NO")
55
+ return tree
56
+ end
57
+
58
+ def func_1()
59
+
60
+ @img_bits1 = [
61
+ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,
62
+ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,
63
+ 1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,
64
+ 1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,
65
+ 1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,
66
+ 1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,
67
+ 1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,
68
+ 1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,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2)
134
+ @img2["0"] = "0 0 0"
135
+ @img2["1"] = "0 255 0"
136
+ @img2["2"] = "BGCOLOR"
137
+ @img2["3"] = "255 0 0"
138
+
139
+ _frm_1 = Iup.Frame(
140
+ Iup.Vbox([
141
+ Iup.Button(:title=>"Button Text",:cindex=>"1"),
142
+ Iup.Button(:title=>"",:image=>@img1,:cindex=>"2"),
143
+ Iup.Button(:title=>"",:image=>@img1,:impress=>@img2,:cindex=>"3")
144
+ ]),:title=>"IupButton",:cx=>10,:cy=>180)
145
+
146
+ _frm_2 = Iup.Frame(
147
+ Iup.Vbox([
148
+ Iup.Label(:title=>"Label Text",:cindex => 1),
149
+ Iup.Label(:title=>"",:separator => 'HORIZONTAL',:cindex => 2),
150
+ Iup.Label(:title=>"",:image => @img1,:cindex => 3)
151
+ ]),:title=>"IupLabel",:cx=>200,:cy=>250)
152
+
153
+ _frm_3 = Iup.Frame(
154
+ Iup.Vbox([
155
+ Iup.Toggle(:title=>"Toggle Text", :value => 'ON',:cindex => 1),
156
+ Iup.Toggle(:title=>"",:image => @img1,:impress => @img2,:cindex => 2),
157
+ Iup.Frame(Iup.Radio(Iup.Vbox([
158
+ Iup.Toggle(:title=>"Toggle Text",:cindex =>3),
159
+ Iup.Toggle(:title=>"Toggle Text",:cindex =>4)
160
+ ])),:title => "IupRadio")
161
+ ]),:title=>"IupToggle",:cx=>400,:cy=>250)
162
+
163
+ _text_1 = Iup.Text(:value=>"IupText Text",:size=>'80x',:cindex=>1,:cx=>10,:cy=>100)
164
+
165
+ _ml_1 = Iup.MultiLine(:value=>"IupMultiline Text\nSecond Line\nThird Line",
166
+ :size=>'80x60',:cindex=>1,:cx=>200,:cy=>100)
167
+
168
+ _list_1 = Iup.List(:value=>1,:cindex=>1,:cx=>10,:cy=>10)
169
+ _list_1["1"] = "Item 1 Text"
170
+ _list_1["2"] = "Item 2 Text"
171
+ _list_1["3"] = "Item 3 Text"
172
+
173
+ _list_2 = Iup.List(:dropdown=>'YES',:value=>2,:cindex=>2,:cx=>200,:cy=>10)
174
+ _list_2["1"] = "Item 1 Text"
175
+ _list_2["2"] = "Item 2 Text"
176
+ _list_2["3"] = "Item 3 Text"
177
+
178
+ _list_3 = Iup.List(:editbox=>'YES',:value=>3,:cindex=>3,:cx=>400,:cy=>10)
179
+ _list_3["1"] = "Item 1 Text"
180
+ _list_3["2"] = "Item 2 Text"
181
+ _list_3["3"] = "Item 3 Text"
182
+
183
+ _cnv_1 = Iup.Canvas(:rastersize=>'100x100',:posx=>0.0,:posy=>0.0,
184
+ :bgcolor=>'128 255 0',:cx=>400,:cy=>150)
185
+
186
+ _ctrl_1 = Iup.Val(:cx=>600,:cy=>200)
187
+
188
+ _cbox = Iup.Cbox([
189
+ _text_1,
190
+ _ml_1,
191
+ _list_1,
192
+ _list_2,
193
+ _list_3,
194
+ _cnv_1,
195
+ _ctrl_1,
196
+ createtree(),
197
+ create_mat(),
198
+ _frm_1,
199
+ _frm_2,
200
+ _frm_3
201
+ ],:size=>"480x200")
202
+
203
+ hbox = Iup.Hbox([_cbox],:margin=>"10x10")
204
+
205
+ @dlg = Iup.Dialog(hbox,:title=>"Cbox Test")
206
+ end
207
+
208
+ def initialize
209
+ func_1()
210
+ @dlg.ShowXY(Iup::CENTER,Iup::CENTER)
211
+ Iup.MainLoop
212
+ @img1.Destroy
213
+ @img2.Destroy
214
+ @dlg.Destroy
215
+ end
216
+ end
217
+
218
+ test = IupCboxTest.new
219
+
220
+