From fcbf63e62c627deae76c1b8cb8c0876c536ed811 Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Mon, 16 Mar 2020 18:49:26 +0900 Subject: Fresh start --- .../ext/tk/sample/tkextlib/vu/Orig_LICENSE.txt | 51 ++++++ jni/ruby/ext/tk/sample/tkextlib/vu/README.txt | 50 ++++++ jni/ruby/ext/tk/sample/tkextlib/vu/canvItems.rb | 90 +++++++++++ jni/ruby/ext/tk/sample/tkextlib/vu/canvSticker.rb | 82 ++++++++++ jni/ruby/ext/tk/sample/tkextlib/vu/canvSticker2.rb | 101 ++++++++++++ jni/ruby/ext/tk/sample/tkextlib/vu/dial_demo.rb | 113 +++++++++++++ jni/ruby/ext/tk/sample/tkextlib/vu/m128_000.xbm | 174 +++++++++++++++++++++ jni/ruby/ext/tk/sample/tkextlib/vu/oscilloscope.rb | 68 ++++++++ jni/ruby/ext/tk/sample/tkextlib/vu/pie.rb | 56 +++++++ jni/ruby/ext/tk/sample/tkextlib/vu/vu_demo.rb | 67 ++++++++ 10 files changed, 852 insertions(+) create mode 100644 jni/ruby/ext/tk/sample/tkextlib/vu/Orig_LICENSE.txt create mode 100644 jni/ruby/ext/tk/sample/tkextlib/vu/README.txt create mode 100644 jni/ruby/ext/tk/sample/tkextlib/vu/canvItems.rb create mode 100644 jni/ruby/ext/tk/sample/tkextlib/vu/canvSticker.rb create mode 100644 jni/ruby/ext/tk/sample/tkextlib/vu/canvSticker2.rb create mode 100644 jni/ruby/ext/tk/sample/tkextlib/vu/dial_demo.rb create mode 100644 jni/ruby/ext/tk/sample/tkextlib/vu/m128_000.xbm create mode 100644 jni/ruby/ext/tk/sample/tkextlib/vu/oscilloscope.rb create mode 100644 jni/ruby/ext/tk/sample/tkextlib/vu/pie.rb create mode 100644 jni/ruby/ext/tk/sample/tkextlib/vu/vu_demo.rb (limited to 'jni/ruby/ext/tk/sample/tkextlib/vu') diff --git a/jni/ruby/ext/tk/sample/tkextlib/vu/Orig_LICENSE.txt b/jni/ruby/ext/tk/sample/tkextlib/vu/Orig_LICENSE.txt new file mode 100644 index 0000000..f2e0edc --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/vu/Orig_LICENSE.txt @@ -0,0 +1,51 @@ + + >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< + >>> The following text is the original 'license.txt' of vu extension. <<< + >>> Original Tcl source files are not include in this directory, <<< + >>> because of all of them are rewritten to Ruby files. <<< + >>> However, the bitmap data file included in this directory is the <<< + >>> same file of vu extension. So, the bitmap data file is under the <<< + >>> following license. <<< + >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< + + * COPYRIGHT AND LICENSE TERMS * + +(This file blatantly stolen from Tcl/Tk license and adapted - thus assume +it falls under similar license terms). + +This software is copyrighted by Jeffrey Hobbs and +others. The following terms apply to all files associated with the +software unless explicitly disclaimed in individual files. + +The authors hereby grant permission to use, copy, modify, distribute, and +license this software and its documentation for any purpose, provided that +existing copyright notices are retained in all copies and that this notice +is included verbatim in any distributions. No written agreement, license, +or royalty fee is required for any of the authorized uses. + +IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR +DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT +OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF, +EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS +PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO +OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR +MODIFICATIONS. + +RESTRICTED RIGHTS: Use, duplication or disclosure by the U.S. government +is subject to the restrictions as set forth in subparagraph (c) (1) (ii) +of the Rights in Technical Data and Computer Software Clause as DFARS +252.227-7013 and FAR 52.227-19. + +SPECIAL NOTES: + +This software also falls under the bourbon_ware clause: + + Should you find this software useful in your daily work, you should + feel obliged to take the author out for a drink if the opportunity + presents itself. The user may feel exempt from this clause if they + are under 21 or think the author has already partaken of too many + drinks. diff --git a/jni/ruby/ext/tk/sample/tkextlib/vu/README.txt b/jni/ruby/ext/tk/sample/tkextlib/vu/README.txt new file mode 100644 index 0000000..ce5f371 --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/vu/README.txt @@ -0,0 +1,50 @@ + + >>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<< + >>> The following text is the original 'README.txt' of <<< + >>> vu extension demos. <<< + >>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<< + +## +## DESCRIPTION OF DEMOS +## + +canvItems.tcl + old demo of all canvas chart items, useful to find memory leaks. + <1> prints out the additional memory usage (charts.so + script) + +canvSticker.tcl + Heribert Dahms original "demo.tcl" +

creates DEMO.ps + +canvSticker2.tcl + compares "sticker" and "text"; press <1>, <2> or <1> ... +

creates DEMO.ps + +dial.tcl + demo of variations of the dial widget. + +load.tcl + Just a utility file, not a real demo. + +m128_000.xbm + XBM pic used by sticker and canvItems demos + +oscilloscope.tcl + the heart of a Realtime Oscilloscope,where the PC´s joystick + port gives 4 digtal inputs and 4 analog 8 bit values with an + resolution of ~1 millisecond (!!!) running Realtime Linux. +

creates DEMO.ps + +pie.tcl + The magic 3D spinning pie chart! + +vu.tcl + demo fo Vu widgets + +canvLabel.tcl + 'label' is a canvas item just like 'text', but with -angle + rotation of the string. This is not built in by default, as + it requires the internal Tk headers. + press <1>, <2> or <1> ... +

creates DEMO.ps + diff --git a/jni/ruby/ext/tk/sample/tkextlib/vu/canvItems.rb b/jni/ruby/ext/tk/sample/tkextlib/vu/canvItems.rb new file mode 100644 index 0000000..364f876 --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/vu/canvItems.rb @@ -0,0 +1,90 @@ +#!/usr/bin/env ruby + +require 'tk' +require 'tkextlib/vu/charts' + +####################################### + +xbm = File.join(File.dirname(File.expand_path(__FILE__)), 'm128_000.xbm') + +sval = [ 11, 22, 33, 44, 55, 66, 77, 88, 99 ] + +l0 = TkLabel.new(:width=>128, :height=>128, + :bitmap=>"@#{xbm}", :relief=>:groove).pack(:side=>:left) + +c0 = TkCanvas.new(:width=>80, :height=>80, + :insertwidth=>0, :highlightthickness=>0, + :selectborderwidth=>0, :borderwidth=>2, + :relief=>:ridge).place(:in=>l0, :relx=>0.5, :rely=>0.5, + :anchor=>:c) + +st = Tk::Vu::TkcStripchart.new(c0, 3, 3, 80, 80, + :background=>"#b7c0d7", :fill=>'slategray3', + :jumpscroll=>1, :outline=>'black', + :scaleline=>'blue', :stripline=>'red', + :selected=>1, :values=>sval) + +TkcText.create(c0, 40, 40, + :text=>Tk::TCL_PATCHLEVEL, :fill=>'cyan', :tags=>'text') + + +l1 = TkLabel.new(:width=>128, :height=>128, + :bitmap=>"@#{xbm}", :relief=>:groove).pack(:side=>:left) + +c1 = TkCanvas.new(:width=>80, :height=>80, + :insertwidth=>0, :highlightthickness=>0, + :selectborderwidth=>0, :borderwidth=>2, + :relief=>:ridge).place(:in=>l1, :relx=>0.5, :rely=>0.5, + :anchor=>:c) + +bar1 = Tk::Vu::TkcBarchart.new(c1, 3, 3, 80, 80, + :background=>"#b7c0d7", :scalevalue=>10.0, + :autocolor=>true, :selected=>1, + :outline=>'black', :barline=>'yellow', + :scalelinestyle=>0) + +bar2 = Tk::Vu::TkcBarchart.new(c1, 53, 3, 80, 80, + :background=>"#b7c0d7", :scalevalue=>10.0, + :autocolor=>true, :selected=>1, + :outline=>'black', :fill=>"#b7c0d7", + :barline=>'red', :scalelinestyle=>22) + + +l2 = TkLabel.new(:width=>128, :height=>128, + :bitmap=>"@#{xbm}", :relief=>:groove).pack(:side=>:left) + +c2 = TkCanvas.new(:width=>80, :height=>80, + :insertwidth=>0, :highlightthickness=>0, + :selectborderwidth=>0, :borderwidth=>2, + :relief=>:ridge).place(:in=>l2, :relx=>0.5, :rely=>0.5, + :anchor=>:c) + +begin + stick = Tk::Vu::TkcSticker.new(c2, 3, 3, 80, 80, + :text=>"Tcl/Tk", :space=>0, :color=>'red', + :outline=>'red', :font=>'Helvetica 14 bold', + :fill=>'', :stipple=>'', :bar=>'blue', + :orient=>:vertical, :anchor=>:s, + :relheight=>1.0, :relwidth=>0.15, + :relx=>0.1, :rely=>0.0) +rescue + stick = nil + TkcText.new(c2, 40, 10, :text=>"No Sticker Item") +end + +c_do = proc{ + st[:values] = rand() * 100 + + bar1[:values] = rand() * 10 + bar2[:values] = rand() * 10 + + stick[:rely] = rand() * 100 * 0.01 if stick +} + +c0.bind('1', c_do) + +TkTimer.new(100, -1, c_do).start + +Tk.root.bind('q', proc{exit}) + +Tk.mainloop diff --git a/jni/ruby/ext/tk/sample/tkextlib/vu/canvSticker.rb b/jni/ruby/ext/tk/sample/tkextlib/vu/canvSticker.rb new file mode 100644 index 0000000..85713eb --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/vu/canvSticker.rb @@ -0,0 +1,82 @@ +#!/usr/bin/env ruby + +require 'tk' +require 'tkextlib/vu/charts' + +####################################### + +Tk.root.geometry('+30+30') + +delay = 2000 + +c = TkCanvas.new.pack + +begin + st = Tk::Vu::TkcSticker.new(c, 0, 0, 10, 10) +rescue + Tk.messageBox(:type=>'ok', :title=>"No sticker Item", + :message=>"This build of vu does not include the sticker item") + exit +end +#st.delete + +steps = [] + +steps << proc{ + # I used a 75dpi screen for testing, but others should make no difference! + puts 'You\'ll see a small upright rectangle with "He" inside.' + st = Tk::Vu::TkcSticker.new(c, '6m', '10m', '13m', '27m', :text=>'Hello') +} + +steps << proc{ + puts 'You\'ll see the whole "Hello" drawn rotated 90 degrees.' + st[:orient] = :vertical +} + +steps << proc{ + puts 'The rectangle shrinks and the text is clipped to "Hell"' + #st.coords('6m', '10m', '13m', '20m') + st.coords('6m', '10m', '13m', '17m') +} + +steps << proc{ + puts 'Now you\'ll read "ello"' + st[:lefttrunc] = true +} + +steps << proc{ + puts 'Enlarging the rectangle shows the complete "Hello" again' + st.scale(0, 0, 3, 3) +} + +steps << proc{ + puts 'This time the text is repeated: "Hello", approx. 5mm space, "Hello"' + st[:space] = '5m' +} + +steps << proc{ + puts 'A vertical bar appears in the lower right region and text jumps to the left.' + st.configure(:anchor=>:n, :relw=>0.3, :relh=>0.7, + :relx=>0.6, :rely=>0.3, :bar=>'red') +} + +steps << proc{ + puts 'Paint the backgound.' + st[:fill] = 'yellow' +} + +steps << proc{ + puts "Let's test stippling." + st[:stipple] = 'gray25' +} + +steps << proc{ + puts 'Finally a large outline forces a single "Hello" and shrinks the bar.' + st[:width] = '6m' +} + +Tk.root.bind('q', proc{exit}) + +TkTimer.new(delay, 1, *steps).start + +Tk.mainloop diff --git a/jni/ruby/ext/tk/sample/tkextlib/vu/canvSticker2.rb b/jni/ruby/ext/tk/sample/tkextlib/vu/canvSticker2.rb new file mode 100644 index 0000000..3d9495f --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/vu/canvSticker2.rb @@ -0,0 +1,101 @@ +#!/usr/bin/env ruby + +require 'tk' +require 'tkextlib/vu/charts' + +####################################### + +c = TkCanvas.new.pack + +begin + st = Tk::Vu::TkcSticker.new(c, 0, 0, 10, 10) +rescue + Tk.messageBox(:type=>'ok', :title=>"No sticker Item", + :message=>"This build of vu does not include the sticker item") + exit +end + +c.destroy + +#--- +#--- set STRING {{x0 y0 x1 y1} {...text...} {resize point: center} + +#sti_conf = [ [10, 10, 180, 180], "Sticker äöüß@²³¼½¾", :center ] +#txt_conf = [ [210, 210], "Text äöüß@²³¼½¾", :center ] +sti_conf = [ [10, 10, 350, 350], + Tk::UTF8_String('Sticker \u00E4\u00F6\u00FC\u00DF\u0040\u00B2\u00B3\u00BC\u00BD\u00BE'), + :center ] +txt_conf = [ [250, 250], + Tk::UTF8_String('Text \u00E4\u00F6\u00FC\u00DF\u0040\u00B2\u00B3\u00BC\u00BD\u00BE'), + :center ] + +#p sti_conf + +fnt = TkFont.new('Helvetica 24 bold') + +#---GUI +c = TkCanvas.new(:width=>500, :height=>500, :bg=>'aquamarine3').pack + +#---CRRW Use the technique of eval the coord ... +sti = Tk::Vu::TkcSticker.new(c, sti_conf[0]){ + anchor sti_conf[2] + bar 'black' + color 'red' + fill '' + font fnt + lefttrunc 0 + outline '' + relheight 0.0 + relwidth 0.0 + relx 0.0 + rely 0.0 + space 0 + stipple '' + tags 'sti' + text sti_conf[1] + width 0 + orient :vertical + minwidth 0 + minheight 0 + maxwidth 32767 + maxheight 32767 +} + +txt = TkcText.new(c, txt_conf[0]){ + activefill '' + activestipple '' + anchor txt_conf[2] + disabledfill '' + disabledstipple '' + fill 'blue' + font fnt + justify :left + offset '0,0' + state '' + stipple '' + tags ['tex'] + text txt_conf[1] + width 0 +} + +#---BINDINGS +c.bind('2', proc{ + sti[:orient] = :horizontal + txt[:width] = 0 # horizontal + }) + +c.bind('3', proc{ + sti[:orient] = :vertical + txt[:width] = 1 # top down + }) + +Tk.root.bind('p', proc{ + c.postscript(:file=>'DEMO.ps') + puts "DEMO.ps printed" + }) + +Tk.root.bind('q', proc{exit}) + +##################### + +Tk.mainloop diff --git a/jni/ruby/ext/tk/sample/tkextlib/vu/dial_demo.rb b/jni/ruby/ext/tk/sample/tkextlib/vu/dial_demo.rb new file mode 100644 index 0000000..f1f2f11 --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/vu/dial_demo.rb @@ -0,0 +1,113 @@ +#!/usr/bin/env ruby + +require 'tk' +require 'tkextlib/vu/dial' + +####################################### + +v_volume = TkVariable.new +v_speed = TkVariable.new +v_dir = TkVariable.new +v_rot = TkVariable.new +v_linked = TkVariable.new +v_needle = TkVariable.new + +volume = Tk::Vu::Dial.new(:label=>"Volume", :from=>-0.1, :to=>0.1, + :resolution=>0.001, :minortickinterval=>0.01, + :tickinterval=>0.1, :beginangle=>-20, + :endangle=>260, :variable=>v_volume) + +speed = Tk::Vu::Dial.new(:label=>"Speed", :from=>2000, :to=>100, + :resolution=>10, :tickinterval=>100, + :minortickinterval=>0, :variable=>v_speed, + :showtags=>:label, :showvalue=>false) + +speed.set_tag_constrain(100, 'Fast', 2000, 'Slow') + +fwd = Tk::Vu::Dial.new(:from=>-10.0, :to=>-20.0, :resolution=>0.1, + :tickinterval=>5.0, :minortickinterval=>1.0, + :variable=>v_dir) + +rev = Tk::Vu::Dial.new(:from=>-20.0, :to=>-10.0, :resolution=>0.1, + :tickinterval=>5.0, :minortickinterval=>1.0, + :variable=>v_dir) + +small = Tk::Vu::Dial.new(:font=>"Helvetica -10", :from=>0, :to=>10, + :resolution=>0.05, :tickinterval=>2, + :minortickinterval=>0.5, :radius=>20, + :dialcolor=>'red2', :activebackground=>'red', + :variable=>v_rot) + +large = Tk::Vu::Dial.new(:font=>"Helvetica -8", :from=>0, :to=>10, + :resolution=>0.05, :tickinterval=>1, + :minortickinterval=>0.25, :radius=>40, + :dialcolor=>'red2', :activebackground=>'red', + :variable=>v_rot) + +turn = Tk::Vu::Dial.new(:needlecolor=>'red', :label=>"Linked", + :variable=>v_linked) + +scale = TkScale.new(:label=>"Linked", :variable=>v_linked) + +d1 = Tk::Vu::Dial.new(:resolution=>0.0001, :from=>-0.1, :to=>0.1, + :showvalue=>true, :minortickinterval=>0.01, + :tickinterval=>0.1, :radius=>30, :label=>"Dial", + :beginangle=>-20, :endangle=>260, :variable=>v_needle, + :relief=>:raised) + +d2 = Tk::Vu::Dial.new(:resolution=>0.01, :from=>-0.1, :to=>0.1, + :showvalue=>true, :minortickinterval=>0.01, + :tickinterval=>0.1, :radius=>30, :label=>"Dial 2", + :beginangle=>-20, :endangle=>260, :variable=>v_needle, + :dialrelief=>:flat, :needlecolor=>'red', + :needletype=>:triangle, :relief=>:sunken) + +d3 = Tk::Vu::Dial.new(:resolution=>0.001, :from=>-0.1, :to=>0.1, + :showvalue=>true, :minortickinterval=>0.01, + :tickinterval=>0.1, :radius=>30, :label=>"Dial 3", + :beginangle=>-20, :endangle=>260, :variable=>v_needle, + :dialrelief=>:flat, :needlecolor=>'blue', + :needletype=>:arc, :relief=>:ridge) + +f_btns = TkFrame.new +f_sep = TkFrame.new(:height=>2, :relief=>:sunken, :bd=>1) + + +v_volume.value = -0.1 +v_speed.value = 500 + +update = TkTimer.new(proc{v_speed.numeric}, -1, proc{ + if v_volume == volume[:to] + v_volume.numeric = volume[:from] + else + v_volume.numeric += volume[:resolution] + end + }) + +b_start = TkButton.new(:text=>"Start", :command=>proc{update.start}) +b_stop = TkButton.new(:text=>"Stop", :command=>proc{update.stop}) +b_exit = TkButton.new(:text=>"Exit", :command=>proc{exit}) + +Tk.grid(b_start, :in=>f_btns, :sticky=>:ew, :padx=>4, :pady=>4) +Tk.grid(b_stop, :in=>f_btns, :sticky=>:ew, :padx=>4, :pady=>4) +f_btns.grid_columnconfigure(0, :weight=>1) + +Tk.grid(f_btns, speed, volume, :sticky=>:news) +Tk.grid(f_sep, '-', '-', :sticky=>:news) +Tk.grid(fwd, rev, d1, :sticky=>:news) +Tk.grid(small, large, d2, :sticky=>:news) +Tk.grid(turn, scale, d3, :sticky=>:news) + +Tk.grid(b_exit, '-', '-', :sticky=>:ew, :padx=>4, :pady=>4) + +Tk.root.grid_columnconfigure(0, :weight=>1) +Tk.root.grid_columnconfigure(1, :weight=>1) +Tk.root.grid_columnconfigure(2, :weight=>1) + +Tk.root.grid_rowconfigure(0, :weight=>1) +Tk.root.grid_rowconfigure(2, :weight=>1) +Tk.root.grid_rowconfigure(3, :weight=>1) +Tk.root.grid_rowconfigure(4, :weight=>1) + + +Tk.mainloop diff --git a/jni/ruby/ext/tk/sample/tkextlib/vu/m128_000.xbm b/jni/ruby/ext/tk/sample/tkextlib/vu/m128_000.xbm new file mode 100644 index 0000000..455e3c5 --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/vu/m128_000.xbm @@ -0,0 +1,174 @@ +#define m128_000_width 128 +#define m128_000_height 128 +static unsigned char m128_000_bits[] = { + 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf0, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, + 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x03, 0xfc, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, + 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xea, 0x0f, 0xfc, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0xd5, 0x0f, + 0xbf, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, + 0xaa, 0xaa, 0xaa, 0x3f, 0x7f, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x3f, 0xaf, 0xfa, 0xab, 0xaa, + 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xfa, 0xab, 0x3e, + 0x5f, 0xf5, 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0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x03, 0x70, 0x3d, 0xaf, 0x03, 0xb0, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, + 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x03, 0xb0, 0x3e, 0x5f, 0x03, 0x70, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x03, 0x70, 0x3d, + 0xaf, 0x0e, 0xac, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, + 0xaa, 0x0e, 0xac, 0x3e, 0x5f, 0x0d, 0x5c, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x0d, 0x5c, 0x3d, 0xaf, 0xfa, 0xab, 0xaa, + 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xfa, 0xab, 0x3e, + 0x5f, 0xf5, 0x57, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0xf5, 0x57, 0x3d, 0xbf, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, + 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x3f, 0x7f, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x3f, + 0xfc, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, + 0xaa, 0xaa, 0xea, 0x0f, 0xfc, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0xd5, 0x0f, 0xf0, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, + 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x03, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xc0, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; diff --git a/jni/ruby/ext/tk/sample/tkextlib/vu/oscilloscope.rb b/jni/ruby/ext/tk/sample/tkextlib/vu/oscilloscope.rb new file mode 100644 index 0000000..1efe13c --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/vu/oscilloscope.rb @@ -0,0 +1,68 @@ +#!/usr/bin/env ruby + +require 'tk' +require 'tkextlib/vu/charts' + +#---USAGE +info = "...the heart of a Realtime Oscilloscope, where the PCIs +joystick port gives 4 digtal inputs and 4 analog 8 bit +values with an resolution of ~1 millisecond (!!!) +running Realtime Linux. +

creates DEMO.ps + see what happens" +puts info + +#---GEOMETRY +geo_fr = [10, 10, 210, 180] +geo_ch0 = [10, 10, 210, 90] +geo_ch1 = [10, 90, 210, 180] +geo_t1 = [15, 88] + +#---GUI +c = TkCanvas.new(:width=>220, :height=>190).pack(:fill=>:both, :expand=>true) + +#---background +TkcRectangle.new(c, geo_fr, :width=>4, :fill=>'aquamarine3', + :tags=>['osc', 'frbg']) + +#---channel 0 +ch0 = Tk::Vu::TkcStripchart.new(c, geo_ch0, + :fill=>'', :jumpscroll=>false, + :outline=>'', :scaleline=>'', + :stripline=>'cyan', :tags=>['osc', 'ch0']) + +#---channel 1 +ch1 = Tk::Vu::TkcStripchart.new(c, geo_ch1, + :fill=>'', :jumpscroll=>0, + :outline=>'', :scaleline=>'', + :stripline=>'red', :tags=>['osc', 'ch1']) + +#---frame +TkcRectangle.new(c, geo_fr, :width=>4, :tags=>['osc', 'frfg']) + +#---position +txt1 = TkcText.new(c, geo_t1, :text=>"B1-Motion: X:%X\tY:%Y", + :anchor=>:nw, :tags=>['osc', 'txt1']) + +#---BINDINGS +c.bind('B1-Motion', proc{|x, y, xx, yy| + ch0[:values] = x + ch1[:values] = y + txt1[:text] = "B1-Motion: X:#{xx}\tY:#{yy}" + }, '%x %y %X %Y') + +Tk.root.bind('v', proc{ + puts ch0[:values].join(' ') + puts ch0[:values].size + }) + +Tk.root.bind('p', proc{ + c.postscript(:file=>'DEMO.ps') + puts "DEMO.ps printed" + }) + +Tk.root.bind('q', proc{exit}) + +##################### + +Tk.mainloop diff --git a/jni/ruby/ext/tk/sample/tkextlib/vu/pie.rb b/jni/ruby/ext/tk/sample/tkextlib/vu/pie.rb new file mode 100644 index 0000000..c8f9276 --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/vu/pie.rb @@ -0,0 +1,56 @@ +#!/usr/bin/env ruby + +require 'tk' +require 'tkextlib/vu/pie' + +pie = Tk::Vu::Pie.new(:label=>"My Revolving Budget"){ + itemconfigure('Welfare', :value=>3.004) + itemconfigure('Military', :value=>7.006) + itemconfigure('Transport', :value=>1.6, :explode=>15) + itemconfigure('Parks', :value=>0.9) + itemconfigure('Schools', :value=>2) + itemconfigure('Debt', :value=>4, :explode=>10) + + configure(:angle=>10, :origin=>90, :shadow=>10) +} + +spin = TkTimer.new(60, -1, proc{|obj| + pie.configure(:origin=>pie[:origin] + 1) +}) + +f = TkFrame.new +fast_btn = TkButton.new(f, :text=>"Spin Faster", :command=>proc{spin.start}) +slow_btn = TkButton.new(f, :text=>"Spin Slower", :command=>proc{spin.stop}) +quit_btn = TkButton.new(f, :text=>"Exit", :command=>proc{exit}) + +Tk.grid(pie, :sticky=>:news) +Tk.grid(f, :sticky=>:ew) + +Tk.pack(fast_btn, slow_btn, quit_btn, + :in=>f, :side=>:left, :fill=>:both, :expand=>true, :padx=>6, :pady=>4) + +Tk.root.grid_columnconfigure(0, :weight=>1) +Tk.root.grid_rowconfigure(0, :weight=>1) + +priv = { + :x=>0, :y=>0, :pie_in=>false, :angle=>pie[:angle], :origin=>pie[:origin] +} + +pie.bind('ButtonPress-1', proc{|w, x, y| + priv[:x] = x + priv[:y] = y + priv[:pie_in] = (w.winfo_width/1.8 > x) + priv[:angle] = w[:angle] + priv[:origin] = w[:origin] + }, '%W %x %y') + +pie.bind('B1-Motion', proc{|w, x, y| + if priv[:pie_in] + w.configure(:angle=>priv[:angle] + (priv[:y] - y)/3, + :origin=>(priv[:origin] + + ((w.winfo_height/2.2 > y)? -1: 1) * + (priv[:x] - x)/3) % 360) + end + }, '%W %x %y') + +Tk.mainloop diff --git a/jni/ruby/ext/tk/sample/tkextlib/vu/vu_demo.rb b/jni/ruby/ext/tk/sample/tkextlib/vu/vu_demo.rb new file mode 100644 index 0000000..358d324 --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/vu/vu_demo.rb @@ -0,0 +1,67 @@ +#!/usr/bin/env ruby + +require 'tk' +require 'tkextlib/vu' + +####################################### + +puts "Show off barchart and dial widgets" + +speed = TkVariable.new(0) + +dial = Tk::Vu::Dial.new(:resolution=>0.001, :from=>-0.1, :to=>0.1, + :showvalue=>true, :minortickinterval=>0.01, + :tickinterval=>0.1, :radius=>50, :label=>"Dial", + :beginangle=>-20, :endangle=>260, :dialcolor=>'red3', + :active=>'red2', :variable=>speed) + +bar = Tk::Vu::Bargraph.new(:from=>0, :to=>100, :relief=>:groove, + :border=>2, :label=>"Bar Chart") + +####################################### + +green = 25 +blue = 50 +purple = 75 +current = 50 + +def rand_bool + +end + +update = TkTimer.new(200, -1, proc{ + if (rand() - 0.5 + speed.numeric * 3) > 0 + current += 1 + else + current -= 1 + end + bar.set(current) + if current < green + current = 100 if current <= 0 + bar[:barcolor] = 'green' + elsif current < blue + bar[:barcolor] = 'blue' + elsif current < purple + bar[:barcolor] = 'purple' + else + bar[:barcolor] = 'red' + current = 0 if current >= 100 + end + }) + +####################################### + +gobar = TkButton.new(:text=>"Start", :command=>proc{update.start}) +nobar = TkButton.new(:text=>"Stop", :command=>proc{update.stop}) +quit = TkButton.new(:text=>"Exit", :command=>proc{exit}) + +Tk.grid('x', gobar, :sticky=>:ew, :padx=>4, :pady=>4) +Tk.grid(dial, bar, :sticky=>:news) +Tk.grid('x', nobar, :sticky=>:ew, :padx=>4, :pady=>4) +Tk.grid(quit, '-', '-', :sticky=>:ew, :padx=>4, :pady=>4) +Tk.root.grid_columnconfigure(2, :weight=>1) +Tk.root.grid_rowconfigure(1, :weight=>1) + +####################################### + +Tk.mainloop -- cgit v1.2.3-70-g09d2